+++ /dev/null
---- geos-3.2.2/macros/ac_pkg_swig.m4.orig 2007-08-30 08:19:41.000000000 +0200
-+++ geos-3.2.2/macros/ac_pkg_swig.m4 2010-10-09 13:30:47.923740205 +0200
-@@ -67,9 +67,9 @@
- if test -z "$available_patch" ; then
- [available_patch=0]
- fi
-- if test $available_major -ne $required_major \
-- -o $available_minor -ne $required_minor \
-- -o $available_patch -lt $required_patch ; then
-+ if test $available_major -lt $required_major \
-+ -o $available_major -eq $required_major -a $available_minor -lt $required_minor \
-+ -o $available_major -eq $required_major -a $available_minor -eq $required_minor -a $available_patch -lt $required_patch ; then
- AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org])
- SWIG=''
- else
-# TODO
-# - unpackaged: /usr/bin/XMLTester
#
# Conditional build:
+%bcond_without php # PHP binding
%bcond_without ruby # ruby binding
#
Summary: Geometry Engine - Open Source
Summary(pl.UTF-8): GEOS - silnik geometryczny z otwartymi źródłami
Name: geos
-Version: 3.2.2
-Release: 3
+Version: 3.3.0
+Release: 1
License: LGPL v2.1
Group: Libraries
Source0: http://download.osgeo.org/geos/%{name}-%{version}.tar.bz2
-# Source0-md5: c5d264acac22fe7720f85dadc1fc17c6
+# Source0-md5: 3301f3d1d747b95749384b8a356b022a
Patch0: %{name}-ruby1.9.patch
-Patch1: %{name}-swig2.patch
URL: http://trac.osgeo.org/geos/
BuildRequires: autoconf >= 2.52
BuildRequires: automake
BuildRequires: libstdc++-devel
+%{?with_php:BuildRequires: php-devel}
BuildRequires: python
BuildRequires: python-devel
BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.219
+BuildRequires: rpmbuild(macros) >= 1.519
%{?with_ruby:BuildRequires: ruby-devel}
BuildRequires: swig-python >= 1.3.29
%{?with_ruby:BuildRequires: swig-ruby >= 1.3.40-3}
%description static -l pl.UTF-8
Statyczna biblioteka GEOS.
+%package -n php-geos
+Summary: PHP bindings for Geometry Engine - Open Source
+Summary(pl.UTF-8): Wiązania PHP do biblioteki GEOS
+Group: Development/Languages/PHP
+Requires: %{name} = %{version}-%{release}
+%{?requires_php_extension}
+
+%description -n php-geos
+PHP bindings for Geometry Engine - Open Source.
+
+%description -n php-geos -l pl.UTF-8
+Wiązania PHP do biblioteki GEOS.
+
%package -n python-geos
Summary: Python bindings for Geometry Engine - Open Source
Summary(pl.UTF-8): Wiązania Pythona do biblioteki GEOS
%prep
%setup -q
%patch0 -p1
-%patch1 -p1
%build
%{__aclocal} -I macros
%{__autoheader}
%{__automake}
%configure \
+ %{?with_php:--enable-php} \
--enable-python \
%{?with_ruby:--enable-ruby}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-%{?with_ruby:rm -f $RPM_BUILD_ROOT%{ruby_sitearchdir}/*.{la,a}}
-rm -f $RPM_BUILD_ROOT%{py_sitedir}/geos/*.{la,a}
+%if %{with php}
+install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/geos.ini
+; Enable geos extension module
+extension=geos.so
+EOF
+%endif
+
+%{?with_ruby:%{__rm} $RPM_BUILD_ROOT%{ruby_sitearchdir}/*.{la,a}}
+%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/geos/*.{la,a}
%py_postclean
%{_libdir}/libgeos.a
%{_libdir}/libgeos_c.a
+%if %{with php}
+%files -n php-geos
+%defattr(644,root,root,755)
+%doc php/{README,TODO}
+%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/geos.ini
+%attr(755,root,root) %{php_extensiondir}/geos.so
+%endif
+
%files -n python-geos
%defattr(644,root,root,755)
%dir %{py_sitedir}/geos