Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-geosciences/liblas/files/, sci-geosciences/liblas/
Date: Tue, 25 May 2021 11:55:05
Message-Id: 1621943686.3220d7fbcf7eee75e057450836646ee69628c19d.sam@gentoo
1 commit: 3220d7fbcf7eee75e057450836646ee69628c19d
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 25 11:50:31 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue May 25 11:54:46 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3220d7fb
7
8 sci-geosciences/liblas: fix GCC 11 build
9
10 Closes: https://bugs.gentoo.org/789732
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 .../liblas/files/liblas-1.8.1-gcc11.patch | 34 ++++++++++++++++++++++
14 sci-geosciences/liblas/liblas-1.8.1-r3.ebuild | 1 +
15 2 files changed, 35 insertions(+)
16
17 diff --git a/sci-geosciences/liblas/files/liblas-1.8.1-gcc11.patch b/sci-geosciences/liblas/files/liblas-1.8.1-gcc11.patch
18 new file mode 100644
19 index 00000000000..b279eb40f4c
20 --- /dev/null
21 +++ b/sci-geosciences/liblas/files/liblas-1.8.1-gcc11.patch
22 @@ -0,0 +1,34 @@
23 +https://github.com/libLAS/libLAS/commit/8c4985384453a2df7254f05688b83706723bad7b.patch
24 +https://bugs.gentoo.org/789732
25 +
26 +From 8c4985384453a2df7254f05688b83706723bad7b Mon Sep 17 00:00:00 2001
27 +From: FX Coudert <fxcoudert@×××××.com>
28 +Date: Wed, 4 Oct 2017 11:51:23 +0200
29 +Subject: [PATCH] fix pointer comparison
30 +
31 +---
32 + src/gt_citation.cpp | 4 ++--
33 + 1 file changed, 2 insertions(+), 2 deletions(-)
34 +
35 +diff --git a/src/gt_citation.cpp b/src/gt_citation.cpp
36 +index 65fce31a..8d3966bc 100644
37 +--- a/src/gt_citation.cpp
38 ++++ b/src/gt_citation.cpp
39 +@@ -155,7 +155,7 @@ char* ImagineCitationTranslation(char* psCitation, geokey_t keyID)
40 + if(p1[0] == '\0' || p1[0] == '\n' || p1[0] == ' ')
41 + p1 --;
42 + p2 = p1 - 1;
43 +- while( p2>0 && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') )
44 ++ while( p2 && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') )
45 + p2--;
46 + if(p2 != p1 - 1)
47 + p1 = p2;
48 +@@ -198,7 +198,7 @@ char* ImagineCitationTranslation(char* psCitation, geokey_t keyID)
49 + if(p1[0] == '\0' || p1[0] == '\n' || p1[0] == ' ')
50 + p1 --;
51 + char* p2 = p1 - 1;
52 +- while( p2>0 && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') )
53 ++ while( p2 && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') )
54 + p2--;
55 + if(p2 != p1 - 1)
56 + p1 = p2;
57
58 diff --git a/sci-geosciences/liblas/liblas-1.8.1-r3.ebuild b/sci-geosciences/liblas/liblas-1.8.1-r3.ebuild
59 index 0714f93b9b9..575896dad15 100644
60 --- a/sci-geosciences/liblas/liblas-1.8.1-r3.ebuild
61 +++ b/sci-geosciences/liblas/liblas-1.8.1-r3.ebuild
62 @@ -34,6 +34,7 @@ PATCHES=(
63 "${FILESDIR}"/${P}-CVE-2018-20540-fixup.patch # bug 698846
64 "${FILESDIR}"/${P}-fix-debug.patch # bug 668778
65 "${FILESDIR}"/${P}-boost-1.73.patch # bug 722878
66 + "${FILESDIR}"/${P}-gcc11.patch # bug 789732
67 )
68
69 src_prepare() {