1 # Copyright 2004-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{6,7} )
8 inherit python-single-r1 xdg
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"
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"
19 RESTRICT="!test? ( test )"
24 python? ( ${PYTHON_REQUIRED_USE} )
31 >=media-libs/freetype-2.3.7:2=
33 >=x11-libs/cairo-1.6:0=
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= )
48 >=x11-libs/pango-1.10:0=[X]
52 X? ( x11-base/xorg-proto )
59 # Needs keywording on many arches.
61 # >=net-libs/czmq-2.2.0:0=
62 # >=net-libs/zeromq-4.0.4:0=
66 "${FILESDIR}"/20170731-gethex-unaligned.patch
67 "${FILESDIR}"/CVE-2020-5395.patch
71 use python && python-single-r1_pkg_setup
77 $(use_enable truetype-debugger freetype-debugger "${EPREFIX}/usr/include/freetype2/internal4fontforge")
78 $(use_enable python python-extension)
79 $(use_enable python python-scripting)
82 $(use_with gif giflib)
83 $(use_with jpeg libjpeg)
84 $(use_with png libpng)
85 $(use_with readline libreadline)
87 $(use_with tiff libtiff)
88 $(use_with unicode libuninameslist)
92 # broken AC_ARG_ENABLE usage
93 # https://bugs.gentoo.org/681550
94 myeconfargs+=( --enable-gdk=gdk3 )
96 econf "${myeconfargs[@]}"
100 emake DESTDIR="${D}" install
101 docompress -x /usr/share/doc/${PF}/html
103 find "${ED}" -name '*.la' -type f -delete || die