svn commit: r475983 - in head: graphics/php71-gd graphics/php71-gd/files lang/php71
Torsten Zuehlsdorff
tz at FreeBSD.org
Tue Jul 31 08:44:58 UTC 2018
Author: tz
Date: Tue Jul 31 08:44:56 2018
New Revision: 475983
URL: https://svnweb.freebsd.org/changeset/ports/475983
Log:
graphics/php71-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 at FreeBSD.org>
Added:
head/graphics/php71-gd/files/
head/graphics/php71-gd/files/patch-config.m4 (contents, props changed)
Modified:
head/graphics/php71-gd/Makefile
head/lang/php71/Makefile.ext
Modified: head/graphics/php71-gd/Makefile
==============================================================================
--- head/graphics/php71-gd/Makefile Tue Jul 31 08:42:19 2018 (r475982)
+++ head/graphics/php71-gd/Makefile Tue Jul 31 08:44:56 2018 (r475983)
@@ -2,6 +2,8 @@
CATEGORIES= graphics
+PORTREVISION= 1
+
MASTERDIR= ${.CURDIR}/../../lang/php71
PKGNAMESUFFIX= -gd
@@ -9,3 +11,5 @@ PKGNAMESUFFIX= -gd
TEST_TARGET= test
.include "${MASTERDIR}/Makefile"
+
+LIB_DEPENDS+= libgd.so:graphics/gd
Added: head/graphics/php71-gd/files/patch-config.m4
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/php71-gd/files/patch-config.m4 Tue Jul 31 08:44:56 2018 (r475983)
@@ -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/php71/Makefile.ext
==============================================================================
--- head/lang/php71/Makefile.ext Tue Jul 31 08:42:19 2018 (r475982)
+++ head/lang/php71/Makefile.ext Tue Jul 31 08:44:56 2018 (r475983)
@@ -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"
More information about the svn-ports-all
mailing list