From a7a672c356d6bab9f63f3a85bca24504114f7bc4 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Fri, 13 Dec 2019 00:24:50 +0100 Subject: [PATCH] - revert part of PLD merge --- php.spec | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/php.spec b/php.spec index a3cda00..17c15c8 100644 --- a/php.spec +++ b/php.spec @@ -2040,11 +2040,6 @@ ix86=: x8664=: \ sh -xe %{_sourcedir}/skip-tests.sh %build -get_version() { - local define="$1" filename="$2" - awk -vdefine="$define" '/#define/ && $2 == define {print $3}' "$filename" | xargs -} - API=$(awk '/#define PHP_API_VERSION/{print $3}' main/php.h) if [ $API != %{php_api_version} ]; then echo "Set %%define php_api_version to $API and re-run." @@ -2076,7 +2071,7 @@ if test "$ver" != "PHP_VERSION"; then : Update the fileinfover macro and rebuild. exit 1 fi -ver=$(get_version PHP_PHAR_VERSION ext/phar/php_phar.h) +ver=$(awk '/#define PHP_PHAR_VERSION/ {print $3}' ext/phar/php_phar.h | xargs) if test "$ver" != "PHP_VERSION"; then : Error: Upstream PHAR version is now ${ver}, expecting %{pharver}. : Update the pharver macro and rebuild. @@ -2110,7 +2105,7 @@ if test "$ver" != "%{phpdbgver}"; then : Update the phpdbgver macro and rebuild. exit 1 fi -ver=$(get_version PHP_BZ2_VERSION ext/bz2/php_bz2.h) +ver=$(awk '/#define PHP_BZ2_VERSION/ {print $3}' ext/bz2/php_bz2.h | xargs) if test "$ver" != "PHP_VERSION"; then : Error: Upstream BZIP2 version is now ${ver}, expecting %{bz2ver}. : Update the bz2ver macro and rebuild. @@ -2120,13 +2115,13 @@ ver=$(awk '/#define PHP_ENCHANT_VERSION/ {print $3}' ext/enchant/php_enchant.h | if test "$ver" != "PHP_VERSION"; then exit 1 fi -ver=$(get_version PHP_HASH_VERSION ext/hash/php_hash.h) +ver=$(awk '/#define PHP_HASH_VERSION/ {print $3}' ext/hash/php_hash.h | xargs) if test "$ver" != "PHP_VERSION"; then : Error: Upstream HASH version is now ${ver}, expecting %{hashver}. : Update the hashver macro and rebuild. exit 1 fi -ver=$(get_version PHP_INTL_VERSION ext/intl/php_intl.h) +ver=$(awk '/#define PHP_INTL_VERSION/ {print $3}' ext/intl/php_intl.h | xargs) if test "$ver" != "PHP_VERSION"; then : Error: Upstream Intl version is now ${ver}, expecting %{intlver}. : Update the intlver macro and rebuild. -- 2.44.0