commit:     d447bc4d10d3888685a7db50791bbba37c09f540
Author:     Sam Wilson <sam <AT> binarycake <DOT> ca>
AuthorDate: Thu Jan 16 16:25:08 2025 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Thu Jan 16 23:18:15 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d447bc4d

media-libs/openvr: new package, add 1.23.8

Signed-off-by: Sam Wilson <sam <AT> binarycake.ca>

 media-libs/openvr/Manifest                  |  1 +
 media-libs/openvr/files/openvr-libdir.patch | 31 +++++++++++++++++++++++++
 media-libs/openvr/metadata.xml              | 14 +++++++++++
 media-libs/openvr/openvr-1.23.8.ebuild      | 36 +++++++++++++++++++++++++++++
 4 files changed, 82 insertions(+)

diff --git a/media-libs/openvr/Manifest b/media-libs/openvr/Manifest
new file mode 100644
index 000000000..f8699033c
--- /dev/null
+++ b/media-libs/openvr/Manifest
@@ -0,0 +1 @@
+DIST openvr-1.23.8.tar.gz 153566673 BLAKE2B 
2f0fa74fb089e352faa9eda4eef27854568a75793e35a69cb071609ee249e21252a13ea028a31d9a579523475d87f5a63fd3414593458101841ed95c901d58b3
 SHA512 
8108a84ee4b81712007c5dd266ccdd1423cb667b7bd77cd9ce728a5f6a508db229fd149aea3be52076a2de21ffaf9eada4666dff5c88bb6a3d83b82be7cc8d2e

diff --git a/media-libs/openvr/files/openvr-libdir.patch 
b/media-libs/openvr/files/openvr-libdir.patch
new file mode 100644
index 000000000..d259f63ed
--- /dev/null
+++ b/media-libs/openvr/files/openvr-libdir.patch
@@ -0,0 +1,31 @@
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 29b69c5..0b32140 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -101,12 +101,12 @@ endif()
+ target_link_libraries(${LIBNAME} ${EXTRA_LIBS} ${CMAKE_DL_LIBS})
+ target_include_directories(${LIBNAME} PUBLIC ${OPENVR_HEADER_DIR})
+ 
+-install(TARGETS ${LIBNAME} DESTINATION lib)
++install(TARGETS ${LIBNAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(FILES ${PUBLIC_HEADER_FILES} DESTINATION include/openvr)
+ 
+ # Generate a .pc file for linux environments
+ if(PLATFORM_NAME MATCHES "linux")
+-    set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/share/pkgconfig" CACHE 
PATH "Installation directory for pkgconfig (.pc) files")
++    set(INSTALL_PKGCONFIG_DIR 
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig" CACHE PATH 
"Installation directory for pkgconfig (.pc) files")
+     CONFIGURE_FILE("openvr.pc.in" "openvr.pc" @ONLY)
+ 
+     set(OPENVR_PC ${CMAKE_CURRENT_BINARY_DIR}/openvr.pc)
+diff --git a/src/openvr.pc.in b/src/openvr.pc.in
+index 3edba91..89ec276 100644
+--- a/src/openvr.pc.in
++++ b/src/openvr.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${prefix}/lib
++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
+ includedir=${prefix}/include/openvr
+ 
+ Name: openvr

diff --git a/media-libs/openvr/metadata.xml b/media-libs/openvr/metadata.xml
new file mode 100644
index 000000000..cbe5e5d7b
--- /dev/null
+++ b/media-libs/openvr/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+  <maintainer type="person">
+    <email>[email protected]</email>
+    <name>Sam Wilson</name>
+  </maintainer>
+  <upstream>
+    <remote-id type="github">ValveSoftware/openvr</remote-id>
+    <bugs-to>https://github.com/ValveSoftware/openvr/issues</bugs-to>
+    <changelog>https://github.com/ValveSoftware/openvr/releases</changelog>
+    <doc>https://github.com/ValveSoftware/openvr/blob/master/README.md</doc>
+  </upstream>
+</pkgmetadata>

diff --git a/media-libs/openvr/openvr-1.23.8.ebuild 
b/media-libs/openvr/openvr-1.23.8.ebuild
new file mode 100644
index 000000000..e2d6970ba
--- /dev/null
+++ b/media-libs/openvr/openvr-1.23.8.ebuild
@@ -0,0 +1,36 @@
+# Copyright 2020-2024 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+EGIT_REPO_URI="https://github.com/ValveSoftware/openvr";
+
+inherit cmake-multilib
+
+DESCRIPTION="OpenVR SDK"
+HOMEPAGE="https://steamvr.com";
+
+SRC_URI="${EGIT_REPO_URI}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="static"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-libdir.patch"
+)
+
+DOCS=(
+       "${S}/LICENSE"
+       "${S}/README.md"
+)
+
+src_configure() {
+       my_configure() {
+               mycmakeargs=(
+                       -DBUILD_SHARED="$(usex static OFF ON)"
+               )
+               cmake_src_configure
+       }
+       multilib_parallel_foreach_abi my_configure
+}

Reply via email to