1
0
forked from pool/mapserver

Accepting request 1033752 from Application:Geo

- Enable PHP8 module build in Tumbleweed again since newer SWIG
  is available. New subpackage php-mapscriptng emitted as a result.
  [boo#1204736]

OBS-URL: https://build.opensuse.org/request/show/1033752
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mapserver?expand=0&rev=4
This commit is contained in:
Dominique Leuenberger 2022-11-06 11:42:15 +00:00 committed by Git OBS Bridge
commit a12a3603e8
2 changed files with 28 additions and 15 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sat Nov 5 22:40:24 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
- Enable PHP8 module build in Tumbleweed again since newer SWIG
is available. New subpackage php-mapscriptng emitted as a result.
[boo#1204736]
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Oct 8 20:50:04 UTC 2022 - Jan Engelhardt <jengelh@inai.de> Sat Oct 8 20:50:04 UTC 2022 - Jan Engelhardt <jengelh@inai.de>

View File

@ -18,14 +18,16 @@
# #
%bcond_with php
%bcond_without python %bcond_without python
%bcond_with ruby %bcond_with ruby
%define libname libmapserver2 %define libname libmapserver2
%define _cgibindir /srv/www/cgi-bin %define _cgibindir /srv/www/cgi-bin
%if 0%{?suse_version} >= 1550 %if 0%{?suse_version} >= 1550
# needs swig-4.1 for build
%bcond_without php
%define php_name php8 %define php_name php8
%else %else
%bcond_with php
%define php_name php7 %define php_name php7
%endif %endif
@ -38,8 +40,6 @@ Group: Productivity/Networking/Web/Servers
URL: https://www.mapserver.org/ URL: https://www.mapserver.org/
Source: https://download.osgeo.org/mapserver/%{name}-%{version}.tar.gz Source: https://download.osgeo.org/mapserver/%{name}-%{version}.tar.gz
Source9: %{name}-rpmlintrc Source9: %{name}-rpmlintrc
# Known issues:
# - swig 4.0 can't do php8, gotta wait for 4.1 so no php
BuildRequires: FastCGI-devel BuildRequires: FastCGI-devel
BuildRequires: apache2-devel BuildRequires: apache2-devel
BuildRequires: autoconf BuildRequires: autoconf
@ -73,11 +73,16 @@ BuildRequires: postgresql-devel >= 9.1
BuildRequires: postgresql-server-devel >= 9.1 BuildRequires: postgresql-server-devel >= 9.1
%endif %endif
BuildRequires: libprotobuf-c-devel BuildRequires: libprotobuf-c-devel
BuildRequires: php8-devel
BuildRequires: proj BuildRequires: proj
BuildRequires: protobuf-c BuildRequires: protobuf-c
BuildRequires: readline-devel BuildRequires: readline-devel
BuildRequires: rpm BuildRequires: rpm
%if 0%{with php}
BuildRequires: swig >= 4.1
%else
BuildRequires: swig BuildRequires: swig
%endif
BuildRequires: update-alternatives BuildRequires: update-alternatives
BuildRequires: xorg-x11-libXpm-devel BuildRequires: xorg-x11-libXpm-devel
BuildRequires: zlib-devel BuildRequires: zlib-devel
@ -100,13 +105,15 @@ Mapserver library for mapserver or mapscript module. you need this lib to run ma
or any of the mapscript module (php, java, python, ruby) or any of the mapscript module (php, java, python, ruby)
# We don't require apache2_mod-php8 users could have php5 running # We don't require apache2_mod-php8 users could have php5 running
# with other modes (cgi, php-fpm, etc) # with other modes (cgi, php-fpm, etc)
%package -n php-mapscript
Summary: PHP/Mapscript map making extensions to PHP %package -n php-mapscriptng
Summary: PHP/MapscriptNG map making extensions to PHP
Group: Development/Libraries/Other Group: Development/Libraries/Other
Requires: %{libname} = %{version}-%{release} Requires: %{libname} = %{version}-%{release}
Requires: apache2
Provides: php-mapserver = %{version}-%{release} Provides: php-mapserver = %{version}-%{release}
Obsoletes: php-mapserver < %{version}-%{release} Obsoletes: php-mapserver < %{version}-%{release}
%if 0%{with php} %if 0%{with php}
@ -115,7 +122,7 @@ BuildRequires: php-devel
Requires: php Requires: php
Requires: php-gd Requires: php-gd
%description -n php-mapscript %description -n php-mapscriptng
The PHP/Mapscript extension provides full map customization capabilities within the PHP scripting language. The PHP/Mapscript extension provides full map customization capabilities within the PHP scripting language.
%package -n perl-mapscript %package -n perl-mapscript
@ -233,7 +240,9 @@ cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DWITH_MYSQL=TRUE \ -DWITH_MYSQL=TRUE \
-DWITH_PERL=TRUE \ -DWITH_PERL=TRUE \
-DCUSTOM_PERL_SITE_ARCH_DIR="%{perl_vendorarch}" \ -DCUSTOM_PERL_SITE_ARCH_DIR="%{perl_vendorarch}" \
-DWITH_PHPNG=FALSE \ %if 0%{with php}
-DWITH_PHPNG=TRUE \
%endif
-DWITH_POSTGIS=TRUE \ -DWITH_POSTGIS=TRUE \
-DWITH_PROJ=TRUE \ -DWITH_PROJ=TRUE \
-DUSE_PROJ=TRUE \ -DUSE_PROJ=TRUE \
@ -290,10 +299,10 @@ cd ..
%if 0%{with php} %if 0%{with php}
mkdir -p %{buildroot}%{_sysconfdir}/%{php_name}/conf.d/ mkdir -p %{buildroot}%{_sysconfdir}/%{php_name}/conf.d/
cat > %{buildroot}%{_sysconfdir}/%{php_name}/conf.d/mapscript.ini <<EOF cat > %{buildroot}%{_sysconfdir}/%{php_name}/conf.d/mapscriptng.ini <<EOF
; Enable %{name} extension module ; Enable %{name} extension module
; For 6.4 we name the symlink here ; For 6.4 we name the symlink here
extension=php_mapscript.so extension=php_mapscriptng.so
EOF EOF
%endif %endif
@ -353,11 +362,8 @@ mv -v "%buildroot/%python3_sitelib"/* "%buildroot/%python3_sitearch/"
%{_libdir}/libmapserver.so.* %{_libdir}/libmapserver.so.*
%if 0%{with php} %if 0%{with php}
%files -n php-mapscript %files -n php-mapscriptng
%doc mapscript/php/README %config(noreplace) %{_sysconfdir}/%{php_name}/conf.d/mapscriptng.ini
%doc mapscript/php/examples
%config(noreplace) %{_sysconfdir}/%{php_name}/conf.d/mapscript.ini
%{_libdir}/%{php_name}/extensions/mapscript.php
%{_libdir}/%{php_name}/extensions/php_mapscriptng.so* %{_libdir}/%{php_name}/extensions/php_mapscriptng.so*
%endif %endif