mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-22 16:29:05 -07:00
sci-libs/gdal: drop 3.12.3
Signed-off-by: Alfred Wingate <parona@protonmail.com> Part-of: https://codeberg.org/gentoo/gentoo/pulls/1500 Merges: https://codeberg.org/gentoo/gentoo/pulls/1500 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
168a25ae53
commit
40e5d44afa
@@ -1,12 +1,9 @@
|
||||
DIST gdal-3.12.3.tar.xz 9619992 BLAKE2B 07b07fccc778d27a00b54961dc20d94a53a9ce4ff0b20b6e98c2f187ca1a7fbca7b0fa105d5b7b13fbd03a54e551dbd9dbd1ce0ca7fc57721405ae09ae5ab2f1 SHA512 eef0d4f2e347801a99e709a5058aac9886e9bf72c71c389e176bd78e803182610e5698b43d885b3cdce0b6f645453e3ec7cc597b4dcf5d30720a4c56d96c7265
|
||||
DIST gdal-3.12.3.tar.xz.sig 566 BLAKE2B 480abb569823970f989171c0cc7f028b580cd50851eb9829f8b2733ae141dfe048a4b63451f348357bcf84292c464a2e69b67e3e74c2bfb48ad75b31b756e9cc SHA512 a63e3185e3fc4ff039f1060c1d652c2df568d676a3dc309eb18e54966026258cbf945040d5e188a75c7a6a0c60340b7c101cc2a1cf4331c468f50dd1e9bec90a
|
||||
DIST gdal-3.12.4.tar.xz 9604672 BLAKE2B a09e0dd2b5da00286e8e2e2b1ccebf3577bfb18fb25ac04b452858e0ccb2dedfbc26c6c741d0c11bd255026d614872920750cf1ab838f8b21acfdcdf71691819 SHA512 fe0fd9a8f3f22f331195be3ccfa92644630229c5a6dc9de67d22939d127ef484923247b88be61ab6bfb27131ec32c21eb74d32cc4940d987f9ad116bb760bdf8
|
||||
DIST gdal-3.12.4.tar.xz.sig 566 BLAKE2B e2a4c0b137f5dffd253d9bb80d9fb75cb0584a63b5bc98cbf459b74be21b8615f479c7502b04bee879c8fb3eff78bcb2e6730f2675d18b11f4291d8108afc1c4 SHA512 a3b1461ae51512470c225a3915efc04ce269900ce0dafec944ad4bcb6aa596e2ba1d85132ce1766e190c63acfb753c745cccf4f1613655164aa3100fdc6104d0
|
||||
DIST gdal-3.13.1.tar.xz 9957916 BLAKE2B 582bea82ed21059c8b3348f91806842f0ee5337e056c8270b48a2478176036e1e34de6d9f5ebaa2ce16c7569fa36663c1bad26861161ab0e78712313fe61b407 SHA512 db14d46a36ac17f8efe5fb81b2aecd5dd79dc81ab89d789aa3315272210bcfb68e0e2cc452a402038dce175f55b624ab459993e2e198b849673f851b5a031e9b
|
||||
DIST gdal-3.13.1.tar.xz.sig 566 BLAKE2B f60b2c5dd5bd55c84aabf5f0f5b2189f2793c49eab7083fe79c308697ade74c2e374beff2a78d6d80c75a74aa47dc3360f3a6bd63191bfdba9b51b77d449690d SHA512 6fa6a8c1bcfb0e69135702d4ee46aa70d0623bd0db933c6844691b08a2a4bbc94fea70ed0c0c1bc0906c551b20186e369cff48eab971fec7c49f82b1305d9b36
|
||||
DIST gdal-3.13.2.tar.xz 9989660 BLAKE2B 6c22f3a19b28c67c03db83b8138283955371d1a939a1cfdeadd2fa646fa8fb760961f227ba4c819cb2386bc372371352a8c5e45c35ed552d91738590cee22013 SHA512 cef8ff877006dc3c112012edcb8c164e47b2295fca1985ba84e21588f4457aeb1ec9b33487291b2f72686c6d06ecf6144cc6d03fee553caa7ce7165094e88344
|
||||
DIST gdal-3.13.2.tar.xz.sig 566 BLAKE2B a94d69384c2631e921cfcb9172ebc10daaa3d0f20ab43a9c1c11760d404fa2687870f5da8322ab7464beeabf5ef8560e3eb05ca8f1100deb20518ae4fbd54ce5 SHA512 7efe2dd6d0758a3782bad2acb8c4e5e6eff19e2cef256c4bee4e368b4656c767b288c662852e239bc05bd0afd7d35cc1feeb701bf6137b27dd23f1e7166be9e6
|
||||
DIST gdalautotest-3.12.3.zip 23255528 BLAKE2B 3d20864678b565b94221165db418691555341fabb9e3c675776a9b8ec53ebc0e081973e1b851df86de7bbb1444f3a20b5964537316dbee75ab8b08f74b6b68d3 SHA512 ecfcf2c75752e2120a2f010f116a303c8ac7d952c79f538b395aee9130518f54d9a1a72de4ff0f54bc6df8985d10b594bb830c7d874312844f3163ce5051c49b
|
||||
DIST gdalautotest-3.12.4.zip 23266101 BLAKE2B 4425fed6d5a17ae0a222a37e581923015054141d236f15b71179cd55efc0fcee7ec1b572e9af2c2a6c9cf54807a0753e90b7b9cd6d7fbd8ca93beab5a8b75cb2 SHA512 19eef02db070ddf71c213311e702f4a15b2d3dc86a55de6edb22d38396bc477c2da0634035e3186c5172e94bed526b6057e2e8a6c17b4d786ada116ceef41aba
|
||||
DIST gdalautotest-3.13.1.zip 23833294 BLAKE2B c2669145d7b40a5797b1dc6ba3796a1cf8036e2b0af9c50e37165770689f28861ecf0c28a243adf7682b88db668e07c83394b5248abc6f349ce5ab8fc092f41d SHA512 52b7e0769d6dae1cb2c25dd1095a17c7189fe4c917ba5a3da4df28ff6aef52fa31be98fff5e1cefd29952d1dae070b56ed54ce5165a014111ef77ba225eb69d4
|
||||
DIST gdalautotest-3.13.2.zip 23847042 BLAKE2B 87c1c40050b360a537b7904c79f63532977d824677c40211f7ca62b83d519a0a52fd78cd26def01d2edfe7dc9d1797827688615781e9fc94ef5190e5b8c0a930 SHA512 c940abc2ea0953c9a6065cce139346aad97e525ee7355826d919d81048f3aacda3f0ea06e563e35a444dd22c1566bfe33430c13deab276794374a2c59859fa20
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
From 0ad9529d5fd5e03880147221d56bfee08383d7dc Mon Sep 17 00:00:00 2001
|
||||
From: Even Rouault <even.rouault@spatialys.com>
|
||||
Date: Sat, 28 Mar 2026 18:28:51 +0100
|
||||
Subject: [PATCH] Fix build against Poppler 26.03.90 (future 26.04.00)
|
||||
|
||||
---
|
||||
frmts/pdf/CMakeLists.txt | 6 +++---
|
||||
frmts/pdf/pdfobject.cpp | 21 +++++++++++++++++++--
|
||||
2 files changed, 22 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/frmts/pdf/CMakeLists.txt b/frmts/pdf/CMakeLists.txt
|
||||
index 905b80161f15..34e8925db8be 100644
|
||||
--- a/frmts/pdf/CMakeLists.txt
|
||||
+++ b/frmts/pdf/CMakeLists.txt
|
||||
@@ -67,11 +67,11 @@ if (GDAL_USE_POPPLER)
|
||||
if ("${Poppler_VERSION_MINOR}" MATCHES "0?[0-9]+")
|
||||
string(REGEX REPLACE "0?([0-9]+)" "\\1" Poppler_VERSION_MINOR ${Poppler_VERSION_MINOR})
|
||||
endif ()
|
||||
- # POPPLER_24_05_OR_LATER used transiently (by fuzzers/build.sh) until 24.05 is actually released
|
||||
- if (Poppler_VERSION_STRING VERSION_GREATER_EQUAL "24.05" OR POPPLER_24_05_OR_LATER)
|
||||
+ if (Poppler_VERSION_STRING VERSION_GREATER_EQUAL "24.05")
|
||||
target_compile_features(gdal_PDF PRIVATE cxx_std_20)
|
||||
endif ()
|
||||
- target_compile_definitions(gdal_PDF PRIVATE -DHAVE_POPPLER -DPOPPLER_MAJOR_VERSION=${Poppler_VERSION_MAJOR}
|
||||
+ target_compile_definitions(gdal_PDF PRIVATE -DHAVE_POPPLER
|
||||
+ -DPOPPLER_MAJOR_VERSION=${Poppler_VERSION_MAJOR}
|
||||
-DPOPPLER_MINOR_VERSION=${Poppler_VERSION_MINOR})
|
||||
endif ()
|
||||
if (GDAL_USE_PODOFO)
|
||||
diff --git a/frmts/pdf/pdfobject.cpp b/frmts/pdf/pdfobject.cpp
|
||||
index 3a5b53da9248..76d56b11f57a 100644
|
||||
--- a/frmts/pdf/pdfobject.cpp
|
||||
+++ b/frmts/pdf/pdfobject.cpp
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "gdal_pdf.h"
|
||||
|
||||
#include <limits>
|
||||
+#include <type_traits>
|
||||
#include <vector>
|
||||
#include "pdfobject.h"
|
||||
|
||||
@@ -1122,8 +1123,24 @@ const std::string &GDALPDFObjectPoppler::GetString()
|
||||
{
|
||||
if (GetType() == PDFObjectType_String)
|
||||
{
|
||||
- const GooString *gooString = m_poConst->getString();
|
||||
- const std::string &osStdStr = gooString->toStr();
|
||||
+ const std::string &osStdStr = *(
|
||||
+ [](auto &&obj) -> const std::string *
|
||||
+ {
|
||||
+ if constexpr (std::is_same_v<decltype(obj),
|
||||
+ const std::string &>)
|
||||
+ {
|
||||
+ // Since Poppler 26.04
|
||||
+ return &obj;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ static_assert(
|
||||
+ std::is_same_v<decltype(obj), const GooString *&&>);
|
||||
+ static_assert(std::is_same_v<decltype(obj->toStr()),
|
||||
+ const std::string &>);
|
||||
+ return &(obj->toStr());
|
||||
+ }
|
||||
+ }(m_poConst->getString()));
|
||||
const bool bLEUnicodeMarker =
|
||||
osStdStr.size() >= 2 && static_cast<uint8_t>(osStdStr[0]) == 0xFE &&
|
||||
static_cast<uint8_t>(osStdStr[1]) == 0xFF;
|
||||
@@ -1,530 +0,0 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
DISTUTILS_EXT=1
|
||||
DISTUTILS_OPTIONAL=1
|
||||
PYTHON_COMPAT=( python3_{12..14} )
|
||||
inherit cmake distutils-r1 flag-o-matic java-pkg-opt-2 unpacker verify-sig
|
||||
|
||||
DESCRIPTION="Translator library for raster geospatial data formats (includes OGR support)"
|
||||
HOMEPAGE="https://gdal.org/"
|
||||
SRC_URI="
|
||||
https://download.osgeo.org/${PN}/${PV}/${P}.tar.xz
|
||||
test? ( https://download.osgeo.org/${PN}/${PV}/${PN}autotest-${PV}.zip )
|
||||
verify-sig? ( https://download.osgeo.org/${PN}/${PV}/${P}.tar.xz.sig )
|
||||
"
|
||||
|
||||
LICENSE="BSD Info-ZIP MIT"
|
||||
SLOT="0/38" # subslot is libgdal.so.<SONAME> (and GDAL_SOVERSION in gdal.cmake)
|
||||
KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 ~riscv x86"
|
||||
IUSE="
|
||||
archive armadillo avif blosc cryptopp +curl cpu_flags_arm_neon cpu_flags_x86_avx
|
||||
cpu_flags_x86_avx2 cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse4_1
|
||||
cpu_flags_x86_ssse3 exprtk fits geos gif gml hdf5 heif java jpeg2k jpegxl lerc
|
||||
libaec libdeflate lz4 lzma mongodb +muparser mysql netcdf odbc openexr oracle
|
||||
parquet pdf png postgres python qhull spatialite sqlite system-tiff test +tools
|
||||
webp xls zstd
|
||||
"
|
||||
|
||||
# jpegxl isn't supported for system tiff
|
||||
REQUIRED_USE="
|
||||
python? ( ${PYTHON_REQUIRED_USE} )
|
||||
spatialite? ( sqlite )
|
||||
jpegxl? ( !system-tiff )
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
COMMON_DEPEND="
|
||||
dev-libs/expat
|
||||
dev-libs/json-c:=
|
||||
dev-libs/libxml2:2=
|
||||
dev-libs/openssl:=
|
||||
media-libs/libjpeg-turbo:=
|
||||
>=sci-libs/proj-6.0.0:=[tiff]
|
||||
virtual/minizip:=
|
||||
archive? ( app-arch/libarchive:= )
|
||||
armadillo? ( sci-libs/armadillo:=[lapack] )
|
||||
avif? ( media-libs/libavif:= )
|
||||
blosc? ( dev-libs/c-blosc:= )
|
||||
cryptopp? ( dev-libs/crypto++:= )
|
||||
curl? ( net-misc/curl )
|
||||
fits? ( sci-libs/cfitsio:= )
|
||||
geos? ( >=sci-libs/geos-3.8.0 )
|
||||
gif? ( media-libs/giflib:= )
|
||||
gml? ( >=dev-libs/xerces-c-3.1:= )
|
||||
heif? ( media-libs/libheif:= )
|
||||
hdf5? ( >=sci-libs/hdf5-1.6.4:=[cxx,szip] )
|
||||
java? (
|
||||
>=virtual/jdk-1.8:*
|
||||
)
|
||||
jpeg2k? ( media-libs/openjpeg:2= )
|
||||
jpegxl? ( media-libs/libjxl:= )
|
||||
lerc? ( media-libs/lerc:= )
|
||||
libaec? ( sci-libs/libaec:= )
|
||||
libdeflate? ( app-arch/libdeflate )
|
||||
lz4? ( app-arch/lz4:= )
|
||||
lzma? ( || (
|
||||
app-arch/xz-utils
|
||||
app-arch/lzma
|
||||
) )
|
||||
mongodb? ( dev-libs/mongo-cxx-driver:= )
|
||||
muparser? ( dev-cpp/muParser:= )
|
||||
mysql? ( dev-db/mysql-connector-c:= )
|
||||
netcdf? ( sci-libs/netcdf:= )
|
||||
odbc? ( dev-db/unixODBC )
|
||||
openexr? ( media-libs/openexr:= )
|
||||
oracle? ( dev-db/oracle-instantclient:= )
|
||||
parquet? ( dev-libs/apache-arrow:=[compute,dataset,parquet,lz4?,zlib,zstd?] )
|
||||
pdf? ( app-text/poppler:= )
|
||||
png? ( media-libs/libpng:= )
|
||||
postgres? ( >=dev-db/postgresql-8.4:= )
|
||||
qhull? ( media-libs/qhull:= )
|
||||
spatialite? ( dev-db/spatialite )
|
||||
sqlite? (
|
||||
>=dev-db/sqlite-3.31:3
|
||||
dev-libs/libpcre2:=
|
||||
)
|
||||
system-tiff? (
|
||||
media-libs/tiff:=[jpeg]
|
||||
>=sci-libs/libgeotiff-1.5.1-r1:=
|
||||
)
|
||||
webp? ( media-libs/libwebp:= )
|
||||
xls? ( dev-libs/freexl )
|
||||
zstd? ( app-arch/zstd:= )
|
||||
"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
java? ( >=virtual/jre-1.8:* )
|
||||
python? (
|
||||
${PYTHON_DEPS}
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/numpy[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
exprtk? ( dev-cpp/exprtk )
|
||||
test? ( dev-cpp/gtest )
|
||||
"
|
||||
BDEPEND="
|
||||
virtual/pkgconfig
|
||||
java? (
|
||||
>=dev-java/ant-1.10.14-r3:0
|
||||
dev-lang/swig
|
||||
)
|
||||
python? (
|
||||
${DISTUTILS_DEPS}
|
||||
dev-lang/swig
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/numpy[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
dev-python/filelock[${PYTHON_USEDEP}]
|
||||
dev-python/jsonschema[${PYTHON_USEDEP}]
|
||||
dev-python/lxml[${PYTHON_USEDEP}]
|
||||
>=dev-python/pytest-6.0.0[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-env[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-xdist[${PYTHON_USEDEP}]
|
||||
parquet? ( dev-python/pyarrow[parquet,${PYTHON_USEDEP}] )
|
||||
)
|
||||
')
|
||||
)
|
||||
test? ( app-arch/unzip )
|
||||
verify-sig? ( sec-keys/openpgp-keys-gdal )
|
||||
"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gdal.asc
|
||||
|
||||
QA_CONFIG_IMPL_DECL_SKIP=(
|
||||
_wstat64 # Windows LFS
|
||||
)
|
||||
|
||||
EPYTEST_PLUGINS=( pytest-env )
|
||||
EPYTEST_RERUNS=5
|
||||
EPYTEST_XDIST=1
|
||||
# distutils_enable_tests unconditionally touches BDEPEND
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-fix-completions.patch
|
||||
"${FILESDIR}"/${P}-poppler-26.04.patch # in git master
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
use java && java-pkg-opt-2_pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if use verify-sig; then
|
||||
verify-sig_verify_detached "${DISTDIR}/${P}.tar.xz" "${DISTDIR}/${P}.tar.xz.sig"
|
||||
fi
|
||||
|
||||
# unpacker mishandles .sig files
|
||||
unpack ${P}.tar.xz
|
||||
use test && unpack_zip gdalautotest-${PV}.zip
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use test ; then
|
||||
mv "${WORKDIR}"/gdalautotest-${PV} "${S}"/autotest || die
|
||||
fi
|
||||
java-pkg-opt-2_src_prepare
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
python_configure_all() {
|
||||
local -x BUILD_DIR="${S}_python"
|
||||
# Generate required files with cmake and then use distutils-r1 to generate wheels
|
||||
# https://github.com/OSGeo/gdal/issues/9965#issuecomment-2159222393
|
||||
mycmakeargs+=( -DBUILD_PYTHON_BINDINGS=ON )
|
||||
cmake_src_configure
|
||||
cmake_build python_generated_files
|
||||
cmake_build generate_gdal_version_h
|
||||
sed -E -e "/(library_dirs|include_dirs) =/ { s|${BUILD_DIR}|${cmake_build_dir}| } " \
|
||||
-i "${BUILD_DIR}/swig/python/setup.py" || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# sanity check subslot to give a friendly reminder to would-be drive by bumpers
|
||||
local detected_soversion
|
||||
detected_soversion="$(sed -n -e 's/set(GDAL_SOVERSION \(.*\))/\1/p' gdal.cmake)"
|
||||
if [[ "${SLOT#0/}" != "${detected_soversion}" ]]; then
|
||||
die "Subslot ${SLOT#0/} doesn't match upstream specified set(GDAL_SOVERSION ${detected_soversion}) in gdal.cmake."
|
||||
fi
|
||||
|
||||
# ODR violations
|
||||
filter-lto
|
||||
|
||||
local mycmakeargs=(
|
||||
# https://gdal.org/en/stable/development/building_from_source.html
|
||||
|
||||
-DBUILD_APPS=$(usex tools)
|
||||
-DBUILD_TESTING=$(usex test)
|
||||
-DENABLE_GNM=ON
|
||||
-DENABLE_IPO=OFF
|
||||
-DENABLE_PAM=ON # Persistent Auxiliary Metadata (not Pluggable Authentication Modules!)
|
||||
-DOGR_ENABLE_DRIVER_SQLITE=$(usex sqlite)
|
||||
-DGDAL_ENABLE_PLUGINS=OFF
|
||||
-DGDAL_ENABLE_PLUGINS_NO_DEPS=OFF
|
||||
-DGDAL_BUILD_OPTIONAL_DRIVERS=ON
|
||||
-DOGR_BUILD_OPTIONAL_DRIVERS=ON
|
||||
-DGDAL_USE_EXTERNAL_LIBS=ON
|
||||
-DGDAL_USE_INTERNAL_LIBS=OFF
|
||||
-DUSE_CCACHE=OFF
|
||||
-DUSE_PRECOMPILED_HEADERS=OFF
|
||||
|
||||
# bug #844874 and bug #845150
|
||||
-DCMAKE_INSTALL_INCLUDEDIR="include/gdal"
|
||||
|
||||
-DGDAL_FIND_PACKAGE_PROJ_MODE=CONFIG
|
||||
|
||||
# Options here are generally off because of one of:
|
||||
# - Not yet packaged dependencies
|
||||
#
|
||||
# - Off for autotools build and didn't want more churn by
|
||||
# enabling during port to CMake. Feel free to request them
|
||||
# being turned on if useful for you.
|
||||
#
|
||||
# See cmake/helpers/CheckDependentLibraries.cmake for options
|
||||
# *_*_package(Option) -> GDAL_USE_OPTION
|
||||
-DGDAL_USE_ADBCDRIVERMANAGER=OFF
|
||||
-DGDAL_USE_ARCHIVE=$(usex archive)
|
||||
-DGDAL_USE_ARMADILLO=$(usex armadillo)
|
||||
-DGDAL_USE_AVIF=$(usex avif)
|
||||
-DGDAL_USE_ARROW=$(usex parquet)
|
||||
-DGDAL_USE_BASISU=OFF
|
||||
-DGDAL_USE_BLOSC=$(usex blosc)
|
||||
-DGDAL_USE_BRUNSLI=OFF
|
||||
-DGDAL_USE_CRNLIB=OFF
|
||||
-DGDAL_USE_CFITSIO=$(usex fits)
|
||||
-DGDAL_USE_CURL=$(usex curl)
|
||||
-DGDAL_USE_CRYPTOPP=$(usex cryptopp)
|
||||
-DGDAL_USE_DEFLATE=$(usex libdeflate) # complements zlib
|
||||
-DGDAL_USE_ECW=OFF
|
||||
-DGDAL_USE_EXPAT=ON
|
||||
-DGDAL_USE_EXPRTK=$(usex exprtk)
|
||||
-DGDAL_USE_FILEGDB=OFF
|
||||
-DGDAL_USE_FREEXL=$(usex xls)
|
||||
-DGDAL_USE_FYBA=OFF
|
||||
|
||||
-DGDAL_USE_GEOTIFF=$(usex system-tiff)
|
||||
-DGDAL_USE_GEOTIFF_INTERNAL=$(usex !system-tiff)
|
||||
|
||||
-DGDAL_USE_GEOS=$(usex geos)
|
||||
-DGDAL_USE_GIF=$(usex gif)
|
||||
-DGDAL_USE_GTA=OFF
|
||||
-DGDAL_USE_HEIF=$(usex heif)
|
||||
-DGDAL_USE_HDF4=OFF
|
||||
-DGDAL_USE_HDF5=$(usex hdf5)
|
||||
-DGDAL_USE_HDFS=OFF
|
||||
-DGDAL_USE_ICONV=ON # TODO dep
|
||||
-DGDAL_USE_IDB=OFF
|
||||
-DGDAL_USE_JPEG=ON # bug #965329
|
||||
|
||||
# https://gdal.org/build_hints.html#jpeg12
|
||||
# Independent of whether using system libjpeg
|
||||
-DGDAL_USE_JPEG12_INTERNAL=ON
|
||||
|
||||
-DGDAL_USE_JSONC=ON
|
||||
-DGDAL_USE_JXL=$(usex jpegxl)
|
||||
-DGDAL_USE_JXL_THREADS=$(usex jpegxl)
|
||||
-DGDAL_USE_KDU=OFF
|
||||
-DGDAL_USE_KEA=OFF
|
||||
-DGDAL_USE_LERC=$(usex lerc)
|
||||
-DGDAL_USE_LIBAEC=$(usex libaec)
|
||||
-DGDAL_USE_LIBKML=OFF
|
||||
-DGDAL_USE_LIBLZMA=$(usex lzma)
|
||||
-DGDAL_USE_LIBQB3=OFF
|
||||
-DGDAL_USE_LIBXML2=ON
|
||||
-DGDAL_USE_LZ4=$(usex lz4) # FIXME
|
||||
-DGDAL_USE_MONGOCXX=$(usex mongodb)
|
||||
-DGDAL_USE_MRSID=OFF
|
||||
-DGDAL_USE_MSSQL_NCLI=OFF
|
||||
-DGDAL_USE_MSSQL_ODBC=OFF
|
||||
-DGDAL_USE_MUPARSER=$(usex muparser)
|
||||
-DGDAL_USE_MYSQL=$(usex mysql)
|
||||
-DGDAL_USE_NETCDF=$(usex netcdf)
|
||||
-DGDAL_USE_ODBC=$(usex odbc)
|
||||
-DGDAL_USE_ODBCCPP=OFF
|
||||
|
||||
# unpackaged
|
||||
-DGDAL_USE_OPENCAD=OFF
|
||||
-DGDAL_USE_OPENCAD_INTERNAL=ON
|
||||
|
||||
-DGDAL_USE_OPENDRIVE=OFF
|
||||
-DGDAL_USE_OPENEXR=$(usex openexr)
|
||||
-DGDAL_USE_OPENJPEG=$(usex jpeg2k)
|
||||
-DGDAL_USE_OPENSSL=ON
|
||||
-DGDAL_USE_ORACLE=$(usex oracle)
|
||||
-DGDAL_USE_PARQUET=$(usex parquet)
|
||||
-DGDAL_USE_PCRE2=ON
|
||||
-DGDAL_USE_PDFIUM=OFF
|
||||
|
||||
# Enable internal implementation so that tests pass with the use disabled
|
||||
-DGDAL_USE_PNG=$(usex png)
|
||||
-DGDAL_USE_PNG_INTERNAL=$(usex !png)
|
||||
|
||||
-DGDAL_USE_PODOFO=OFF
|
||||
-DGDAL_USE_POPPLER=$(usex pdf)
|
||||
-DGDAL_USE_POSTGRESQL=$(usex postgres)
|
||||
-DGDAL_USE_QHULL=$(usex qhull)
|
||||
-DGDAL_USE_RASTERLITE2=OFF
|
||||
|
||||
# upstream recommends using the internal implementation
|
||||
# bug #935567
|
||||
-DGDAL_USE_SHAPELIB=OFF
|
||||
-DGDAL_USE_SHAPELIB_INTERNAL=ON
|
||||
|
||||
-DGDAL_USE_SPATIALITE=$(usex spatialite)
|
||||
-DGDAL_USE_SQLITE3=$(usex sqlite)
|
||||
-DGDAL_USE_SFCGAL=OFF
|
||||
-DGDAL_USE_TEIGHA=OFF
|
||||
|
||||
-DGDAL_USE_TIFF=$(usex system-tiff)
|
||||
-DGDAL_USE_TIFF_INTERNAL=$(usex !system-tiff)
|
||||
|
||||
-DGDAL_USE_WEBP=$(usex webp)
|
||||
-DGDAL_USE_XERCESC=$(usex gml)
|
||||
-DGDAL_USE_ZLIB=ON
|
||||
-DGDAL_USE_ZSTD=$(usex zstd)
|
||||
|
||||
# Bindings
|
||||
-DBUILD_PYTHON_BINDINGS=OFF # handled separately
|
||||
-DBUILD_JAVA_BINDINGS=$(usex java)
|
||||
# bug #845369
|
||||
-DBUILD_CSHARP_BINDINGS=OFF
|
||||
|
||||
# Handled differently from x86
|
||||
# First checks if the platform supports neon and if it supports the option will be available
|
||||
# See SSE2NEON_COMPILES in CMakeLists.txt and gdal.cmake
|
||||
-DGDAL_ENABLE_ARM_NEON_OPTIMIZATIONS=$(usex cpu_flags_arm_neon)
|
||||
)
|
||||
|
||||
if use x86 || use amd64 ; then
|
||||
mycmakeargs+=(
|
||||
# Check work/gdal-3.5.0_build/CMakeCache.txt after configure
|
||||
# and https://github.com/OSGeo/gdal/blob/master/cmake/helpers/CheckCompilerMachineOption.cmake#L71
|
||||
# Commented out: not (yet?) implemented upstream.
|
||||
#
|
||||
# check_compiler_machine_option(flag <instruction set>) -> -Dtest_<instruction set>
|
||||
-Dtest_avx=$(usex cpu_flags_x86_avx)
|
||||
-Dtest_avx2=$(usex cpu_flags_x86_avx2)
|
||||
-Dtest_sse=$(usex cpu_flags_x86_sse)
|
||||
-Dtest_sse2=$(usex cpu_flags_x86_sse2)
|
||||
#-Dtest_sse3=$(usex cpu_flags_x86_sse3)
|
||||
-Dtest_sse4.1=$(usex cpu_flags_x86_sse4_1)
|
||||
#-Dtest_sse4.2=$(usex cpu_flags_x86_sse4_2)
|
||||
#-Dtest_sse4a=$(usex cpu_flags_x86_sse4a)
|
||||
-Dtest_ssse3=$(usex cpu_flags_x86_ssse3)
|
||||
#-Dtest_fma4=$(usex cpu_flags_x86_fma4)
|
||||
#-Dtest_xop=$(usex cpu_flags_x86_xop)
|
||||
)
|
||||
fi
|
||||
|
||||
if use test ; then
|
||||
mycmakeargs+=( -DUSE_EXTERNAL_GTEST=ON )
|
||||
fi
|
||||
|
||||
cmake_src_configure
|
||||
|
||||
local cmake_build_dir="${BUILD_DIR}"
|
||||
use python && distutils-r1_src_configure
|
||||
}
|
||||
|
||||
python_compile() {
|
||||
pushd "${S}_python/swig/python" >/dev/null || die
|
||||
distutils-r1_python_compile
|
||||
popd >/dev/null || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake_src_compile
|
||||
|
||||
local -x PATH="${BUILD_DIR}/apps:${PATH}"
|
||||
local -x LD_LIBRARY_PATH="${BUILD_DIR}:${LD_LIBRARY_PATH}"
|
||||
use python && distutils-r1_src_compile
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local -x GDAL_DATA="${S}/data"
|
||||
|
||||
# note: testpaths in pytest.ini will fight EPYTEST_IGNORE
|
||||
EPYTEST_IGNORE=(
|
||||
# network-sandbox and deselecting tests turns into whac-a-mole with their interdependencies
|
||||
"gcore/vsis3.py"
|
||||
# All tests require network-sandbox
|
||||
"ogr/ogr_ngw.py"
|
||||
)
|
||||
|
||||
use !muparser && EPYTEST_IGNORE+=( "gdrivers/vrtpansharpen.py" )
|
||||
use !pdf && EPYTEST_IGNORE+=( "gdrivers/pdf.py" )
|
||||
|
||||
EPYTEST_DESELECT=(
|
||||
# network-sandbox
|
||||
"gcore/tiff_read.py::test_tiff_read_strace_check"
|
||||
"gcore/vsioss.py::test_vsioss_6"
|
||||
"gdrivers/gdalhttp.py::test_http_ssl_verifystatus"
|
||||
"gdrivers/jp2openjpeg.py::test_jp2openjpeg_45"
|
||||
"gdrivers/vrtrawlink.py::test_vrtrawlink_GDAL_VRT_RAWRASTERBAND_ALLOWED_SOURCE_ONLY_REMOTE_accepted"
|
||||
"gdrivers/wms.py::test_wms_8"
|
||||
"ogr/ogr_csv.py::test_ogr_csv_schema_override"
|
||||
"ogr/ogr_geojson.py::test_ogr_geojson_schema_override"
|
||||
"ogr/ogr_gml.py::test_ogr_gml_type_override"
|
||||
"ogr/ogr_gmlas.py::test_ogr_gmlas_billion_laugh"
|
||||
"ogr/ogr_gmlas.py::test_ogr_gmlas_datetime"
|
||||
"ogr/ogr_parquet.py::test_ogr_parquet_coordinate_epoch"
|
||||
"ogr/ogr_parquet.py::test_ogr_parquet_crs_identification_on_write"
|
||||
"ogr/ogr_parquet.py::test_ogr_parquet_edges"
|
||||
"ogr/ogr_parquet.py::test_ogr_parquet_geoarrow"
|
||||
"ogr/ogr_parquet.py::test_ogr_parquet_geometry_types"
|
||||
"ogr/ogr_parquet.py::test_ogr_parquet_polygon_orientation"
|
||||
"ogr/ogr_sqlite.py::test_ogr_sqlite_schema_override"
|
||||
"pyscripts/test_validate_geoparquet.py::test_validate_geoparquet_ok"
|
||||
"utilities/test_gdalinfo_lib.py::test_gdalinfo_lib_2"
|
||||
"utilities/test_gdalinfo_lib.py::test_gdalinfo_lib_5"
|
||||
"utilities/test_gdalinfo_lib.py::test_gdalinfo_lib_json_color_table_and_rat"
|
||||
"utilities/test_ogrinfo_lib.py::test_ogrinfo_lib_extent3D"
|
||||
"utilities/test_ogrinfo_lib.py::test_ogrinfo_lib_json_relationships"
|
||||
"utilities/test_ogrinfo_lib.py::test_ogrinfo_lib_json_validate"
|
||||
|
||||
# sandbox interferes with strace?
|
||||
"gcore/basic_test.py::test_basic_test_strace_non_existing_file"
|
||||
|
||||
# Breaks due to other deselects.
|
||||
"ogr/ogr_gpkg.py::test_ogr_gpkg_immutable"
|
||||
"ogr/ogr_gpkg.py::test_ogr_gpkg_nolock"
|
||||
"ogr/ogr_parquet.py::test_ogr_parquet_read_large_binary_or_string_for_geometry"
|
||||
"ogr/ogr_parquet.py::test_ogr_parquet_write_arrow_rewind_polygon"
|
||||
"ogr/ogr_parquet.py::test_ogr_parquet_bbox_float32"
|
||||
"ogr/ogr_sqlite.py::test_ogr_sqlite_34"
|
||||
|
||||
# Fails on new poppler versions due to checksum check
|
||||
"gdrivers/pdf.py::test_pdf_extra_rasters[POPPLER]"
|
||||
|
||||
# flaky
|
||||
"gdrivers/kmlsuperoverlay.py::test_kmlsuperoverlay_8"
|
||||
)
|
||||
|
||||
if use !armadillo; then
|
||||
EPYTEST_DESELECT+=(
|
||||
# AssertionError: (1634, (3456541.352648813, 5640759.820845713, 0.0))
|
||||
"gcore/transformer.py::test_transformer_tps_precision"
|
||||
)
|
||||
fi
|
||||
|
||||
if use !sqlite; then
|
||||
EPYTEST_DESELECT+=(
|
||||
# implicit sqlite requirement for the test (or the wms (curl) driver)?
|
||||
"gdrivers/ogcapi.py::test_ogr_ogcapi_vector_tiles"
|
||||
# expects sqlite being enabled in a warning message
|
||||
"utilities/test_gdalalg_vector_rasterize.py::test_gdalalg_vector_rasterize"
|
||||
)
|
||||
fi
|
||||
|
||||
pushd "${S}_python/autotest" >/dev/null || die
|
||||
# https://github.com/OSGeo/gdal/tree/v3.11.3/autotest#gdals-tests-are-not-independent
|
||||
# So run directories separately with reruns to maximise chances without excluding every test
|
||||
#
|
||||
# See pytest_dirs in autotest/CMakeLists.txt.
|
||||
# benchmark excluded on purpose as it uses pytest-benchmark
|
||||
# gdrivers excluded as its especially flaky with excluding tests
|
||||
# gnm excluded as you need to exclude 99% of it leaving only one or two tests
|
||||
local failures=()
|
||||
for pytest_dir in alg gcore gdrivers ogr osr pyscripts utilities; do
|
||||
nonfatal epytest ${pytest_dir}
|
||||
[[ ${?} != 0 ]] && failures+=( ${pytest_dir} )
|
||||
done
|
||||
popd >/dev/null || die
|
||||
|
||||
if [[ ${#failures} -gt 0 ]]; then
|
||||
die "pytest failures: ${failures[@]}"
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local -x GDAL_RUN_SLOW_TESTS=0
|
||||
local -x GDAL_DOWNLOAD_TEST_DATA=0 # tests relying on downloaded data **may** be skipped
|
||||
|
||||
cmake_src_test
|
||||
|
||||
local -x PATH="${BUILD_DIR}/apps:${PATH}"
|
||||
local -x LD_LIBRARY_PATH="${BUILD_DIR}:${LD_LIBRARY_PATH}"
|
||||
use python && distutils-r1_src_test
|
||||
}
|
||||
|
||||
python_install() {
|
||||
pushd "${S}_python/swig/python" >/dev/null || die
|
||||
distutils-r1_python_install
|
||||
popd >/dev/null || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
|
||||
if use java; then
|
||||
# Move the native library into the proper place for Gentoo. The
|
||||
# library in ${ED} has already had its RPATH fixed, so we use it
|
||||
# rather than ${BUILD_DIR}/swig/java/libgdalalljni.so.
|
||||
java-pkg_doso "${ED}/usr/$(get_libdir)/jni/libgdalalljni.so"
|
||||
rm -rf "${ED}/usr/$(get_libdir)/jni" || die
|
||||
fi
|
||||
|
||||
use python && distutils-r1_src_install
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "Check available image and data formats after building with"
|
||||
if use tools; then
|
||||
elog "gdal info --formats"
|
||||
else
|
||||
elog "gdal-config --formats"
|
||||
fi
|
||||
|
||||
if use java; then
|
||||
elog
|
||||
elog "To use the Java bindings, you need to pass the following to java:"
|
||||
elog " -Djava.library.path=$(java-config -i gdal)"
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user