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.

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