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.

605 lines
18 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=php
  7. PKG_VERSION:=7.1.6
  8. PKG_RELEASE:=2
  9. PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
  10. PKG_LICENSE:=PHPv3.01
  11. PKG_LICENSE_FILES:=LICENSE
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  13. PKG_SOURCE_URL:=http://www.php.net/distributions/
  14. PKG_MD5SUM:=eafc7a79cc8cc62c9292c96f9c9ccf90
  15. PKG_HASH:=01584dc521ab7ec84b502b61952f573652fe6aa00c18d6d844fb9209f14b245b
  16. PKG_FIXUP:=libtool autoreconf
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_USE_MIPS16:=0
  19. PHP7_MODULES = \
  20. calendar ctype curl \
  21. fileinfo \
  22. dom \
  23. exif \
  24. ftp \
  25. gettext gd gmp \
  26. hash \
  27. iconv intl \
  28. json \
  29. ldap \
  30. mbstring mcrypt mysqli \
  31. opcache openssl \
  32. pcntl pdo pdo-mysql pdo-pgsql pdo-sqlite pgsql phar \
  33. session shmop simplexml snmp soap sockets sqlite3 sysvmsg sysvsem sysvshm \
  34. tokenizer \
  35. xml xmlreader xmlwriter zip \
  36. PKG_CONFIG_DEPENDS:= \
  37. $(patsubst %,CONFIG_PACKAGE_php7-mod-%,$(PHP7_MODULES)) \
  38. CONFIG_PHP7_FILTER CONFIG_PHP7_LIBXML CONFIG_PHP7_SYSTEMTZDATA
  39. include $(INCLUDE_DIR)/package.mk
  40. include $(INCLUDE_DIR)/nls.mk
  41. define Package/php7/Default
  42. SUBMENU:=PHP
  43. SECTION:=lang
  44. CATEGORY:=Languages
  45. TITLE:=PHP7 Hypertext preprocessor
  46. URL:=http://www.php.net/
  47. DEPENDS:=php7
  48. endef
  49. define Package/php7/Default/description
  50. PHP is a widely-used general-purpose scripting language that is especially
  51. suited for Web development and can be embedded into HTML.
  52. endef
  53. define Package/php7/config
  54. config PHP7_FILTER
  55. bool "PHP7 Filter support"
  56. depends on PACKAGE_php7-cli || PACKAGE_php7-cgi
  57. default y
  58. config PHP7_LIBXML
  59. bool "PHP7 LIBXML support"
  60. depends on PACKAGE_php7-cli || PACKAGE_php7-cgi
  61. config PHP7_SYSTEMTZDATA
  62. bool "Use system timezone data instead of php's built-in database"
  63. depends on PACKAGE_php7-cli || PACKAGE_php7-cgi
  64. select PACKAGE_zoneinfo-core
  65. default y
  66. help
  67. Enabling this feature automatically selects the zoneinfo-core package
  68. which contains data for UTC timezone. To use other timezones you have
  69. to install the corresponding zoneinfo-... package(s).
  70. endef
  71. define Package/php7
  72. $(call Package/php7/Default)
  73. DEPENDS:=+libpcre +zlib \
  74. +PHP7_LIBXML:libxml2
  75. endef
  76. define Package/php7/description
  77. $(call Package/php7/Default/description)
  78. This package contains only the PHP config file. You must actually choose
  79. your PHP flavour (cli, cgi or fastcgi).
  80. Please note, that installing php5 and php7 in parallel on the same target
  81. is not supported in OpenWrt/LEDE.
  82. endef
  83. define Package/php7-cli
  84. $(call Package/php7/Default)
  85. DEPENDS+= +PACKAGE_php7-mod-intl:libstdcpp
  86. TITLE+= (CLI)
  87. endef
  88. define Package/php7-cli/description
  89. $(call Package/php7/Default/description)
  90. This package contains the CLI version of the PHP7 interpreter.
  91. endef
  92. define Package/php7-cgi
  93. $(call Package/php7/Default)
  94. DEPENDS+= +PACKAGE_php7-mod-intl:libstdcpp
  95. TITLE+= (CGI & FastCGI)
  96. endef
  97. define Package/php7-cgi/description
  98. $(call Package/php7/Default/description)
  99. This package contains the CGI version of the PHP7 interpreter.
  100. endef
  101. define Package/php7-fastcgi
  102. $(call Package/php7/Default)
  103. DEPENDS+= +php7-cgi
  104. TITLE:=FastCGI startup script
  105. endef
  106. define Package/php7-fastcgi/description
  107. As FastCGI support is now a core feature the php7-fastcgi package now depends
  108. on the php7-cgi package, containing just the startup script.
  109. endef
  110. define Package/php7-fpm
  111. $(call Package/php7/Default)
  112. DEPENDS+= +php7-cgi
  113. TITLE+= (FPM)
  114. endef
  115. define Package/php7-fpm/description
  116. $(call Package/php7/Default/description)
  117. This package contains the FastCGI Process Manager of the PHP7 interpreter.
  118. endef
  119. # not everything groks --disable-nls
  120. DISABLE_NLS:=
  121. CONFIGURE_ARGS+= \
  122. --enable-cli \
  123. --enable-cgi \
  124. --enable-fpm \
  125. --enable-shared \
  126. --disable-static \
  127. --disable-rpath \
  128. --disable-debug \
  129. --disable-phpdbg \
  130. --without-pear \
  131. \
  132. --with-config-file-path=/etc \
  133. --with-config-file-scan-dir=/etc/php7 \
  134. --disable-short-tags \
  135. \
  136. --with-zlib="$(STAGING_DIR)/usr" \
  137. --with-zlib-dir="$(STAGING_DIR)/usr"
  138. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-calendar),)
  139. CONFIGURE_ARGS+= --enable-calendar=shared
  140. else
  141. CONFIGURE_ARGS+= --disable-calendar
  142. endif
  143. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-ctype),)
  144. CONFIGURE_ARGS+= --enable-ctype=shared
  145. else
  146. CONFIGURE_ARGS+= --disable-ctype
  147. endif
  148. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-curl),)
  149. CONFIGURE_ARGS+= --with-curl=shared,"$(STAGING_DIR)/usr"
  150. else
  151. CONFIGURE_ARGS+= --without-curl
  152. endif
  153. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-fileinfo),)
  154. CONFIGURE_ARGS+= --enable-fileinfo=shared
  155. else
  156. CONFIGURE_ARGS+= --disable-fileinfo
  157. endif
  158. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gettext),)
  159. CONFIGURE_ARGS+= --with-gettext=shared,"$(STAGING_DIR)/usr/lib/libintl-full"
  160. else
  161. CONFIGURE_ARGS+= --without-gettext
  162. endif
  163. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-dom),)
  164. CONFIGURE_ARGS+= --enable-dom=shared
  165. else
  166. CONFIGURE_ARGS+= --disable-dom
  167. endif
  168. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-exif),)
  169. CONFIGURE_ARGS+= --enable-exif=shared
  170. else
  171. CONFIGURE_ARGS+= --disable-exif
  172. endif
  173. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-ftp),)
  174. CONFIGURE_ARGS+= --enable-ftp=shared
  175. else
  176. CONFIGURE_ARGS+= --disable-ftp
  177. endif
  178. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gd),)
  179. CONFIGURE_ARGS+= \
  180. --with-gd=shared \
  181. --without-freetype-dir \
  182. --with-jpeg-dir="$(STAGING_DIR)/usr" \
  183. --with-png-dir="$(STAGING_DIR)/usr" \
  184. --without-xpm-dir \
  185. --enable-gd-native-ttf \
  186. --disable-gd-jis-conv
  187. else
  188. CONFIGURE_ARGS+= --without-gd
  189. endif
  190. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gmp),)
  191. CONFIGURE_ARGS+= --with-gmp=shared,"$(STAGING_DIR)/usr"
  192. else
  193. CONFIGURE_ARGS+= --without-gmp
  194. endif
  195. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-hash),)
  196. CONFIGURE_ARGS+= --enable-hash=shared
  197. else
  198. CONFIGURE_ARGS+= --disable-hash
  199. endif
  200. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-iconv),)
  201. CONFIGURE_ARGS+= --with-iconv=shared,"$(ICONV_PREFIX)"
  202. else
  203. CONFIGURE_ARGS+= --without-iconv
  204. endif
  205. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-intl),)
  206. CONFIGURE_ARGS+= --enable-intl=shared
  207. TARGET_CXXFLAGS+= -std=c++0x
  208. else
  209. CONFIGURE_ARGS+= --disable-intl
  210. endif
  211. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-json),)
  212. CONFIGURE_ARGS+= --enable-json=shared
  213. else
  214. CONFIGURE_ARGS+= --disable-json
  215. endif
  216. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-ldap),)
  217. CONFIGURE_ARGS+= \
  218. --with-ldap=shared,"$(STAGING_DIR)/usr" \
  219. --with-ldap-sasl="$(STAGING_DIR)/usr"
  220. else
  221. CONFIGURE_ARGS+= --without-ldap
  222. endif
  223. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-mbstring),)
  224. CONFIGURE_ARGS+= --enable-mbstring=shared --enable-mbregex
  225. else
  226. CONFIGURE_ARGS+= --disable-mbstring
  227. endif
  228. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-mcrypt),)
  229. CONFIGURE_ARGS+= --with-mcrypt=shared,"$(STAGING_DIR)/usr"
  230. else
  231. CONFIGURE_ARGS+= --without-mcrypt
  232. endif
  233. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-mysqli),)
  234. CONFIGURE_ARGS+= --with-mysqli=shared,"$(STAGING_DIR)/usr/bin/mysql_config"
  235. else
  236. CONFIGURE_ARGS+= --without-mysqli
  237. endif
  238. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-opcache),)
  239. CONFIGURE_ARGS+= --enable-opcache=shared
  240. else
  241. CONFIGURE_ARGS+= --disable-opcache
  242. endif
  243. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-openssl)$(CONFIG_PACKAGE_php7-mod-snmp),)
  244. CONFIGURE_ARGS+= \
  245. --with-openssl=shared,"$(STAGING_DIR)/usr" \
  246. --with-kerberos=no \
  247. --with-openssl-dir="$(STAGING_DIR)/usr"
  248. else
  249. CONFIGURE_ARGS+= --without-openssl
  250. endif
  251. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pcntl),)
  252. CONFIGURE_ARGS+= --enable-pcntl=shared
  253. else
  254. CONFIGURE_ARGS+= --disable-pcntl
  255. endif
  256. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo),)
  257. CONFIGURE_ARGS+= --enable-pdo=shared
  258. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo-mysql),)
  259. CONFIGURE_ARGS+= --with-pdo-mysql=shared,"$(STAGING_DIR)/usr"
  260. else
  261. CONFIGURE_ARGS+= --without-pdo-mysql
  262. endif
  263. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo-pgsql),)
  264. CONFIGURE_ARGS+= --with-pdo-pgsql=shared,"$(STAGING_DIR)/usr"
  265. else
  266. CONFIGURE_ARGS+= --without-pdo-pgsql
  267. endif
  268. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo-sqlite),)
  269. CONFIGURE_ARGS+= --with-pdo-sqlite=shared,"$(STAGING_DIR)/usr"
  270. else
  271. CONFIGURE_ARGS+= --without-pdo-sqlite
  272. endif
  273. else
  274. CONFIGURE_ARGS+= --disable-pdo
  275. endif
  276. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pgsql),)
  277. CONFIGURE_ARGS+= --with-pgsql=shared,"$(STAGING_DIR)/usr"
  278. else
  279. CONFIGURE_ARGS+= --without-pgsql
  280. endif
  281. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-phar),)
  282. CONFIGURE_ARGS+= --enable-phar=shared
  283. else
  284. CONFIGURE_ARGS+= --disable-phar
  285. endif
  286. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-session),)
  287. CONFIGURE_ARGS+= --enable-session=shared
  288. else
  289. CONFIGURE_ARGS+= --disable-session
  290. endif
  291. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-shmop),)
  292. CONFIGURE_ARGS+= --enable-shmop=shared
  293. else
  294. CONFIGURE_ARGS+= --disable-shmop
  295. endif
  296. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-simplexml),)
  297. CONFIGURE_ARGS+= --enable-simplexml=shared
  298. else
  299. CONFIGURE_ARGS+= --disable-simplexml
  300. endif
  301. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-snmp),)
  302. CONFIGURE_ARGS+= --with-snmp=shared,"$(STAGING_DIR)/usr"
  303. else
  304. CONFIGURE_ARGS+= --without-snmp
  305. endif
  306. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-soap),)
  307. CONFIGURE_ARGS+= --enable-soap=shared
  308. else
  309. CONFIGURE_ARGS+= --disable-soap
  310. endif
  311. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sockets),)
  312. CONFIGURE_ARGS+= --enable-sockets=shared
  313. else
  314. CONFIGURE_ARGS+= --disable-sockets
  315. endif
  316. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sqlite3),)
  317. CONFIGURE_ARGS+= --with-sqlite3=shared,"$(STAGING_DIR)/usr"
  318. else
  319. CONFIGURE_ARGS+= --without-sqlite3
  320. endif
  321. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sysvmsg),)
  322. CONFIGURE_ARGS+= --enable-sysvmsg=shared
  323. else
  324. CONFIGURE_ARGS+= --disable-sysvmsg
  325. endif
  326. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sysvsem),)
  327. CONFIGURE_ARGS+= --enable-sysvsem=shared
  328. else
  329. CONFIGURE_ARGS+= --disable-sysvsem
  330. endif
  331. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sysvshm),)
  332. CONFIGURE_ARGS+= --enable-sysvshm=shared
  333. else
  334. CONFIGURE_ARGS+= --disable-sysvshm
  335. endif
  336. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-tokenizer),)
  337. CONFIGURE_ARGS+= --enable-tokenizer=shared
  338. else
  339. CONFIGURE_ARGS+= --disable-tokenizer
  340. endif
  341. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-xml),)
  342. CONFIGURE_ARGS+= --enable-xml=shared,"$(STAGING_DIR)/usr"
  343. ifneq ($(CONFIG_PHP7_LIBXML),)
  344. CONFIGURE_ARGS+= --with-libxml-dir="$(STAGING_DIR)/usr/include/libxml2"
  345. else
  346. CONFIGURE_ARGS+= --with-libexpat-dir="$(STAGING_DIR)/usr"
  347. endif
  348. else
  349. CONFIGURE_ARGS+= --disable-xml
  350. endif
  351. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-xmlreader),)
  352. CONFIGURE_ARGS+= --enable-xmlreader=shared,"$(STAGING_DIR)/usr"
  353. else
  354. CONFIGURE_ARGS+= --disable-xmlreader
  355. endif
  356. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-xmlwriter),)
  357. CONFIGURE_ARGS+= --enable-xmlwriter=shared,"$(STAGING_DIR)/usr"
  358. else
  359. CONFIGURE_ARGS+= --disable-xmlwriter
  360. endif
  361. ifneq ($(CONFIG_PACKAGE_php7-mod-zip),)
  362. CONFIGURE_ARGS+= --enable-zip=shared
  363. else
  364. CONFIGURE_ARGS+= --disable-zip
  365. endif
  366. ifneq ($(SDK)$(CONFIG_PHP7_FILTER),)
  367. CONFIGURE_ARGS+= --enable-filter
  368. else
  369. CONFIGURE_ARGS+= --disable-filter
  370. endif
  371. ifneq ($(SDK)$(CONFIG_PHP7_LIBXML),)
  372. CONFIGURE_ARGS+= --enable-libxml
  373. CONFIGURE_ARGS+= --with-libxml-dir="$(STAGING_DIR)/usr/include/libxml2"
  374. else
  375. CONFIGURE_ARGS+= --disable-libxml
  376. endif
  377. #ifneq ($(CONFIG_PHP7_SYSTEMTZDATA),)
  378. # CONFIGURE_ARGS+= --with-system-tzdata
  379. #else
  380. # CONFIGURE_ARGS+= --without-system-tzdata
  381. #endif
  382. CONFIGURE_VARS+= \
  383. ac_cv_c_bigendian_php=$(if $(CONFIG_BIG_ENDIAN),yes,no) \
  384. php_cv_cc_rpath="no" \
  385. iconv_impl_name="gnu_libiconv" \
  386. ac_cv_php_xml2_config_path="$(STAGING_DIR)/host/bin/xml2-config" \
  387. define Package/php7/conffiles
  388. /etc/php.ini
  389. endef
  390. define Package/php7/install
  391. $(INSTALL_DIR) $(1)/etc
  392. $(INSTALL_DATA) ./files/php.ini $(1)/etc/
  393. endef
  394. define Package/php7-cli/install
  395. $(INSTALL_DIR) $(1)/usr/bin
  396. $(CP) $(PKG_BUILD_DIR)/sapi/cli/php $(1)/usr/bin/php-cli
  397. endef
  398. define Package/php7-cgi/install
  399. $(INSTALL_DIR) $(1)/usr/bin
  400. $(CP) $(PKG_BUILD_DIR)/sapi/cgi/php-cgi $(1)/usr/bin/php-cgi
  401. ln -sf php-cgi $(1)/usr/bin/php-fcgi
  402. endef
  403. define Package/php7-fastcgi/install
  404. $(INSTALL_DIR) $(1)/etc/config
  405. $(INSTALL_DATA) ./files/php7-fastcgi.config $(1)/etc/config/php7-fastcgi
  406. $(INSTALL_DIR) $(1)/etc/init.d
  407. $(INSTALL_BIN) ./files/php7-fastcgi.init $(1)/etc/init.d/php7-fastcgi
  408. endef
  409. define Package/php7-fpm/install
  410. $(INSTALL_DIR) $(1)/usr/bin
  411. $(INSTALL_BIN) $(PKG_BUILD_DIR)/sapi/fpm/php-fpm $(1)/usr/bin/php-fpm
  412. $(INSTALL_DIR) $(1)/etc
  413. $(INSTALL_DATA) ./files/php7-fpm.conf $(1)/etc/php7-fpm.conf
  414. $(INSTALL_DIR) $(1)/etc/config
  415. $(INSTALL_DATA) ./files/php7-fpm.config $(1)/etc/config/php7-fpm
  416. $(INSTALL_DIR) $(1)/etc/php7-fpm.d
  417. $(INSTALL_DATA) ./files/php7-fpm-www.conf $(1)/etc/php7-fpm.d/www.conf
  418. $(INSTALL_DIR) $(1)/etc/init.d
  419. $(INSTALL_BIN) ./files/php7-fpm.init $(1)/etc/init.d/php7-fpm
  420. endef
  421. define Build/Prepare
  422. $(call Build/Prepare/Default)
  423. ( cd $(PKG_BUILD_DIR); touch configure.in; ./buildconf --force )
  424. endef
  425. define Build/InstallDev
  426. rm -rf $(PKG_BUILD_DIR)/staging
  427. make -C $(PKG_BUILD_DIR) install INSTALL_ROOT=$(PKG_BUILD_DIR)/staging
  428. rm -rf $(PKG_BUILD_DIR)/staging/usr/{share,man,sbin}
  429. rm -f $(PKG_BUILD_DIR)/staging/usr/bin/{php,php-cgi,php-cli}
  430. mv $(PKG_BUILD_DIR)/staging/usr/bin/phpize $(PKG_BUILD_DIR)/staging/usr/bin/phpize7
  431. mv $(PKG_BUILD_DIR)/staging/usr/bin/php-config $(PKG_BUILD_DIR)/staging/usr/bin/php7-config
  432. mv $(PKG_BUILD_DIR)/staging/usr/include/php $(PKG_BUILD_DIR)/staging/usr/include/php7
  433. mv $(PKG_BUILD_DIR)/staging/usr/lib/php $(PKG_BUILD_DIR)/staging/usr/lib/php7
  434. $(CP) $(PKG_BUILD_DIR)/staging/usr $(STAGING_DIR)/
  435. sed -i -e "s#prefix='/usr'#prefix='$(STAGING_DIR)/usr'#" $(STAGING_DIR)/usr/bin/phpize7
  436. sed -i -e "s#exec_prefix=\"\`eval echo /usr\`\"#exec_prefix='$(STAGING_DIR)/usr'#" $(STAGING_DIR)/usr/bin/phpize7
  437. sed -i -e "s#/include\`/php\"#/include\`/php7\"#" $(STAGING_DIR)/usr/bin/phpize7
  438. sed -i -e "s#/lib/php\`/build\"#/lib/php7\`/build\"#" $(STAGING_DIR)/usr/bin/phpize7
  439. sed -i -e "s#prefix=\"/usr\"#prefix=\"$(STAGING_DIR)/usr\"#" $(STAGING_DIR)/usr/bin/php7-config
  440. sed -i -e "s#/include/php\"#/include/php7\"#" $(STAGING_DIR)/usr/bin/php7-config
  441. endef
  442. define BuildModule
  443. define Package/php7-mod-$(1)
  444. $(call Package/php7/Default)
  445. ifneq ($(3),)
  446. DEPENDS+=$(3)
  447. endif
  448. TITLE:=$(2) shared module
  449. endef
  450. define Package/php7-mod-$(1)/install
  451. $(INSTALL_DIR) $$(1)/usr/lib/php
  452. $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$(subst -,_,$(1)).so $$(1)/usr/lib/php/
  453. $(INSTALL_DIR) $$(1)/etc/php7
  454. ifeq ($(5),zend)
  455. echo "zend_extension=/usr/lib/php/$(subst -,_,$(1)).so" > $$(1)/etc/php7/$(if $(4),$(4),20)_$(subst -,_,$(1)).ini
  456. else
  457. echo "extension=$(subst -,_,$(1)).so" > $$(1)/etc/php7/$(if $(4),$(4),20)_$(subst -,_,$(1)).ini
  458. endif
  459. endef
  460. $$(eval $$(call BuildPackage,php7-mod-$(1)))
  461. endef
  462. $(eval $(call BuildPackage,php7))
  463. $(eval $(call BuildPackage,php7-cgi))
  464. $(eval $(call BuildPackage,php7-cli))
  465. $(eval $(call BuildPackage,php7-fastcgi))
  466. $(eval $(call BuildPackage,php7-fpm))
  467. #$(eval $(call BuildModule,NAME,TITLE[,PKG DEPENDS]))
  468. $(eval $(call BuildModule,calendar,Calendar))
  469. $(eval $(call BuildModule,ctype,Ctype))
  470. $(eval $(call BuildModule,curl,cURL,+PACKAGE_php7-mod-curl:libcurl))
  471. $(eval $(call BuildModule,dom,DOM,+@PHP7_LIBXML +PACKAGE_php7-mod-dom:libxml2))
  472. $(eval $(call BuildModule,exif,EXIF))
  473. $(eval $(call BuildModule,fileinfo,Fileinfo))
  474. $(eval $(call BuildModule,ftp,FTP,+PACKAGE_php7-mod-ftp:libopenssl))
  475. $(eval $(call BuildModule,gd,GD graphics,+PACKAGE_php7-mod-gd:libjpeg +PACKAGE_php7-mod-gd:libpng))
  476. $(eval $(call BuildModule,gettext,Gettext,+PACKAGE_php7-mod-gettext:libintl-full))
  477. $(eval $(call BuildModule,gmp,GMP,+PACKAGE_php7-mod-gmp:libgmp))
  478. $(eval $(call BuildModule,hash,Hash))
  479. $(eval $(call BuildModule,iconv,iConv,$(ICONV_DEPENDS)))
  480. $(eval $(call BuildModule,intl,Internationalization Functions,+PACKAGE_php7-mod-intl:icu))
  481. $(eval $(call BuildModule,json,JSON))
  482. $(eval $(call BuildModule,ldap,LDAP,+PACKAGE_php7-mod-ldap:libopenldap +PACKAGE_php7-mod-ldap:libsasl2))
  483. $(eval $(call BuildModule,mbstring,MBString))
  484. $(eval $(call BuildModule,mcrypt,Mcrypt,+PACKAGE_php7-mod-mcrypt:libmcrypt +PACKAGE_php7-mod-mcrypt:libltdl))
  485. $(eval $(call BuildModule,mysqli,MySQL Improved Extension,+PACKAGE_php7-mod-mysqli:libmysqlclient))
  486. $(eval $(call BuildModule,opcache,OPcache,,,zend))
  487. $(eval $(call BuildModule,openssl,OpenSSL,+PACKAGE_php7-mod-openssl:libopenssl))
  488. $(eval $(call BuildModule,pcntl,PCNTL))
  489. $(eval $(call BuildModule,pdo,PHP Data Objects))
  490. $(eval $(call BuildModule,pdo-mysql,PDO driver for MySQL,+php7-mod-pdo +PACKAGE_php7-mod-pdo-mysql:libmysqlclient))
  491. $(eval $(call BuildModule,pdo-pgsql,PDO driver for PostgreSQL,+php7-mod-pdo +PACKAGE_php7-mod-pdo-pgsql:libpq))
  492. $(eval $(call BuildModule,pdo-sqlite,PDO driver for SQLite 3.x,+php7-mod-pdo +PACKAGE_php7-mod-pdo-sqlite:libsqlite3 +PACKAGE_php7-mod-pdo-sqlite:librt))
  493. $(eval $(call BuildModule,pgsql,PostgreSQL,+PACKAGE_php7-mod-pgsql:libpq))
  494. $(eval $(call BuildModule,phar,Phar Archives,+php7-mod-hash))
  495. $(eval $(call BuildModule,session,Session))
  496. $(eval $(call BuildModule,shmop,Shared Memory))
  497. $(eval $(call BuildModule,simplexml,SimpleXML,+@PHP7_LIBXML +PACKAGE_php7-mod-simplexml:libxml2))
  498. $(eval $(call BuildModule,snmp,SNMP,+PACKAGE_php7-mod-snmp:libnetsnmp +PACKAGE_php7-mod-snmp:libopenssl))
  499. $(eval $(call BuildModule,soap,SOAP,+@PHP7_LIBXML +PACKAGE_php7-mod-soap:libxml2))
  500. $(eval $(call BuildModule,sockets,Sockets))
  501. $(eval $(call BuildModule,sqlite3,SQLite3,+PACKAGE_php7-mod-sqlite3:libsqlite3))
  502. $(eval $(call BuildModule,sysvmsg,System V messages))
  503. $(eval $(call BuildModule,sysvsem,System V shared memory))
  504. $(eval $(call BuildModule,sysvshm,System V semaphore))
  505. $(eval $(call BuildModule,tokenizer,Tokenizer))
  506. $(eval $(call BuildModule,xml,XML,+PHP7_LIBXML:libxml2 +!PHP7_LIBXML:libexpat))
  507. $(eval $(call BuildModule,xmlreader,XMLReader,+@PHP7_LIBXML +PACKAGE_php7-mod-xmlreader:libxml2))
  508. $(eval $(call BuildModule,xmlwriter,XMLWriter,+@PHP7_LIBXML +PACKAGE_php7-mod-xmlwriter:libxml2))
  509. $(eval $(call BuildModule,zip,ZIP,+PACKAGE_php7-mod-zip:zlib))