# 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="2" LICENSE="GPL-2" KEYWORDS="~x86 ~amd64 ~sparc" RDEPEND=">=dev-util/guile-1.6.5 virtual/ghostscript >=dev-lang/python-2.2.3-r1 >=media-libs/freetype-2 >=media-libs/fontconfig-2.2 >=x11-libs/pango-1.6 >=dev-lang/perl-5.8.0-r12 virtual/tetex" #we need tetex to get metafont, which is used DEPEND="${RDEPEND} >=app-text/mftrace-1.1.17 >=media-gfx/fontforge-20050624 >=sys-apps/texinfo-4.8 >=sys-devel/gcc-3.3 >=sys-devel/make-3.80 gettext >=sys-devel/flex-2.5.4a-r5 sys-devel/bison !=sys-devel/bison-1.75 doc? ( media-gfx/imagemagick >=media-libs/netpbm-9.12-r4 )" # These come from the old ebuild, but aren't now listed as # dependancies on the home page # >=app-text/t1utils-1.32 # no refes in makefiles either 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 --program-suffix="-${MY_PV}" \ --infodir="/usr/share/info/lilypond-${MY_PV}" || 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/${MY_PV} \ local_lilypond_datadir=${D}/usr/share/lilypond/${MY_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/${MY_PV}/buildscripts/out einfo "Installing build scripts to" einfo "/usr/share/lilypond/${MY_PV}/buildscripts/out" doins buildscripts/out/make-font-dir \ buildscripts/out/lilypond-words \ || die "installing failed" # these are the only ones left that might be useful as far as I can see # 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" # # "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/${MY_PV} -m 755 cd ${D}/usr/share/doc/lilypond/${MY_PV} tar xzf ${S}/out-www/web.tar.gz fi } pkg_postinst() { alternatives_auto_makesym "/usr/bin/lilypond" \ "/usr/bin/lilypond-[0-9].[0-9]" #confect the package version - independant symlink } pkg_postrm() { alternatives_auto_makesym "/usr/bin/lilypond" \ "/usr/bin/lilypond-v[0-9].[0-9]" #confect the package version - independant symlink # do this after removal as well so /usr/bin/lilypond still exists }