1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-13 19:03:52 +02:00
openwrt-packages/lang/php7/pecl.mk
Michael Heimpold 333957fba9 php7-pecl-http: fix build for big endian (fixes #3691)
While at, improve pre-seeded dependency detection.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2016-12-23 23:08:29 +01:00

48 lines
1.1 KiB
Makefile

#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Package/php7-pecl/Default
SUBMENU:=PHP
SECTION:=lang
CATEGORY:=Languages
URL:=http://pecl.php.net/
DEPENDS:=php7
endef
define Build/Prepare
$(Build/Prepare/Default)
( cd $(PKG_BUILD_DIR); $(STAGING_DIR)/usr/bin/phpize7 )
endef
CONFIGURE_VARS+= \
ac_cv_c_bigendian_php=$(if $(CONFIG_BIG_ENDIAN),yes,no)
CONFIGURE_ARGS+= \
--with-php-config=$(STAGING_DIR)/usr/bin/php7-config
define PECLPackage
define Package/php7-pecl-$(1)
$(call Package/php7-pecl/Default)
TITLE:=$(2)
ifneq ($(3),)
DEPENDS+=$(3)
endif
endef
define Package/php7-pecl-$(1)/install
$(INSTALL_DIR) $$(1)/usr/lib/php
$(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$(subst -,_,$(1)).so $$(1)/usr/lib/php/
$(INSTALL_DIR) $$(1)/etc/php7
ifeq ($(5),zend)
echo "zend_extension=/usr/lib/php/$(subst -,_,$(1)).so" > $$(1)/etc/php7/$(if $(4),$(4),20)_$(subst -,_,$(1)).ini
else
echo "extension=$(subst -,_,$(1)).so" > $$(1)/etc/php7/$(if $(4),$(4),20)_$(subst -,_,$(1)).ini
endif
endef
endef