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