Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ install:
- git pull
- popd
- 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
- | # older distros don't ship a libjpeg.pc, add our own to pkg-config path
if ! pkg-config --exists libjpeg; then
export PKG_CONFIG_PATH=$PWD:$PKG_CONFIG_PATH
fi
- ./bin/install-icu
- export PKG_CONFIG_PATH=$ICU_INSTALL_DIR/lib/pkgconfig:$PKG_CONFIG_PATH
- touch custom_configure_options
- ./bin/install-libzip
- ./bin/install-libsodium
- ./bin/install-password-argon2
Expand All @@ -96,6 +102,7 @@ install:
else
cp default_configure_options.$RELEASE $HOME/.php-build/share/php-build/default_configure_options
fi
- cat custom_configure_options >> $HOME/.php-build/share/php-build/default_configure_options
- | # disable xdebug on master
if [[ $VERSION = master && $RELEASE != xenial ]]; then
sed -i -e '/install_xdebug_master/d' $HOME/.php-build/share/php-build/definitions/$VERSION
Expand Down
22 changes: 16 additions & 6 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,23 @@ php-build -i development "${VERSION}" "${INSTALL_DEST}/${VERSION}"

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

# pear
curl -fsSL --retry 20 -O http://pear.php.net/go-pear.phar

env TZ=UTC $TRAVIS_BUILD_DIR/bin/install-pear
rm go-pear.phar
"$INSTALL_DEST/$VERSION/bin/pear" config-set php_ini "$INSTALL_DEST/$VERSION/etc/php.ini" system
"$INSTALL_DEST/$VERSION/bin/pear" config-set auto_discover 1
# update default_cert_file
wget -O /usr/local/ssl/cert.pem https://curl.haxx.se/ca/cacert.pem


# don't install pear on master (issue with php 8.0)
# this could be a temp issue though
if [[ ! $VERSION =~ ^master$ ]]; then
curl -fsSL --retry 20 -O http://pear.php.net/go-pear.phar

env TZ=UTC $TRAVIS_BUILD_DIR/bin/install-pear
rm go-pear.phar
"$INSTALL_DEST/$VERSION/bin/pear" config-set php_ini "$INSTALL_DEST/$VERSION/etc/php.ini" system
"$INSTALL_DEST/$VERSION/bin/pear" config-set auto_discover 1

"$INSTALL_DEST/$VERSION/bin/pear" channel-update pear.php.net
fi

# php-fpm
ln -sv $PWD/sbin/php-fpm $PWD/bin/php-fpm
Expand Down
2 changes: 2 additions & 0 deletions bin/compile-extension-apcu
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ else
apcu=apcu
fi

pecl channel-update pecl.php.net

echo | pecl_install $apcu

travis_time_finish
Expand Down
2 changes: 1 addition & 1 deletion bin/compile-extension-memcache
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ travis_time_start

if [[ ! $VERSION =~ ^7 && ! $VERSION =~ ^master$ ]]; then
pecl download memcache-beta
tar zxvf memcache*.tgz && pushd memcache*
tar zxvf memcache*.tgz && pushd memcache*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these trailing slashes for?

make clean || true
phpize
./configure && make && make install
Expand Down
4 changes: 2 additions & 2 deletions bin/compile-extension-memcached
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ install_memcache

if [[ $VERSION =~ ^7 || $VERSION =~ ^master$ ]]; then
pecl download memcached-3.1.2
tar zxvf memcached*.tgz && pushd memcached*
tar zxvf memcached*.tgz && pushd memcached*/
make clean || true
else
pecl download memcached-2.2.0
tar zxvf memcached*.tgz && pushd memcached*
tar zxvf memcached*.tgz && pushd memcached*/
make clean || true
fi
phpize
Expand Down
5 changes: 4 additions & 1 deletion bin/install-icu
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ rm -rf $ICU_INSTALL_DIR
make install
popd

echo "--with-icu-dir=$ICU_INSTALL_DIR" >> $TRAVIS_BUILD_DIR/default_configure_options.${RELEASE}
# PHP >= 7.4 exclusively uses pkg-config for ICU
if [[ $VERSION =~ ^5 || $VERSION =~ 7\.[0123] ]]; then
echo "--with-icu-dir=$ICU_INSTALL_DIR" >> $TRAVIS_BUILD_DIR/custom_configure_options
fi
4 changes: 2 additions & 2 deletions bin/install-libsodium
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ make check
make install
popd

# add the option in default_configure_options
echo "--with-sodium=$LIBSODIUM_INSTALL_DIR" >> $TRAVIS_BUILD_DIR/default_configure_options.${RELEASE}
# add the option in custom_configure_options
echo "--with-sodium=$LIBSODIUM_INSTALL_DIR" >> $TRAVIS_BUILD_DIR/custom_configure_options
13 changes: 7 additions & 6 deletions bin/install-libzip
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,22 @@ pushd cmake
#install cmake specific to host architecture.
if [[ $HOSTTYPE == "powerpc64le" ]]
then
wget -O - https://cmake.org/files/v3.12/cmake-3.12.0.tar.gz | tar -xz --strip-components=1
wget -O - https://cmake.org/files/v3.14/cmake-3.14.0.tar.gz | tar -xz --strip-components=1
#compile cmake
./configure > /dev/null 2>&1 && make > /dev/null 2>&1 && sudo make install > /dev/null 2>&1
else
wget -O - https://cmake.org/files/v3.12/cmake-3.12.3-Linux-x86_64.tar.gz | tar -xz --strip-components=1
wget https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.sh
sudo sh cmake-3.14.0-Linux-x86_64.sh --prefix=/usr --skip-license
fi
popd

# compile libzip
git clone -b rel-1-5-1 https://github.com/nih-at/libzip.git
git clone -b rel-1-5-2 https://github.com/nih-at/libzip.git
pushd libzip
../cmake/bin/cmake -DCMAKE_INSTALL_PREFIX=$LIBZIP_INSTALL_DIR .
cmake -DCMAKE_INSTALL_PREFIX=$LIBZIP_INSTALL_DIR .
make
make install
popd

# add the option in default_configure_options
echo "--with-libzip=$LIBZIP_INSTALL_DIR" >> $TRAVIS_BUILD_DIR/default_configure_options.${RELEASE}
# add the option in custom_configure_options
echo "--with-libzip=$LIBZIP_INSTALL_DIR" >> $TRAVIS_BUILD_DIR/custom_configure_options
4 changes: 2 additions & 2 deletions bin/install-password-argon2
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ make test
make install PREFIX=$LIBARGON2_INSTALL_DIR
popd

# add the option in default_configure_options
echo "--with-password-argon2=$LIBARGON2_INSTALL_DIR" >> $TRAVIS_BUILD_DIR/default_configure_options.${RELEASE}
# add the option in custom_configure_options
echo "--with-password-argon2=$LIBARGON2_INSTALL_DIR" >> $TRAVIS_BUILD_DIR/custom_configure_options
2 changes: 1 addition & 1 deletion bin/install-pear
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sleep .1
send -s -- "1\r"

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

expect -re "1-\[0-9]+, 'all' or Enter to continue:"
sleep .1
Expand Down
49 changes: 49 additions & 0 deletions default_configure_options.bionic
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
--enable-intl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this one also need all the version specific variations, at least for baseline, 7.4, master? (Which is also the reason why I still think that #29 is a more scalable solution to this problem.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, i borrowed this from the xenial base line default for my testing.

--with-openssl
--without-pear
--with-gd
--with-jpeg-dir=/usr
--with-png-dir=/usr
--with-freetype-dir=/usr
--enable-exif
--enable-zip
--with-zlib
--with-zlib-dir=/usr
--with-mcrypt=/usr
--with-pdo-sqlite
--enable-soap
--enable-xmlreader
--with-xsl
--enable-ftp
--with-tidy
--with-xmlrpc
--enable-sysvsem
--enable-sysvshm
--enable-sysvmsg
--enable-shmop
--with-mysql=mysqlnd
--with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd
--enable-pcntl
--with-readline
--enable-mbstring
--with-curl
--with-pgsql
--with-pdo-pgsql
--with-gettext
--enable-sockets
--with-bz2
--enable-bcmath
--enable-calendar
--with-libdir=lib
--enable-fpm
--enable-maintainer-zts
--with-gmp
--with-kerberos
--with-imap
--with-imap-ssl
--with-kerberos
--with-ldap
--with-ldap-sasl
--enable-dba
--with-cdb
45 changes: 45 additions & 0 deletions default_configure_options.trusty-7.4
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
--enable-intl
--with-openssl
--without-pear
--enable-gd
--with-jpeg
--with-freetype
--enable-exif
--enable-zip
--with-zlib
--with-zlib-dir=/usr
--with-pdo-sqlite
--enable-soap
--enable-xmlreader
--with-xsl
--enable-ftp
--with-tidy
--with-xmlrpc
--enable-sysvsem
--enable-sysvshm
--enable-sysvmsg
--enable-shmop
--with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd
--enable-pcntl
--with-readline
--enable-mbstring
--with-curl
--with-pgsql
--with-pdo-pgsql
--with-gettext
--enable-sockets
--with-bz2
--enable-bcmath
--enable-calendar
--with-libdir=lib
--enable-fpm
--enable-maintainer-zts
--with-gmp
--with-imap
--with-imap-ssl
--with-kerberos
--with-ldap
--with-ldap-sasl
--enable-dba
--with-cdb
45 changes: 45 additions & 0 deletions default_configure_options.trusty-master
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
--enable-intl
--with-openssl
--without-pear
--enable-gd
--with-jpeg
--with-freetype
--enable-exif
--enable-zip
--with-zlib
--with-zlib-dir=/usr
--with-pdo-sqlite
--enable-soap
--enable-xmlreader
--with-xsl
--enable-ftp
--with-tidy
--with-xmlrpc
--enable-sysvsem
--enable-sysvshm
--enable-sysvmsg
--enable-shmop
--with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd
--enable-pcntl
--with-readline
--enable-mbstring
--with-curl
--with-pgsql
--with-pdo-pgsql
--with-gettext
--enable-sockets
--with-bz2
--enable-bcmath
--enable-calendar
--with-libdir=lib
--enable-fpm
--enable-maintainer-zts
--with-gmp
--with-imap
--with-imap-ssl
--with-kerberos
--with-ldap
--with-ldap-sasl
--enable-dba
--with-cdb
45 changes: 45 additions & 0 deletions default_configure_options.xenial-7.4
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
--enable-intl
--with-openssl
--without-pear
--enable-gd
--with-jpeg
--with-freetype
--enable-exif
--enable-zip
--with-zlib
--with-zlib-dir=/usr
--with-pdo-sqlite
--enable-soap
--enable-xmlreader
--with-xsl
--enable-ftp
--with-tidy
--with-xmlrpc
--enable-sysvsem
--enable-sysvshm
--enable-sysvmsg
--enable-shmop
--with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd
--enable-pcntl
--with-readline
--enable-mbstring
--with-curl
--with-pgsql
--with-pdo-pgsql
--with-gettext
--enable-sockets
--with-bz2
--enable-bcmath
--enable-calendar
--with-libdir=lib
--enable-fpm
--enable-maintainer-zts
--with-gmp
--with-imap
--with-imap-ssl
--with-kerberos
--with-ldap
--with-ldap-sasl
--enable-dba
--with-cdb
45 changes: 45 additions & 0 deletions default_configure_options.xenial-master
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
--enable-intl
--with-openssl
--without-pear
--enable-gd
--with-jpeg
--with-freetype
--enable-exif
--enable-zip
--with-zlib
--with-zlib-dir=/usr
--with-pdo-sqlite
--enable-soap
--enable-xmlreader
--with-xsl
--enable-ftp
--with-tidy
--with-xmlrpc
--enable-sysvsem
--enable-sysvshm
--enable-sysvmsg
--enable-shmop
--with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd
--enable-pcntl
--with-readline
--enable-mbstring
--with-curl
--with-pgsql
--with-pdo-pgsql
--with-gettext
--enable-sockets
--with-bz2
--enable-bcmath
--enable-calendar
--with-libdir=lib
--enable-fpm
--enable-maintainer-zts
--with-gmp
--with-imap
--with-imap-ssl
--with-kerberos
--with-ldap
--with-ldap-sasl
--enable-dba
--with-cdb
10 changes: 10 additions & 0 deletions libjpeg.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include

Name: libjpeg
Description: JPEG image codec
Version:
Libs: -L${libdir} -ljpeg
Cflags: -I${includedir}