From patchwork Sat Dec 17 11:42:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Gruber X-Patchwork-Id: 45398 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E082E27BBEB; Sat, 17 Dec 2022 11:44:44 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B869C27BBE9 for ; Sat, 17 Dec 2022 11:44:42 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6Vc3-00022r-Pd; Sat, 17 Dec 2022 06:44:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6Vbz-00020L-1v for guix-patches@gnu.org; Sat, 17 Dec 2022 06:44:15 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6Vbn-00086z-17 for guix-patches@gnu.org; Sat, 17 Dec 2022 06:44:14 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p6Vbm-0003Pn-TQ for guix-patches@gnu.org; Sat, 17 Dec 2022 06:44:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60156] [PATCH 2/4] gnu: libgeotiff: Apply patch for building against proj 9.1.1. Resent-From: Felix Gruber Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Dec 2022 11:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60156 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60156@debbugs.gnu.org Cc: Felix Gruber Received: via spool by 60156-submit@debbugs.gnu.org id=B60156.167127742013076 (code B ref 60156); Sat, 17 Dec 2022 11:44:02 +0000 Received: (at 60156) by debbugs.gnu.org; 17 Dec 2022 11:43:40 +0000 Received: from localhost ([127.0.0.1]:55428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6VbP-0003Oq-JL for submit@debbugs.gnu.org; Sat, 17 Dec 2022 06:43:40 -0500 Received: from mout01.posteo.de ([185.67.36.65]:37597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6VbN-0003Oi-Iw for 60156@debbugs.gnu.org; Sat, 17 Dec 2022 06:43:38 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 8B244240026 for <60156@debbugs.gnu.org>; Sat, 17 Dec 2022 12:43:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1671277411; bh=V48R+vS8x9PW6MW+kRwcY4s4UiMSawf7sK3Q51ggPus=; h=From:To:Cc:Subject:Date:From; b=kIrjFeVtt22LyxqDeB8iu69U98+Vx5HGTYhRr3sp/6X1g63SAPp5yyA6fwfeWOz40 rUpTWokgdMy3/7lgIMg6WAaLYU5oxOleCJ9MaMZ671b3gUt95fSA3L5kmNMNX8OGly rqAobNlCWvdn5y0wRQTIjWo4X/PnhzlKOuQqnDcahCy5eLaKRRW3WYf9mRT4ye38Qi q7BF7w9WXvlcbm+PCxBIOLQsrQl/7ARidSuJC0hzWaoKmAwuRGdyJw12fj3lWib8sc JPZm4oAZQg72ICE/PXw+K/m6REQBa6oTw88rFnh/5OuFCYzZYHZYkCiFZ2EljWymIi lU032NJxA9bQw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NZ3yB701Zz9rxB; Sat, 17 Dec 2022 12:43:29 +0100 (CET) From: Felix Gruber Date: Sat, 17 Dec 2022 11:42:56 +0000 Message-Id: <20221217114258.5216-2-felgru@posteo.net> In-Reply-To: <20221217114046.5143-1-felgru@posteo.net> References: <20221217114046.5143-1-felgru@posteo.net> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/libgeotiff-fix-tests-with-proj-9.1.1.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/geo.scm (libgeotiff): Apply it. --- gnu/local.mk | 1 + gnu/packages/geo.scm | 1 + ...libgeotiff-fix-tests-with-proj-9.1.1.patch | 100 ++++++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 gnu/packages/patches/libgeotiff-fix-tests-with-proj-9.1.1.patch diff --git a/gnu/local.mk b/gnu/local.mk index 5b8944f568..e1f280250a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1380,6 +1380,7 @@ dist_patch_DATA = \ %D%/packages/patches/julia-tracker-16-compat.patch \ %D%/packages/patches/libffi-3.3-powerpc-fixes.patch \ %D%/packages/patches/libffi-float128-powerpc64le.patch \ + %D%/packages/patches/libgeotiff-fix-tests-with-proj-9.1.1.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 \ diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index da8dfbb980..2f2fd6a1f1 100644 --- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -338,6 +338,7 @@ (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")) (sha256 (base32 "1mjmgv48x51ppax5dnb6lq7z600czxll53bx6jbzqwd4m93i7aq5")) (modules '((guix build utils))) diff --git a/gnu/packages/patches/libgeotiff-fix-tests-with-proj-9.1.1.patch b/gnu/packages/patches/libgeotiff-fix-tests-with-proj-9.1.1.patch new file mode 100644 index 0000000000..b4bf292c1e --- /dev/null +++ b/gnu/packages/patches/libgeotiff-fix-tests-with-proj-9.1.1.patch @@ -0,0 +1,100 @@ +From: Even Rouault +Date: Sat, 26 Nov 2022 13:23:12 +0100 +Subject: Fix test failures with PROJ 9.1.1 + +https://github.com/OSGeo/libgeotiff/pull/82 +--- + bin/listgeo.c | 7 ++++++- + test/testlistgeo | 4 ++-- + test/testlistgeo_out.dist | 14 -------------- + 3 files changed, 8 insertions(+), 17 deletions(-) + +diff --git a/bin/listgeo.c b/bin/listgeo.c +index 06c45f70..acad54c6 100644 +--- a/bin/listgeo.c ++++ b/bin/listgeo.c +@@ -29,6 +29,7 @@ void Usage() + " -tfw: Generate a .tfw (ESRI TIFF World) file for the target file.\n" + " -proj4: Report PROJ.4 equivalent projection definition.\n" + " -no_norm: Don't report 'normalized' parameter values.\n" ++ " -no_corners: Don't report corner coordinates.\n" + " filename: Name of the GeoTIFF file to report on.\n" ); + + exit( 1 ); +@@ -42,6 +43,7 @@ int main(int argc, char *argv[]) + int i, norm_print_flag = 1, proj4_print_flag = 0; + int tfw_flag = 0, inv_flag = 0, dec_flag = 0; + int st_test_flag = 0; ++ int corners = 1; + + /* + * Handle command line options. +@@ -50,6 +52,8 @@ int main(int argc, char *argv[]) + { + if( strcmp(argv[i],"-no_norm") == 0 ) + norm_print_flag = 0; ++ else if( strcmp(argv[i],"-no_corners") == 0 ) ++ corners = 0; + else if( strcmp(argv[i],"-tfw") == 0 ) + tfw_flag = 1; + else if( strcmp(argv[i],"-proj4") == 0 ) +@@ -130,7 +134,8 @@ int main(int argc, char *argv[]) + + TIFFGetField( tif, TIFFTAG_IMAGEWIDTH, &xsize ); + TIFFGetField( tif, TIFFTAG_IMAGELENGTH, &ysize ); +- GTIFPrintCorners( gtif, &defn, stdout, xsize, ysize, inv_flag, dec_flag ); ++ if( corners ) ++ GTIFPrintCorners( gtif, &defn, stdout, xsize, ysize, inv_flag, dec_flag ); + } + + } +diff --git a/test/testlistgeo b/test/testlistgeo +index 596301b4..9a41e74f 100755 +--- a/test/testlistgeo ++++ b/test/testlistgeo +@@ -59,11 +59,11 @@ $EXE ${DATA_DIR}/ProjLinearUnitsGeoKey_9036.tif >>${OUT} + echo "" >>${OUT} + + echo "Testing listgeo ProjectedCSTypeGeoKey_28191_cassini_soldner.tif" >> ${OUT} +-$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_28191_cassini_soldner.tif >>${OUT} ++$EXE -no_corners ${DATA_DIR}/ProjectedCSTypeGeoKey_28191_cassini_soldner.tif >>${OUT} + echo "" >>${OUT} + + echo "Testing listgeo cassini_soldner.tif" >> ${OUT} +-$EXE ${DATA_DIR}/cassini_soldner.tif >>${OUT} ++$EXE -no_corners ${DATA_DIR}/cassini_soldner.tif >>${OUT} + echo "" >>${OUT} + + echo "Testing listgeo ProjectedCSTypeGeoKey_27200_new_zealand_mapping_grid.tif" >> ${OUT} +diff --git a/test/testlistgeo_out.dist b/test/testlistgeo_out.dist +index 742f0fce..20221cec 100644 +--- a/test/testlistgeo_out.dist ++++ b/test/testlistgeo_out.dist +@@ -299,13 +299,6 @@ Ellipsoid: 7010/Clarke 1880 (Benoit) (6378300.79,6356566.43) + Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E) + Projection Linear Units: 9001/metre (1.000000m) + +-Corner Coordinates: +-Upper Left ( 440720.000, 3751320.000) ( 40d47'28.08"E, 64d13'29.57"N) +-Lower Left ( 440720.000, 3751260.000) ( 40d47'27.69"E, 64d13'27.64"N) +-Upper Right ( 440780.000, 3751320.000) ( 40d47'32.51"E, 64d13'29.40"N) +-Lower Right ( 440780.000, 3751260.000) ( 40d47'32.12"E, 64d13'27.47"N) +-Center ( 440750.000, 3751290.000) ( 40d47'30.10"E, 64d13'28.52"N) +- + Testing listgeo cassini_soldner.tif + Geotiff_Information: + Version: 1 +@@ -348,13 +341,6 @@ Projection Method: CT_CassiniSoldner + ProjFalseNorthingGeoKey: 126867.909000 m + Projection Linear Units: 9001/metre (1.000000m) + +-Corner Coordinates: +-Upper Left ( 440720.000, 3751320.000) ( 40d47'28.08"E, 64d13'29.57"N) +-Lower Left ( 440720.000, 3751260.000) ( 40d47'27.69"E, 64d13'27.64"N) +-Upper Right ( 440780.000, 3751320.000) ( 40d47'32.51"E, 64d13'29.40"N) +-Lower Right ( 440780.000, 3751260.000) ( 40d47'32.12"E, 64d13'27.47"N) +-Center ( 440750.000, 3751290.000) ( 40d47'30.10"E, 64d13'28.52"N) +- + Testing listgeo ProjectedCSTypeGeoKey_27200_new_zealand_mapping_grid.tif + Geotiff_Information: + Version: 1