# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/media-sound/lilypond/lilypond-2.5.2.ebuild,v 1.4 2005/03/29 14:04:13 luckyduck Exp $ 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="0" LICENSE="GPL-2" KEYWORDS="~amd64 ~x86" RDEPEND=">=dev-util/guile-1.6.5 >=app-text/ghostscript-gnu-8.15 virtual/tetex >=dev-lang/python-2.2.3-r1" DEPEND="${RDEPEND} >=media-gfx/fontforge-20050624 >=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.9 sys-devel/bison !=sys-devel/bison-1.75" 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/:$//;')" # The lilypond build uses fontforge, which uses g_get_home_dir, which uses # getpwuid() to find the users home directory, so we can't redirect # fontforge from creating its settings directory in /root/ 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" } 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-profile \ buildscripts/out/lilypond-login \ buildscripts/out/clean-fonts \ buildscripts/out/lilypond-words \ || die "doins failed" } pkg_postinst () { # Cleaning out old fonts is more appropriate in pkg_prerm, but we # also need to clean up after any previous lilypond installations. # Make sure to run this from somewhere safe since it references . cd ${T} . /usr/share/lilypond/${PV}/buildscripts/out/clean-fonts } pkg_prerm () { # Make sure to run this from somewhere safe since it references . cd ${T} . /usr/share/lilypond/${PV}/buildscripts/out/clean-fonts }