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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun Oct 28 16:20:50 2012 UTC (20 months, 3 weeks ago) by hwoarang
Branch: MAIN
Changes since 1.3: +2 -2 lines
Stable on amd64 wrt bug #422921

(Portage version: 2.1.11.30/cvs/Linux x86_64, signed Manifest commit with key B4AFF2C2)

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-r1.ebuild,v 1.3 2012/10/21 08:58:19 maekke 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 epatch "${FILESDIR}/${P}-bzip2.patch"
87
88 if ! tc-is-cross-compiler && \
89 has_version "sys-devel/gcc:$(gcc-version)[vanilla]" ; then
90 ewarn "Your GCC was built with the 'vanilla' flag set. If you can't compile"
91 ewarn "splashutils, you're on your own, as this configuration is not supported."
92 else
93 # This should make splashutils compile on systems with hardened GCC.
94 sed -e 's@K_CFLAGS =@K_CFLAGS = -fno-stack-protector@' -i "${S}/Makefile.in"
95 fi
96
97 if ! use truetype ; then
98 sed -i -e 's/fbtruetype kbd/kbd/' "${SM}/Makefile"
99 fi
100
101 # Latest version of klibc defined its own version of ferror, so there is
102 # not need for the hack in klibc_compat.h
103 if has_version ">=dev-libs/klibc-1.5.20"; then
104 echo > "libs/klibc_compat.h"
105 fi
106
107 rm -f m4/*
108 eautoreconf
109 }
110
111 src_configure() {
112 tc-export CC
113 cd "${SM}"
114 emake CC="${CC}" LIB=$(get_libdir) STRIP=true || die "failed to build miscsplashutils"
115
116 cd "${S}"
117 econf \
118 $(use_with png) \
119 $(use_with mng) \
120 $(use_with gpm) \
121 $(use_with truetype ttf) \
122 $(use_with truetype ttf-kernel) \
123 $(use_enable fbcondecor) \
124 --docdir=/usr/share/doc/${PF} \
125 --with-freetype2-src=${FT2SRC} \
126 --with-jpeg-src=${JPEGSRC} \
127 --with-lpng-src=${LPNGSRC} \
128 --with-zlib-src=${ZLIBSRC} \
129 --with-essential-libdir=/$(get_libdir) || die "failed to configure splashutils"
130 }
131
132 src_compile() {
133 emake CC="${CC}" STRIP="true" || die "failed to build splashutils"
134
135 if has_version ">=sys-apps/baselayout-1.13.99"; then
136 cd "${SG}"
137 emake LIB=$(get_libdir) || die "failed to build the splash plugin"
138 fi
139 }
140
141 src_install() {
142 local LIB=$(get_libdir)
143
144 cd "${SM}"
145 make DESTDIR="${D}" LIB=${LIB} install || die
146
147 cd "${S}"
148 make DESTDIR="${D}" STRIP="true" install || die
149
150 mv "${D}"/usr/${LIB}/libfbsplash.so* "${D}"/${LIB}/
151 gen_usr_ldscript libfbsplash.so
152
153 echo 'CONFIG_PROTECT_MASK="/etc/splash"' > 99splash
154 doenvd 99splash
155
156 if use fbcondecor ; then
157 newinitd "${SG}"/init-fbcondecor fbcondecor
158 newconfd "${SG}"/fbcondecor.conf fbcondecor
159 fi
160 newconfd "${SG}"/splash.conf splash
161
162 insinto /usr/share/${PN}
163 doins "${SG}"/initrd.splash
164
165 insinto /etc/splash
166 doins "${SM}"/fbtruetype/luxisri.ttf
167
168 if has_version ">=sys-apps/baselayout-1.13.99"; then
169 cd "${SG}"
170 make DESTDIR="${D}" LIB=${LIB} install || die "failed to install the splash plugin"
171 else
172 cp "${SG}"/splash-functions-bl1.sh "${D}"/sbin/
173 fi
174
175 sed -i -e "s#/lib/splash#/${LIB}/splash#" "${D}"/sbin/splash-functions.sh
176 keepdir /${LIB}/splash/{tmp,cache,bin,sys}
177 dosym /${LIB}/splash/bin/fbres /sbin/fbres
178 }
179
180 pkg_preinst() {
181 has_version "<${CATEGORY}/${PN}-1.0"
182 previous_less_than_1_0=$?
183
184 has_version "<${CATEGORY}/${PN}-1.5.3"
185 previous_less_than_1_5_3=$?
186 }
187
188 pkg_postinst() {
189 if has_version sys-fs/devfsd || ! has_version sys-fs/udev ; then
190 elog "This package has been designed with udev in mind. Other solutions, such as"
191 elog "devfs or a static /dev tree might work, but are generally discouraged and"
192 elog "not supported. If you decide to switch to udev, you might want to have a"
193 elog "look at 'The Gentoo udev Guide', which can be found at"
194 elog " http://www.gentoo.org/doc/en/udev-guide.xml"
195 elog ""
196 fi
197
198 if [[ $previous_less_than_1_0 = 0 ]] ; then
199 elog "Since you are upgrading from a pre-1.0 version, please make sure that you"
200 elog "rebuild your initrds. You can use the splash_geninitramfs script to do that."
201 elog ""
202 fi
203
204 if [[ $previous_less_than_1_5_3 = 0 ]] && ! use fbcondecor ; then
205 elog "Starting with splashutils-1.5.3, support for the fbcondecor kernel patch"
206 elog "is optional and dependent on the the 'fbcondecor' USE flag. If you wish"
207 elog "to use fbcondecor, run:"
208 elog " echo \"media-gfx/splashutils fbcondecor\" >> /etc/portage/package.use"
209 elog "and re-emerge splashutils."
210 fi
211
212 if ! test -f /proc/cmdline ||
213 ! egrep -q '(console=tty1|CONSOLE=/dev/tty1)' /proc/cmdline ; then
214 elog "It is required that you add 'console=tty1' to your kernel"
215 elog "command line parameters."
216 elog ""
217 elog "After these modifications, the relevant part of the kernel command"
218 elog "line might look like:"
219 elog " splash=silent,fadein,theme:emergence console=tty1"
220 elog ""
221 fi
222
223 if ! has_version 'media-gfx/splash-themes-livecd' &&
224 ! has_version 'media-gfx/splash-themes-gentoo'; then
225 elog "The sample Gentoo themes (emergence, gentoo) have been removed from the"
226 elog "core splashutils package. To get some themes you might want to emerge:"
227 elog " media-gfx/splash-themes-livecd"
228 elog " media-gfx/splash-themes-gentoo"
229 fi
230
231 elog "Please note that the 'fbsplash' kernel patch has now been renamed to"
232 elog "'fbcondecor'. Accordingly, the old 'splash' initscript is now called"
233 elog "'fbcondecor'. Make sure you update your system. See:"
234 elog " http://dev.gentoo.org/~spock/projects/fbcondecor/#history"
235 elog "for further info about the name changes."
236 elog ""
237 elog "Also note that splash_util has now been split into splash_util, fbsplashd"
238 elog "and fbcondecor_ctl."
239 }

  ViewVC Help
Powered by ViewVC 1.1.20