/[gentoo-x86]/media-gfx/splashutils/splashutils-1.5.4.3-r3.ebuild
Gentoo

Contents of /media-gfx/splashutils/splashutils-1.5.4.3-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.19 - (show annotations) (download)
Sat May 5 07:00:25 2012 UTC (2 years, 4 months ago) by jdhore
Branch: MAIN
Changes since 1.18: +3 -3 lines
dev-util/pkgconfig -> virtual/pkgconfig

(Portage version: 2.2.0_alpha101/cvs/Linux i686)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-gfx/splashutils/splashutils-1.5.4.3-r3.ebuild,v 1.18 2011/10/19 03:09:22 pva Exp $
4
5 EAPI="2"
6
7 inherit autotools eutils multilib toolchain-funcs
8
9 MISCSPLASH="miscsplashutils-0.1.8"
10 GENTOOSPLASH="splashutils-gentoo-1.0.16"
11 V_JPEG="8a"
12 V_PNG="1.4.3"
13 V_ZLIB="1.2.3"
14 V_FT="2.3.12"
15
16 ZLIBSRC="libs/zlib-${V_ZLIB}"
17 LPNGSRC="libs/libpng-${V_PNG}"
18 JPEGSRC="libs/jpeg-${V_JPEG}"
19 FT2SRC="libs/freetype-${V_FT}"
20
21 RESTRICT="test"
22 IUSE="hardened +png +truetype +mng gpm fbcondecor"
23
24 DESCRIPTION="Framebuffer splash utilities."
25 HOMEPAGE="http://fbsplash.berlios.de"
26 SRC_URI="mirror://berlios/fbsplash/${PN}-lite-${PV}.tar.bz2
27 mirror://berlios/fbsplash/${GENTOOSPLASH}.tar.bz2
28 mirror://gentoo/${MISCSPLASH}.tar.bz2
29 mirror://sourceforge/libpng/libpng-${V_PNG}.tar.bz2
30 ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v${V_JPEG}.tar.gz
31 mirror://sourceforge/freetype/freetype-${V_FT}.tar.bz2
32 http://www.gzip.org/zlib/zlib-${V_ZLIB}.tar.bz2"
33
34 LICENSE="GPL-2"
35 SLOT="0"
36 KEYWORDS="amd64 ppc x86"
37 RDEPEND="gpm? ( sys-libs/gpm )
38 truetype? ( >=media-libs/freetype-2[static-libs]
39 || ( <app-arch/bzip2-1.0.6-r3 app-arch/bzip2[static-libs] ) )
40 png? ( >=media-libs/libpng-1.4.3[static-libs] )
41 mng? (
42 media-libs/lcms:0[static-libs]
43 || ( media-libs/libmng[static-libs] <media-libs/libmng-1.0.10-r1 )
44 )
45 virtual/jpeg[static-libs]
46 >=sys-apps/baselayout-1.9.4-r5
47 app-arch/cpio
48 media-gfx/fbgrab
49 !sys-apps/lcdsplash"
50 DEPEND="${RDEPEND}
51 >=dev-libs/klibc-1.5
52 virtual/pkgconfig"
53
54 S="${WORKDIR}/${P/_/-}"
55 SG="${WORKDIR}/${GENTOOSPLASH}"
56 SM="${WORKDIR}/${MISCSPLASH}"
57
58 pkg_setup() {
59 if use hardened; then
60 ewarn "Due to problems with klibc, it is currently impossible to compile splashutils"
61 ewarn "with 'hardened' GCC flags. As a workaround, the package will be compiled with"
62 ewarn "-fno-stack-protector. Hardened GCC features will not be used while building"
63 ewarn "the splash kernel helper."
64 fi
65 }
66
67 src_prepare() {
68 mv "${WORKDIR}"/{libpng-${V_PNG},jpeg-${V_JPEG},zlib-${V_ZLIB},freetype-${V_FT}} "${S}/libs"
69 # We need to delete the Makefile and let it be rebuilt when splashutils
70 # is being configured. Either that, or we end up with a segfaulting kernel
71 # helper.
72 rm "${S}/libs/zlib-${V_ZLIB}/Makefile"
73
74 cd "${S}"
75 ln -sf "${S}/src" "${WORKDIR}/core"
76
77 if ! tc-is-cross-compiler && \
78 has_version "sys-devel/gcc:$(gcc-version)[vanilla]" ; then
79 ewarn "Your GCC was built with the 'vanilla' flag set. If you can't compile"
80 ewarn "splashutils, you're on your own, as this configuration is not supported."
81 else
82 # This should make splashutils compile on systems with hardened GCC.
83 sed -e 's@K_CFLAGS =@K_CFLAGS = -fno-stack-protector@' -i "${S}/Makefile.in"
84 fi
85
86 if ! use truetype ; then
87 sed -i -e 's/fbtruetype kbd/kbd/' "${SM}/Makefile"
88 fi
89
90 epatch "${FILESDIR}"/splashutils-1.5.4.3-makefile.patch
91 epatch "${FILESDIR}"/splashutils-1.5.4.3-splash_geninitramfs.patch
92 epatch "${FILESDIR}"/splashutils-1.5.4.3-libjpeg.patch
93 epatch "${FILESDIR}"/splashutils-1.5.4.3-libpng15_compat.patch
94 epatch "${FILESDIR}"/splashutils-1.5.4.3-daemon-exit-signal.patch
95 epatch "${FILESDIR}"/splashutils-1.5.4.3-splash-functions.patch
96 epatch "${FILESDIR}"/splashutils-1.5.4.3-splash_util.patch
97
98 cd "${SG}"
99 if has_version ">=sys-apps/openrc-0.4.0"; then
100 epatch "${FILESDIR}"/splashutils-openrc-0.4-fix.patch
101 if has_version ">=sys-apps/openrc-0.4.3"; then
102 epatch "${FILESDIR}"/splashutils-openrc-0.4.3-runlevel-fix.patch
103 fi
104 fi
105 epatch "${FILESDIR}"/splashutils-1.5.4.3-fix_rc_var.patch
106 epatch "${FILESDIR}"/splashutils-1.5.4.3-openrc-umount-fix.patch
107 epatch "${FILESDIR}"/splashutils-1.5.4.3-nondefault-runlevel.patch
108 epatch "${FILESDIR}"/splashutils-1.5.4.3-openrc-effects.patch
109 epatch "${FILESDIR}"/initrd.splash-cmp-str-instead-of-int.patch
110 cd ${SM}
111 epatch "${FILESDIR}"/splashutils-1.5.4.4-freetype-bz2.patch
112 cd "${S}"
113
114 # Latest version of klibc defined its own version of ferror, so there is
115 # not need for the hack in klibc_compat.h
116 if has_version ">=dev-libs/klibc-1.5.20"; then
117 echo > "libs/klibc_compat.h"
118 fi
119
120 rm -f m4/*
121 eautoreconf
122 }
123
124 src_configure() {
125 tc-export CC
126 cd "${SM}"
127 emake CC="${CC}" LIB=$(get_libdir) STRIP=true || die "failed to build miscsplashutils"
128
129 cd "${S}"
130 econf \
131 $(use_with png) \
132 $(use_with mng) \
133 $(use_with gpm) \
134 $(use_with truetype ttf) \
135 $(use_with truetype ttf-kernel) \
136 $(use_enable fbcondecor) \
137 --docdir=/usr/share/doc/${PF} \
138 --with-freetype2-src=${FT2SRC} \
139 --with-jpeg-src=${JPEGSRC} \
140 --with-lpng-src=${LPNGSRC} \
141 --with-zlib-src=${ZLIBSRC} \
142 --with-essential-libdir=/$(get_libdir) || die "failed to configure splashutils"
143 }
144
145 src_compile() {
146 emake CC="${CC}" STRIP="true" || die "failed to build splashutils"
147
148 if has_version ">=sys-apps/baselayout-1.13.99"; then
149 cd "${SG}"
150 emake LIB=$(get_libdir) || die "failed to build the splash plugin"
151 fi
152 }
153
154 src_install() {
155 local LIB=$(get_libdir)
156
157 cd "${SM}"
158 make DESTDIR="${D}" LIB=${LIB} install || die
159
160 cd "${S}"
161 make DESTDIR="${D}" STRIP="true" install || die
162
163 mv "${D}"/usr/${LIB}/libfbsplash.so* "${D}"/${LIB}/
164 gen_usr_ldscript libfbsplash.so
165
166 echo 'CONFIG_PROTECT_MASK="/etc/splash"' > 99splash
167 doenvd 99splash
168
169 if use fbcondecor ; then
170 newinitd "${SG}"/init-fbcondecor fbcondecor
171 newconfd "${SG}"/fbcondecor.conf fbcondecor
172 fi
173 newconfd "${SG}"/splash.conf splash
174
175 insinto /usr/share/${PN}
176 doins "${SG}"/initrd.splash
177
178 insinto /etc/splash
179 doins "${SM}"/fbtruetype/luxisri.ttf
180
181 if has_version ">=sys-apps/baselayout-1.13.99"; then
182 cd "${SG}"
183 make DESTDIR="${D}" LIB=${LIB} install || die "failed to install the splash plugin"
184 else
185 cp "${SG}"/splash-functions-bl1.sh "${D}"/sbin/
186 fi
187
188 sed -i -e "s#/lib/splash#/${LIB}/splash#" "${D}"/sbin/splash-functions.sh
189 keepdir /${LIB}/splash/{tmp,cache,bin}
190 dosym /${LIB}/splash/bin/fbres /sbin/fbres
191 }
192
193 pkg_preinst() {
194 has_version "<${CATEGORY}/${PN}-1.0"
195 previous_less_than_1_0=$?
196
197 has_version "<${CATEGORY}/${PN}-1.5.3"
198 previous_less_than_1_5_3=$?
199 }
200
201 pkg_postinst() {
202 if has_version sys-fs/devfsd || ! has_version sys-fs/udev ; then
203 elog "This package has been designed with udev in mind. Other solutions, such as"
204 elog "devfs or a static /dev tree might work, but are generally discouraged and"
205 elog "not supported. If you decide to switch to udev, you might want to have a"
206 elog "look at 'The Gentoo udev Guide', which can be found at"
207 elog " http://www.gentoo.org/doc/en/udev-guide.xml"
208 elog ""
209 fi
210
211 if [[ $previous_less_than_1_0 = 0 ]] ; then
212 elog "Since you are upgrading from a pre-1.0 version, please make sure that you"
213 elog "rebuild your initrds. You can use the splash_geninitramfs script to do that."
214 elog ""
215 fi
216
217 if [[ $previous_less_than_1_5_3 = 0 ]] && ! use fbcondecor ; then
218 elog "Starting with splashutils-1.5.3, support for the fbcondecor kernel patch"
219 elog "is optional and dependent on the the 'fbcondecor' USE flag. If you wish"
220 elog "to use fbcondecor, run:"
221 elog " echo \"media-gfx/splashutils fbcondecor\" >> /etc/portage/package.use"
222 elog "and re-emerge splashutils."
223 fi
224
225 if ! test -f /proc/cmdline ||
226 ! egrep -q '(console=tty1|CONSOLE=/dev/tty1)' /proc/cmdline ; then
227 elog "It is required that you add 'console=tty1' to your kernel"
228 elog "command line parameters."
229 elog ""
230 elog "After these modifications, the relevant part of the kernel command"
231 elog "line might look like:"
232 elog " splash=silent,fadein,theme:emergence console=tty1"
233 elog ""
234 fi
235
236 if ! has_version 'media-gfx/splash-themes-livecd' &&
237 ! has_version 'media-gfx/splash-themes-gentoo'; then
238 elog "The sample Gentoo themes (emergence, gentoo) have been removed from the"
239 elog "core splashutils package. To get some themes you might want to emerge:"
240 elog " media-gfx/splash-themes-livecd"
241 elog " media-gfx/splash-themes-gentoo"
242 fi
243
244 elog "Please note that the 'fbsplash' kernel patch has now been renamed to"
245 elog "'fbcondecor'. Accordingly, the old 'splash' initscript is now called"
246 elog "'fbcondecor'. Make sure you update your system. See:"
247 elog " http://dev.gentoo.org/~spock/projects/fbcondecor/#history"
248 elog "for further info about the name changes."
249 elog ""
250 elog "Also note that splash_util has now been split into splash_util, fbsplashd"
251 elog "and fbcondecor_ctl."
252 }

  ViewVC Help
Powered by ViewVC 1.1.20