Browse Source

update to version xscreensaver 6.08

Signed-off-by: Toshaan Bharvani <toshaan@powerel.org>
master
Toshaan Bharvani 12 months ago
parent
commit
7babb45989
  1. 3493
      SOURCES/ja.po
  2. 55
      SOURCES/xscreensaver-6.06-webcollage-default-nonet.patch
  3. 49
      SOURCES/xscreensaver-6.07-0001-make_ximage-avoid-integer-overflow-on-left-shift.patch
  4. 37
      SOURCES/xscreensaver-6.07-0002-convert_ximage_to_rgba32-avoid-integer-overflow-on-l.patch
  5. 99
      SOURCES/xscreensaver-6.07-0003-check-header-directory-for-ffmpeg-related-libraries-.patch
  6. 36
      SOURCES/xscreensaver-6.07-0004-ffmpeg-out.c-include-additional-header-file.patch
  7. 208
      SPECS/xscreensaver.spec

3493
SOURCES/ja.po

File diff suppressed because it is too large Load Diff

55
SOURCES/xscreensaver-6.06-webcollage-default-nonet.patch

@ -0,0 +1,55 @@ @@ -0,0 +1,55 @@
From 585252a63804d1cea0271fe29ef33476d1127a4f Mon Sep 17 00:00:00 2001
From: XScreenSaver owners <xscreensaver-owner@fedoraproject.org>
Date: Sat, 22 Oct 2022 23:48:23 +0900
Subject: [PATCH] # Change webcollage not to access to net # Also see bug
472061

---
hacks/config/webcollage.xml | 7 +++++++
hacks/webcollage.man | 5 +++++
2 files changed, 12 insertions(+)

diff --git a/hacks/config/webcollage.xml b/hacks/config/webcollage.xml
index a2acab7..1db7aa5 100644
--- a/hacks/config/webcollage.xml
+++ b/hacks/config/webcollage.xml
@@ -26,6 +26,8 @@
</vgroup>
</hgroup>
+ <file id="dir" _label="Image directory" arg="-directory %"/>
+
<xscreensaver-updater />
<_description>
@@ -44,6 +46,11 @@ Please act accordingly.
See also https://www.jwz.org/webcollage/
+NOTE:
+Webcollage on Fedora does not connect to internet by default
+and uses image files on your local disk. If you want webcollage to
+search for image files on net, use webcollage.original .
+
Written by Jamie Zawinski; 1998.
</_description>
</screensaver>
diff --git a/hacks/webcollage.man b/hacks/webcollage.man
index 85255b5..fadcd20 100644
--- a/hacks/webcollage.man
+++ b/hacks/webcollage.man
@@ -176,6 +176,11 @@ the given directory.
.TP 8
.B \-\-fps
Display the current frame rate and CPU load (MacOS only).
+.SH NOTES FOR FEDORA USER
+Webcollage on Fedora uses '-directory' option by default, so it
+.B does not connect to internet
+and uses image files on your local disk. If you want webcollage to
+search for image files on net, use webcollage.original .
.SH ENVIRONMENT
.PP
.TP 8
--
2.38.1

49
SOURCES/xscreensaver-6.07-0001-make_ximage-avoid-integer-overflow-on-left-shift.patch

@ -0,0 +1,49 @@ @@ -0,0 +1,49 @@
From 1e20010cd70edd4c26bbc6ce48c57bf36b064aeb Mon Sep 17 00:00:00 2001
From: XScreenSaver owners <xscreensaver-owner@fedoraproject.org>
Date: Fri, 1 Sep 2023 17:30:50 +0900
Subject: [PATCH 1/2] make_ximage: avoid integer overflow on left shift

gcc -fsanitize=undefined shows the following undefined behavior:

../../hacks/ximage-loader.c:176:29: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'
../../hacks/ximage-loader.c:169:29: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'

This is because of integral promotion from guchar to int, not to unsigned int.

To avoid this error, cast to unsigned long type.
---
hacks/ximage-loader.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hacks/ximage-loader.c b/hacks/ximage-loader.c
index a3f6eb0..152ad9f 100644
--- a/hacks/ximage-loader.c
+++ b/hacks/ximage-loader.c
@@ -159,21 +159,21 @@ make_ximage (Display *dpy, Visual *visual, const char *filename,
unsigned long rgba = 0;
switch (chan) {
case 1:
- rgba = ((0xFF << 24) |
+ rgba = ((0xFFUL << 24) |
(*i << 16) |
(*i << 8) |
*i);
i++;
break;
case 3:
- rgba = ((0xFF << 24) |
+ rgba = ((0xFFUL << 24) |
(i[2] << 16) |
(i[1] << 8) |
i[0]);
i += 3;
break;
case 4:
- rgba = ((i[3] << 24) |
+ rgba = ((((unsigned long)i[3]) << 24) |
(i[2] << 16) |
(i[1] << 8) |
i[0]);
--
2.41.0

37
SOURCES/xscreensaver-6.07-0002-convert_ximage_to_rgba32-avoid-integer-overflow-on-l.patch

@ -0,0 +1,37 @@ @@ -0,0 +1,37 @@
From b6aacc5eb73ef0d41bdff9cd62672d4dc7a62e0d Mon Sep 17 00:00:00 2001
From: XScreenSaver owners <xscreensaver-owner@fedoraproject.org>
Date: Fri, 1 Sep 2023 17:32:57 +0900
Subject: [PATCH 2/2] convert_ximage_to_rgba32: avoid integer overflow on left
shift

gcc -fsanitize=undefined shows the following undefined behavior:

../../../hacks/glx/grab-ximage.c:213:21: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'

This is because of integral promotion from unsigned char to int, not to unsigned int.

To avoid this error, cast to unsigned long type.
---
hacks/glx/grab-ximage.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hacks/glx/grab-ximage.c b/hacks/glx/grab-ximage.c
index defefda..9d3a2d6 100644
--- a/hacks/glx/grab-ximage.c
+++ b/hacks/glx/grab-ximage.c
@@ -207,10 +207,10 @@ convert_ximage_to_rgba32 (Screen *screen, XImage *image)
sb = spread_map[2][sb];
}
- cp = ((sr << crpos) |
+ cp = ((((unsigned long)sr) << crpos) |
(sg << cgpos) |
(sb << cbpos) |
- (0xFF << capos));
+ (0xFFUL << capos));
XPutPixel (to, x, y, cp);
}
--
2.41.0

99
SOURCES/xscreensaver-6.07-0003-check-header-directory-for-ffmpeg-related-libraries-.patch

@ -0,0 +1,99 @@ @@ -0,0 +1,99 @@
From a3556bac2e0e1a139487a94d4604294c0b957c48 Mon Sep 17 00:00:00 2001
From: XScreenSaver owners <xscreensaver-owner@fedoraproject.org>
Date: Thu, 7 Sep 2023 23:24:17 +0900
Subject: [PATCH 3/4] check header directory for ffmpeg related libraries and
add to CFLAGS

The header files for ffmpeg related libraries may be installed
under subdirectories of /usr/include.

To handle such settings:
- configure.ac: detect such header files correctly using pkg-config --cflags .
- hacks/Makefile.in: add header directory path to include path for compilation
when needed
---
configure.ac | 15 +++++++++++++++
hacks/Makefile.in | 6 ++++++
2 files changed, 21 insertions(+)

diff --git a/configure.ac b/configure.ac
index 826ec5a..feeff9a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4015,6 +4015,9 @@ have_swresample="$ok"
# Check includes
if test "$have_avutil" = yes; then
ac_save_avutil_CPPFLAGS="$CPPFLAGS"
+ AC_CACHE_CHECK([for avutil includes], ac_cv_avutil_config_cflags,
+ [ac_cv_avutil_config_cflags=`$pkg_config --cflags libavutil`])
+ ac_avutil_config_cflags=$ac_cv_avutil_config_cflags
CPPFLAGS="$CPPFLAGS $ac_avutil_config_cflags"
have_avutil=no
AC_CHECK_X_HEADER(libavutil/avutil.h, [have_avutil=yes])
@@ -4023,6 +4026,9 @@ fi
if test "$have_avcodec" = yes; then
ac_save_avcodec_CPPFLAGS="$CPPFLAGS"
+ AC_CACHE_CHECK([for avcodec includes], ac_cv_avcodec_config_cflags,
+ [ac_cv_avcodec_config_cflags=`$pkg_config --cflags libavcodec`])
+ ac_avcodec_config_cflags=$ac_cv_avcodec_config_cflags
CPPFLAGS="$CPPFLAGS $ac_avcodec_config_cflags"
have_avcodec=no
AC_CHECK_X_HEADER(libavcodec/avcodec.h, [have_avcodec=yes])
@@ -4031,6 +4037,9 @@ fi
if test "$have_avformat" = yes; then
ac_save_avformat_CPPFLAGS="$CPPFLAGS"
+ AC_CACHE_CHECK([for avformat includes], ac_cv_avformat_config_cflags,
+ [ac_cv_avformat_config_cflags=`$pkg_config --cflags libavformat`])
+ ac_avformat_config_cflags=$ac_cv_avformat_config_cflags
CPPFLAGS="$CPPFLAGS $ac_avformat_config_cflags"
have_avformat=no
AC_CHECK_X_HEADER(libavformat/avformat.h, [have_avformat=yes])
@@ -4039,6 +4048,9 @@ fi
if test "$have_swscale" = yes; then
ac_save_swscale_CPPFLAGS="$CPPFLAGS"
+ AC_CACHE_CHECK([for swscale includes], ac_cv_swscale_config_cflags,
+ [ac_cv_swscale_config_cflags=`$pkg_config --cflags libswscale`])
+ ac_swscale_config_cflags=$ac_cv_swscale_config_cflags
CPPFLAGS="$CPPFLAGS $ac_swscale_config_cflags"
have_swscale=no
AC_CHECK_X_HEADER(libswscale/swscale.h, [have_swscale=yes])
@@ -4047,6 +4059,9 @@ fi
if test "$have_swresample" = yes; then
ac_save_swresample_CPPFLAGS="$CPPFLAGS"
+ AC_CACHE_CHECK([for swresample includes], ac_cv_swresample_config_cflags,
+ [ac_cv_swresample_config_cflags=`$pkg_config --cflags libswresample`])
+ ac_swresample_config_cflags=$ac_cv_swresample_config_cflags
CPPFLAGS="$CPPFLAGS $ac_swresample_config_cflags"
have_swresample=no
AC_CHECK_X_HEADER(libswresample/swresample.h, [have_swresample=yes])
diff --git a/hacks/Makefile.in b/hacks/Makefile.in
index 5942315..1cef418 100644
--- a/hacks/Makefile.in
+++ b/hacks/Makefile.in
@@ -51,6 +51,8 @@ X_PRE_LIBS = @X_PRE_LIBS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
XFT_LIBS = @XFT_LIBS@
+FFMPEG_CFLAGS = @FFMPEG_CFLAGS@
+
# Note: see comment in ../driver/Makefile.in for explanation of X_LIBS, etc.
#
HACK_PRE = $(LIBS) $(X_LIBS)
@@ -507,6 +509,10 @@ HACK_CFLAGS_BASE=$(INCLUDES) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(X_CFLAGS)
.c.o:
$(CC) -c $(HACK_CFLAGS_BASE) $<
+# For objects which require ffmpeg related headers
+ffmpeg-out.o: $(srcdir)/ffmpeg-out.c
+ $(CC) -o $@ -c $(FFMPEG_CFLAGS) $(HACK_CFLAGS_BASE) $<
+
# Make sure these are regenerated when the version number ticks.
screenhack.o: $(UTILS_SRC)/version.h
--
2.41.0

36
SOURCES/xscreensaver-6.07-0004-ffmpeg-out.c-include-additional-header-file.patch

@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
From 463a9e6352741e7bb358f8b8d9d437c17658c4b1 Mon Sep 17 00:00:00 2001
From: XScreenSaver owners <xscreensaver-owner@fedoraproject.org>
Date: Thu, 7 Sep 2023 23:28:19 +0900
Subject: [PATCH 4/4] ffmpeg-out.c: include additional header file
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

When configure'ing with --with-record-animation using
ffmpeg 6.0, ffmpeg-out.c won't compile like:

../../hacks/ffmpeg-out.c:47:3: error: unknown type name ‘AVCodecContext’
../../hacks/ffmpeg-out.c:91:17: warning: implicit declaration of function ‘avcodec_receive_packet’ [-Wimplicit-function-declaration]

... and so on.

Include needed additional header.
---
hacks/ffmpeg-out.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/hacks/ffmpeg-out.c b/hacks/ffmpeg-out.c
index 0295d7e..e54e9e6 100644
--- a/hacks/ffmpeg-out.c
+++ b/hacks/ffmpeg-out.c
@@ -37,6 +37,7 @@
/* No "diagnostic pop" because some macrose use c99 features. */
#endif
+#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
#include <libswresample/swresample.h>
--
2.41.0

208
SPECS/xscreensaver.spec

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
%define name xscreensaver

%define mainversion 6.04
%define mainversion 6.08
#%%undefine extratarver 1
#%%define beta_ver b2
%undefine beta_ver

@ -11,7 +12,7 @@ @@ -11,7 +12,7 @@
%define split_getimage 1
%endif

%define fedora_rel 2
%define baserelease 1

%global use_clang_as_cc 0
%global use_clang_analyze 0
@ -34,6 +35,10 @@ @@ -34,6 +35,10 @@
%global flagrel %{flagrel}.clang_alz
%endif

%global toolchain gcc
%if 0%{?use_clang_as_cc} >= 1
%global toolchain clang
%endif

# EPEL6
%{!?__git:%define __git git}
@ -69,11 +74,11 @@ @@ -69,11 +74,11 @@
Summary: X screen saver and locker
Name: %{name}
Version: %{mainversion}
Release: %{?beta_ver:0.}%{fedora_rel}%{?beta_ver:.%beta_ver}%{?dist}%{flagrel}%{?extrarel}
Release: %{?beta_ver:0.}%{baserelease}%{?beta_ver:.%beta_ver}%{?dist}%{flagrel}%{?extrarel}
Epoch: 1
License: MIT
URL: http://www.jwz.org/xscreensaver/
Source0: http://www.jwz.org/xscreensaver/xscreensaver-%{mainversion}%{?beta_ver}.tar.gz
Source0: http://www.jwz.org/xscreensaver/xscreensaver-%{mainversion}%{?beta_ver}%{?extratarver:.%extratarver}.tar.gz
%if %{modular_conf}
Source10: update-xscreensaver-hacks
%endif
@ -84,13 +89,6 @@ Source12: xscreensaver-autostart.desktop @@ -84,13 +89,6 @@ Source12: xscreensaver-autostart.desktop
# wrapper script for switching user (bug 1878730)
Source13: xscreensaver-newlogin-wrapper
Source100: ja.po
#
Source200: logo-50.png
Source201: logo-50.xpm
Source202: logo-180.png
Source203: logo-180.xpm
Source204: logo-360.png
Source205: logo-360.xpm
##
## Patches
##
@ -99,18 +97,20 @@ Patch1: xscreensaver-5.45-0001-barcode-glsnake-sanitize-the-names-of-mo @@ -99,18 +97,20 @@ Patch1: xscreensaver-5.45-0001-barcode-glsnake-sanitize-the-names-of-mo
## Patches already sent to the upsteam
## Patches which must be discussed with upstream
# See bug 472061
Patch21: xscreensaver-5.35-webcollage-default-nonet.patch
# watchdog_timer: don't relaunch hacks when unblanking
Patch101: xscreensaver-6.04-0001-watchdog_timer-don-t-relaunch-hacks-when-unblanking.patch
# misc: kill gcc warn_unused_result warnings
Patch3607: xscreensaver-5.36-0007-misc-kill-gcc-warn_unused_result-warnings.patch
Patch21: xscreensaver-6.06-webcollage-default-nonet.patch
# make_ximage: avoid integer overflow on left shift
Patch4701: xscreensaver-6.07-0001-make_ximage-avoid-integer-overflow-on-left-shift.patch
# convert_ximage_to_rgba32: avoid integer overflow on left shift
Patch4702: xscreensaver-6.07-0002-convert_ximage_to_rgba32-avoid-integer-overflow-on-l.patch
# check header directory for ffmpeg related libraries and add to CFLAGS
Patch4703: xscreensaver-6.07-0003-check-header-directory-for-ffmpeg-related-libraries-.patch
# ffmpeg-out.c: include additional header file
Patch4704: xscreensaver-6.07-0004-ffmpeg-out.c-include-additional-header-file.patch
# Fedora specific
# window_init: search parenthesis first for searching year
Patch10001: xscreensaver-6.00-0001-screensaver_id-search-parenthesis-first-for-searchin.patch
Patch10001: xscreensaver-6.00-0001-screensaver_id-search-parenthesis-first-for-searchin.patch
# dialog.c: window_init: show more version string
Patch10003: xscreensaver-6.00-0003-dialog.c-window_init-show-more-version-string.patch
# blurb: show 1/100 sec on linux
Patch10005: xscreensaver-6.00-0005-blurb-show-1-100-sec-on-linux.patch
Patch10003: xscreensaver-6.00-0003-dialog.c-window_init-show-more-version-string.patch
#
# gcc warning cleanup
# Some cppcheck cleanup
@ -182,12 +182,14 @@ BuildRequires: libXt-devel @@ -182,12 +182,14 @@ BuildRequires: libXt-devel
#BuildRequires: libXxf86misc-devel
BuildRequires: libXxf86vm-devel
# XScreenSaver 5.31
BuildRequires: libXft-devel
BuildRequires: gtk2-devel
BuildRequires: pkgconfig(xft)
BuildRequires: pkgconfig(gtk+-3.0) >= 2.22.0
BuildRequires: pkgconfig(gmodule-2.0)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(gio-2.0)
# Write explicitly below, especially
# for F-23 gdk_pixbuf package splitting
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
BuildRequires: pkgconfig(gdk-pixbuf-xlib-2.0)
BuildRequires: libjpeg-devel
BuildRequires: libglade2-devel
%if 0%{?support_setcap} >= 1
@ -197,6 +199,14 @@ BuildRequires: pkgconfig(libcap) @@ -197,6 +199,14 @@ BuildRequires: pkgconfig(libcap)
%if 0%{?support_systemd} >= 1
BuildRequires: pkgconfig(libsystemd)
%endif
# From xscreensaver 6.07
%if 0%{?enable_animation}
BuildRequires: pkgconfig(libavutil)
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libswscale)
BuildRequires: pkgconfig(libswresample)
%endif
%if 0%{?fedora}
BuildRequires: %{default_text}
%endif
@ -204,6 +214,9 @@ BuildRequires: %{default_text} @@ -204,6 +214,9 @@ BuildRequires: %{default_text}
# https://fedoraproject.org/wiki/Changes/Build_Root_Without_Perl
BuildRequires: perl-interpreter
BuildRequires: perl-generators
# xscreensaver 6.07 calls check-configs.pl
BuildRequires: perl(strict)
BuildRequires: perl(diagnostics)
# For --with-login-manager option
%if 0%{?fedora} >= 14
# Use pseudo symlink, not writing BR: gdm
@ -218,10 +231,16 @@ Requires: appres @@ -218,10 +231,16 @@ Requires: appres
%endif
# For switch user wrapper
Requires: %{_bindir}/pidof
# XScreenSaver 6.07: For manual
# Actually the following is not needed, yelp is still used
#Recommends: xterm
%if 0%{?build_tests} < 1
# Obsoletes but not Provides
Obsoletes: xscreeensaver-tests < %{epoch}:%{version}-%{release}
%endif
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1030659
# XScreenSaver 6.06 xscreensaver-settings now needs xscreensaver-gl-visual
Requires: %{name}-gl-base = %{epoch}:%{version}-%{release}

%package extras-base
Summary: A base package for screensavers
@ -236,7 +255,7 @@ Summary: An enhanced set of screensavers @@ -236,7 +255,7 @@ Summary: An enhanced set of screensavers
# Does not available on EPEL7
BuildRequires: desktop-backgrounds-basic
%else
BuildRequires: gnome-backgrounds
BuildRequires: gnome-backgrounds
%endif
Requires: %{name}-base = %{epoch}:%{version}-%{release}
%if %{split_getimage}
@ -245,7 +264,6 @@ Requires: %{name}-extras-base = %{epoch}:%{version}-%{release} @@ -245,7 +264,6 @@ Requires: %{name}-extras-base = %{epoch}:%{version}-%{release}

%package gl-base
Summary: A base package for screensavers that require OpenGL
Requires: %{name}-base = %{epoch}:%{version}-%{release}

%package gl-extras
Summary: An enhanced set of screensavers that require OpenGL
@ -359,13 +377,6 @@ This package contains cppcheck result of XScreenSaver. @@ -359,13 +377,6 @@ This package contains cppcheck result of XScreenSaver.
%prep
%setup -q -n %{name}-%{mainversion}%{?beta_ver}

#cp %{SOURCE200} ./utils/images/logo-50.png
#cp %{SOURCE201} ./utils/images/logo-50.xpm
#cp %{SOURCE202} ./utils/images/logo-180.png
#cp %{SOURCE203} ./utils/images/logo-180.xpm
#cp %{SOURCE204} ./utils/images/logo-360.png
#cp %{SOURCE205} ./utils/images/logo-360.xpm

cat > .gitignore <<EOF
configure
config.guess
@ -390,12 +401,13 @@ find . -name \*.c -exec chmod ugo-x {} \; @@ -390,12 +401,13 @@ find . -name \*.c -exec chmod ugo-x {} \;

%__cat %PATCH1 | %__git am
%__cat %PATCH21 | %__git am
%__cat %PATCH101 | %__git am

#%%__cat %PATCH3607 | %__git am
%__cat %PATCH4701 | %__git am
%__cat %PATCH4702 | %__git am
%__cat %PATCH4703 | %__git am
%__cat %PATCH4704 | %__git am
%__cat %PATCH10001 | %__git am
%__cat %PATCH10003 | %__git am
%__cat %PATCH10005 | %__git am

#%%__cat %PATCH13501 | %%__git am

@ -442,6 +454,7 @@ for f in \ @@ -442,6 +454,7 @@ for f in \
driver/XScreenSaver.ad.in \
%endif
hacks/glx/sproingies.man \
hacks/glx/cubocteversion.man \
; do
iconv -f ISO-8859-1 -t UTF-8 $f > $f.tmp || cp -p $f $f.tmp
touch -r $f $f.tmp
@ -513,6 +526,12 @@ sed -i.manentry -e 's@man %%s@man 6x %%s 2>/dev/null || man 1 %%s @' \ @@ -513,6 +526,12 @@ sed -i.manentry -e 's@man %%s@man 6x %%s 2>/dev/null || man 1 %%s @' \
driver/XScreenSaver.ad.in
%__git commit -m "%PATCH_desc" -a

# XScreenSaver 6.07: use xterm
sed -i.term \
driver/XScreenSaver.ad.in \
-e 's|lxterminal|xterm|'
%__git commit -m "Manual: change terminal to xterm" -a

# Suppress rpmlint warnings.
# suppress about pam config (although this is
# not the fault of xscreensaver.pam ......).
@ -555,13 +574,6 @@ sed -i Makefile.in.in \ @@ -555,13 +574,6 @@ sed -i Makefile.in.in \
popd
%__git commit -m "Manually fix po files entry" -a

# Fix prefs.o path for xscreensaver-getimage in hacks/Makefile
sed -i hacks/Makefile.in \
-e 's|\$(srcdir)/../driver/prefs.o|../driver/prefs.o|' \
-e 's|cd $(srcdir)/../driver|cd ../driver|' \
%{nil}
%__git commit -m "Fix prefs.o path for xscreensaver-getimage in hacks/Makefile" -a

# %%configure adds --disable-dependency-tracking, don't fail with that for now
sed -i configure.ac \
-e "$(($(sed -n '\@ac_unrecognized_opts@=' configure.ac | head -n 1) + 2))s|exit 2|true exit 2|"
@ -572,7 +584,6 @@ aclocal @@ -572,7 +584,6 @@ aclocal
autoconf
autoheader


%build

archdir=`sh ./config.guess`
@ -594,6 +605,8 @@ export PATH=$(pwd):$PATH @@ -594,6 +605,8 @@ export PATH=$(pwd):$PATH
# xdg-open
ln -sf /bin/true xdg-open
popd
# gtk-update-icon-cache
ln -sf /bin/true gtk-update-icon-cache

# Set optflags first
%set_build_flags
@ -605,15 +618,7 @@ export CFLAGS="$CFLAGS -Wno-long-long" @@ -605,15 +618,7 @@ export CFLAGS="$CFLAGS -Wno-long-long"
export CFLAGS="$CFLAGS -Wno-variadic-macros"

%if 0%{?use_clang_as_cc}
export CC=clang
export CFLAGS="$(echo $CFLAGS | sed -e 's|-fstack-protector-strong|-fstack-protector|')"
export CFLAGS="$(echo $CFLAGS | sed -e 's|-specs=[^ \t][^ \t]*||g')"
export CFLAGS="$(echo $CFLAGS | sed -e 's|-flto=[^ \t][^ \t]* -ffat-lto-objects |-flto |')"
export CFLAGS="$CFLAGS -Wno-gnu-statement-expression"
export LDFLAGS="$(echo $LDFLAGS | sed -e 's|-specs=[^ \t][^ \t]*||g')"
%if 0%{?fedora} >= 33
export LDFLAGS="$LDFLAGS -flto"
%endif
%endif

%if 0%{?use_gcc_strict_sanitize}
@ -634,6 +639,9 @@ export CC="${CC} -fanalyzer" @@ -634,6 +639,9 @@ export CC="${CC} -fanalyzer"
%global _smp_mflags -j1
%endif

# Show 1/100sec on blurb
export CFLAGS="$CFLAGS -DBLURB_CENTISECONDS"

CONFIG_OPTS="--prefix=%{_prefix} --with-pam --without-shadow --without-kerberos"
CONFIG_OPTS="$CONFIG_OPTS --without-setuid-hacks"
CONFIG_OPTS="$CONFIG_OPTS --with-text-file=%{default_text}"
@ -685,21 +693,24 @@ rm -f configure @@ -685,21 +693,24 @@ rm -f configure
sed -i driver/XScreenSaver.ad -e "s|$(pwd)/TMPBINDIR/||"

%if %{update_po}
#( cd po ; make generate_potfiles_in update-po )
# ???
pushd po
make generate_potfiles_in
cp -p POTFILES.in ..
# Workaround for ui file
sed -i ../POTFILES.in POTFILES.in POTFILES \
-e '\@xscreensaver\.ui@s|^\([ \t]*\)\(.*\)$|\1[type: gettext/glade]\2|'
# The following hack still seems needed
sed -i POTFILES.in POTFILES \
-e '\@driver/.*\.ui@s|^\([ \t]*\)\(.*\)$|\1[type: gettext/glade]\2|'
# Update POTFILES.in, the copy to the original directory
cp -p POTFILES.in ../../po/
git commit -m "POTFILES.in regenerated" -a || true
( cd .. ; ./config.status )

cp -p POTFILES{.in,} ..
make xscreensaver.pot srcdir=..
( export srcdir=.. ; make update-po )
rm -f ../POTFILES_in
make update-po
rm -f ../POTFILES{.in,}
popd


( cp -p ../po/*.po po/)
( cp -p po/* ../po/)
( ( cd ../po ; git add *.po ; git commit -m "po regenerated" ) || true )
%endif

@ -711,35 +722,23 @@ popd @@ -711,35 +722,23 @@ popd
mkdir clang-analyze
%endif

# Workaround for 5.39
mkdir -p hacks/images || true
if [ ! -f hacks/images/Makefile ] ; then
cat > hacks/images/Makefile <<EOF
default:
install:
EOF
fi
# Workaround end

# From 5.45: temporary workaround for installation issue
# From 6.00: temporary workaround for installation issue
cp -p ../driver/xscreensaver.ui driver/
cp -a ../hacks/fonts hacks

BUILD_STATUS=0
%if 0%{?use_clang_analyze} < 1
# Workaround for ppc64 build failure
make -C ../hacks/images -j1
make -C ../hacks/images || BUILD_STATUS=1
for dir in \
utils driver ../hacks/images hacks/images hacks hacks/glx po
do
%__make %{?_smp_mflags} -k \
-C $dir \
GMSGFMT="msgfmt --statistics"
GMSGFMT="msgfmt --statistics" || BUILD_STATUS=1
done
%endif

# Again
%__make %{?_smp_mflags} -k
%__make %{?_smp_mflags} -k || BUILD_STATUS=1
if [ $BUILD_STATUS != 0 ] ; then
exit $BUILD_STATUS
fi

%if %{modular_conf}
# Make XScreenSavar.ad modular (bug 200881)
@ -798,6 +797,12 @@ cd $archdir @@ -798,6 +797,12 @@ cd $archdir
archdir=`sh ./config.guess`
cd $archdir

# Same as %%build
export PATH=/usr/bin:$PATH
pushd TMPBINDIR/
export PATH=$(pwd):$PATH
popd

rm -rf ${RPM_BUILD_ROOT}

# We have to make sure these directories exist,
@ -829,6 +834,7 @@ desktop-file-install --vendor "" --delete-original \ @@ -829,6 +834,7 @@ desktop-file-install --vendor "" --delete-original \
list_files() {
echo "%%defattr(-,root,root,-)"
make -s install_prefix=${RPM_BUILD_ROOT} INSTALL=true "$@" \
| sed -e '\@gtk-update-icon-cache@d' \
| sed -n -e 's@.* \(/[^ ]*\)$@\1@p' \
| sed -e "s@^${RPM_BUILD_ROOT}@@" \
-e "s@/[a-z][a-z]*/\.\./@/@" \
@ -880,7 +886,7 @@ done @@ -880,7 +886,7 @@ done
echo "%%defattr(-,root,root,-)" >> $dd/gl-base.files

grep xscreensaver-gl-visual $dd/gl-extras.files >> $dd/gl-base.files
sed -i -e '/xscreensaver-gl-helper/d' $dd/gl-extras.files
sed -i -e '/xscreensaver-gl-visual/d' $dd/gl-extras.files
sed -i -e 's|^\(%{_mandir}.*\)$|\1*|' $dd/gl-base.files
%endif

@ -1183,6 +1189,48 @@ exit 0 @@ -1183,6 +1189,48 @@ exit 0
%endif

%changelog
* Tue Oct 17 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:6.08-1
- Update to 6.08

* Thu Sep 7 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:6.07-4
- Fix compilation to make --with-record-animation really work

* Sun Sep 3 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:6.07-3
- Fix patch again

* Fri Sep 1 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:6.07-2
- Update to 6.07
- make_ximage: avoid integer overflow on left shift
- convert_ximage_to_rgba32: likewise

* Sat Jul 22 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:6.06-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Thu Mar 2 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:6.06-3
- distort_reset: restrict radius by xgwa correctly (bug 2174626)

* Wed Feb 15 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:6.06-2
- Make -base subpackage require -gl-base (debian bug 1030659)
- switch_page_cb: backport debian fix for DPMS settings issue

* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.06-1.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Mon Dec 12 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:6.06-1
- Update to 6.06

* Sun Nov 6 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:6.05-3
- Kill no longer needed workaround stuff
- hacks/fonts: fix installation on out-of-source build
- driver/Makefile.in: fix GLIB_COMPILE_RESOURCES source
- hacks/Makefile.in: fix driver/prefs.o output location

* Sat Oct 22 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:6.05-2
- demo-Gtk.c/populate_prefs_page: use correct pointer for pref_changed_cb

* Sat Oct 22 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:6.05-1
- Update to 6.05, now demo using GTK3

* Wed Aug 31 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:6.04-2
- watchdog_timer: don't relaunch hacks when unblanking


Loading…
Cancel
Save