| 1 |
# Copyright 1999-2013 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: $
|
| 4 |
|
| 5 |
EAPI=5
|
| 6 |
PYTHON_COMPAT=( python{2_5,2_6,2_7} )
|
| 7 |
|
| 8 |
inherit elisp-common autotools eutils python-single-r1
|
| 9 |
|
| 10 |
DESCRIPTION="GNU Music Typesetter"
|
| 11 |
SRC_URI="http://download.linuxaudio.org/lilypond/sources/v${PV:0:4}/${P}.tar.gz"
|
| 12 |
HOMEPAGE="http://lilypond.org/"
|
| 13 |
|
| 14 |
SLOT="0"
|
| 15 |
LICENSE="GPL-3 FDL-1.3"
|
| 16 |
KEYWORDS="~amd64 ~hppa ~x86"
|
| 17 |
LANGS=" ca cs da de el eo es fi fr it ja nl ru sv tr uk vi zh_TW"
|
| 18 |
IUSE="debug emacs profile vim-syntax ${LANGS// / linguas_}"
|
| 19 |
|
| 20 |
RDEPEND=">=app-text/ghostscript-gpl-8.15
|
| 21 |
>=dev-scheme/guile-1.8.2[deprecated,regex]
|
| 22 |
media-fonts/urw-fonts
|
| 23 |
media-libs/fontconfig
|
| 24 |
media-libs/freetype:2
|
| 25 |
>=x11-libs/pango-1.12.3
|
| 26 |
emacs? ( virtual/emacs )
|
| 27 |
${PYTHON_DEPS}"
|
| 28 |
DEPEND="${RDEPEND}
|
| 29 |
app-text/t1utils
|
| 30 |
dev-lang/perl
|
| 31 |
dev-texlive/texlive-metapost
|
| 32 |
virtual/pkgconfig
|
| 33 |
media-gfx/fontforge
|
| 34 |
>=sys-apps/texinfo-4.11
|
| 35 |
>=sys-devel/bison-2.0
|
| 36 |
sys-devel/flex
|
| 37 |
sys-devel/gettext
|
| 38 |
sys-devel/make"
|
| 39 |
|
| 40 |
# Correct output data for tests isn't bundled with releases
|
| 41 |
RESTRICT="test"
|
| 42 |
|
| 43 |
src_prepare() {
|
| 44 |
epatch "${FILESDIR}"/${PN}-2.17.2-tex-docs.patch
|
| 45 |
|
| 46 |
if ! use vim-syntax ; then
|
| 47 |
sed -i -e "s/vim//" GNUmakefile.in || die
|
| 48 |
fi
|
| 49 |
|
| 50 |
sed -i -e "s/OPTIMIZE -g/OPTIMIZE/" aclocal.m4 || die
|
| 51 |
|
| 52 |
for lang in ${LANGS}; do
|
| 53 |
use linguas_${lang} || rm po/${lang}.po || die
|
| 54 |
done
|
| 55 |
|
| 56 |
eautoreconf
|
| 57 |
}
|
| 58 |
|
| 59 |
src_configure() {
|
| 60 |
# documentation generation currently not supported since it requires a newer
|
| 61 |
# version of texi2html than is currently in the tree
|
| 62 |
|
| 63 |
econf \
|
| 64 |
--with-ncsb-dir=/usr/share/fonts/urw-fonts \
|
| 65 |
--disable-documentation \
|
| 66 |
--disable-optimising \
|
| 67 |
--disable-pipe \
|
| 68 |
$(use_enable debug debugging) \
|
| 69 |
$(use_enable profile profiling)
|
| 70 |
}
|
| 71 |
|
| 72 |
src_compile() {
|
| 73 |
default
|
| 74 |
|
| 75 |
if use emacs ; then
|
| 76 |
elisp-compile elisp/lilypond-{font-lock,indent,mode,what-beat}.el \
|
| 77 |
|| die "elisp-compile failed"
|
| 78 |
fi
|
| 79 |
}
|
| 80 |
|
| 81 |
src_install () {
|
| 82 |
emake DESTDIR="${D}" vimdir=/usr/share/vim/vimfiles install
|
| 83 |
|
| 84 |
# remove elisp files since they are in the wrong directory
|
| 85 |
rm -r "${ED}"/usr/share/emacs || die
|
| 86 |
|
| 87 |
if use emacs ; then
|
| 88 |
elisp-install ${PN} elisp/*.{el,elc} elisp/out/*.el \
|
| 89 |
|| die "elisp-install failed"
|
| 90 |
elisp-site-file-install "${FILESDIR}"/50${PN}-gentoo.el
|
| 91 |
fi
|
| 92 |
|
| 93 |
python_fix_shebang "${ED}"
|
| 94 |
|
| 95 |
dodoc AUTHORS.txt HACKING NEWS.txt README.txt
|
| 96 |
}
|
| 97 |
|
| 98 |
pkg_postinst() {
|
| 99 |
use emacs && elisp-site-regen
|
| 100 |
}
|
| 101 |
|
| 102 |
pkg_postrm() {
|
| 103 |
use emacs && elisp-site-regen
|
| 104 |
}
|