Skip to content

Instantly share code, notes, and snippets.

@Un1Gfn
Last active June 23, 2021 15:50
Show Gist options
  • Save Un1Gfn/a0e8e5e1be51b41c1af09eccf12d121a to your computer and use it in GitHub Desktop.
Save Un1Gfn/a0e8e5e1be51b41c1af09eccf12d121a to your computer and use it in GitHub Desktop.
*
!/.gitignore
!/PKGBUILD
!/.SRCINFO
!/*.patch
pkgbase = openrw-git
pkgdesc = A re-implementation of Rockstar Games' Grand Theft Auto III
pkgver = r1976.30856790
pkgrel = 1
url = https://github.com/rwengine/openrw
arch = x86_64
license = GPL3
makedepends = git
makedepends = cmake
makedepends = make
depends = bullet
depends = glm
depends = libmad
depends = openal
depends = libsndfile
depends = sdl2
depends = boost
depends = ffmpeg
provides = openrw
conflicts = openrw
source = openrw-git::git+https://github.com/rwengine/openrw.git
source = openrw.desktop
source = 0001-fix-linux-build-error.patch
source = git+https://github.com/ocornut/imgui.git
source = git+https://github.com/jonasmr/microprofile.git
sha256sums = SKIP
sha256sums = 78f96261cf22a5413f4e17480b9cb08ce4da8683fb2f8399018e80c96246d0b0
sha256sums = daf615e9ee4865dee606d8a6f197a83e65650dc0bf239dbb0670287d2ec43c04
sha256sums = SKIP
sha256sums = SKIP
pkgname = openrw-git
From bc636abd3dafdfe89f68eb8cad1790075cc2b75a Mon Sep 17 00:00:00 2001
From: Darren Ng <[email protected]>
Date: Wed, 23 Jun 2021 22:41:35 +0800
Subject: [PATCH] fix linux build error
---
rwengine/src/ai/TrafficDirector.hpp | 1 +
rwengine/src/audio/SoundBufferStreamed.cpp | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/rwengine/src/ai/TrafficDirector.hpp b/rwengine/src/ai/TrafficDirector.hpp
index 5b182544..8e2aa899 100644
--- a/rwengine/src/ai/TrafficDirector.hpp
+++ b/rwengine/src/ai/TrafficDirector.hpp
@@ -2,6 +2,7 @@
#define _RWENGINE_TRAFFICDIRECTOR_HPP_
#include <vector>
+#include <cstddef> // size_t maximumPedestrians
class GameWorld;
class GameObject;
diff --git a/rwengine/src/audio/SoundBufferStreamed.cpp b/rwengine/src/audio/SoundBufferStreamed.cpp
index 3832000a..591eedb8 100644
--- a/rwengine/src/audio/SoundBufferStreamed.cpp
+++ b/rwengine/src/audio/SoundBufferStreamed.cpp
@@ -1,4 +1,6 @@
-#include "audio/SoundBufferStreamed.hpp"
+#include <thread> // error: ‘sleep_for’ is not a member of ‘std::this_thread’
+
+#include "audio/SoundBufferStreamed.hpp"
#include <rw/types.hpp>
--
2.32.0
[Desktop Entry]
Type=Application
Version=1.0
Name=OpenRW
Comment=OpenRW "Open ReWrite" is an un-official open source recreation of the classic Grand Theft Auto III game executable
Exec=rwgame
Icon=openrw
Terminal=false
Categories=Game;
# Maintainer: tjbp ([email protected])
# Contributor: PureTryOut
# Contributor: Darren Ng <$(base64 --decode <<<VW4xR2ZuQGdtYWlsLmNvbQo=)>
pkgname=openrw-git
pkgver=r1976.30856790
pkgrel=1
epoch=
pkgdesc="A re-implementation of Rockstar Games' Grand Theft Auto III"
arch=('x86_64')
url="https://github.com/rwengine/openrw"
license=('GPL3')
groups=()
depends=('bullet' 'glm' 'libmad' 'openal' 'libsndfile' 'sdl2' 'boost' 'ffmpeg')
makedepends=('git' 'cmake' 'make')
checkdepends=()
optdepends=()
provides=('openrw')
conflicts=('openrw')
replaces=()
backup=()
options=()
install=
changelog=
source=('openrw-git::git+https://github.com/rwengine/openrw.git'
'openrw.desktop' '0001-fix-linux-build-error.patch'
'git+https://github.com/ocornut/imgui.git'
'git+https://github.com/jonasmr/microprofile.git')
noextract=()
sha256sums=('SKIP'
'78f96261cf22a5413f4e17480b9cb08ce4da8683fb2f8399018e80c96246d0b0'
'daf615e9ee4865dee606d8a6f197a83e65650dc0bf239dbb0670287d2ec43c04'
'SKIP'
'SKIP')
validpgpkeys=()
pkgver() {
cd "$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "$pkgname"
# git submodule update --init --recursive
git submodule init
git config submodule."imgui".url "$srcdir/imgui"
git config submodule."external/microprofile/microprofile".url "$srcdir/microprofile"
git submodule update
# git format-patch master
# git am "$srcdir/${source[2]}" # Commit - affects pkgver()
git apply "$srcdir/${source[2]}" # No commit - staging area only
}
build() {
cd "$pkgname"
if [[ -d build ]]; then
rm -rf build
fi
mkdir build && cd build
# export CFLAGS="$CFLAGS -D_GLIBCXX_USE_NANOSLEEP"
cmake -DCMAKE_BUILD_TYPE=Release ..
make $MAKEFLAGS
}
package() {
cd "$pkgname"
# The application
install -Dm755 build/rwgame/rwgame "$pkgdir/usr/bin/rwgame"
# .desktop file and icon
install -Dm644 "$srcdir/openrw.desktop" "$pkgdir"/usr/share/applications/openrw.desktop
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment