From nobody Tue May 24 11:01:47 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E40BA1B3DA69; Tue, 24 May 2022 11:01:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4L6rqb5cK2z3jZX; Tue, 24 May 2022 11:01:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653390107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dARODaZwyOD3LJR67LoFfX5dUw/yRaC8NONUFl1yvro=; b=eSFG+cy2PhzTU7z2MTcBY0FPaxbTxecj4E6rt59ZA7yDhgG17dXglig/jXXM/2GnGX2eMK UbBT5QODvmXRlbHho3z0fxk8G0iqjlV8LPzHyzpD3acNbGKwIkg5iQ9Aum2jXRjIDRJn8M 18Llk8c2EjBwTwqN6+7bSDrLvBftEEK/VAZO76Wx7sab4mcMi/i4WJNnHslYVej+SAr/AI sau0l+TtEP+28EB2R2AIsmCzkE3FIYViX05ldqtoluAJ1HbWNZlVTk418EFV9Qo3Xv8axY Vp527IU1Dd3XMtDqDQPTKSLmmA+dkWhc8koO0EFvzqkYeQMwNcREbdZx7n4uRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A128A22972; Tue, 24 May 2022 11:01:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24OB1l34035671; Tue, 24 May 2022 11:01:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24OB1lAQ035670; Tue, 24 May 2022 11:01:47 GMT (envelope-from git) Date: Tue, 24 May 2022 11:01:47 GMT Message-Id: <202205241101.24OB1lAQ035670@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dima Panov Subject: git: 969f058c9cee - main - devel/liblas: unbreak build after recent boost upgrade (+) List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fluffy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 969f058c9cee699abc13ba9426bad593fe3b2e28 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653390107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dARODaZwyOD3LJR67LoFfX5dUw/yRaC8NONUFl1yvro=; b=myLE8TMKOKnB9oIU9C85xXMY5o0VBl8YUNWLm1Q/SMw2vrj/RpNZG7gWZjmo5f8jFDOHh8 OTIsAU8JXCSg32k88GyHHr+CTwwTMPXDOMuPMVRvCoOvdkWlm3R/AR06w+erDAmFeTthP0 XIZeeISZHzUxqBuiKMjlC4PzlRDQnY79FpFADVYiiskTBBv8jHePl5e1isSw/MAq+z/54o KODj54z6OQUS4bzvCCcYzi4kZrCjn1nLlxqvL8UqchMaYtR9KF0ewzJ/hK4nnVHu12XxoQ yAcAMbR33i76rHUymxn34s71GWW5Jf6m1GfpUbZBZMMsKH/HQM/GY4vorj3r5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653390107; a=rsa-sha256; cv=none; b=g6uXaQBMxZea1RBiP2Y7CSSUjAXHSmvgjwDP4IdD2pogDz3YsaRT+YWudYA9s1carAQ77N GhO+3T/+morQAWcDGDmNYcx6aHmWulfqavES/5l0fn+CJ/lml/ueNv0b+O/anXtCqwfAL5 2ZeR8jBbcbQfd1GFmJIJ+Pt29iR4ectjzLijZGMKaeeMeb8ZDQT8r6eP5ux9rCvYFRvMP7 BGm3eySS79JXyBa7VrsdbR8eobIz4B0nHdzynX8dgjaOaafHMjI6FByegyIj7UH0VlQ7Uu 5B920Pju70kxR+5g39gWAD4PbANhuecAWDSodzfbPfTqo2BHLUb73Iad0rPokw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by fluffy: URL: https://cgit.FreeBSD.org/ports/commit/?id=969f058c9cee699abc13ba9426bad593fe3b2e28 commit 969f058c9cee699abc13ba9426bad593fe3b2e28 Author: Dima Panov AuthorDate: 2022-05-24 10:57:55 +0000 Commit: Dima Panov CommitDate: 2022-05-24 10:57:55 +0000 devel/liblas: unbreak build after recent boost upgrade (+) While here, backport critical security and compatibility fixes from upstream PR: 246106 Security: CVE-2018-20540 --- devel/liblas/files/patch-CVE-2018-20540 | 55 +++++++++++++++++++++++++++ devel/liblas/files/patch-CVE-2018-20540-fixup | 24 ++++++++++++ devel/liblas/files/patch-boost-1.73 | 55 +++++++++++++++++++++++++++ devel/liblas/files/patch-fix-overload-call | 15 ++++++++ devel/liblas/files/patch-gdal-2.5.0 | 34 +++++++++++++++++ 5 files changed, 183 insertions(+) diff --git a/devel/liblas/files/patch-CVE-2018-20540 b/devel/liblas/files/patch-CVE-2018-20540 new file mode 100644 index 000000000000..8cd6f66b5e11 --- /dev/null +++ b/devel/liblas/files/patch-CVE-2018-20540 @@ -0,0 +1,55 @@ +From 09d45518776489508f34098f1c159f58b856f459 Mon Sep 17 00:00:00 2001 +From: Mateusz Loskot +Date: Sun, 20 Jan 2019 02:28:29 +0100 +Subject: [PATCH] Ensure stream is deallocated in case of exception (#162) + +Fixes #158 +--- + include/liblas/liblas.hpp | 32 ++++++++++++++++++++++++-------- + 1 file changed, 24 insertions(+), 8 deletions(-) + +diff --git include/liblas/liblas.hpp include/liblas/liblas.hpp +index f5ad44e1..325de3ff 100644 +--- include/liblas/liblas.hpp ++++ include/liblas/liblas.hpp +@@ -119,16 +119,32 @@ inline std::istream* Open(std::string const& filename, std::ios::openmode mode) + { + #ifdef USE_BOOST_IO + namespace io = boost::iostreams; +- io::stream* ifs = new io::stream(); +- ifs->open(filename.c_str(), mode); +- if (ifs->is_open() == false) return NULL; +- return ifs; ++ io::stream* ifs = NULL; ++ try ++ { ++ ifs = new io::stream(); ++ ifs->open(filename.c_str(), mode); ++ if (ifs->is_open() == false) return NULL; ++ return ifs; ++ } ++ catch (...) ++ { ++ delete ifs; ++ } + #else +- std::ifstream* ifs = new std::ifstream(); +- ifs->open(filename.c_str(), mode); +- if (ifs->is_open() == false) return NULL; +- return ifs; ++ std::ifstream* ifs = NULL; ++ try ++ { ++ ifs = new std::ifstream(); ++ ifs->open(filename.c_str(), mode); ++ if (ifs->is_open() == false) return NULL; ++ } ++ catch (...) ++ { ++ delete ifs; ++ } + #endif ++ return NULL; + } + + /// Create file and open to write in binary mode. diff --git a/devel/liblas/files/patch-CVE-2018-20540-fixup b/devel/liblas/files/patch-CVE-2018-20540-fixup new file mode 100644 index 000000000000..00bf344a0a16 --- /dev/null +++ b/devel/liblas/files/patch-CVE-2018-20540-fixup @@ -0,0 +1,24 @@ +From 6a666b9101293b13fde4e4eb1d2c627f7613515e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Felipe=20M=2E=20L=C3=B3pez?= +Date: Fri, 19 Jul 2019 08:26:44 +0200 +Subject: [PATCH] Always return NULL when Open() is used (#168) + +Attempt to open LAS file using standard stream, without +Boost supports built in, always failed with +"Cannot open sample.las for read. Exiting..." +--- + include/liblas/liblas.hpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git include/liblas/liblas.hpp include/liblas/liblas.hpp +index 325de3ff..5c950ce0 100644 +--- include/liblas/liblas.hpp ++++ include/liblas/liblas.hpp +@@ -138,6 +138,7 @@ inline std::istream* Open(std::string const& filename, std::ios::openmode mode) + ifs = new std::ifstream(); + ifs->open(filename.c_str(), mode); + if (ifs->is_open() == false) return NULL; ++ return ifs; + } + catch (...) + { diff --git a/devel/liblas/files/patch-boost-1.73 b/devel/liblas/files/patch-boost-1.73 new file mode 100644 index 000000000000..606f3837d9c2 --- /dev/null +++ b/devel/liblas/files/patch-boost-1.73 @@ -0,0 +1,55 @@ +diff --git include/liblas/detail/binary.hpp include/liblas/detail/binary.hpp +index d3116a1..ab20e06 100644 +--- include/liblas/detail/binary.hpp ++++ include/liblas/detail/binary.hpp +@@ -17,6 +17,8 @@ + #ifndef LIBLAS_DETAIL_BINARY_HPP_INCLUDED + #define LIBLAS_DETAIL_BINARY_HPP_INCLUDED + ++#include ++ + #include + #include + #include +@@ -25,7 +27,6 @@ + + #include + #include +-#include + #include + + #if CHAR_BIT != 8 +@@ -43,7 +44,7 @@ namespace detail { namespace binary { + struct big_endian_tag {}; + struct little_endian_tag {}; + +-#ifdef BOOST_BIG_ENDIAN ++#ifdef LIBLAS_BIG_ENDIAN + typedef big_endian_tag native_endian_tag; + #else + typedef little_endian_tag native_endian_tag; +diff --git src/c_api.cpp src/c_api.cpp +index a70fe74..e8be785 100644 +--- src/c_api.cpp ++++ src/c_api.cpp +@@ -96,6 +96,7 @@ using namespace liblas; + #endif + + #include ++#include + + bool IsReprojectionTransform(liblas::TransformPtr const& p) + { +diff --git src/header.cpp src/header.cpp +index 9987ce1..a5c8f7d 100644 +--- src/header.cpp ++++ src/header.cpp +@@ -54,7 +54,7 @@ + // boost + #include + #include +- ++#include + //std + #include + #include diff --git a/devel/liblas/files/patch-fix-overload-call b/devel/liblas/files/patch-fix-overload-call new file mode 100644 index 000000000000..9c5b853347b2 --- /dev/null +++ b/devel/liblas/files/patch-fix-overload-call @@ -0,0 +1,15 @@ +--- src/gt_citation.cpp ++++ src/gt_citation.cpp +@@ -387,10 +387,10 @@ + osCitation += primemName; + bRewriteGeogCitation = TRUE; + +- double primemValue = poSRS->GetPrimeMeridian(NULL); ++ double primemValue = poSRS->GetPrimeMeridian(); + if(angUnitName && !EQUAL(angUnitName, "Degree")) + { +- double aUnit = poSRS->GetAngularUnits(NULL); ++ double aUnit = poSRS->GetAngularUnits(); + primemValue *= aUnit; + } + GTIFKeySet( psGTIF, GeogPrimeMeridianLongGeoKey, TYPE_DOUBLE, 1, diff --git a/devel/liblas/files/patch-gdal-2.5.0 b/devel/liblas/files/patch-gdal-2.5.0 new file mode 100644 index 000000000000..59a7939c1660 --- /dev/null +++ b/devel/liblas/files/patch-gdal-2.5.0 @@ -0,0 +1,34 @@ +From 3a572ff7e684668da62c794b37ccccbc169723de Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner +Date: Wed, 26 Feb 2020 17:45:30 +0100 +Subject: [PATCH] Fix build against >=GDAL-2.5.0 + +Signed-off-by: Andreas Sturmlechner +--- + src/gt_wkt_srs.cpp | 3 --- + 1 file changed, 3 deletions(-) + +diff --git src/gt_wkt_srs.cpp src/gt_wkt_srs.cpp +index 9871aa0..099972d 100755 +--- src/gt_wkt_srs.cpp ++++ src/gt_wkt_srs.cpp +@@ -493,7 +493,6 @@ char *GTIFGetOGISDefn( GTIF *hGTIF, GTIFDefn * psDefn ) + { + char *pszWKT; + oSRS.morphFromESRI(); +- oSRS.FixupOrdering(); + if( oSRS.exportToWkt( &pszWKT ) == OGRERR_NONE ) + return pszWKT; + } +@@ -1094,8 +1093,6 @@ char *GTIFGetOGISDefn( GTIF *hGTIF, GTIFDefn * psDefn ) + /* ==================================================================== */ + char *pszWKT; + +- oSRS.FixupOrdering(); +- + if( oSRS.exportToWkt( &pszWKT ) == OGRERR_NONE ) + return pszWKT; + else +-- +2.25.1 +