# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/media-gfx/gfxboot/gfxboot.ebuild,v 1.1 # 2007/29/03 16:55:00 Rion Exp $ inherit rpm DESCRIPTION="gfxboot allows you to create gfx menus for bootmanagers." HOMEPAGE="http://suse.com" # We need find better place for src and repack it, but now... SRC_URI="http://download.opensuse.org/distribution/SL-OSS-factory/inst-source/suse/src/gfxboot-${PV}-2.src.rpm" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE_LINGUAS="linguas_af linguas_ar linguas_bg linguas_ca linguas_cs linguas_da linguas_de linguas_el linguas_es linguas_et linguas_fi linguas_fr linguas_gu linguas_hi linguas_hr linguas_hu linguas_id linguas_it linguas_ja linguas_lt linguas_mr linguas_nb linguas_nl linguas_pa linguas_pl linguas_pt_BR linguas_pt linguas_ro linguas_ru linguas_sk linguas_sl linguas_sr linguas_sv linguas_ta linguas_tr linguas_uk linguas_wa linguas_xh linguas_zh_CN linguas_zh_TW linguas_zu" IUSE="themes doc ${IUSE_LINGUAS}" DEPEND="dev-lang/nasm >=media-libs/freetype-2 themes? ( dev-libs/fribidi ) doc? ( app-text/xmlto dev-perl/HTML-Parser )" src_unpack () { rpm_src_unpack ${A} mv "${WORKDIR}/themes" "${S}/" cd "${S}" # going Gentoo-way sed -i -e 's:^CFLAGS):#:' \ -e 's:$(CFLAGS): -Wno-pointer-sign :' \ -e 's:sbin:bin:g' Makefile if use themes; then # We want to see penguins, many penguins... all the time sed -i "/penguin=/s:0:100:" `find . -type f -name gfxboot.cfg` # We want our native language by default sed -i "/DEFAULT_LANG =/s:$: `echo $LINGUAS|cut -b -2`:" \ `find . -type f -name Makefile` # We want _only_ our favorite languages... for i in `find themes/* -type f -name languages`; do cp $i $i- locale -a >> $i- sort $i-|uniq -d > $i rm $i- done # ...and nothing else local KEEP for i in `find themes/*/help-boot -type f -name "*.html" -print; \ find themes/*/help-install -type f -name "*.html" -print; \ find themes/*/po -type f -name "*.po" -print`;do KEEP="" for l in $LINGUAS;do if [[ `basename $i|grep "$l"` == `basename $i` ]]; then KEEP=$i else KEEP=$KEEP fi done if [[ $KEEP = $i ]] || basename $i|grep en >/dev/null 2>&1; then einfo "keeping $i" else rm "$i" fi done fi } src_compile() { emake -j1 || die "Make failed!" if use themes; then emake -j1 themes || die "Make themes failed!" fi if use doc; then emake -j1 doc || die "Make doc failed!" fi } src_install() { make DESTDIR="${D}" install || die "Install failed" if use doc; then dodoc Changelog gfxboot cp doc/gfxboot.html ${D}/usr/share/doc/${PF}/ fi }