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