# Distributed under the terms of the GNU General Public License, v2 or later IUSE="doc" inherit gcc MY_PV="v$(echo ${PV} | cut -d. -f1,2)" DESCRIPTION="GNU Music Typesetter" SRC_URI="ftp://ftp.lilypond.org/pub/LilyPond/${MY_PV}/${P}.tar.gz" HOMEPAGE="http://lilypond.org/web/index.html" SLOT="0" LICENSE="GPL-2" KEYWORDS="~x86" DEPEND=">=dev-lang/python-2.2.1-r2 >=dev-lang/perl-5.6.1-r6 >=dev-util/guile-1.4-r3 >=sys-devel/bison-1.35 >=app-text/tetex-1.0.7-r12 >=sys-apps/texinfo-4.2-r5 >=sys-devel/flex-2.5.4a-r5 doc? ( >=app-text/mftrace-1.0.8 >=app-text/ghostscript-7.05.5 >=media-libs/netpbm-9.12-r2 )" RDEPEND=">=dev-util/guile-1.4-r3 >=app-text/ghostscript-7.05.5 >=app-text/tetex-1.0.7-r10 >=dev-lang/python-2.2.1-r2" src_unpack() { unpack ${A} || die "unpack failed" cd ${S} if [ "`gcc-major-version`" -eq "3" -a "`gcc-minor-version`" -ge "3" ] then # needs a fix for tail/head -1... not a biggie, just a s// in an aclocal.m4 and autogen epatch ${FILESDIR}/lilypond-1.8.0-gcc33.patch || die "epatch failed" # we have to re-run autogen.sh to rebuild all the files w/ # that damn head/tail thing in 'em... NOCONFIGURE=1 ./autogen.sh > /dev/null || die "re-building of configure file failed" fi } src_compile() { econf || die "econf failed" emake MAKE_PFA_FILES=1 || die "emake failed" if use doc then emake web || die "emake web failed" fi } src_install() { einstall \ MAKE_PFA_FILES=1 lilypond_datadir=${D}/usr/share/lilypond \ local_lilypond_datadir=${D}/usr/share/lilypond/${PV} dodoc AUTHORS* COPYING ChangeLog DEDICATION NEWS README.txt \ ROADMAP THANKS VERSION *.el insinto /usr/share/lilypond/${PV}/buildscripts/out doins buildscripts/out/lilypond-profile \ buildscripts/out/lilypond-login \ buildscripts/out/clean-fonts if use doc then make \ webdir=${D}/usr/share/doc/${PF}/html \ web-install || die "web-install failed" fi prepall prepalldocs texhash } pkg_postinst() { # Cleaning out old fonts is more appropriate in pkg_prerm, but we # also need to clean up after any lilypond installations which may # not have been installed via portage. . /usr/share/lilypond/${PV}/buildscripts/out/clean-fonts } pkg_prerm () { . /usr/share/lilypond/${PV}/buildscripts/out/clean-fonts }