From aff213c6cc50e0932320814dcca6cd81192a0312 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 29 Dec 2016 17:43:34 +0100 Subject: php-geos: switch back our spec (package approved for Fedora) --- REFLECTION | 381 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ php-geos-dev.spec | 206 ----------------------------- php-geos.spec | 75 ++++++++--- 3 files changed, 439 insertions(+), 223 deletions(-) create mode 100644 REFLECTION delete mode 100644 php-geos-dev.spec diff --git a/REFLECTION b/REFLECTION new file mode 100644 index 0000000..5c65313 --- /dev/null +++ b/REFLECTION @@ -0,0 +1,381 @@ +Extension [ extension #89 geos version 1.0.0 ] { + + - Constants [20] { + Constant [ integer GEOSBUF_CAP_ROUND ] { 1 } + Constant [ integer GEOSBUF_CAP_FLAT ] { 2 } + Constant [ integer GEOSBUF_CAP_SQUARE ] { 3 } + Constant [ integer GEOSBUF_JOIN_ROUND ] { 1 } + Constant [ integer GEOSBUF_JOIN_MITRE ] { 2 } + Constant [ integer GEOSBUF_JOIN_BEVEL ] { 3 } + Constant [ integer GEOS_POINT ] { 0 } + Constant [ integer GEOS_LINESTRING ] { 1 } + Constant [ integer GEOS_LINEARRING ] { 2 } + Constant [ integer GEOS_POLYGON ] { 3 } + Constant [ integer GEOS_MULTIPOINT ] { 4 } + Constant [ integer GEOS_MULTILINESTRING ] { 5 } + Constant [ integer GEOS_MULTIPOLYGON ] { 6 } + Constant [ integer GEOS_GEOMETRYCOLLECTION ] { 7 } + Constant [ integer GEOSVALID_ALLOW_SELFTOUCHING_RING_FORMING_HOLE ] { 1 } + Constant [ integer GEOSRELATE_BNR_MOD2 ] { 1 } + Constant [ integer GEOSRELATE_BNR_OGC ] { 1 } + Constant [ integer GEOSRELATE_BNR_ENDPOINT ] { 2 } + Constant [ integer GEOSRELATE_BNR_MULTIVALENT_ENDPOINT ] { 3 } + Constant [ integer GEOSRELATE_BNR_MONOVALENT_ENDPOINT ] { 4 } + } + + - Functions { + Function [ function GEOSVersion ] { + } + Function [ function GEOSPolygonize ] { + } + Function [ function GEOSLineMerge ] { + } + Function [ function GEOSSharedPaths ] { + } + Function [ function GEOSRelateMatch ] { + } + } + + - Classes [5] { + Class [ class GEOSWKTReader ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [2] { + Method [ public method __construct ] { + } + + Method [ public method read ] { + } + } + } + + Class [ class GEOSWKTWriter ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [7] { + Method [ public method __construct ] { + } + + Method [ public method write ] { + } + + Method [ public method setTrim ] { + } + + Method [ public method setRoundingPrecision ] { + } + + Method [ public method setOutputDimension ] { + } + + Method [ public method getOutputDimension ] { + } + + Method [ public method setOld3D ] { + } + } + } + + Class [ class GEOSGeometry ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [64] { + Method [ public method __construct ] { + } + + Method [ public method __toString ] { + } + + Method [ public method project ] { + } + + Method [ public method interpolate ] { + } + + Method [ public method buffer ] { + } + + Method [ public method offsetCurve ] { + } + + Method [ public method envelope ] { + } + + Method [ public method intersection ] { + } + + Method [ public method convexHull ] { + } + + Method [ public method difference ] { + } + + Method [ public method symDifference ] { + } + + Method [ public method boundary ] { + } + + Method [ public method union ] { + } + + Method [ public method pointOnSurface ] { + } + + Method [ public method centroid ] { + } + + Method [ public method relate ] { + } + + Method [ public method relateBoundaryNodeRule ] { + } + + Method [ public method simplify ] { + } + + Method [ public method normalize ] { + } + + Method [ public method extractUniquePoints ] { + } + + Method [ public method disjoint ] { + } + + Method [ public method touches ] { + } + + Method [ public method intersects ] { + } + + Method [ public method crosses ] { + } + + Method [ public method within ] { + } + + Method [ public method contains ] { + } + + Method [ public method overlaps ] { + } + + Method [ public method covers ] { + } + + Method [ public method coveredBy ] { + } + + Method [ public method equals ] { + } + + Method [ public method equalsExact ] { + } + + Method [ public method isEmpty ] { + } + + Method [ public method checkValidity ] { + } + + Method [ public method isSimple ] { + } + + Method [ public method isRing ] { + } + + Method [ public method hasZ ] { + } + + Method [ public method isClosed ] { + } + + Method [ public method typeName ] { + } + + Method [ public method typeId ] { + } + + Method [ public method getSRID ] { + } + + Method [ public method setSRID ] { + } + + Method [ public method numGeometries ] { + } + + Method [ public method geometryN ] { + } + + Method [ public method numInteriorRings ] { + } + + Method [ public method numPoints ] { + } + + Method [ public method getX ] { + } + + Method [ public method getY ] { + } + + Method [ public method interiorRingN ] { + } + + Method [ public method exteriorRing ] { + } + + Method [ public method numCoordinates ] { + } + + Method [ public method dimension ] { + } + + Method [ public method coordinateDimension ] { + } + + Method [ public method pointN ] { + } + + Method [ public method startPoint ] { + } + + Method [ public method endPoint ] { + } + + Method [ public method area ] { + } + + Method [ public method length ] { + } + + Method [ public method distance ] { + } + + Method [ public method hausdorffDistance ] { + } + + Method [ public method snapTo ] { + } + + Method [ public method node ] { + } + + Method [ public method delaunayTriangulation ] { + } + + Method [ public method voronoiDiagram ] { + } + + Method [ public method clipByRect ] { + } + } + } + + Class [ class GEOSWKBWriter ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [9] { + Method [ public method __construct ] { + } + + Method [ public method getOutputDimension ] { + } + + Method [ public method setOutputDimension ] { + } + + Method [ public method getByteOrder ] { + } + + Method [ public method setByteOrder ] { + } + + Method [ public method getIncludeSRID ] { + } + + Method [ public method setIncludeSRID ] { + } + + Method [ public method write ] { + } + + Method [ public method writeHEX ] { + } + } + } + + Class [ class GEOSWKBReader ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [3] { + Method [ public method __construct ] { + } + + Method [ public method read ] { + } + + Method [ public method readHEX ] { + } + } + } + } +} + diff --git a/php-geos-dev.spec b/php-geos-dev.spec deleted file mode 100644 index 5f7e579..0000000 --- a/php-geos-dev.spec +++ /dev/null @@ -1,206 +0,0 @@ -# remirepo spec file for php-geos -# -# Copyright (c) 2016 Remi Collet -# License: CC-BY-SA -# http://creativecommons.org/licenses/by-sa/4.0/ -# -# Please, preserve the changelog entries -# -%if 0%{?scl:1} -%global sub_prefix %{scl_prefix} -%scl_package php-geos -%else -%global pkg_name php-geos -%endif -#global prever rc3 -%global pecl_name geos -%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} -%if "%{php_version}" < "5.6" -%global ini_name %{pecl_name}.ini -%else -%global ini_name 40-%{pecl_name}.ini -%endif -%global with_tests 0%{!?_without_tests:1} - -Name: %{?sub_prefix}php-%{pecl_name} -Version: 1.0.0 -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} - -Summary: PHP module for GEOS - -Group: Development/Languages -# See COPYING -License: LGPLv2+ and MIT -URL: http://trac.osgeo.org/geos -Source0: https://git.osgeo.org/gogs/geos/php-geos/archive/%{version}%{?prever}.tar.gz - -BuildRequires: %{?scl_prefix}php-devel -BuildRequires: %{?scl_prefix}php-pear -# Test failures with 3.3 (EL-6) -BuildRequires: geos-devel >= 3.4 - -Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} -Requires: %{?scl_prefix}php(api) = %{php_core_api} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} - -%if "%{?scl_prefix}" != "%{?sub_prefix}" -Provides: %{?scl_prefix}php-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}-%{release} -%endif -# Dropped from geos -Obsoletes: %{?scl_prefix}geos-php <= 3.5.0 -Provides: %{?scl_prefix}geos-php = 1:%{version}-%{release} -Provides: %{?scl_prefix}geos-php%{?_isa} = 1:%{version}-%{release} - -%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -Obsoletes: php54-%{pecl_name} <= %{version} -Obsoletes: php54w-%{pecl_name} <= %{version} -%if "%{php_version}" > "5.5" -Obsoletes: php55u-%{pecl_name} <= %{version} -Obsoletes: php55w-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "5.6" -Obsoletes: php56u-%{pecl_name} <= %{version} -Obsoletes: php56w-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.0" -Obsoletes: php70u-%{pecl_name} <= %{version} -Obsoletes: php70w-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.1" -Obsoletes: php71u-%{pecl_name} <= %{version} -Obsoletes: php71w-%{pecl_name} <= %{version} -%endif -%endif - -%if 0%{?fedora} < 20 && 0%{?rhel} < 7 -# Filter private shared -%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} -%{?filter_setup} -%endif - - -%description -PHP module for GEOS. - -Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}. - - -%prep -%setup -q -c -mv %{pkg_name} NTS - -cd NTS -sed -e '/PHP_GEOS_VERSION/s/"0.0"/"%{version}%{?prever}"/' -i php_geos.h - -# Check extension version -ver=$(sed -n '/define PHP_GEOS_VERSION/{s/.* "//;s/".*$//;p}' php_geos.h) -if test "$ver" != "%{version}%{?prever}%{?gh_date:-dev}"; then - : Error: Upstream VERSION version is ${ver}, expecting %{version}%{?prever}%{?gh_date:-dev}. - exit 1 -fi -cd .. - -cat << 'EOF' | tee %{ini_name} -; Enable %{pecl_name} extension module -extension=%{pecl_name}.so -EOF - - -%if %{with_zts} -# Duplicate source tree for NTS / ZTS build -cp -pr NTS ZTS -%endif - - -%build -cd NTS -%{_bindir}/phpize -%configure --with-php-config=%{_bindir}/php-config -make %{?_smp_mflags} - -%if %{with_zts} -cd ../ZTS -%{_bindir}/zts-phpize -%configure --with-php-config=%{_bindir}/zts-php-config -make %{?_smp_mflags} -%endif - - -%install -make -C NTS install INSTALL_ROOT=%{buildroot} - -# install configuration -install -Dpm 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} - -%if %{with_zts} -make -C ZTS install INSTALL_ROOT=%{buildroot} -install -Dpm 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} -%endif - - -%check -: Minimal load test for NTS extension -%{__php} --no-php-ini \ - --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} - -%if %{with_zts} -: Minimal load test for NTS extension -%{__ztsphp} --no-php-ini \ - --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} -%endif - -%if %{with_tests} -cd NTS -: Upstream test suite for NTS extension -TEST_PHP_EXECUTABLE=%{__php} \ -TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ -NO_INTERACTION=1 \ -REPORT_EXIT_STATUS=1 \ -%{__php} -n run-tests.php --show-diff || ret=1 - -%if %{with_zts} -cd ../ZTS -: Upstream test suite for ZTS extension -TEST_PHP_EXECUTABLE=%{__ztsphp} \ -TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \ -NO_INTERACTION=1 \ -REPORT_EXIT_STATUS=1 \ -%{__ztsphp} -n run-tests.php --show-diff || ret=1 -%endif - -exit $ret -%endif - - -%files -%{!?_licensedir:%global license %%doc} -%license NTS/{COPYING,LGPL-2,MIT-LICENSE} -%doc NTS/{CREDITS,NEWS,README.md,TODO} - -%config(noreplace) %{php_inidir}/%{ini_name} -%{php_extdir}/%{pecl_name}.so - -%if %{with_zts} -%config(noreplace) %{php_ztsinidir}/%{ini_name} -%{php_ztsextdir}/%{pecl_name}.so -%endif - - -%changelog -* Sat Dec 24 2016 Remi Collet - 1.0.0-2 -- update to 1.0.0 - -* Fri Dec 16 2016 Remi Collet - 1.0.0-0.3.rc3 -- update to 1.0.0-rc3 - -* Mon Dec 12 2016 Remi Collet - 1.0.0-0.2.rc2 -- update to 1.0.0-rc2 -- open https://git.osgeo.org/gogs/geos/php-geos/pulls/13 - fix for tests - -* Sun Dec 11 2016 Remi Collet - 1.0.0-0.1.rc1 -- Initial packaging of 1.0.0rc1 - diff --git a/php-geos.spec b/php-geos.spec index 7be8a79..5f7e579 100644 --- a/php-geos.spec +++ b/php-geos.spec @@ -1,6 +1,3 @@ -# Fedora spec file for php-geos -# Without SCL compatibility stuff, from: -# # remirepo spec file for php-geos # # Copyright (c) 2016 Remi Collet @@ -9,14 +6,25 @@ # # Please, preserve the changelog entries # +%if 0%{?scl:1} +%global sub_prefix %{scl_prefix} +%scl_package php-geos +%else +%global pkg_name php-geos +%endif +#global prever rc3 %global pecl_name geos %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +%if "%{php_version}" < "5.6" +%global ini_name %{pecl_name}.ini +%else %global ini_name 40-%{pecl_name}.ini +%endif %global with_tests 0%{!?_without_tests:1} -Name: php-%{pecl_name} +Name: %{?sub_prefix}php-%{pecl_name} Version: 1.0.0 -Release: 1%{?dist} +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Summary: PHP module for GEOS @@ -26,27 +34,62 @@ License: LGPLv2+ and MIT URL: http://trac.osgeo.org/geos Source0: https://git.osgeo.org/gogs/geos/php-geos/archive/%{version}%{?prever}.tar.gz -BuildRequires: php-devel -BuildRequires: php-pear +BuildRequires: %{?scl_prefix}php-devel +BuildRequires: %{?scl_prefix}php-pear # Test failures with 3.3 (EL-6) BuildRequires: geos-devel >= 3.4 -Requires: php(zend-abi) = %{php_zend_api} -Requires: php(api) = %{php_core_api} +Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} +Requires: %{?scl_prefix}php(api) = %{php_core_api} +%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} +%if "%{?scl_prefix}" != "%{?sub_prefix}" +Provides: %{?scl_prefix}php-%{pecl_name} = %{version}-%{release} +Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}-%{release} +%endif # Dropped from geos -Obsoletes: geos-php <= 3.5.0 -Provides: geos-php = 1:%{version}-%{release} -Provides: geos-php%{?_isa} = 1:%{version}-%{release} +Obsoletes: %{?scl_prefix}geos-php <= 3.5.0 +Provides: %{?scl_prefix}geos-php = 1:%{version}-%{release} +Provides: %{?scl_prefix}geos-php%{?_isa} = 1:%{version}-%{release} + +%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} +# Other third party repo stuff +Obsoletes: php54-%{pecl_name} <= %{version} +Obsoletes: php54w-%{pecl_name} <= %{version} +%if "%{php_version}" > "5.5" +Obsoletes: php55u-%{pecl_name} <= %{version} +Obsoletes: php55w-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "5.6" +Obsoletes: php56u-%{pecl_name} <= %{version} +Obsoletes: php56w-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "7.0" +Obsoletes: php70u-%{pecl_name} <= %{version} +Obsoletes: php70w-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "7.1" +Obsoletes: php71u-%{pecl_name} <= %{version} +Obsoletes: php71w-%{pecl_name} <= %{version} +%endif +%endif + +%if 0%{?fedora} < 20 && 0%{?rhel} < 7 +# Filter private shared +%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} +%{?filter_setup} +%endif %description PHP module for GEOS. +Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}. + %prep %setup -q -c -mv %{name} NTS +mv %{pkg_name} NTS cd NTS sed -e '/PHP_GEOS_VERSION/s/"0.0"/"%{version}%{?prever}"/' -i php_geos.h @@ -134,6 +177,7 @@ exit $ret %files +%{!?_licensedir:%global license %%doc} %license NTS/{COPYING,LGPL-2,MIT-LICENSE} %doc NTS/{CREDITS,NEWS,README.md,TODO} @@ -147,12 +191,9 @@ exit $ret %changelog -* Sat Dec 24 2016 Remi Collet - 1.0.0-1 +* Sat Dec 24 2016 Remi Collet - 1.0.0-2 - update to 1.0.0 -* Fri Dec 16 2016 Remi Collet - 1.0.0-0.4.rc3 -- cleanup for Fedora review - * Fri Dec 16 2016 Remi Collet - 1.0.0-0.3.rc3 - update to 1.0.0-rc3 -- cgit