1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit autotools desktop eutils flag-o-matic multilib pam
7 DESCRIPTION="A modular screen saver and locker for the X Window System"
8 HOMEPAGE="https://www.jwz.org/xscreensaver/"
10 https://www.jwz.org/xscreensaver/${P}.tar.gz
15 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
16 IUSE="caps gdm jpeg new-login offensive opengl pam +perl selinux suid xinerama"
19 >=gnome-base/libglade-2
24 x11-libs/gdk-pixbuf:2[X]
35 caps? ( sys-libs/libcap )
36 jpeg? ( virtual/jpeg:0 )
38 gdm? ( gnome-base/gdm )
39 !gdm? ( || ( x11-misc/lightdm lxde-base/lxdm ) )
46 xinerama? ( x11-libs/libXinerama )
48 # For USE="perl" see output of `qlist xscreensaver | grep bin | xargs grep '::'`
54 virtual/perl-Digest-MD5
56 selinux? ( sec-policy/selinux-xscreensaver )
67 "${FILESDIR}"/${PN}-5.05-interix.patch
68 "${FILESDIR}"/${PN}-5.31-pragma.patch
69 "${FILESDIR}"/${PN}-5.44-blurb-hndl-test-passwd.patch
70 "${FILESDIR}"/${PN}-5.44-gentoo.patch
74 sed -i configure.in -e '/^ALL_LINGUAS=/d' || die
76 export ALL_LINGUAS="${LINGUAS}"
78 if use new-login && ! use gdm; then #392967
80 -e "/default_l.*1/s:gdmflexiserver -ls:${EPREFIX}/usr/libexec/lightdm/&:" \
81 configure{,.in} || die
86 if ! use offensive; then
88 -e '/boobies/d;/boobs/d;/cock/d;/pussy/d;/viagra/d;/vibrator/d' \
89 hacks/barcode.c || die
91 -e 's|erect penis|shuffle board|g' \
92 -e 's|flaccid penis|flaccid anchor|g' \
93 -e 's|vagina|engagement ring|g' \
94 -e 's|Penis|Shuttle|g' \
95 hacks/glx/glsnake.c || break
105 if use ppc || use ppc64; then
106 filter-flags -maltivec -mabi=altivec
107 append-flags -U__VEC__
110 unset BC_ENV_ARGS #24568
111 export RPM_PACKAGE_VERSION=no #368025
114 $(use_with caps setcap-hacks) \
116 $(use_with new-login login-manager) \
117 $(use_with opengl gl) \
119 $(use_with suid setuid-hacks) \
120 $(use_with xinerama xinerama-ext) \
122 --with-configdir="${EPREFIX}"/usr/share/${PN}/config \
125 --with-hackdir="${EPREFIX}"/usr/$(get_libdir)/misc/${PN} \
127 --with-proc-interrupts \
129 --with-text-file="${EPREFIX}"/etc/gentoo-release \
130 --with-x-app-defaults="${EPREFIX}"/usr/share/X11/app-defaults \
132 --with-xf86gamma-ext \
133 --with-xf86vmode-ext \
138 --x-includes="${EPREFIX}"/usr/include \
139 --x-libraries="${EPREFIX}"/usr/$(get_libdir)
143 emake install_prefix="${D}" install
145 dodoc README{,.hacking}
147 use pam && fperms 755 /usr/bin/${PN}
148 pamd_mimic_system ${PN} auth
150 rm -f "${ED}"/usr/share/${PN}/config/{electricsheep,fireflies}.xml