From 62d645aea5297ce81abf17bc057759d1630b7f21 Mon Sep 17 00:00:00 2001 From: William Kearney Date: Tue, 2 Dec 2025 13:22:43 +0100 Subject: [PATCH 1/7] Install GDAL and PROJ explicitly on macos Why do we not need to do this on Windows? setup-r-dependencies says it can install system packages on Linux, but not Windows or macos. --- .github/workflows/ci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index febbc7b..08b980e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,6 +16,9 @@ jobs: uses: actions/checkout@v4 with: submodules: true + - name: Install dependencies on macos + if: matrix.os == 'macos-latest' + run: brew install gdal proj - name: Set up R uses: r-lib/actions/setup-r@v2 with: From a5c142f4025dfbc957185485729ffd949f069245 Mon Sep 17 00:00:00 2001 From: William Kearney Date: Tue, 2 Dec 2025 13:57:34 +0100 Subject: [PATCH 2/7] Echo $PROJ_DATA environment variable to see if this is set properly --- .github/workflows/ci.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 08b980e..a9216cf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,6 +19,10 @@ jobs: - name: Install dependencies on macos if: matrix.os == 'macos-latest' run: brew install gdal proj + - name: Check PROJ_DATA + if: matrix.os == 'macos-latest' + run: | + echo $PROJ_DATA - name: Set up R uses: r-lib/actions/setup-r@v2 with: From 49c94da766e3d16f6a1013240726329ee6699e9d Mon Sep 17 00:00:00 2001 From: William Kearney Date: Tue, 2 Dec 2025 14:06:59 +0100 Subject: [PATCH 3/7] Try setting PROJ_LIB using brew --prefix --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a9216cf..d2a3cb2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,10 +19,10 @@ jobs: - name: Install dependencies on macos if: matrix.os == 'macos-latest' run: brew install gdal proj - - name: Check PROJ_DATA + - name: Set PROJ_LIB if: matrix.os == 'macos-latest' run: | - echo $PROJ_DATA + echo "PROJ_LIB=$(brew --prefix)/lib" >> "$GITHUB_ENV" - name: Set up R uses: r-lib/actions/setup-r@v2 with: From a8d5cbc800cf67f180f830ca9982de5447329cea Mon Sep 17 00:00:00 2001 From: William Kearney Date: Wed, 3 Dec 2025 09:27:13 +0100 Subject: [PATCH 4/7] Specify the PROJ data directory correctly --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d2a3cb2..77fc8e7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,7 +22,7 @@ jobs: - name: Set PROJ_LIB if: matrix.os == 'macos-latest' run: | - echo "PROJ_LIB=$(brew --prefix)/lib" >> "$GITHUB_ENV" + echo "PROJ_LIB=$(brew --prefix proj)/share/proj" >> "$GITHUB_ENV" - name: Set up R uses: r-lib/actions/setup-r@v2 with: From 651e9c96a2379a1b42d147634acfa6feaa5571cd Mon Sep 17 00:00:00 2001 From: William Kearney Date: Wed, 3 Dec 2025 09:37:12 +0100 Subject: [PATCH 5/7] Remove the PROJ_LIB setting Just for a test --- .github/workflows/ci.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 77fc8e7..08b980e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,10 +19,6 @@ jobs: - name: Install dependencies on macos if: matrix.os == 'macos-latest' run: brew install gdal proj - - name: Set PROJ_LIB - if: matrix.os == 'macos-latest' - run: | - echo "PROJ_LIB=$(brew --prefix proj)/share/proj" >> "$GITHUB_ENV" - name: Set up R uses: r-lib/actions/setup-r@v2 with: From b828b99cd929637254e32fe89d705a7933e88663 Mon Sep 17 00:00:00 2001 From: William Kearney Date: Wed, 3 Dec 2025 09:45:39 +0100 Subject: [PATCH 6/7] Replace the PROJ_LIB setting I guess we do need this --- .github/workflows/ci.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 08b980e..77fc8e7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,6 +19,10 @@ jobs: - name: Install dependencies on macos if: matrix.os == 'macos-latest' run: brew install gdal proj + - name: Set PROJ_LIB + if: matrix.os == 'macos-latest' + run: | + echo "PROJ_LIB=$(brew --prefix proj)/share/proj" >> "$GITHUB_ENV" - name: Set up R uses: r-lib/actions/setup-r@v2 with: From 65a27173e257f9315488fa2ab1a2c933617e19df Mon Sep 17 00:00:00 2001 From: William Kearney Date: Wed, 3 Dec 2025 09:58:35 +0100 Subject: [PATCH 7/7] Rename PROJ_LIB to PROJ_DATA PROJ_LIB is deprecated in PROJ and has been replaced with PROJ_DATA. https://proj.org/en/stable/usage/environmentvars.html --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 77fc8e7..7971de7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,10 +19,10 @@ jobs: - name: Install dependencies on macos if: matrix.os == 'macos-latest' run: brew install gdal proj - - name: Set PROJ_LIB + - name: Set PROJ_DATA if: matrix.os == 'macos-latest' run: | - echo "PROJ_LIB=$(brew --prefix proj)/share/proj" >> "$GITHUB_ENV" + echo "PROJ_DATA=$(brew --prefix proj)/share/proj" >> "$GITHUB_ENV" - name: Set up R uses: r-lib/actions/setup-r@v2 with: