From 915720ab664d4b51e54009945b179578618f5e83 Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Mon, 27 Jan 2020 17:01:48 -0500 Subject: media-gfx/fontforge: backport fix for CVE-2020-5395 Bug: https://bugs.gentoo.org/706778 Package-Manager: Portage-2.3.85_p2, Repoman-2.3.20_p36 Signed-off-by: Mike Gilbert --- media-gfx/fontforge/fontforge-20170731-r4.ebuild | 122 ---------------------- media-gfx/fontforge/fontforge-20170731-r5.ebuild | 123 +++++++++++++++++++++++ media-gfx/fontforge/fontforge-20190317-r2.ebuild | 115 --------------------- media-gfx/fontforge/fontforge-20190317-r3.ebuild | 116 +++++++++++++++++++++ 4 files changed, 239 insertions(+), 237 deletions(-) delete mode 100644 media-gfx/fontforge/fontforge-20170731-r4.ebuild create mode 100644 media-gfx/fontforge/fontforge-20170731-r5.ebuild delete mode 100644 media-gfx/fontforge/fontforge-20190317-r2.ebuild create mode 100644 media-gfx/fontforge/fontforge-20190317-r3.ebuild (limited to 'media-gfx') diff --git a/media-gfx/fontforge/fontforge-20170731-r4.ebuild b/media-gfx/fontforge/fontforge-20170731-r4.ebuild deleted file mode 100644 index dd429eab9730..000000000000 --- a/media-gfx/fontforge/fontforge-20170731-r4.ebuild +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python{2_7,3_6} ) - -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 ~mips ppc ppc64 s390 ~sh sparc x86 ~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/glib - 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-base/xorg-proto ) -" - -# 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 - "${FILESDIR}"/20170731-tilepath.patch - "${FILESDIR}"/20170731-gethex-unaligned.patch - "${FILESDIR}"/20170731-PyMem_Free.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-r5.ebuild b/media-gfx/fontforge/fontforge-20170731-r5.ebuild new file mode 100644 index 000000000000..04d71dc2cee5 --- /dev/null +++ b/media-gfx/fontforge/fontforge-20170731-r5.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{2_7,3_6} ) + +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 ~mips ppc ppc64 s390 ~sh sparc x86 ~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/glib + 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-base/xorg-proto ) +" + +# 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 + "${FILESDIR}"/20170731-tilepath.patch + "${FILESDIR}"/20170731-gethex-unaligned.patch + "${FILESDIR}"/20170731-PyMem_Free.patch + "${FILESDIR}"/CVE-2020-5395.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-20190317-r2.ebuild b/media-gfx/fontforge/fontforge-20190317-r2.ebuild deleted file mode 100644 index 210cb2b03cc9..000000000000 --- a/media-gfx/fontforge/fontforge-20190317-r2.ebuild +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2004-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python{2_7,3_{6,7}} ) - -inherit python-single-r1 xdg - -DESCRIPTION="postscript font editor and converter" -HOMEPAGE="http://fontforge.github.io/" -SRC_URI="https://github.com/fontforge/fontforge/releases/download/${PV}/fontforge-${PV}.tar.gz" - -LICENSE="BSD GPL-3+" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~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 ) - gtk? ( cairo ) - python? ( ${PYTHON_REQUIRED_USE} ) - test? ( png python ) -" - -RDEPEND=" - dev-libs/glib - 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+-3.10:3 ) - 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} - X? ( x11-base/xorg-proto ) -" -BDEPEND=" - sys-devel/gettext - virtual/pkgconfig -" - -# Needs keywording on many arches. -# zeromq? ( -# >=net-libs/czmq-2.2.0:0= -# >=net-libs/zeromq-4.0.4:0= -# ) - -PATCHES=( - "${FILESDIR}"/20170731-gethex-unaligned.patch - "${FILESDIR}"/20190317-gdk_init.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 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) - ) - if use gtk; then - # broken AC_ARG_ENABLE usage - # https://bugs.gentoo.org/681550 - myeconfargs+=( --enable-gdk=gdk3 ) - fi - econf "${myeconfargs[@]}" -} - -src_compile() { - # Build system deps are broken - emake -C plugins HTDOCS_SUBDIR=/html - emake HTDOCS_SUBDIR=/html -} - -src_install() { - emake DESTDIR="${D}" HTDOCS_SUBDIR=/html install - docompress -x /usr/share/doc/${PF}/html - einstalldocs - find "${ED}" -name '*.la' -type f -delete || die -} diff --git a/media-gfx/fontforge/fontforge-20190317-r3.ebuild b/media-gfx/fontforge/fontforge-20190317-r3.ebuild new file mode 100644 index 000000000000..28c16aebe855 --- /dev/null +++ b/media-gfx/fontforge/fontforge-20190317-r3.ebuild @@ -0,0 +1,116 @@ +# Copyright 2004-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python{2_7,3_{6,7}} ) + +inherit python-single-r1 xdg + +DESCRIPTION="postscript font editor and converter" +HOMEPAGE="http://fontforge.github.io/" +SRC_URI="https://github.com/fontforge/fontforge/releases/download/${PV}/fontforge-${PV}.tar.gz" + +LICENSE="BSD GPL-3+" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~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 ) + gtk? ( cairo ) + python? ( ${PYTHON_REQUIRED_USE} ) + test? ( png python ) +" + +RDEPEND=" + dev-libs/glib + 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+-3.10:3 ) + 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} + X? ( x11-base/xorg-proto ) +" +BDEPEND=" + sys-devel/gettext + virtual/pkgconfig +" + +# Needs keywording on many arches. +# zeromq? ( +# >=net-libs/czmq-2.2.0:0= +# >=net-libs/zeromq-4.0.4:0= +# ) + +PATCHES=( + "${FILESDIR}"/20170731-gethex-unaligned.patch + "${FILESDIR}"/20190317-gdk_init.patch + "${FILESDIR}"/CVE-2020-5395.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 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) + ) + if use gtk; then + # broken AC_ARG_ENABLE usage + # https://bugs.gentoo.org/681550 + myeconfargs+=( --enable-gdk=gdk3 ) + fi + econf "${myeconfargs[@]}" +} + +src_compile() { + # Build system deps are broken + emake -C plugins HTDOCS_SUBDIR=/html + emake HTDOCS_SUBDIR=/html +} + +src_install() { + emake DESTDIR="${D}" HTDOCS_SUBDIR=/html install + docompress -x /usr/share/doc/${PF}/html + einstalldocs + find "${ED}" -name '*.la' -type f -delete || die +} -- cgit v1.2.3-65-gdbad