Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/xscreensaver/
Date: Sat, 08 Jan 2022 12:49:21
Message-Id: 1641646147.107fa148a3aa88d8ecf85236c1c526e18ec5938e.juippis@gentoo
1 commit: 107fa148a3aa88d8ecf85236c1c526e18ec5938e
2 Author: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
3 AuthorDate: Sat Jan 8 12:41:01 2022 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 8 12:49:07 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=107fa148
7
8 x11-misc/xscreensaver: add 6.02
9
10 Closes: https://bugs.gentoo.org/822372
11 Closes: https://bugs.gentoo.org/828869
12 Closes: https://bugs.gentoo.org/811885
13 Closes: https://bugs.gentoo.org/809599
14 Signed-off-by: Anna Vyalkova <cyber+gentoo <AT> sysrq.in>
15 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
16
17 x11-misc/xscreensaver/Manifest | 1 +
18 x11-misc/xscreensaver/metadata.xml | 2 +
19 x11-misc/xscreensaver/xscreensaver-6.02.ebuild | 238 +++++++++++++++++++++++++
20 3 files changed, 241 insertions(+)
21
22 diff --git a/x11-misc/xscreensaver/Manifest b/x11-misc/xscreensaver/Manifest
23 index b90a0a6ec0d8..696909ec57ea 100644
24 --- a/x11-misc/xscreensaver/Manifest
25 +++ b/x11-misc/xscreensaver/Manifest
26 @@ -1 +1,2 @@
27 DIST xscreensaver-6.01.tar.gz 27820165 BLAKE2B b2c90b47fb65db79d2473c1e396717156e414a0200672971adadf5729056ad9210822955a71f1a098e2142c00c5e60b24aababf9431903f96ff76e8c2d474052 SHA512 3a6e875196e1340909b2a379c25e758fef490d3d10154aef3096ec1be50fabe0d852de806d45a067eefd061381c8541acd7902d28be3bac15b76bd9d4bf0c02a
28 +DIST xscreensaver-6.02.tar.gz 22672643 BLAKE2B 2d931fe93230e8c7344abd9180e26ab8775f82604e6f4804c82821c486203be567708cf50f7a11276a6b39df493fe5652b4198765ecb3bc5afc8cbc5a01d4801 SHA512 2291ec6ca2d2a24dae975f7f3a8e1733c06f289eb74955db5b3344c7ddcc1d72f82d380df984ef9199f2ed7ab8a7bc920da57d98f589ae5fd1cee082755ba1ff
29
30 diff --git a/x11-misc/xscreensaver/metadata.xml b/x11-misc/xscreensaver/metadata.xml
31 index 41a55d69ca62..e6446e8ce0e8 100644
32 --- a/x11-misc/xscreensaver/metadata.xml
33 +++ b/x11-misc/xscreensaver/metadata.xml
34 @@ -12,6 +12,8 @@
35 <flag name="fonts">Install the fonts shipped with XScreenSaver that have clear licensing</flag>
36 <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>
37 <flag name="gdm">Use gdmflexiserver from <pkg>gnome-base/gdm</pkg> instead of <pkg>x11-misc/lightdm</pkg></flag>
38 + <flag name="gles" restrict="&gt;=x11-misc/xscreensaver-6.0.2">Emulate OpenGL 1.3 in terms of OpenGL ES 1.x</flag>
39 + <flag name="glx" restrict="&gt;=x11-misc/xscreensaver-6.0.2">Use GLX to interface OpenGL and X11 instead of EGL</flag>
40 <flag name="locking">Compile in support for locking the display</flag>
41 <flag name="new-login">Enable user switching support using gdmflexiserver (<pkg>x11-misc/lightdm</pkg>)</flag>
42 </use>
43
44 diff --git a/x11-misc/xscreensaver/xscreensaver-6.02.ebuild b/x11-misc/xscreensaver/xscreensaver-6.02.ebuild
45 new file mode 100644
46 index 000000000000..c32955e7c5e9
47 --- /dev/null
48 +++ b/x11-misc/xscreensaver/xscreensaver-6.02.ebuild
49 @@ -0,0 +1,238 @@
50 +# Copyright 1999-2021 Gentoo Authors
51 +# Distributed under the terms of the GNU General Public License v2
52 +
53 +EAPI=7
54 +
55 +inherit autotools flag-o-matic font multilib optfeature pam
56 +
57 +DESCRIPTION="modular screen saver and locker for the X Window System"
58 +HOMEPAGE="https://www.jwz.org/xscreensaver/"
59 +SRC_URI="https://www.jwz.org/xscreensaver/${P}.tar.gz"
60 +
61 +# Font license mapping for folder ./hacks/fonts/ as following:
62 +# clacon.ttf -- MIT
63 +# gallant12x22.ttf -- unclear, hence dropped
64 +# luximr.ttf -- bh-luxi (package media-fonts/font-bh-ttf)
65 +# OCRAStd.otf -- unclear, hence dropped
66 +# SpecialElite.ttf -- Apache-2.0
67 +LICENSE="BSD fonts? ( MIT Apache-2.0 )"
68 +SLOT="0"
69 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
70 +IUSE="elogind fonts +gdk-pixbuf gdm gles glx +gtk jpeg +locking new-login offensive opengl pam +perl +png selinux suid systemd +xft xinerama"
71 +REQUIRED_USE="
72 + gdk-pixbuf? ( gtk )
73 + gles? ( !glx opengl )
74 + glx? ( opengl )
75 + gtk? ( png )
76 + opengl? ( png )
77 + elogind? ( !systemd )
78 +"
79 +
80 +COMMON_DEPEND="
81 + dev-libs/libxml2
82 + media-libs/netpbm
83 + virtual/libcrypt:=
84 + x11-apps/appres
85 + x11-apps/xwininfo
86 + x11-libs/libX11
87 + x11-libs/libXext
88 + xft? ( x11-libs/libXft )
89 + x11-libs/libXi
90 + x11-libs/libXmu
91 + x11-libs/libXrandr
92 + x11-libs/libXt
93 + x11-libs/libXxf86vm
94 + elogind? ( sys-auth/elogind )
95 + gdk-pixbuf? (
96 + x11-libs/gdk-pixbuf-xlib
97 + >=x11-libs/gdk-pixbuf-2.42.0:2
98 + )
99 + gtk? ( x11-libs/gtk+:2 )
100 + jpeg? ( virtual/jpeg:0 )
101 + new-login? (
102 + gdm? ( gnome-base/gdm )
103 + !gdm? ( || ( x11-misc/lightdm lxde-base/lxdm ) )
104 + )
105 + opengl? (
106 + virtual/glu
107 + virtual/opengl
108 + )
109 + pam? ( sys-libs/pam )
110 + png? ( media-libs/libpng:= )
111 + systemd? ( >=sys-apps/systemd-221 )
112 + xinerama? ( x11-libs/libXinerama )
113 +"
114 +# For USE="perl" see output of `qlist xscreensaver | grep bin | xargs grep '::'`
115 +RDEPEND="
116 + ${COMMON_DEPEND}
117 + media-gfx/fbida
118 + perl? (
119 + dev-lang/perl
120 + dev-perl/libwww-perl
121 + virtual/perl-Digest-MD5
122 + )
123 + selinux? ( sec-policy/selinux-xscreensaver )
124 +"
125 +DEPEND="
126 + ${COMMON_DEPEND}
127 + dev-util/intltool
128 + sys-devel/bc
129 + sys-devel/gettext
130 + virtual/pkgconfig
131 + x11-base/xorg-proto
132 +"
133 +PATCHES=(
134 + "${FILESDIR}"/${PN}-6.01-interix.patch
135 + "${FILESDIR}"/${PN}-5.31-pragma.patch
136 + "${FILESDIR}"/${PN}-6.01-gentoo.patch
137 + "${FILESDIR}"/${PN}-5.45-gcc.patch
138 + "${FILESDIR}"/${PN}-6.01-configure.ac-sandbox.patch
139 + "${FILESDIR}"/${PN}-6.01-without-gl-makefile.patch
140 + "${FILESDIR}"/${PN}-6.01-non-gtk-install.patch
141 + "${FILESDIR}"/${PN}-6.01-gtk-detection.patch
142 + "${FILESDIR}"/${PN}-6.01-configure-install_sh.patch
143 +)
144 +
145 +DOCS=( README{,.hacking} )
146 +
147 +src_prepare() {
148 + default
149 +
150 + sed -i configure.ac -e '/^ALL_LINGUAS=/d' || die
151 + strip-linguas -i po/
152 + export ALL_LINGUAS="${LINGUAS}"
153 +
154 + if use new-login && ! use gdm; then #392967
155 + sed -i \
156 + -e "/default_l.*1/s:gdmflexiserver -ls:${EPREFIX}/usr/libexec/lightdm/&:" \
157 + configure{,.ac} || die
158 + fi
159 +
160 + # We are patching driver/XScreenSaver.ad.in, so let's delete the
161 + # header generated from it so that it gets back in sync during build:
162 + rm driver/XScreenSaver_ad.h || die
163 +
164 + if ! use offensive; then
165 + sed -i \
166 + -e '/boobies/d;/boobs/d;/cock/d;/pussy/d;/viagra/d;/vibrator/d' \
167 + hacks/barcode.c || die
168 + sed -i \
169 + -e 's|erect penis|shuffle board|g' \
170 + -e 's|flaccid penis|flaccid anchor|g' \
171 + -e 's|vagina|engagement ring|g' \
172 + -e 's|Penis|Shuttle|g' \
173 + hacks/glx/glsnake.c || die
174 + sed -i \
175 + 's| Stay.*fucking mask\.$||' \
176 + hacks/glx/covid19.man \
177 + hacks/config/covid19.xml || die
178 + fi
179 +
180 + # Must be eauto*re*conf, to force the rebuild
181 + eautoreconf
182 +}
183 +
184 +src_configure() {
185 + if use ppc || use ppc64; then
186 + filter-flags -maltivec -mabi=altivec
187 + append-flags -U__VEC__
188 + fi
189 +
190 + unset BC_ENV_ARGS #24568
191 +
192 + # WARNING: This is NOT a normal autoconf script
193 + # Some of the --with options are NOT standard, and expect "--with-X=no" rather than "--without-X"
194 + ECONF_OPTS=(
195 + $(use_enable locking)
196 + $(use_with elogind)
197 + $(use_with gdk-pixbuf pixbuf)
198 + $(use_with gles)
199 + $(use_with glx)
200 + $(use_with gtk)
201 + $(use_with new-login login-manager)
202 + $(use_with opengl gl)
203 + $(use_with pam)
204 + $(use_with suid setuid-hacks)
205 + $(use_with systemd)
206 + $(use_with xinerama xinerama-ext)
207 + --with-jpeg=$(usex jpeg yes no)
208 + --with-png=$(usex png yes no)
209 + --with-xft=$(usex xft yes no)
210 + --with-app-defaults="${EPREFIX}"/usr/share/X11/app-defaults
211 + --with-configdir="${EPREFIX}"/usr/share/${PN}/config
212 + --with-dpms-ext
213 + --with-hackdir="${EPREFIX}"/usr/$(get_libdir)/misc/${PN}
214 + --with-proc-interrupts
215 + --with-randr-ext
216 + --with-text-file="${EPREFIX}"/etc/gentoo-release
217 + --with-xdbe-ext
218 + --with-xf86gamma-ext
219 + --with-xf86vmode-ext
220 + --with-xinput-ext
221 + --with-xkb-ext
222 + --with-xshm-ext
223 + --without-gle
224 + --without-kerberos
225 + --without-motif
226 + --with-proc-oom
227 + --x-includes="${EPREFIX}"/usr/include
228 + --x-libraries="${EPREFIX}"/usr/$(get_libdir)
229 + )
230 + # WARNING: This is NOT a normal autoconf script
231 + econf "${ECONF_OPTS[@]}"
232 +}
233 +
234 +src_compile() {
235 + # stock target is "default", which is broken in some releases.
236 + emake all
237 +}
238 +
239 +src_install() {
240 + use pam && dodir /etc/pam.d/
241 + emake install_prefix="${D}" DESTDIR="${D}" install
242 +
243 + if use fonts; then
244 + # Do not install fonts with unclear licensing
245 + rm -v "${ED}${FONTDIR}"/{gallant12x22.ttf,OCRAStd.otf} || die
246 +
247 + # Do not duplicate font Luxi Mono (of package media-fonts/font-bh-ttf)
248 + rm -v "${ED}${FONTDIR}"/luximr.ttf || die
249 +
250 + font_xfont_config
251 + else
252 + rm -v "${ED}${FONTDIR}"/*.{ttf,otf} || die
253 + rmdir -v "${ED}${FONTDIR}" || die #812473
254 + fi
255 +
256 + einstalldocs
257 +
258 + if use pam; then
259 + rm -f "${ED}/etc/pam.d/xscreensaver" # install our version instead
260 + fperms 755 /usr/bin/${PN}
261 + pamd_mimic_system ${PN} auth
262 + fi
263 +
264 + # bugs #809599, #828869
265 + if ! use gtk; then
266 + rm -f "${ED}/usr/bin/xscreensaver-demo"
267 + fi
268 +
269 + rm -f "${ED}"/usr/share/${PN}/config/{electricsheep,fireflies}.xml
270 +}
271 +
272 +pkg_postinst() {
273 + use fonts && font_pkg_postinst
274 +
275 + # bug #811885
276 + if ! use glx && use opengl; then
277 + elog "Enable USE='glx' if OpenGL screensavers are crashing."
278 + fi
279 +
280 + optfeature 'Bitmap fonts 75dpi' media-fonts/font-adobe-75dpi
281 + optfeature 'Bitmap fonts 100dpi' media-fonts/font-adobe-100dpi
282 + optfeature 'Truetype font Luxi Mono' media-fonts/font-bh-ttf
283 +}
284 +
285 +pkg_postrm() {
286 + use fonts && font_pkg_postrm
287 +}