gdal, py-gdal: update to 3.13.1

- remove patch-build_with_install_name_dir.diff
- add patch-gtiffdataset.diff
This commit is contained in:
Nicklas Larsson
2026-06-08 22:34:43 +02:00
committed by Renee Otten
parent b74d73bfc2
commit cf569f1e94
4 changed files with 56 additions and 63 deletions
+6 -6
View File
@@ -9,12 +9,12 @@ PortGroup muniversal 1.0
name gdal
# keep version in sync with py-gdal; rev-bump dependents after an
# install_name-changing update (typically when a or b changes in version a.b.c).
version 3.13.0
revision 1
version 3.13.1
revision 0
checksums rmd160 d85862aaee5c7e8943a469188e3435ee357f0f37 \
sha256 1c537dd2f4d66f05534ae419bc2af495c2204ce13bb266c8cbd867dd6705f0c7 \
size 9945444
checksums rmd160 a21330e04ab00d8dc89f8d1f3d5c9858cb948db0 \
sha256 7398fb132753140740fac4f099f0dbe49d1ad074c4162290c308e067c46b7f92 \
size 9957916
categories gis
license MIT BSD
@@ -86,7 +86,7 @@ depends_lib-append \
port:zlib \
port:zstd
patchfiles-append patch-build_with_install_name_dir.diff
patchfiles-append patch-gtiffdataset.diff
# By default, disable all drivers
configure.args-append \
@@ -1,53 +0,0 @@
https://github.com/OSGeo/gdal/commit/18f84029c14d080343072b01793169ee19102209.patch
From 4fc310dd6d0a95bedda003613cfa63ded090d5fa Mon Sep 17 00:00:00 2001
From: Mark Mentovai <mark@mentovai.com>
Date: Tue, 26 May 2026 12:02:07 -0400
Subject: [PATCH] CMake: set BUILD_WITH_INSTALL_NAME_DIR for macOS
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
CMake can either build shared libraries with a temporary install_name at
build time, resetting it to the final name at install time
(BUILD_WITH_INSTALL_NAME_DIR=NO, the default), or it can build them with
the final name at build time (BUILD_WITH_INSTALL_NAME_DIR=YES).
GDAL plugins link against libgdal as part of the build process, and if
BUILD_WITH_INSTALL_NAME_DIR=NO, these plugins may be linked using an
incorrect path to libgdal, taken from libgdals install_name. Those
paths are not rewritten at install time, which can make it difficult to
properly use GDAL plugins built in this way. For example, with GDAL
built with a CMAKE_INSTALL_NAME_DIR set (as a downstream build may do),
and PDF built as a plugin, `gdal info` on a PDF may fail with an error
such as:
```
ERROR 1: dlopen(…/lib/gdalplugins/gdal_PDF.dylib, 0x0001): Library not loaded: @rpath/libgdal.39.dylib
Referenced from: <…> …/lib/gdalplugins/gdal_PDF.dylib
Reason: no LC_RPATH's found
```
Setting BUILD_WITH_INSTALL_NAME_DIR=YES overcomes this problem. This
change should be noncontroversial, as the default GDAL build, without a
CMAKE_INSTALL_NAME_DIR set, will use @rpath as the install_name_dir in
both the build and installed trees, regardless of the setting of
BUILD_WITH_INSTALL_NAME_DIR.
---
gdal.cmake | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git gdal.cmake gdal.cmake
index b629bdb1ab1c..63295bcd78c6 100644
--- gdal.cmake
+++ gdal.cmake
@@ -234,7 +234,8 @@ set_target_properties(
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
CXX_STANDARD 11
- CXX_STANDARD_REQUIRED YES)
+ CXX_STANDARD_REQUIRED YES
+ BUILD_WITH_INSTALL_NAME_DIR YES)
set_property(TARGET ${GDAL_LIB_TARGET_NAME} PROPERTY PLUGIN_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/gdalplugins")
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/gdalplugins")
+46
View File
@@ -0,0 +1,46 @@
https://github.com/OSGeo/gdal/commit/9f1da7a2546e4df2cd63b99c7fefc7f2e607260a
From 32493387de801ff143acad7572591d88ead4326a Mon Sep 17 00:00:00 2001
From: Nicklas Larsson <n_larsson@yahoo.com>
Date: Mon, 8 Jun 2026 09:36:13 +0200
Subject: [PATCH] GTiff: Avoid value-initialization of vector of forward
declared class
Addresses "invalid application of 'sizeof' to an incomplete type 'GTiffJPEGOverviewDS'" compiler
error on macOS 12 and earlier (with AppleClang 13 and earlier).
---
frmts/gtiff/gtiffdataset.cpp | 5 ++++-
frmts/gtiff/gtiffdataset.h | 4 ++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/frmts/gtiff/gtiffdataset.cpp b/frmts/gtiff/gtiffdataset.cpp
index fc2fc114b868..c25d26bd145b 100644
--- frmts/gtiff/gtiffdataset.cpp
+++ frmts/gtiff/gtiffdataset.cpp
@@ -70,7 +70,10 @@ const GTIFFTag *GTiffDataset::GetTIFFTags()
/************************************************************************/
GTiffDataset::GTiffDataset()
- : m_bStreamingIn(false), m_bStreamingOut(false), m_bScanDeferred(true),
+ : m_apoJPEGOverviewDS(std::vector<std::unique_ptr<GTiffJPEGOverviewDS>>{}),
+ m_apoJPEGOverviewDSOld(
+ std::vector<std::unique_ptr<GTiffJPEGOverviewDS>>{}),
+ m_bStreamingIn(false), m_bStreamingOut(false), m_bScanDeferred(true),
m_bSingleIFDOpened(false), m_bLoadedBlockDirty(false),
m_bWriteError(false), m_bLookedForProjection(false),
m_bLookedForMDAreaOrPoint(false), m_bGeoTransformValid(false),
diff --git a/frmts/gtiff/gtiffdataset.h b/frmts/gtiff/gtiffdataset.h
index 58dc03c1a501..817cbb003797 100644
--- frmts/gtiff/gtiffdataset.h
+++ frmts/gtiff/gtiffdataset.h
@@ -133,8 +133,8 @@ class GTiffDataset final : public GDALPamDataset
GTiffDataset *m_poBaseDS = nullptr;
// Used with MASK_OVERVIEW_DATASET open option
std::unique_ptr<GDALDataset> m_poMaskExtOvrDS{};
- std::vector<std::unique_ptr<GTiffJPEGOverviewDS>> m_apoJPEGOverviewDS{};
- std::vector<std::unique_ptr<GTiffJPEGOverviewDS>> m_apoJPEGOverviewDSOld{};
+ std::vector<std::unique_ptr<GTiffJPEGOverviewDS>> m_apoJPEGOverviewDS;
+ std::vector<std::unique_ptr<GTiffJPEGOverviewDS>> m_apoJPEGOverviewDSOld;
std::vector<gdal::GCP> m_aoGCPs{};
std::unique_ptr<GDALColorTable> m_poColorTable{};
char **m_papszMetadataFiles = nullptr;
+4 -4
View File
@@ -6,7 +6,7 @@ PortGroup select 1.0
name py-gdal
# keep version in sync with gdal; rebuilt after gdal update
version 3.13.0
version 3.13.1
revision 0
categories-append gis
@@ -19,9 +19,9 @@ long_description This Python package and extensions are a number of tools for
homepage https://www.gdal.org
checksums rmd160 aac72ef3131c62464e4f24d063d05944da74b667 \
sha256 b440bcecbcdb96690a74da223142f2d51c6a540ee78674e10f9dca933d0e9006 \
size 940507
checksums rmd160 3480d6ecd9b7688ec456925e05b65951cbbc11c4 \
sha256 94bb64d729ce73ceb75a314a15cba92696cdd854d99b6bf6b88a7b551227db74 \
size 940649
python.versions 310 311 312 313 314