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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Fri Oct 26 20:29:03 2012 UTC (2 years, 4 months ago) by flameeyes
Branch: MAIN
Revision bump to -r2 with EAPI=4 to use USE deps defaults; add a use dep on static-libs for sys-libs/gpm as well.

(Portage version: 2.2.0_alpha141/cvs/Linux x86_64, signed Manifest commit with key 1CD13C8AD4301342)

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

  ViewVC Help
Powered by ViewVC 1.1.20