dev-python/pytest: arm64 stable (bug #723996)
[gentoo.git] / dev-tex / metapost / metapost-1.902.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit flag-o-matic toolchain-funcs
7
8 DESCRIPTION="System for producing graphics"
9 HOMEPAGE="http://tug.org/metapost.html"
10 SRC_URI="https://foundry.supelec.fr/frs/download.php/file/15766/${P}-src.tar.bz2"
11
12 LICENSE="GPL-2 LGPL-3"
13 SLOT="0"
14 KEYWORDS="~amd64"
15 IUSE=""
16
17 RDEPEND=">=dev-libs/kpathsea-6.1.0_p20120701
18         >=app-eselect/eselect-mpost-0.3
19         >=x11-libs/cairo-1.12
20         >x11-libs/pixman-0.18
21         media-libs/libpng:0="
22 DEPEND="${RDEPEND}
23         virtual/pkgconfig"
24
25 S=${WORKDIR}/${P}/source/texk/web2c
26
27 src_configure() {
28         has_version '>=dev-libs/kpathsea-6.2.1' && append-cppflags "$($(tc-getPKG_CONFIG) --cflags kpathsea)"
29         econf \
30                 --disable-all-pkgs \
31                 --enable-shared    \
32                 --disable-largefile \
33                 --disable-ptex \
34                 --enable-mp  \
35                 --with-system-cairo \
36                 --with-system-libpng \
37                 --without-ptexenc \
38                 --with-system-kpathsea \
39                 --with-system-xpdf \
40                 --with-system-freetype \
41                 --with-system-freetype2 \
42                 --with-system-gd \
43                 --with-system-teckit \
44                 --with-system-t1lib \
45                 --with-system-icu \
46                 --with-system-graphite \
47                 --with-system-zziplib \
48                 --with-system-poppler \
49                 --with-system-zlib \
50                 --with-system-pixman \
51                 --disable-native-texlive-build \
52                 --without-mf-x-toolkit --without-x
53 }
54
55 src_compile() {
56         emake mpost
57 }
58
59 src_install() {
60         emake DESTDIR="${D}" \
61                 SUBDIRS="" \
62                 bin_PROGRAMS="mpost" \
63                 nodist_man_MANS="" \
64                 dist_man_MANS="" \
65                 install-binPROGRAMS
66         # Rename it
67         mv "${D}/usr/bin/mpost" "${D}/usr/bin/mpost-${P}" || die "renaming failed"
68
69         cd "${WORKDIR}/${P}"
70         dodoc README CHANGES
71 }
72
73 pkg_postinst() {
74         einfo "Calling eselect mpost update"
75         eselect mpost update
76 }