package/php: fix gd extension dependencies and options
authorLouis Aussedat <aussedat.louis@gmail.com>
Sat, 18 Apr 2020 09:03:43 +0000 (11:03 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 18 Apr 2020 13:25:23 +0000 (15:25 +0200)
Due to migration to pkg-config in php 7.4, the detection of
library dependencies has been changed.

source from php.net:
--with-gd becomes --enable-gd
--with-png-dir has been removed. libpng is required.
--with-zlib-dir has been removed. zlib is required.
--with-freetype-dir becomes --with-freetype
--with-jpeg-dir becomes --with-jpeg

Signed-off-by: Louis Aussedat <aussedat.louis@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/php/Config.ext
package/php/php.mk

index 193bc1bd03c8fdc120f918164d431098cf877db4..66ee935cf09f5abe7b679265c847726f0061cc5a 100644 (file)
@@ -256,6 +256,7 @@ config BR2_PACKAGE_PHP_EXT_GD
        select BR2_PACKAGE_FREETYPE
        select BR2_PACKAGE_JPEG
        select BR2_PACKAGE_LIBPNG
+       select BR2_PACKAGE_ZLIB
        help
          GD support
 
index 8282bb1cc7e12367683eff84243f3954871aa838..4d2f1b8f63a64ac33a9ff7ac6807872f3e5b931d 100644 (file)
@@ -327,12 +327,10 @@ endif
 
 ifeq ($(BR2_PACKAGE_PHP_EXT_GD),y)
 PHP_CONF_OPTS += \
-       --with-gd \
-       --with-jpeg-dir=$(STAGING_DIR)/usr \
-       --with-png-dir=$(STAGING_DIR)/usr \
-       --with-zlib-dir=$(STAGING_DIR)/usr \
-       --with-freetype-dir=$(STAGING_DIR)/usr
-PHP_DEPENDENCIES += jpeg libpng freetype
+       --enable-gd \
+       --with-jpeg \
+       --with-freetype
+PHP_DEPENDENCIES += jpeg libpng freetype zlib
 endif
 
 ifeq ($(BR2_PACKAGE_PHP_SAPI_FPM),y)