Skip to content

Commit b4ae61f

Browse files
authored
Merge branch 'default' into libonig
2 parents 5e6e4a8 + f3e0b44 commit b4ae61f

16 files changed

+283
-36
lines changed

.travis.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,13 @@ install:
8686
- git pull
8787
- popd
8888
- if [[ $RELEASE != precise ]]; then unset ICU_RELEASE; fi # disable ICU installation for Trusty; see https://github.com/travis-ci/travis-ci/issues/3616#issuecomment-286302387
89-
- export PKG_CONFIG_PATH=$PWD:$PKG_CONFIG_PATH # older distros may not have necessary pkg-config files
89+
- | # older distros don't ship a libjpeg.pc, add our own to pkg-config path
90+
if ! pkg-config --exists libjpeg; then
91+
export PKG_CONFIG_PATH=$PWD:$PKG_CONFIG_PATH
92+
fi
9093
- ./bin/install-icu
94+
- export PKG_CONFIG_PATH=$ICU_INSTALL_DIR/lib/pkgconfig:$PKG_CONFIG_PATH
95+
- touch custom_configure_options
9196
- ./bin/install-libzip
9297
- ./bin/install-libsodium
9398
- ./bin/install-password-argon2
@@ -97,6 +102,7 @@ install:
97102
else
98103
cp default_configure_options.$RELEASE $HOME/.php-build/share/php-build/default_configure_options
99104
fi
105+
- cat custom_configure_options >> $HOME/.php-build/share/php-build/default_configure_options
100106
- | # disable xdebug on master
101107
if [[ $VERSION = master && $RELEASE != xenial ]]; then
102108
sed -i -e '/install_xdebug_master/d' $HOME/.php-build/share/php-build/definitions/$VERSION

bin/compile

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
11
#!/usr/bin/env bash
22

3-
function fetch_pear() {
4-
if [ -n $GITHUB_TOKEN ]; then
5-
auth_flag="-H 'Authorization: token $GITHUB_TOKEN'"
6-
fi
7-
8-
latest_tag=$(curl -sSfL --retry 20 "${auth_flag}" https://api.github.com/repos/pear/pearweb_phars/releases/latest | jq -r .tag_name)
9-
curl -sSfL "${auth_flag}" --retry 20 -O https://raw.githubusercontent.com/pear/pearweb_phars/${latest_tag}/go-pear.phar
10-
11-
if [ ! -f go-pear.phar ]; then
12-
echo "Latest PEAR tarball not found"
13-
exit 1
14-
fi
15-
}
16-
173
set -o errexit
184

195
if [[ ! $VERSION ]] ; then
@@ -34,13 +20,23 @@ php-build -i development "${VERSION}" "${INSTALL_DEST}/${VERSION}"
3420

3521
pushd "${INSTALL_DEST}/${VERSION}"
3622

37-
# pear
38-
fetch_pear
3923

40-
env TZ=UTC $TRAVIS_BUILD_DIR/bin/install-pear
41-
rm go-pear.phar
42-
"$INSTALL_DEST/$VERSION/bin/pear" config-set php_ini "$INSTALL_DEST/$VERSION/etc/php.ini" system
43-
"$INSTALL_DEST/$VERSION/bin/pear" config-set auto_discover 1
24+
# update default_cert_file
25+
wget -O /usr/local/ssl/cert.pem https://curl.haxx.se/ca/cacert.pem
26+
27+
28+
# don't install pear on master (issue with php 8.0)
29+
# this could be a temp issue though
30+
if [[ ! $VERSION =~ ^master$ ]]; then
31+
curl -fsSL --retry 20 -O http://pear.php.net/go-pear.phar
32+
33+
env TZ=UTC $TRAVIS_BUILD_DIR/bin/install-pear
34+
rm go-pear.phar
35+
"$INSTALL_DEST/$VERSION/bin/pear" config-set php_ini "$INSTALL_DEST/$VERSION/etc/php.ini" system
36+
"$INSTALL_DEST/$VERSION/bin/pear" config-set auto_discover 1
37+
38+
"$INSTALL_DEST/$VERSION/bin/pear" channel-update pear.php.net
39+
fi
4440

4541
# php-fpm
4642
ln -sv $PWD/sbin/php-fpm $PWD/bin/php-fpm

bin/compile-extension-apcu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ else
1111
apcu=apcu
1212
fi
1313

14+
pecl channel-update pecl.php.net
15+
1416
echo | pecl_install $apcu
1517

1618
travis_time_finish

bin/compile-extension-memcache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ travis_time_start
77

88
if [[ ! $VERSION =~ ^7 && ! $VERSION =~ ^master$ ]]; then
99
pecl download memcache-beta
10-
tar zxvf memcache*.tgz && pushd memcache*
10+
tar zxvf memcache*.tgz && pushd memcache*/
1111
make clean || true
1212
phpize
1313
./configure && make && make install

bin/compile-extension-memcached

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ install_memcache
1919

2020
if [[ $VERSION =~ ^7 || $VERSION =~ ^master$ ]]; then
2121
pecl download memcached-3.1.2
22-
tar zxvf memcached*.tgz && pushd memcached*
22+
tar zxvf memcached*.tgz && pushd memcached*/
2323
make clean || true
2424
else
2525
pecl download memcached-2.2.0
26-
tar zxvf memcached*.tgz && pushd memcached*
26+
tar zxvf memcached*.tgz && pushd memcached*/
2727
make clean || true
2828
fi
2929
phpize

bin/install-icu

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@ rm -rf $ICU_INSTALL_DIR
2020
make install
2121
popd
2222

23-
echo "--with-icu-dir=$ICU_INSTALL_DIR" >> $TRAVIS_BUILD_DIR/default_configure_options.${RELEASE}
23+
# PHP >= 7.4 exclusively uses pkg-config for ICU
24+
if [[ $VERSION =~ ^5 || $VERSION =~ 7\.[0123] ]]; then
25+
echo "--with-icu-dir=$ICU_INSTALL_DIR" >> $TRAVIS_BUILD_DIR/custom_configure_options
26+
fi

bin/install-libsodium

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ make check
2020
make install
2121
popd
2222

23-
# add the option in default_configure_options
24-
echo "--with-sodium=$LIBSODIUM_INSTALL_DIR" >> $TRAVIS_BUILD_DIR/default_configure_options.${RELEASE}
23+
# add the option in custom_configure_options
24+
echo "--with-sodium=$LIBSODIUM_INSTALL_DIR" >> $TRAVIS_BUILD_DIR/custom_configure_options

bin/install-libzip

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,22 @@ pushd cmake
2020
#install cmake specific to host architecture.
2121
if [[ $HOSTTYPE == "powerpc64le" ]]
2222
then
23-
wget -O - https://cmake.org/files/v3.12/cmake-3.12.0.tar.gz | tar -xz --strip-components=1
23+
wget -O - https://cmake.org/files/v3.14/cmake-3.14.0.tar.gz | tar -xz --strip-components=1
2424
#compile cmake
2525
./configure > /dev/null 2>&1 && make > /dev/null 2>&1 && sudo make install > /dev/null 2>&1
2626
else
27-
wget -O - https://cmake.org/files/v3.12/cmake-3.12.3-Linux-x86_64.tar.gz | tar -xz --strip-components=1
27+
wget https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.sh
28+
sudo sh cmake-3.14.0-Linux-x86_64.sh --prefix=/usr --skip-license
2829
fi
2930
popd
3031

3132
# compile libzip
32-
git clone -b rel-1-5-1 https://github.com/nih-at/libzip.git
33+
git clone -b rel-1-5-2 https://github.com/nih-at/libzip.git
3334
pushd libzip
34-
../cmake/bin/cmake -DCMAKE_INSTALL_PREFIX=$LIBZIP_INSTALL_DIR .
35+
cmake -DCMAKE_INSTALL_PREFIX=$LIBZIP_INSTALL_DIR .
3536
make
3637
make install
3738
popd
3839

39-
# add the option in default_configure_options
40-
echo "--with-libzip=$LIBZIP_INSTALL_DIR" >> $TRAVIS_BUILD_DIR/default_configure_options.${RELEASE}
40+
# add the option in custom_configure_options
41+
echo "--with-libzip=$LIBZIP_INSTALL_DIR" >> $TRAVIS_BUILD_DIR/custom_configure_options

bin/install-password-argon2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ make test
1919
make install PREFIX=$LIBARGON2_INSTALL_DIR
2020
popd
2121

22-
# add the option in default_configure_options
23-
echo "--with-password-argon2=$LIBARGON2_INSTALL_DIR" >> $TRAVIS_BUILD_DIR/default_configure_options.${RELEASE}
22+
# add the option in custom_configure_options
23+
echo "--with-password-argon2=$LIBARGON2_INSTALL_DIR" >> $TRAVIS_BUILD_DIR/custom_configure_options

bin/install-pear

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ sleep .1
1010
send -s -- "1\r"
1111

1212
expect -re "Installation base (.*):"
13-
send -s -- "/home/travis/.phpenv/versions/$env(VERSION)\r"
13+
send -s -- "$env(HOME)/.phpenv/versions/$env(VERSION)\r"
1414

1515
expect -re "1-\[0-9]+, 'all' or Enter to continue:"
1616
sleep .1

0 commit comments

Comments
 (0)