mirror of
https://github.com/danog/php.git
synced 2024-11-26 20:04:58 +01:00
Fix build issues on 7.4.0-alpha1
This commit is contained in:
parent
3e9d32bb97
commit
d92a953b08
@ -108,12 +108,16 @@ RUN set -xe \
|
||||
libedit-dev \
|
||||
libsodium-dev \
|
||||
libxml2-dev \
|
||||
oniguruma-dev \
|
||||
openssl-dev \
|
||||
sqlite-dev \
|
||||
\
|
||||
&& export CFLAGS="$PHP_CFLAGS" \
|
||||
CPPFLAGS="$PHP_CPPFLAGS" \
|
||||
LDFLAGS="$PHP_LDFLAGS" \
|
||||
# fix ARGON2 detection for 7.4-alpha1 https://github.com/docker-library/php/pull/840#pullrequestreview-249660894
|
||||
ARGON2_LIBS="-largon2" \
|
||||
ARGON2_CFLAGS="-I/usr/include" \
|
||||
&& docker-php-source extract \
|
||||
&& cd /usr/src/php \
|
||||
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
|
||||
@ -171,9 +175,8 @@ RUN set -xe \
|
||||
\
|
||||
&& apk del --no-network .build-deps \
|
||||
\
|
||||
# https://github.com/docker-library/php/issues/443
|
||||
&& pecl update-channels \
|
||||
&& rm -rf /tmp/pear ~/.pearrc
|
||||
# smoke test
|
||||
&& php --version
|
||||
|
||||
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
|
||||
|
||||
|
@ -109,12 +109,16 @@ RUN set -xe \
|
||||
libedit-dev \
|
||||
libsodium-dev \
|
||||
libxml2-dev \
|
||||
oniguruma-dev \
|
||||
openssl-dev \
|
||||
sqlite-dev \
|
||||
\
|
||||
&& export CFLAGS="$PHP_CFLAGS" \
|
||||
CPPFLAGS="$PHP_CPPFLAGS" \
|
||||
LDFLAGS="$PHP_LDFLAGS" \
|
||||
# fix ARGON2 detection for 7.4-alpha1 https://github.com/docker-library/php/pull/840#pullrequestreview-249660894
|
||||
ARGON2_LIBS="-largon2" \
|
||||
ARGON2_CFLAGS="-I/usr/include" \
|
||||
&& docker-php-source extract \
|
||||
&& cd /usr/src/php \
|
||||
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
|
||||
@ -172,9 +176,8 @@ RUN set -xe \
|
||||
\
|
||||
&& apk del --no-network .build-deps \
|
||||
\
|
||||
# https://github.com/docker-library/php/issues/443
|
||||
&& pecl update-channels \
|
||||
&& rm -rf /tmp/pear ~/.pearrc
|
||||
# smoke test
|
||||
&& php --version
|
||||
|
||||
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
|
||||
|
||||
|
@ -109,12 +109,16 @@ RUN set -xe \
|
||||
libedit-dev \
|
||||
libsodium-dev \
|
||||
libxml2-dev \
|
||||
oniguruma-dev \
|
||||
openssl-dev \
|
||||
sqlite-dev \
|
||||
\
|
||||
&& export CFLAGS="$PHP_CFLAGS" \
|
||||
CPPFLAGS="$PHP_CPPFLAGS" \
|
||||
LDFLAGS="$PHP_LDFLAGS" \
|
||||
# fix ARGON2 detection for 7.4-alpha1 https://github.com/docker-library/php/pull/840#pullrequestreview-249660894
|
||||
ARGON2_LIBS="-largon2" \
|
||||
ARGON2_CFLAGS="-I/usr/include" \
|
||||
&& docker-php-source extract \
|
||||
&& cd /usr/src/php \
|
||||
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
|
||||
@ -172,9 +176,8 @@ RUN set -xe \
|
||||
\
|
||||
&& apk del --no-network .build-deps \
|
||||
\
|
||||
# https://github.com/docker-library/php/issues/443
|
||||
&& pecl update-channels \
|
||||
&& rm -rf /tmp/pear ~/.pearrc
|
||||
# smoke test
|
||||
&& php --version
|
||||
|
||||
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
|
||||
|
||||
|
@ -173,6 +173,7 @@ RUN set -eux; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
libcurl4-openssl-dev \
|
||||
libedit-dev \
|
||||
libonig-dev \
|
||||
libsodium-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
@ -268,11 +269,8 @@ RUN set -eux; \
|
||||
; \
|
||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||||
\
|
||||
php --version; \
|
||||
\
|
||||
# https://github.com/docker-library/php/issues/443
|
||||
pecl update-channels; \
|
||||
rm -rf /tmp/pear ~/.pearrc
|
||||
# smoke test
|
||||
php --version
|
||||
|
||||
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
|
||||
|
||||
|
@ -113,6 +113,7 @@ RUN set -eux; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
libcurl4-openssl-dev \
|
||||
libedit-dev \
|
||||
libonig-dev \
|
||||
libsodium-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
@ -208,11 +209,8 @@ RUN set -eux; \
|
||||
; \
|
||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||||
\
|
||||
php --version; \
|
||||
\
|
||||
# https://github.com/docker-library/php/issues/443
|
||||
pecl update-channels; \
|
||||
rm -rf /tmp/pear ~/.pearrc
|
||||
# smoke test
|
||||
php --version
|
||||
|
||||
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
|
||||
|
||||
|
@ -114,6 +114,7 @@ RUN set -eux; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
libcurl4-openssl-dev \
|
||||
libedit-dev \
|
||||
libonig-dev \
|
||||
libsodium-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
@ -209,11 +210,8 @@ RUN set -eux; \
|
||||
; \
|
||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||||
\
|
||||
php --version; \
|
||||
\
|
||||
# https://github.com/docker-library/php/issues/443
|
||||
pecl update-channels; \
|
||||
rm -rf /tmp/pear ~/.pearrc
|
||||
# smoke test
|
||||
php --version
|
||||
|
||||
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
|
||||
|
||||
|
@ -114,6 +114,7 @@ RUN set -eux; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
libcurl4-openssl-dev \
|
||||
libedit-dev \
|
||||
libonig-dev \
|
||||
libsodium-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
@ -209,11 +210,8 @@ RUN set -eux; \
|
||||
; \
|
||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||||
\
|
||||
php --version; \
|
||||
\
|
||||
# https://github.com/docker-library/php/issues/443
|
||||
pecl update-channels; \
|
||||
rm -rf /tmp/pear ~/.pearrc
|
||||
# smoke test
|
||||
php --version
|
||||
|
||||
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
|
||||
|
||||
|
@ -102,12 +102,16 @@ RUN set -xe \
|
||||
libedit-dev \
|
||||
libsodium-dev \
|
||||
libxml2-dev \
|
||||
oniguruma-dev \
|
||||
openssl-dev \
|
||||
sqlite-dev \
|
||||
\
|
||||
&& export CFLAGS="$PHP_CFLAGS" \
|
||||
CPPFLAGS="$PHP_CPPFLAGS" \
|
||||
LDFLAGS="$PHP_LDFLAGS" \
|
||||
# fix ARGON2 detection for 7.4-alpha1 https://github.com/docker-library/php/pull/840#pullrequestreview-249660894
|
||||
ARGON2_LIBS="-largon2" \
|
||||
ARGON2_CFLAGS="-I/usr/include" \
|
||||
&& docker-php-source extract \
|
||||
&& cd /usr/src/php \
|
||||
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
|
||||
@ -165,9 +169,11 @@ RUN set -xe \
|
||||
\
|
||||
&& apk del --no-network .build-deps \
|
||||
\
|
||||
# https://github.com/docker-library/php/issues/443
|
||||
# update pecl channel definitions https://github.com/docker-library/php/issues/443
|
||||
&& pecl update-channels \
|
||||
&& rm -rf /tmp/pear ~/.pearrc
|
||||
&& rm -rf /tmp/pear ~/.pearrc \
|
||||
# smoke test
|
||||
&& php --version
|
||||
|
||||
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
|
||||
|
||||
|
@ -107,6 +107,7 @@ RUN set -eux; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
libcurl4-openssl-dev \
|
||||
libedit-dev \
|
||||
libonig-dev \
|
||||
libsodium-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
@ -202,11 +203,11 @@ RUN set -eux; \
|
||||
; \
|
||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||||
\
|
||||
php --version; \
|
||||
\
|
||||
# https://github.com/docker-library/php/issues/443
|
||||
# update pecl channel definitions https://github.com/docker-library/php/issues/443
|
||||
pecl update-channels; \
|
||||
rm -rf /tmp/pear ~/.pearrc
|
||||
rm -rf /tmp/pear ~/.pearrc; \
|
||||
# smoke test
|
||||
php --version
|
||||
|
||||
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
|
||||
|
||||
|
13
update.sh
13
update.sh
@ -160,6 +160,19 @@ for version in "${versions[@]}"; do
|
||||
-e '/argon2/d' \
|
||||
"$version/$suite/$variant/Dockerfile"
|
||||
fi
|
||||
if [ "$majorVersion" = '7' -a "$minorVersion" -lt '4' ]; then
|
||||
# oniguruma is part of mbstring in php 7.4+
|
||||
# ARGON2 is a hack only required for alpha1: https://github.com/docker-library/php/pull/840#pullrequestreview-249660894
|
||||
sed -ri \
|
||||
-e '/oniguruma-dev|libonig-dev/d' \
|
||||
-e '/ARGON2/d' \
|
||||
"$version/$suite/$variant/Dockerfile"
|
||||
else
|
||||
# 7.4 and above no longer include pecl/pear: https://github.com/php/php-src/pull/3781
|
||||
sed -ri \
|
||||
-e '\!pecl.*channel|/tmp/pear!d' \
|
||||
"$version/$suite/$variant/Dockerfile"
|
||||
fi
|
||||
if [ "$majorVersion" = '7' -a "$minorVersion" -lt '2' ]; then
|
||||
# sodium is part of php core 7.2+ https://wiki.php.net/rfc/libsodium
|
||||
sed -ri '/sodium/d' "$version/$suite/$variant/Dockerfile"
|
||||
|
Loading…
Reference in New Issue
Block a user