aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authortz <tz@FreeBSD.org>2018-07-31 16:42:19 +0800
committertz <tz@FreeBSD.org>2018-07-31 16:42:19 +0800
commit214ca0b9b9e4aeeda68cb4ee7800a75ae90b579f (patch)
tree5be427c5765d38423a70fe8e11a89b5bf50e4475 /graphics
parentd18f75295282583f7c9f8393a265f7c243f2b23d (diff)
downloadfreebsd-ports-gnome-214ca0b9b9e4aeeda68cb4ee7800a75ae90b579f.tar.gz
freebsd-ports-gnome-214ca0b9b9e4aeeda68cb4ee7800a75ae90b579f.tar.zst
freebsd-ports-gnome-214ca0b9b9e4aeeda68cb4ee7800a75ae90b579f.zip
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>
Diffstat (limited to 'graphics')
-rw-r--r--graphics/php70-gd/Makefile5
-rw-r--r--graphics/php70-gd/files/patch-config.m420
2 files changed, 25 insertions, 0 deletions
diff --git a/graphics/php70-gd/Makefile b/graphics/php70-gd/Makefile
index 53aff8871d6e..ad2955439c1d 100644
--- a/graphics/php70-gd/Makefile
+++ b/graphics/php70-gd/Makefile
@@ -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
diff --git a/graphics/php70-gd/files/patch-config.m4 b/graphics/php70-gd/files/patch-config.m4
new file mode 100644
index 000000000000..7e36e3dd138d
--- /dev/null
+++ b/graphics/php70-gd/files/patch-config.m4
@@ -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.])