# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils alternatives IUSE="doc" #IUSE="" 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="0" LICENSE="GPL-2" KEYWORDS="~x86 ~amd64" RDEPEND=">=dev-util/guile-1.6.5 virtual/tetex virtual/ghostscript >=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 gettext >=app-text/mftrace-1.1.17 >=media-gfx/fontforge-20050624 >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/" \ || 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" # vim support, should this be done differently? # is done by make install # "make web" packages all the docs into a nice tarball for us. # NOTE: this is different than the way we did this in 2.4; # If we try it the old way, the ebuild will hang because of # circular symlink dereferencing if use doc; then install -d ${D}/usr/share/doc/${PN} -m 755 cd ${D}/usr/share/doc/${PN} tar xzf ${S}/out-www/web.tar.gz fi }