Created
December 18, 2024 03:53
-
-
Save Patola/56b7258161fbce6657fbb562ca2012cd to your computer and use it in GitHub Desktop.
openmw-vr-git putative PKGBUILD 0.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Your Name <[email protected]> | |
pkgname=openmw-vr | |
pkgver=0.48.0 | |
pkgrel=1 | |
pkgdesc="Unofficial VR open source engine reimplementation of the game Morrowind" | |
arch=('x86_64') | |
url="https://openmw.org/" | |
license=('GPL3') | |
depends=( | |
'boost-libs' | |
'bullet' | |
'ffmpeg6.1' # Pinned to version 6 as per the nix package | |
'libglvnd' | |
'luajit' | |
'lz4' | |
'mygui' | |
'openal' | |
'openscenegraph' | |
'openxr' | |
'recastnavigation-openmw' | |
'sdl2' | |
'unshield' | |
'yaml-cpp' | |
'libxdmcp' | |
'libxrandr' | |
'libxt' | |
'libxxf86vm' | |
) | |
makedepends=( | |
'boost' | |
'cmake' | |
'doxygen' | |
'gcc' | |
'git' | |
'graphviz' | |
'mesa' # Needed for runtime dependency check | |
'pkg-config' | |
'python' | |
'qt5-tools' # For wrapQtAppsHook equivalent functionality | |
) | |
optdepends=( | |
'openmw-shaders-ogre: Ogre shaders' | |
'openmw-launcher: GUI to edit settings and manage mods' # Assuming a VR compatible launcher exists | |
) | |
provides=('openmw') | |
conflicts=('openmw-git' 'openmw') | |
source=( | |
"${pkgname}-${pkgver}.tar.gz::https://gitlab.com/madsbuvi/openmw/-/archive/770584c5112e46be1a00b9e357b0b7f6b449cac5/openmw-770584c5112e46be1a00b9e357b0b7f6b449cac5.tar.gz" | |
"OpenXR-SDK_4_OpenMW-VR_Nix.tar.gz::https://github.com/bndlfm/OpenXR-SDK_4_OpenMW-VR_Nix/archive/d417ad122a04c1a6d191928170aa1a6368229678.tar.gz" | |
) | |
sha256sums=( | |
'cb440daae29492cd24d1fef498b7317ef84d5f1381317e3a2ce00518c69dc6e7' # Replace with actual checksum for openmw source | |
'0aed2c97f82ec70b7badaec75e73a75d8aaa0cfe81b03e96fde59f9baf120c09' # Replace with actual checksum for OpenXR-SDK | |
) | |
prepare() { | |
cd "${srcdir}/openmw-770584c5112e46be1a00b9e357b0b7f6b449cac5" | |
# Patch for gcc12 compatibility (if still needed) | |
sed '1i#include <memory>' -i components/myguiplatform/myguidatamanager.cpp | |
# Extract and prepare OpenXR SDK | |
mkdir -p "${srcdir}/OpenXR-SDK" | |
tar -xf "${srcdir}/OpenXR-SDK_4_OpenMW-VR_Nix.tar.gz" -C "${srcdir}/OpenXR-SDK" --strip-components=1 | |
} | |
build() { | |
cd "${srcdir}/openmw-770584c5112e46be1a00b9e357b0b7f6b449cac5" | |
mkdir -p build | |
cd build | |
cmake \ | |
-DCMAKE_INSTALL_PREFIX=/usr \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DOPENMW_USE_SYSTEM_RECASTNAVIGATION=ON \ | |
-DBUILD_OPENMW_VR=ON \ | |
-DFETCHCONTENT_SOURCE_DIR_OPENXR="${srcdir}/OpenXR-SDK" \ | |
-DBoost_DEBUG=OFF \ | |
.. | |
make | |
} | |
package() { | |
cd "${srcdir}/openmw-770584c5112e46be1a00b9e357b0b7f6b449cac5/build" | |
make DESTDIR="${pkgdir}" install | |
# Install license | |
install -Dm644 "${srcdir}/openmw-770584c5112e46be1a00b9e357b0b7f6b449cac5/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" | |
# Install openmw_vr binary specifically | |
install -Dm755 openmw_vr "${pkgdir}/usr/bin/openmw_vr" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment