Skip to contentSkip to conversation

package/php: fix zip support

PATCH New Louis Aussedat 3 participants 6 messages Apr 18, 2020 – May 6, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/php: fix zip support

since php7.4, --enable-zip becomes --with-zip due to migration to pkg-config.

---
 package/php/php.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/php/php.mk +1 -1
index 91f82dbf31..8282bb1cc7 100644
@@ -113,7 +113,7 @@ PHP_CONF_OPTS += \
 	$(if $(BR2_PACKAGE_PHP_EXT_SYSVMSG),--enable-sysvmsg) \
 	$(if $(BR2_PACKAGE_PHP_EXT_SYSVSEM),--enable-sysvsem) \
 	$(if $(BR2_PACKAGE_PHP_EXT_SYSVSHM),--enable-sysvshm) \
-	$(if $(BR2_PACKAGE_PHP_EXT_ZIP),--enable-zip) \
+	$(if $(BR2_PACKAGE_PHP_EXT_ZIP),--with-zip) \
 	$(if $(BR2_PACKAGE_PHP_EXT_CTYPE),--enable-ctype) \
 	$(if $(BR2_PACKAGE_PHP_EXT_FILTER),--enable-filter) \
 	$(if $(BR2_PACKAGE_PHP_EXT_CALENDAR),--enable-calendar) \
Signature · 1 line
2.26.0
#1 lore raw

PATCH 2/2 package/php: fix gd dependencies

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

---
 package/php/Config.ext |  1 +
 package/php/php.mk     | 10 ++++------
 2 files changed, 5 insertions(+), 6 deletions(-)
package/php/Config.ext +1 -0
index 193bc1bd03..66ee935cf0 100644
@@ -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
 
package/php/php.mk +4 -6
index 8282bb1cc7..4d2f1b8f63 100644
@@ -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)
Signature · 1 line
2.26.0
#2 lore raw

PATCH 2/2 package/php: fix gd dependencies

Hello Louis,

Quoted 11 lines · On Sat, 18 Apr 2020 11:03:43 +0200 Louis Aussedat <[email protected]>…

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

I've applied. However, we are currently using the bundled libgd source code that comes from PHP, but it would be good to use an external gd library from package/gd. This would also allow to make the freetype/jpeg dependencies optional.

Could you have a look at doing this?

Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 2/2 package/php: fix gd dependencies

In reply to Louis Aussedat
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Louis" == Louis Aussedat <[email protected]> writes:

Due to migration to pkg-config in php 7.4, the detection of library dependencies has been changed.

Quoted 8 lines

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

Committed to 2020.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH 1/2 package/php: fix zip support

In reply to Louis Aussedat
Quoted 7 lines · On Sat, 18 Apr 2020 11:03:42 +0200 Louis Aussedat <[email protected]>…

since php7.4, --enable-zip becomes --with-zip due to migration to pkg-config.

---
 package/php/php.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com