media-gfx/fontforge: arm64 stable (bug #712156)
[gentoo.git] / media-gfx / fontforge / fontforge-20190801.ebuild
1 # Copyright 2004-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python3_{6,7} )
7
8 inherit python-single-r1 xdg
9
10 DESCRIPTION="postscript font editor and converter"
11 HOMEPAGE="http://fontforge.github.io/"
12 SRC_URI="https://github.com/fontforge/fontforge/releases/download/${PV}/fontforge-${PV}.tar.gz"
13
14 LICENSE="BSD GPL-3+"
15 SLOT="0"
16 KEYWORDS="~alpha amd64 arm arm64 ~hppa ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
17 IUSE="cairo truetype-debugger gif gtk jpeg png +python readline test tiff svg unicode X"
18
19 RESTRICT="!test? ( test )"
20
21 REQUIRED_USE="
22         cairo? ( png )
23         gtk? ( cairo )
24         python? ( ${PYTHON_REQUIRED_USE} )
25 "
26
27 RDEPEND="
28         dev-libs/glib
29         dev-libs/libltdl:0
30         dev-libs/libxml2:2=
31         >=media-libs/freetype-2.3.7:2=
32         cairo? (
33                 >=x11-libs/cairo-1.6:0=
34                 x11-libs/pango:0=
35         )
36         gif? ( media-libs/giflib:0= )
37         jpeg? ( virtual/jpeg:0 )
38         png? ( media-libs/libpng:0= )
39         tiff? ( media-libs/tiff:0= )
40         truetype-debugger? ( >=media-libs/freetype-2.3.8:2[fontforge,-bindist(-)] )
41         gtk? ( >=x11-libs/gtk+-3.10:3 )
42         python? ( ${PYTHON_DEPS} )
43         readline? ( sys-libs/readline:0= )
44         unicode? ( media-libs/libuninameslist:0= )
45         X? (
46                 x11-libs/libX11:0=
47                 x11-libs/libXi:0=
48                 >=x11-libs/pango-1.10:0=[X]
49         )
50 "
51 DEPEND="${RDEPEND}
52         X? ( x11-base/xorg-proto )
53 "
54 BDEPEND="
55         sys-devel/gettext
56         virtual/pkgconfig
57 "
58
59 # Needs keywording on many arches.
60 #       zeromq? (
61 #               >=net-libs/czmq-2.2.0:0=
62 #               >=net-libs/zeromq-4.0.4:0=
63 #       )
64
65 PATCHES=(
66         "${FILESDIR}"/20170731-gethex-unaligned.patch
67         "${FILESDIR}"/CVE-2020-5395.patch
68 )
69
70 pkg_setup() {
71         use python && python-single-r1_pkg_setup
72 }
73
74 src_configure() {
75         local myeconfargs=(
76                 --disable-static
77                 $(use_enable truetype-debugger freetype-debugger "${EPREFIX}/usr/include/freetype2/internal4fontforge")
78                 $(use_enable python python-extension)
79                 $(use_enable python python-scripting)
80                 --enable-tile-path
81                 $(use_with cairo)
82                 $(use_with gif giflib)
83                 $(use_with jpeg libjpeg)
84                 $(use_with png libpng)
85                 $(use_with readline libreadline)
86                 --without-libspiro
87                 $(use_with tiff libtiff)
88                 $(use_with unicode libuninameslist)
89                 $(use_with X x)
90         )
91         if use gtk; then
92                 # broken AC_ARG_ENABLE usage
93                 # https://bugs.gentoo.org/681550
94                 myeconfargs+=( --enable-gdk=gdk3 )
95         fi
96         econf "${myeconfargs[@]}"
97 }
98
99 src_install() {
100         emake DESTDIR="${D}" install
101         docompress -x /usr/share/doc/${PF}/html
102         einstalldocs
103         find "${ED}" -name '*.la' -type f -delete || die
104 }