summaryrefslogtreecommitdiffstats
path: root/php-pecl-sdl-ttf.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-09-01 15:17:02 +0200
committerRemi Collet <remi@php.net>2023-09-01 15:17:02 +0200
commit312d9ffc045090a30e7137fe09479743b4532d29 (patch)
treeebaea2432e22585059ae39b3b5946d5cbe0b3589 /php-pecl-sdl-ttf.spec
parentaba547350d127dc7fb13d3cf4ed5406bda9aa9ca (diff)
build out of sources treeHEADmaster
Diffstat (limited to 'php-pecl-sdl-ttf.spec')
-rw-r--r--php-pecl-sdl-ttf.spec45
1 files changed, 22 insertions, 23 deletions
diff --git a/php-pecl-sdl-ttf.spec b/php-pecl-sdl-ttf.spec
index f3a43e6..c7ccd13 100644
--- a/php-pecl-sdl-ttf.spec
+++ b/php-pecl-sdl-ttf.spec
@@ -7,29 +7,27 @@
# Please, preserve the changelog entries
#
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
-
-%if 0%{?scl:1}
-%scl_package php-pecl-sdl-ttf
-%endif
+%{?scl:%scl_package php-pecl-sdl-ttf}
%bcond_with tests
+
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name sdl_ttf
# no ini file (loaded by phpsdl helper)
%global upstream_version 0.3.0
#global upstream_prever RC1
+%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
+%global _configure ../%{sources}/configure
Summary: SDL_ttf bindings for PHP
Name: %{?scl_prefix}php-pecl-sdl-ttf
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: zlib
URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+Source0: https://pecl.php.net/get/%{sources}.tgz
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -44,7 +42,6 @@ Requires: %{?scl_prefix}php-sdl%{?_isa} >= 2.5.0
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
Supplements: %{?scl_prefix}php-sdl%{?_isa}
%endif
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
@@ -63,14 +60,13 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -qc
-mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-cd NTS
+cd %{sources}
# Check version as upstream often forget to update this
extver=$(sed -n '/define PHP_SDL_TTF_VERSION/{s/.* "//;s/".*$//;p}' php_sdl_ttf.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}%{?gh_date:-dev}"; then
@@ -79,10 +75,9 @@ if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}%{?gh_date:-dev}
fi
cd ..
-
+mkdir NTS
%if %{with_zts}
-# duplicate for ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
@@ -95,15 +90,16 @@ peclconf() {
--with-php-config=$1
}
-cd NTS
-%{_bindir}/phpize
-peclconf %{_bindir}/php-config
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
+peclconf %{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
-peclconf %{_bindir}/zts-php-config
+peclconf %{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -124,13 +120,13 @@ make -C ZTS install INSTALL_ROOT=%{buildroot}
# Documentation
for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do [ -f NTS/$i ] && install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
+do [ -f %{sources}/$i ] && install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
%check
: Minimal load test for NTS extension
-%{_bindir}/php --no-php-ini \
+%{__php} --no-php-ini \
--define extension=sdl \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep -i '^%{pecl_name}$'
@@ -145,7 +141,7 @@ done
%endif
%if %{with tests}
-cd NTS
+cd %{sources}
: Run upstream test suite
# ignore deprecated (in SDL 2.5.0)
TEST_PHP_ARGS="-n -d error_reporting=24575 -d extension=sdl -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
@@ -174,7 +170,7 @@ fi
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -186,6 +182,9 @@ fi
%changelog
+* Fri Sep 1 2023 Remi Collet <remi@remirepo.net> - 0.3.0-2
+- build out of sources tree
+
* Wed Aug 3 2022 Remi Collet <remi@remirepo.net> - 0.3.0-1
- update to 0.3.0