1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_6 )
8 inherit gnome2-utils python-single-r1 xdg-utils
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-dist-${PV}.tar.xz"
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 )"
23 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+:2= )
42 python? ( ${PYTHON_DEPS} )
43 readline? ( sys-libs/readline:0= )
44 unicode? ( media-libs/libuninameslist:0= )
48 >=x11-libs/pango-1.10:0=[X]
55 X? ( x11-base/xorg-proto )
58 # Needs keywording on many arches.
60 # >=net-libs/czmq-2.2.0:0=
61 # >=net-libs/zeromq-4.0.4:0=
64 S="${WORKDIR}/fontforge-2.0.${PV}"
67 "${FILESDIR}"/20170731-startnoui-FindOrMakeEncoding.patch
68 "${FILESDIR}"/20170731-tilepath.patch
69 "${FILESDIR}"/20170731-gethex-unaligned.patch
70 "${FILESDIR}"/20170731-PyMem_Free.patch
71 "${FILESDIR}"/CVE-2020-5395.patch
75 use python && python-single-r1_pkg_setup
81 $(use_enable truetype-debugger freetype-debugger "${EPREFIX}/usr/include/freetype2/internal4fontforge")
82 $(use_enable gtk gtk2-use)
83 $(use_enable python python-extension)
84 $(use_enable python python-scripting)
88 $(use_with gif giflib)
89 $(use_with jpeg libjpeg)
90 $(use_with png libpng)
91 $(use_with readline libreadline)
93 $(use_with tiff libtiff)
94 $(use_with unicode libuninameslist)
95 #$(use_with zeromq libzmq)
99 econf "${myeconfargs[@]}"
103 # Build system deps are broken
110 find "${D}" -name '*.la' -delete || die
114 gnome2_icon_cache_update
115 xdg_desktop_database_update
116 xdg_mimeinfo_database_update
120 gnome2_icon_cache_update
121 xdg_desktop_database_update
122 xdg_mimeinfo_database_update