summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conrad@kostecki.com>2018-05-07 00:02:27 +0200
committerLars Wendler <polynomial-c@gentoo.org>2018-05-07 10:59:22 +0200
commit9bcf16eb235ace63a47241be530166747ce5f3a3 (patch)
treed4f1058a2e19585dea85624d94a00b7841146d39 /media-libs/libwmf
parentnet-misc/networkmanager-fortisslvpn: remove old (diff)
downloadgentoo-9bcf16eb235ace63a47241be530166747ce5f3a3.tar.gz
gentoo-9bcf16eb235ace63a47241be530166747ce5f3a3.tar.bz2
gentoo-9bcf16eb235ace63a47241be530166747ce5f3a3.zip
media-libs/libwmf: Use pkg-config to find freetype
Closes: https://bugs.gentoo.org/649462 Closes: https://bugs.gentoo.org/654984 Package-Manager: Portage-2.3.36, Repoman-2.3.9 Closes: https://github.com/gentoo/gentoo/pull/8292
Diffstat (limited to 'media-libs/libwmf')
-rw-r--r--media-libs/libwmf/files/libwmf-0.2.8.4-use-freetype2-pkg-config.patch67
-rw-r--r--media-libs/libwmf/libwmf-0.2.8.4-r7.ebuild97
-rw-r--r--media-libs/libwmf/metadata.xml9
3 files changed, 169 insertions, 4 deletions
diff --git a/media-libs/libwmf/files/libwmf-0.2.8.4-use-freetype2-pkg-config.patch b/media-libs/libwmf/files/libwmf-0.2.8.4-use-freetype2-pkg-config.patch
new file mode 100644
index 000000000000..0f133e2e75e2
--- /dev/null
+++ b/media-libs/libwmf/files/libwmf-0.2.8.4-use-freetype2-pkg-config.patch
@@ -0,0 +1,67 @@
+From 61655f82224cadb261e81f8bae111eaaa7bdf531 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Wed, 6 Aug 2014 14:53:03 +0200
+Subject: [PATCH] configure: use pkg-config for freetype
+
+Upstream-status: Pending
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ configure.ac | 37 ++++++++-----------------------------
+ 1 file changed, 8 insertions(+), 29 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3cfe974..0055a8c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -399,40 +399,19 @@ AC_ARG_WITH(freetype,[ --with-freetype=DIR use freetype2 in DIR],[
+ fi
+ ])
+
+-if [ test -n "$FREETYPE_DIR" ]; then
+- AC_PATH_PROG(FREETYPE_CONFIG,freetype-config, ,[$FREETYPE_DIR/bin:$PATH])
+-else
+- AC_PATH_PROG(FREETYPE_CONFIG,freetype-config)
+-fi
+-
+-if [ test -n "$FREETYPE_CONFIG" ]; then
+- if [ test -n "$FREETYPE_DIR" ]; then
+- freetype_cflags="`$FREETYPE_CONFIG --cflags` -I$FREETYPE_DIR/include"
+- freetype_libs=`$FREETYPE_CONFIG --libs`
+- else
+- freetype_cflags=`$FREETYPE_CONFIG --cflags`
+- freetype_libs=`$FREETYPE_CONFIG --libs`
+- fi
+-else
+- if [ test -n "$FREETYPE_DIR" ]; then
+- freetype_cflags="-I$FREETYPE_DIR/include/freetype2 -I$FREETYPE_DIR/include"
+- freetype_libs="-L$FREETYPE_DIR/lib -lfreetype"
+- else
+- freetype_cflags=""
+- freetype_libs="-lfreetype"
+- fi
+-fi
+-
+-CPPFLAGS="$freetype_cflags $CPPFLAGS"
+-LDFLAGS="$LDFLAGS $freetype_libs"
++PKG_CHECK_MODULES(FREETYPE2, freetype2,
++ CFLAGS="$CFLAGS $FREETYPE2_CFLAGS"
++ LDFLAGS="$LDFLAGS $FREETYPE2_LIBS",
++ AC_MSG_ERROR([*** Unable to find FreeType2 library (http://www.freetype.org/)])
++)
+
+ AC_CHECK_LIB(freetype,FT_Init_FreeType,[
+- WMF_FT_LDFLAGS="$freetype_libs"
++ WMF_FT_LDFLAGS="$FREETYPE2_LIBS"
+ ],[ AC_MSG_ERROR([* * * freetype(2) is required * * *])
+ ])
+ AC_CHECK_HEADER(ft2build.h,[
+- WMF_FT_CFLAGS="$freetype_cflags"
+- WMF_FT_CONFIG_CFLAGS="$freetype_cflags"
++ WMF_FT_CFLAGS="$FREETYPE2_CFLAGS"
++ WMF_FT_CONFIG_CFLAGS="$FREETYPE2_CFLAGS"
+ ],[ AC_MSG_ERROR([* * * freetype(2) is required * * *])
+ ])
+
+--
+1.9.0
+
diff --git a/media-libs/libwmf/libwmf-0.2.8.4-r7.ebuild b/media-libs/libwmf/libwmf-0.2.8.4-r7.ebuild
new file mode 100644
index 000000000000..48585c307475
--- /dev/null
+++ b/media-libs/libwmf/libwmf-0.2.8.4-r7.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools gnome2-utils
+
+DESCRIPTION="A library for reading vector images in Microsoft's Windows Metafile Format (WMF)"
+HOMEPAGE="https://wvware.sourceforge.net/"
+SRC_URI="mirror://sourceforge/wvware/${P}.tar.gz"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+LICENSE="LGPL-2"
+SLOT="0"
+IUSE="debug doc expat X"
+
+RDEPEND="app-text/ghostscript-gpl
+ media-fonts/urw-fonts
+ media-libs/freetype:2=
+ media-libs/libpng:0=
+ sys-libs/zlib:=
+ x11-libs/gdk-pixbuf:2[X?]
+ virtual/jpeg:0=
+ expat? ( dev-libs/expat )
+ !expat? ( dev-libs/libxml2:2= )
+ X? ( x11-libs/libX11
+ x11-libs/libXt
+ x11-libs/libXpm )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( "AUTHORS" "BUILDING" "ChangeLog" "CREDITS" "INSTALL" "NEWS" "README" "TODO" )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-build.patch
+ "${FILESDIR}"/${P}-CVE-2015-0848+CVE-2015-4588.patch
+ "${FILESDIR}"/${P}-CVE-2015-4695.patch
+ "${FILESDIR}"/${P}-CVE-2015-4696.patch
+ "${FILESDIR}"/${P}-gdk-pixbuf.patch
+ "${FILESDIR}"/${P}-intoverflow.patch
+ "${FILESDIR}"/${P}-libpng-1.5.patch
+ "${FILESDIR}"/${P}-pngfix.patch
+ "${FILESDIR}"/${P}-use-freetype2-pkg-config.patch
+ "${FILESDIR}"/${P}-use-system-fonts.patch
+ )
+
+src_prepare() {
+ default
+
+ # Fixes QA warning "This package has a configure.in file which has long been deprecated"
+ # Since there is already a configure.ac, we don't need the deprecated configure.in
+ rm configure.in || die
+
+ if ! use doc ; then
+ sed -i -e 's:doc::' Makefile.am || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ # Support for GD is disabled, since it's never linked, even, when enabled
+ # See https://bugs.gentoo.org/268161
+ local myeconfargs=(
+ --disable-gd
+ --disable-static
+ $(use_enable debug)
+ $(use_with expat)
+ $(use_with !expat libxml2)
+ $(use_with X x)
+ --with-docdir="${EPREFIX%/}"/usr/share/doc/${PF}
+ --with-fontdir="${EPREFIX%/}"/usr/share/fonts/urw-fonts
+ --with-freetype
+ --with-gsfontdir="${EPREFIX%/}"/usr/share/fonts/urw-fonts
+ --with-gsfontmap="${EPREFIX%/}"/usr/share/ghostscript/9.21/Resource/Init/Fontmap
+ --with-jpeg
+ --with-layers
+ --with-png
+ --with-sys-gd
+ --with-zlib
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+pkg_preinst() {
+ gnome2_gdk_pixbuf_savelist
+}
+
+pkg_postinst() {
+ gnome2_gdk_pixbuf_update
+}
+
+pkg_postrm() {
+ gnome2_gdk_pixbuf_update
+}
diff --git a/media-libs/libwmf/metadata.xml b/media-libs/libwmf/metadata.xml
index 12310dcd7d27..e40036b891d5 100644
--- a/media-libs/libwmf/metadata.xml
+++ b/media-libs/libwmf/metadata.xml
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
- <upstream>
- <remote-id type="sourceforge">wvware</remote-id>
- </upstream>
+ <!-- maintainer-needed -->
+ <upstream>
+ <bugs-to>https://sourceforge.net/p/wvware/bugs/</bugs-to>
+ <remote-id type="sourceforge">wvware</remote-id>
+ </upstream>
</pkgmetadata>