Gentoo Archives: gentoo-commits

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