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.

635 lines
18 KiB

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