Skip to content

Commit

Permalink
update GDAL to 3.10.0 (#183)
Browse files Browse the repository at this point in the history
* upgrade GDAL to 3.10.0

* upgrade Node.js platforms

* conform to the new stricter afterEach signature

* update the changelog

* gti is a separate driver now

* fix mitab

* fix internal shape

* gmutils

* files moved to root ogr

* add the new files

* test leaving the C++ standard to node-gyp

* try the magic MSVC option

* fix the not so orthodox code

* try C++17 only for PROJ

* reference directly in the target

* add a compilertool section

* remove the verbose build

* switch to macos-13
  • Loading branch information
mmomtchev authored Dec 1, 2024
1 parent b8a929b commit 5627b75
Show file tree
Hide file tree
Showing 2,302 changed files with 62,622 additions and 63,361 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

strategy:
matrix:
node-version: [ 16, 18, 20, 22 ]
node-version: [ 18, 20, 22, 23 ]

steps:
- uses: actions/checkout@v4
Expand All @@ -29,8 +29,8 @@ jobs:

strategy:
matrix:
node-version: [ 16.x, 18.x, 20.x, 22.x ]
platforms: [ windows-2019, macos-12 ]
node-version: [ 18.x, 20.x, 22.x, 23.x ]
platforms: [ windows-2019, macos-13 ]

steps:
- uses: actions/checkout@v4
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/test-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
linux-version:
- ubuntu:20.04
Expand Down Expand Up @@ -91,6 +92,7 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
linux-version: [ 'amazonlinux:2022', 'ubuntu:24.04' ]

Expand All @@ -115,8 +117,9 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
node-version: [ 16, 18, 20, 22 ]
node-version: [ 18, 20, 22, 23 ]
gdal-version: [ 'shared', 'bundled' ]

steps:
Expand Down Expand Up @@ -150,18 +153,19 @@ jobs:
with:
max-size: 1000M
key: asan
- run: npm run container asan ubuntu:20.04 16 bundled
- run: npm run container asan ubuntu:20.04 18 bundled
env:
MOCHA_TEST_NETWORK: ${{ github.event.inputs.testNetwork }}


test_mac:

runs-on: macos-12
runs-on: macos-13

strategy:
fail-fast: false
matrix:
node-version: [ 16.x, 18.x, 20.x, 22.x ]
node-version: [ 18.x, 20.x, 22.x, 23.x ]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -194,7 +198,7 @@ jobs:

test_mac_debug:

runs-on: macos-12
runs-on: macos-13

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -230,8 +234,9 @@ jobs:
runs-on: windows-2019

strategy:
fail-fast: false
matrix:
node-version: [ 16.x, 18.x, 20.x, 22.x ]
node-version: [ 18.x, 20.x, 22.x, 23.x ]

steps:
- uses: actions/checkout@v4
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/test-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
strategy:
fail-fast: false
matrix:
platforms: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2019, macos-12 ]
node-version: [ 16.x, 18.x, 20.x, 22.x ]
platforms: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2019, macos-13 ]
node-version: [ 18.x, 20.x, 22.x, 23.x ]
exclude:
- platforms: ubuntu-24.04
node-version: 16.x
- platforms: ubuntu-20.04
node-version: 23.x

steps:
- name: Use Node.js ${{ matrix.node-version }}
Expand Down Expand Up @@ -53,11 +53,11 @@ jobs:
strategy:
fail-fast: false
matrix:
platforms: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2019, macos-12 ]
node-version: [ 16.x, 18.x, 20.x, 22.x ]
platforms: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2019, macos-13 ]
node-version: [ 18.x, 20.x, 22.x, 23.x ]
exclude:
- platforms: ubuntu-24.04
node-version: 16.x
- platforms: ubuntu-20.04
node-version: 23.x

steps:
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
- amazonlinux:2022
node-version: [ 18, 20, 22 ]
include:
- linux-version: ubuntu:22.04
node-version: 16
- linux-version: ubuntu:24.04
node-version: 23
- linux-version: fedora:36
node-version: 18
- linux-version: fedora:37
Expand All @@ -50,8 +50,8 @@ jobs:

strategy:
matrix:
platforms: [ windows-2019, macos-12 ]
node-version: [ 16.x, 18.x, 20.x, 22.x ]
platforms: [ windows-2019, macos-13 ]
node-version: [ 18.x, 20.x, 22.x, 23.x ]

steps:
- uses: actions/checkout@v4
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

# [3.10.0] 2024

### Added
- GDAL 3.10.0
- Node.js 23 support

### Removed
- Drop Node.js 16 support
- Drop macOS 12 support

## [3.9.2] 2024-08-18

### Added
Expand Down
18 changes: 5 additions & 13 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
"default_configuration": "Release",
"cflags_cc!": ["-fno-rtti", "-fno-exceptions"],
"cflags!": ["-fno-rtti", "-fno-exceptions"],
# node-gyp sets the standard for us and ensures that its include file comes last
# this is the only reliable way to override it
'cflags_cc/': [ ['exclude', '^-std=(?!gnu\+\+17)'] ],
'cflags_cc':[ '-std=gnu++17' ],
"variables": {
"debug_extra_ccflags_cc%": [],
"debug_extra_ldflags%" : [],
Expand All @@ -31,29 +27,25 @@
"-Wno-unused-const-variable"
],
"OTHER_CPLUSPLUSFLAGS": [
"-std=gnu++17",
"-Wno-deprecated-register",
"-Wno-unused-const-variable",
"-frtti",
"-fexceptions"
],
'OTHER_CPLUSPLUSFLAGS/': [ ['exclude', '^-std=(?!gnu\+\+17)'] ],
},
"msvs_settings": {
"VCCLCompilerTool": {
#"Optimization": 0, # 0:/Od disable, 1:/O1 min size, 2:/O2 max speed, 3:/Ox full optimization
#"InlineFunctionExpansion": 0, #0:/Ob0: disable, 1:/Ob1 inline only marked funtions, 2:/Ob2 inline anything eligible
"AdditionalOptions": [
"/std:c++17",
"/MP", # compile across multiple CPUs
"/GR", # force RTTI
"/EHsc", # same for ExceptionHandling
"/permissive" # for the new MSVC in Github Actions, mostly related to const char to char conversions
"/MP", # compile across multiple CPUs
"/GR", # force RTTI
"/EHsc", # same for ExceptionHandling
"/permissive-" # for the new MSVC in Github Actions, mostly related to const char to char conversions
],
# see https://github.com/nodejs/node-gyp/issues/2412
"AdditionalOptions/": [
['exclude', '^/GR-$' ],
['exclude', '^[/-]std:(?!c\+\+17)']
['exclude', '^/GR-$' ]
],
"ExceptionHandling": 1,
"RuntimeTypeInfo": "true"
Expand Down
22 changes: 22 additions & 0 deletions cpp_17.gypi
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
# node-gyp sets the standard for us and ensures that its include file comes last
# this is the only reliable way to override it
'cflags_cc/': [ ['exclude', '^-std=(?!gnu\+\+17)'] ],
'cflags_cc':[ '-std=gnu++17' ],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [
'-std=gnu++17'
],
'OTHER_CPLUSPLUSFLAGS/': [ ['exclude', '^-std=(?!gnu\+\+17)'] ],
},
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': [
'/std:c++17'
],
'AdditionalOptions/': [
['exclude', '^[/\-]std:(?!c\+\+17)']
]
}
}
}
10 changes: 5 additions & 5 deletions deps/libgdal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -eu
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR/libgdal"

GDAL_VERSION=3.9.2
GDAL_VERSION=3.10.0
GDAL_VERSION_SUFFIX=
dir_gdal=./gdal
dir_formats_gyp=./gyp-formats
Expand All @@ -27,8 +27,8 @@ mv $dir_gdal/gcore/gdal_version.h.in $dir_gdal/gcore/gdal_version.h
#

for PATCH in patches/*.diff; do
echo "Applying ${PATCH}"
patch -p1 < $PATCH
echo "Applying ${PATCH}"
patch -p1 < $PATCH
done

#
Expand All @@ -42,14 +42,14 @@ GDAL_FORMATS="gtiff hfa aigrid aaigrid ceos ceos2 iso8211 xpm
coasp tsx terragen blx til r northwood saga xyz hf2
kmlsuperoverlay ctg zmap ngsgeoid iris map
jpeg openjpeg png mbtiles wms wmts hdf5 grib netcdf wcs
zlib
zlib gti
${OPT_GDAL_FORMATS:-}"

OGR_FORMATS="shape vrt avc geojson mem mitab kml gpx
dxf csv edigeo geoconcept georss gml gmt gpsbabel
idrisi dgn openfilegdb pds pgdump s57 sdts
svg sxf ntf wasp sqlite gpkg mvt osm flatgeobuf carto
jsonfg pmtiles"
jsonfg pmtiles"

mkdir -p $dir_formats_gyp

Expand Down
5 changes: 5 additions & 0 deletions deps/libgdal/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
"GDAL_COMPILATION=1",
"PAM_ENABLED=1",
"OGR_ENABLED=1",
"HAVE_DECL_NAN=1",
"HAVE_DECL_ISNAN=1",
"HAVE_DECL_INFINITY=1",
"HAVE_DECL_ISINF=1",
"HAVE_EXPAT=1",
"HAVE_LIBPROJ=1",
"HAVE_GEOS=1",
Expand All @@ -48,6 +52,7 @@
"HAVE_LIBZ=1",
"JPEG_SUPPORT=1",
"RENAME_INTERNAL_SHAPELIB_SYMBOLS=1",
"GDAL_USE_SHAPELIB_INTERNAL=1",
"flatbuffers=gdal_flatbuffers"
],
"dependencies": [
Expand Down
48 changes: 32 additions & 16 deletions deps/libgdal/gdal/.flake8
Original file line number Diff line number Diff line change
@@ -1,21 +1,37 @@
[flake8]
max_line_length = 88
ignore =
C408 # Unnecessary dict/list/tuple call - rewrite as a literal
E203 # whitespace before ':' - doesn't work well with black
E225 # missing whitespace around operator - let black worry about that
E262 # inline comment should start with '# '
E265 # block comment should start with '# '
E266 # too many leading '#' for block comment
E302 # expected 2 blank lines, found 1
E402 # module level import not at top of file
E501 # line too long - let black handle that
E711 # comparison to None should be
E712 # comparison to False/True should be
E741 # ambiguous variable name
F405 # may be undefined, or defined from star imports
W291 # trailing
W503 # line break occurred before a binary operator - let black worry about that
W504 # line break occurred adter a binary operator - let black worry about that
# Unnecessary dict/list/tuple call - rewrite as a literal
C408
# whitespace before ':' - doesn't work well with black
E203
# missing whitespace around operator - let black worry about that
E225
# inline comment should start with '# '
E262
# block comment should start with '# '
E265
# too many leading '#' for block comment
E266
# expected 2 blank lines, found 1
E302
# module level import not at top of file
E402
# line too long - let black handle that
E501
# comparison to None should be
E711
# comparison to False/True should be
E712
# ambiguous variable name
E741
# may be undefined, or defined from star imports
F405
# trailing
W291
# line break occurred before a binary operator - let black worry about that
W503
# line break occurred adter a binary operator - let black worry about that
W504
per-file-ignores =
.cmake-format.py:F821
10 changes: 7 additions & 3 deletions deps/libgdal/gdal/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
autotest/ogr/data/
)
- repo: https://github.com/pycqa/flake8
rev: 3.9.2
rev: 7.0.0
hooks:
- id: flake8
exclude: >
Expand All @@ -36,7 +36,8 @@ repos:
autotest/cpp/data/|
autotest/gdrivers/data/|
swig/|
third_party/|
third_party/fast_float/|
third_party/LercLib/|
autotest/ogr/data/|
alg/internal_libqhull/|
apps/argparse/|
Expand All @@ -57,5 +58,8 @@ repos:
ogr/ogrsf_frmts/geojson/libjson/|
ogr/ogrsf_frmts/flatgeobuf/flatbuffers/|
ogr/ogrsf_frmts/pmtiles/pmtiles/|
ogr/ogrsf_frmts/sqlite/sqlite_rtree_bulk_load
ogr/ogrsf_frmts/ods/ods_formula_parser.cpp|
ogr/ogrsf_frmts/sqlite/sqlite_rtree_bulk_load|
ogr/swq_parser.cpp|
ogr/swq_parser.hpp
)
Loading

0 comments on commit 5627b75

Please sign in to comment.