disable PHP extension on 32-bit

This commit is contained in:
Remi Collet 2024-04-09 16:13:01 +02:00
parent 255b68ff33
commit 98b69f6e77

View File

@ -1,9 +1,6 @@
%global ini_name 40-mapserver.ini
%global project_owner MapServer
%global project_name MapServer
# MapServer doesn't support PHP 7 yet. See:
# https://github.com/mapserver/mapserver/issues/5252
%global php_mapscript 1
# MapServer should support Python 3 but still builds with Python 2.
# This should be investigated.
%global python_mapscript 1
@ -14,10 +11,20 @@
%bcond_with java
%endif
%if 0%{?fedora} >= 41
%ifarch %{ix86}
%bcond_with php
%else
%bcond_without php
%endif
%else
%bcond_without php
%endif
Name: mapserver
Version: 8.0.1
Release: 13%{?dist}
Release: 14%{?dist}
Summary: Environment for building spatially-enabled internet applications
%global dashver %(echo %version | sed 's|\\.|-|g')
@ -94,7 +101,7 @@ Requires: %{name} = %{version}
%description devel
This package contains development files for mapserver.
%if 0%{php_mapscript}
%if %{with php}
%package -n php-%{name}
Summary: PHP/Mapscript map making extensions to PHP
BuildRequires: php-devel
@ -197,7 +204,7 @@ export CXXFLAGS="%{optflags} -fno-strict-aliasing"
-DWITH_MYSQL=TRUE \
-DWITH_PERL=TRUE \
-DCUSTOM_PERL_SITE_ARCH_DIR="%{perl_vendorarch}" \
%if 0%{php_mapscript}
%if %{with php}
-DWITH_PHPNG=TRUE \
%endif
-DWITH_POSTGIS=TRUE \
@ -241,7 +248,7 @@ mkdir -p %{buildroot}%{_javadir}
install -p -m 644 %{_vpath_builddir}/mapscript/java/mapscript.jar %{buildroot}%{_javadir}/
%endif
%if 0%{php_mapscript}
%if %{with php}
# install php config file
mkdir -p %{buildroot}%{php_inidir}
cat > %{buildroot}%{php_inidir}/%{ini_name} <<EOF
@ -280,7 +287,7 @@ rm %{buildroot}%{_sysconfdir}/mapserver-sample.conf
%{_libdir}/libmapserver.so
%{_includedir}/%{name}/
%if 0%{php_mapscript}
%if %{with php}
%files -n php-%{name}
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/php_mapscriptng.so
@ -317,6 +324,10 @@ rm %{buildroot}%{_sysconfdir}/mapserver-sample.conf
%changelog
* Tue Apr 9 2024 Remi Collet <remi@fedoraproject.org> - 8.0.1-14
- disable PHP extension on 32-bit
https://fedoraproject.org/wiki/Changes/php_no_32_bit
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild