initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
From 7a4168062fbab2e33ef9a42bca9f87a5921afac2 Mon Sep 17 00:00:00 2001
|
||||
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
Date: Tue, 9 Aug 2016 11:49:56 +0200
|
||||
Subject: [PATCH] acinclude.m4: don't unset variables
|
||||
|
||||
Unsetting ac_cv_{func,lib}_* is bad, you can't feed the configure cache.
|
||||
Terminate them with extreme prejudice.
|
||||
|
||||
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
||||
[aduskett@gmail.com: Update for 7.3.0]
|
||||
---
|
||||
build/php.m4 | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git a/build/php.m4 b/build/php.m4
|
||||
index e91ef988..9586c490 100644
|
||||
--- a/build/php.m4
|
||||
+++ b/build/php.m4
|
||||
@@ -1568,8 +1568,6 @@ dnl PHP_CHECK_FUNC_LIB
|
||||
dnl
|
||||
AC_DEFUN([PHP_CHECK_FUNC_LIB],[
|
||||
ifelse($2,,:,[
|
||||
- unset ac_cv_lib_$2[]_$1
|
||||
- unset ac_cv_lib_$2[]___$1
|
||||
unset found
|
||||
AC_CHECK_LIB($2, $1, [found=yes], [
|
||||
AC_CHECK_LIB($2, __$1, [found=yes], [found=no])
|
||||
@@ -1601,8 +1599,6 @@ dnl and as a fall back in the specified library. Defines HAVE_func and
|
||||
dnl HAVE_library if found and adds the library to LIBS.
|
||||
dnl
|
||||
AC_DEFUN([PHP_CHECK_FUNC],[
|
||||
- unset ac_cv_func_$1
|
||||
- unset ac_cv_func___$1
|
||||
unset found
|
||||
|
||||
AC_CHECK_FUNC($1, [found=yes],[ AC_CHECK_FUNC(__$1,[found=yes],[found=no]) ])
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From 1357df0196806d5697b1f84497ef72aab5faa8a3 Mon Sep 17 00:00:00 2001
|
||||
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
Date: Tue, 9 Aug 2016 11:50:49 +0200
|
||||
Subject: [PATCH] iconv: tweak iconv detection
|
||||
|
||||
Tweak PHP_SETUP_ICONV from aclocal/build/php.m4 to not
|
||||
PHP_ADD_INCLUDE $ICONV_DIR/include since the tests use
|
||||
test instead of AC_TRY_LINK to find headers which is bad,
|
||||
specially when adding /usr and /usr/local to the mix.
|
||||
Do basically the same with ext/iconv/config.m4 by tweaking
|
||||
PHP_ICONV_H_PATH which, again, uses test and absolute paths.
|
||||
|
||||
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
[Gustavo: convert to nice m4 instead of patching configure]
|
||||
[Gustavo: update for 5.6.10]
|
||||
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
||||
[aduskett@gmail.com: Update for 8.0.7]
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
[Bernd: rebased for 7.4.10 & 7.4.13]
|
||||
---
|
||||
build/php.m4 | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/build/php.m4 b/build/php.m4
|
||||
index 9586c490..8b3d47ed 100644
|
||||
--- a/build/php.m4
|
||||
+++ b/build/php.m4
|
||||
@@ -1937,7 +1937,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [
|
||||
dnl Check external libs for iconv funcs.
|
||||
if test "$found_iconv" = "no"; then
|
||||
|
||||
- for i in $PHP_ICONV /usr/local /usr; do
|
||||
+ for i in $PHP_ICONV; do
|
||||
if test -r $i/include/gnu-libiconv/iconv.h; then
|
||||
ICONV_DIR=$i
|
||||
ICONV_INCLUDE_DIR=$i/include/gnu-libiconv
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
From 5ba6355e489f647c88ca48afbc75965468193181 Mon Sep 17 00:00:00 2001
|
||||
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
Date: Tue, 9 Aug 2016 11:51:53 +0200
|
||||
Subject: [PATCH] configure: disable the 'phar' tool
|
||||
|
||||
Disable the 'phar' command-line tool build/installation since it requires
|
||||
php to run and pack up phar itself in phar format. This would require
|
||||
a host-php instance and really probably nobody needs the phar tool
|
||||
on the target.
|
||||
|
||||
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
[Gustavo: update for autoreconf/configure.in]
|
||||
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
||||
[Aduskett: update for 8.0.7]
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
[Bernd: rebased for 7.4.10 & 7.4.13]
|
||||
---
|
||||
configure.ac | 9 ++-------
|
||||
1 file changed, 2 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 0dfab302..6026fb66 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1423,13 +1423,8 @@ CFLAGS_CLEAN="$CFLAGS \$(PROF_FLAGS)"
|
||||
CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag"
|
||||
CXXFLAGS="$CXXFLAGS $standard_libtool_flag \$(PROF_FLAGS)"
|
||||
|
||||
-if test "$PHP_PHAR" != "no" && test "$PHP_CLI" != "no"; then
|
||||
- pharcmd=pharcmd
|
||||
- pharcmd_install=install-pharcmd
|
||||
-else
|
||||
- pharcmd=
|
||||
- pharcmd_install=
|
||||
-fi;
|
||||
+pharcmd=
|
||||
+pharcmd_install=
|
||||
|
||||
all_targets="$lcov_target \$(OVERALL_TARGET) \$(PHP_MODULES) \$(PHP_ZEND_EX) \$(PHP_BINARIES) $pharcmd"
|
||||
install_targets="$install_sapi $install_modules $install_binaries install-build install-headers install-programs $install_pear $pharcmd_install"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
From 4342bdea7a1a21430ce0d051fa4387441166c473 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fabrice.fontaine@orange.com>
|
||||
Date: Sun, 11 Dec 2016 23:12:46 +0100
|
||||
Subject: [PATCH] Call apxs with correct prefix
|
||||
|
||||
php uses apache's apxs script from staging directory to install libphp
|
||||
dynamic library and update /etc/apache2/httpd.conf in the staging and target
|
||||
directories. Here is the full command line:
|
||||
"apxs -S LIBEXECDIR='$(INSTALL_ROOT)/usr/modules'
|
||||
-S SYSCONFDIR='$(INSTALL_ROOT)/etc/apache2' -i -a -n php"
|
||||
This does not work for target directory as apxs sets the full path of the
|
||||
library and not the relative one. Indeed, apxs is smart enough to substitute
|
||||
away the prefix specified in $(STAGING_DIR)/usr/build/config_vars.mk so
|
||||
httpd.conf will only be correct in the staging directory.
|
||||
To fix this, add -S PREFIX='$(INSTALL_ROOT)/usr' to apxs call in configure
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
|
||||
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
||||
[aduskett@gmail.com: Update for 8.0.7]
|
||||
---
|
||||
sapi/apache2handler/config.m4 | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4
|
||||
index 55c16179..68ce66c0 100644
|
||||
--- a/sapi/apache2handler/config.m4
|
||||
+++ b/sapi/apache2handler/config.m4
|
||||
@@ -63,10 +63,12 @@ if test "$PHP_APXS2" != "no"; then
|
||||
AC_MSG_ERROR([Please note that Apache version >= 2.0.44 is required])
|
||||
fi
|
||||
|
||||
+ APXS_PREFIX='$(INSTALL_ROOT)'/usr
|
||||
APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
|
||||
if test -z `$APXS -q SYSCONFDIR`; then
|
||||
INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
|
||||
$APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
|
||||
+ -S PREFIX='$APXS_PREFIX' \
|
||||
-i -n php"
|
||||
else
|
||||
APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR`
|
||||
@@ -74,6 +76,7 @@ if test "$PHP_APXS2" != "no"; then
|
||||
\$(mkinstalldirs) '$APXS_SYSCONFDIR' && \
|
||||
$APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
|
||||
-S SYSCONFDIR='$APXS_SYSCONFDIR' \
|
||||
+ -S PREFIX='$APXS_PREFIX' \
|
||||
-i -a -n php"
|
||||
fi
|
||||
|
||||
--
|
||||
2.5.0
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
From 9bb316c41a69935ee2072626467241889594bed4 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Duskett <aduskett@gmail.com>
|
||||
Date: Mon, 28 Jun 2021 11:12:36 -0700
|
||||
Subject: [PATCH] allow opcache cross-compiling
|
||||
|
||||
Remove the check at the end of ext/opcache/config.m4 that prevents opcache from
|
||||
being enabled in a cross-compiled environment. We pass the following as a
|
||||
CFLAGS when opcache is enabled:
|
||||
-DHAVE_SHM_IPC
|
||||
-DHAVE_SHM_MMAP_ANON
|
||||
-DHAVE_SHM_MMAP_ZERO
|
||||
-DHAVE_SHM_MMAP_POSIX
|
||||
-DHAVE_SHM_MMAP_FILE
|
||||
|
||||
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
||||
---
|
||||
ext/opcache/config.m4 | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
|
||||
index 5492fd92..10c150ff 100644
|
||||
--- a/ext/opcache/config.m4
|
||||
+++ b/ext/opcache/config.m4
|
||||
@@ -339,10 +339,6 @@ int main() {
|
||||
PHP_ADD_BUILD_DIR([$ext_builddir/Optimizer], 1)
|
||||
PHP_ADD_EXTENSION_DEP(opcache, pcre)
|
||||
|
||||
- if test "$have_shm_ipc" != "yes" && test "$have_shm_mmap_posix" != "yes" && test "$have_shm_mmap_anon" != "yes"; then
|
||||
- AC_MSG_ERROR([No supported shared memory caching support was found when configuring opcache. Check config.log for any errors or missing dependencies.])
|
||||
- fi
|
||||
-
|
||||
if test "$PHP_OPCACHE_JIT" = "yes"; then
|
||||
PHP_ADD_BUILD_DIR([$ext_builddir/jit], 1)
|
||||
PHP_ADD_MAKEFILE_FRAGMENT($ext_srcdir/jit/Makefile.frag)
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@@ -0,0 +1,424 @@
|
||||
menu "Extensions"
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_CALENDAR
|
||||
bool "Calendar"
|
||||
help
|
||||
Calendar and event support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_FILEINFO
|
||||
bool "Fileinfo"
|
||||
help
|
||||
File Information support
|
||||
|
||||
comment "OPcache needs a toolchain w/ dynamic library"
|
||||
depends on BR2_STATIC_LIBS
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_OPCACHE
|
||||
bool "OPcache"
|
||||
depends on !BR2_STATIC_LIBS
|
||||
help
|
||||
Enable the Zend OPcache accelerator.
|
||||
|
||||
comment "Readline needs a toolchain w/ dynamic library"
|
||||
depends on BR2_STATIC_LIBS
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_READLINE
|
||||
bool "Readline"
|
||||
depends on !BR2_STATIC_LIBS
|
||||
select BR2_PACKAGE_NCURSES
|
||||
select BR2_PACKAGE_READLINE
|
||||
help
|
||||
Readline support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_SESSION
|
||||
bool "Session"
|
||||
default y
|
||||
help
|
||||
Session support
|
||||
|
||||
comment "Compression extensions"
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_BZIP2
|
||||
bool "bzip2"
|
||||
select BR2_PACKAGE_BZIP2
|
||||
help
|
||||
bzip2 read/write support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_PHAR
|
||||
bool "phar"
|
||||
help
|
||||
PHP Archive support
|
||||
|
||||
comment "zip needs a toolchain w/ dynamic library"
|
||||
depends on BR2_STATIC_LIBS
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_ZIP
|
||||
bool "zip"
|
||||
depends on !BR2_STATIC_LIBS # libzip
|
||||
select BR2_PACKAGE_ZLIB
|
||||
select BR2_PACKAGE_LIBZIP
|
||||
help
|
||||
Zip read/write support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_ZLIB
|
||||
bool "zlib"
|
||||
default y
|
||||
select BR2_PACKAGE_ZLIB
|
||||
help
|
||||
zlib support
|
||||
|
||||
comment "Cryptography extensions"
|
||||
|
||||
comment "libargon2 needs a toolchain w/ dynamic library"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_STATIC_LIBS
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_LIBARGON2
|
||||
bool "libargon2"
|
||||
depends on BR2_USE_MMU # libargon2
|
||||
depends on !BR2_STATIC_LIBS # libargon2
|
||||
select BR2_PACKAGE_LIBARGON2
|
||||
help
|
||||
libargon2 support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_LIBSODIUM
|
||||
bool "libsodium"
|
||||
select BR2_PACKAGE_LIBSODIUM
|
||||
help
|
||||
libsodium support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_OPENSSL
|
||||
bool "openssl"
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
select BR2_PACKAGE_LIBOPENSSL_ENABLE_DES if BR2_PACKAGE_LIBOPENSSL
|
||||
select BR2_PACKAGE_LIBOPENSSL_ENABLE_MD4 if BR2_PACKAGE_LIBOPENSSL
|
||||
select BR2_PACKAGE_LIBOPENSSL_ENABLE_RC4 if BR2_PACKAGE_LIBOPENSSL
|
||||
select BR2_PACKAGE_LIBOPENSSL_ENABLE_RMD160 if BR2_PACKAGE_LIBOPENSSL
|
||||
help
|
||||
openssl support
|
||||
|
||||
comment "Database extensions"
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_DBA
|
||||
bool "DBA"
|
||||
help
|
||||
Database Abstraction Layer
|
||||
|
||||
if BR2_PACKAGE_PHP_EXT_DBA
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_DBA_CDB
|
||||
bool "cdb"
|
||||
help
|
||||
CDB handler
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_DBA_DB4
|
||||
bool "db4/5"
|
||||
select BR2_PACKAGE_BERKELEYDB
|
||||
help
|
||||
BerkeleyDB version 4/5 handler
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_DBA_FLAT
|
||||
bool "flat"
|
||||
default y
|
||||
help
|
||||
Flat file handler
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_DBA_INI
|
||||
bool "ini"
|
||||
default y
|
||||
help
|
||||
INI file handler
|
||||
|
||||
endif
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_MYSQLI
|
||||
bool "Mysqli"
|
||||
help
|
||||
MySQL Improved extension support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_PGSQL
|
||||
bool "PostgreSQL"
|
||||
depends on BR2_USE_MMU # postgresql
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_USE_WCHAR # postgresql
|
||||
select BR2_PACKAGE_POSTGRESQL
|
||||
help
|
||||
PostgreSQL support
|
||||
|
||||
comment "PostgreSQL extension needs a toolchain w/ dynamic library, wchar"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_SQLITE
|
||||
bool "SQLite3"
|
||||
select BR2_PACKAGE_SQLITE
|
||||
help
|
||||
SQLite3 support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_PDO
|
||||
bool "PDO"
|
||||
help
|
||||
PHP Data Objects support
|
||||
|
||||
if BR2_PACKAGE_PHP_EXT_PDO
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_PDO_MYSQL
|
||||
bool "MySQL"
|
||||
help
|
||||
PDO driver for MySQL
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_PDO_POSTGRESQL
|
||||
bool "PostgreSQL"
|
||||
depends on BR2_USE_MMU # postgresql
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_USE_WCHAR # postgresql
|
||||
select BR2_PACKAGE_POSTGRESQL
|
||||
help
|
||||
PDO driver for PostgreSQL
|
||||
|
||||
comment "PostgreSQL drivers need a toolchain w/ wchar, dynamic library"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_PDO_SQLITE
|
||||
bool "SQLite3"
|
||||
select BR2_PACKAGE_SQLITE
|
||||
help
|
||||
SQLite3 driver for PDO
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_PDO_UNIXODBC
|
||||
bool "unixODBC"
|
||||
depends on !BR2_STATIC_LIBS # unixodbc
|
||||
select BR2_PACKAGE_UNIXODBC
|
||||
help
|
||||
unixODBC driver for PDO
|
||||
|
||||
comment "unixodbc driver needs a toolchain w/ dynamic library"
|
||||
depends on BR2_STATIC_LIBS
|
||||
|
||||
endif
|
||||
|
||||
comment "Human language and character encoding support"
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_GETTEXT
|
||||
bool "Gettext"
|
||||
depends on BR2_SYSTEM_ENABLE_NLS
|
||||
help
|
||||
Gettext support
|
||||
|
||||
comment "Gettext support needs NLS enabled"
|
||||
depends on !BR2_SYSTEM_ENABLE_NLS
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_ICONV
|
||||
bool "iconv"
|
||||
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
|
||||
help
|
||||
iconv character set conversion support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_INTL
|
||||
bool "intl"
|
||||
depends on BR2_HOST_GCC_AT_LEAST_4_9 # icu
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_USE_WCHAR
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # icu
|
||||
depends on !BR2_BINFMT_FLAT # icu
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # icu
|
||||
depends on !BR2_STATIC_LIBS
|
||||
select BR2_PACKAGE_ICU
|
||||
help
|
||||
Internationalization support
|
||||
|
||||
comment "intl support needs a toolchain w/ C++, wchar, threads, dynamic library, gcc >= 4.9, host gcc >= 4.9"
|
||||
depends on !BR2_BINFMT_FLAT
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
|
||||
!BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || \
|
||||
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
|
||||
!BR2_HOST_GCC_AT_LEAST_4_9
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_MBSTRING
|
||||
bool "mbstring"
|
||||
select BR2_PACKAGE_ONIGURUMA
|
||||
help
|
||||
multibyte string support
|
||||
|
||||
comment "Image processing"
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_EXIF
|
||||
bool "EXIF"
|
||||
help
|
||||
EXIF support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_GD
|
||||
bool "GD"
|
||||
select BR2_PACKAGE_FREETYPE
|
||||
select BR2_PACKAGE_JPEG
|
||||
select BR2_PACKAGE_LIBPNG
|
||||
select BR2_PACKAGE_ZLIB
|
||||
help
|
||||
GD support
|
||||
|
||||
comment "Mathematical extensions"
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_BCMATH
|
||||
bool "BC math"
|
||||
help
|
||||
BCMath arbitrary precision mathematics support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_GMP
|
||||
bool "GMP"
|
||||
select BR2_PACKAGE_GMP
|
||||
help
|
||||
GNU Multiple Precision support
|
||||
|
||||
comment "Other basic extensions"
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_TOKENIZER
|
||||
bool "Tokenizer"
|
||||
help
|
||||
Tokenizer functions support
|
||||
|
||||
comment "Other services"
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_CURL
|
||||
bool "cURL"
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
help
|
||||
cURL for URL streams
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_FTP
|
||||
bool "FTP"
|
||||
help
|
||||
FTP support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_SNMP
|
||||
bool "SNMP"
|
||||
depends on BR2_USE_MMU # netsnmp fork()
|
||||
select BR2_PACKAGE_NETSNMP
|
||||
select BR2_PACKAGE_NETSNMP_ENABLE_MIBS
|
||||
help
|
||||
SNMP support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_SOCKETS
|
||||
bool "sockets"
|
||||
help
|
||||
Sockets support
|
||||
|
||||
comment "Process Control"
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_PCNTL
|
||||
bool "PCNTL"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
help
|
||||
Process control support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_POSIX
|
||||
bool "Posix"
|
||||
default y
|
||||
help
|
||||
POSIX.1 (IEEE 1003.1) function support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_SHMOP
|
||||
bool "shmop"
|
||||
help
|
||||
Shared memory support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_SYSVMSG
|
||||
bool "sysvmsg"
|
||||
help
|
||||
System V message queue support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_SYSVSEM
|
||||
bool "sysvsem"
|
||||
help
|
||||
System V semaphore support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_SYSVSHM
|
||||
bool "sysvshm"
|
||||
help
|
||||
System V shared memory support
|
||||
|
||||
comment "Variable and Type related"
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_CTYPE
|
||||
bool "Ctype"
|
||||
help
|
||||
Character type checking support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_FILTER
|
||||
bool "Filter"
|
||||
help
|
||||
Input filter support
|
||||
|
||||
comment "Web services"
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_SOAP
|
||||
bool "SOAP"
|
||||
select BR2_PACKAGE_PHP_EXT_LIBXML2
|
||||
help
|
||||
SOAP support
|
||||
|
||||
comment "XML manipulation"
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_DOM
|
||||
bool "DOM"
|
||||
select BR2_PACKAGE_PHP_EXT_LIBXML2
|
||||
help
|
||||
Document Object Model support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_LIBXML2
|
||||
bool "libxml"
|
||||
select BR2_PACKAGE_LIBXML2
|
||||
help
|
||||
libxml2 support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_SIMPLEXML
|
||||
bool "SimpleXML"
|
||||
select BR2_PACKAGE_PHP_EXT_LIBXML2
|
||||
help
|
||||
SimpleXML support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_WDDX
|
||||
bool "WDDX"
|
||||
select BR2_PACKAGE_EXPAT
|
||||
select BR2_PACKAGE_PHP_EXT_LIBXML2
|
||||
help
|
||||
WDDX support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_XML
|
||||
bool "XML Parser"
|
||||
select BR2_PACKAGE_PHP_EXT_LIBXML2
|
||||
help
|
||||
XML Parser support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_XMLREADER
|
||||
bool "XMLReader"
|
||||
select BR2_PACKAGE_PHP_EXT_LIBXML2
|
||||
help
|
||||
XMLReader support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_XMLWRITER
|
||||
bool "XMLWriter"
|
||||
select BR2_PACKAGE_PHP_EXT_LIBXML2
|
||||
help
|
||||
XMLWriter support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_XSL
|
||||
bool "XSL"
|
||||
select BR2_PACKAGE_PHP_EXT_DOM
|
||||
select BR2_PACKAGE_PHP_EXT_LIBXML2
|
||||
select BR2_PACKAGE_LIBXSLT
|
||||
help
|
||||
XSL transformation support
|
||||
|
||||
config BR2_PACKAGE_PHP_EXT_FFI
|
||||
bool "FFI"
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
select BR2_PACKAGE_LIBFFI
|
||||
help
|
||||
Foreign Function Interface support
|
||||
|
||||
comment "PHP FFI extension needs a toolchain w/ threads, dynamic library"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
|
||||
|
||||
endmenu
|
||||
@@ -0,0 +1,56 @@
|
||||
config BR2_PACKAGE_PHP
|
||||
bool "php"
|
||||
# PHP uses -export-dynamic, which breaks with elf2flt with a
|
||||
# message like "ld.real: section .junk LMA [...,...] overlaps
|
||||
# section .text LMA [...,...]"
|
||||
depends on !BR2_BINFMT_FLAT
|
||||
depends on BR2_USE_WCHAR
|
||||
select BR2_PACKAGE_PHP_SAPI_CGI if \
|
||||
!BR2_PACKAGE_PHP_SAPI_APACHE && \
|
||||
!BR2_PACKAGE_PHP_SAPI_CLI && \
|
||||
!BR2_PACKAGE_PHP_SAPI_FPM && \
|
||||
BR2_USE_MMU
|
||||
select BR2_PACKAGE_PHP_SAPI_CLI if !BR2_USE_MMU
|
||||
select BR2_PACKAGE_PCRE2
|
||||
help
|
||||
PHP is a widely-used general-purpose scripting
|
||||
language that is especially suited for Web development
|
||||
and can be embedded into HTML.
|
||||
|
||||
http://www.php.net
|
||||
|
||||
if BR2_PACKAGE_PHP
|
||||
|
||||
config BR2_PACKAGE_PHP_SAPI_APACHE
|
||||
bool "Apache interface"
|
||||
depends on BR2_PACKAGE_APACHE
|
||||
help
|
||||
Apache module
|
||||
|
||||
config BR2_PACKAGE_PHP_SAPI_CGI
|
||||
bool "CGI interface"
|
||||
# CGI uses fork()
|
||||
depends on BR2_USE_MMU
|
||||
help
|
||||
Common Gateway Interface
|
||||
|
||||
config BR2_PACKAGE_PHP_SAPI_CLI
|
||||
bool "CLI interface"
|
||||
help
|
||||
Command Line Interface
|
||||
|
||||
config BR2_PACKAGE_PHP_SAPI_FPM
|
||||
bool "FPM interface"
|
||||
depends on BR2_USE_MMU
|
||||
# "Sparc v8 and predecessors are not and will not be supported"
|
||||
depends on !BR2_sparc
|
||||
help
|
||||
PHP-FPM (FastCGI Process Manager)
|
||||
|
||||
source "package/php/Config.ext"
|
||||
|
||||
endif
|
||||
|
||||
comment "php needs a toolchain w/ wchar"
|
||||
depends on !BR2_BINFMT_FLAT
|
||||
depends on !BR2_USE_WCHAR
|
||||
@@ -0,0 +1,11 @@
|
||||
[www]
|
||||
pm = ondemand
|
||||
pm.process_idle_timeout = 120s
|
||||
pm.max_children = 5
|
||||
|
||||
listen = /var/run/php-fpm.sock
|
||||
listen.owner = www-data
|
||||
listen.group = www-data
|
||||
user = www-data
|
||||
group = www-data
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# From https://www.php.net/downloads.php
|
||||
sha256 cd976805ec2e9198417651027dfe16854ba2c2c388151ab9d4d268513d52ed52 php-8.0.13.tar.xz
|
||||
|
||||
# License file
|
||||
sha256 a188db807d711536f71e27b7d36879d63480f7994dc18adc08e624b3c5430fff LICENSE
|
||||
@@ -0,0 +1,356 @@
|
||||
################################################################################
|
||||
#
|
||||
# php
|
||||
#
|
||||
################################################################################
|
||||
|
||||
PHP_VERSION = 8.0.13
|
||||
PHP_SITE = https://www.php.net/distributions
|
||||
PHP_SOURCE = php-$(PHP_VERSION).tar.xz
|
||||
PHP_INSTALL_STAGING = YES
|
||||
PHP_INSTALL_STAGING_OPTS = INSTALL_ROOT=$(STAGING_DIR) install
|
||||
PHP_INSTALL_TARGET_OPTS = INSTALL_ROOT=$(TARGET_DIR) install
|
||||
PHP_DEPENDENCIES = host-pkgconf pcre2
|
||||
PHP_LICENSE = PHP-3.01
|
||||
PHP_LICENSE_FILES = LICENSE
|
||||
PHP_CPE_ID_VENDOR = php
|
||||
PHP_CONF_OPTS = \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--with-config-file-scan-dir=/etc/php.d \
|
||||
--disable-all \
|
||||
--with-external-pcre \
|
||||
--without-pear \
|
||||
--with-config-file-path=/etc \
|
||||
--disable-phpdbg \
|
||||
--disable-rpath
|
||||
PHP_CONF_ENV = \
|
||||
EXTRA_LIBS="$(PHP_EXTRA_LIBS)"
|
||||
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
PHP_CONF_ENV += LIBS="$(PHP_STATIC_LIBS)"
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_STATIC_LIBS)$(BR2_TOOLCHAIN_HAS_THREADS),yy)
|
||||
PHP_STATIC_LIBS += -lpthread
|
||||
endif
|
||||
|
||||
ifeq ($(call qstrip,$(BR2_TARGET_LOCALTIME)),)
|
||||
PHP_LOCALTIME = UTC
|
||||
else
|
||||
# Not q-stripping this value, as we need quotes in the php.ini file
|
||||
PHP_LOCALTIME = $(BR2_TARGET_LOCALTIME)
|
||||
endif
|
||||
|
||||
# PHP can't be AUTORECONFed the standard way unfortunately
|
||||
PHP_DEPENDENCIES += host-autoconf host-automake host-libtool
|
||||
define PHP_BUILDCONF
|
||||
cd $(@D) ; $(TARGET_MAKE_ENV) ./buildconf --force
|
||||
endef
|
||||
PHP_PRE_CONFIGURE_HOOKS += PHP_BUILDCONF
|
||||
|
||||
ifeq ($(BR2_ENDIAN),"BIG")
|
||||
PHP_CONF_ENV += ac_cv_c_bigendian_php=yes
|
||||
else
|
||||
PHP_CONF_ENV += ac_cv_c_bigendian_php=no
|
||||
endif
|
||||
PHP_CONFIG_SCRIPTS = php-config
|
||||
|
||||
PHP_CFLAGS = $(TARGET_CFLAGS)
|
||||
PHP_CXXFLAGS = $(TARGET_CXXFLAGS)
|
||||
|
||||
# The OPcache extension isn't cross-compile friendly
|
||||
# Throw some defines here to avoid patching heavily
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_OPCACHE),y)
|
||||
PHP_CONF_OPTS += --enable-opcache --disable-opcache-jit
|
||||
PHP_CONF_ENV += ac_cv_func_mprotect=yes
|
||||
PHP_CFLAGS += \
|
||||
-DHAVE_SHM_IPC \
|
||||
-DHAVE_SHM_MMAP_ANON \
|
||||
-DHAVE_SHM_MMAP_ZERO \
|
||||
-DHAVE_SHM_MMAP_POSIX \
|
||||
-DHAVE_SHM_MMAP_FILE
|
||||
endif
|
||||
|
||||
# We need to force dl "detection"
|
||||
ifeq ($(BR2_STATIC_LIBS),)
|
||||
PHP_CONF_ENV += ac_cv_func_dlopen=yes ac_cv_lib_dl_dlopen=yes
|
||||
PHP_EXTRA_LIBS += -ldl
|
||||
else
|
||||
PHP_CONF_ENV += ac_cv_func_dlopen=no ac_cv_lib_dl_dlopen=no
|
||||
endif
|
||||
|
||||
PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_SAPI_CLI),--enable-cli,--disable-cli)
|
||||
PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_SAPI_CGI),--enable-cgi,--disable-cgi)
|
||||
PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_SAPI_FPM),--enable-fpm,--disable-fpm)
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_SAPI_APACHE),y)
|
||||
PHP_DEPENDENCIES += apache
|
||||
PHP_CONF_OPTS += --with-apxs2=$(STAGING_DIR)/usr/bin/apxs
|
||||
|
||||
# Enable thread safety option if Apache MPM is event or worker
|
||||
ifeq ($(BR2_PACKAGE_APACHE_MPM_EVENT)$(BR2_PACKAGE_APACHE_MPM_WORKER),y)
|
||||
PHP_CONF_OPTS += --enable-zts
|
||||
endif
|
||||
endif
|
||||
|
||||
### Extensions
|
||||
PHP_CONF_OPTS += \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_SOCKETS),--enable-sockets) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_POSIX),--enable-posix) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_SESSION),--enable-session) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_DOM),--enable-dom) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_SIMPLEXML),--enable-simplexml) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_SOAP),--enable-soap) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_XML),--enable-xml) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_XMLREADER),--enable-xmlreader) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_XMLWRITER),--enable-xmlwriter) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_EXIF),--enable-exif) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_FTP),--enable-ftp) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_TOKENIZER),--enable-tokenizer) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_PCNTL),--enable-pcntl) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_SHMOP),--enable-shmop) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_SYSVMSG),--enable-sysvmsg) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_SYSVSEM),--enable-sysvsem) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_SYSVSHM),--enable-sysvshm) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_ZIP),--with-zip) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_CTYPE),--enable-ctype) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_FILTER),--enable-filter) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_CALENDAR),--enable-calendar) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_FILEINFO),--enable-fileinfo) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_BCMATH),--enable-bcmath) \
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_PHAR),--enable-phar)
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_LIBARGON2),y)
|
||||
PHP_CONF_OPTS += --with-password-argon2=$(STAGING_DIR)/usr
|
||||
PHP_DEPENDENCIES += libargon2
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_LIBSODIUM),y)
|
||||
PHP_CONF_OPTS += --with-sodium=$(STAGING_DIR)/usr
|
||||
PHP_DEPENDENCIES += libsodium
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_MBSTRING),y)
|
||||
PHP_CONF_OPTS += --enable-mbstring
|
||||
PHP_DEPENDENCIES += oniguruma
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_OPENSSL),y)
|
||||
PHP_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr
|
||||
PHP_DEPENDENCIES += openssl
|
||||
# openssl needs zlib, but the configure script forgets to link against
|
||||
# it causing detection failures with static linking
|
||||
PHP_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs openssl`
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_LIBXML2),y)
|
||||
PHP_CONF_ENV += php_cv_libxml_build_works=yes
|
||||
PHP_CONF_OPTS += --with-libxml
|
||||
PHP_DEPENDENCIES += libxml2
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_WDDX),y)
|
||||
PHP_CONF_OPTS += --enable-wddx --with-libexpat-dir=$(STAGING_DIR)/usr
|
||||
PHP_DEPENDENCIES += expat
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_ZIP),y)
|
||||
PHP_DEPENDENCIES += libzip
|
||||
endif
|
||||
|
||||
ifneq ($(BR2_PACKAGE_PHP_EXT_ZLIB)$(BR2_PACKAGE_PHP_EXT_ZIP),)
|
||||
PHP_CONF_OPTS += --with-zlib=$(STAGING_DIR)/usr
|
||||
PHP_DEPENDENCIES += zlib
|
||||
else
|
||||
PHP_CONF_OPTS += --disable-mysqlnd_compression_support
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_GETTEXT),y)
|
||||
PHP_CONF_OPTS += --with-gettext=$(STAGING_DIR)/usr
|
||||
PHP_DEPENDENCIES += $(TARGET_NLS_DEPENDENCIES)
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_ICONV),y)
|
||||
ifeq ($(BR2_PACKAGE_LIBICONV),y)
|
||||
PHP_CONF_OPTS += --with-iconv=$(STAGING_DIR)/usr
|
||||
PHP_DEPENDENCIES += libiconv
|
||||
else
|
||||
PHP_CONF_OPTS += --with-iconv
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_INTL),y)
|
||||
PHP_CONF_OPTS += --enable-intl --with-icu-dir=$(STAGING_DIR)/usr
|
||||
PHP_CXXFLAGS += "`$(STAGING_DIR)/usr/bin/icu-config --cxxflags`"
|
||||
PHP_DEPENDENCIES += icu
|
||||
# The intl module is implemented in C++, but PHP fails to use
|
||||
# g++ as the compiler for the final link. As a workaround,
|
||||
# tell it to link libstdc++.
|
||||
PHP_EXTRA_LIBS += -lstdc++
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_GMP),y)
|
||||
PHP_CONF_OPTS += --with-gmp=$(STAGING_DIR)/usr
|
||||
PHP_DEPENDENCIES += gmp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_READLINE),y)
|
||||
PHP_CONF_OPTS += --with-readline=$(STAGING_DIR)/usr
|
||||
PHP_DEPENDENCIES += readline
|
||||
endif
|
||||
|
||||
### Native SQL extensions
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_MYSQLI),y)
|
||||
PHP_CONF_OPTS += --with-mysqli
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_PGSQL),y)
|
||||
PHP_CONF_OPTS += --with-pgsql=$(STAGING_DIR)/usr
|
||||
PHP_DEPENDENCIES += postgresql
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_SQLITE),y)
|
||||
PHP_CONF_OPTS += --with-sqlite3=$(STAGING_DIR)/usr
|
||||
PHP_DEPENDENCIES += sqlite
|
||||
PHP_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs sqlite3`
|
||||
endif
|
||||
|
||||
### PDO
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_PDO),y)
|
||||
PHP_CONF_OPTS += --enable-pdo
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_SQLITE),y)
|
||||
PHP_CONF_OPTS += --with-pdo-sqlite=$(STAGING_DIR)/usr
|
||||
PHP_DEPENDENCIES += sqlite
|
||||
PHP_CFLAGS += -DSQLITE_OMIT_LOAD_EXTENSION
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_MYSQL),y)
|
||||
PHP_CONF_OPTS += --with-pdo-mysql
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_POSTGRESQL),y)
|
||||
PHP_CONF_OPTS += --with-pdo-pgsql=$(STAGING_DIR)/usr
|
||||
PHP_DEPENDENCIES += postgresql
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_UNIXODBC),y)
|
||||
PHP_CONF_OPTS += --with-pdo-odbc=unixODBC,$(STAGING_DIR)/usr
|
||||
PHP_DEPENDENCIES += unixodbc
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(BR2_PACKAGE_PHP_EXT_MYSQLI)$(BR2_PACKAGE_PHP_EXT_PDO_MYSQL),)
|
||||
# Set default MySQL unix socket to what the MySQL server is using by default
|
||||
PHP_CONF_OPTS += --with-mysql-sock=$(MYSQL_SOCKET)
|
||||
endif
|
||||
|
||||
define PHP_DISABLE_VALGRIND
|
||||
$(SED) '/^#define HAVE_VALGRIND/d' $(@D)/main/php_config.h
|
||||
endef
|
||||
PHP_POST_CONFIGURE_HOOKS += PHP_DISABLE_VALGRIND
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PCRE2_JIT),y)
|
||||
PHP_CONF_OPTS += --with-pcre-jit=yes
|
||||
PHP_CONF_ENV += ac_cv_have_pcre2_jit=yes
|
||||
else
|
||||
PHP_CONF_OPTS += --with-pcre-jit=no
|
||||
PHP_CONF_ENV += ac_cv_have_pcre2_jit=no
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_CURL),y)
|
||||
PHP_CONF_OPTS += --with-curl
|
||||
PHP_DEPENDENCIES += libcurl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_XSL),y)
|
||||
PHP_CONF_OPTS += --with-xsl=$(STAGING_DIR)/usr
|
||||
PHP_DEPENDENCIES += libxslt
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_BZIP2),y)
|
||||
PHP_CONF_OPTS += --with-bz2=$(STAGING_DIR)/usr
|
||||
PHP_DEPENDENCIES += bzip2
|
||||
endif
|
||||
|
||||
### DBA
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_DBA),y)
|
||||
PHP_CONF_OPTS += --enable-dba
|
||||
ifneq ($(BR2_PACKAGE_PHP_EXT_DBA_CDB),y)
|
||||
PHP_CONF_OPTS += --without-cdb
|
||||
endif
|
||||
ifneq ($(BR2_PACKAGE_PHP_EXT_DBA_FLAT),y)
|
||||
PHP_CONF_OPTS += --without-flatfile
|
||||
endif
|
||||
ifneq ($(BR2_PACKAGE_PHP_EXT_DBA_INI),y)
|
||||
PHP_CONF_OPTS += --without-inifile
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_DBA_DB4),y)
|
||||
PHP_CONF_OPTS += --with-db4=$(STAGING_DIR)/usr
|
||||
PHP_DEPENDENCIES += berkeleydb
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_SNMP),y)
|
||||
PHP_CONF_OPTS += --with-snmp=$(STAGING_DIR)/usr
|
||||
PHP_DEPENDENCIES += netsnmp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_GD),y)
|
||||
PHP_CONF_OPTS += \
|
||||
--enable-gd \
|
||||
--with-jpeg \
|
||||
--with-freetype
|
||||
PHP_DEPENDENCIES += jpeg libpng freetype zlib
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_FFI),y)
|
||||
PHP_CONF_OPTS += --with-ffi
|
||||
PHP_DEPENDENCIES += libffi
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PHP_SAPI_FPM),y)
|
||||
define PHP_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 0755 $(@D)/sapi/fpm/init.d.php-fpm \
|
||||
$(TARGET_DIR)/etc/init.d/S49php-fpm
|
||||
endef
|
||||
|
||||
define PHP_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 0644 $(@D)/sapi/fpm/php-fpm.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/php-fpm.service
|
||||
endef
|
||||
|
||||
define PHP_INSTALL_FPM_CONF
|
||||
$(INSTALL) -D -m 0644 package/php/php-fpm.conf \
|
||||
$(TARGET_DIR)/etc/php-fpm.conf
|
||||
rm -f $(TARGET_DIR)/etc/php-fpm.d/www.conf.default
|
||||
# remove unused sample status page /usr/php/php/fpm/status.html
|
||||
rm -rf $(TARGET_DIR)/usr/php
|
||||
endef
|
||||
|
||||
PHP_POST_INSTALL_TARGET_HOOKS += PHP_INSTALL_FPM_CONF
|
||||
endif
|
||||
|
||||
define PHP_EXTENSIONS_FIXUP
|
||||
$(SED) "/prefix/ s:/usr:$(STAGING_DIR)/usr:" \
|
||||
$(STAGING_DIR)/usr/bin/phpize
|
||||
$(SED) "/extension_dir/ s:/usr:$(TARGET_DIR)/usr:" \
|
||||
$(STAGING_DIR)/usr/bin/php-config
|
||||
endef
|
||||
|
||||
PHP_POST_INSTALL_TARGET_HOOKS += PHP_EXTENSIONS_FIXUP
|
||||
|
||||
define PHP_INSTALL_FIXUP
|
||||
rm -rf $(TARGET_DIR)/usr/lib/php/build
|
||||
rm -f $(TARGET_DIR)/usr/bin/phpize
|
||||
$(INSTALL) -D -m 0755 $(PHP_DIR)/php.ini-production \
|
||||
$(TARGET_DIR)/etc/php.ini
|
||||
$(SED) 's%;date.timezone =.*%date.timezone = $(PHP_LOCALTIME)%' \
|
||||
$(TARGET_DIR)/etc/php.ini
|
||||
$(if $(BR2_PACKAGE_PHP_EXT_OPCACHE),
|
||||
$(SED) '/;extension=php_xsl.dll/azend_extension=opcache.so' \
|
||||
$(TARGET_DIR)/etc/php.ini)
|
||||
endef
|
||||
|
||||
PHP_POST_INSTALL_TARGET_HOOKS += PHP_INSTALL_FIXUP
|
||||
|
||||
PHP_CONF_ENV += CFLAGS="$(PHP_CFLAGS)" CXXFLAGS="$(PHP_CXXFLAGS)"
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user