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

Contents of /media-gfx/splashutils/splashutils-1.5.4.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Sat May 5 07:00:25 2012 UTC (4 years, 4 months ago) by jdhore
Branch: MAIN
Changes since 1.8: +2 -2 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.4.ebuild,v 1.8 2012/03/01 23:34:40 ranger 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.17"
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 || ( <sys-libs/zlib-1.2.5.1-r2 sys-libs/zlib[static-libs] ) )
41 png? ( >=media-libs/libpng-1.4.3[static-libs] )
42 mng? (
43 media-libs/lcms:0[static-libs]
44 || ( media-libs/libmng[static-libs] <media-libs/libmng-1.0.10-r1 )
45 )
46 virtual/jpeg[static-libs]
47 >=sys-apps/baselayout-1.9.4-r5
48 app-arch/cpio
49 media-gfx/fbgrab
50 !sys-apps/lcdsplash"
51 DEPEND="${RDEPEND}
52 >=dev-libs/klibc-1.5
53 virtual/pkgconfig"
54
55 S="${WORKDIR}/${P/_/-}"
56 SG="${WORKDIR}/${GENTOOSPLASH}"
57 SM="${WORKDIR}/${MISCSPLASH}"
58
59 pkg_setup() {
60 if use hardened; then
61 ewarn "Due to problems with klibc, it is currently impossible to compile splashutils"
62 ewarn "with 'hardened' GCC flags. As a workaround, the package will be compiled with"
63 ewarn "-fno-stack-protector. Hardened GCC features will not be used while building"
64 ewarn "the splash kernel helper."
65 fi
66 }
67
68 src_prepare() {
69 mv "${WORKDIR}"/{libpng-${V_PNG},jpeg-${V_JPEG},zlib-${V_ZLIB},freetype-${V_FT}} "${S}/libs"
70 # We need to delete the Makefile and let it be rebuilt when splashutils
71 # is being configured. Either that, or we end up with a segfaulting kernel
72 # helper.
73 rm "${S}/libs/zlib-${V_ZLIB}/Makefile"
74
75 cd "${SG}"
76 epatch "${FILESDIR}/splashutils-1.5.4.4-gentoo-typo-fix.patch"
77
78 if use truetype ; then
79 cd "${SM}"
80 epatch "${FILESDIR}/splashutils-1.5.4.4-freetype-bz2.patch"
81 fi
82
83 cd "${S}"
84 ln -sf "${S}/src" "${WORKDIR}/core"
85
86 if ! tc-is-cross-compiler && \
87 has_version "sys-devel/gcc:$(gcc-version)[vanilla]" ; then
88 ewarn "Your GCC was built with the 'vanilla' flag set. If you can't compile"
89 ewarn "splashutils, you're on your own, as this configuration is not supported."
90 else
91 # This should make splashutils compile on systems with hardened GCC.
92 sed -e 's@K_CFLAGS =@K_CFLAGS = -fno-stack-protector@' -i "${S}/Makefile.in"
93 fi
94
95 if ! use truetype ; then
96 sed -i -e 's/fbtruetype kbd/kbd/' "${SM}/Makefile"
97 fi
98
99 # Latest version of klibc defined its own version of ferror, so there is
100 # not need for the hack in klibc_compat.h
101 if has_version ">=dev-libs/klibc-1.5.20"; then
102 echo > "libs/klibc_compat.h"
103 fi
104
105 rm -f m4/*
106 eautoreconf
107 }
108
109 src_configure() {
110 tc-export CC
111 cd "${SM}"
112 emake CC="${CC}" LIB=$(get_libdir) STRIP=true || die "failed to build miscsplashutils"
113
114 cd "${S}"
115 econf \
116 $(use_with png) \
117 $(use_with mng) \
118 $(use_with gpm) \
119 $(use_with truetype ttf) \
120 $(use_with truetype ttf-kernel) \
121 $(use_enable fbcondecor) \
122 --docdir=/usr/share/doc/${PF} \
123 --with-freetype2-src=${FT2SRC} \
124 --with-jpeg-src=${JPEGSRC} \
125 --with-lpng-src=${LPNGSRC} \
126 --with-zlib-src=${ZLIBSRC} \
127 --with-essential-libdir=/$(get_libdir) || die "failed to configure splashutils"
128 }
129
130 src_compile() {
131 emake CC="${CC}" STRIP="true" || die "failed to build splashutils"
132
133 if has_version ">=sys-apps/baselayout-1.13.99"; then
134 cd "${SG}"
135 emake LIB=$(get_libdir) || die "failed to build the splash plugin"
136 fi
137 }
138
139 src_install() {
140 local LIB=$(get_libdir)
141
142 cd "${SM}"
143 make DESTDIR="${D}" LIB=${LIB} install || die
144
145 cd "${S}"
146 make DESTDIR="${D}" STRIP="true" install || die
147
148 mv "${D}"/usr/${LIB}/libfbsplash.so* "${D}"/${LIB}/
149 gen_usr_ldscript libfbsplash.so
150
151 echo 'CONFIG_PROTECT_MASK="/etc/splash"' > 99splash
152 doenvd 99splash
153
154 if use fbcondecor ; then
155 newinitd "${SG}"/init-fbcondecor fbcondecor
156 newconfd "${SG}"/fbcondecor.conf fbcondecor
157 fi
158 newconfd "${SG}"/splash.conf splash
159
160 insinto /usr/share/${PN}
161 doins "${SG}"/initrd.splash
162
163 insinto /etc/splash
164 doins "${SM}"/fbtruetype/luxisri.ttf
165
166 if has_version ">=sys-apps/baselayout-1.13.99"; then
167 cd "${SG}"
168 make DESTDIR="${D}" LIB=${LIB} install || die "failed to install the splash plugin"
169 else
170 cp "${SG}"/splash-functions-bl1.sh "${D}"/sbin/
171 fi
172
173 sed -i -e "s#/lib/splash#/${LIB}/splash#" "${D}"/sbin/splash-functions.sh
174 keepdir /${LIB}/splash/{tmp,cache,bin,sys}
175 dosym /${LIB}/splash/bin/fbres /sbin/fbres
176 }
177
178 pkg_preinst() {
179 has_version "<${CATEGORY}/${PN}-1.0"
180 previous_less_than_1_0=$?
181
182 has_version "<${CATEGORY}/${PN}-1.5.3"
183 previous_less_than_1_5_3=$?
184 }
185
186 pkg_postinst() {
187 if has_version sys-fs/devfsd || ! has_version sys-fs/udev ; then
188 elog "This package has been designed with udev in mind. Other solutions, such as"
189 elog "devfs or a static /dev tree might work, but are generally discouraged and"
190 elog "not supported. If you decide to switch to udev, you might want to have a"
191 elog "look at 'The Gentoo udev Guide', which can be found at"
192 elog " http://www.gentoo.org/doc/en/udev-guide.xml"
193 elog ""
194 fi
195
196 if [[ $previous_less_than_1_0 = 0 ]] ; then
197 elog "Since you are upgrading from a pre-1.0 version, please make sure that you"
198 elog "rebuild your initrds. You can use the splash_geninitramfs script to do that."
199 elog ""
200 fi
201
202 if [[ $previous_less_than_1_5_3 = 0 ]] && ! use fbcondecor ; then
203 elog "Starting with splashutils-1.5.3, support for the fbcondecor kernel patch"
204 elog "is optional and dependent on the the 'fbcondecor' USE flag. If you wish"
205 elog "to use fbcondecor, run:"
206 elog " echo \"media-gfx/splashutils fbcondecor\" >> /etc/portage/package.use"
207 elog "and re-emerge splashutils."
208 fi
209
210 if ! test -f /proc/cmdline ||
211 ! egrep -q '(console=tty1|CONSOLE=/dev/tty1)' /proc/cmdline ; then
212 elog "It is required that you add 'console=tty1' to your kernel"
213 elog "command line parameters."
214 elog ""
215 elog "After these modifications, the relevant part of the kernel command"
216 elog "line might look like:"
217 elog " splash=silent,fadein,theme:emergence console=tty1"
218 elog ""
219 fi
220
221 if ! has_version 'media-gfx/splash-themes-livecd' &&
222 ! has_version 'media-gfx/splash-themes-gentoo'; then
223 elog "The sample Gentoo themes (emergence, gentoo) have been removed from the"
224 elog "core splashutils package. To get some themes you might want to emerge:"
225 elog " media-gfx/splash-themes-livecd"
226 elog " media-gfx/splash-themes-gentoo"
227 fi
228
229 elog "Please note that the 'fbsplash' kernel patch has now been renamed to"
230 elog "'fbcondecor'. Accordingly, the old 'splash' initscript is now called"
231 elog "'fbcondecor'. Make sure you update your system. See:"
232 elog " http://dev.gentoo.org/~spock/projects/fbcondecor/#history"
233 elog "for further info about the name changes."
234 elog ""
235 elog "Also note that splash_util has now been split into splash_util, fbsplashd"
236 elog "and fbcondecor_ctl."
237 }

  ViewVC Help
Powered by ViewVC 1.1.20