git: 8de62e2df584 - 2023Q3 - graphics/osgearth: Unbreak build
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 17 Jul 2023 19:44:26 UTC
The branch 2023Q3 has been updated by zirias:
URL: https://cgit.FreeBSD.org/ports/commit/?id=8de62e2df5846f2d67348ac3fb8b5f939addcd0a
commit 8de62e2df5846f2d67348ac3fb8b5f939addcd0a
Author: Felix Palmen <zirias@FreeBSD.org>
AuthorDate: 2023-07-16 19:00:41 +0000
Commit: Felix Palmen <zirias@FreeBSD.org>
CommitDate: 2023-07-17 19:44:08 +0000
graphics/osgearth: Unbreak build
The build failed with
[...] error: no matching function for call to 'lerc_decode'
/usr/local/include/Lerc_c_api.h:223:17: note: candidate function not
viable: requires 10 arguments, but 9 were provided
and two similar errors. It obviously picked up lerc headers from
graphics/lerc although it uses a bundled lerc (which is directly built
in, not linked).
Add a patch to make sure the include path to the bundled lerc is
prepended.
With llvm15+, there was a second issue:
/usr/include/c++/v1/__random/uniform_int_distribution.h:234:5: error:
static assertion failed due to requirement
'__libcpp_random_is_valid_urng<Catch::RandomNumberGenerator,
void>::value'
[...]
[...]work/osgearth-osgearth-3.2/src/osgEarth/catch.hpp:6539:18: note:
in instantiation of function template specialization
'std::shuffle<std::__wrap_iter<Catch::TestCase *>,
Catch::RandomNumberGenerator &>' requested here
std::shuffle( vector.begin(), vector.end(), rng );
This is caused by the RNG used there having a signed return type
(ptrdiff_t) which is invalid, so add another patch to use size_t
instead.
Also update LIB_DEPENDS:
- remove poco, it was never used, the application using it isn't
connected to the build
- remove leveldb, it's used by an optional component not enabled by
default (could be supported by a port option)
- add webp, as advised by stage-qa
Approved by: portmgr (blanket)
(cherry picked from commit 19f37018f591aaca4ff811263237dfa5150a0614)
---
graphics/osgearth/Makefile | 11 +++++------
.../files/patch-src_osgEarthDrivers_lerc_CMakeLists.txt | 8 ++++++++
graphics/osgearth/files/patch-src_osgEarth_catch.hpp | 11 +++++++++++
3 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/graphics/osgearth/Makefile b/graphics/osgearth/Makefile
index 534153ff742f..b5fc4011a837 100644
--- a/graphics/osgearth/Makefile
+++ b/graphics/osgearth/Makefile
@@ -1,7 +1,7 @@
PORTNAME= osgearth
PORTVERSION= 3.2
DISTVERSIONPREFIX= ${PORTNAME}-
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= graphics geography
MAINTAINER= lbartoletti@FreeBSD.org
@@ -11,13 +11,12 @@ WWW= http://osgearth.org/
LICENSE= LGPL3
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
-LIB_DEPENDS= libosg.so:graphics/osg \
+LIB_DEPENDS= libcurl.so:ftp/curl \
libgdal.so:graphics/gdal \
- libcurl.so:ftp/curl \
libgeos.so:graphics/geos \
- libleveldb.so:databases/leveldb \
- libPocoUtil.so:devel/poco \
- libprotoc.so:devel/protobuf
+ libosg.so:graphics/osg \
+ libprotoc.so:devel/protobuf \
+ libwebp.so:graphics/webp
USES= cmake gl pkgconfig sqlite
diff --git a/graphics/osgearth/files/patch-src_osgEarthDrivers_lerc_CMakeLists.txt b/graphics/osgearth/files/patch-src_osgEarthDrivers_lerc_CMakeLists.txt
new file mode 100644
index 000000000000..6c8bcc143041
--- /dev/null
+++ b/graphics/osgearth/files/patch-src_osgEarthDrivers_lerc_CMakeLists.txt
@@ -0,0 +1,8 @@
+--- src/osgEarthDrivers/lerc/CMakeLists.txt.orig 2021-08-09 17:37:52 UTC
++++ src/osgEarthDrivers/lerc/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-INCLUDE_DIRECTORIES( ../../third_party/lerc )
++INCLUDE_DIRECTORIES( BEFORE ../../third_party/lerc )
+
+ SET(TARGET_SRC
+ ReaderWriterLERC.cpp
diff --git a/graphics/osgearth/files/patch-src_osgEarth_catch.hpp b/graphics/osgearth/files/patch-src_osgEarth_catch.hpp
new file mode 100644
index 000000000000..f92d1840daa7
--- /dev/null
+++ b/graphics/osgearth/files/patch-src_osgEarth_catch.hpp
@@ -0,0 +1,11 @@
+--- src/osgEarth/catch.hpp.orig 2023-07-17 06:00:01 UTC
++++ src/osgEarth/catch.hpp
+@@ -6523,7 +6523,7 @@ namespace Catch {
+ namespace Catch {
+
+ struct RandomNumberGenerator {
+- typedef std::ptrdiff_t result_type;
++ typedef std::size_t result_type;
+
+ result_type operator()( result_type n ) const { return std::rand() % n; }
+