diff options
author | Sebastian Pipping <sping@gentoo.org> | 2021-06-14 02:42:55 +0200 |
---|---|---|
committer | Sebastian Pipping <sping@gentoo.org> | 2021-06-14 02:50:43 +0200 |
commit | 57a31e4b1f4d63318c13dc98cb9dfa8d5e3e5594 (patch) | |
tree | 4950bbf0d12e7dd28b5f17c3adfadc518f2a94bb /x11-misc | |
parent | app-emulation/docker-cli: drop versions (diff) | |
download | gentoo-57a31e4b1f4d63318c13dc98cb9dfa8d5e3e5594.tar.gz gentoo-57a31e4b1f4d63318c13dc98cb9dfa8d5e3e5594.tar.bz2 gentoo-57a31e4b1f4d63318c13dc98cb9dfa8d5e3e5594.zip |
x11-misc/xscreensaver: 6.01
Thanks to José María Fernández González for his help!
Closes: https://bugs.gentoo.org/788865
Signed-off-by: Sebastian Pipping <sping@gentoo.org>
Package-Manager: Portage-3.0.19, Repoman-3.0.3
Diffstat (limited to 'x11-misc')
-rw-r--r-- | x11-misc/xscreensaver/Manifest | 1 | ||||
-rw-r--r-- | x11-misc/xscreensaver/files/xscreensaver-6.01-configure.ac-sandbox.patch | 120 | ||||
-rw-r--r-- | x11-misc/xscreensaver/files/xscreensaver-6.01-gentoo.patch | 47 | ||||
-rw-r--r-- | x11-misc/xscreensaver/files/xscreensaver-6.01-interix.patch | 30 | ||||
-rw-r--r-- | x11-misc/xscreensaver/metadata.xml | 1 | ||||
-rw-r--r-- | x11-misc/xscreensaver/xscreensaver-6.01.ebuild | 198 |
6 files changed, 397 insertions, 0 deletions
diff --git a/x11-misc/xscreensaver/Manifest b/x11-misc/xscreensaver/Manifest index 2a8cc3823af0..237089b7aff2 100644 --- a/x11-misc/xscreensaver/Manifest +++ b/x11-misc/xscreensaver/Manifest @@ -1 +1,2 @@ DIST xscreensaver-5.45.tar.gz 27729147 BLAKE2B 132301dd6645a21e04cd6f8b2f85e4b2454f5281e8cca3c5a89d50e16fee7f7e79d0b323e639bf7a18ddbcae0b4c8e7e5c9a84409bfe9f57253062cdaab30880 SHA512 1b21418c591fd99f3caaea9d31ca49abdb94b8e89f33e661c464299bc81bf4ff13fd99a187070fce19b3843c28a1f2a2a7b94bd6949d2b3b06bba730cae59f14 +DIST xscreensaver-6.01.tar.gz 27820165 BLAKE2B b2c90b47fb65db79d2473c1e396717156e414a0200672971adadf5729056ad9210822955a71f1a098e2142c00c5e60b24aababf9431903f96ff76e8c2d474052 SHA512 3a6e875196e1340909b2a379c25e758fef490d3d10154aef3096ec1be50fabe0d852de806d45a067eefd061381c8541acd7902d28be3bac15b76bd9d4bf0c02a diff --git a/x11-misc/xscreensaver/files/xscreensaver-6.01-configure.ac-sandbox.patch b/x11-misc/xscreensaver/files/xscreensaver-6.01-configure.ac-sandbox.patch new file mode 100644 index 000000000000..fe56f927e208 --- /dev/null +++ b/x11-misc/xscreensaver/files/xscreensaver-6.01-configure.ac-sandbox.patch @@ -0,0 +1,120 @@ +From 0f4d029102c651ccbc69860bf222126d2c58e36e Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Sun, 13 Jun 2021 23:41:42 +0200 +Subject: [PATCH] configure.ac: Stop asking rpm and dpkg things, we're on + Gentoo + +--- + configure.ac | 96 ---------------------------------------------------- + 1 file changed, 96 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 9b8641e..2eaea28 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4833,102 +4833,6 @@ for bad_choice in xscreensaver xscreensaver-settings xscreensaver-command ; do + done + + +-# Warn if there's a previous RPM package installed. +- +-rpm_vers= +-if test -z "$RPM_PACKAGE_VERSION" ; then +- # Don't bother with this test if we are currently *building* an RPM. +- rpmnames="xscreensaver xscreensaver-base xscreensaver-extras +- xscreensaver-data xscreensaver-data-extra" +- +- # M4 sucks!! +- changequote(X,Y) +- pkg_vers=`(rpm -qv $rpmnames) 2>&- | \ +- sed -n 's/^[-a-z]*-\([0-9][0-9]*[.].*\)/\1/p' | head -1` +- rpm_vers="$pkg_vers" +- changequote([,]) +-fi +- +-if test \! -z "$rpm_vers" ; then +- +- # M4 sucks!! +- changequote(A,B) +- pkg_bindir=`rpm -ql $rpmnames | sed -n 's@^\(.*/\)xscreensaver-settings$@\1@p'` +- pkg_bindir2=`rpm -ql $rpmnames | sed -n 's@^\(.*/\)xscreensaver-demo$@\1@p'` +- pkg_hackdir=`rpm -ql $rpmnames | sed -n 's@^\(.*/\)popsquares$@\1@p'` +- pkg_confdir=`rpm -ql $rpmnames | sed -n 's@^\(.*/\)popsquares\.xml$@\1@p'` +- pkg_fontdir=`rpm -ql $rpmnames | sed -n 's@^\(.*/\).*\.ttf$@\1@p' | head -1` +- pkg_addir=`rpm -ql $rpmnames | sed -n 's@^\(.*/\)XScreenSaver$@\1@p'` +- +- if test -z "$pkg_bindir" ; then pkg_bindir="$pkg_bindir2" ; fi +- changequote([,]) +-fi +- +- +-# Warn if there's a previous Debian package installed. +-# +-deb_vers= +-if test -z "$pkg_vers" ; then +- debnames="xscreensaver xscreensaver-data xscreensaver-data-extra" +- pkg_vers='' +- for dpkg in $debnames ; do +- if test -z "$pkg_vers"; then +- pkg_vers=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'` +- deb_vers="$pkg_vers" +- fi +- done +-fi +- +-if test \! -z "$deb_vers" ; then +- +- # M4 sucks!! +- changequote(A,B) +- pkg_bindir=`dpkg -L $debnames 2>&- | sed -n 's@^\(.*/\)xscreensaver-settings$@\1@p'` +- pkg_bindir2=`dpkg -L $debnames 2>&- | sed -n 's@^\(.*/\)xscreensaver-demo$@\1@p'` +- pkg_hackdir=`dpkg -L $debnames 2>&- | sed -n 's@^\(.*/\)popsquares$@\1@p'` +- pkg_confdir=`dpkg -L $debnames 2>&- | sed -n 's@^\(.*/\)popsquares\.xml$@\1@p'` +- pkg_fontdir=`dpkg -L $debnames 2>&- | sed -n 's@^\(.*/\).*\.ttf$@\1@p' | head -1` +- pkg_addir=`dpkg -L $debnames 2>&- | sed -n 's@^\(.*/\)XScreenSaver[^/]*$@\1@p'` +- changequote([,]) +- +- if test -z "$pkg_bindir" ; then pkg_bindir="$pkg_bindir2" ; fi +-fi +- +-bindir_err= +-hackdir_err= +-confdir_err= +-fontdir_err= +-addir_err= +-if ! test -z "$pkg_vers" ; then +- +- err=" (DIFFERS)" +- +- if test -z "$pkg_bindir" ; then pkg_bindir='???' +- elif test "$pkg_bindir" != "${bindir}/" ; then bindir_err="$err" ; fi +- +- if test -z "$pkg_hackdir" ; then pkg_hackdir='???' +- elif test "$pkg_hackdir" != "${HACKDIR}/" ; then hackdir_err="$err"; fi +- +- if test -z "$pkg_confdir" ; then pkg_confdir='???' +- elif test "$pkg_confdir" != "${HACK_CONF_DIR}/" ; then confdir_err="$err"; fi +- +- if test -z "$pkg_fontdir" ; then pkg_fontdir='none' +- elif test "$pkg_fontdir/" != "${FONT_DIR}" ; then fontdir_err="$err"; fi +- +- if test -z "$pkg_addir" ; then pkg_addir='???' +- elif test "$pkg_addir" != "${APPDEFAULTS}/" ; then addir_err="$err" ; fi +- +- warning=no +- warnL "There is already an installed package of xscreensaver" +- warn2 "version \"$pkg_vers\", in these directories:" +- echo "" +- warn2 "User programs: $pkg_bindir$bindir_err" +- warn2 "Screen savers: $pkg_hackdir$hackdir_err" +- warn2 "Configuration: $pkg_confdir$confdir_err" +- warn2 "Extra fonts: $pkg_fontdir$fontdir_err" +- warn2 "App Defaults: $pkg_addir$addir_err" +-fi +- + echo "" + echo "$warnsep" + echo "" +-- +2.31.1 + diff --git a/x11-misc/xscreensaver/files/xscreensaver-6.01-gentoo.patch b/x11-misc/xscreensaver/files/xscreensaver-6.01-gentoo.patch new file mode 100644 index 000000000000..41f8d7b7d089 --- /dev/null +++ b/x11-misc/xscreensaver/files/xscreensaver-6.01-gentoo.patch @@ -0,0 +1,47 @@ +--- a/driver/XScreenSaver.ad.in ++++ b/driver/XScreenSaver.ad.in +@@ -31,21 +31,21 @@ + *mode: random + *timeout: 0:10:00 + *cycle: 0:10:00 +-*lockTimeout: 0:00:00 ++*lockTimeout: 0:30:00 + *passwdTimeout: 0:00:30 +-*dpmsEnabled: False ++*dpmsEnabled: True + *dpmsQuickoffEnabled: False + *dpmsStandby: 2:00:00 + *dpmsSuspend: 2:00:00 + *dpmsOff: 4:00:00 +-*grabDesktopImages: True ++*grabDesktopImages: False + *grabVideoFrames: False + *chooseRandomImages: @DEFAULT_IMAGES_P@ + ! This can be a local directory name, or the URL of an RSS or Atom feed. + *imageDirectory: @DEFAULT_IMAGE_DIRECTORY@ + *nice: 10 + *memoryLimit: 0 +-*lock: False ++*lock: True + *verbose: False + *fade: True + *unfade: True +@@ -62,7 +62,7 @@ + *textLiteral: XScreenSaver + *textFile: @DEFAULT_TEXT_FILE@ + *textProgram: fortune +-*textURL: https://en.wikipedia.org/w/index.php?title=Special:NewPages&feed=rss ++*textURL: https://planet.gentoo.org/rss20.xml + + ! This is what the "Settings" button on the splash screen runs. + *demoCommand: xscreensaver-settings +@@ -103,7 +103,8 @@ + + + ! The strftime(3) format string for printing the time on the password dialog. +-*dateFormat: %I:%M %p, %a %b %e ++!*dateFormat: %I:%M %p, %a %b %e ++*dateFormat: %x %X + ! DD MMM: + ! *dateFormat: %I:%M %p, %e %b (%a) + ! 12 hour time only: diff --git a/x11-misc/xscreensaver/files/xscreensaver-6.01-interix.patch b/x11-misc/xscreensaver/files/xscreensaver-6.01-interix.patch new file mode 100644 index 000000000000..72aa6535f139 --- /dev/null +++ b/x11-misc/xscreensaver/files/xscreensaver-6.01-interix.patch @@ -0,0 +1,30 @@ +diff -Nru a/driver/prefsw.c b/driver/prefsw.c +--- a/driver/prefsw.c 2021-02-19 02:52:32.000000000 +0100 ++++ b/driver/prefsw.c 2021-05-07 15:20:09.280321274 +0200 +@@ -798,7 +798,10 @@ + sure that the bits actually land on the disk right away. */ + /* Update 2020: Apparently here in the future, this sometimes takes + 3+ seconds, so let's not. */ ++/* Interix has no sync() or alike. */ ++#ifndef __INTERIX + /* sync(); */ ++#endif + + status = 0; /* wrote and renamed successfully! */ + } +diff -Nru a/driver/setuid.c b/driver/setuid.c +--- a/driver/setuid.c 2021-02-05 16:16:23.000000000 +0100 ++++ b/driver/setuid.c 2021-05-07 15:21:05.987949943 +0200 +@@ -104,9 +104,12 @@ + if (uid == (uid_t) -1) uid = (uid_t) -2; + + errno = 0; ++ ++#ifndef __INTERIX + if (setgroups_needed_p (gid) && + setgroups (1, &gid) < 0) + sgs_errno = errno ? errno : -1; ++#endif + + errno = 0; + if (setgid (gid) != 0) diff --git a/x11-misc/xscreensaver/metadata.xml b/x11-misc/xscreensaver/metadata.xml index 8893ad3c39cb..31e771cd6ac0 100644 --- a/x11-misc/xscreensaver/metadata.xml +++ b/x11-misc/xscreensaver/metadata.xml @@ -9,6 +9,7 @@ </maintainer> </upstream> <use> + <flag name="fonts">Install the fonts shipped with XScreenSaver that have clear licensing</flag> <flag name="gdk-pixbuf">Include support for the <pkg>x11-libs/gdk-pixbuf</pkg> library in some demos, which will make it possible for them to read GIF, JPEG, and PNG files as well</flag> <flag name="gdm">Use gdmflexiserver from <pkg>gnome-base/gdm</pkg> instead of <pkg>x11-misc/lightdm</pkg></flag> <flag name="locking">Compile in support for locking the display</flag> diff --git a/x11-misc/xscreensaver/xscreensaver-6.01.ebuild b/x11-misc/xscreensaver/xscreensaver-6.01.ebuild new file mode 100644 index 000000000000..98a77ac0e730 --- /dev/null +++ b/x11-misc/xscreensaver/xscreensaver-6.01.ebuild @@ -0,0 +1,198 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools flag-o-matic font multilib optfeature pam + +DESCRIPTION="modular screen saver and locker for the X Window System" +HOMEPAGE="https://www.jwz.org/xscreensaver/" +SRC_URI="https://www.jwz.org/xscreensaver/${P}.tar.gz" + +# Font license mapping for folder ./hacks/fonts/ as following: +# clacon.ttf -- MIT +# gallant12x22.ttf -- unclear, hence dropped +# luximr.ttf -- bh-luxi (package media-fonts/font-bh-ttf) +# OCRAStd.otf -- unclear, hence dropped +# SpecialElite.ttf -- Apache-2.0 +LICENSE="BSD fonts? ( MIT Apache-2.0 )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="elogind fonts +gdk-pixbuf gdm +gtk jpeg +locking new-login offensive opengl pam +perl selinux suid systemd xinerama" +REQUIRED_USE=" + gdk-pixbuf? ( gtk ) + elogind? ( !systemd ) +" + +COMMON_DEPEND=" + dev-libs/libxml2 + media-libs/netpbm + x11-apps/appres + x11-apps/xwininfo + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXft + x11-libs/libXi + x11-libs/libXmu + x11-libs/libXrandr + x11-libs/libXt + x11-libs/libXxf86vm + elogind? ( sys-auth/elogind ) + gdk-pixbuf? ( + x11-libs/gdk-pixbuf-xlib + >=x11-libs/gdk-pixbuf-2.42.0:2 + ) + gtk? ( x11-libs/gtk+:2 ) + jpeg? ( virtual/jpeg:0 ) + new-login? ( + gdm? ( gnome-base/gdm ) + !gdm? ( || ( x11-misc/lightdm lxde-base/lxdm ) ) + ) + opengl? ( + virtual/glu + virtual/opengl + ) + pam? ( sys-libs/pam ) + systemd? ( >=sys-apps/systemd-221 ) + xinerama? ( x11-libs/libXinerama ) +" +# For USE="perl" see output of `qlist xscreensaver | grep bin | xargs grep '::'` +RDEPEND=" + ${COMMON_DEPEND} + media-gfx/fbida + perl? ( + dev-lang/perl + dev-perl/libwww-perl + virtual/perl-Digest-MD5 + ) + selinux? ( sec-policy/selinux-xscreensaver ) +" +DEPEND=" + ${COMMON_DEPEND} + dev-util/intltool + sys-devel/bc + sys-devel/gettext + virtual/pkgconfig + x11-base/xorg-proto +" +PATCHES=( + "${FILESDIR}"/${PN}-6.01-interix.patch + "${FILESDIR}"/${PN}-5.31-pragma.patch + "${FILESDIR}"/${PN}-6.01-gentoo.patch + "${FILESDIR}"/${PN}-5.45-gcc.patch + "${FILESDIR}"/${PN}-6.01-configure.ac-sandbox.patch +) + +src_prepare() { + sed -i configure.ac -e '/^ALL_LINGUAS=/d' || die + strip-linguas -i po/ + export ALL_LINGUAS="${LINGUAS}" + + if use new-login && ! use gdm; then #392967 + sed -i \ + -e "/default_l.*1/s:gdmflexiserver -ls:${EPREFIX}/usr/libexec/lightdm/&:" \ + configure{,.ac} || die + fi + + default + + # We are patching driver/XScreenSaver.ad.in, so let's delete the + # header generated from it so that it gets back in sync during build: + rm driver/XScreenSaver_ad.h || die + + if ! use offensive; then + sed -i \ + -e '/boobies/d;/boobs/d;/cock/d;/pussy/d;/viagra/d;/vibrator/d' \ + hacks/barcode.c || die + sed -i \ + -e 's|erect penis|shuffle board|g' \ + -e 's|flaccid penis|flaccid anchor|g' \ + -e 's|vagina|engagement ring|g' \ + -e 's|Penis|Shuttle|g' \ + hacks/glx/glsnake.c || die + sed -i \ + 's| Stay.*fucking mask\.$||' \ + hacks/glx/covid19.man \ + hacks/config/covid19.xml || die + fi + + eapply_user + + eautoconf + eautoheader +} + +src_configure() { + if use ppc || use ppc64; then + filter-flags -maltivec -mabi=altivec + append-flags -U__VEC__ + fi + + unset BC_ENV_ARGS #24568 + + econf \ + $(use_enable locking) \ + $(use_with elogind) \ + $(use_with gdk-pixbuf pixbuf) \ + $(use_with gtk) \ + $(use_with jpeg) \ + $(use_with new-login login-manager) \ + $(use_with opengl gl) \ + $(use_with pam) \ + $(use_with suid setuid-hacks) \ + $(use_with systemd) \ + $(use_with xinerama xinerama-ext) \ + --with-app-defaults="${EPREFIX}"/usr/share/X11/app-defaults \ + --with-configdir="${EPREFIX}"/usr/share/${PN}/config \ + --with-dpms-ext \ + --with-hackdir="${EPREFIX}"/usr/$(get_libdir)/misc/${PN} \ + --with-proc-interrupts \ + --with-randr-ext \ + --with-text-file="${EPREFIX}"/etc/gentoo-release \ + --with-xdbe-ext \ + --with-xf86gamma-ext \ + --with-xf86vmode-ext \ + --with-xinput-ext \ + --with-xshm-ext \ + --without-gle \ + --without-kerberos \ + --without-motif \ + --x-includes="${EPREFIX}"/usr/include \ + --x-libraries="${EPREFIX}"/usr/$(get_libdir) +} + +src_install() { + emake install_prefix="${D}" install + + if use fonts; then + # Do not install fonts with unclear licensing + rm -v "${ED}${FONTDIR}"/{gallant12x22.ttf,OCRAStd.otf} || die + + # Do not duplicate font Luxi Mono (of package media-fonts/font-bh-ttf) + rm -v "${ED}${FONTDIR}"/luximr.ttf || die + + font_xfont_config + else + rm -v "${ED}${FONTDIR}"/*.{ttf,otf} || die + fi + + dodoc README{,.hacking} + + if use pam; then + fperms 755 /usr/bin/${PN} + pamd_mimic_system ${PN} auth + fi + + rm -f "${ED}"/usr/share/${PN}/config/{electricsheep,fireflies}.xml +} + +pkg_postinst() { + use fonts && font_pkg_postinst + + optfeature 'Bitmap fonts 75dpi' media-fonts/font-adobe-75dpi + optfeature 'Bitmap fonts 100dpi' media-fonts/font-adobe-100dpi + optfeature 'Truetype font Luxi Mono' media-fonts/font-bh-ttf +} + +pkg_postrm() { + use fonts && font_pkg_postrm +} |