gnu: libgeotiff: Fix build with proj 9.3.1.

* gnu/packages/geo.scm (libgeotiff): [source]: Add patches to fix build
  with proj 9.3.1.
* gnu/local.mk: Add patch files.
* gnu/packages/patches/libgeotiff-fix-tests-on-i386.patch: New file.
* gnu/packages/patches/libgeotiff-fix-tests-with-proj-9.3.0.patch: New
  file.
* gnu/packages/patches/libgeotiff-fix-tests-with-proj-9.3.1.patch: New
  file.

Change-Id: I5f09e793698b0b137888faa0f595ef06850c6160
Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
This commit is contained in:
Felix Gruber 2024-02-04 16:47:13 +00:00 committed by Guillaume Le Vaillant
parent e25fa3f6da
commit a042bfcd7e
No known key found for this signature in database
GPG key ID: 6BE8208ADF21FE3F
5 changed files with 134 additions and 1 deletions

View file

@ -1507,6 +1507,9 @@ dist_patch_DATA = \
%D%/packages/patches/julia-Use-MPFR-4.2.patch \
%D%/packages/patches/libftdi-fix-paths-when-FTDIPP-set.patch \
%D%/packages/patches/libgeotiff-fix-tests-with-proj-9.1.1.patch \
%D%/packages/patches/libgeotiff-fix-tests-with-proj-9.3.0.patch \
%D%/packages/patches/libgeotiff-fix-tests-with-proj-9.3.1.patch \
%D%/packages/patches/libgeotiff-fix-tests-on-i386.patch \
%D%/packages/patches/libobjc2-unbundle-robin-map.patch \
%D%/packages/patches/librime-fix-build-with-gcc10.patch \
%D%/packages/patches/libvirt-add-install-prefix.patch \

View file

@ -548,7 +548,11 @@ (define-public libgeotiff
(method url-fetch)
(uri (string-append "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-"
version ".tar.gz"))
(patches (search-patches "libgeotiff-fix-tests-with-proj-9.1.1.patch"))
(patches
(search-patches "libgeotiff-fix-tests-with-proj-9.1.1.patch"
"libgeotiff-fix-tests-with-proj-9.3.0.patch"
"libgeotiff-fix-tests-with-proj-9.3.1.patch"
"libgeotiff-fix-tests-on-i386.patch"))
(sha256
(base32 "1mjmgv48x51ppax5dnb6lq7z600czxll53bx6jbzqwd4m93i7aq5"))
(modules '((guix build utils)))

View file

@ -0,0 +1,35 @@
From 9990160268fafb71751d4f3a9ad724df70cb9451 Mon Sep 17 00:00:00 2001
From: Bas Couwenberg <sebastic@xs4all.nl>
Date: Fri, 1 Dec 2023 10:35:46 +0100
Subject: [PATCH] Fix test failure on i386.
---
https://github.com/OSGeo/libgeotiff/pull/107
test/testlistgeo | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/test/testlistgeo b/test/testlistgeo
index 48e92eb..ceec2e6 100755
--- a/test/testlistgeo
+++ b/test/testlistgeo
@@ -218,6 +218,9 @@ echo "" >>${OUT}
sed "s/ETRS89-extended/ETRS89/g" < ${OUT} > ${OUT}.tmp
mv ${OUT}.tmp ${OUT}
+sed "s/ProjCenterLongGeoKey: 46.437229 ( 46d26'14.02\"E)/ProjCenterLongGeoKey: 46.437229 ( 46d26'14.03\"E)/" < ${OUT} > ${OUT}.tmp
+mv ${OUT}.tmp ${OUT}
+
sed "s/ETRS89-extended/ETRS89/g" < ${TEST_CLI_DIR}/testlistgeo_out.dist > testlistgeo_out.dist.normalized
sed "s/GCS: 4053\/Unspecified datum based upon the International 1924 Authalic Sphere/GCS: 10346\/NSIDC Authalic Sphere/g" < ${OUT} > ${OUT}.tmp
@@ -230,6 +233,9 @@ mv testlistgeo_out.dist.normalized.tmp testlistgeo_out.dist.normalized
sed "s/Datum: 6053\/Not specified (based on International 1924 Authalic Sphere)/Datum: 1360\/NSIDC International 1924 Authalic Sphere/g" < testlistgeo_out.dist.normalized > testlistgeo_out.dist.normalized.tmp
mv testlistgeo_out.dist.normalized.tmp testlistgeo_out.dist.normalized
+sed "s/ProjCenterLongGeoKey: 46.437229 ( 46d26'14.02\"E)/ProjCenterLongGeoKey: 46.437229 ( 46d26'14.03\"E)/" < testlistgeo_out.dist.normalized > testlistgeo_out.dist.normalized.tmp
+mv testlistgeo_out.dist.normalized.tmp testlistgeo_out.dist.normalized
+
# do 'diff' with distribution results
# after cleaning for avoid spurios result due
# to different build dir

View file

@ -0,0 +1,51 @@
From 3806fdab4a17f44641a2113faec778e756e2be3d Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Tue, 29 Aug 2023 19:04:25 +0200
Subject: [PATCH] Fix 'make check' to pass with PROJ 9.3 (fixes #89)
---
https://github.com/OSGeo/libgeotiff/pull/90
test/testlistgeo | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/test/testlistgeo b/test/testlistgeo
index 9a41e74..48e92eb 100755
--- a/test/testlistgeo
+++ b/test/testlistgeo
@@ -218,14 +218,24 @@ echo "" >>${OUT}
sed "s/ETRS89-extended/ETRS89/g" < ${OUT} > ${OUT}.tmp
mv ${OUT}.tmp ${OUT}
-sed "s/ETRS89-extended/ETRS89/g" < ${TEST_CLI_DIR}/testlistgeo_out.dist > testlistgeo_out.dist.tmp
+sed "s/ETRS89-extended/ETRS89/g" < ${TEST_CLI_DIR}/testlistgeo_out.dist > testlistgeo_out.dist.normalized
+
+sed "s/GCS: 4053\/Unspecified datum based upon the International 1924 Authalic Sphere/GCS: 10346\/NSIDC Authalic Sphere/g" < ${OUT} > ${OUT}.tmp
+mv ${OUT}.tmp ${OUT}
+sed "s/Datum: 6053\/Not specified (based on International 1924 Authalic Sphere)/Datum: 1360\/NSIDC International 1924 Authalic Sphere/g" < ${OUT} > ${OUT}.tmp
+mv ${OUT}.tmp ${OUT}
+
+sed "s/GCS: 4053\/Unspecified datum based upon the International 1924 Authalic Sphere/GCS: 10346\/NSIDC Authalic Sphere/g" < testlistgeo_out.dist.normalized > testlistgeo_out.dist.normalized.tmp
+mv testlistgeo_out.dist.normalized.tmp testlistgeo_out.dist.normalized
+sed "s/Datum: 6053\/Not specified (based on International 1924 Authalic Sphere)/Datum: 1360\/NSIDC International 1924 Authalic Sphere/g" < testlistgeo_out.dist.normalized > testlistgeo_out.dist.normalized.tmp
+mv testlistgeo_out.dist.normalized.tmp testlistgeo_out.dist.normalized
# do 'diff' with distribution results
# after cleaning for avoid spurios result due
# to different build dir
sed -e "s/Testing listgeo .*test/Testing listgeo ..\/test/" -i ${OUT}
echo "diff ${OUT} with testlistgeo_out.dist"
-diff -u ${OUT} testlistgeo_out.dist.tmp
+diff -u ${OUT} testlistgeo_out.dist.normalized
if [ $? -ne 0 ] ; then
echo ""
echo "PROBLEMS HAVE OCCURRED"
@@ -236,7 +246,7 @@ else
echo "TEST OK"
echo "test file ${OUT} removed"
echo
- rm testlistgeo_out.dist.tmp
+ rm testlistgeo_out.dist.normalized
/bin/rm -f ${OUT}
exit 0
fi

View file

@ -0,0 +1,40 @@
From 4f90e57fa1cac7afdd57e5f649775cb24aa15612 Mon Sep 17 00:00:00 2001
From: Bas Couwenberg <sebastic@xs4all.nl>
Date: Fri, 1 Dec 2023 08:23:20 +0100
Subject: [PATCH] Fix test failure with PROJ 9.3.1.
Closes: #104
---
https://github.com/OSGeo/libgeotiff/pull/105
test/testlistgeo | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/test/testlistgeo b/test/testlistgeo
index 48e92eb..4331cc3 100755
--- a/test/testlistgeo
+++ b/test/testlistgeo
@@ -218,6 +218,11 @@ echo "" >>${OUT}
sed "s/ETRS89-extended/ETRS89/g" < ${OUT} > ${OUT}.tmp
mv ${OUT}.tmp ${OUT}
+sed "s/Projection = 15914 (BLM zone 14N (US survey .*))/Projection = 15914 (BLM zone 14N)/g" < ${OUT} > ${OUT}.tmp
+mv ${OUT}.tmp ${OUT}
+sed "s/Projection = 6753 (Oregon Columbia River West zone (.*))/Projection = 6753 (Oregon Columbia River West zone)/" < ${OUT} > ${OUT}.tmp
+mv ${OUT}.tmp ${OUT}
+
sed "s/ETRS89-extended/ETRS89/g" < ${TEST_CLI_DIR}/testlistgeo_out.dist > testlistgeo_out.dist.normalized
sed "s/GCS: 4053\/Unspecified datum based upon the International 1924 Authalic Sphere/GCS: 10346\/NSIDC Authalic Sphere/g" < ${OUT} > ${OUT}.tmp
@@ -230,6 +235,11 @@ mv testlistgeo_out.dist.normalized.tmp testlistgeo_out.dist.normalized
sed "s/Datum: 6053\/Not specified (based on International 1924 Authalic Sphere)/Datum: 1360\/NSIDC International 1924 Authalic Sphere/g" < testlistgeo_out.dist.normalized > testlistgeo_out.dist.normalized.tmp
mv testlistgeo_out.dist.normalized.tmp testlistgeo_out.dist.normalized
+sed "s/Projection = 15914 (BLM zone 14N (US survey .*))/Projection = 15914 (BLM zone 14N)/" < testlistgeo_out.dist.normalized > testlistgeo_out.dist.normalized.tmp
+mv testlistgeo_out.dist.normalized.tmp testlistgeo_out.dist.normalized
+sed "s/Projection = 6753 (Oregon Columbia River West zone (.*))/Projection = 6753 (Oregon Columbia River West zone)/" < testlistgeo_out.dist.normalized > testlistgeo_out.dist.normalized.tmp
+mv testlistgeo_out.dist.normalized.tmp testlistgeo_out.dist.normalized
+
# do 'diff' with distribution results
# after cleaning for avoid spurios result due
# to different build dir