[packages/OpenXR] - new

qboosh qboosh at pld-linux.org
Wed Aug 30 17:25:15 CEST 2023


commit b30f6dbc3c1ec560c36c1bcb50b85a080de63b98
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Aug 30 16:51:52 2023 +0200

    - new

 OpenXR-jsoncpp.patch | 36 +++++++++++++++++++
 OpenXR.spec          | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 135 insertions(+)
---
diff --git a/OpenXR.spec b/OpenXR.spec
new file mode 100644
index 0000000..e0ea0b1
--- /dev/null
+++ b/OpenXR.spec
@@ -0,0 +1,99 @@
+Summary:	OpenXR loader and validation layers implementation
+Summary(pl.UTF-8):	Implementacja loadera i warstw kontroli poprawności standardu OpenXR
+Name:		OpenXR
+Version:	1.0.27
+Release:	1
+License:	Apache v2.0
+Group:		Libraries
+#Source0Download: https://github.com/KhronosGroup/OpenXR-SDK-Source/releases
+Source0:	https://github.com/KhronosGroup/OpenXR-SDK-Source/releases/download/release-%{version}/%{name}-SDK-Source-release-%{version}.tar.gz
+# Source0-md5:	f261d81ff299cdf301619dc0bcd9ebb0
+Patch0:		%{name}-jsoncpp.patch
+URL:		https://www.khronos.org/openxr/
+BuildRequires:	EGL-devel
+BuildRequires:	OpenGL-devel
+BuildRequires:	OpenGLESv2-devel
+BuildRequires:	OpenGLESv3-devel
+BuildRequires:	Vulkan-Headers
+BuildRequires:	Vulkan-Loader-devel
+BuildRequires:	cmake >= 3.0
+BuildRequires:	glslang
+BuildRequires:	jsoncpp-devel
+BuildRequires:	python3 >= 1:3.6
+BuildRequires:	python3-jinja2
+BuildRequires:	shaderc
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+OpenXR is a royalty-free, open standard that provides high-performance
+access to Augmented Reality (AR) and Virtual Reality (VR)
+(collectively known as XR) platforms and devices.
+
+This SDK contains the implementation of loader, validation layers and
+code samples.
+
+%description -l pl.UTF-8
+OpenXR to otwarty, wolny od opłat licencyjnych standard zapewniający
+wydajny dostęp do platform i urządzeń AR (Augmented Reality) oraz VR
+(Virtual Reality), wspólnie określanych jako XR.
+
+To SDK zawiera implementację loadera, warstw sprawdzania poparwności
+oraz przykładowy kod.
+
+%package devel
+Summary:	Header files for OpenXR library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki OpenXR
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Header files for OpenXR library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki OpenXR.
+
+%prep
+%setup -q -n %{name}-SDK-Source-release-%{version}
+%patch0 -p1
+
+%build
+install -d build
+cd build
+%cmake .. \
+	-DBUILD_ALL_EXTENSIONS=ON \
+	-DBUILD_WITH_SYSTEM_JSONCPP=ON \
+	-DCMAKE_INSTALL_LIBDIR=%{_lib}
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc CHANGELOG.SDK.md COPYING.adoc README.md
+%attr(755,root,root) %{_bindir}/hello_xr
+%attr(755,root,root) %{_bindir}/openxr_runtime_list
+%attr(755,root,root) %{_libdir}/libXrApiLayer_api_dump.so
+%attr(755,root,root) %{_libdir}/libXrApiLayer_core_validation.so
+%attr(755,root,root) %{_libdir}/libopenxr_loader.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libopenxr_loader.so.1
+%{_datadir}/openxr
+%{_mandir}/man1/hello_xr.1*
+%{_mandir}/man1/openxr_runtime_list.1*
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libopenxr_loader.so
+%{_includedir}/openxr
+%{_pkgconfigdir}/openxr.pc
+%{_libdir}/cmake/openxr
diff --git a/OpenXR-jsoncpp.patch b/OpenXR-jsoncpp.patch
new file mode 100644
index 0000000..6b809df
--- /dev/null
+++ b/OpenXR-jsoncpp.patch
@@ -0,0 +1,36 @@
+--- OpenXR-SDK-Source-release-1.0.27/src/cmake/FindJsonCpp.cmake.orig	2023-03-22 18:50:58.000000000 +0100
++++ OpenXR-SDK-Source-release-1.0.27/src/cmake/FindJsonCpp.cmake	2023-05-10 06:27:40.155763503 +0200
+@@ -75,33 +75,14 @@ if(jsoncpp_FOUND)
+ 	# part of the string to indicate if we found a real jsoncpp_lib (and what kind)
+ 	_jsoncpp_check_for_real_jsoncpplib()
+ 
+-	macro(_jsoncpp_apply_map_config target)
+-		if(MSVC)
+-			# Can't do this - different runtimes, incompatible ABI, etc.
+-			set(_jsoncpp_debug_fallback)
+-		else()
+-			set(_jsoncpp_debug_fallback DEBUG)
+-			#osvr_stash_map_config(DEBUG DEBUG RELWITHDEBINFO RELEASE MINSIZEREL NONE)
+-		endif()
+-		# Appending, just in case using project or upstream fixes this.
+-		set_property(TARGET ${target} APPEND PROPERTY MAP_IMPORTED_CONFIG_RELEASE RELEASE RELWITHDEBINFO MINSIZEREL NONE ${_jsoncpp_debug_fallback})
+-		set_property(TARGET ${target} APPEND PROPERTY MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELWITHDEBINFO RELEASE MINSIZEREL NONE ${_jsoncpp_debug_fallback})
+-		set_property(TARGET ${target} APPEND PROPERTY MAP_IMPORTED_CONFIG_MINSIZEREL MINSIZEREL RELEASE RELWITHDEBINFO NONE ${_jsoncpp_debug_fallback})
+-		set_property(TARGET ${target} APPEND PROPERTY MAP_IMPORTED_CONFIG_NONE NONE RELEASE RELWITHDEBINFO MINSIZEREL ${_jsoncpp_debug_fallback})
+-		if(NOT MSVC)
+-			set_property(TARGET ${target} APPEND PROPERTY MAP_IMPORTED_CONFIG_DEBUG DEBUG RELWITHDEBINFO RELEASE MINSIZEREL NONE)
+-		endif()
+-	endmacro()
+ 	if(__jsoncpp_have_jsoncpplib)
+ 		list(APPEND __jsoncpp_info_string "[${__jsoncpp_lib_type}]")
+-		_jsoncpp_apply_map_config(jsoncpp_lib)
+ 	else()
+ 		list(APPEND __jsoncpp_info_string "[]")
+ 	endif()
+ 	# part of the string to indicate if we found jsoncpp_lib_static
+ 	if(TARGET jsoncpp_lib_static)
+ 		list(APPEND __jsoncpp_info_string "[T]")
+-		_jsoncpp_apply_map_config(jsoncpp_lib_static)
+ 	else()
+ 		list(APPEND __jsoncpp_info_string "[]")
+ 	endif()
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/OpenXR.git/commitdiff/b30f6dbc3c1ec560c36c1bcb50b85a080de63b98



More information about the pld-cvs-commit mailing list