Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libwmf/, media-libs/libwmf/files/
Date: Mon, 07 May 2018 08:59:37
Message-Id: 1525683562.9bcf16eb235ace63a47241be530166747ce5f3a3.polynomial-c@gentoo
1 commit: 9bcf16eb235ace63a47241be530166747ce5f3a3
2 Author: Conrad Kostecki <conrad <AT> kostecki <DOT> com>
3 AuthorDate: Sun May 6 22:02:27 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon May 7 08:59:22 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bcf16eb
7
8 media-libs/libwmf: Use pkg-config to find freetype
9
10 Closes: https://bugs.gentoo.org/649462
11 Closes: https://bugs.gentoo.org/654984
12 Package-Manager: Portage-2.3.36, Repoman-2.3.9
13 Closes: https://github.com/gentoo/gentoo/pull/8292
14
15 .../libwmf-0.2.8.4-use-freetype2-pkg-config.patch | 67 +++++++++++++++
16 media-libs/libwmf/libwmf-0.2.8.4-r7.ebuild | 97 ++++++++++++++++++++++
17 media-libs/libwmf/metadata.xml | 9 +-
18 3 files changed, 169 insertions(+), 4 deletions(-)
19
20 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
21 new file mode 100644
22 index 00000000000..0f133e2e75e
23 --- /dev/null
24 +++ b/media-libs/libwmf/files/libwmf-0.2.8.4-use-freetype2-pkg-config.patch
25 @@ -0,0 +1,67 @@
26 +From 61655f82224cadb261e81f8bae111eaaa7bdf531 Mon Sep 17 00:00:00 2001
27 +From: Koen Kooi <koen@×××××××××××××××××.net>
28 +Date: Wed, 6 Aug 2014 14:53:03 +0200
29 +Subject: [PATCH] configure: use pkg-config for freetype
30 +
31 +Upstream-status: Pending
32 +Signed-off-by: Koen Kooi <koen@×××××××××××××××××.net>
33 +---
34 + configure.ac | 37 ++++++++-----------------------------
35 + 1 file changed, 8 insertions(+), 29 deletions(-)
36 +
37 +diff --git a/configure.ac b/configure.ac
38 +index 3cfe974..0055a8c 100644
39 +--- a/configure.ac
40 ++++ b/configure.ac
41 +@@ -399,40 +399,19 @@ AC_ARG_WITH(freetype,[ --with-freetype=DIR use freetype2 in DIR],[
42 + fi
43 + ])
44 +
45 +-if [ test -n "$FREETYPE_DIR" ]; then
46 +- AC_PATH_PROG(FREETYPE_CONFIG,freetype-config, ,[$FREETYPE_DIR/bin:$PATH])
47 +-else
48 +- AC_PATH_PROG(FREETYPE_CONFIG,freetype-config)
49 +-fi
50 +-
51 +-if [ test -n "$FREETYPE_CONFIG" ]; then
52 +- if [ test -n "$FREETYPE_DIR" ]; then
53 +- freetype_cflags="`$FREETYPE_CONFIG --cflags` -I$FREETYPE_DIR/include"
54 +- freetype_libs=`$FREETYPE_CONFIG --libs`
55 +- else
56 +- freetype_cflags=`$FREETYPE_CONFIG --cflags`
57 +- freetype_libs=`$FREETYPE_CONFIG --libs`
58 +- fi
59 +-else
60 +- if [ test -n "$FREETYPE_DIR" ]; then
61 +- freetype_cflags="-I$FREETYPE_DIR/include/freetype2 -I$FREETYPE_DIR/include"
62 +- freetype_libs="-L$FREETYPE_DIR/lib -lfreetype"
63 +- else
64 +- freetype_cflags=""
65 +- freetype_libs="-lfreetype"
66 +- fi
67 +-fi
68 +-
69 +-CPPFLAGS="$freetype_cflags $CPPFLAGS"
70 +-LDFLAGS="$LDFLAGS $freetype_libs"
71 ++PKG_CHECK_MODULES(FREETYPE2, freetype2,
72 ++ CFLAGS="$CFLAGS $FREETYPE2_CFLAGS"
73 ++ LDFLAGS="$LDFLAGS $FREETYPE2_LIBS",
74 ++ AC_MSG_ERROR([*** Unable to find FreeType2 library (http://www.freetype.org/)])
75 ++)
76 +
77 + AC_CHECK_LIB(freetype,FT_Init_FreeType,[
78 +- WMF_FT_LDFLAGS="$freetype_libs"
79 ++ WMF_FT_LDFLAGS="$FREETYPE2_LIBS"
80 + ],[ AC_MSG_ERROR([* * * freetype(2) is required * * *])
81 + ])
82 + AC_CHECK_HEADER(ft2build.h,[
83 +- WMF_FT_CFLAGS="$freetype_cflags"
84 +- WMF_FT_CONFIG_CFLAGS="$freetype_cflags"
85 ++ WMF_FT_CFLAGS="$FREETYPE2_CFLAGS"
86 ++ WMF_FT_CONFIG_CFLAGS="$FREETYPE2_CFLAGS"
87 + ],[ AC_MSG_ERROR([* * * freetype(2) is required * * *])
88 + ])
89 +
90 +--
91 +1.9.0
92 +
93
94 diff --git a/media-libs/libwmf/libwmf-0.2.8.4-r7.ebuild b/media-libs/libwmf/libwmf-0.2.8.4-r7.ebuild
95 new file mode 100644
96 index 00000000000..48585c30747
97 --- /dev/null
98 +++ b/media-libs/libwmf/libwmf-0.2.8.4-r7.ebuild
99 @@ -0,0 +1,97 @@
100 +# Copyright 1999-2018 Gentoo Foundation
101 +# Distributed under the terms of the GNU General Public License v2
102 +
103 +EAPI=6
104 +
105 +inherit autotools gnome2-utils
106 +
107 +DESCRIPTION="A library for reading vector images in Microsoft's Windows Metafile Format (WMF)"
108 +HOMEPAGE="https://wvware.sourceforge.net/"
109 +SRC_URI="mirror://sourceforge/wvware/${P}.tar.gz"
110 +
111 +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"
112 +LICENSE="LGPL-2"
113 +SLOT="0"
114 +IUSE="debug doc expat X"
115 +
116 +RDEPEND="app-text/ghostscript-gpl
117 + media-fonts/urw-fonts
118 + media-libs/freetype:2=
119 + media-libs/libpng:0=
120 + sys-libs/zlib:=
121 + x11-libs/gdk-pixbuf:2[X?]
122 + virtual/jpeg:0=
123 + expat? ( dev-libs/expat )
124 + !expat? ( dev-libs/libxml2:2= )
125 + X? ( x11-libs/libX11
126 + x11-libs/libXt
127 + x11-libs/libXpm )"
128 +
129 +DEPEND="${RDEPEND}
130 + virtual/pkgconfig"
131 +
132 +DOCS=( "AUTHORS" "BUILDING" "ChangeLog" "CREDITS" "INSTALL" "NEWS" "README" "TODO" )
133 +
134 +PATCHES=(
135 + "${FILESDIR}"/${P}-build.patch
136 + "${FILESDIR}"/${P}-CVE-2015-0848+CVE-2015-4588.patch
137 + "${FILESDIR}"/${P}-CVE-2015-4695.patch
138 + "${FILESDIR}"/${P}-CVE-2015-4696.patch
139 + "${FILESDIR}"/${P}-gdk-pixbuf.patch
140 + "${FILESDIR}"/${P}-intoverflow.patch
141 + "${FILESDIR}"/${P}-libpng-1.5.patch
142 + "${FILESDIR}"/${P}-pngfix.patch
143 + "${FILESDIR}"/${P}-use-freetype2-pkg-config.patch
144 + "${FILESDIR}"/${P}-use-system-fonts.patch
145 + )
146 +
147 +src_prepare() {
148 + default
149 +
150 + # Fixes QA warning "This package has a configure.in file which has long been deprecated"
151 + # Since there is already a configure.ac, we don't need the deprecated configure.in
152 + rm configure.in || die
153 +
154 + if ! use doc ; then
155 + sed -i -e 's:doc::' Makefile.am || die
156 + fi
157 +
158 + eautoreconf
159 +}
160 +
161 +src_configure() {
162 + # Support for GD is disabled, since it's never linked, even, when enabled
163 + # See https://bugs.gentoo.org/268161
164 + local myeconfargs=(
165 + --disable-gd
166 + --disable-static
167 + $(use_enable debug)
168 + $(use_with expat)
169 + $(use_with !expat libxml2)
170 + $(use_with X x)
171 + --with-docdir="${EPREFIX%/}"/usr/share/doc/${PF}
172 + --with-fontdir="${EPREFIX%/}"/usr/share/fonts/urw-fonts
173 + --with-freetype
174 + --with-gsfontdir="${EPREFIX%/}"/usr/share/fonts/urw-fonts
175 + --with-gsfontmap="${EPREFIX%/}"/usr/share/ghostscript/9.21/Resource/Init/Fontmap
176 + --with-jpeg
177 + --with-layers
178 + --with-png
179 + --with-sys-gd
180 + --with-zlib
181 + )
182 +
183 + econf "${myeconfargs[@]}"
184 +}
185 +
186 +pkg_preinst() {
187 + gnome2_gdk_pixbuf_savelist
188 +}
189 +
190 +pkg_postinst() {
191 + gnome2_gdk_pixbuf_update
192 +}
193 +
194 +pkg_postrm() {
195 + gnome2_gdk_pixbuf_update
196 +}
197
198 diff --git a/media-libs/libwmf/metadata.xml b/media-libs/libwmf/metadata.xml
199 index 12310dcd7d2..e40036b891d 100644
200 --- a/media-libs/libwmf/metadata.xml
201 +++ b/media-libs/libwmf/metadata.xml
202 @@ -1,8 +1,9 @@
203 <?xml version="1.0" encoding="UTF-8"?>
204 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
205 <pkgmetadata>
206 - <!-- maintainer-needed -->
207 - <upstream>
208 - <remote-id type="sourceforge">wvware</remote-id>
209 - </upstream>
210 + <!-- maintainer-needed -->
211 + <upstream>
212 + <bugs-to>https://sourceforge.net/p/wvware/bugs/</bugs-to>
213 + <remote-id type="sourceforge">wvware</remote-id>
214 + </upstream>
215 </pkgmetadata>