1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools flag-o-matic toolchain-funcs elisp-common
8 DESCRIPTION="Symbolic Manipulation System"
9 HOMEPAGE="https://www.nikhef.nl/~form/ https://github.com/vermaseren/form/"
10 SRC_URI="https://github.com/vermaseren/${PN}/releases/download/v${PV}/${P}.tar.gz
11 emacs? ( https://dev.gentoo.org/~grozin/form-mode.el.gz )"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="devref doc doxygen emacs gmp mpi threads zlib"
19 gmp? ( dev-libs/gmp:0= )
21 zlib? ( sys-libs/zlib )"
23 devref? ( dev-texlive/texlive-latexrecommended )
24 doc? ( dev-texlive/texlive-latexrecommended )
25 doxygen? ( app-text/doxygen )
26 emacs? ( app-editors/emacs:* )"
28 SITEFILE="64${PN}-gentoo.el"
32 sed -i 's/LINKFLAGS = -s/LINKFLAGS =/' sources/Makefile.am || die
37 # Workaround for GCC -fchecking ICE, bug #904339
38 append-cxxflags $(test-flags-CXX -Wno-uninitialized)
44 --disable-static-link \
47 $(use_enable mpi parform ) \
48 $(use_enable threads threaded ) \
53 LDFLAGS="${LDFLAGS}" \
54 CXXFLAGS="${CXXFLAGS}"
60 pushd doc/devref > /dev/null || die "doc/devref does not exist"
61 LANG=C VARTEXFONTS="${T}/fonts" emake pdf
65 pushd doc/manual > /dev/null || die "doc/manual does not exist"
66 LANG=C VARTEXFONTS="${T}/fonts" emake pdf
70 pushd doc/doxygen > /dev/null || die "doc/doxygen does not exist"
79 dodoc doc/devref/devref.pdf
82 dodoc doc/manual/manual.pdf
86 dodoc -r doc/doxygen/html/.
89 elisp-install ${PN} "${WORKDIR}"/*.el
90 elisp-site-file-install "${FILESDIR}/${SITEFILE}"
95 use emacs && elisp-site-regen
99 use emacs && elisp-site-regen