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 ~sh ~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} )
32 >=media-libs/freetype-2.3.7:2=
34 >=x11-libs/cairo-1.6:0=
37 gif? ( media-libs/giflib:0= )
38 jpeg? ( virtual/jpeg:0 )
39 png? ( media-libs/libpng:0= )
40 tiff? ( media-libs/tiff:0= )
41 truetype-debugger? ( >=media-libs/freetype-2.3.8:2[fontforge,-bindist(-)] )
42 gtk? ( >=x11-libs/gtk+-3.10:3 )
43 python? ( ${PYTHON_DEPS} )
44 readline? ( sys-libs/readline:0= )
45 unicode? ( media-libs/libuninameslist:0= )
49 >=x11-libs/pango-1.10:0=[X]
54 X? ( x11-base/xorg-proto )
61 # Needs keywording on many arches.
63 # >=net-libs/czmq-2.2.0:0=
64 # >=net-libs/zeromq-4.0.4:0=
68 "${FILESDIR}"/20170731-gethex-unaligned.patch
69 "${FILESDIR}"/20190317-gdk_init.patch
70 "${FILESDIR}"/CVE-2020-5395.patch
74 use python && python-single-r1_pkg_setup
80 $(use_enable truetype-debugger freetype-debugger "${EPREFIX}/usr/include/freetype2/internal4fontforge")
81 $(use_enable python python-extension)
82 $(use_enable python python-scripting)
86 $(use_with gif giflib)
87 $(use_with jpeg libjpeg)
88 $(use_with png libpng)
89 $(use_with readline libreadline)
91 $(use_with tiff libtiff)
92 $(use_with unicode libuninameslist)
93 #$(use_with zeromq libzmq)
98 # broken AC_ARG_ENABLE usage
99 # https://bugs.gentoo.org/681550
100 myeconfargs+=( --enable-gdk=gdk3 )
102 econf "${myeconfargs[@]}"
106 # Build system deps are broken
107 emake -C plugins HTDOCS_SUBDIR=/html
108 emake HTDOCS_SUBDIR=/html
112 emake DESTDIR="${D}" HTDOCS_SUBDIR=/html install
113 docompress -x /usr/share/doc/${PF}/html
115 find "${ED}" -name '*.la' -type f -delete || die