diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
| commit | b590c8d7572b727d565cc0b8ff660d43569845de (patch) | |
| tree | 06f7a4102ea4e845df8b66660f252920d52952f9 /dev-db/spatialite | |
| parent | 24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff) | |
| download | baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip | |
Adding metadata
Diffstat (limited to 'dev-db/spatialite')
| -rw-r--r-- | dev-db/spatialite/Manifest | 1 | ||||
| -rw-r--r-- | dev-db/spatialite/files/spatialite-5.1.0-libxml2-2.14.patch | 52 | ||||
| -rw-r--r-- | dev-db/spatialite/files/spatialite-5.1.0-macro-surgery.patch | 80 | ||||
| -rw-r--r-- | dev-db/spatialite/metadata.xml | 15 | ||||
| -rw-r--r-- | dev-db/spatialite/spatialite-5.1.0-r3.ebuild | 66 |
5 files changed, 214 insertions, 0 deletions
diff --git a/dev-db/spatialite/Manifest b/dev-db/spatialite/Manifest new file mode 100644 index 000000000000..d0a6259ca668 --- /dev/null +++ b/dev-db/spatialite/Manifest @@ -0,0 +1 @@ +DIST libspatialite-5.1.0.tar.gz 6517377 BLAKE2B 871e2be82dd1f02de76f0755b6ea7a53797dd9905fe481d6f56dcf8a87278f0a9326a3e0662620cbf6bfe53f932dab199602885c7efcbc5a5e56781a7599d226 SHA512 2745b373e31cea58623224def6090c491b58409803bb71231450dfa2cfdf3aafc3fc6f680585d55d085008f8cf362c3062ae67ffc7d80257775a22eb81ef1e57 diff --git a/dev-db/spatialite/files/spatialite-5.1.0-libxml2-2.14.patch b/dev-db/spatialite/files/spatialite-5.1.0-libxml2-2.14.patch new file mode 100644 index 000000000000..d45897aac781 --- /dev/null +++ b/dev-db/spatialite/files/spatialite-5.1.0-libxml2-2.14.patch @@ -0,0 +1,52 @@ +Source: https://www.gaia-gis.it/fossil/libspatialite/tktview?name=ac85f0fca3 + +Index: spatialite-5.1.0/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -61,6 +61,8 @@ AH_TEMPLATE([OMIT_FREEXL], + [Should be defined in order to disable FREEXL support.]) + AH_TEMPLATE([ENABLE_LIBXML2], + [Should be defined in order to enable LIBXML2 support.]) ++AH_TEMPLATE([ENABLE_LIBXML2_NANOHTTP], ++ [Should be defined in order to enable LIBXML2 HTTP support.]) + AH_TEMPLATE([ENABLE_MINIZIP], + [Should be defined in order to enable MiniZIP support.]) + AH_TEMPLATE([ENABLE_GEOPACKAGE], +@@ -441,6 +443,7 @@ if test x"$enable_libxml2" != "xno"; the + AC_SUBST(LIBXML2_CFLAGS) + AC_SUBST(LIBXML2_LIBS) + AC_DEFINE(ENABLE_LIBXML2) ++ AC_SEARCH_LIBS(xmlNanoHTTPCleanup,xml2,AC_DEFINE(ENABLE_LIBXML2_NANOHTTP),,) + fi + + #----------------------------------------------------------------------- +Index: spatialite-5.1.0/src/wfs/wfs_in.c +=================================================================== +--- a/src/wfs/wfs_in.c ++++ b/src/wfs/wfs_in.c +@@ -76,7 +76,10 @@ Regione Toscana - Settore Sistema Inform + #ifdef ENABLE_LIBXML2 /* LIBXML2 enabled: supporting XML documents */ + + #include <libxml/parser.h> ++ ++#ifdef ENABLE_LIBXML2_NANOHTTP + #include <libxml/nanohttp.h> ++#endif + + #define MAX_GTYPES 28 + +@@ -4636,8 +4639,13 @@ get_wfs_schema_column_info (gaiaWFScolum + SPATIALITE_DECLARE void + reset_wfs_http_connection (void) + { ++#ifdef ENABLE_LIBXML2_NANOHTTP + /* Resets the libxml2 "nano HTTP": useful when changing the HTTP_PROXY settings */ + xmlNanoHTTPCleanup (); ++#else ++/* LIBXML2 doesn't have HTTP support: does absolutely nothing */ ++ return; ++#endif + } + + #else /* LIBXML2 isn't enabled */ diff --git a/dev-db/spatialite/files/spatialite-5.1.0-macro-surgery.patch b/dev-db/spatialite/files/spatialite-5.1.0-macro-surgery.patch new file mode 100644 index 000000000000..ea057f50bc8b --- /dev/null +++ b/dev-db/spatialite/files/spatialite-5.1.0-macro-surgery.patch @@ -0,0 +1,80 @@ +https://bugs.gentoo.org/919177 +https://www.gaia-gis.it/fossil/libspatialite/tktview?name=d5c8f926be +https://www.gaia-gis.it/fossil/libspatialite/tktview/af38159360a2e740b2339e279103bcdaf951498e +Macro out things upstream forgot to conditionally exclude, macro in things upstream forgot +In particular, functions that appear only when GEOM is enabled should not be used +when GEOM is disabled, and having fallback for ancient version of PROJ is well and good; +upstream forgot version for modern one in one place. +--- a/src/gaiageo/gg_advanced.c ++++ b/src/gaiageo/gg_advanced.c +@@ -2286,6 +2286,7 @@ + / identifying toxic geometries + / i.e. geoms making GEOS to crash !!! + */ ++#ifndef OMIT_GEOS /* don't do anything if there's no GEOS */ + int ib; + gaiaPointPtr point; + gaiaLinestringPtr line; +@@ -2350,6 +2351,7 @@ + } + polyg = polyg->Next; + } ++#endif /* OMIT_GEOS */ + return 0; + } + +@@ -2377,11 +2379,13 @@ + return 0; + else + { ++#ifndef OMIT_GEOS /*can't report error if GEOS is not build, skipping */ + if (cache != NULL) + gaiaSetGeosAuxErrorMsg_r (cache, + "gaia detected a not-closed Ring"); + else + gaiaSetGeosAuxErrorMsg ("gaia detected a not-closed Ring"); ++#endif + return 1; + } + } +--- a/src/spatialite/spatialite.c ++++ b/src/spatialite/spatialite.c +@@ -23472,9 +23472,11 @@ + sqlite3_result_null (context); + else + { ++#ifndef OMIT_GEOS /* Only if GEOS enabled */ + if (!gaiaInterpolatePoint (cache, line, point, &m_value)) + sqlite3_result_null (context); + else ++#endif + sqlite3_result_double (context, m_value); + } + if (line != NULL) +--- a/src/connection_cache/alloc_cache.c ++++ b/connection_cache/alloc_cache.c +@@ -646,8 +646,12 @@ + #endif + + #else /* supporting old PROJ.4 */ ++#ifdef PROJ_NEW /* PROJ.6* */ ++ cache->PROJ_handle = proj_context_create (); ++#else + cache->PROJ_handle = pj_ctx_alloc (); + #endif ++#endif + #endif /* end PROJ.4 */ + + #ifdef ENABLE_RTTOPO /* initializing the RTTOPO context */ +@@ -706,7 +706,11 @@ + #endif /* end GEOS */ + + #ifndef OMIT_PROJ /* initializing the PROJ.4 context */ ++#ifndef PROJ_NEW /* Only in case where PROJ.5 not needed */ + cache->PROJ_handle = pj_ctx_alloc (); ++#else /* PROJ.6* */ ++ cache->PROJ_handle = proj_context_create (); ++#endif + #endif /* end PROJ.4 */ + + done: diff --git a/dev-db/spatialite/metadata.xml b/dev-db/spatialite/metadata.xml new file mode 100644 index 000000000000..b1cf20741377 --- /dev/null +++ b/dev-db/spatialite/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sci-geosciences@gentoo.org</email> + <name>Gentoo Geosciences Project</name> + </maintainer> + <use> + <flag name="geos">Add the <pkg>sci-libs/geos</pkg> library for exact topological tests</flag> + <flag name="proj">Add the <pkg>sci-libs/proj</pkg> library for reprojection features</flag> + <flag name="xls">Add the <pkg>dev-libs/freexl</pkg> library for xls import support</flag> + <flag name="rttopo">Add the <pkg>sci-geosciences/librttopo</pkg> library for topology support</flag> + </use> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/dev-db/spatialite/spatialite-5.1.0-r3.ebuild b/dev-db/spatialite/spatialite-5.1.0-r3.ebuild new file mode 100644 index 000000000000..fbb7aa8d1c57 --- /dev/null +++ b/dev-db/spatialite/spatialite-5.1.0-r3.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit libtool + +MY_PN="lib${PN}" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Complete Spatial DBMS in a nutshell built upon sqlite" +HOMEPAGE="https://www.gaia-gis.it/gaia-sins/" +SRC_URI="https://www.gaia-gis.it/gaia-sins/${MY_PN}-sources/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="MPL-1.1" +SLOT="0" +KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 ~riscv x86" +IUSE="+geos iconv +proj rttopo test +xls" +REQUIRED_USE="test? ( iconv )" +# Further poking required +RESTRICT="test" + +RDEPEND=" + >=dev-db/sqlite-3.7.5:3[extensions(+)] + dev-libs/libxml2:= + virtual/minizip:= + geos? ( >=sci-libs/geos-3.11.0 ) + proj? ( sci-libs/proj:= ) + rttopo? ( sci-geosciences/librttopo ) + xls? ( >=dev-libs/freexl-2.0.0[xml(+)] ) +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}/${P}-macro-surgery.patch" + "${FILESDIR}/${P}-libxml2-2.14.patch" # bug 955675 +) + +src_prepare() { + default + elibtoolize +} + +src_configure() { + # 1) gcp disabled for now to preserve MPL licence + econf \ + --disable-gcp \ + --disable-examples \ + --disable-static \ + --enable-epsg \ + --enable-libxml2 \ + $(use_enable geos) \ + $(use_enable geos geosadvanced) \ + $(use_enable geos geos3100) \ + $(use_enable geos geos3110) \ + $(use_enable iconv) \ + $(use_enable proj) \ + $(use_enable rttopo) \ + $(use_enable xls freexl) +} + +src_install() { + default + find "${ED}" -name '*.la' -delete || die +} |
