media-libs/ftgl: Don't use freetype-config.
authorLars Wendler <polynomial-c@gentoo.org>
Fri, 4 May 2018 11:11:43 +0000 (13:11 +0200)
committerLars Wendler <polynomial-c@gentoo.org>
Fri, 4 May 2018 11:11:43 +0000 (13:11 +0200)
Package-Manager: Portage-2.3.35, Repoman-2.3.9

media-libs/ftgl/files/ftgl-2.1.3_rc5-freetype_pkgconfig.patch [new file with mode: 0644]
media-libs/ftgl/files/ftgl-2.1.3_rc5-gentoo.patch
media-libs/ftgl/files/ftgl-2.1.3_rc5-underlink.patch
media-libs/ftgl/ftgl-2.1.3_rc5.ebuild

diff --git a/media-libs/ftgl/files/ftgl-2.1.3_rc5-freetype_pkgconfig.patch b/media-libs/ftgl/files/ftgl-2.1.3_rc5-freetype_pkgconfig.patch
new file mode 100644 (file)
index 0000000..89cc4c0
--- /dev/null
@@ -0,0 +1,11 @@
+--- ftgl-2.1.3~rc5/configure.ac
++++ ftgl-2.1.3~rc5/configure.ac
+@@ -41,7 +41,7 @@
+ 
+ AC_PATH_X
+ 
+-AC_CHECK_FT2([9.0.3],[],
++PKG_CHECK_MODULES(FT2, freetype2 >= 9.0.3,,
+              [AC_MSG_ERROR([FreeType2 is required to compile this library])])
+ 
+ AC_PATH_XTRA
index 945c8742c6443ab18d5da10e8540a731e94c0f8f..885051a01d4680a0446aa597f90cf1cf3672df24 100644 (file)
@@ -1,5 +1,5 @@
---- configure.ac.old    2008-11-21 14:41:15.000000000 +0100
-+++ configure.ac        2008-11-21 14:44:19.000000000 +0100
+--- a/configure.ac
++++ b/configure.ac
 @@ -50,8 +50,7 @@
  FTGL_CHECK_GLUT
  FTGL_CHECK_FONT
@@ -31,8 +31,8 @@
  if test "x${LATEX}" != "xno"; then
    AC_MSG_CHECKING(for a4.sty and a4wide.sty)
    if "${KPSEWHICH}" a4.sty >/dev/null 2>&1; then
---- Makefile.am.old    2008-11-24 22:35:16.000000000 +0100
-+++ Makefile.am        2008-11-24 22:36:32.000000000 +0100
+--- a/Makefile.am
++++ b/Makefile.am
 @@ -24,16 +24,6 @@
        m4 \
        $(NULL)
index 30bfba04c7d494324c3333be537225e74252ad94..ae152ff85718c9d17374dacd73fc3332db6c07af 100644 (file)
@@ -1,5 +1,5 @@
---- demo/Makefile.am.old       2011-05-20 11:13:18.822445466 +0200
-+++ demo/Makefile.am   2011-05-20 11:13:28.271042994 +0200
+--- a/demo/Makefile.am
++++ b/demo/Makefile.am
 @@ -17,7 +17,7 @@
      $(NULL)
  c_demo_CFLAGS = $(FT2_CFLAGS) $(GL_CFLAGS)
index 3e89417da633a5fee0fa4c3920de64a37c674be0..068c13cabe6e3ef367b10ef0bd70e34ce03926d9 100644 (file)
@@ -1,13 +1,13 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
-inherit eutils flag-o-matic autotools
+EAPI=6
+inherit autotools flag-o-matic
 
-MY_PV=${PV/_/-}
-MY_PV2=${PV/_/\~}
-MY_P=${PN}-${MY_PV}
-MY_P2=${PN}-${MY_PV2}
+MY_PV="${PV/_/-}"
+MY_PV2="${PV/_/~}"
+MY_P="${PN}-${MY_PV}"
+MY_P2="${PN}-${MY_PV2}"
 
 DESCRIPTION="library to use arbitrary fonts in OpenGL applications"
 HOMEPAGE="http://ftgl.sourceforge.net/"
@@ -22,14 +22,19 @@ DEPEND=">=media-libs/freetype-2.0.9
        virtual/opengl
        virtual/glu
        media-libs/freeglut"
-RDEPEND=${DEPEND}
+RDEPEND="${DEPEND}
+       virtual/pkgconfig"
 
-S=${WORKDIR}/${MY_P2}
+S="${WORKDIR}/${MY_P2}"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-gentoo.patch
+       "${FILESDIR}"/${P}-underlink.patch
+       "${FILESDIR}"/${P}-freetype_pkgconfig.patch
+)
 
 src_prepare() {
-       epatch \
-               "${FILESDIR}"/${P}-gentoo.patch \
-               "${FILESDIR}"/${P}-underlink.patch
+       default
        sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.ac || die
        eautoreconf
 }
@@ -40,8 +45,8 @@ src_configure() {
 }
 
 src_install() {
-       DOCS="AUTHORS BUGS ChangeLog NEWS README TODO docs/projects_using_ftgl.txt" \
-               default
-       rm -rf "${D}"/usr/share/doc/ftgl || die
-       prune_libtool_files
+       local DOCS=( AUTHORS BUGS ChangeLog NEWS README TODO docs/projects_using_ftgl.txt)
+       default
+       rm -r "${ED%/}"/usr/share/doc/ftgl || die
+       find "${ED}" -name '*.la' -delete || die
 }