[packages/librasterlite] - fixed build with proj 6+

qboosh qboosh at pld-linux.org
Sun May 17 11:28:46 CEST 2026


commit a85fc1916d73201dc975b617e22cf0cc9e1b2bca
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun May 17 11:28:41 2026 +0200

    - fixed build with proj 6+

 librasterlite-proj.patch | 12 ++++++++++++
 librasterlite.spec       | 25 ++++++++++++++++---------
 2 files changed, 28 insertions(+), 9 deletions(-)
---
diff --git a/librasterlite.spec b/librasterlite.spec
index c014082..18f50b3 100644
--- a/librasterlite.spec
+++ b/librasterlite.spec
@@ -8,15 +8,19 @@ Group:		Libraries
 Source0:	http://www.gaia-gis.it/gaia-sins/librasterlite-sources/%{name}-%{version}.tar.gz
 # Source0-md5:	6c6e8f83ac8a06c78f3fdcee63dc5e3e
 Patch0:		link.patch
+Patch1:		%{name}-proj.patch
 URL:		https://www.gaia-gis.it/fossil/librasterlite
+BuildRequires:	autoconf >= 2.61
+BuildRequires:	automake
 BuildRequires:	libgeotiff-devel >= 1.2.5
 BuildRequires:	libjpeg-devel
 BuildRequires:	libpng-devel
 BuildRequires:	libspatialite-devel
 BuildRequires:	libtiff-devel
+BuildRequires:	libtool
 BuildRequires:	pkgconfig
-BuildRequires:	proj-devel
-BuildRequires:	sqlite3-devel
+BuildRequires:	proj-devel >= 4
+BuildRequires:	sqlite3-devel >= 3
 BuildRequires:	zlib-devel
 Requires:	libgeotiff >= 1.2.5
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -37,8 +41,8 @@ Requires:	libjpeg-devel
 Requires:	libpng-devel
 Requires:	libspatialite-devel
 Requires:	libtiff-devel
-Requires:	proj-devel
-Requires:	sqlite3-devel
+Requires:	proj-devel >= 4
+Requires:	sqlite3-devel >= 3
 Requires:	zlib-devel
 
 %description devel
@@ -62,11 +66,14 @@ Statyczna biblioteka rasterlite.
 %prep
 %setup -q
 %patch -P0 -p1
+%patch -P1 -p1
 
 %build
-%{__aclocal}
-%{__automake}
+%{__libtoolize}
+%{__aclocal} -I m4
 %{__autoconf}
+%{__autoheader}
+%{__automake}
 %configure
 
 %{__make}
@@ -90,12 +97,12 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog 
 %attr(755,root,root) %{_bindir}/rasterlite_*
-%attr(755,root,root) %{_libdir}/librasterlite.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/librasterlite.so.2
+%{_libdir}/librasterlite.so.*.*.*
+%ghost %{_libdir}/librasterlite.so.2
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/librasterlite.so
+%{_libdir}/librasterlite.so
 %{_includedir}/rasterlite.h
 %{_pkgconfigdir}/rasterlite.pc
 
diff --git a/librasterlite-proj.patch b/librasterlite-proj.patch
new file mode 100644
index 0000000..37e8c68
--- /dev/null
+++ b/librasterlite-proj.patch
@@ -0,0 +1,12 @@
+--- librasterlite-1.1g/configure.ac.orig	2026-05-17 11:20:07.871972850 +0200
++++ librasterlite-1.1g/configure.ac	2026-05-17 11:21:09.468305821 +0200
+@@ -76,7 +76,8 @@ AC_CHECK_FUNCS([memset sqrt strcasecmp s
+ AC_CHECK_LIB(z,inflateInit_,,AC_MSG_ERROR(['libz' is required but it doesn't seem to be installed on this system.]),-lm)
+ AC_CHECK_LIB(jpeg,jpeg_start_compress,,AC_MSG_ERROR(['libjpeg' is required but it doesn't seem to be installed on this system.]),-lm)
+ AC_CHECK_LIB(tiff,TIFFClientOpen,,AC_MSG_ERROR(['libtiff' is required but it doesn't seem to be installed on this system.]),-lm)
+-AC_CHECK_LIB(proj,pj_init_plus,,AC_MSG_ERROR(['libproj' is required but it doesn't seem to be installed on this system.]),-lm)
++AC_SEARCH_LIBS(proj_normalize_for_visualization, proj, [proj_new_lib=1],
++   [AC_SEARCH_LIBS(pj_init_plus, proj, [proj_new_lib=0], [AC_MSG_ERROR(['libproj' is required but it doesn't seem to be installed on this system.])], [-lm])])
+ AC_CHECK_LIB(geotiff,GTIFSetFromProj4,,AC_MSG_ERROR(['libgeotiff' [>= v.1.2.5] is required but it doesn't seem to be installed on this system.]),-lm)
+ 
+ PKG_CHECK_MODULES([LIBSPATIALITE], [spatialite], , AC_MSG_ERROR(['libspatialite' is required but it doesn't seem to be installed on this system.]))
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/librasterlite.git/commitdiff/a85fc1916d73201dc975b617e22cf0cc9e1b2bca



More information about the pld-cvs-commit mailing list