- align the config option names
- re-order the configuration options
- add some help text
- drop obsolete notes regarding older PHP versions and obsolete CONFLICT
- remove (meanwhile) unrecognized configure options
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
* Add a needed BUILD_DEPENDENCY on icu package, when PHP8_INTL is
defined.
* Make PHP8_DOM selecting PHP8_LIBXML instead of depending on it.
* PHP8_INTL does not depend on PHP8_GETTEXT, it builds also
without gettext.
* Always show option for choosing PHP8_FULLUCIDATA
* For php8-cgi, php-cli, etc, a libstdcpp dependency is only gained
when PHP8_INTL is selected, therefore update those conditional depends.
As some combinations of these changes can change the binaries output,
PKG_RELEASE has been bumped.
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Add more menuconfig help text descriptions, and
convert some mixed tabs and spaces to spaces.
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
xmlreader was selecting package php8-mod-dom as well as depending on
PHP8_DOM, while php8-mod-dom also depended on PHP8_DOM (and therefore
selected PHP8_DOM when php8-mod-dom was selected). This is a Kconfig
recursive dependency, so break the recursion by noting that because
php8-mod-xmlreader selects php8-mod-dom, PHP8_DOM is a transitive
depends, so php8-mod-xmlreader should not depend on PHP8_DOM itself.
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
The php8 Makefile is already quite large. To improve readability, move
config section to a separate 'Config.in' file. To ensure that the PHP8
option is only saved in '.config' if PHP8 has been selected for building. A
depends on 'PACKAGE_php8' is added to the configuration option in the
'Config.in' file.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This reverts commit 996046e642.
After that faulty commit the 'icu' package is always selected
even if php8 itself is not even selected.
Simple bug reproduction process:
perus@ub2510:/OpenWrt/aarch64$ rm .config
perus@ub2510:/OpenWrt/aarch64$ touch .config
perus@ub2510:/OpenWrt/aarch64$ make defconfig
Collecting package info: done
...
#
# configuration written to .config
#
perus@ub2510:/OpenWrt/aarch64$ grep -iE "php8|icu" .config
# PHP8
# CONFIG_PACKAGE_php8 is not set
CONFIG_PHP8_LIBXML=y
CONFIG_PHP8_DOM=y
CONFIG_PHP8_GETTEXT=y
CONFIG_PHP8_INTL=y
# CONFIG_PHP8_FULLICUDATA is not set
# end of PHP8
CONFIG_PACKAGE_icu=y
# CONFIG_PACKAGE_icu-data-tools is not set
# CONFIG_PACKAGE_icu-full-data is not set
Revert the commit, so that a fix can be developed and tested.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
With CONFIG_PHP8_GETTEXT php8 always gains a
dependency on a version of the 'icu' package,
however said dependency is not declared, so
on gets compilation errors when
CONFIG_PHP8_GETTEXT=y but PACKAGE_icu is not
selected.
Therefore select PACKAGE_icu when PHP8_GETTEXT is
selected.
Closes#28207
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
Obsolete use of $(SDK) in configure conditionals can result in
dependency errors when building a subset of packages for packages which
have multiple sub-packages.
The reason it causes dependency issues is that (using libdbi-drivers as
an example) lines like:
ifneq ($(SDK)$(CONFIG_PACKAGE_libdbd-sqlite3),)
always evaluate to true if you are compiling in the SDK. So for a user
compiling from the SDK, the configure arguments are always added to the package build.
In the case of libdbi-drivers:
CONFIGURE_ARGS += \
--with-sqlite3 \
--with-sqlite3-incdir=$(STAGING_DIR)/usr/include \
-with-sqlite3-libdir=$(STAGING_DIR)/usr/lib
is always added even if PACKAGE_libdbd-sqlite3 is deselected. When
libdbd-sqlite3 is deselected, this dependency:
DEPENDS:=libdbi +libsqlite3
is not present, so when configure tries to find sqlite3 it fails.
Closes#28173 "tree-wide: obsolete $(SDK) in conditionals"
See also:
* "include: remove SDK exception from package install targets"
openwrt/openwrt@28f44a4
Performed tree-wide to ease revert if necessary, per:
https://github.com/openwrt/packages/issues/28173#issuecomment-3694615980
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
When PHP8_DOM is enabled then xmlreader automatically gains a
dependency to php8-mod-dom, not only when the dom module
is actually built.
So fix it by declaring this dependency.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
As with gettext modules described in #28078 and #28075, xml and dom
related module selection affects the dependencies of other packages.
Therefore, we invert the dependency logic:
PHP8_LIBXML and PHP8_DOM are are enabled by default and packages
which depend on libxml2 and --enable-dom=shared are not shown (and
the related configure args are disabled) if the config options are
not enabled.
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
Fixes: php8: global package dependency changes based on module
selection
Fixes: #28078
As described in #28078 and #28075,
Some binaries gain a dependency on libstdcpp when mod-gettext is included
in the build, however this was not explicitly declared, so packaging
fails with (e.g.):
Package php8-cgi is missing dependencies for the following libraries:
libstdc++.so.6
In contrast to #28075, this commit takes the approach:
* Make use of --with-gettext depend on a configure flag (enabled by
default, since that matches current full build behaviour)
* Make sub-packages which require --with-gettext depend on the
configure flag
This means that e.g. php-cgi would not have gettext support if the
configure flag was disabled, and e.g. php-mod-gettext and php-mod-intl
would not be selectable.
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
libpcre2's JIT support is controlled with a compile-time flag.
When PHP is compiled against it (external libpcre2 - not PHP's bundled
version) as in our use-case, then it tries to auto-detect whether
JIT support is enalbed or not - but this is done based on a guess
when cross-compiling.
So instead of guessing, we need to tell the actual OpenWrt configuration
of libpcre2 to PHP.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
We used to rely on opkg to install the CLI tool for testing
PHP modules, but when opkg is not available anymore, we have to
use apk. The (simple) switch logic assumes, that only one
of both package manager tools is installed.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
The 'snmp' extension module uses net-snmp as library, but fails
to detect whether the library uses openssl when cross-compiling.
Pass the according autoconf variables as hint - net-snmp is not
using openssl at the moment as defined in the Makefile.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
This is a major upgrade to latest stable PHP version.
- IMAP extension was unbundled from PHP
- align patch filenames with latest ones from Debian
- removed obsolete patches
- adapted/refreshed patches
- added patch to remove call to httpd during configure
Note: this assumes that 'prefork' mpm is used
Upstream changelog for this specific release:
https://www.php.net/ChangeLog-8.php#8.4.5
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
This backported patch is required to fix the build for loongarch64:
...
... loongarch64-openwrt-linux-musl/bin/ld.bfd: Zend/zend_fibers.o: in function `zend_fiber_init_context':
zend_fibers.c:(.text+0xb34): undefined reference to `getcontext'
... loongarch64-openwrt-linux-musl/bin/ld.bfd: zend_fibers.c:(.text+0xb38): undefined reference to `getcontext'
... loongarch64-openwrt-linux-musl/bin/ld.bfd: zend_fibers.c:(.text+0xb74): undefined reference to `makecontext'
... loongarch64-openwrt-linux-musl/bin/ld.bfd: zend_fibers.c:(.text+0xb78): undefined reference to `makecontext'
... loongarch64-openwrt-linux-musl/bin/ld.bfd: Zend/zend_fibers.o: in function `.L170':
zend_fibers.c:(.text+0xe34): undefined reference to `swapcontext'
...
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
This is an alternative approach to #24209. Instead of switching
to bundled/internal libgd, workaround the capability detection
by giving the information to the build system directly.
PHP's original approach does not work when cross-compiling,
but since it is known which features are enabled in OpenWrt's
build, we can directly enable these features here, too.
This is not that future prove, but should do the job for the
moment until a proper solution was discussed with upstream.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Preparing to update icu4c to 75.
Created a patch for build errors in php-intl.
```
In file included from /mnt/node/openwrt/staging_dir/target-aarch64_generic_musl/usr/include/unicode/unistr.h:39,
from ext/intl/intl_convertcpp.h:22,
from ext/intl/intl_convertcpp.cpp:17:
/mnt/node/openwrt/staging_dir/target-aarch64_generic_musl/usr/include/unicode/stringpiece.h:133:29: error: 'enable_if_t' in namespace 'std' does not name a template type
133 | typename = std::enable_if_t<
| ^~~~~~~~~~~
/mnt/node/openwrt/staging_dir/target-aarch64_generic_musl/usr/include/unicode/stringpiece.h:133:24: note: 'std::enable_if_t' is only available from C++14 onwards
133 | typename = std::enable_if_t<
| ^~~
/mnt/node/openwrt/staging_dir/target-aarch64_generic_musl/usr/include/unicode/stringpiece.h:133:40: error: expected '>' before '<' token
133 | typename = std::enable_if_t<
| ^
```
The FreeBSD ports patch was used as a reference.
e680bd98d3
Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
Most packages already use https URLs and for PHP and PECL
package downloads https is working properly.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
The initial fix was done in a2e76e497.
Later we could revert it with 5779ae4c5 since a global fix
in gcc was deployed.
But now, PHP itself applied a workaround/fix in 8.2.8,
so that we now require the initial fix again.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>