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.

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