package/php: Add support for GD module
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sun, 5 Oct 2014 17:38:57 +0000 (19:38 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 26 Oct 2014 21:31:00 +0000 (22:31 +0100)
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/php/Config.ext
package/php/php.mk

index 6880cd76e4b51aa2504b8090e6427c192a2d733a..f745cc9e3b3a0baa860eaa97103fcb3bfbbafbec 100644 (file)
@@ -194,6 +194,14 @@ config BR2_PACKAGE_PHP_EXT_EXIF
        help
          EXIF support
 
+config BR2_PACKAGE_PHP_EXT_GD
+       bool "GD"
+       select BR2_PACKAGE_FREETYPE
+       select BR2_PACKAGE_JPEG
+       select BR2_PACKAGE_LIBPNG
+       help
+         GD support
+
 comment "Mathematical extensions"
 
 config BR2_PACKAGE_PHP_EXT_BCMATH
index afb55b430773ca10198edab4bc0f470a8bd884e8..c2840f3d105777c9828467505613c157021aa3e7 100644 (file)
@@ -212,6 +212,14 @@ ifeq ($(BR2_PACKAGE_PHP_EXT_SNMP),y)
        PHP_DEPENDENCIES += netsnmp
 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
+endif
+
 define PHP_EXTENSIONS_FIXUP
        $(SED) "/prefix/ s:/usr:$(STAGING_DIR)/usr:" \
                $(STAGING_DIR)/usr/bin/phpize