media-libs/openvr: new package, add 1.23.8

Signed-off-by: Sam Wilson <sam@binarycake.ca>
This commit is contained in:
Sam Wilson
2025-01-16 11:25:08 -05:00
parent 319498c39b
commit d447bc4d10
4 changed files with 82 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST openvr-1.23.8.tar.gz 153566673 BLAKE2B 2f0fa74fb089e352faa9eda4eef27854568a75793e35a69cb071609ee249e21252a13ea028a31d9a579523475d87f5a63fd3414593458101841ed95c901d58b3 SHA512 8108a84ee4b81712007c5dd266ccdd1423cb667b7bd77cd9ce728a5f6a508db229fd149aea3be52076a2de21ffaf9eada4666dff5c88bb6a3d83b82be7cc8d2e

View File

@@ -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

View File

@@ -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>sam@binarycake.ca</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>

View File

@@ -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
}