diff options
author | markd <markd@pkgsrc.org> | 2018-11-14 21:26:53 +0000 |
---|---|---|
committer | markd <markd@pkgsrc.org> | 2018-11-14 21:26:53 +0000 |
commit | d6579596041d59db24a3eb8572862ab94f1fbef3 (patch) | |
tree | c1a02dcbc2d6f2b14113b080c9d8c6d065505568 | |
parent | 581e5057aa72f073d9393b25e18f57b340472180 (diff) | |
download | pkgsrc-d6579596041d59db24a3eb8572862ab94f1fbef3.tar.gz |
php-gd: use pkg-config rather than freetype-config to test for freetype2
-rw-r--r-- | graphics/php-gd/Makefile | 4 | ||||
-rw-r--r-- | lang/php70/distinfo | 4 | ||||
-rw-r--r-- | lang/php70/patches/patch-ext_gd_config.m4 | 43 | ||||
-rw-r--r-- | lang/php71/distinfo | 4 | ||||
-rw-r--r-- | lang/php71/patches/patch-ext_gd_config.m4 | 39 | ||||
-rw-r--r-- | lang/php72/distinfo | 4 | ||||
-rw-r--r-- | lang/php72/patches/patch-ext_gd_config.m4 | 43 |
7 files changed, 127 insertions, 14 deletions
diff --git a/graphics/php-gd/Makefile b/graphics/php-gd/Makefile index 840778ce263..bae87702fbb 100644 --- a/graphics/php-gd/Makefile +++ b/graphics/php-gd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.44 2018/03/30 00:39:21 taca Exp $ +# $NetBSD: Makefile,v 1.45 2018/11/14 21:26:54 markd Exp $ MODNAME= gd CATEGORIES+= graphics @@ -20,6 +20,8 @@ CONFIGURE_ARGS+= --without-t1lib USE_PHP_EXT_PATCHES= yes +USE_TOOLS+ pkg-config + .include "options.mk" .include "../../graphics/gd/buildlink3.mk" diff --git a/lang/php70/distinfo b/lang/php70/distinfo index 20f7335958b..1005ae6d89d 100644 --- a/lang/php70/distinfo +++ b/lang/php70/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.48 2018/09/13 15:46:38 taca Exp $ +$NetBSD: distinfo,v 1.49 2018/11/14 21:26:53 markd Exp $ SHA1 (php-7.0.32.tar.bz2) = b323e00d91bfdfae087a025b9233527e48d99772 RMD160 (php-7.0.32.tar.bz2) = f26eb5d3e82555502ddf749bc7b08d9d2a72db22 @@ -7,7 +7,7 @@ Size (php-7.0.32.tar.bz2) = 14643727 bytes SHA1 (patch-acinclude.m4) = 81a8f33a536500978ea5a9aa2d2875c61c843e56 SHA1 (patch-configure) = 68ca63d7623feee2f12c9e1abacf4a5d7827d96c SHA1 (patch-disable-filter-url) = e9e92d686ddd1d1a1ece10fe4feee4e368fe510c -SHA1 (patch-ext_gd_config.m4) = bde93678626592cdcee619189bfc6532d0913a76 +SHA1 (patch-ext_gd_config.m4) = 42b59d07c6d2f33436662bd37d80d95e645db391 SHA1 (patch-ext_imap_config.m4) = f4e10ab81697b72019313f63bc630627a08efd92 SHA1 (patch-ext_intl_config.m4) = 222e35fc2c3e9e559696293fdf66171f8abfca7f SHA1 (patch-ext_pcre_pcrelib_config.h) = c5fba95856628f68639fe63feeef04a5f83d3916 diff --git a/lang/php70/patches/patch-ext_gd_config.m4 b/lang/php70/patches/patch-ext_gd_config.m4 index a3e3acbfeae..ebb5ad5a85f 100644 --- a/lang/php70/patches/patch-ext_gd_config.m4 +++ b/lang/php70/patches/patch-ext_gd_config.m4 @@ -1,6 +1,8 @@ -$NetBSD: patch-ext_gd_config.m4,v 1.2 2016/08/13 17:34:41 taca Exp $ +$NetBSD: patch-ext_gd_config.m4,v 1.3 2018/11/14 21:26:53 markd Exp $ ---- ext/gd/config.m4.orig 2016-07-20 13:11:57.000000000 +0000 +Allow pkg-config rather than freetype-config + +--- ext/gd/config.m4.orig 2018-09-11 06:26:58.000000000 +0000 +++ ext/gd/config.m4 @@ -46,18 +46,7 @@ dnl Checks for the configure options dnl @@ -47,7 +49,42 @@ $NetBSD: patch-ext_gd_config.m4,v 1.2 2016/08/13 17:34:41 taca Exp $ ],[ -L$PHP_ZLIB_DIR/$PHP_LIBDIR -lz -L$GD_PNG_DIR/$PHP_LIBDIR ]) -@@ -230,7 +218,9 @@ AC_DEFUN([PHP_GD_CHECK_VERSION],[ +@@ -189,6 +177,9 @@ AC_DEFUN([PHP_GD_XPM],[ + AC_DEFUN([PHP_GD_FREETYPE2],[ + if test "$PHP_FREETYPE_DIR" != "no"; then + ++ AC_PATH_PROG(PKG_CONFIG, pkg-config, no) ++ ++ AC_MSG_CHECKING([for freetype]) + for i in $PHP_FREETYPE_DIR /usr/local /usr; do + if test -f "$i/bin/freetype-config"; then + FREETYPE2_DIR=$i +@@ -197,13 +188,20 @@ AC_DEFUN([PHP_GD_FREETYPE2],[ + fi + done + +- if test -z "$FREETYPE2_DIR"; then ++ if test -n "$FREETYPE2_CONFIG"; then ++ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags` ++ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs` ++ AC_MSG_RESULT([found in $FREETYPE2_DIR]) ++ elif test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists freetype2; then ++ FREETYPE2_DIR=pkg-config ++ FREETYPE2_CFLAGS=`$PKG_CONFIG freetype2 --cflags` ++ FREETYPE2_LIBS=`$PKG_CONFIG freetype2 --libs` ++ AC_MSG_RESULT([found by pkg-config]) ++ else ++ AC_MSG_RESULT([not found]) + AC_MSG_ERROR([freetype-config not found.]) + fi + +- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags` +- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs` +- + PHP_EVAL_INCLINE($FREETYPE2_CFLAGS) + PHP_EVAL_LIBLINE($FREETYPE2_LIBS, GD_SHARED_LIBADD) + AC_DEFINE(USE_GD_IMGSTRTTF, 1, [ ]) +@@ -230,7 +228,9 @@ AC_DEFUN([PHP_GD_CHECK_VERSION],[ PHP_CHECK_LIBRARY(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG, 1, [ ])], [], [ $GD_SHARED_LIBADD ]) PHP_CHECK_LIBRARY(gd, gdImageCreateFromWebp, [AC_DEFINE(HAVE_GD_WEBP, 1, [ ])], [], [ $GD_SHARED_LIBADD ]) PHP_CHECK_LIBRARY(gd, gdImageCreateFromJpeg, [AC_DEFINE(HAVE_GD_JPG, 1, [ ])], [], [ $GD_SHARED_LIBADD ]) diff --git a/lang/php71/distinfo b/lang/php71/distinfo index 3f10c1a9b53..a36801d8bea 100644 --- a/lang/php71/distinfo +++ b/lang/php71/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.44 2018/11/08 13:59:11 taca Exp $ +$NetBSD: distinfo,v 1.45 2018/11/14 21:26:53 markd Exp $ SHA1 (php-7.1.24.tar.bz2) = 1135af2180db3698f82f74c55469d3fda5bfc77a RMD160 (php-7.1.24.tar.bz2) = 374afed02d940bc75d61f55099c864008d6cc4d5 @@ -7,7 +7,7 @@ Size (php-7.1.24.tar.bz2) = 15021575 bytes SHA1 (patch-acinclude.m4) = c232e68dbcd58bbfdf6800e491eb46812df15f65 SHA1 (patch-configure) = 862707ff3fd8b8d7312104bb44a48fe8379951bd SHA1 (patch-disable-filter-url) = e9e92d686ddd1d1a1ece10fe4feee4e368fe510c -SHA1 (patch-ext_gd_config.m4) = 93b62daad93b9ee6dc28e06016f739bc26b0dc9f +SHA1 (patch-ext_gd_config.m4) = fc915622450ce71ecdcd5b5eb8200f9d0604c8d6 SHA1 (patch-ext_imap_config.m4) = 3ce15ec130c26a34c705bac461336137ba2e9610 SHA1 (patch-ext_intl_config.m4) = 5192f8e8fa32939c62a734421463edd294372282 SHA1 (patch-ext_pcre_pcrelib_config.h) = c5fba95856628f68639fe63feeef04a5f83d3916 diff --git a/lang/php71/patches/patch-ext_gd_config.m4 b/lang/php71/patches/patch-ext_gd_config.m4 index 53fb15eca34..2ede168d8c9 100644 --- a/lang/php71/patches/patch-ext_gd_config.m4 +++ b/lang/php71/patches/patch-ext_gd_config.m4 @@ -1,4 +1,6 @@ -$NetBSD: patch-ext_gd_config.m4,v 1.2 2016/08/13 17:34:41 taca Exp $ +$NetBSD: patch-ext_gd_config.m4,v 1.3 2018/11/14 21:26:53 markd Exp $ + +Allow pkg-config rather than freetype-config --- ext/gd/config.m4.orig 2016-08-05 21:30:28.000000000 +0000 +++ ext/gd/config.m4 @@ -47,6 +49,41 @@ $NetBSD: patch-ext_gd_config.m4,v 1.2 2016/08/13 17:34:41 taca Exp $ ],[ -L$PHP_ZLIB_DIR/$PHP_LIBDIR -lz -L$GD_PNG_DIR/$PHP_LIBDIR ]) +@@ -189,6 +177,9 @@ AC_DEFUN([PHP_GD_XPM],[ + AC_DEFUN([PHP_GD_FREETYPE2],[ + if test "$PHP_FREETYPE_DIR" != "no"; then + ++ AC_PATH_PROG(PKG_CONFIG, pkg-config, no) ++ ++ AC_MSG_CHECKING([for freetype]) + for i in $PHP_FREETYPE_DIR /usr/local /usr; do + if test -f "$i/bin/freetype-config"; then + FREETYPE2_DIR=$i +@@ -197,13 +188,20 @@ AC_DEFUN([PHP_GD_FREETYPE2],[ + fi + done + +- if test -z "$FREETYPE2_DIR"; then ++ if test -n "$FREETYPE2_CONFIG"; then ++ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags` ++ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs` ++ AC_MSG_RESULT([found in $FREETYPE2_DIR]) ++ elif test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists freetype2; then ++ FREETYPE2_DIR=pkg-config ++ FREETYPE2_CFLAGS=`$PKG_CONFIG freetype2 --cflags` ++ FREETYPE2_LIBS=`$PKG_CONFIG freetype2 --libs` ++ AC_MSG_RESULT([found by pkg-config]) ++ else ++ AC_MSG_RESULT([not found]) + AC_MSG_ERROR([freetype-config not found.]) + fi + +- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags` +- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs` +- + PHP_EVAL_INCLINE($FREETYPE2_CFLAGS) + PHP_EVAL_LIBLINE($FREETYPE2_LIBS, GD_SHARED_LIBADD) + AC_DEFINE(USE_GD_IMGSTRTTF, 1, [ ]) @@ -230,7 +218,9 @@ AC_DEFUN([PHP_GD_CHECK_VERSION],[ PHP_CHECK_LIBRARY(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG, 1, [ ])], [], [ $GD_SHARED_LIBADD ]) PHP_CHECK_LIBRARY(gd, gdImageCreateFromWebp, [AC_DEFINE(HAVE_GD_WEBP, 1, [ ])], [], [ $GD_SHARED_LIBADD ]) diff --git a/lang/php72/distinfo b/lang/php72/distinfo index be6618e74fa..1d9d928087a 100644 --- a/lang/php72/distinfo +++ b/lang/php72/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.32 2018/11/08 14:00:37 taca Exp $ +$NetBSD: distinfo,v 1.33 2018/11/14 21:26:54 markd Exp $ SHA1 (php-7.2.12.tar.bz2) = 97682d2062a4a12207b83ec75580fac6510ccc6b RMD160 (php-7.2.12.tar.bz2) = 2ec2b00dac6b47de72dc56302deaec45b3dc6cb1 @@ -6,7 +6,7 @@ SHA512 (php-7.2.12.tar.bz2) = 205f2d4910bde1a73edb3044bb61287ae7c680f01f1ca07dc9 Size (php-7.2.12.tar.bz2) = 15029274 bytes SHA1 (patch-configure) = 47f2ede97390cc7e46d04c2769dd97459b19450a SHA1 (patch-disable-filter-url) = e9e92d686ddd1d1a1ece10fe4feee4e368fe510c -SHA1 (patch-ext_gd_config.m4) = 67730ccc13410adaf8829f77a6b044f16e412489 +SHA1 (patch-ext_gd_config.m4) = eaecfb31b18700dd642c067ed82748d4f6be2335 SHA1 (patch-ext_phar_Makefile.frag) = 558869b60f8ed6674a3ba1d595a65f010df4c426 SHA1 (patch-ext_phar_phar_phar.php) = f630e3946b21b76d4fe857a43e00e25c9445f2c8 SHA1 (patch-ext_recode_recode.c) = 639bf762302c7a30c88d3f3fa862494e0f847bdb diff --git a/lang/php72/patches/patch-ext_gd_config.m4 b/lang/php72/patches/patch-ext_gd_config.m4 index 4d6d8d087dd..a8551525f7a 100644 --- a/lang/php72/patches/patch-ext_gd_config.m4 +++ b/lang/php72/patches/patch-ext_gd_config.m4 @@ -1,6 +1,8 @@ -$NetBSD: patch-ext_gd_config.m4,v 1.1 2017/12/06 21:36:34 jdolecek Exp $ +$NetBSD: patch-ext_gd_config.m4,v 1.2 2018/11/14 21:26:54 markd Exp $ ---- ext/gd/config.m4.orig 2017-11-28 09:22:54.000000000 +0000 +Allow pkg-config rather than freetype-config + +--- ext/gd/config.m4.orig 2018-10-09 15:09:51.000000000 +0000 +++ ext/gd/config.m4 @@ -43,18 +43,7 @@ dnl Checks for the configure options dnl @@ -47,7 +49,42 @@ $NetBSD: patch-ext_gd_config.m4,v 1.1 2017/12/06 21:36:34 jdolecek Exp $ ],[ -L$PHP_ZLIB_DIR/$PHP_LIBDIR -lz -L$GD_PNG_DIR/$PHP_LIBDIR ]) -@@ -220,7 +208,9 @@ AC_DEFUN([PHP_GD_CHECK_VERSION],[ +@@ -186,6 +174,9 @@ AC_DEFUN([PHP_GD_XPM],[ + AC_DEFUN([PHP_GD_FREETYPE2],[ + if test "$PHP_FREETYPE_DIR" != "no"; then + ++ AC_PATH_PROG(PKG_CONFIG, pkg-config, no) ++ ++ AC_MSG_CHECKING([for freetype]) + for i in $PHP_FREETYPE_DIR /usr/local /usr; do + if test -f "$i/bin/freetype-config"; then + FREETYPE2_DIR=$i +@@ -194,13 +185,20 @@ AC_DEFUN([PHP_GD_FREETYPE2],[ + fi + done + +- if test -z "$FREETYPE2_DIR"; then ++ if test -n "$FREETYPE2_CONFIG"; then ++ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags` ++ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs` ++ AC_MSG_RESULT([found in $FREETYPE2_DIR]) ++ elif test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists freetype2; then ++ FREETYPE2_DIR=pkg-config ++ FREETYPE2_CFLAGS=`$PKG_CONFIG freetype2 --cflags` ++ FREETYPE2_LIBS=`$PKG_CONFIG freetype2 --libs` ++ AC_MSG_RESULT([found by pkg-config]) ++ else ++ AC_MSG_RESULT([not found]) + AC_MSG_ERROR([freetype-config not found.]) + fi + +- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags` +- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs` +- + PHP_EVAL_INCLINE($FREETYPE2_CFLAGS) + PHP_EVAL_LIBLINE($FREETYPE2_LIBS, GD_SHARED_LIBADD) + AC_DEFINE(HAVE_LIBFREETYPE,1,[ ]) +@@ -220,7 +218,9 @@ AC_DEFUN([PHP_GD_CHECK_VERSION],[ PHP_CHECK_LIBRARY(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG, 1, [ ])], [], [ $GD_SHARED_LIBADD ]) PHP_CHECK_LIBRARY(gd, gdImageCreateFromWebp, [AC_DEFINE(HAVE_GD_WEBP, 1, [ ])], [], [ $GD_SHARED_LIBADD ]) PHP_CHECK_LIBRARY(gd, gdImageCreateFromJpeg, [AC_DEFINE(HAVE_GD_JPG, 1, [ ])], [], [ $GD_SHARED_LIBADD ]) |