From 2ce4c6c2c2f3bc86c4a7d3c0b1922e4c08d8c70f Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Wed, 10 Jan 2024 01:44:46 +0300 Subject: [PATCH] import librttopo-1.1.0-9.el9 --- .gitignore | 1 + .librttopo.metadata | 1 + SOURCES/librttopo_geos.patch | 55 ++++++++++++ SPECS/librttopo.spec | 168 +++++++++++++++++++++++++++++++++++ 4 files changed, 225 insertions(+) create mode 100644 .gitignore create mode 100644 .librttopo.metadata create mode 100644 SOURCES/librttopo_geos.patch create mode 100644 SPECS/librttopo.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c29f33f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/librttopo-1.1.0.tar.gz diff --git a/.librttopo.metadata b/.librttopo.metadata new file mode 100644 index 0000000..0117731 --- /dev/null +++ b/.librttopo.metadata @@ -0,0 +1 @@ +043408c207d9f047a2a77cae236d9405bc4a72be SOURCES/librttopo-1.1.0.tar.gz diff --git a/SOURCES/librttopo_geos.patch b/SOURCES/librttopo_geos.patch new file mode 100644 index 0000000..0e25d59 --- /dev/null +++ b/SOURCES/librttopo_geos.patch @@ -0,0 +1,55 @@ +diff -rupN librttopo/configure.ac librttopo-new/configure.ac +--- librttopo/configure.ac 2019-07-27 08:55:02.000000000 +0200 ++++ librttopo-new/configure.ac 2021-02-27 10:13:26.397946908 +0100 +@@ -84,36 +84,10 @@ AC_CONFIG_FILES([Makefile \ + headers/librttopo_geom.h \ + rttopo.pc]) + +-#----------------------------------------------------------------------- +-# --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" +@@ -125,8 +99,8 @@ LIBS="$GEOS_LDFLAGS" + AC_SEARCH_LIBS(GEOSContext_setErrorMessageHandler_r,geos_c,,AC_MSG_ERROR([could not find libgeos_c (or obsolete 'libgeos_c' < v.3.5.0 found) - you may need to specify the directory of a geos-config file using --with-geosconfig])) + LIBS="$LIBS_SAVE" + LIBS="$LIBS $GEOS_LDFLAGS -lgeos_c" +-GEOS_MAJOR_VERSION=`$GEOSCONFIG --version | cut -d. -f1 | sed 's/[[^0-9]]//g'` +-GEOS_MINOR_VERSION=`$GEOSCONFIG --version | cut -d. -f2 | sed 's/[[^0-9]]//g'` ++GEOS_MAJOR_VERSION=`${PKGCONFIG:-pkg-config} --modversion geos | cut -d. -f1 | sed 's/[[^0-9]]//g'` ++GEOS_MINOR_VERSION=`${PKGCONFIG:-pkg-config} --modversion geos | cut -d. -f2 | sed 's/[[^0-9]]//g'` + RTGEOM_GEOS_VERSION="$GEOS_MAJOR_VERSION$GEOS_MINOR_VERSION" + AC_DEFINE_UNQUOTED([RTGEOM_GEOS_VERSION], [$RTGEOM_GEOS_VERSION], [GEOS library version]) + AC_SUBST([RTGEOM_GEOS_VERSION]) diff --git a/SPECS/librttopo.spec b/SPECS/librttopo.spec new file mode 100644 index 0000000..8d91cc3 --- /dev/null +++ b/SPECS/librttopo.spec @@ -0,0 +1,168 @@ +# mingw not yet complete on EL9 +%if 0%{?rhel} >= 9 +%bcond_with mingw +%else +%bcond_without mingw +%endif + +Name: librttopo +Version: 1.1.0 +Release: 9%{?dist} +Summary: Create and manage SQL/MM topologies + +License: GPLv2+ +URL: https://git.osgeo.org/gitea/rttopo/librttopo +Source0: https://git.osgeo.org/gitea/rttopo/librttopo/archive/%{name}-%{version}.tar.gz +# Use pkgconfig to find geos +Patch0: librttopo_geos.patch + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gcc +BuildRequires: geos-devel +BuildRequires: libtool +BuildRequires: make + +%if %{with mingw} +BuildRequires: mingw32-filesystem >= 95 +BuildRequires: mingw32-gcc +BuildRequires: mingw32-geos + +BuildRequires: mingw64-filesystem >= 95 +BuildRequires: mingw64-gcc +BuildRequires: mingw64-geos +%endif + + +%description +The RT Topology Library exposes an API to create and manage standard +(ISO 13249 aka SQL/MM) topologies using user-provided data stores. + + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%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 Leptonica library +BuildArch: noarch + +%description -n mingw32-%{name} +MinGW Windows %{name} library. + + +%package -n mingw64-%{name} +Summary: MinGW Windows %{name} library +BuildArch: noarch + +%description -n mingw64-%{name} +MinGW Windows %{name} library. +%endif + + +%{?mingw_debug_package} + + +%prep +%autosetup -p1 -n %{name} + + +%build +autoreconf -ifv + +# Native build +mkdir build_native +pushd build_native +%global _configure ../configure +%configure --disable-static +%make_build +popd + +%if %{with mingw} +# MinGW build +MINGW32_CONFIGURE_ARGS="PKGCONFIG=%{mingw32_target}-pkg-config" \ +MINGW64_CONFIGURE_ARGS="PKGCONFIG=%{mingw64_target}-pkg-config" \ +%mingw_configure --disable-static +%mingw_make_build +%endif + + +%install +%make_install -C build_native +%if %{with mingw} +%mingw_make_install +%endif + +find %{buildroot} -name '*.la' -exec rm -f {} ';' + + +%if %{with mingw} +%mingw_debug_install_post +%endif + + +%files +%license COPYING +%doc CREDITS NEWS.md README.md TODO +%{_libdir}/%{name}.so.* + +%files devel +%{_includedir}/%{name}.h +%{_includedir}/%{name}_geom.h +%{_libdir}/%{name}.so +%{_libdir}/pkgconfig/rttopo.pc + +%if %{with mingw} +%files -n mingw32-%{name} +%license COPYING +%{mingw32_bindir}/%{name}-1.dll +%{mingw32_includedir}/%{name}.h +%{mingw32_includedir}/%{name}_geom.h +%{mingw32_libdir}/%{name}.dll.a +%{mingw32_libdir}/pkgconfig/rttopo.pc + +%files -n mingw64-%{name} +%license COPYING +%{mingw64_bindir}/%{name}-1.dll +%{mingw64_includedir}/%{name}.h +%{mingw64_includedir}/%{name}_geom.h +%{mingw64_libdir}/%{name}.dll.a +%{mingw64_libdir}/pkgconfig/rttopo.pc +%endif + +%changelog +* Wed Jan 10 2024 MSVSphere Packaging Team - 1.1.0-9 +- Rebuilt for MSVSphere 9.3 + +* Fri Mar 25 2022 Sandro Mani - 1.1.0-9 +- Rebuild with mingw-gcc-12 + +* Thu Feb 24 2022 Sandro Mani - 1.1.0-8 +- Make mingw subpackages noarch + +* Sun Feb 20 2022 Sandro Mani - 1.1.0-7 +- Add mingw subpackege + +* Thu Jan 20 2022 Fedora Release Engineering - 1.1.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Oct 21 2021 Sandro Mani - 1.1.0-5 +- Rebuild (geos) + +* Thu Jul 22 2021 Fedora Release Engineering - 1.1.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Sat Feb 13 2021 Sandro Mani - 1.1.0-3 +- Rebuild (geos) + +* Tue Jan 26 2021 Fedora Release Engineering - 1.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Nov 13 2020 Sandro Mani 1.1.0-1 +- Initial package