From 0ec1e1dd7867c3dedcbea76c9b6e847d6b388c03 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 11 Feb 2025 00:12:38 +0000 Subject: gentoo auto-resync : 11:02:2025 - 00:12:37 --- dev-db/spatialite/Manifest | 2 + .../files/spatialite-5.1.0-macro-surgery.patch | 80 ++++++++++++++++++++++ dev-db/spatialite/spatialite-5.1.0-r2.ebuild | 63 +++++++++++++++++ 3 files changed, 145 insertions(+) create mode 100644 dev-db/spatialite/files/spatialite-5.1.0-macro-surgery.patch create mode 100644 dev-db/spatialite/spatialite-5.1.0-r2.ebuild (limited to 'dev-db/spatialite') diff --git a/dev-db/spatialite/Manifest b/dev-db/spatialite/Manifest index 86cc725c5e52..9c122efe3125 100644 --- a/dev-db/spatialite/Manifest +++ b/dev-db/spatialite/Manifest @@ -1,3 +1,5 @@ +AUX spatialite-5.1.0-macro-surgery.patch 2355 BLAKE2B 4fc47fc60ef98a0f60d6eaae78d62196007d785c3a54619ef427d155c4e80a4f70e14e6690636bc981249fa0e38635a0d186b52b30f80cca7e327fd89eae0ec1 SHA512 771f9bfd40d02ade36179fefe15eaa1be582a64c2d8f6ae38774b9b53fdcccb70a36a67e4db8f0f88c3f79ed9085a6d2532e83d5af9986cc7a7be41ca35b78e2 DIST libspatialite-5.1.0.tar.gz 6517377 BLAKE2B 871e2be82dd1f02de76f0755b6ea7a53797dd9905fe481d6f56dcf8a87278f0a9326a3e0662620cbf6bfe53f932dab199602885c7efcbc5a5e56781a7599d226 SHA512 2745b373e31cea58623224def6090c491b58409803bb71231450dfa2cfdf3aafc3fc6f680585d55d085008f8cf362c3062ae67ffc7d80257775a22eb81ef1e57 EBUILD spatialite-5.1.0-r1.ebuild 1352 BLAKE2B e7a2f961ad0898efdc11a2a5241d4683a01fee554986ccd5730704a61cc3a79cb55da82ae763f508fa8915c3bec3df70152061ad54b857eff7b90e913de57957 SHA512 82b669c3372cadf7eb35b4318cf5b1f08066b8f322c3c89c05e92e79678ade768bfb59f324cb82c27e0ee1ac438d25621081478465115c329cc9cbd4be6a2b2e +EBUILD spatialite-5.1.0-r2.ebuild 1404 BLAKE2B e46d13d45ede3630d98dbe21ffa25f326d49c44e72faf9653e413477c6ceee54704cae09fca06c9f3f17c22c5d7d7befc66e982ff6dacff58b5c40dbf469feaf SHA512 a8e1201913d7874963725a7e05dbddcdaa4357eddc83cf01fb3a38ce438a47cc356b6a0817f2bc27db10cd739d77e4408e835b07ee9b7f236e43ec550b5b5f7d MISC metadata.xml 662 BLAKE2B d44c0b1a08c869509161cc7040c90c5e6b591b09f16893ac21885ee82817ad942eab586a44532ffa8dcbbdedffc6ec0bcf05641196cf892fb0b0e832a760e00f SHA512 7a614e0dc498ccd2d117e600efc867b248fc243fd3a9bb0a599fcaa47a90a3669a730e765df648b5a49cf77c442a3f4a2ea084a721bab48e9c37e7cc73fd9794 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/spatialite-5.1.0-r2.ebuild b/dev-db/spatialite/spatialite-5.1.0-r2.ebuild new file mode 100644 index 000000000000..edf57c760b1f --- /dev/null +++ b/dev-db/spatialite/spatialite-5.1.0-r2.ebuild @@ -0,0 +1,63 @@ +# 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 + sys-libs/zlib[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" ) + +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 +} -- cgit v1.2.3