public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Lars Wendler" <polynomial-c@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/dia/files/, app-office/dia/
Date: Mon,  2 Jul 2018 09:48:51 +0000 (UTC)	[thread overview]
Message-ID: <1530524892.b743707ba1ffaaaadfbf44f1bd9ad0accd61334a.polynomial-c@gentoo> (raw)

commit:     b743707ba1ffaaaadfbf44f1bd9ad0accd61334a
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  2 09:48:12 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Jul  2 09:48:12 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b743707b

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

 app-office/dia/dia-0.97.3.ebuild                   |  3 +-
 .../dia/files/dia-0.97.3-freetype_pkgconfig.patch  | 66 ++++++++++++++++++++++
 2 files changed, 68 insertions(+), 1 deletion(-)

diff --git a/app-office/dia/dia-0.97.3.ebuild b/app-office/dia/dia-0.97.3.ebuild
index 844a72f7b20..a8a9ae6b6c0 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 00000000000..c48b5ba66fb
--- /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"


             reply	other threads:[~2018-07-02  9:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-02  9:48 Lars Wendler [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-04-30 15:10 [gentoo-commits] repo/gentoo:master commit in: app-office/dia/files/, app-office/dia/ Andreas Sturmlechner
2021-01-20 10:50 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1530524892.b743707ba1ffaaaadfbf44f1bd9ad0accd61334a.polynomial-c@gentoo \
    --to=polynomial-c@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox