From 2d3ea2dd58c7d76fbe4bfb07f4e264a8c0c4834e Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Mon, 3 Aug 2009 16:35:29 +0200 Subject: [PATCH] [media-gfx/gfxboot] new gfxboot ebuild --- media-gfx/gfxboot/Manifest | 3 + media-gfx/gfxboot/files/bininstall.patch | 13 +++ media-gfx/gfxboot/gfxboot-4.0.14-r4.ebuild | 118 +++++++++++++++++++++ 3 files changed, 134 insertions(+) create mode 100644 media-gfx/gfxboot/Manifest create mode 100644 media-gfx/gfxboot/files/bininstall.patch create mode 100644 media-gfx/gfxboot/gfxboot-4.0.14-r4.ebuild diff --git a/media-gfx/gfxboot/Manifest b/media-gfx/gfxboot/Manifest new file mode 100644 index 000000000..c051f9a3d --- /dev/null +++ b/media-gfx/gfxboot/Manifest @@ -0,0 +1,3 @@ +AUX bininstall.patch 524 RMD160 f852ae841f45a62cbc8b6def33e60dfc0f49eca6 SHA1 3eed0aa4e67a259806e4b225235c921a38fb4699 SHA256 f0e839212a1d70bbb8aef35cc37e6025b882b38806ce9d128d5b56cfe94d7042 +DIST gfxboot-4.0.14-4.1.src.rpm 2923815 RMD160 ac253797d204cca9894181d9f48e92f33d08429c SHA1 a1639b4fec84307be89c4f191a71958a0811bbc9 SHA256 9d883b0a7f1538d1a65f43a4da4d32113857a19ecfefa0ddeb6d9dc18b53c773 +EBUILD gfxboot-4.0.14-r4.ebuild 3294 RMD160 4a5dd54b98210ad517e67f20494cac9fed06862e SHA1 db584a4c97bd7b9f5ad37f7afb01146cff4eaf0e SHA256 884b53b6c794f107efc44b0b32ea1b21b3d77ef28fd7b69c4f04e710bccfac9f diff --git a/media-gfx/gfxboot/files/bininstall.patch b/media-gfx/gfxboot/files/bininstall.patch new file mode 100644 index 000000000..66475ff84 --- /dev/null +++ b/media-gfx/gfxboot/files/bininstall.patch @@ -0,0 +1,13 @@ +--- Makefile.old 2006-09-14 16:02:58.000000000 +0600 ++++ Makefile 2007-03-28 19:10:21.000000000 +0600 +@@ -40,8 +40,8 @@ + as --32 -ahlsn=jpeg.lst -o $@ $< + + install: all +- install -d -m 755 $(DESTDIR)/usr/sbin $(DESTDIR)/usr/share/gfxboot +- install -m 755 mkbootmsg mkblfont help2txt $(DESTDIR)/usr/sbin ++ install -d -m 755 $(DESTDIR)/usr/bin $(DESTDIR)/usr/share/gfxboot ++ install -m 755 mkbootmsg mkblfont help2txt $(DESTDIR)/usr/bin + cp -a themes $(DESTDIR)/usr/share/gfxboot + cp -a bin $(DESTDIR)/usr/share/gfxboot + diff --git a/media-gfx/gfxboot/gfxboot-4.0.14-r4.ebuild b/media-gfx/gfxboot/gfxboot-4.0.14-r4.ebuild new file mode 100644 index 000000000..84ec47aab --- /dev/null +++ b/media-gfx/gfxboot/gfxboot-4.0.14-r4.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: + +inherit rpm toolchain-funcs + +EAPI='1' +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/11.0/repo/src-oss/suse/src/gfxboot-${PV}-${PR/r/}.1.src.rpm" + +LICENSE="GPL-2" +SLOT="4" +KEYWORDS="x86 amd64" + +LANGS="af ar bg ca cs da de el en es et fi fr gu hi hr hu id it ja lt mr nb nl pa pl pt_BR pt ro ru sk sl sr sv ta tr uk wa xh zh_CN zh_TW zu" +IUSE="themes doc animate speech beep" +for i in ${LANGS}; do + IUSE="${IUSE} linguas_${i}" +done + +DEPEND="app-arch/cpio + dev-lang/nasm + >=media-libs/freetype-2 + themes? ( dev-libs/fribidi ) + doc? ( app-text/xmlto + dev-libs/libxslt + app-text/docbook-xml-dtd:4.1.2 + dev-perl/HTML-Parser )" +RDEPEND="${DEPEND}" +RESTRICT="mirror" + +pkg_setup() { + if ! use themes; then + if use animate || use beep || use speech; then + ewarn "There is no use for 'animate', 'beep' or 'speech' flags" + ewarn "if themes are disabled." + fi + fi +} + +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:bootsplash/$$i:bootsplash/`basename $$i`:g' \ + -e 's:sbin:bin:g' Makefile + + if use themes; then + [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}" || LINGUAS=en + # We want to see penguins, many penguins... all the time + use animate && sed -i "/penguin=/s:0:100:" `find . -type f -name gfxboot.cfg` + # some signal on start + use beep || sed -i "/beep=/s:1:0:" `find . -type f -name gfxboot.cfg` + # experimental talking + use speech && sed -i "/talk=/s:0:1:" `find . -type f -name gfxboot.cfg` + + # We want our native language by default + sed -i "/DEFAULT_LANG =/s:$: `echo $LINGUAS|cut -f1 -d\ `:" \ + `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 + for i in `find . -path "./themes/*/help-*" -type f -name "*.html"; \ + find . -path "./themes/*" -type f -name "*.po"`;do + if has `basename "$i" .po` "$LINGUAS" || has `basename "$i" .html` "$LINGUAS"; 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 + dohtml doc/gfxboot.html + fi +} + +pkg_postinst() { + if use themes; then + elog "To use gfxboot themes on your machine do following:" + echo + elog "1) Pick up one of build-in themes in /etc/bootsplash" + elog " or one from kde-look.org or similar site" + elog "2) Patch your grub_legacy to use gfxmenu or use grub2" + elog " or lilo" + elog "3) copy 'message' to /boot/ [aka root of boot partition]" + elog "4) Set up gfxmenu in bootloader, as example" + elog " 'gfxmenu /message' line if your root=boot partition" + elog " in grub_legacy" + fi +}