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