From owner-svn-ports-head@freebsd.org Tue Dec 29 11:01:21 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4ABD54B8DE5; Tue, 29 Dec 2020 11:01:21 +0000 (UTC) (envelope-from tz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4s0x1FSNz3rlP; Tue, 29 Dec 2020 11:01:21 +0000 (UTC) (envelope-from tz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D8F12B9D; Tue, 29 Dec 2020 11:01:21 +0000 (UTC) (envelope-from tz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BTB1Kcg021624; Tue, 29 Dec 2020 11:01:20 GMT (envelope-from tz@FreeBSD.org) Received: (from tz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BTB1KiM021621; Tue, 29 Dec 2020 11:01:20 GMT (envelope-from tz@FreeBSD.org) Message-Id: <202012291101.0BTB1KiM021621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tz set sender to tz@FreeBSD.org using -f From: Torsten Zuehlsdorff Date: Tue, 29 Dec 2020 11:01:20 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r559561 - in head: graphics/php73-gd/files lang/php73 X-SVN-Group: ports-head X-SVN-Commit-Author: tz X-SVN-Commit-Paths: in head: graphics/php73-gd/files lang/php73 X-SVN-Commit-Revision: 559561 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 11:01:21 -0000 Author: tz Date: Tue Dec 29 11:01:20 2020 New Revision: 559561 URL: https://svnweb.freebsd.org/changeset/ports/559561 Log: lang/php73: Use pkg-config to detect freetype In PHP 7.4 and above it is already in use. Also ignore PHP 7.2 because it is scheduled for removal. PR: 252115 Submitted by: Obtained from: https://aur.archlinux.org/cgit/aur.git/tree/freetype.patch?h=php73 Modified: head/graphics/php73-gd/files/patch-config.m4 head/lang/php73/Makefile.ext Modified: head/graphics/php73-gd/files/patch-config.m4 ============================================================================== --- head/graphics/php73-gd/files/patch-config.m4 Tue Dec 29 10:31:46 2020 (r559560) +++ head/graphics/php73-gd/files/patch-config.m4 Tue Dec 29 11:01:20 2020 (r559561) @@ -1,14 +1,49 @@ ---- config.m4.orig 2018-09-25 09:07:58 UTC +--- config.m4.orig 2020-11-24 11:10:57 UTC +++ config.m4 -@@ -285,6 +285,7 @@ dnl enable the support in bundled GD lib +@@ -184,6 +184,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 +@@ -192,13 +195,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,[ ]) +@@ -285,6 +295,7 @@ dnl enable the support in bundled GD library + if test -n "$GD_XPM_DIR"; then AC_DEFINE(HAVE_GD_XPM, 1, [ ]) + AC_DEFINE(HAVE_XPM, 1, [ ]) GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_XPM" fi -@@ -347,7 +348,7 @@ if test "$PHP_GD" != "no"; then +@@ -347,7 +358,7 @@ if test "$PHP_GD" != "no"; then if test "$GD_MODULE_TYPE" = "builtin"; then PHP_ADD_BUILD_DIR($ext_builddir/libgd) @@ -17,7 +52,7 @@ GD_HEADER_DIRS="ext/gd/ ext/gd/libgd/" PHP_TEST_BUILD(foobar, [], [ -@@ -355,7 +356,7 @@ if test "$PHP_GD" != "no"; then +@@ -355,7 +366,7 @@ if test "$PHP_GD" != "no"; then ], [ $GD_SHARED_LIBADD ], [char foobar () {}]) else GD_HEADER_DIRS="ext/gd/" Modified: head/lang/php73/Makefile.ext ============================================================================== --- head/lang/php73/Makefile.ext Tue Dec 29 10:31:46 2020 (r559560) +++ head/lang/php73/Makefile.ext Tue Dec 29 11:01:20 2020 (r559561) @@ -95,7 +95,7 @@ USES+= ssl .if ${PHP_MODNAME} == "gd" LIB_DEPENDS= libfreetype.so:print/freetype2 \ libpng.so:graphics/png -USES+= jpeg +USES+= jpeg pkgconfig CONFIGURE_ARGS+=--with-gd=${LOCALBASE} \ --with-freetype-dir=${LOCALBASE} \