aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Engberg <diizzy@FreeBSD.org>2026-09-01 22:44:30 +0000
committerVladimir Druzenko <vvd@FreeBSD.org>2026-09-01 22:44:30 +0000
commit74638794049ce60abd107ee14f3d0e3e834a1258 (patch)
tree3235725cba83289d344e46684f32c704846742db
parent4a0d8265b8505638e8c684bc716f6da74fe0fba7 (diff)
graphics/openxr: Fix build after update jsoncpp, improve port
After add devel/jsoncpp/patch-jsoncpp-namespaced-targets.cmake in 9d1b7732976723160adfd2c6c4240e34555ac30c graphics/openxr fails to build with error: ninja: error: 'jsoncpp_lib-NOTFOUND', needed by 'src/loader/libopenxr_loader.so', missing and no known rule to make it - Switch to use shared library jsoncpp instead of static. - Update compiler requirements in USES. - Ensure that tests aren't picked up in some weird way (not included in repo). PR: 298099 Sponsored by: UNIS Labs Co-authored-by: Vladimir Druzenko <vvd@FreeBSD.org>
-rw-r--r--graphics/openxr/Makefile14
-rw-r--r--graphics/openxr/files/patch-src_CMakeLists.txt22
2 files changed, 30 insertions, 6 deletions
diff --git a/graphics/openxr/Makefile b/graphics/openxr/Makefile
index e21c1476d178..53cc585eac83 100644
--- a/graphics/openxr/Makefile
+++ b/graphics/openxr/Makefile
@@ -1,6 +1,7 @@
PORTNAME= openxr
DISTVERSIONPREFIX= release-
DISTVERSION= 1.1.62
+PORTREVISION= 1
CATEGORIES= graphics
MAINTAINER= vvd@FreeBSD.org
@@ -12,17 +13,22 @@ LICENSE= APACHE20
BUILD_DEPENDS= glslangValidator:graphics/glslang \
glslc:graphics/shaderc \
vulkan-headers>0:graphics/vulkan-headers \
- ${LOCALBASE}/lib/libvulkan.so:graphics/vulkan-loader \
- ${LOCALBASE}/lib/libjsoncpp.a:devel/jsoncpp
+ ${LOCALBASE}/lib/libvulkan.so:graphics/vulkan-loader
+LIB_DEPENDS= libjsoncpp.so:devel/jsoncpp
RUN_DEPENDS= vulkan-loader>0:graphics/vulkan-loader
-USES= cmake compiler:c++14-lang gl pathfix python:build
+USES= cmake compiler:c++17-lang gl pathfix python:build
USE_GITHUB= yes
GH_ACCOUNT= KhronosGroup
GH_PROJECT= OpenXR-SDK
USE_GL= opengl
USE_LDCONFIG= yes
-CMAKE_ON= BUILD_ALL_EXTENSIONS BUILD_WITH_SYSTEM_JSONCPP
+CMAKE_ON= BUILD_ALL_EXTENSIONS
+CMAKE_OFF= BUILD_TESTS
+
+EXTRACT_AFTER_ARGS= --exclude src/cmake/FindJsonCpp.cmake \
+ --exclude src/external/jsoncpp \
+ --no-same-owner --no-same-permissions
.include <bsd.port.mk>
diff --git a/graphics/openxr/files/patch-src_CMakeLists.txt b/graphics/openxr/files/patch-src_CMakeLists.txt
index 9944e028c14e..b7826820ab8b 100644
--- a/graphics/openxr/files/patch-src_CMakeLists.txt
+++ b/graphics/openxr/files/patch-src_CMakeLists.txt
@@ -1,6 +1,24 @@
---- src/CMakeLists.txt.orig 2024-02-17 20:48:29 UTC
+--- src/CMakeLists.txt.orig 2026-08-01 01:25:05 UTC
+++ src/CMakeLists.txt
-@@ -165,7 +165,7 @@ cmake_dependent_option(
+@@ -155,7 +155,7 @@ find_package(Threads REQUIRED)
+ endif()
+
+ find_package(Threads REQUIRED)
+-find_package(JsonCpp)
++find_package(jsoncpp REQUIRED)
+
+ ### All options defined here
+ option(BUILD_LOADER "Build loader" ON)
+@@ -201,7 +201,7 @@ cmake_dependent_option(
+ BUILD_WITH_SYSTEM_JSONCPP
+ "Use system jsoncpp instead of vendored source"
+ ON
+- "JSONCPP_FOUND"
++ "jsoncpp_FOUND"
+ OFF
+ )
+ cmake_dependent_option(
+@@ -216,7 +216,7 @@ if(WIN32)
if(WIN32)
add_definitions(-DXR_OS_WINDOWS)
add_definitions(-DNOMINMAX)