From f8aacef5415adf88c22ec991d6f31127a58c2a10 Mon Sep 17 00:00:00 2001 From: tigro Date: Wed, 20 Sep 2023 22:38:41 +0300 Subject: [PATCH] import libspatialite-5.0.1-17.el9 --- .gitignore | 1 + .libspatialite.metadata | 1 + SOURCES/libspatialite_geos.patch | 43 +++ SOURCES/libspatialite_macros.patch | 12 + SOURCES/libspatialite_mingw.patch | 36 +++ SOURCES/libspatialite_pkgconfig.patch | 11 + SPECS/libspatialite.spec | 393 ++++++++++++++++++++++++++ 7 files changed, 497 insertions(+) create mode 100644 .gitignore create mode 100644 .libspatialite.metadata create mode 100644 SOURCES/libspatialite_geos.patch create mode 100644 SOURCES/libspatialite_macros.patch create mode 100644 SOURCES/libspatialite_mingw.patch create mode 100644 SOURCES/libspatialite_pkgconfig.patch create mode 100644 SPECS/libspatialite.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..29f02bb --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/libspatialite-5.0.1.tar.gz diff --git a/.libspatialite.metadata b/.libspatialite.metadata new file mode 100644 index 0000000..76883ff --- /dev/null +++ b/.libspatialite.metadata @@ -0,0 +1 @@ +5d5a45f68d57dda0cd1b56ec6e67b7e90772019e SOURCES/libspatialite-5.0.1.tar.gz diff --git a/SOURCES/libspatialite_geos.patch b/SOURCES/libspatialite_geos.patch new file mode 100644 index 0000000..7d8d2c2 --- /dev/null +++ b/SOURCES/libspatialite_geos.patch @@ -0,0 +1,43 @@ +diff -rupN --no-dereference libspatialite-5.0.1/configure.ac libspatialite-5.0.1-new/configure.ac +--- libspatialite-5.0.1/configure.ac 2021-03-08 08:57:19.015858195 +0100 ++++ libspatialite-5.0.1-new/configure.ac 2021-03-08 08:57:19.017858195 +0100 +@@ -312,35 +312,10 @@ AC_ARG_ENABLE(geos, [AS_HELP_STRING( + [], [enable_geos=yes]) + if test x"$enable_geos" != "xno"; then + #----------------------------------------------------------------------- +- # --with-geosconfig +- # +- AC_ARG_WITH([geosconfig], +- [AS_HELP_STRING([--with-geosconfig=FILE], [specify an alternative geos-config file])], +- [GEOSCONFIG="$withval"], [GEOSCONFIG=""]) +- if test "x$GEOSCONFIG" = "x"; then +- # GEOSCONFIG was not specified, so search within the current path +- AC_PATH_PROG([GEOSCONFIG], [geos-config]) +- # If we couldn't find geos-config, display an error +- if test "x$GEOSCONFIG" = "x"; then +- AC_MSG_ERROR([could not find geos-config within the current path. You may need to try re-running configure with a --with-geosconfig parameter.]) +- fi +- else +- # GEOSCONFIG was specified; display a message to the user +- if test "x$GEOSCONFIG" = "xyes"; then +- AC_MSG_ERROR([you must specify a parameter to --with-geosconfig, e.g. --with-geosconfig=/path/to/geos-config]) +- else +- if test -f $GEOSCONFIG; then +- AC_MSG_RESULT([Using user-specified geos-config file: $GEOSCONFIG]) +- else +- AC_MSG_ERROR([the user-specified geos-config file $GEOSCONFIG does not exist]) +- fi +- fi +- fi +- # Extract the linker and include flags +- GEOS_LDFLAGS=`$GEOSCONFIG --ldflags` +- GEOS_CFLAGS=-I`$GEOSCONFIG --includes` +- AC_SUBST([GEOS_LDFLAGS]) +- AC_SUBST([GEOS_CFLAGS]) ++ PKG_CHECK_MODULES([GEOS], [geos], , AC_MSG_ERROR(['geos' is required but it doesn't seem to be installed on this system.])) ++ GEOS_LDFLAGS="$GEOS_LIBS" ++ AC_SUBST(GEOS_CFLAGS) ++ AC_SUBST(GEOS_LDFLAGS) + # Ensure that we can parse geos_c.h + CPPFLAGS_SAVE="$CPPFLAGS" + CPPFLAGS="$GEOS_CFLAGS" diff --git a/SOURCES/libspatialite_macros.patch b/SOURCES/libspatialite_macros.patch new file mode 100644 index 0000000..9b71ab7 --- /dev/null +++ b/SOURCES/libspatialite_macros.patch @@ -0,0 +1,12 @@ +diff -rupN --no-dereference libspatialite-5.0.1/configure.ac libspatialite-5.0.1-new/configure.ac +--- libspatialite-5.0.1/configure.ac 2021-03-08 08:57:18.748858216 +0100 ++++ libspatialite-5.0.1-new/configure.ac 2021-03-08 08:57:18.751858215 +0100 +@@ -96,7 +96,7 @@ AC_PROG_INSTALL + AC_PROG_LN_S + AC_PROG_MAKE_SET + AC_LIBTOOL_WIN32_DLL +-AC_PROG_LIBTOOL ++LT_INIT + + # Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST diff --git a/SOURCES/libspatialite_mingw.patch b/SOURCES/libspatialite_mingw.patch new file mode 100644 index 0000000..47b1d05 --- /dev/null +++ b/SOURCES/libspatialite_mingw.patch @@ -0,0 +1,36 @@ +diff -rupN --no-dereference libspatialite-5.0.1/configure.ac libspatialite-5.0.1-new/configure.ac +--- libspatialite-5.0.1/configure.ac 2021-02-07 16:53:46.000000000 +0100 ++++ libspatialite-5.0.1-new/configure.ac 2021-03-08 08:57:18.484858236 +0100 +@@ -489,7 +489,7 @@ AM_CONDITIONAL(MODULE_ONLY, [test x"$ena + #----------------------------------------------------------------------- + + # Checking for MinGW +-AM_CONDITIONAL([MINGW], [test "$target_alias" = "mingw32"]) ++AM_CONDITIONAL([MINGW], [[[[ "$target_alias" = *"mingw32" ]]]]) + # Checking for Mac OsX + AM_CONDITIONAL([MACOSX], [test "$target_alias" = "macosx"]) + # Checking for Android +diff -rupN --no-dereference libspatialite-5.0.1/src/gaiageo/gg_shape.c libspatialite-5.0.1-new/src/gaiageo/gg_shape.c +--- libspatialite-5.0.1/src/gaiageo/gg_shape.c 2021-02-07 16:53:46.000000000 +0100 ++++ libspatialite-5.0.1-new/src/gaiageo/gg_shape.c 2021-03-08 08:57:18.485858236 +0100 +@@ -58,7 +58,7 @@ the terms of any one of the MPL, the GPL + #endif + + #ifdef _WIN32 +-#include ++#include + #endif + + #if OMIT_ICONV == 0 /* if ICONV is disabled no SHP support is available */ +diff -rupN --no-dereference libspatialite-5.0.1/test/scandir4win.h libspatialite-5.0.1-new/test/scandir4win.h +--- libspatialite-5.0.1/test/scandir4win.h 2021-02-07 16:53:47.000000000 +0100 ++++ libspatialite-5.0.1-new/test/scandir4win.h 2021-03-08 08:57:18.485858236 +0100 +@@ -11,7 +11,7 @@ even implied + + #ifdef _WIN32 + +-#include ++#include + #include + #include + diff --git a/SOURCES/libspatialite_pkgconfig.patch b/SOURCES/libspatialite_pkgconfig.patch new file mode 100644 index 0000000..149c126 --- /dev/null +++ b/SOURCES/libspatialite_pkgconfig.patch @@ -0,0 +1,11 @@ +diff -rupN libspatialite-5.0.1/spatialite.pc.in libspatialite-5.0.1-new/spatialite.pc.in +--- libspatialite-5.0.1/spatialite.pc.in 2021-02-07 16:53:46.000000000 +0100 ++++ libspatialite-5.0.1-new/spatialite.pc.in 2021-02-10 09:54:09.647552994 +0100 +@@ -8,5 +8,6 @@ includedir=@includedir@ + Name: spatialite + Description: Spatial SQL database engine based on SQLite + Version: @VERSION@ +-Libs: -L${libdir} -lspatialite @LIBS@ @LIBXML2_LIBS@ -lm ++Libs.private: -L${libdir} @LIBS@ @LIBXML2_LIBS@ -lm ++Libs: -L${libdir} -lspatialite + Cflags: -I${includedir} diff --git a/SPECS/libspatialite.spec b/SPECS/libspatialite.spec new file mode 100644 index 0000000..6fa2a3b --- /dev/null +++ b/SPECS/libspatialite.spec @@ -0,0 +1,393 @@ +%if 0%{?rhel} >= 9 +%bcond_with mingw +%else +%bcond_without mingw +%endif + +Name: libspatialite +Version: 5.0.1 +Release: 17%{?dist} +Summary: Enables SQLite to support spatial data + +License: MPLv1.1 or GPLv2+ or LGPLv2+ +URL: https://www.gaia-gis.it/fossil/libspatialite +Source0: http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-%{version}.tar.gz + +# Move private libs to Libs.private in pkg-config file (#1926868) +Patch0: libspatialite_pkgconfig.patch +# Fix mingw detection in configure.ac +Patch1: libspatialite_mingw.patch +# Fix obsolete macros +Patch2: libspatialite_macros.patch +# Use pkgconfig to find geos +Patch3: libspatialite_geos.patch + +BuildRequires: autoconf automake libtool +BuildRequires: freexl-devel +BuildRequires: gcc +BuildRequires: geos-devel >= 3.7.1 +BuildRequires: librttopo-devel +BuildRequires: libxml2-devel +BuildRequires: make +BuildRequires: minizip-devel +BuildRequires: proj-devel >= 6.2.0 +BuildRequires: sqlite-devel +BuildRequires: zlib-devel + +%if %{with mingw} +BuildRequires: mingw32-filesystem >= 95 +BuildRequires: mingw32-freexl +BuildRequires: mingw32-gcc +BuildRequires: mingw32-geos +BuildRequires: mingw32-libcharset +BuildRequires: mingw32-librttopo +BuildRequires: mingw32-libxml2 +BuildRequires: mingw32-minizip +BuildRequires: mingw32-proj +BuildRequires: mingw32-sqlite +BuildRequires: mingw32-zlib + +BuildRequires: mingw64-filesystem >= 95 +BuildRequires: mingw64-freexl +BuildRequires: mingw64-gcc +BuildRequires: mingw64-geos +BuildRequires: mingw64-libcharset +BuildRequires: mingw64-librttopo +BuildRequires: mingw64-libxml2 +BuildRequires: mingw64-minizip +BuildRequires: mingw64-proj +BuildRequires: mingw64-sqlite +BuildRequires: mingw64-zlib +%endif + + +%description +SpatiaLite is a a library extending the basic SQLite core in order to +get a full fledged Spatial DBMS, really simple and lightweight, but +mostly OGC-SFS compliant. + + +%package devel +Summary: Development libraries and headers for SpatiaLite +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: pkgconfig + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + + +%if %{with mingw} +%package -n mingw32-%{name} +Summary: MinGW Windows libspatialite library +BuildArch: noarch + +%description -n mingw32-%{name} +MinGW Windows libspatialite library. + + +%package -n mingw64-%{name} +Summary: MinGW Windows libspatialite library +BuildArch: noarch + +%description -n mingw64-%{name} +MinGW Windows libspatialite library. + + +%{?mingw_debug_package} +%endif + + +%prep +%autosetup -p1 -n %{name}-%{version} +autoreconf -ifv + +# Need to copy testdata into builddir +mkdir build_native +cp -a test build_native + + +%build +# Native build +pushd build_native +%global _configure ../configure +%configure \ + --disable-static \ + --enable-geocallbacks \ + --enable-rttopo \ + --enable-gcp +%make_build +popd + +%if %{with mingw} +# MinGW build +%mingw_configure --disable-static +%mingw_make_build +%endif + + +%install +%make_install -C build_native +%if %{with mingw} +%mingw_make_install +%endif + +find %{buildroot} -type f -name "*.la" -delete + + +%if %{with mingw} +%mingw_debug_install_post +%endif + + +%check +make check -C build_native %{?_smp_mflags} || : + + +%files +%doc AUTHORS +%license COPYING +%{_libdir}/%{name}.so.7* +%{_libdir}/mod_spatialite.so.7* +# The symlink must be present to allow loading the extension +# https://groups.google.com/forum/#!topic/spatialite-users/zkGP-gPByXk +%{_libdir}/mod_spatialite.so + +%files devel +%doc examples/*.c +%{_includedir}/spatialite.h +%{_includedir}/spatialite +%{_libdir}/%{name}.so +%{_libdir}/pkgconfig/spatialite.pc + +%if %{with mingw} +%files -n mingw32-%{name} +%license COPYING +%{mingw32_bindir}/libspatialite-4.dll +%{mingw32_includedir}/spatialite.h +%{mingw32_includedir}/spatialite/ +%{mingw32_libdir}/libspatialite.dll.a +%{mingw32_libdir}/mod_spatialite.dll* +%{mingw32_libdir}/pkgconfig/spatialite.pc + +%files -n mingw64-%{name} +%license COPYING +%{mingw64_bindir}/libspatialite-4.dll +%{mingw64_includedir}/spatialite.h +%{mingw64_includedir}/spatialite/ +%{mingw64_libdir}/libspatialite.dll.a +%{mingw64_libdir}/mod_spatialite.dll* +%{mingw64_libdir}/pkgconfig/spatialite.pc +%endif + +%changelog +* Wed Sep 20 2023 Arkady L. Shane - 5.0.1-17 +- Rebuilt for MSVSphere 9.2 + +* Fri Sep 23 2022 Orion Poplawski - 5.0.1-17 +- Disable mingw for EL9 + +* Sun Sep 04 2022 Sandro Mani - 5.0.1-16 +- Rebuild (proj) + +* Thu Jul 21 2022 Fedora Release Engineering - 5.0.1-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Mar 25 2022 Sandro Mani - 5.0.1-14 +- Rebuild with mingw-gcc-12 + +* Wed Mar 09 2022 Sandro Mani - 5.0.1-13 +- Rebuild for proj-9.0.0 + +* Thu Feb 24 2022 Sandro Mani - 5.0.1-12 +- Make mingw subpackages noarch + +* Thu Feb 24 2022 Sandro Mani - 5.0.1-11 +- Add mingw subpackage + +* Thu Jan 20 2022 Fedora Release Engineering - 5.0.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Oct 21 2021 Sandro Mani - 5.0.1-9 +- Rebuild (geos) + +* Thu Jul 22 2021 Fedora Release Engineering - 5.0.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Mar 24 2021 Sandro Mani - 5.0.1-7 +- Bump + +* Sun Mar 07 2021 Sandro Mani - 5.0.1-6 +- Rebuild (proj) + +* Sat Feb 13 2021 Sandro Mani - 5.0.1-5 +- Rebuild (geos) + +* Wed Feb 10 2021 Sandro Mani - 5.0.1-4 +- Use %%autosetup + +* Wed Feb 10 2021 Sandro Mani - 5.0.1-2 +- Move private libs to Libs.private in pkg-config file (#1926868) + +* Tue Feb 09 2021 Miro Hrončok - 5.0.1-2 +- Rebuilt for minizip 3.0.0 + +* Mon Feb 08 2021 Sandro Mani - 5.0.1-1 +- Update to 5.0.1 + +* Tue Jan 26 2021 Fedora Release Engineering - 5.0.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Nov 13 2020 Sandro Mani - 5.0.0-3 +- Enable RTTOPO and GCP + +* Thu Nov 5 17:46:32 CET 2020 Sandro Mani - 5.0.0-2 +- Rebuild (proj) + +* Mon Nov 2 2020 Devrim Gunduz - 5.0.0-1 +- Update to 5.0.0 +- Remove patches, no longer needed. + +* Tue Jul 28 2020 Fedora Release Engineering - 5.0.0-beta0_1.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jan 29 2020 Fedora Release Engineering - 5.0.0-beta0_1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Sep 4 2019 Devrim Gunduz - 5.0.0beta0-1 +- Update to 5.0.0beta0 for new Proj + +* Thu Jul 25 2019 Fedora Release Engineering - 4.3.0a-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Feb 5 2019 Devrim Gunduz - 4.3.0a-11 +- Rebuilt against Proj 5.2.0 + +* Fri Feb 01 2019 Fedora Release Engineering - 4.3.0a-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 4.3.0a-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 4.3.0a-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Fri Dec 08 2017 Merlin Mathesius - 4.3.0a-7 +- Cleanup spec file conditionals + +* Thu Aug 03 2017 Fedora Release Engineering - 4.3.0a-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 4.3.0a-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 4.3.0a-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Jan 24 2017 Devrim Gunduz - 4.3.0a-3 +- Rebuilt against Proj 4.9.3. + +* Thu Feb 04 2016 Fedora Release Engineering - 4.3.0a-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Sep 17 2015 Volker Froehlich - 4.3.0a-1 +- New upstream release + +* Fri Jul 3 2015 Volker Fröhlich - 4.3.0-1 +- New upstream release + +* Wed Jun 17 2015 Fedora Release Engineering - 4.2.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Mar 12 2015 Devrim Gunduz - 4.2.0-4 +- Rebuilt against Proj 4.9.1. + +* Sun Aug 17 2014 Fedora Release Engineering - 4.2.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Tue Jul 29 2014 Volker Fröhlich - 4.2.0-2 +- libxml2 default is now "yes" +- Disable geos support for EL5, as geos 3.2 is no longer supported +- Move the mod_spatialite symlink to the main package + +* Fri Jul 25 2014 Peter Robinson 4.2.0-1 +- Update to 4.2.0 + +* Sat Jun 07 2014 Fedora Release Engineering - 4.1.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu Jan 23 2014 Volker Fröhlich - 4.1.1-2 +- Update for EPEL 7 + +* Sat Aug 03 2013 Fedora Release Engineering - 4.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Mon Jul 1 2013 Volker Fröhlich - 4.1.1-1 +- New upstram release + +* Thu Jun 27 2013 Volker Fröhlich - 4.1.0-2 +- Temporarily disable lwgeom features to break the circular + dependency between gdal -- libspatialite -- postgis -- gdal + +* Tue Jun 4 2013 Volker Fröhlich - 4.1.0-1 +- New upstream release + +* Mon Apr 8 2013 Volker Fröhlich - 4.0.0-3 +- Disable hexgrid22 test on 32 bit systems +- Disable tests on ARM + +* Thu Feb 14 2013 Fedora Release Engineering - 4.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Dec 1 2012 Volker Fröhlich - 4.0.0-1 +- New upstream release +- Remove arch restrictions, solving BZ 663938 and 846301 +- Update conditional for geosadvanced + +* Sat Aug 18 2012 Volker Fröhlich - 3.1.0-0.3.RC2 +- Add ppc to excluded archs (BZ #846301) +- Don't build with profiling + +* Thu Jul 19 2012 Fedora Release Engineering - 3.1.0-0.2.RC2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 27 2012 Volker Fröhlich - 3.1.0-0.1.RC2 +- Add pkconfig as Requirement to the devel sub-package +- Drop freexl patch (solved), build with Freexl +- Update descriptions and summaries +- Re-design conditionals for build flags +- Don't run checks if built without advancedgeos +- Include examples as documentation + +* Sat Jan 14 2012 Volker Fröhlich - 3.0.1-1 +- New upstream release +- Drop defattr +- Run tests +- Own spatialite include-dir +- Add GPLv2+ and LGPLv2+ as alternative licenses +- Update URL and source URL +- Reduce build conditions to EPEL or not +- Use isa macro in base package Requires + +* Fri Jan 13 2012 Fedora Release Engineering - 2.4.0-0.7.RC4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 2.4.0-0.6.RC4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Dec 7 2010 Volker Fröhlich 2.4.0-0.5.RC4 +- Corrected wrong Fedora version number in if-statement + +* Sun Dec 5 2010 Volker Fröhlich 2.4.0-0.4.RC4 +- Refined configure condition to support RHEL + +* Fri Dec 3 2010 Volker Fröhlich 2.4.0-0.3.RC4 +- Added buildroot +- Added doc files + +* Wed Dec 1 2010 Volker Fröhlich 2.4.0-0.2.RC4 +- Added description of devel package +- Switched to disable-static flag + +* Sun Nov 28 2010 Volker Fröhlich 2.4.0-0.1.RC4 +- Initial packaging for Fedora