Merge pull request #363 from pataar/fix/zookeeper

Use maven instead of ant when building zookeeper
pull/353/head^2 1.2.32
Michele Locati 2021-06-30 12:45:40 +02:00 committed by GitHub
commit 1188c1078b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 15 deletions

View File

@ -103,5 +103,5 @@ We should switch to the stable release once it will be available.
### zookeeper
The latest stable release of the `zookeeper` PHP extension doesn't support PHP 7.3+, so we install the beta version.
The latest stable release of the `zookeeper` PHP extension doesn't support PHP 7.3+, so we install the alpha version.
We should switch to the stable release once it will be available.

View File

@ -968,7 +968,7 @@ buildRequiredPackageLists() {
;;
zookeeper@alpine)
if ! test -f /usr/local/include/zookeeper/zookeeper.h; then
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile apache-ant automake libtool openjdk8"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile maven automake libtool openjdk8"
fi
;;
zookeeper@debian)
@ -2199,17 +2199,33 @@ installRemoteModule() {
fi
;;
zookeeper)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 506; then
installRemoteModule_version=0.5.0
else
installRemoteModule_version=1.0.0
fi
fi
case "$DISTRO" in
alpine)
if ! test -f /usr/local/include/zookeeper/zookeeper.h; then
if test $(compareVersions "$installRemoteModule_version" 1.0.0) -lt 0; then
installRemoteModule_src="$(getPackageSource http://archive.apache.org/dist/zookeeper/zookeeper-3.5.9/apache-zookeeper-3.5.9.tar.gz)"
else
installRemoteModule_tmp="$(curl -sSLf https://downloads.apache.org/zookeeper/stable | sed -E 's/["<>]/\n/g' | grep -E '^(apache-)?zookeeper-[0-9]+\.[0-9]+\.[0-9]+\.(tar\.gz|tgz)$' | head -n1)"
if test -z "$installRemoteModule_tmp"; then
echo 'Failed to detect the zookeeper library URL' >&2
exit 1
fi
installRemoteModule_src="$(getPackageSource https://downloads.apache.org/zookeeper/stable/$installRemoteModule_tmp)"
fi
cd -- "$installRemoteModule_src"
ant compile_jute
if test -d ~/.m2; then
installRemoteModule_delm2=n
else
installRemoteModule_delm2=y
fi
mvn -pl zookeeper-jute compile
cd - >/dev/null
cd -- "$installRemoteModule_src/zookeeper-client/zookeeper-client-c"
autoreconf -if
@ -2217,16 +2233,12 @@ installRemoteModule() {
make -j$(getProcessorCount) CFLAGS='-Wno-stringop-truncation -Wno-format-overflow'
make install
cd - >/dev/null
if test $installRemoteModule_delm2 = y; then
rm -rf ~/.m2
fi
fi
;;
esac
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 506; then
installRemoteModule_version=0.5.0
elif test $PHP_MAJMIN_VERSION -ge 703; then
installRemoteModule_version=beta
fi
fi
;;
esac
if test $installRemoteModule_manuallyInstalled -eq 0; then