View | Details | Raw Unified | Return to bug 252115
Collapse All | Expand All

(-)b/graphics/php73-gd/files/patch-config.m4 (-4 / +39 lines)
Lines 1-6 Link Here
1
--- config.m4.orig	2018-09-25 09:07:58 UTC
1
--- config.m4.orig	2020-11-24 11:10:57 UTC
2
+++ config.m4
2
+++ config.m4
3
@@ -285,6 +285,7 @@ dnl enable the support in bundled GD lib
3
@@ -184,6 +184,9 @@ AC_DEFUN([PHP_GD_XPM],[
4
 AC_DEFUN([PHP_GD_FREETYPE2],[
5
   if test "$PHP_FREETYPE_DIR" != "no"; then
6
 
7
+    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
8
+
9
+    AC_MSG_CHECKING([for freetype])
10
     for i in $PHP_FREETYPE_DIR /usr/local /usr; do
11
       if test -f "$i/bin/freetype-config"; then
12
         FREETYPE2_DIR=$i
13
@@ -192,13 +195,20 @@ AC_DEFUN([PHP_GD_FREETYPE2],[
14
       fi
15
     done
16
 
17
-    if test -z "$FREETYPE2_DIR"; then
18
+    if test -n "$FREETYPE2_CONFIG"; then
19
+      FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
20
+      FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
21
+      AC_MSG_RESULT([found in $FREETYPE2_DIR])
22
+    elif test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists freetype2; then
23
+      FREETYPE2_DIR=pkg-config
24
+      FREETYPE2_CFLAGS=`$PKG_CONFIG freetype2 --cflags`
25
+      FREETYPE2_LIBS=`$PKG_CONFIG freetype2 --libs`
26
+      AC_MSG_RESULT([found by pkg-config])
27
+    else
28
+      AC_MSG_RESULT([not found])
29
       AC_MSG_ERROR([freetype-config not found.])
30
     fi
31
 
32
-    FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
33
-    FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
34
-
35
     PHP_EVAL_INCLINE($FREETYPE2_CFLAGS)
36
     PHP_EVAL_LIBLINE($FREETYPE2_LIBS, GD_SHARED_LIBADD)
37
     AC_DEFINE(HAVE_LIBFREETYPE,1,[ ])
38
@@ -285,6 +295,7 @@ dnl enable the support in bundled GD library
4
 
39
 
5
   if test -n "$GD_XPM_DIR"; then
40
   if test -n "$GD_XPM_DIR"; then
6
     AC_DEFINE(HAVE_GD_XPM, 1, [ ])
41
     AC_DEFINE(HAVE_GD_XPM, 1, [ ])
Lines 8-14 Link Here
8
     GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_XPM"
43
     GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_XPM"
9
   fi
44
   fi
10
 
45
 
11
@@ -347,7 +348,7 @@ if test "$PHP_GD" != "no"; then
46
@@ -347,7 +358,7 @@ if test "$PHP_GD" != "no"; then
12
 
47
 
13
   if test "$GD_MODULE_TYPE" = "builtin"; then
48
   if test "$GD_MODULE_TYPE" = "builtin"; then
14
     PHP_ADD_BUILD_DIR($ext_builddir/libgd)
49
     PHP_ADD_BUILD_DIR($ext_builddir/libgd)
Lines 17-23 Link Here
17
     GD_HEADER_DIRS="ext/gd/ ext/gd/libgd/"
52
     GD_HEADER_DIRS="ext/gd/ ext/gd/libgd/"
18
 
53
 
19
     PHP_TEST_BUILD(foobar, [], [
54
     PHP_TEST_BUILD(foobar, [], [
20
@@ -355,7 +356,7 @@ if test "$PHP_GD" != "no"; then
55
@@ -355,7 +366,7 @@ if test "$PHP_GD" != "no"; then
21
     ], [ $GD_SHARED_LIBADD ], [char foobar () {}])
56
     ], [ $GD_SHARED_LIBADD ], [char foobar () {}])
22
   else
57
   else
23
     GD_HEADER_DIRS="ext/gd/"
58
     GD_HEADER_DIRS="ext/gd/"
(-)b/lang/php73/Makefile.ext (-1 / +1 lines)
Lines 95-101 USES+= ssl Link Here
95
.if ${PHP_MODNAME} == "gd"
95
.if ${PHP_MODNAME} == "gd"
96
LIB_DEPENDS=	libfreetype.so:print/freetype2 \
96
LIB_DEPENDS=	libfreetype.so:print/freetype2 \
97
		libpng.so:graphics/png
97
		libpng.so:graphics/png
98
USES+=		jpeg
98
USES+=		jpeg pkgconfig
99
99
100
CONFIGURE_ARGS+=--with-gd=${LOCALBASE} \
100
CONFIGURE_ARGS+=--with-gd=${LOCALBASE} \
101
		--with-freetype-dir=${LOCALBASE} \
101
		--with-freetype-dir=${LOCALBASE} \

Return to bug 252115