Gentoo Archives: gentoo-commits

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/splashutils/
Date: Fri, 01 Jan 2016 07:31:29
Message-Id: 1451633450.62ebf87ed303c5a3760fe39b97b05355c0a6a14c.bircoph@gentoo
1 commit: 62ebf87ed303c5a3760fe39b97b05355c0a6a14c
2 Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 1 07:29:42 2016 +0000
4 Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 1 07:30:50 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62ebf87e
7
8 media-gfx/splashutils: add missing openrc dependency
9
10 splashutils depends both build-time and run-time (linking with
11 libeinfo.so) on sys-apps/openrc, so version bump to properly track
12 such dependency.
13
14 Package-Manager: portage-2.2.26
15 Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org>
16
17 .../splashutils/splashutils-1.5.4.4-r7.ebuild | 240 +++++++++++++++++++++
18 1 file changed, 240 insertions(+)
19
20 diff --git a/media-gfx/splashutils/splashutils-1.5.4.4-r7.ebuild b/media-gfx/splashutils/splashutils-1.5.4.4-r7.ebuild
21 new file mode 100644
22 index 0000000..b6cc52c
23 --- /dev/null
24 +++ b/media-gfx/splashutils/splashutils-1.5.4.4-r7.ebuild
25 @@ -0,0 +1,240 @@
26 +# Copyright 1999-2016 Gentoo Foundation
27 +# Distributed under the terms of the GNU General Public License v2
28 +# $Id$
29 +
30 +EAPI=5
31 +inherit autotools eutils multilib toolchain-funcs
32 +
33 +MISCSPLASH="miscsplashutils-0.1.8"
34 +GENTOOSPLASH="splashutils-gentoo-1.0.17"
35 +V_JPEG="8a"
36 +V_PNG="1.4.3"
37 +V_ZLIB="1.2.3"
38 +V_FT="2.3.12"
39 +
40 +ZLIBSRC="libs/zlib-${V_ZLIB}"
41 +LPNGSRC="libs/libpng-${V_PNG}"
42 +JPEGSRC="libs/jpeg-${V_JPEG}"
43 +FT2SRC="libs/freetype-${V_FT}"
44 +
45 +RESTRICT="test"
46 +IUSE="hardened +png +truetype gpm fbcondecor"
47 +
48 +DESCRIPTION="Framebuffer splash utilities"
49 +HOMEPAGE="http://sourceforge.net/projects/fbsplash.berlios/"
50 +SRC_URI="
51 + mirror://sourceforge/fbsplash.berlios/${PN}-lite-${PV}.tar.bz2
52 + mirror://sourceforge/fbsplash.berlios/${GENTOOSPLASH}.tar.bz2
53 + mirror://gentoo/${MISCSPLASH}.tar.bz2
54 + mirror://sourceforge/libpng/libpng-${V_PNG}.tar.bz2
55 + ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v${V_JPEG}.tar.gz
56 + mirror://sourceforge/freetype/freetype-${V_FT}.tar.bz2
57 + http://www.gzip.org/zlib/zlib-${V_ZLIB}.tar.bz2
58 +"
59 +
60 +LICENSE="GPL-2"
61 +SLOT="0"
62 +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
63 +
64 +RDEPEND="
65 + gpm? ( sys-libs/gpm[static-libs(+)] )
66 + truetype? (
67 + >=media-libs/freetype-2[static-libs]
68 + app-arch/bzip2[static-libs(+)]
69 + sys-libs/zlib[static-libs(+)]
70 + )
71 + png? (
72 + >=media-libs/libpng-1.4.3[static-libs]
73 + sys-libs/zlib[static-libs(+)]
74 + )
75 + virtual/jpeg:0[static-libs]
76 + app-arch/cpio
77 + media-gfx/fbgrab
78 + !sys-apps/lcdsplash
79 + sys-apps/openrc"
80 +
81 +DEPEND="${RDEPEND}
82 + >=dev-libs/klibc-1.5
83 + virtual/pkgconfig
84 +"
85 +
86 +S="${WORKDIR}/${P/_/-}"
87 +SG="${WORKDIR}/${GENTOOSPLASH}"
88 +SM="${WORKDIR}/${MISCSPLASH}"
89 +
90 +pkg_setup() {
91 + if use hardened; then
92 + ewarn "Due to problems with klibc, it is currently impossible to compile splashutils"
93 + ewarn "with 'hardened' GCC flags. As a workaround, the package will be compiled with"
94 + ewarn "-fno-stack-protector. Hardened GCC features will not be used while building"
95 + ewarn "the splash kernel helper."
96 + fi
97 +}
98 +
99 +src_prepare() {
100 + mv "${WORKDIR}"/{libpng-${V_PNG},jpeg-${V_JPEG},zlib-${V_ZLIB},freetype-${V_FT}} "${S}/libs"
101 +
102 + # We need to delete the Makefile and let it be rebuilt when splashutils
103 + # is being configured. Either that, or we end up with a segfaulting kernel
104 + # helper.
105 + rm "${S}/libs/zlib-${V_ZLIB}/Makefile"
106 +
107 + cd "${SG}"
108 + epatch "${FILESDIR}/splashutils-1.5.4.4-gentoo-typo-fix.patch"
109 + epatch "${FILESDIR}/splashutils-1.5.4.4-sys-queue.patch"
110 +
111 + if use truetype ; then
112 + cd "${SM}"
113 + epatch "${FILESDIR}/splashutils-1.5.4.4-freetype-bz2.patch"
114 + cd "${WORKDIR}"
115 + epatch "${FILESDIR}/splashutils-1.5.4.4-ft25.patch"
116 + fi
117 +
118 + cd "${S}"
119 + ln -sf "${S}/src" "${WORKDIR}/core"
120 +
121 + #epatch "${FILESDIR}/${P}-bzip2.patch"
122 + epatch "${FILESDIR}/${P}-multi-keyboard.patch"
123 + # Bug #557126
124 + epatch "${FILESDIR}/${P}-no-la.patch"
125 +
126 + if ! tc-is-cross-compiler && \
127 + has_version "sys-devel/gcc:$(gcc-version)[vanilla]" ; then
128 + ewarn "Your GCC was built with the 'vanilla' flag set. If you can't compile"
129 + ewarn "splashutils, you're on your own, as this configuration is not supported."
130 + else
131 + # This should make splashutils compile on systems with hardened GCC.
132 + sed -e 's@K_CFLAGS =@K_CFLAGS = -fno-stack-protector@' -i "${S}/Makefile.in"
133 + fi
134 +
135 + if ! use truetype ; then
136 + sed -i -e 's/fbtruetype kbd/kbd/' "${SM}/Makefile"
137 + fi
138 +
139 + # Latest version of klibc defined its own version of ferror, so there is
140 + # not need for the hack in klibc_compat.h
141 + if has_version ">=dev-libs/klibc-1.5.20"; then
142 + echo > "libs/klibc_compat.h"
143 + fi
144 +
145 + rm -f m4/*
146 + epatch_user
147 + export PKG_CONFIG="pkg-config --static"
148 + eautoreconf
149 +}
150 +
151 +src_configure() {
152 + tc-export CC
153 + cd "${SM}"
154 + emake CC="${CC}" LIB=$(get_libdir) STRIP=true
155 +
156 + cd "${S}"
157 + econf \
158 + $(use_with png) \
159 + --without-mng \
160 + $(use_with gpm) \
161 + $(use_with truetype ttf) \
162 + $(use_with truetype ttf-kernel) \
163 + $(use_enable fbcondecor) \
164 + --docdir=/usr/share/doc/${PF} \
165 + --with-freetype2-src=${FT2SRC} \
166 + --with-jpeg-src=${JPEGSRC} \
167 + --with-lpng-src=${LPNGSRC} \
168 + --with-zlib-src=${ZLIBSRC} \
169 + --with-essential-libdir=/$(get_libdir)
170 +}
171 +
172 +src_compile() {
173 + emake CC="${CC}" STRIP="true"
174 +
175 + cd "${SG}"
176 + emake LIB=$(get_libdir)
177 +}
178 +
179 +src_install() {
180 + local LIB=$(get_libdir)
181 +
182 + cd "${SM}"
183 + emake DESTDIR="${D}" LIB=${LIB} install
184 +
185 + cd "${S}"
186 + emake DESTDIR="${D}" STRIP="true" install
187 +
188 + mv "${D}"/usr/${LIB}/libfbsplash.so* "${D}"/${LIB}/
189 + gen_usr_ldscript libfbsplash.so
190 +
191 + echo 'CONFIG_PROTECT_MASK="/etc/splash"' > 99splash
192 + doenvd 99splash
193 +
194 + if use fbcondecor ; then
195 + newinitd "${SG}"/init-fbcondecor fbcondecor
196 + newconfd "${SG}"/fbcondecor.conf fbcondecor
197 + fi
198 + newconfd "${SG}"/splash.conf splash
199 +
200 + insinto /usr/share/${PN}
201 + doins "${SG}"/initrd.splash
202 +
203 + insinto /etc/splash
204 + doins "${SM}"/fbtruetype/luxisri.ttf
205 +
206 + cd "${SG}"
207 + make DESTDIR="${D}" LIB=${LIB} install
208 + prune_libtool_files
209 +
210 + sed -i -e "s#/lib/splash#/${LIB}/splash#" "${D}"/sbin/splash-functions.sh
211 + keepdir /${LIB}/splash/{tmp,cache,bin,sys}
212 + dosym /${LIB}/splash/bin/fbres /sbin/fbres
213 +}
214 +
215 +pkg_preinst() {
216 + has_version "<${CATEGORY}/${PN}-1.0"
217 + previous_less_than_1_0=$?
218 +
219 + has_version "<${CATEGORY}/${PN}-1.5.3"
220 + previous_less_than_1_5_3=$?
221 +}
222 +
223 +pkg_postinst() {
224 + if has_version sys-fs/devfsd || ! has_version virtual/udev ; then
225 + elog "This package has been designed with udev in mind. Other solutions, such as"
226 + elog "devfs or a static /dev tree might work, but are generally discouraged and"
227 + elog "not supported. If you decide to switch to udev, you might want to have a"
228 + elog "look at 'The Gentoo udev Guide', which can be found at"
229 + elog " https://wiki.gentoo.org/wiki/Udev"
230 + elog ""
231 + fi
232 +
233 + if [[ $previous_less_than_1_0 = 0 ]] ; then
234 + elog "Since you are upgrading from a pre-1.0 version, please make sure that you"
235 + elog "rebuild your initrds. You can use the splash_geninitramfs script to do that."
236 + elog ""
237 + fi
238 +
239 + if [[ $previous_less_than_1_5_3 = 0 ]] && ! use fbcondecor ; then
240 + elog "Starting with splashutils-1.5.3, support for the fbcondecor kernel patch"
241 + elog "is optional and dependent on the the 'fbcondecor' USE flag. If you wish"
242 + elog "to use fbcondecor, run:"
243 + elog " echo \"media-gfx/splashutils fbcondecor\" >> /etc/portage/package.use"
244 + elog "and re-emerge splashutils."
245 + fi
246 +
247 + if ! test -f /proc/cmdline ||
248 + ! egrep -q '(console=tty1|CONSOLE=/dev/tty1)' /proc/cmdline ; then
249 + elog "It is required that you add 'console=tty1' to your kernel"
250 + elog "command line parameters."
251 + elog ""
252 + elog "After these modifications, the relevant part of the kernel command"
253 + elog "line might look like:"
254 + elog " splash=silent,fadein,theme:emergence console=tty1"
255 + elog ""
256 + fi
257 +
258 + if ! has_version 'media-gfx/splash-themes-livecd' &&
259 + ! has_version 'media-gfx/splash-themes-gentoo'; then
260 + elog "The sample Gentoo themes (emergence, gentoo) have been removed from the"
261 + elog "core splashutils package. To get some themes you might want to emerge:"
262 + elog " media-gfx/splash-themes-livecd"
263 + elog " media-gfx/splash-themes-gentoo"
264 + fi
265 +}