media-gfx/fontforge: remove old blocker
[gentoo.git] / media-gfx / fontforge / fontforge-20170731-r5.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python3_6 )
7
8 inherit gnome2-utils python-single-r1 xdg-utils
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-dist-${PV}.tar.xz"
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         python? ( ${PYTHON_REQUIRED_USE} )
24         test? ( png python )
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+:2= )
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         sys-devel/gettext
53         virtual/pkgconfig
54         X? ( x11-base/xorg-proto )
55 "
56
57 # Needs keywording on many arches.
58 #       zeromq? (
59 #               >=net-libs/czmq-2.2.0:0=
60 #               >=net-libs/zeromq-4.0.4:0=
61 #       )
62
63 S="${WORKDIR}/fontforge-2.0.${PV}"
64
65 PATCHES=(
66         "${FILESDIR}"/20170731-startnoui-FindOrMakeEncoding.patch
67         "${FILESDIR}"/20170731-tilepath.patch
68         "${FILESDIR}"/20170731-gethex-unaligned.patch
69         "${FILESDIR}"/20170731-PyMem_Free.patch
70         "${FILESDIR}"/CVE-2020-5395.patch
71 )
72
73 pkg_setup() {
74         use python && python-single-r1_pkg_setup
75 }
76
77 src_configure() {
78         local myeconfargs=(
79                 --disable-static
80                 $(use_enable truetype-debugger freetype-debugger "${EPREFIX}/usr/include/freetype2/internal4fontforge")
81                 $(use_enable gtk gtk2-use)
82                 $(use_enable python python-extension)
83                 $(use_enable python python-scripting)
84                 --enable-tile-path
85                 --enable-gb12345
86                 $(use_with cairo)
87                 $(use_with gif giflib)
88                 $(use_with jpeg libjpeg)
89                 $(use_with png libpng)
90                 $(use_with readline libreadline)
91                 --without-libspiro
92                 $(use_with tiff libtiff)
93                 $(use_with unicode libuninameslist)
94                 #$(use_with zeromq libzmq)
95                 --without-libzmq
96                 $(use_with X x)
97         )
98         econf "${myeconfargs[@]}"
99 }
100
101 src_compile() {
102         # Build system deps are broken
103         emake -C plugins
104         emake
105 }
106
107 src_install() {
108         default
109         find "${D}" -name '*.la' -delete || die
110 }
111
112 pkg_postrm() {
113         gnome2_icon_cache_update
114         xdg_desktop_database_update
115         xdg_mimeinfo_database_update
116 }
117
118 pkg_postinst() {
119         gnome2_icon_cache_update
120         xdg_desktop_database_update
121         xdg_mimeinfo_database_update
122 }