summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-05-25 11:50:31 +0000
committerSam James <sam@gentoo.org>2021-05-25 11:54:46 +0000
commit3220d7fbcf7eee75e057450836646ee69628c19d (patch)
treea4243067ff192a4cb372d0c314e0e2756c4b45d1 /sci-geosciences/liblas
parentdev-libs/rapidxml: add Debian patch to fix build (diff)
downloadgentoo-3220d7fbcf7eee75e057450836646ee69628c19d.tar.gz
gentoo-3220d7fbcf7eee75e057450836646ee69628c19d.tar.bz2
gentoo-3220d7fbcf7eee75e057450836646ee69628c19d.zip
sci-geosciences/liblas: fix GCC 11 build
Closes: https://bugs.gentoo.org/789732 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-geosciences/liblas')
-rw-r--r--sci-geosciences/liblas/files/liblas-1.8.1-gcc11.patch34
-rw-r--r--sci-geosciences/liblas/liblas-1.8.1-r3.ebuild1
2 files changed, 35 insertions, 0 deletions
diff --git a/sci-geosciences/liblas/files/liblas-1.8.1-gcc11.patch b/sci-geosciences/liblas/files/liblas-1.8.1-gcc11.patch
new file mode 100644
index 000000000000..b279eb40f4cd
--- /dev/null
+++ b/sci-geosciences/liblas/files/liblas-1.8.1-gcc11.patch
@@ -0,0 +1,34 @@
+https://github.com/libLAS/libLAS/commit/8c4985384453a2df7254f05688b83706723bad7b.patch
+https://bugs.gentoo.org/789732
+
+From 8c4985384453a2df7254f05688b83706723bad7b Mon Sep 17 00:00:00 2001
+From: FX Coudert <fxcoudert@gmail.com>
+Date: Wed, 4 Oct 2017 11:51:23 +0200
+Subject: [PATCH] fix pointer comparison
+
+---
+ src/gt_citation.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/gt_citation.cpp b/src/gt_citation.cpp
+index 65fce31a..8d3966bc 100644
+--- a/src/gt_citation.cpp
++++ b/src/gt_citation.cpp
+@@ -155,7 +155,7 @@ char* ImagineCitationTranslation(char* psCitation, geokey_t keyID)
+ if(p1[0] == '\0' || p1[0] == '\n' || p1[0] == ' ')
+ p1 --;
+ p2 = p1 - 1;
+- while( p2>0 && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') )
++ while( p2 && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') )
+ p2--;
+ if(p2 != p1 - 1)
+ p1 = p2;
+@@ -198,7 +198,7 @@ char* ImagineCitationTranslation(char* psCitation, geokey_t keyID)
+ if(p1[0] == '\0' || p1[0] == '\n' || p1[0] == ' ')
+ p1 --;
+ char* p2 = p1 - 1;
+- while( p2>0 && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') )
++ while( p2 && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') )
+ p2--;
+ if(p2 != p1 - 1)
+ p1 = p2;
diff --git a/sci-geosciences/liblas/liblas-1.8.1-r3.ebuild b/sci-geosciences/liblas/liblas-1.8.1-r3.ebuild
index 0714f93b9b95..575896dad15f 100644
--- a/sci-geosciences/liblas/liblas-1.8.1-r3.ebuild
+++ b/sci-geosciences/liblas/liblas-1.8.1-r3.ebuild
@@ -34,6 +34,7 @@ PATCHES=(
"${FILESDIR}"/${P}-CVE-2018-20540-fixup.patch # bug 698846
"${FILESDIR}"/${P}-fix-debug.patch # bug 668778
"${FILESDIR}"/${P}-boost-1.73.patch # bug 722878
+ "${FILESDIR}"/${P}-gcc11.patch # bug 789732
)
src_prepare() {