git: 31b89bbc3787 - main - graphics/libopendrive: Update to newer snapshot (82c2dd9)

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Fri, 04 Jul 2025 09:06:42 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=31b89bbc3787d17dcc3894eafa19a385d48b7ace

commit 31b89bbc3787d17dcc3894eafa19a385d48b7ace
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2025-07-04 08:59:12 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2025-07-04 09:05:28 +0000

    graphics/libopendrive: Update to newer snapshot (82c2dd9)
    
    - Bump PORTREVISION for package change
---
 graphics/libopendrive/Makefile                   | 14 +++++-
 graphics/libopendrive/distinfo                   |  6 +--
 graphics/libopendrive/files/patch-CMakeLists.txt | 62 ++++++++++++++++++++++++
 graphics/libopendrive/pkg-plist                  |  5 +-
 4 files changed, 79 insertions(+), 8 deletions(-)

diff --git a/graphics/libopendrive/Makefile b/graphics/libopendrive/Makefile
index b96a228fdbf8..e0aff6c9efeb 100644
--- a/graphics/libopendrive/Makefile
+++ b/graphics/libopendrive/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	libopendrive
 PORTVERSION=	0.6.0
+PORTREVISION=	1
 CATEGORIES=	graphics
 
 MAINTAINER=	sunpoet@FreeBSD.org
@@ -9,13 +10,22 @@ WWW=		https://github.com/pageldev/libOpenDRIVE
 LICENSE=	APACHE20
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		cmake compiler:c++14-lang
+BUILD_DEPENDS=	catch2>=3.4.0:devel/catch2 \
+		pugixml>=1.14:textproc/pugixml
+LIB_DEPENDS=	libpugixml.so:textproc/pugixml
+
+USES=		cmake compiler:c++17-lang
 
 CMAKE_ON=	BUILD_SHARED_LIBS
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	pageldev
 GH_PROJECT=	libOpenDRIVE
-GH_TAGNAME=	edfd564
+GH_TAGNAME=	82c2dd9
+
+post-patch:
+	@${MKDIR} ${WRKSRC}/pugixml/
+	@${LN} -s ${LOCALBASE}/include/pugixml.hpp ${WRKSRC}/pugixml/pugixml.hpp
+	@${LN} -s ${LOCALBASE}/include/pugiconfig.hpp ${WRKSRC}/pugixml/pugiconfig.hpp
 
 .include <bsd.port.mk>
diff --git a/graphics/libopendrive/distinfo b/graphics/libopendrive/distinfo
index 393438c08144..156664e687d5 100644
--- a/graphics/libopendrive/distinfo
+++ b/graphics/libopendrive/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1748107894
-SHA256 (pageldev-libOpenDRIVE-0.6.0-edfd564_GH0.tar.gz) = 89184e50350f715e88d921dda95879b8693efd14d47d0a8cb8d6bc8635089e7e
-SIZE (pageldev-libOpenDRIVE-0.6.0-edfd564_GH0.tar.gz) = 132294
+TIMESTAMP = 1751375029
+SHA256 (pageldev-libOpenDRIVE-0.6.0-82c2dd9_GH0.tar.gz) = 366063848456c376b1a1e499b9f262bc0c024f579dae300ee190882900615cf5
+SIZE (pageldev-libOpenDRIVE-0.6.0-82c2dd9_GH0.tar.gz) = 152194
diff --git a/graphics/libopendrive/files/patch-CMakeLists.txt b/graphics/libopendrive/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..32b6609c0b7b
--- /dev/null
+++ b/graphics/libopendrive/files/patch-CMakeLists.txt
@@ -0,0 +1,62 @@
+--- CMakeLists.txt.orig	2025-07-04 08:27:24 UTC
++++ CMakeLists.txt
+@@ -20,22 +20,10 @@ include(CTest)
+ endif()
+ 
+ include(CTest)
+-include(FetchContent)
+ include(GNUInstallDirs)
+ 
+-FetchContent_Declare(
+-    pugixml
+-    GIT_REPOSITORY https://github.com/zeux/pugixml.git
+-    GIT_TAG v1.14
+-)
+-FetchContent_MakeAvailable(pugixml)
+-
+-FetchContent_Declare(
+-    Catch2
+-    GIT_REPOSITORY https://github.com/catchorg/Catch2.git
+-    GIT_TAG v3.4.0
+-)
+-FetchContent_MakeAvailable(Catch2)
++find_package(pugixml 1.14 REQUIRED)
++find_package(Catch2 3.4.0 REQUIRED)
+ include(Catch)
+ 
+ set(SOURCES
+@@ -59,19 +47,18 @@ set(SOURCES
+     src/RoadObject.cpp
+     src/RoadSignal.cpp
+     src/RoutingGraph.cpp
+-    ${pugixml_SOURCE_DIR}/src/pugixml.cpp
+ )
+ 
+ add_library(OpenDrive ${SOURCES})
+ target_include_directories(
+     OpenDrive PUBLIC
+     $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
++    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/pugixml>
+     $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+-    $<BUILD_INTERFACE:${pugixml_SOURCE_DIR}/src>
+ )
+ 
+ add_executable(tests tests/test.cpp)
+-target_link_libraries(tests PRIVATE OpenDrive Catch2::Catch2WithMain)
++target_link_libraries(tests PRIVATE OpenDrive pugixml::pugixml Catch2::Catch2WithMain)
+ catch_discover_tests(tests WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests)
+ 
+ install(
+@@ -80,12 +67,6 @@ install(
+     LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+     ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+     RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+-)
+-install(
+-    FILES
+-    ${pugixml_SOURCE_DIR}/src/pugixml.hpp
+-    ${pugixml_SOURCE_DIR}/src/pugiconfig.hpp
+-    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ )
+ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+ install(TARGETS OpenDrive EXPORT OpenDriveConfig)
diff --git a/graphics/libopendrive/pkg-plist b/graphics/libopendrive/pkg-plist
index e54966418ff0..b94183fd63c1 100644
--- a/graphics/libopendrive/pkg-plist
+++ b/graphics/libopendrive/pkg-plist
@@ -1,4 +1,3 @@
-bin/test-xodr
 cmake/OpenDriveConfig-%%CMAKE_BUILD_TYPE%%.cmake
 cmake/OpenDriveConfig.cmake
 include/CubicBezier.hpp
@@ -13,6 +12,7 @@ include/Junction.h
 include/Lane.h
 include/LaneSection.h
 include/LaneValidityRecord.h
+include/Log.h
 include/Math.hpp
 include/Mesh.h
 include/OpenDriveMap.h
@@ -25,6 +25,5 @@ include/RoadSignal.h
 include/RoutingGraph.h
 include/Utils.hpp
 include/XmlNode.h
-include/pugixml/pugiconfig.hpp
-include/pugixml/pugixml.hpp
+include/earcut.hpp
 lib/libOpenDrive.so