From 3f532db1541c8f454b1ecdfabf534785d7c6d91f Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Sat, 9 Dec 2017 11:56:46 -0500 Subject: media-gfx/fontforge: fix segfault with X disabled Closes: https://bugs.gentoo.org/638342 Package-Manager: Portage-2.3.15, Repoman-2.3.6_p7 --- media-gfx/fontforge/Manifest | 4 +- .../20170731-startnoui-FindOrMakeEncoding.patch | 22 ++++ media-gfx/fontforge/fontforge-20170731-r1.ebuild | 118 +++++++++++++++++++++ media-gfx/fontforge/fontforge-20170731.ebuild | 114 -------------------- 4 files changed, 142 insertions(+), 116 deletions(-) create mode 100644 media-gfx/fontforge/files/20170731-startnoui-FindOrMakeEncoding.patch create mode 100644 media-gfx/fontforge/fontforge-20170731-r1.ebuild delete mode 100644 media-gfx/fontforge/fontforge-20170731.ebuild (limited to 'media-gfx') diff --git a/media-gfx/fontforge/Manifest b/media-gfx/fontforge/Manifest index 49db4bd80482..67c9be75d680 100644 --- a/media-gfx/fontforge/Manifest +++ b/media-gfx/fontforge/Manifest @@ -1,2 +1,2 @@ -DIST fontforge-dist-20160404.tar.gz 20906256 SHA256 6c73a556030d985e166974e5d6025255290874c2d6bb349c9930b03f17b45bcd SHA512 be94f04881b12ed3b1a34d0d7cc9149321db17d51458f135b2683ea600401e4fa55647ced4b4e014555ba1c900a684b9d5d6f2e2812ce03c432d23ca72f5c363 WHIRLPOOL 2313c7775da7f7a47ef8bae3cbef897e8b0996c8f74db099562e0a3636984e8a9a55ca5f2ca11b205a7b1aff76e7fe4e7601f15b7951147353403da0e41d692f -DIST fontforge-dist-20170731.tar.xz 13985256 SHA256 840adefbedd1717e6b70b33ad1e7f2b116678fa6a3d52d45316793b9fd808822 SHA512 26f7a40714460716a24dd0229fdb027f3766bcc48db64b8993436ddcb6277898f9f3b67ad4fc0be515b2b38e01370d1c7d9ee3c6ece1be862b7d8c9882411f11 WHIRLPOOL 6d6e2b6322043bcd8822fb1e64a98b969ff1bba02d63442cf0646b737576ead76961a30cf146447afa0f72a2e9a30a05e6dad5f9060a00cd35e5cc2e15097889 +DIST fontforge-dist-20160404.tar.gz 20906256 BLAKE2B 11f9a54de2cada7e243349ec0ddeb3f2025f12a9e9323b2bea437009ccd5e34d27ba41752752434c16b1a0b809c9878c23cd074bb59b590b427c599d575f0c45 SHA512 be94f04881b12ed3b1a34d0d7cc9149321db17d51458f135b2683ea600401e4fa55647ced4b4e014555ba1c900a684b9d5d6f2e2812ce03c432d23ca72f5c363 +DIST fontforge-dist-20170731.tar.xz 13985256 BLAKE2B 7bc49a3b7747de419e4fafb445062873cf9bf56aa73fd7499509b787a1c0fd6c47b0b5d7bfeb2a69d9237f9f66f989af968b0d00e9d5e57030906394f042f29c SHA512 26f7a40714460716a24dd0229fdb027f3766bcc48db64b8993436ddcb6277898f9f3b67ad4fc0be515b2b38e01370d1c7d9ee3c6ece1be862b7d8c9882411f11 diff --git a/media-gfx/fontforge/files/20170731-startnoui-FindOrMakeEncoding.patch b/media-gfx/fontforge/files/20170731-startnoui-FindOrMakeEncoding.patch new file mode 100644 index 000000000000..30731b904f25 --- /dev/null +++ b/media-gfx/fontforge/files/20170731-startnoui-FindOrMakeEncoding.patch @@ -0,0 +1,22 @@ +From 72572a68d306712c040ca741f0655b190326a509 Mon Sep 17 00:00:00 2001 +From: Jeremy Tan +Date: Sat, 9 Sep 2017 08:03:57 +0800 +Subject: [PATCH] startnoui.c: Include header that defines FindOrMakeEncoding + +Failure to include this was causing an implicit pointer to int conversion +which results in an invalid pointer address on 64-bit builds. + +Fixes #3145. + +diff --git a/fontforgeexe/startnoui.c b/fontforgeexe/startnoui.c +index ab8388539..7a188b7a2 100644 +--- a/fontforgeexe/startnoui.c ++++ b/fontforgeexe/startnoui.c +@@ -27,6 +27,7 @@ + #include "fontforgevw.h" + #include "scripting.h" + #include "start.h" ++#include "encoding.h" + + #ifndef _NO_LIBUNICODENAMES + #include /* need to open a database when we start */ diff --git a/media-gfx/fontforge/fontforge-20170731-r1.ebuild b/media-gfx/fontforge/fontforge-20170731-r1.ebuild new file mode 100644 index 000000000000..7f92af08a57f --- /dev/null +++ b/media-gfx/fontforge/fontforge-20170731-r1.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{2_7,3_4,3_5} ) + +inherit gnome2-utils python-single-r1 xdg-utils + +DESCRIPTION="postscript font editor and converter" +HOMEPAGE="http://fontforge.github.io/" +SRC_URI="https://github.com/fontforge/fontforge/releases/download/${PV}/fontforge-dist-${PV}.tar.xz" + +LICENSE="BSD GPL-3+" +SLOT="0" +KEYWORDS="alpha amd64 ~arm ~arm64 hppa ia64 ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" +IUSE="cairo truetype-debugger gif gtk jpeg png +python readline test tiff svg unicode X" + +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + cairo? ( png ) + python? ( ${PYTHON_REQUIRED_USE} ) + test? ( png python ) +" + +RDEPEND=" + dev-libs/libltdl:0 + dev-libs/libxml2:2= + >=media-libs/freetype-2.3.7:2= + cairo? ( + >=x11-libs/cairo-1.6:0= + x11-libs/pango:0= + ) + gif? ( media-libs/giflib:0= ) + jpeg? ( virtual/jpeg:0 ) + png? ( media-libs/libpng:0= ) + tiff? ( media-libs/tiff:0= ) + truetype-debugger? ( >=media-libs/freetype-2.3.8:2[fontforge,-bindist(-)] ) + gtk? ( x11-libs/gtk+:2= ) + python? ( ${PYTHON_DEPS} ) + readline? ( sys-libs/readline:0= ) + unicode? ( media-libs/libuninameslist:0= ) + X? ( + x11-libs/libX11:0= + x11-libs/libXi:0= + >=x11-libs/pango-1.10:0=[X] + ) + !media-gfx/pfaedit +" +DEPEND="${RDEPEND} + sys-devel/gettext + virtual/pkgconfig + X? ( x11-proto/inputproto ) +" + +# Needs keywording on many arches. +# zeromq? ( +# >=net-libs/czmq-2.2.0:0= +# >=net-libs/zeromq-4.0.4:0= +# ) + +S="${WORKDIR}/fontforge-2.0.${PV}" + +PATCHES=( + "${FILESDIR}"/20170731-startnoui-FindOrMakeEncoding.patch +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_configure() { + local myeconfargs=( + --disable-static + $(use_enable truetype-debugger freetype-debugger "${EPREFIX}/usr/include/freetype2/internal4fontforge") + $(use_enable gtk gtk2-use) + $(use_enable python python-extension) + $(use_enable python python-scripting) + --enable-tile-path + --enable-gb12345 + $(use_with cairo) + $(use_with gif giflib) + $(use_with jpeg libjpeg) + $(use_with png libpng) + $(use_with readline libreadline) + --without-libspiro + $(use_with tiff libtiff) + $(use_with unicode libuninameslist) + #$(use_with zeromq libzmq) + --without-libzmq + $(use_with X x) + ) + econf "${myeconfargs[@]}" +} + +src_compile() { + # Build system deps are broken + emake -C plugins + emake +} + +src_install() { + default + find "${D}" -name '*.la' -delete || die +} + +pkg_postrm() { + gnome2_icon_cache_update + xdg_desktop_database_update + xdg_mimeinfo_database_update +} + +pkg_postinst() { + gnome2_icon_cache_update + xdg_desktop_database_update + xdg_mimeinfo_database_update +} diff --git a/media-gfx/fontforge/fontforge-20170731.ebuild b/media-gfx/fontforge/fontforge-20170731.ebuild deleted file mode 100644 index ae257f14831e..000000000000 --- a/media-gfx/fontforge/fontforge-20170731.ebuild +++ /dev/null @@ -1,114 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python{2_7,3_4,3_5} ) - -inherit gnome2-utils python-single-r1 xdg-utils - -DESCRIPTION="postscript font editor and converter" -HOMEPAGE="http://fontforge.github.io/" -SRC_URI="https://github.com/fontforge/fontforge/releases/download/${PV}/fontforge-dist-${PV}.tar.xz" - -LICENSE="BSD GPL-3+" -SLOT="0" -KEYWORDS="alpha amd64 ~arm ~arm64 hppa ia64 ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" -IUSE="cairo truetype-debugger gif gtk jpeg png +python readline test tiff svg unicode X" - -RESTRICT="!test? ( test )" - -REQUIRED_USE=" - cairo? ( png ) - python? ( ${PYTHON_REQUIRED_USE} ) - test? ( png python ) -" - -RDEPEND=" - dev-libs/libltdl:0 - dev-libs/libxml2:2= - >=media-libs/freetype-2.3.7:2= - cairo? ( - >=x11-libs/cairo-1.6:0= - x11-libs/pango:0= - ) - gif? ( media-libs/giflib:0= ) - jpeg? ( virtual/jpeg:0 ) - png? ( media-libs/libpng:0= ) - tiff? ( media-libs/tiff:0= ) - truetype-debugger? ( >=media-libs/freetype-2.3.8:2[fontforge,-bindist(-)] ) - gtk? ( x11-libs/gtk+:2= ) - python? ( ${PYTHON_DEPS} ) - readline? ( sys-libs/readline:0= ) - unicode? ( media-libs/libuninameslist:0= ) - X? ( - x11-libs/libX11:0= - x11-libs/libXi:0= - >=x11-libs/pango-1.10:0=[X] - ) - !media-gfx/pfaedit -" -DEPEND="${RDEPEND} - sys-devel/gettext - virtual/pkgconfig - X? ( x11-proto/inputproto ) -" - -# Needs keywording on many arches. -# zeromq? ( -# >=net-libs/czmq-2.2.0:0= -# >=net-libs/zeromq-4.0.4:0= -# ) - -S="${WORKDIR}/fontforge-2.0.${PV}" - -pkg_setup() { - use python && python-single-r1_pkg_setup -} - -src_configure() { - local myeconfargs=( - --disable-static - $(use_enable truetype-debugger freetype-debugger "${EPREFIX}/usr/include/freetype2/internal4fontforge") - $(use_enable gtk gtk2-use) - $(use_enable python python-extension) - $(use_enable python python-scripting) - --enable-tile-path - --enable-gb12345 - $(use_with cairo) - $(use_with gif giflib) - $(use_with jpeg libjpeg) - $(use_with png libpng) - $(use_with readline libreadline) - --without-libspiro - $(use_with tiff libtiff) - $(use_with unicode libuninameslist) - #$(use_with zeromq libzmq) - --without-libzmq - $(use_with X x) - ) - econf "${myeconfargs[@]}" -} - -src_compile() { - # Build system deps are broken - emake -C plugins - emake -} - -src_install() { - default - find "${D}" -name '*.la' -delete || die -} - -pkg_postrm() { - gnome2_icon_cache_update - xdg_desktop_database_update - xdg_mimeinfo_database_update -} - -pkg_postinst() { - gnome2_icon_cache_update - xdg_desktop_database_update - xdg_mimeinfo_database_update -} -- cgit v1.2.3-65-gdbad