# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ IUSE="doc" #IUSE="" MY_PV="v$(echo ${PV} | cut -d. -f1,2)" DESCRIPTION="GNU Music Typesetter" SRC_URI="http://www.lilypond.org/ftp/${MY_PV}/${P}.tar.gz" HOMEPAGE="http://lilypond.org/" SLOT="3" LICENSE="GPL-2" KEYWORDS="x86 ~amd64" RDEPEND=">=dev-util/guile-1.6.5 virtual/tetex virtual/ghostscript >=dev-lang/python-2.2.3-r1" #|| (app-text/ghostscript-afpl app-text/ghostscript-gnu) DEPEND="${RDEPEND} >=app-text/t1utils-1.32 >=dev-lang/perl-5.8.0-r12 >=sys-apps/texinfo-4.7 >=sys-devel/flex-2.5.4a-r5 >=sys-devel/gcc-3.1-r8 >=sys-devel/make-3.80 >=app-text/mftrace-1.1.11 >=media-gfx/fontforge-20050624 >sys-devel/bison-1.75 doc? ( media-gfx/imagemagick >=media-libs/netpbm-9.12-r4 )" #sys-devel/bison 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 /root/ addwrite /dev/stderr addwrite /var/cache/fonts addwrite /usr/share/texmf/fonts addwrite /usr/share/texmf/ls-R econf --build=${CHOST} || 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/lilypond \ local_lilypond_datadir=${D}/usr/share/lilypond/${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/lilypond/${PV}/buildscripts/out doins buildscripts/out/lilypond-words \ || die "doins failed" # emacs support, should this be done differently? insinto /usr/share/lilypond/${PV}/elisp doins elisp/*.el \ || die "doins failed" insinto /usr/share/lilypond/${PV}/elisp/out doins elisp/out/lilypond-words.el \ || die "doins failed" # vim support, should this be done differently? insinto /usr/share/lilypond/${PV}/vim/out doins vim/out/lilypond-words.vim \ || die "doins failed" insinto /usr/share/lilypond/${PV}/vim doins vim/lilypond*.vim vim/vimrc \ || die "doins failed" # "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/lilypond -m 755 cd ${D}/usr/share/doc/lilypond tar xzf ${S}/out-www/web.tar.gz fi }