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: app-office/dia/files/, app-office/dia/
Date: Mon, 02 Jul 2018 09:48:57
Message-Id: 1530524892.b743707ba1ffaaaadfbf44f1bd9ad0accd61334a.polynomial-c@gentoo
1 commit: b743707ba1ffaaaadfbf44f1bd9ad0accd61334a
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 2 09:48:12 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 2 09:48:12 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b743707b
7
8 app-office/dia: Use pkg-config instead of freetype-config
9
10 Commit permission kindly granted by leio.
11
12 Closes: https://bugs.gentoo.org/654814
13 Package-Manager: Portage-2.3.41, Repoman-2.3.9
14
15 app-office/dia/dia-0.97.3.ebuild | 3 +-
16 .../dia/files/dia-0.97.3-freetype_pkgconfig.patch | 66 ++++++++++++++++++++++
17 2 files changed, 68 insertions(+), 1 deletion(-)
18
19 diff --git a/app-office/dia/dia-0.97.3.ebuild b/app-office/dia/dia-0.97.3.ebuild
20 index 844a72f7b20..a8a9ae6b6c0 100644
21 --- a/app-office/dia/dia-0.97.3.ebuild
22 +++ b/app-office/dia/dia-0.97.3.ebuild
23 @@ -1,4 +1,4 @@
24 -# Copyright 1999-2017 Gentoo Foundation
25 +# Copyright 1999-2018 Gentoo Foundation
26 # Distributed under the terms of the GNU General Public License v2
27
28 EAPI=5
29 @@ -54,6 +54,7 @@ src_prepare() {
30
31 epatch "${FILESDIR}"/${PN}-0.97.0-gnome-doc.patch #159381 , upstream #470812 #558690
32 epatch "${FILESDIR}"/${PN}-0.97.2-underlinking.patch #420685, upstream #678761
33 + epatch "${FILESDIR}"/${PN}-0.97.3-freetype_pkgconfig.patch #654814, upstream https://gitlab.gnome.org/GNOME/dia/merge_requests/1
34
35 if use python; then
36 python_fix_shebang .
37
38 diff --git a/app-office/dia/files/dia-0.97.3-freetype_pkgconfig.patch b/app-office/dia/files/dia-0.97.3-freetype_pkgconfig.patch
39 new file mode 100644
40 index 00000000000..c48b5ba66fb
41 --- /dev/null
42 +++ b/app-office/dia/files/dia-0.97.3-freetype_pkgconfig.patch
43 @@ -0,0 +1,66 @@
44 +--- dia-0.97.3/configure.in
45 ++++ dia-0.97.3/configure.in
46 +@@ -62,43 +62,26 @@
47 +
48 + AC_ARG_WITH(freetype,
49 + [ --without-freetype compile without FreeType support],,with_freetype=yes)
50 +-if test "x$with_freetype" = "xyes"; then
51 +-PKG_CHECK_MODULES(PANGOFT2,pangoft2,have_pangoft2=true,have_pangoft2=false)
52 +-if test "$have_pangoft2" = "true"; then
53 +- dnl On Solaris with Forte C, at least, need to link app/dia with -lfreetype.
54 +- dnl It's not enough that -lpangoft2 implicitly pulls it in.
55 +- have_freetype=false
56 +- AC_CHECK_LIB(freetype,FT_Init_FreeType,have_freetype=true,have_freetype=false,`freetype-config --libs`)
57 +- if test "$have_freetype" = "true"; then
58 +- dnl Need 2.0.9, as a bug was fixed for us there.
59 +- dnl However, freetype-config doesn't give a meaningful version, so we must
60 +- dnl do it like this.
61 +- AC_MSG_CHECKING([if FreeType version is 2.0.9 or higher])
62 +- old_CPPFLAGS="$CPPFLAGS"
63 +- CPPFLAGS="$CPPFLAGS `freetype-config --cflags`"
64 +- AC_TRY_CPP([#include <ft2build.h>
65 +-#include FT_FREETYPE_H
66 +-#if (FREETYPE_MAJOR*1000+FREETYPE_MINOR)*1000+FREETYPE_PATCH < 2000009
67 +-#error Freetype version too low.
68 +-#endif
69 +-],
70 +- [AC_MSG_RESULT(yes)
71 +- FREETYPE_LIBS=`freetype-config --libs`
72 +- AC_SUBST(FREETYPE_LIBS)
73 +- FREETYPE_CFLAGS=`freetype-config --cflags`
74 +- AC_SUBST(FREETYPE_CFLAGS)
75 +- GTK_MODULES="$GTK_MODULES pangoft2"
76 +- AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])]
77 +- ,
78 +- [AC_MSG_ERROR([Need FreeType library version 2.0.9 or higher])])
79 +- CPPFLAGS="$old_CPPFLAGS"
80 +- else
81 +- AC_MSG_ERROR(Can't find FreeType library)
82 +- fi
83 +-else
84 +- AC_MSG_ERROR(Can't find PangoFT2 library)
85 +-fi
86 +-fi
87 ++AS_IF([test "x$with_freetype" = "xyes"],[
88 ++ dnl freetype2.pc uses the libtool specific version number and not the
89 ++ dnl package version. See
90 ++ dnl https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/VERSIONS.TXT
91 ++ dnl Let's raise minimum dependency to freetype-2.4.0 because that's the
92 ++ dnl lowest freetype libtool version I could find.
93 ++ dnl freetype-2.4.0 is from July 2010 and should be reasonably old
94 ++ dnl enough.
95 ++ PKG_CHECK_MODULES(FREETYPE, freetype2 >= 11.0.5,
96 ++ [
97 ++ CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
98 ++ AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])
99 ++ ],
100 ++ AC_MSG_ERROR([Need FreeType library version 2.4.0 or higher])
101 ++ )
102 ++ PKG_CHECK_MODULES(PANGOFT2,pangoft2,
103 ++ GTK_MODULES="$GTK_MODULES pangoft2",
104 ++ AC_MSG_ERROR(Can't find PangoFT2 library)
105 ++ )
106 ++])
107 + AM_CONDITIONAL(WITH_FREETYPE, test "x$with_freetype" != "xno")
108 +
109 + CFLAGS="$FREETYPE_CFLAGS $CFLAGS"