# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" inherit autotools mount-boot git DESCRIPTION="Graphical boot animation (splash) and logger" HOMEPAGE="http://cgit.freedesktop.org/plymouth/" #SRC_URI="http://cgit.freedesktop.org/${PN}/snapshot/${P}.tar.bz2" EGIT_REPO_URI="git://anongit.freedesktop.org/plymouth" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86 amd64" VIDEO_CARDS="intel nouveau radeon" for card in ${VIDEO_CARDS}; do IUSE_VIDEO_CARDS+=" video_cards_${card}" done IUSE="${IUSE_VIDEO_CARDS} pango gdm branding +libkms" DEPEND="video_cards_intel? ( x11-libs/libdrm[video_cards_intel] ) video_cards_nouveau? ( x11-libs/libdrm[video_cards_nouveau] ) video_cards_radeon? ( x11-libs/libdrm[video_cards_radeon] ) libkms? ( x11-libs/libdrm[libkms] ) >=media-libs/libpng-1.2.16 >=x11-libs/gtk+-2.12.0 pango? ( >=x11-libs/pango-1.21 ) " RDEPEND="${DEPEND} >=sys-kernel/dracut-007 " src_unpack() { git_src_unpack } src_prepare() { ## Adjust the FB for Gentoo (see respective attachment from bug# 274065) sed -i src/plugins/renderers/frame-buffer/plugin.c -e 's/"\/dev\/fb"/"\/dev\/fb0"/g' || die if use branding ; then cp ${FILESDIR}/gentoo_ply.png images/bizcom.png fi eautoreconf \ $(use_enable video_cards_intel libdrm_intel) \ $(use_enable video_cards_nouveau libdrm_nouveau) \ $(use_enable video_cards_radeon libdrm_radeon) \ $(use_enable libkms) \ || die "eautoreconf failed" } src_configure() { econf \ $(use_enable pango) \ $(use_enable gdm gdm-transition) \ $(use_enable video_cards_intel libdrm_intel) \ $(use_enable video_cards_nouveau libdrm_nouveau) \ $(use_enable video_cards_radeon libdrm_radeon) \ $(use_enable libkms) \ || die "econf failed" } src_install() { emake install DESTDIR="${D}" || die "install failed" newinitd "${FILESDIR}"/plymouth.d plymouth # Well, his does not seem to make sense at all, especially on a fresh install # when no plymouth binary or *.so library is yet installed on the system, # and on an upgrade, the old plymouth version is called, that can't be # seriously our wish... # So rather display an einfo in pkg_postinst about the possibility to run # /usr/libexec/plymouth-generate-initrd # cd "${S}"/scripts # mkdir -p "${D}"/boot # chmod a+x ./plymouth-generate-initrd # PLYMOUTH_DESTDIR="${D}/boot" \ # PLYMOUTH_LIBEXECDIR="${D}/usr/libexec" \ # PLYMOUTH_DATADIR="${D}/usr/share" \ # ./plymouth-generate-initrd cd "${S}" #work around qa warning find "${D}" -type f -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed" local libdir for libdir in "${D}"/lib "${D}"/lib64; do [[ -d ${libdir} ]] && { rm "${libdir}"/libply.a rm "${libdir}"/libply-splash-core.a } done } pkg_postinst() { elog "This version of ${PN} has stopped installing .la files. This may" elog "cause compilation failures in other packages. To fix this problem," elog "install dev-util/lafilefixer and run:" elog "lafilefixer --justfixit" elog "" elog "Plymouth initrd utility scripts are located in /usr/libexec/plymouth" elog "if you need to call them manually and not by dracut for example..." }