Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jul 2018 08:47:33 +0000 (UTC)
From:      Torsten Zuehlsdorff <tz@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r475984 - in head: graphics/php72-gd graphics/php72-gd/files lang/php72
Message-ID:  <201807310847.w6V8lXJs051900@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tz
Date: Tue Jul 31 08:47:33 2018
New Revision: 475984
URL: https://svnweb.freebsd.org/changeset/ports/475984

Log:
  graphics/php72-gd: Switch from bundled libgd to graphics/gd
  
  Currently the gd-module uses a bundled libgd, while most systems
  already provide the same library via graphics/gd.
  Therefore instead of adding the bundled library we use the
  port instead.
  
  PR:		217222
  Submitted by:	Mikhail Teterin  <mi@FreeBSD.org>

Added:
  head/graphics/php72-gd/files/
  head/graphics/php72-gd/files/patch-config.m4   (contents, props changed)
Modified:
  head/graphics/php72-gd/Makefile
  head/lang/php72/Makefile.ext

Modified: head/graphics/php72-gd/Makefile
==============================================================================
--- head/graphics/php72-gd/Makefile	Tue Jul 31 08:44:56 2018	(r475983)
+++ head/graphics/php72-gd/Makefile	Tue Jul 31 08:47:33 2018	(r475984)
@@ -2,6 +2,8 @@
 
 CATEGORIES=	graphics
 
+PORTREVISION=  1
+
 MASTERDIR=	${.CURDIR}/../../lang/php72
 
 PKGNAMESUFFIX=	-gd
@@ -9,3 +11,5 @@ PKGNAMESUFFIX=	-gd
 TEST_TARGET=    test
 
 .include "${MASTERDIR}/Makefile"
+
+LIB_DEPENDS+=	libgd.so:graphics/gd

Added: head/graphics/php72-gd/files/patch-config.m4
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/php72-gd/files/patch-config.m4	Tue Jul 31 08:47:33 2018	(r475984)
@@ -0,0 +1,20 @@
+--- config.m4.orig	2018-07-11 13:18:02 UTC
++++ config.m4
+@@ -358,7 +358,7 @@ if test "$PHP_GD" != "no"; then
+ 
+   if test "$GD_MODULE_TYPE" = "builtin"; then 
+     PHP_ADD_BUILD_DIR($ext_builddir/libgd)
+-    GDLIB_CFLAGS="-I$ext_srcdir/libgd $GDLIB_CFLAGS"
++    GDLIB_CFLAGS="-I../.. -I$ext_srcdir/libgd $GDLIB_CFLAGS"
+     GD_HEADER_DIRS="ext/gd/ ext/gd/libgd/"
+ 
+     PHP_TEST_BUILD(foobar, [], [
+@@ -366,7 +366,7 @@ if test "$PHP_GD" != "no"; then
+     ], [ $GD_SHARED_LIBADD ], [char foobar () {}])
+   else
+     GD_HEADER_DIRS="ext/gd/"
+-    GDLIB_CFLAGS="-I$GD_INCLUDE $GDLIB_CFLAGS"
++    GDLIB_CFLAGS="-I../.. -I$ext_srcdir/libgd $GDLIB_CFLAGS"
+     PHP_ADD_INCLUDE($GD_INCLUDE)
+     PHP_CHECK_LIBRARY(gd, gdImageCreate, [], [
+       AC_MSG_ERROR([GD build test failed. Please check the config.log for details.])

Modified: head/lang/php72/Makefile.ext
==============================================================================
--- head/lang/php72/Makefile.ext	Tue Jul 31 08:44:56 2018	(r475983)
+++ head/lang/php72/Makefile.ext	Tue Jul 31 08:47:33 2018	(r475984)
@@ -97,12 +97,15 @@ LIB_DEPENDS=	libfreetype.so:print/freetype2 \
 		libpng.so:graphics/png
 USES+=		jpeg
 
-CONFIGURE_ARGS+=--with-gd \
+CONFIGURE_ARGS+=--with-gd=${LOCALBASE} \
 		--with-freetype-dir=${LOCALBASE} \
 		--with-jpeg-dir=${LOCALBASE} \
 		--with-png-dir=${LOCALBASE} \
 		--with-zlib-dir=/usr
 
+EXTRACT_AFTER_ARGS=--no-same-owner --no-same-permissions --exclude libgd \
+		php-${PORTVERSION}/ext/gd
+
 OPTIONS_DEFINE=TRUETYPE JIS WEBP X11
 OPTIONS_DEFAULT=TRUETYPE X11
 
@@ -111,7 +114,6 @@ JIS_DESC=	Enable JIS-mapped Japanese font support
 WEBP_DESC=  Enable WebP image format support
 X11_DESC=	Enable XPM support
 
-PHP_HEADER_DIRS=libgd
 .endif
 
 .if ${PHP_MODNAME} == "gettext"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807310847.w6V8lXJs051900>