1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python3_{6,7,8} )
7 inherit elisp-common autotools python-single-r1 toolchain-funcs xdg-utils
9 if [[ "${PV}" = "9999" ]]; then
11 EGIT_REPO_URI="https://git.savannah.gnu.org/git/lilypond.git"
13 MAIN_VER=$(ver_cut 1-2)
14 SRC_URI="http://lilypond.org/download/sources/v${MAIN_VER}/${P}.tar.gz"
15 KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~x86"
18 DESCRIPTION="GNU Music Typesetter"
19 HOMEPAGE="http://lilypond.org/"
21 LICENSE="GPL-3 FDL-1.3"
23 IUSE="debug emacs guile2 profile vim-syntax"
24 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
27 >=dev-texlive/texlive-metapost-2013
29 >=app-text/texlive-core-2013
30 >=dev-tex/metapost-1.803
32 >=sys-apps/texinfo-4.11
37 RDEPEND=">=app-text/ghostscript-gpl-8.15
38 >=dev-scheme/guile-1.8.2:12=[deprecated,regex]
42 >=x11-libs/pango-1.12.3
43 emacs? ( >=app-editors/emacs-23.1:* )
44 guile2? ( >=dev-scheme/guile-2:12 )
46 >=dev-scheme/guile-1.8.2:12=[deprecated,regex]
47 <dev-scheme/guile-2.0:12
54 media-gfx/fontforge[png]
57 # Correct output data for tests isn't bundled with releases
61 "${FILESDIR}"/${P}-fix-font-size.patch
64 DOCS=( DEDICATION HACKING README.txt ROADMAP )
67 # make sure >=metapost-1.803 is selected if it's installed, bug 498704
68 if [[ ${MERGE_TYPE} != binary ]] && has_version ">=dev-tex/metapost-1.803" ; then
69 if [[ $(readlink "${EROOT}"/usr/bin/mpost) =~ mpost-texlive-* ]] ; then
70 einfo "Updating metapost symlink"
71 eselect mpost update || die
75 python-single-r1_pkg_setup
81 if ! use vim-syntax ; then
82 sed -i 's/vim//' GNUmakefile.in || die
86 sed -i 's/OPTIMIZE -g/OPTIMIZE/' aclocal.m4 || die
88 # remove bundled texinfo file (fixes bug #448560)
89 rm tex/texinfo.tex || die
93 xdg_environment_reset #586592
97 # documentation generation currently not supported since it requires a newer
98 # version of texi2html than is currently in the tree
101 --with-texgyre-dir=/usr/share/fonts/tex-gyre
102 --disable-documentation
105 $(use_enable debug debugging)
106 $(use_enable profile profiling)
109 econf "${myeconfargs[@]}"
116 elisp-compile elisp/lilypond-{font-lock,indent,mode,what-beat}.el \
117 || die "elisp-compile failed"
122 emake DESTDIR="${D}" vimdir=/usr/share/vim/vimfiles install
124 # remove elisp files since they are in the wrong directory
125 rm -r "${ED}"/usr/share/emacs || die
128 elisp-install ${PN} elisp/*.{el,elc} elisp/out/*.el \
129 || die "elisp-install failed"
130 elisp-site-file-install "${FILESDIR}"/50${PN}-gentoo.el
133 python_fix_shebang "${ED}"
139 use emacs && elisp-site-regen
143 use emacs && elisp-site-regen