summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2018-07-02 11:48:12 +0200
committerLars Wendler <polynomial-c@gentoo.org>2018-07-02 11:48:12 +0200
commitb743707ba1ffaaaadfbf44f1bd9ad0accd61334a (patch)
treeb4174aef37ebbae71714adcb00370feace97b216
parentapp-emulation/virtualbox: New patchset to fix qt-5.11 build issues (diff)
downloadgentoo-b743707ba1ffaaaadfbf44f1bd9ad0accd61334a.tar.gz
gentoo-b743707ba1ffaaaadfbf44f1bd9ad0accd61334a.tar.bz2
gentoo-b743707ba1ffaaaadfbf44f1bd9ad0accd61334a.zip
app-office/dia: Use pkg-config instead of freetype-config
Commit permission kindly granted by leio. Closes: https://bugs.gentoo.org/654814 Package-Manager: Portage-2.3.41, Repoman-2.3.9
-rw-r--r--app-office/dia/dia-0.97.3.ebuild3
-rw-r--r--app-office/dia/files/dia-0.97.3-freetype_pkgconfig.patch66
2 files changed, 68 insertions, 1 deletions
diff --git a/app-office/dia/dia-0.97.3.ebuild b/app-office/dia/dia-0.97.3.ebuild
index 844a72f7b20b..a8a9ae6b6c07 100644
--- a/app-office/dia/dia-0.97.3.ebuild
+++ b/app-office/dia/dia-0.97.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -54,6 +54,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-0.97.0-gnome-doc.patch #159381 , upstream #470812 #558690
epatch "${FILESDIR}"/${PN}-0.97.2-underlinking.patch #420685, upstream #678761
+ epatch "${FILESDIR}"/${PN}-0.97.3-freetype_pkgconfig.patch #654814, upstream https://gitlab.gnome.org/GNOME/dia/merge_requests/1
if use python; then
python_fix_shebang .
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
new file mode 100644
index 000000000000..c48b5ba66fbf
--- /dev/null
+++ b/app-office/dia/files/dia-0.97.3-freetype_pkgconfig.patch
@@ -0,0 +1,66 @@
+--- dia-0.97.3/configure.in
++++ dia-0.97.3/configure.in
+@@ -62,43 +62,26 @@
+
+ AC_ARG_WITH(freetype,
+ [ --without-freetype compile without FreeType support],,with_freetype=yes)
+-if test "x$with_freetype" = "xyes"; then
+-PKG_CHECK_MODULES(PANGOFT2,pangoft2,have_pangoft2=true,have_pangoft2=false)
+-if test "$have_pangoft2" = "true"; then
+- dnl On Solaris with Forte C, at least, need to link app/dia with -lfreetype.
+- dnl It's not enough that -lpangoft2 implicitly pulls it in.
+- have_freetype=false
+- AC_CHECK_LIB(freetype,FT_Init_FreeType,have_freetype=true,have_freetype=false,`freetype-config --libs`)
+- if test "$have_freetype" = "true"; then
+- dnl Need 2.0.9, as a bug was fixed for us there.
+- dnl However, freetype-config doesn't give a meaningful version, so we must
+- dnl do it like this.
+- AC_MSG_CHECKING([if FreeType version is 2.0.9 or higher])
+- old_CPPFLAGS="$CPPFLAGS"
+- CPPFLAGS="$CPPFLAGS `freetype-config --cflags`"
+- AC_TRY_CPP([#include <ft2build.h>
+-#include FT_FREETYPE_H
+-#if (FREETYPE_MAJOR*1000+FREETYPE_MINOR)*1000+FREETYPE_PATCH < 2000009
+-#error Freetype version too low.
+-#endif
+-],
+- [AC_MSG_RESULT(yes)
+- FREETYPE_LIBS=`freetype-config --libs`
+- AC_SUBST(FREETYPE_LIBS)
+- FREETYPE_CFLAGS=`freetype-config --cflags`
+- AC_SUBST(FREETYPE_CFLAGS)
+- GTK_MODULES="$GTK_MODULES pangoft2"
+- AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])]
+- ,
+- [AC_MSG_ERROR([Need FreeType library version 2.0.9 or higher])])
+- CPPFLAGS="$old_CPPFLAGS"
+- else
+- AC_MSG_ERROR(Can't find FreeType library)
+- fi
+-else
+- AC_MSG_ERROR(Can't find PangoFT2 library)
+-fi
+-fi
++AS_IF([test "x$with_freetype" = "xyes"],[
++ dnl freetype2.pc uses the libtool specific version number and not the
++ dnl package version. See
++ dnl https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/VERSIONS.TXT
++ dnl Let's raise minimum dependency to freetype-2.4.0 because that's the
++ dnl lowest freetype libtool version I could find.
++ dnl freetype-2.4.0 is from July 2010 and should be reasonably old
++ dnl enough.
++ PKG_CHECK_MODULES(FREETYPE, freetype2 >= 11.0.5,
++ [
++ CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
++ AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])
++ ],
++ AC_MSG_ERROR([Need FreeType library version 2.4.0 or higher])
++ )
++ PKG_CHECK_MODULES(PANGOFT2,pangoft2,
++ GTK_MODULES="$GTK_MODULES pangoft2",
++ AC_MSG_ERROR(Can't find PangoFT2 library)
++ )
++])
+ AM_CONDITIONAL(WITH_FREETYPE, test "x$with_freetype" != "xno")
+
+ CFLAGS="$FREETYPE_CFLAGS $CFLAGS"