Accepting request 923270 from home:pperego:branches:X11:Utilities

- Package updated to 1.0.5
- All patches were removed since included in upstream
- Updated man page distributed via separate patch

OBS-URL: https://build.opensuse.org/request/show/923270
OBS-URL: https://build.opensuse.org/package/show/X11:Utilities/hsetroot?expand=0&rev=2
This commit is contained in:
2021-10-05 16:28:18 +00:00
committed by Git OBS Bridge
parent c6891cc61c
commit c33feab117
11 changed files with 47 additions and 229 deletions

14
add_destdir_support.patch Normal file
View File

@@ -0,0 +1,14 @@
diff --color -ruN hsetroot-1.0.5.ori/Makefile hsetroot-1.0.5/Makefile
--- hsetroot-1.0.5.ori/Makefile 2019-11-15 12:09:41.000000000 +0100
+++ hsetroot-1.0.5/Makefile 2021-10-05 12:16:40.331730695 +0200
@@ -30,8 +30,8 @@
hsr-outputs: hsr-outputs.o
install: hsetroot hsr-outputs
- install -st $(PREFIX)/bin/ hsetroot
- install -st $(PREFIX)/bin/ hsr-outputs
+ install -st $(DESTDIR) hsetroot
+ install -st $(DESTDIR) hsr-outputs
clean:
rm -f *.o hsetroot hsr-outputs

BIN
add_manpage.patch Normal file

Binary file not shown.

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:47f47d32fea7ba9234717b30ac4f55a14d8679c68fd5759e73b4c5eccab774f3
size 105562

View File

@@ -1,23 +0,0 @@
Description: Fix a segmentation fault when no display is present.
Origin: vendor
Bug: http://bugs.debian.org/507554
Forwarded: no
Author: <michal.suchanek@ruk.cuni.cz>
Reviewed-by: Alessandro Ghedini <ghedo@debian.org>
Last-Update: 2012-08-05
Applied-Upstream: *** FIXME ***
--- a/src/hsetroot.c
+++ b/src/hsetroot.c
@@ -254,6 +254,11 @@
Imlib_Color_Modifier modifier = NULL;
_display = XOpenDisplay (NULL);
+ if(!_display){
+ fprintf (stderr, "Cannot open X display!\n");
+ exit (123);
+ }
+
for (screen = 0; screen < ScreenCount (_display); screen++)
{
display = XOpenDisplay (NULL);

View File

@@ -1,87 +0,0 @@
Description: Add the '-extend' option
Origin: vendor
Bug: http://bugs.debian.org/507554
Forwarded: no
Author: <michal.suchanek@ruk.cuni.cz>
Reviewed-by: Alessandro Ghedini <ghedo@debian.org>
Last-Update: 2012-08-05
--- a/src/hsetroot.c
+++ b/src/hsetroot.c
@@ -8,7 +8,7 @@
#include "config.h"
typedef enum
-{ Full, Fill, Center, Tile } ImageMode;
+{ Full, Fill, Center, Tile, Xtend } ImageMode;
void
usage (char *commandline)
@@ -30,6 +30,7 @@
" -center <image> Render an image centered on screen\n"
" -tile <image> Render an image tiled\n"
" -full <image> Render an image maximum aspect\n"
+ " -extend <image> Render an image max aspect and fill borders\n"
" -fill <image> Render an image strechted\n"
"\n"
"Manipulations:\n"
@@ -199,7 +200,7 @@
imlib_blend_image_onto_image (buffer, 0, 0, 0, imgW, imgH,
0, 0, rootW, rootH);
}
- else if (mode == Full)
+ else if ((mode == Full) || (mode == Xtend))
{
double aspect = ((double) rootW) / imgW;
int top, left;
@@ -207,9 +208,29 @@
aspect = (double) rootH / (double) imgH;
top = (rootH - (int) (imgH * aspect)) / 2;
left = (rootW - (int) (imgW * aspect)) / 2;
+
imlib_blend_image_onto_image (buffer, 0, 0, 0, imgW, imgH,
left, top, (int) (imgW * aspect),
(int) (imgH * aspect));
+
+ if (mode == Xtend) {
+ int w;
+ if ( left >0 ) {
+ int right = left - 1 + (int) (imgW * aspect);
+ /* check only the right border - left is int divided so the right border is larger */
+ for (w = 1; (right + w < rootW); w <<= 1) {
+ imlib_image_copy_rect (left + 1 - w, 0, w, rootH, left + 1 - w - w, 0);
+ imlib_image_copy_rect (right, 0, w, rootH, right + w, 0);
+ }
+ }
+ if (top >0 ) {
+ int bottom = top - 1 + (int) (imgH * aspect);
+ for (w = 1; (bottom + w < rootH); w <<= 1) {
+ imlib_image_copy_rect (0, top + 1 - w, rootW, w, 0, top + 1 - w - w);
+ imlib_image_copy_rect (0, bottom, rootW, w, 0, bottom + w);
+ }
+ }
+ }
}
else
{
@@ -422,6 +443,20 @@
0)
{
fprintf (stderr, "Bad image (%s)\n", argv[i]);
+ continue;
+ }
+ }
+ else if (strcmp (argv[i], "-extend") == 0)
+ {
+ if ((++i) >= argc)
+ {
+ fprintf (stderr, "Missing image\n");
+ continue;
+ }
+ if (load_image (Xtend, argv[i], width, height, alpha, image) ==
+ 0)
+ {
+ fprintf (stderr, "Bad image (%s)\n", argv[i]);
continue;
}
}

View File

@@ -1,62 +0,0 @@
Description: Add the '-cover' option
Origin: vendor
Bug: http://bugs.debian.org/718829
Forwarded: no
Author: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Alessandro Ghedini <ghedo@debian.org>
Last-Update: 2013-08-07
--- a/src/hsetroot.c
+++ b/src/hsetroot.c
@@ -8,7 +8,7 @@
#include "config.h"
typedef enum
-{ Full, Fill, Center, Tile, Xtend } ImageMode;
+{ Full, Fill, Center, Tile, Xtend, Cover } ImageMode;
void
usage (char *commandline)
@@ -28,6 +28,7 @@
"\n"
"Image files:\n"
" -center <image> Render an image centered on screen\n"
+ " -cover <image> Render an image centered on screen scaled to fill the screen fully\n"
" -tile <image> Render an image tiled\n"
" -full <image> Render an image maximum aspect\n"
" -extend <image> Render an image max aspect and fill borders\n"
@@ -200,11 +201,11 @@
imlib_blend_image_onto_image (buffer, 0, 0, 0, imgW, imgH,
0, 0, rootW, rootH);
}
- else if ((mode == Full) || (mode == Xtend))
+ else if ((mode == Full) || (mode == Xtend) || (mode == Cover))
{
double aspect = ((double) rootW) / imgW;
int top, left;
- if ((int) (imgH * aspect) > rootH)
+ if (((int) (imgH * aspect) > rootH) != /*xor*/ (mode == Cover))
aspect = (double) rootH / (double) imgH;
top = (rootH - (int) (imgH * aspect)) / 2;
left = (rootW - (int) (imgW * aspect)) / 2;
@@ -485,6 +486,20 @@
0)
{
fprintf (stderr, "Bad image (%s)\n", argv[i]);
+ continue;
+ }
+ }
+ else if (strcmp (argv[i], "-cover") == 0)
+ {
+ if ((++i) >= argc)
+ {
+ fprintf (stderr, "Missing image\n");
+ continue;
+ }
+ if (load_image (Cover, argv[i], width, height, alpha, image) ==
+ 0)
+ {
+ fprintf (stderr, "Bad image (%s)\n", argv[i]);
continue;
}
}

View File

@@ -1,33 +0,0 @@
Description: Actually link to libX11
Origin: vendor
Bug-Debian: http://bugs.debian.org/735758
Author: Alessandro Ghedini <ghedo@debian.org>
Last-Update: 2014-01-17
--- a/configure.ac
+++ b/configure.ac
@@ -50,6 +50,12 @@
IMLIB2_LIBS=`$imlib2config_cmd --libs`
AC_SUBST(IMLIB2_LIBS)
+X11_CFLAGS=`pkg-config x11 --cflags`
+AC_SUBST(X11_CFLAGS)
+
+X11_LIBS=`pkg-config x11 --libs`
+AC_SUBST(X11_LIBS)
+
# Some extra definitions for config.h
AC_DEFINE(DESCRIPTION, "yet another wallpaper application", [single line package description])
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,7 @@
bin_PROGRAMS = hsetroot
-AM_CFLAGS = @CFLAGS@ @IMLIB2_CFLAGS@ -Wall
-LIBS = @IMLIB2_LIBS@
+AM_CFLAGS = @CFLAGS@ @IMLIB2_CFLAGS@ @X11_CFLAGS@ -Wall
+LIBS = @IMLIB2_LIBS@ @X11_LIBS@
hsetroot_SOURCES = hsetroot.c

3
hsetroot-1.0.5.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cff5f83b85a21e0c5c8c8eecbd552090bb75d8ac59e27b0bae48046f9cb5a44a
size 12878

View File

@@ -1,4 +1,4 @@
.TH HSETROOT 1 "July 29, 2012"
.TH HSETROOT 1 "November 18, 2019"
.SH NAME
hsetroot \- yet another wallpaper application
.SH SYNOPSIS
@@ -10,6 +10,13 @@ for X. It has a lot of options like rendering gradients, solids, images but
it also allows you to perform manipulations on those things, or chain them
together.
.SH OPTIONS
.SS "Generic Options:"
.TP
\fB\-root\fR
Treat multiple displays as one big screen (ignore xrandr outputs)
.TP
\fB\-screens\fR <int>
Set a screenmask to use
.SS "Gradients:"
.TP
\fB\-add\fR <color>
@@ -83,4 +90,4 @@ Adjust alpha level for colors and images
\fB\-write\fR <filename>
Write current image to file
.SH AUTHORS
Hyriand <hyriand@thegraveyard.org
Hyriand <hyriand@thegraveyard.org>, Martin Hradil

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Oct 5 10:01:33 UTC 2021 - Paolo Perego <paolo.perego@suse.com>
- Package updated to 1.0.5
- All patches were removed since included in upstream
- Updated man page distributed via separate patch
-------------------------------------------------------------------
Thu Sep 8 11:46:45 UTC 2016 - msuchanek@suse.de

View File

@@ -17,7 +17,7 @@
Name: hsetroot
Version: 1.0.2
Version: 1.0.5
Release: 0
#
Summary: Advanced wallpaper tool for X
@@ -26,12 +26,9 @@ License: GPL-2.0
Group: System/X11/Utilities
#
Url: http://thegraveyard.org/hsetroot.php
Source: %{name}-%{version}.tar.bz2
Source1: %{name}-1.0.2-5.1
Patch1: %{name}-1.0.2_01_fix-no-display-crash.patch
Patch2: %{name}-1.0.2_02_extend-mode.patch
Patch3: %{name}-1.0.2_03_cover-mode.patch
Patch4: %{name}-1.0.2_04_link-to-X11.patch
Source: %{name}-%{version}.tar.gz
Source1: hsetroot.1
Patch0: add_destdir_support.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: freetype2-devel
@@ -60,27 +57,25 @@ hsetroot also supports alpha-channels when rendering things.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch0 -p1
%build
aclocal
automake --add-missing
autoconf
%configure
make %{?_smp_mflags}
%install
%make_install
install -p -D -m 644 %{SOURCE1} %{buildroot}%{_mandir}/man1/hsetroot.1
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_mandir}/man1/
make DESTDIR=%{buildroot}%{_bindir} install
cp %{SOURCE1} %{buildroot}%{_mandir}/man1/
%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
%{_bindir}/hsr-outputs
%{_mandir}/man1/%{name}.1%{ext_man}
%doc AUTHORS README ChangeLog
%doc README.md
%changelog