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.

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