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