Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jul 2018 08:42:19 +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: r475982 - in head: graphics/php70-gd graphics/php70-gd/files lang/php70
Message-ID:  <201807310842.w6V8gJ4X050774@repo.freebsd.org>

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

Log:
  graphics/php70-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/php70-gd/files/
  head/graphics/php70-gd/files/patch-config.m4   (contents, props changed)
Modified:
  head/graphics/php70-gd/Makefile
  head/lang/php70/Makefile.ext

Modified: head/graphics/php70-gd/Makefile
==============================================================================
--- head/graphics/php70-gd/Makefile	Tue Jul 31 08:41:22 2018	(r475981)
+++ head/graphics/php70-gd/Makefile	Tue Jul 31 08:42:19 2018	(r475982)
@@ -2,9 +2,14 @@
 # $FreeBSD$
 
 CATEGORIES=	graphics
+PORTREVISION=	1
 
 MASTERDIR=	${.CURDIR}/../../lang/php70
 
 PKGNAMESUFFIX=	-gd
 
+TEST_TARGET=	test
+
 .include "${MASTERDIR}/Makefile"
+
+LIB_DEPENDS+=	libgd.so:graphics/gd

Added: head/graphics/php70-gd/files/patch-config.m4
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/php70-gd/files/patch-config.m4	Tue Jul 31 08:42:19 2018	(r475982)
@@ -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/php70/Makefile.ext
==============================================================================
--- head/lang/php70/Makefile.ext	Tue Jul 31 08:41:22 2018	(r475981)
+++ head/lang/php70/Makefile.ext	Tue Jul 31 08:42:19 2018	(r475982)
@@ -96,12 +96,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
 
@@ -110,7 +113,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?201807310842.w6V8gJ4X050774>