You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.3 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. define Package/php7-pecl/Default
  6. SUBMENU:=PHP7
  7. SECTION:=lang
  8. CATEGORY:=Languages
  9. URL:=http://pecl.php.net/
  10. DEPENDS:=php7
  11. endef
  12. define Build/Prepare
  13. $(Build/Prepare/Default)
  14. $(if $(QUILT),,( cd $(PKG_BUILD_DIR); $(STAGING_DIR)/usr/bin/phpize7 ))
  15. endef
  16. define Build/Configure
  17. $(if $(QUILT),( cd $(PKG_BUILD_DIR); $(STAGING_DIR)/usr/bin/phpize7 ))
  18. $(Build/Configure/Default)
  19. endef
  20. CONFIGURE_VARS+= \
  21. ac_cv_c_bigendian_php=$(if $(CONFIG_BIG_ENDIAN),yes,no)
  22. CONFIGURE_ARGS+= \
  23. --with-php-config=$(STAGING_DIR)/usr/bin/php7-config
  24. define PHP7PECLPackage
  25. define Package/php7-pecl-$(1)
  26. $(call Package/php7-pecl/Default)
  27. TITLE:=$(2)
  28. ifneq ($(3),)
  29. DEPENDS+=$(3)
  30. endif
  31. endef
  32. define Package/php7-pecl-$(1)/install
  33. $(INSTALL_DIR) $$(1)/usr/lib/php
  34. $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$(subst -,_,$(1)).so $$(1)/usr/lib/php/
  35. $(INSTALL_DIR) $$(1)/etc/php7
  36. ifeq ($(5),zend)
  37. echo "zend_extension=/usr/lib/php/$(subst -,_,$(1)).so" > $$(1)/etc/php7/$(if $(4),$(4),20)_$(subst -,_,$(1)).ini
  38. else
  39. echo "extension=$(subst -,_,$(1)).so" > $$(1)/etc/php7/$(if $(4),$(4),20)_$(subst -,_,$(1)).ini
  40. endif
  41. endef
  42. endef