Add mingw subpackages
This commit is contained in:
parent
9c8102ce0b
commit
90aae55ba1
70
geos.spec
70
geos.spec
@ -1,17 +1,23 @@
|
||||
Name: geos
|
||||
Version: 3.10.2
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: GEOS is a C++ port of the Java Topology Suite
|
||||
|
||||
License: LGPLv2
|
||||
URL: http://trac.osgeo.org/geos/
|
||||
Source0: http://download.osgeo.org/%{name}/%{name}-%{version}.tar.bz2
|
||||
# Add library version suffix also when building with cmake for mingw
|
||||
Patch0: geos_version-suffix.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: make
|
||||
|
||||
BuildRequires: mingw32-filesystem >= 95
|
||||
BuildRequires: mingw32-gcc-c++
|
||||
|
||||
BuildRequires: mingw64-filesystem >= 95
|
||||
BuildRequires: mingw64-gcc-c++
|
||||
|
||||
|
||||
%description
|
||||
@ -37,19 +43,50 @@ This package contains the development files to build applications that
|
||||
use GEOS.
|
||||
|
||||
|
||||
%package -n mingw32-%{name}
|
||||
Summary: MinGW Windows GEOS library
|
||||
|
||||
%description -n mingw32-%{name}
|
||||
MinGW Windows GEOS library.
|
||||
|
||||
|
||||
%package -n mingw64-%{name}
|
||||
Summary: MinGW Windows GEOS library
|
||||
|
||||
%description -n mingw64-%{name}
|
||||
MinGW Windows GEOS library.
|
||||
|
||||
|
||||
%{?mingw_debug_package}
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
|
||||
%build
|
||||
# Native build
|
||||
%cmake -DDISABLE_GEOS_INLINE=ON -DBUILD_DOCUMENTATION=ON
|
||||
%cmake_build
|
||||
|
||||
# MinGW build
|
||||
%mingw_cmake -DDISABLE_GEOS_INLINE=ON
|
||||
%mingw_make_build
|
||||
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
make docs -C %{__cmake_builddir}
|
||||
|
||||
%mingw_make_install
|
||||
|
||||
# Drop cross-compiled geos-config which is not useful
|
||||
rm -f %{buildroot}%{mingw32_bindir}/geos-config
|
||||
rm -f %{buildroot}%{mingw64_bindir}/geos-config
|
||||
|
||||
|
||||
%mingw_debug_install_post
|
||||
|
||||
|
||||
%check
|
||||
%ctest
|
||||
@ -72,8 +109,35 @@ make docs -C %{__cmake_builddir}
|
||||
%{_libdir}/cmake/GEOS/
|
||||
%{_libdir}/pkgconfig/%{name}.pc
|
||||
|
||||
%files -n mingw32-%{name}
|
||||
%license COPYING
|
||||
%{mingw32_bindir}/geosop.exe
|
||||
%{mingw32_bindir}/libgeos-3.10.2.dll
|
||||
%{mingw32_bindir}/libgeos_c-1.dll
|
||||
%{mingw32_includedir}/geos/
|
||||
%{mingw32_includedir}/geos_c.h
|
||||
%{mingw32_libdir}/libgeos.dll.a
|
||||
%{mingw32_libdir}/libgeos_c.dll.a
|
||||
%{mingw32_libdir}/cmake/GEOS/
|
||||
%{mingw32_libdir}/pkgconfig/%{name}.pc
|
||||
|
||||
%files -n mingw64-%{name}
|
||||
%license COPYING
|
||||
%{mingw64_bindir}/geosop.exe
|
||||
%{mingw64_bindir}/libgeos-3.10.2.dll
|
||||
%{mingw64_bindir}/libgeos_c-1.dll
|
||||
%{mingw64_includedir}/geos/
|
||||
%{mingw64_includedir}/geos_c.h
|
||||
%{mingw64_libdir}/libgeos.dll.a
|
||||
%{mingw64_libdir}/libgeos_c.dll.a
|
||||
%{mingw64_libdir}/cmake/GEOS/
|
||||
%{mingw64_libdir}/pkgconfig/%{name}.pc
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Feb 24 2022 Sandro Mani <manisandro@gmail.com> - 3.10.2-3
|
||||
- Add mingw subpackages
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
|
||||
27
geos_version-suffix.patch
Normal file
27
geos_version-suffix.patch
Normal file
@ -0,0 +1,27 @@
|
||||
diff -rupN --no-dereference geos-3.10.2/CMakeLists.txt geos-3.10.2-new/CMakeLists.txt
|
||||
--- geos-3.10.2/CMakeLists.txt 2022-01-15 22:14:55.000000000 +0100
|
||||
+++ geos-3.10.2-new/CMakeLists.txt 2022-01-18 09:17:48.278835601 +0100
|
||||
@@ -280,6 +280,9 @@ if(BUILD_SHARED_LIBS)
|
||||
|
||||
set_target_properties(geos PROPERTIES VERSION ${GEOS_VERSION_NOPATCH})
|
||||
set_target_properties(geos PROPERTIES SOVERSION ${GEOS_VERSION_NOPATCH})
|
||||
+ if(MINGW)
|
||||
+ set_target_properties(geos PROPERTIES SUFFIX "-${GEOS_VERSION_NOPATCH}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
+ endif(MINGW)
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -293,9 +296,12 @@ if(BUILD_SHARED_LIBS)
|
||||
PRIVATE $<IF:$<CXX_COMPILER_ID:MSVC>,GEOS_DLL_EXPORT,DLL_EXPORT>)
|
||||
|
||||
set_target_properties(geos_c PROPERTIES VERSION ${CAPI_VERSION})
|
||||
- if(NOT WIN32)
|
||||
+ if(NOT WIN32 OR MINGW)
|
||||
set_target_properties(geos_c PROPERTIES SOVERSION ${CAPI_VERSION_MAJOR})
|
||||
endif()
|
||||
+ if(MINGW)
|
||||
+ set_target_properties(geos_c PROPERTIES SUFFIX "-${CAPI_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
+ endif(MINGW)
|
||||
endif()
|
||||
|
||||
add_subdirectory(capi)
|
||||
Loading…
Reference in New Issue
Block a user