diff --git a/pgsphere-pgsl93.patch b/pgsphere-pgsl93.patch new file mode 100644 index 0000000..aca3178 --- /dev/null +++ b/pgsphere-pgsl93.patch @@ -0,0 +1,29 @@ +diff -ur pgsphere-1.1.1/line.c pgsphere-1.1.1-psql93/line.c +--- pgsphere-1.1.1/line.c 2010-01-31 21:26:50.000000000 +0100 ++++ pgsphere-1.1.1-psql93/line.c 2013-09-18 10:58:31.188387077 +0200 +@@ -226,11 +226,11 @@ + } + } + +- int4 sphereline_latitude_points ( const SLine * sl, float8 lat, SPoint *p1, SPoint *p2 ) ++ int32 sphereline_latitude_points ( const SLine * sl, float8 lat, SPoint *p1, SPoint *p2 ) + { + + float8 inc = sl->theta - floor ( sl->theta / PID ) * PID ; +- int4 ret = 0; ++ int32 ret = 0; + + if ( FPgt( lat, PIH ) ) return 0; + if ( FPlt( lat,-PIH ) ) return 0; +diff -ur pgsphere-1.1.1/line.h pgsphere-1.1.1-psql93/line.h +--- pgsphere-1.1.1/line.h 2008-02-03 13:43:35.000000000 +0100 ++++ pgsphere-1.1.1-psql93/line.h 2013-09-18 10:58:42.308474324 +0200 +@@ -97,7 +97,7 @@ + \param p2 second returned spherical point + \return count of found points or <0 if undefined + */ +- int4 sphereline_latitude_points ( const SLine * sl, float8 lat, SPoint *p1, SPoint *p2 ); ++ int32 sphereline_latitude_points ( const SLine * sl, float8 lat, SPoint *p1, SPoint *p2 ); + + /*! + \brief Returns true, if the two lines are equal diff --git a/pgsphere.spec b/pgsphere.spec index 228fd2f..fce1950 100644 --- a/pgsphere.spec +++ b/pgsphere.spec @@ -1,10 +1,11 @@ Summary: Spherical data types, functions, and operators for PostgreSQL Name: pgsphere Version: 1.1.1 -Release: 6%{?dist} +Release: 7%{?dist} License: BSD Group: Applications/Databases Source0: http://pgfoundry.org/frs/download.php/2558/%{name}-%{version}.tar.gz +Patch0: pgsphere-pgsl93.patch URL: http://pgfoundry.org/projects/pgsphere BuildRequires: postgresql-devel >= 8.0 Requires: postgresql-server >= 8.0 @@ -16,13 +17,12 @@ spherical objects. %prep %setup -q +%patch0 -p1 %build make USE_PGXS=1 %{?_smp_mflags} %install -rm -rf %{buildroot} - install -d %{buildroot}%{_libdir}/pgsql/ install -d %{buildroot}%{_datadir}/%{name} @@ -38,6 +38,9 @@ install -m 644 pg_sphere.sql %{buildroot}%{_datadir}/%{name}/ %{_libdir}/pgsql/pg_sphere.so %changelog +* Wed Sep 18 2013 Sergio Pascual 1.1.1-7 +- Patch to build with psql 9.3 + * Sun Aug 04 2013 Fedora Release Engineering - 1.1.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild