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.

660 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.15
  8. PKG_RELEASE:=1
  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:=75e90012faef700dffb29311f3d24fa25f1a5e0f70254a9b8d5c794e25e938ce
  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. --with-pic \
  148. --disable-rpath \
  149. --disable-debug \
  150. --disable-phpdbg \
  151. --without-pear \
  152. \
  153. --with-config-file-path=/etc \
  154. --with-config-file-scan-dir=/etc/php7 \
  155. --disable-short-tags \
  156. \
  157. --without-valgrind \
  158. --with-pcre-regex="$(STAGING_DIR)/usr" \
  159. --with-zlib="$(STAGING_DIR)/usr" \
  160. --with-zlib-dir="$(STAGING_DIR)/usr"
  161. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-bcmath),)
  162. CONFIGURE_ARGS+= --enable-bcmath=shared
  163. else
  164. CONFIGURE_ARGS+= --disable-bcmath
  165. endif
  166. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-calendar),)
  167. CONFIGURE_ARGS+= --enable-calendar=shared
  168. else
  169. CONFIGURE_ARGS+= --disable-calendar
  170. endif
  171. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-ctype),)
  172. CONFIGURE_ARGS+= --enable-ctype=shared
  173. else
  174. CONFIGURE_ARGS+= --disable-ctype
  175. endif
  176. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-curl),)
  177. CONFIGURE_ARGS+= --with-curl=shared,"$(STAGING_DIR)/usr"
  178. else
  179. CONFIGURE_ARGS+= --without-curl
  180. endif
  181. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-fileinfo),)
  182. CONFIGURE_ARGS+= --enable-fileinfo=shared
  183. else
  184. CONFIGURE_ARGS+= --disable-fileinfo
  185. endif
  186. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gettext),)
  187. CONFIGURE_ARGS+= --with-gettext=shared,"$(STAGING_DIR)/usr/lib/libintl-full"
  188. else
  189. CONFIGURE_ARGS+= --without-gettext
  190. endif
  191. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-dom),)
  192. CONFIGURE_ARGS+= --enable-dom=shared
  193. else
  194. CONFIGURE_ARGS+= --disable-dom
  195. endif
  196. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-exif),)
  197. CONFIGURE_ARGS+= --enable-exif=shared
  198. else
  199. CONFIGURE_ARGS+= --disable-exif
  200. endif
  201. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-ftp),)
  202. CONFIGURE_ARGS+= --enable-ftp=shared
  203. else
  204. CONFIGURE_ARGS+= --disable-ftp
  205. endif
  206. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gd),)
  207. CONFIGURE_ARGS+= \
  208. --with-gd=shared \
  209. --with-jpeg-dir="$(STAGING_DIR)/usr" \
  210. --with-png-dir="$(STAGING_DIR)/usr" \
  211. --without-xpm-dir \
  212. --enable-gd-native-ttf \
  213. --disable-gd-jis-conv
  214. else
  215. CONFIGURE_ARGS+= --without-gd
  216. endif
  217. ifneq ($(CONFIG_PHP7_LIBFREETYPE),)
  218. CONFIGURE_ARGS+= --with-freetype-dir="$(STAGING_DIR)"
  219. else
  220. CONFIGURE_ARGS+= --without-freetype-dir
  221. endif
  222. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gmp),)
  223. CONFIGURE_ARGS+= --with-gmp=shared,"$(STAGING_DIR)/usr"
  224. else
  225. CONFIGURE_ARGS+= --without-gmp
  226. endif
  227. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-hash),)
  228. CONFIGURE_ARGS+= --enable-hash=shared
  229. else
  230. CONFIGURE_ARGS+= --disable-hash
  231. endif
  232. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-iconv),)
  233. CONFIGURE_ARGS+= --with-iconv=shared,"$(ICONV_PREFIX)"
  234. else
  235. CONFIGURE_ARGS+= --without-iconv
  236. endif
  237. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-imap),)
  238. CONFIGURE_ARGS+= \
  239. --with-imap=shared,"$(STAGING_DIR)/usr" \
  240. --with-imap-kerberos=no \
  241. --with-imap-ssl="$(STAGING_DIR)/usr"
  242. else
  243. CONFIGURE_ARGS+= --without-imap
  244. endif
  245. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-intl),)
  246. CONFIGURE_ARGS+= --enable-intl=shared
  247. TARGET_CXXFLAGS+= -std=c++0x
  248. else
  249. CONFIGURE_ARGS+= --disable-intl
  250. endif
  251. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-json),)
  252. CONFIGURE_ARGS+= --enable-json=shared
  253. else
  254. CONFIGURE_ARGS+= --disable-json
  255. endif
  256. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-ldap),)
  257. CONFIGURE_ARGS+= \
  258. --with-ldap=shared,"$(STAGING_DIR)/usr" \
  259. --with-ldap-sasl="$(STAGING_DIR)/usr"
  260. else
  261. CONFIGURE_ARGS+= --without-ldap
  262. endif
  263. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-mbstring),)
  264. CONFIGURE_ARGS+= --enable-mbstring=shared --enable-mbregex
  265. else
  266. CONFIGURE_ARGS+= --disable-mbstring
  267. endif
  268. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-mysqli),)
  269. CONFIGURE_ARGS+= --with-mysqli=shared
  270. else
  271. CONFIGURE_ARGS+= --without-mysqli
  272. endif
  273. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-mysqlnd),)
  274. CONFIGURE_ARGS+= --enable-mysqlnd=shared
  275. else
  276. CONFIGURE_ARGS+= --disable-mysqlnd
  277. endif
  278. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-opcache),)
  279. CONFIGURE_ARGS+= --enable-opcache=shared
  280. else
  281. CONFIGURE_ARGS+= --disable-opcache
  282. endif
  283. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-openssl)$(CONFIG_PACKAGE_php7-mod-ftp)$(CONFIG_PACKAGE_php7-mod-imap)$(CONFIG_PACKAGE_php7-mod-snmp),)
  284. CONFIGURE_ARGS+= \
  285. --with-openssl=shared,"$(STAGING_DIR)/usr" \
  286. --with-kerberos=no \
  287. --with-openssl-dir="$(STAGING_DIR)/usr"
  288. else
  289. CONFIGURE_ARGS+= --without-openssl
  290. endif
  291. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pcntl),)
  292. CONFIGURE_ARGS+= --enable-pcntl=shared
  293. else
  294. CONFIGURE_ARGS+= --disable-pcntl
  295. endif
  296. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo),)
  297. CONFIGURE_ARGS+= --enable-pdo=shared
  298. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo-mysql),)
  299. CONFIGURE_ARGS+= --with-pdo-mysql=shared
  300. else
  301. CONFIGURE_ARGS+= --without-pdo-mysql
  302. endif
  303. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo-pgsql),)
  304. CONFIGURE_ARGS+= --with-pdo-pgsql=shared,"$(STAGING_DIR)/usr"
  305. else
  306. CONFIGURE_ARGS+= --without-pdo-pgsql
  307. endif
  308. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo-sqlite),)
  309. CONFIGURE_ARGS+= --with-pdo-sqlite=shared,"$(STAGING_DIR)/usr"
  310. else
  311. CONFIGURE_ARGS+= --without-pdo-sqlite
  312. endif
  313. else
  314. CONFIGURE_ARGS+= --disable-pdo
  315. endif
  316. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pgsql),)
  317. CONFIGURE_ARGS+= --with-pgsql=shared,"$(STAGING_DIR)/usr"
  318. else
  319. CONFIGURE_ARGS+= --without-pgsql
  320. endif
  321. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-phar),)
  322. CONFIGURE_ARGS+= --enable-phar=shared
  323. else
  324. CONFIGURE_ARGS+= --disable-phar
  325. endif
  326. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-session),)
  327. CONFIGURE_ARGS+= --enable-session=shared
  328. else
  329. CONFIGURE_ARGS+= --disable-session
  330. endif
  331. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-shmop),)
  332. CONFIGURE_ARGS+= --enable-shmop=shared
  333. else
  334. CONFIGURE_ARGS+= --disable-shmop
  335. endif
  336. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-simplexml),)
  337. CONFIGURE_ARGS+= --enable-simplexml=shared
  338. else
  339. CONFIGURE_ARGS+= --disable-simplexml
  340. endif
  341. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-snmp),)
  342. CONFIGURE_ARGS+= --with-snmp=shared,"$(STAGING_DIR)/usr"
  343. else
  344. CONFIGURE_ARGS+= --without-snmp
  345. endif
  346. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-soap),)
  347. CONFIGURE_ARGS+= --enable-soap=shared
  348. else
  349. CONFIGURE_ARGS+= --disable-soap
  350. endif
  351. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sockets),)
  352. CONFIGURE_ARGS+= --enable-sockets=shared
  353. else
  354. CONFIGURE_ARGS+= --disable-sockets
  355. endif
  356. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sqlite3),)
  357. CONFIGURE_ARGS+= --with-sqlite3=shared,"$(STAGING_DIR)/usr"
  358. else
  359. CONFIGURE_ARGS+= --without-sqlite3
  360. endif
  361. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sysvmsg),)
  362. CONFIGURE_ARGS+= --enable-sysvmsg=shared
  363. else
  364. CONFIGURE_ARGS+= --disable-sysvmsg
  365. endif
  366. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sysvsem),)
  367. CONFIGURE_ARGS+= --enable-sysvsem=shared
  368. else
  369. CONFIGURE_ARGS+= --disable-sysvsem
  370. endif
  371. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sysvshm),)
  372. CONFIGURE_ARGS+= --enable-sysvshm=shared
  373. else
  374. CONFIGURE_ARGS+= --disable-sysvshm
  375. endif
  376. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-tokenizer),)
  377. CONFIGURE_ARGS+= --enable-tokenizer=shared
  378. else
  379. CONFIGURE_ARGS+= --disable-tokenizer
  380. endif
  381. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-xml),)
  382. CONFIGURE_ARGS+= --enable-xml=shared,"$(STAGING_DIR)/usr"
  383. ifneq ($(CONFIG_PHP7_LIBXML),)
  384. CONFIGURE_ARGS+= --with-libxml-dir="$(STAGING_DIR)/usr/include/libxml2"
  385. else
  386. CONFIGURE_ARGS+= --with-libexpat-dir="$(STAGING_DIR)/usr"
  387. endif
  388. else
  389. CONFIGURE_ARGS+= --disable-xml
  390. endif
  391. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-xmlreader),)
  392. CONFIGURE_ARGS+= --enable-xmlreader=shared,"$(STAGING_DIR)/usr"
  393. else
  394. CONFIGURE_ARGS+= --disable-xmlreader
  395. endif
  396. ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-xmlwriter),)
  397. CONFIGURE_ARGS+= --enable-xmlwriter=shared,"$(STAGING_DIR)/usr"
  398. else
  399. CONFIGURE_ARGS+= --disable-xmlwriter
  400. endif
  401. ifneq ($(CONFIG_PACKAGE_php7-mod-zip),)
  402. CONFIGURE_ARGS+= --enable-zip=shared
  403. else
  404. CONFIGURE_ARGS+= --disable-zip
  405. endif
  406. ifneq ($(SDK)$(CONFIG_PHP7_FILTER),)
  407. CONFIGURE_ARGS+= --enable-filter
  408. else
  409. CONFIGURE_ARGS+= --disable-filter
  410. endif
  411. ifneq ($(SDK)$(CONFIG_PHP7_LIBXML),)
  412. CONFIGURE_ARGS+= --enable-libxml
  413. CONFIGURE_ARGS+= --with-libxml-dir="$(STAGING_DIR)/usr/include/libxml2"
  414. else
  415. CONFIGURE_ARGS+= --disable-libxml
  416. endif
  417. ifneq ($(CONFIG_PHP7_SYSTEMTZDATA),)
  418. CONFIGURE_ARGS+= --with-system-tzdata
  419. else
  420. CONFIGURE_ARGS+= --without-system-tzdata
  421. endif
  422. CONFIGURE_VARS+= \
  423. ac_cv_c_bigendian_php=$(if $(CONFIG_BIG_ENDIAN),yes,no) \
  424. php_cv_cc_rpath="no" \
  425. iconv_impl_name="gnu_libiconv" \
  426. ac_cv_php_xml2_config_path="$(STAGING_DIR)/host/bin/xml2-config" \
  427. ac_cv_u8t_decompose=yes
  428. define Package/php7/conffiles
  429. /etc/php.ini
  430. /etc/php7/
  431. endef
  432. define Package/php7/install
  433. $(INSTALL_DIR) $(1)/etc
  434. $(INSTALL_DATA) ./files/php.ini $(1)/etc/
  435. endef
  436. define Package/php7-cli/install
  437. $(INSTALL_DIR) $(1)/usr/bin
  438. $(CP) $(PKG_BUILD_DIR)/sapi/cli/php $(1)/usr/bin/php-cli
  439. endef
  440. define Package/php7-cgi/install
  441. $(INSTALL_DIR) $(1)/usr/bin
  442. $(CP) $(PKG_BUILD_DIR)/sapi/cgi/php-cgi $(1)/usr/bin/php-cgi
  443. ln -sf php-cgi $(1)/usr/bin/php-fcgi
  444. endef
  445. define Package/php7-fastcgi/install
  446. $(INSTALL_DIR) $(1)/etc/config
  447. $(INSTALL_DATA) ./files/php7-fastcgi.config $(1)/etc/config/php7-fastcgi
  448. $(INSTALL_DIR) $(1)/etc/init.d
  449. $(INSTALL_BIN) ./files/php7-fastcgi.init $(1)/etc/init.d/php7-fastcgi
  450. endef
  451. define Package/php7-fpm/install
  452. $(INSTALL_DIR) $(1)/usr/bin
  453. $(INSTALL_BIN) $(PKG_BUILD_DIR)/sapi/fpm/php-fpm $(1)/usr/bin/php-fpm
  454. $(INSTALL_DIR) $(1)/etc
  455. $(INSTALL_DATA) ./files/php7-fpm.conf $(1)/etc/php7-fpm.conf
  456. $(INSTALL_DIR) $(1)/etc/config
  457. $(INSTALL_DATA) ./files/php7-fpm.config $(1)/etc/config/php7-fpm
  458. $(INSTALL_DIR) $(1)/etc/php7-fpm.d
  459. $(INSTALL_DATA) ./files/php7-fpm-www.conf $(1)/etc/php7-fpm.d/www.conf
  460. $(INSTALL_DIR) $(1)/etc/init.d
  461. $(INSTALL_BIN) ./files/php7-fpm.init $(1)/etc/init.d/php7-fpm
  462. endef
  463. define Package/php7-fpm/conffiles
  464. /etc/php7-fpm.conf
  465. /etc/php7-fpm.d/
  466. /etc/config/php7-fpm
  467. endef
  468. define Build/Prepare
  469. $(call Build/Prepare/Default)
  470. ( cd $(PKG_BUILD_DIR); touch configure.in; ./buildconf --force )
  471. endef
  472. define Build/InstallDev
  473. rm -rf $(PKG_BUILD_DIR)/staging
  474. make -C $(PKG_BUILD_DIR) install INSTALL_ROOT=$(PKG_BUILD_DIR)/staging
  475. rm -rf $(PKG_BUILD_DIR)/staging/usr/{share,man,sbin}
  476. rm -f $(PKG_BUILD_DIR)/staging/usr/bin/{php,php-cgi,php-cli}
  477. mv $(PKG_BUILD_DIR)/staging/usr/bin/phpize $(PKG_BUILD_DIR)/staging/usr/bin/phpize7
  478. mv $(PKG_BUILD_DIR)/staging/usr/bin/php-config $(PKG_BUILD_DIR)/staging/usr/bin/php7-config
  479. mv $(PKG_BUILD_DIR)/staging/usr/include/php $(PKG_BUILD_DIR)/staging/usr/include/php7
  480. mv $(PKG_BUILD_DIR)/staging/usr/lib/php $(PKG_BUILD_DIR)/staging/usr/lib/php7
  481. $(CP) $(PKG_BUILD_DIR)/staging/usr $(STAGING_DIR)/
  482. sed -i -e "s#prefix='/usr'#prefix='$(STAGING_DIR)/usr'#" $(STAGING_DIR)/usr/bin/phpize7
  483. sed -i -e "s#exec_prefix=\"\`eval echo /usr\`\"#exec_prefix='$(STAGING_DIR)/usr'#" $(STAGING_DIR)/usr/bin/phpize7
  484. sed -i -e "s#/include\`/php\"#/include\`/php7\"#" $(STAGING_DIR)/usr/bin/phpize7
  485. sed -i -e "s#/lib/php\`/build\"#/lib/php7\`/build\"#" $(STAGING_DIR)/usr/bin/phpize7
  486. sed -i -e "s#prefix=\"/usr\"#prefix=\"$(STAGING_DIR)/usr\"#" $(STAGING_DIR)/usr/bin/php7-config
  487. sed -i -e "s#/include/php\"#/include/php7\"#" $(STAGING_DIR)/usr/bin/php7-config
  488. endef
  489. define BuildModule
  490. define Package/php7-mod-$(1)
  491. $(call Package/php7/Default)
  492. ifneq ($(3),)
  493. DEPENDS+=$(3)
  494. endif
  495. TITLE:=$(2) shared module
  496. endef
  497. define Package/php7-mod-$(1)/install
  498. $(INSTALL_DIR) $$(1)/usr/lib/php
  499. $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$(subst -,_,$(1)).so $$(1)/usr/lib/php/
  500. $(INSTALL_DIR) $$(1)/etc/php7
  501. ifeq ($(5),zend)
  502. echo "zend_extension=/usr/lib/php/$(subst -,_,$(1)).so" > $$(1)/etc/php7/$(if $(4),$(4),20)_$(subst -,_,$(1)).ini
  503. else
  504. echo "extension=$(subst -,_,$(1)).so" > $$(1)/etc/php7/$(if $(4),$(4),20)_$(subst -,_,$(1)).ini
  505. endif
  506. endef
  507. $$(eval $$(call BuildPackage,php7-mod-$(1)))
  508. endef
  509. $(eval $(call BuildPackage,php7))
  510. $(eval $(call BuildPackage,php7-cgi))
  511. $(eval $(call BuildPackage,php7-cli))
  512. $(eval $(call BuildPackage,php7-fastcgi))
  513. $(eval $(call BuildPackage,php7-fpm))
  514. #$(eval $(call BuildModule,NAME,TITLE[,PKG DEPENDS]))
  515. $(eval $(call BuildModule,bcmath,Bcmath))
  516. $(eval $(call BuildModule,calendar,Calendar))
  517. $(eval $(call BuildModule,ctype,Ctype))
  518. $(eval $(call BuildModule,curl,cURL,+PACKAGE_php7-mod-curl:libcurl))
  519. $(eval $(call BuildModule,dom,DOM,+@PHP7_LIBXML +PACKAGE_php7-mod-dom:libxml2))
  520. $(eval $(call BuildModule,exif,EXIF))
  521. $(eval $(call BuildModule,fileinfo,Fileinfo))
  522. $(eval $(call BuildModule,ftp,FTP,+PACKAGE_php7-mod-ftp:libopenssl))
  523. $(eval $(call BuildModule,gd,GD graphics,+PACKAGE_php7-mod-gd:libjpeg +PACKAGE_php7-mod-gd:libpng +PHP7_LIBFREETYPE:libfreetype))
  524. $(eval $(call BuildModule,gettext,Gettext,+PACKAGE_php7-mod-gettext:libintl-full))
  525. $(eval $(call BuildModule,gmp,GMP,+PACKAGE_php7-mod-gmp:libgmp))
  526. $(eval $(call BuildModule,hash,Hash))
  527. $(eval $(call BuildModule,iconv,iConv,$(ICONV_DEPENDS)))
  528. $(eval $(call BuildModule,imap,IMAP,+PACKAGE_php7-mod-imap:libopenssl +PACKAGE_libpam:libpam +PACKAGE_php7-mod-imap:uw-imap))
  529. $(eval $(call BuildModule,intl,Internationalization Functions,+PACKAGE_php7-mod-intl:icu +PHP7_FULLICUDATA:icu-full-data))
  530. $(eval $(call BuildModule,json,JSON))
  531. $(eval $(call BuildModule,ldap,LDAP,+PACKAGE_php7-mod-ldap:libopenldap +PACKAGE_php7-mod-ldap:libsasl2))
  532. $(eval $(call BuildModule,mbstring,MBString))
  533. $(eval $(call BuildModule,mysqli,MySQL Improved Extension,+PACKAGE_php7-mod-mysqli:php7-mod-mysqlnd,30))
  534. $(eval $(call BuildModule,mysqlnd,MySQL Native Driver,+php7-mod-hash))
  535. $(eval $(call BuildModule,opcache,OPcache,,,zend))
  536. $(eval $(call BuildModule,openssl,OpenSSL,+PACKAGE_php7-mod-openssl:libopenssl,15))
  537. $(eval $(call BuildModule,pcntl,PCNTL))
  538. $(eval $(call BuildModule,pdo,PHP Data Objects))
  539. $(eval $(call BuildModule,pdo-mysql,PDO driver for MySQL,+php7-mod-pdo +PACKAGE_php7-mod-pdo-mysql:php7-mod-mysqlnd))
  540. $(eval $(call BuildModule,pdo-pgsql,PDO driver for PostgreSQL,+php7-mod-pdo +PACKAGE_php7-mod-pdo-pgsql:libpq))
  541. $(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))
  542. $(eval $(call BuildModule,pgsql,PostgreSQL,+PACKAGE_php7-mod-pgsql:libpq))
  543. $(eval $(call BuildModule,phar,Phar Archives,+php7-mod-hash))
  544. $(eval $(call BuildModule,session,Session))
  545. $(eval $(call BuildModule,shmop,Shared Memory))
  546. $(eval $(call BuildModule,simplexml,SimpleXML,+@PHP7_LIBXML +PACKAGE_php7-mod-simplexml:libxml2))
  547. $(eval $(call BuildModule,snmp,SNMP,+PACKAGE_php7-mod-snmp:libnetsnmp +PACKAGE_php7-mod-snmp:libopenssl))
  548. $(eval $(call BuildModule,soap,SOAP,+@PHP7_LIBXML +PACKAGE_php7-mod-soap:libxml2))
  549. $(eval $(call BuildModule,sockets,Sockets))
  550. $(eval $(call BuildModule,sqlite3,SQLite3,+PACKAGE_php7-mod-sqlite3:libsqlite3))
  551. $(eval $(call BuildModule,sysvmsg,System V messages))
  552. $(eval $(call BuildModule,sysvsem,System V shared memory))
  553. $(eval $(call BuildModule,sysvshm,System V semaphore))
  554. $(eval $(call BuildModule,tokenizer,Tokenizer))
  555. $(eval $(call BuildModule,xml,XML,+PHP7_LIBXML:libxml2 +!PHP7_LIBXML:libexpat))
  556. $(eval $(call BuildModule,xmlreader,XMLReader,+@PHP7_LIBXML +PACKAGE_php7-mod-xmlreader:libxml2))
  557. $(eval $(call BuildModule,xmlwriter,XMLWriter,+@PHP7_LIBXML +PACKAGE_php7-mod-xmlwriter:libxml2))
  558. $(eval $(call BuildModule,zip,ZIP,+PACKAGE_php7-mod-zip:zlib))