1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 )
7 inherit elisp-common autotools python-single-r1 xdg-utils
9 DESCRIPTION="GNU Music Typesetter"
10 SRC_URI="http://download.linuxaudio.org/lilypond/sources/v${PV:0:4}/${P}.tar.gz"
11 HOMEPAGE="http://lilypond.org/"
13 LICENSE="GPL-3 FDL-1.3"
15 KEYWORDS="~alpha amd64 ~arm ~hppa x86"
16 LANGS=" ca cs da de el eo es fi fr it ja nl ru sv tr uk vi zh_TW"
17 IUSE="debug emacs profile vim-syntax ${LANGS// / linguas_}"
18 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
20 RDEPEND=">=app-text/ghostscript-gpl-8.15
21 >=dev-scheme/guile-1.8.2:12[deprecated,regex]
22 <dev-scheme/guile-2.0:12
26 >=x11-libs/pango-1.12.3
27 emacs? ( virtual/emacs )
33 >=dev-texlive/texlive-metapost-2013
35 >=app-text/texlive-core-2013
36 >=dev-tex/metapost-1.803
39 media-gfx/fontforge[png]
40 >=sys-apps/texinfo-4.11
46 # Correct output data for tests isn't bundled with releases
50 "${FILESDIR}"/${PN}-2.17.2-tex-docs.patch
51 "${FILESDIR}"/${P}-fontforge.patch
54 DOCS=( AUTHORS.txt NEWS.txt README.txt )
57 # make sure >=metapost-1.803 is selected if it's installed, bug 498704
58 if [[ ${MERGE_TYPE} != binary ]] && has_version ">=dev-tex/metapost-1.803" ; then
59 if [[ $(readlink "${EROOT}"/usr/bin/mpost) =~ mpost-texlive-* ]] ; then
60 einfo "Updating metapost symlink"
61 eselect mpost update || die
65 python-single-r1_pkg_setup
69 eapply "${PATCHES[@]}"
71 if ! use vim-syntax ; then
72 sed -i 's/vim//' GNUmakefile.in || die
76 sed -i 's/OPTIMIZE -g/OPTIMIZE/' aclocal.m4 || die
78 for lang in ${LANGS}; do
79 use linguas_${lang} || rm po/${lang}.po || die
83 sed -i "s:^AR=ar:AR=$(tc-getAR):" stepmake/stepmake/library-vars.make || die
85 # remove bundled texinfo file (fixes bug #448560)
86 rm tex/texinfo.tex || die
92 xdg_environment_reset #586592
96 # documentation generation currently not supported since it requires a newer
97 # version of texi2html than is currently in the tree
100 --with-ncsb-dir=/usr/share/fonts/urw-fonts \
101 --disable-documentation \
102 --disable-optimising \
104 $(use_enable debug debugging) \
105 $(use_enable profile profiling)
112 elisp-compile elisp/lilypond-{font-lock,indent,mode,what-beat}.el \
113 || die "elisp-compile failed"
118 emake DESTDIR="${D}" vimdir=/usr/share/vim/vimfiles install
120 # remove elisp files since they are in the wrong directory
121 rm -r "${ED}"/usr/share/emacs || die
124 elisp-install ${PN} elisp/*.{el,elc} elisp/out/*.el \
125 || die "elisp-install failed"
126 elisp-site-file-install "${FILESDIR}"/50${PN}-gentoo.el
129 python_fix_shebang "${ED}"
135 use emacs && elisp-site-regen
139 use emacs && elisp-site-regen