[arch-commits] Commit in libotf/trunk (PKGBUILD replace-freetype-config.patch)

Allan McRae allan at archlinux.org
Wed May 6 16:07:43 UTC 2020


    Date: Wednesday, May 6, 2020 @ 16:07:43
  Author: allan
Revision: 382416

upgpkg: libotf 0.9.16-2: fix FTBFS

Added:
  libotf/trunk/replace-freetype-config.patch
Modified:
  libotf/trunk/PKGBUILD

-------------------------------+
 PKGBUILD                      |   14 +++++++++---
 replace-freetype-config.patch |   46 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-05-06 15:46:29 UTC (rev 382415)
+++ PKGBUILD	2020-05-06 16:07:43 UTC (rev 382416)
@@ -3,17 +3,25 @@
 
 pkgname=libotf
 pkgver=0.9.16
-pkgrel=1
+pkgrel=2
 pkgdesc='OpenType Font library'
 url='https://www.nongnu.org/m17n/'
 license=('LGPL')
 arch=('x86_64')
 depends=('libxaw' 'freetype2')
-source=("https://download.savannah.gnu.org/releases/m17n/${pkgname}-${pkgver}.tar.gz")
-sha256sums=('68db0ca3cda2d46a663a92ec26e6eb5adc392ea5191bcda74268f0aefa78066b')
+source=("https://download.savannah.gnu.org/releases/m17n/${pkgname}-${pkgver}.tar.gz"
+        'replace-freetype-config.patch')
+sha256sums=('68db0ca3cda2d46a663a92ec26e6eb5adc392ea5191bcda74268f0aefa78066b'
+            '619d1af60f5189543c490976e390e405cd320eb7e52aae670521b9238bff2926')
 
+prepare() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	patch -p1 -i ${srcdir}/replace-freetype-config.patch
+}
+
 build() {
 	cd "${srcdir}/${pkgname}-${pkgver}"
+	autoreconf -i
 	./configure --prefix=/usr
 	make
 }

Added: replace-freetype-config.patch
===================================================================
--- replace-freetype-config.patch	                        (rev 0)
+++ replace-freetype-config.patch	2020-05-06 16:07:43 UTC (rev 382416)
@@ -0,0 +1,46 @@
+From: Hilko Bengen <bengen at debian.org>
+Date: Sat, 27 Oct 2018 00:53:35 +0200
+Subject: Use pkg-config for freetype
+
+---
+ configure.ac | 29 ++++++++---------------------
+ 1 file changed, 8 insertions(+), 21 deletions(-)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -48,27 +48,14 @@
+ AC_FUNC_ALLOCA
+ AC_FUNC_MALLOC
+ 
+-# Check for Freetype2 usability.
+-AC_CHECK_PROG(HAVE_FREETYPE_CONFIG, freetype-config, yes)
+-if test "x$HAVE_FREETYPE_CONFIG" = "xyes"; then
+-  FREETYPE_INC=`freetype-config --cflags`
+-  CPPFLAGS="$CPPFLAGS $FREETYPE_INC"
+-  AC_CHECK_HEADER(ft2build.h, HAVE_FREETYPE=yes,
+-  			      HAVE_FREETYPE=no CPPFLAGS=$save_CPPFLAGS)
+-  if test "x$HAVE_FREETYPE" = "xyes" ; then
+-    FREETYPE_LD_FLAGS=`freetype-config --libs`;
+-    LIBS="$LIBS $FREETYPE_LD_FLAGS"
+-    AC_CHECK_LIB(freetype, FT_Init_FreeType, HAVE_FREETYPE=yes,
+-    			   		     HAVE_FREETYPE=no)
+-  fi
+-fi
+-
+-if test "x$HAVE_FREETYPE" != "xyes" ; then
+-  echo "Freetype library wan't found in your system!"
+-  exit 1
+-fi
+-AC_SUBST(FREETYPE_INC)
+-AC_SUBST(FREETYPE_LD_FLAGS)
++PKG_CHECK_MODULES(
++        [FREETYPE],
++        [freetype2],
++        [
++                CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
++                LIBS="$LIBS $FREETYPE_LIBS"
++        ],
++        [AC_MSG_ERROR([Can't find Freetype library])])
+ 
+ if test "x$no_x" != "xyes"; then
+   X11_XT_XAW_XMU="-lX11 -lXt -lXaw -lXmu"


More information about the arch-commits mailing list