pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/geography



Module Name:    pkgsrc
Committed By:   gdt
Date:           Wed Jun 19 12:00:45 UTC 2024

Modified Files:
        pkgsrc/geography/gdal-lib: Makefile
        pkgsrc/geography/py-gdal: Makefile

Log Message:
geography/gdal*: Cope with deficient (no rtree) sqlite3

As background, the sqlite3 in NetBSD 9 lacks rtree support.

gdal expects the rtree extension to sqlite3 (geopackages are an
important format, and based on sqlite).  The base package had a cmake
configure arg to allow accepting sqlite3 without rtree.  This commit
rototills gdal-lib's comments about base/pkg sqlite3 and rtree, but
does not otherwise change gdal-lib.

In py-gdal, declare a cmake configure arg to accept sqlite3 without
rtree, and pass it to the hand-written cmake run to create bits needed
by the python build (that could have been in the distfile but aren't).
No change is expected if the package built before.

(It remains to understand if gdal on NetBSD 9 has operational failures
due to missing rtree support.)


To generate a diff of this commit:
cvs rdiff -u -r1.173 -r1.174 pkgsrc/geography/gdal-lib/Makefile
cvs rdiff -u -r1.69 -r1.70 pkgsrc/geography/py-gdal/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/geography/gdal-lib/Makefile
diff -u pkgsrc/geography/gdal-lib/Makefile:1.173 pkgsrc/geography/gdal-lib/Makefile:1.174
--- pkgsrc/geography/gdal-lib/Makefile:1.173    Sun Jun 16 12:23:12 2024
+++ pkgsrc/geography/gdal-lib/Makefile  Wed Jun 19 12:00:44 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.173 2024/06/16 12:23:12 gdt Exp $
+# $NetBSD: Makefile,v 1.174 2024/06/19 12:00:44 gdt Exp $
 
 PKGREVISION= 2
 .include "../../geography/gdal-lib/Makefile.common"
@@ -76,6 +76,18 @@ CMAKE_CONFIGURE_ARGS+=       -DNetCDF_DIR=${BU
 #CMAKE_CONFIGURE_ARGS+=        -Dxerces
 #CMAKE_CONFIGURE_ARGS+=        -Dxerces-inc=${BUILDLINK_PREFIX.xerces-c}/include
 #CMAKE_CONFIGURE_ARGS+=        -Dxerces-lib=-L${BUILDLINK_PREFIX.xerces-c}/lib\ -lxerces-c
+
+# gdal wants to use rtree, which is technically optional in sqlite3.
+# While it is present in pkgsrc and NetBSD 10, it is missing in NetBSD
+# 9.  This is messy because base sqlite3 is linked via heimdal and
+# python links with base by default.  Resolving this is hard; it
+# basically amounts to declaring that NetBSD 9 sqlite3 is not
+# acceptable in pkgsrc, and then avoiding base sqlite3 via base
+# heimdal.  It seems likely consensus would form around "gdal is
+# deficient on NetBSD 9" rather than upheaval.
+
+# Don't try to force new/rtree sqlite3, and accept lack of rtree.
+#BUILDLINK_API_DEPENDS.sqlite3+= sqlite3>=3.36.0
 CMAKE_CONFIGURE_ARGS+= -DACCEPT_MISSING_SQLITE3_RTREE:BOOL=ON
 
 .include "options.mk"
@@ -87,10 +99,6 @@ INSTALLATION_DIRS=   bin include lib ${PKG
 # \todo: Support geopdf by including poppler, PoDoFo, or PDFium.
 # https://gdal.org/drivers/raster/pdf.html
 
-# As an exception to the "cmake change only" rule, enable spatialite because
-# that's easier than working around a bug that causes cmake to fail because
-# of an empty variable leading to a wrong number of args error.
-#
 # NB: spatialite requires sqlite3, so there is the spectre of base/pkg confusion.
 # Therefore, include it first in the baseless hope that helps.
 .include "../../geography/libspatialite/buildlink3.mk"
@@ -99,9 +107,6 @@ INSTALLATION_DIRS=   bin include lib ${PKG
 # .include "../../archivers/zstd/buildlink3.mk"
 
 .include "../../archivers/libarchive/buildlink3.mk"
-# Avoid NetBSD base sqlite3, which is deficient because it lacks rtree.
-# \todo Enhance pkgsrc to be able to declare that modules are needed.
-#BUILDLINK_API_DEPENDS.sqlite3+= sqlite3>=3.36.0
 .include "../../databases/sqlite3/buildlink3.mk"
 .include "../../devel/netcdf/buildlink3.mk"
 .include "../../devel/pcre/buildlink3.mk"

Index: pkgsrc/geography/py-gdal/Makefile
diff -u pkgsrc/geography/py-gdal/Makefile:1.69 pkgsrc/geography/py-gdal/Makefile:1.70
--- pkgsrc/geography/py-gdal/Makefile:1.69      Wed May 29 16:32:48 2024
+++ pkgsrc/geography/py-gdal/Makefile   Wed Jun 19 12:00:45 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.69 2024/05/29 16:32:48 adam Exp $
+# $NetBSD: Makefile,v 1.70 2024/06/19 12:00:45 gdt Exp $
 
 PKGREVISION= 3
 .include "../../geography/gdal-lib/Makefile.common"
@@ -7,7 +7,7 @@ PKGNAME=        ${PYPKGPREFIX}-${DISTNAME}
 
 COMMENT=       Translator library for raster geospatial data formats, Python binding
 
-# Beause this package runs cmake for all of gdal, everything that is
+# Because this package runs cmake for all of gdal, everything that is
 # hard-required must be present, separately from whether it is needed
 # for the python bindings.
 USE_LANGUAGES=         c c++
@@ -32,9 +32,12 @@ PYSETUPSUBDIR=               build/swig/python
 #   wheel's build/install targets.
 TOOL_DEPENDS+= cmake>=0:../../devel/cmake
 TOOL_DEPENDS+= swig4-[0-9]*:../../devel/swig4
+
+CMAKE_CONFIGURE_ARGS+= -DACCEPT_MISSING_SQLITE3_RTREE:BOOL=ON
+
 pre-build:
        cd ${WRKSRC} && mkdir build && cd build && \
-       cmake .. && \
+       cmake ${CMAKE_CONFIGURE_ARGS} .. && \
        cd swig/python && \
        ${MAKE} python_generated_files
 



Home | Main Index | Thread Index | Old Index