# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils alternatives IUSE="doc" MY_PVv="v$(echo ${PV} | cut -d. -f1,2)" MY_PV="$(echo ${PV} | cut -d. -f1,2)" DESCRIPTION="GNU Music Typesetter" SRC_URI="http://www.lilypond.org/ftp/${MY_PVv}/${P}.tar.gz" HOMEPAGE="http://lilypond.org/" SLOT="3" LICENSE="GPL-2" KEYWORDS="~x86 ~amd64" RDEPEND=">=dev-util/guile-1.6.5 virtual/ghostscript virtual/tetex >=dev-lang/python-2.2.3-r1 >=media-libs/freetype-2 >=media-libs/fontconfig-2.2 >=x11-libs/pango-1.6" DEPEND="${RDEPEND} >=app-text/t1utils-1.32 >=dev-lang/perl-5.8.0-r12 >=sys-apps/texinfo-4.8 >=sys-devel/flex-2.5.4a-r5 >=sys-devel/gcc-3.3 >=sys-devel/make-3.80 >=app-text/mftrace-1.1.17 >=media-gfx/fontforge-20050624 sys-devel/bison !=sys-devel/bison-1.75 doc? ( media-gfx/imagemagick >=media-libs/netpbm-9.12-r4 )" src_unpack() { unpack ${A} || die "unpack failed" } src_compile() { # Remove ccache from the PATH since it can break compilation of # this package. See bug 21305 PATH="$(echo ":${PATH}:" | sed 's/:[^:]*ccache[^:]*:/:/;s/^://;s/:$//;')" # Fontforge requires write access to the following temp directory addwrite /root/.PfaEdit addwrite /dev/stderr addwrite /var/cache/fonts addwrite /usr/share/texmf/fonts addwrite /usr/share/texmf/ls-R econf --infodir="/usr/share/info" --datadir="/usr/share" \ --with-ncsb-dir="/usr/share/fonts/default/ghostscript" || die "econf failed" emake || die "emake failed" if use doc; then make web || die "make web failed" fi } src_install () { einstall \ lilypond_datadir=${D}/usr/share/${PN}/${PV} \ local_lilypond_datadir=${D}/usr/share/${PN}/${PV} \ || die "einstall failed" dodoc AUTHORS.txt COPYING ChangeLog DEDICATION INSTALL.txt \ NEWS.txt README.txt ROADMAP THANKS VERSION \ || die "dodoc failed" insinto /usr/share/${PN}/buildscripts einfo "Installing build scripts to" einfo "/usr/share/${PN}/buildscripts" doins buildscripts/out/lilypond-words \ buildscripts/out/make-font-dir \ || die "doins failed" # emacs support, should this be done differently? insinto /usr/share/${PN}/elisp doins elisp/*.el \ || die "doins failed" insinto /usr/share/${PN}/elisp/out doins elisp/out/lilypond-words.el \ || die "doins failed" if use doc; then install -d ${D}/usr/share/doc/${PN} -m 755 cp -dr ${S}/out-www/web-root/Documentation ${D}/usr/share/doc/${PN}/ fi }