recoil-engine

LOW
maintainer Wabuo 1 votes scanned 2026-08-28 19:36:26.027686
View on AUR
Why flagged

The package builds from the project's official GitHub repository, applies minor patches, and installs locally; the only concern is a SKIP'd checksum and recent upload with few votes, but no malicious or unverifiable remote code execution is present.

Triggered rules

Low Few votes, recently uploaded zero_votes_recent

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

Low AI review llm_review

An AI model (qwen/qwen3-235b-a22b-2507) reviewed this and agrees it is LOW (confidence 95%): The package builds from the project's official GitHub repository, applies minor patches, and installs locally; the only concern is a SKIP'd checksum and recent upload with few votes, but no malicious or unverifiable remote code execution is present.

PKGBUILD

1# Maintainer: Wabuo <Spam [.] Wabuo [at] GoogleMail [.] Com>
2# Contributor: zxp19821005 <zxp19821005 at 163 dot com>
3
4###
5### This PGKGBUILD implements the build instructions from https://github.com/beyond-all-reason/RecoilEngine/wiki/Building-and-developing-engine-without-docker
6###
7
8pkgname=recoil-engine
9pkgver=VERSION # This will be automatically updated by makepkg via pkgver()
10pkgrel=1
11pkgdesc="A powerful free cross-platform RTS game engine. (GitHub — latest Stable/Release tag).
12This version is the stable engine release used by BAR."
13arch=('x86_64')
14url="https://beyond-all-reason.github.io/RecoilEngine/"
15_ghurl="https://github.com/beyond-all-reason/RecoilEngine"
16### Only use _tag or _git_commit never use both at the same time! Default is neither to build the latest Pre-release.
17### https://github.com/beyond-all-reason/RecoilEngine/releases
18#_git_commit='#commit=2bf7e22d2792236377c218f8c06e27ded2984f81'
19#_tag="#tag=2025.04.11"
20#_tag="#tag=2025.06.06"
21
22options=(debug !strip)
23
24license=('GPL-2.0-or-later')
25#conflicts=("${pkgname%-git}") ### Not needed, multiple versions of the engine can be installed besides each other
26depends=('curl' 'sdl2' 'devil' 'p7zip' 'openal' 'libogg' 'libvorbis' 'libunwind' 'freetype2' 'glew' 'minizip' 'fontconfig' 'jsoncpp' )
27makedepends=('git' 'curl' 'jq'
28 'ccache' ### curently wont build without
29 'ninja' 'socat' 'python-pip' 'cmake'
30# 'clang' 'lld' ### Only needed if you want to build with the included clang toolchain
31 'compdb' 'gflags')
32optdepends=('bar-lobby' 'bar-lobby-git')
33#install="${pkgname%-git}.install"
34source=("${pkgname%-git}::git+${_ghurl}.git${_tag}${_git_commit}"
35 "guard-invalid-ray-length.patch"
36 "buildcache.patch"
37)
38sha256sums=('SKIP'
39 'f1ec1a8d70f05a9e917cf9edbc4274a7a5efe81dbc51ddfb6778040f65ec33f2'
40 '8c9af0eb1089d2531f5e511292fdde82aef53747b2314104baa850075465035c'
41)
42
43pkgver() {
44 # Set the repository owner and name
45 local owner="beyond-all-reason"
46 local repo="RecoilEngine"
47
48 # Use the GitHub API to get the latest *stable release* (excluding prereleases).
49 # We fetch the first page (up to 30 releases) and pipe it to jq.
50 # The 'latest_tag' variable will hold the version string.
51 local latest_tag
52
53 # Filters for the first entry where "prerelease" is false and extracts the tag_name.
54 latest_tag=$(curl -s "https://api.github.com/repos/${owner}/${repo}/releases" | \
55 jq -r 'map(select(.prerelease == false)) | .[0].tag_name' 2>/dev/null)
56
57 if [[ -n "$latest_tag" && "$latest_tag" != "null" ]]; then
58 # Clean the version number for PKGBUILD standard (replaces hyphens with underscores)
59 printf "%s" "${latest_tag//-/_}"
60 else
61 # Fail loud and hard in case we can't get a tag to checkout
62 echo "FATAL: could not get a tag to checkout, something went horribly wrong!"
63 exit 1
64 fi
65}
66
67
68_get_pkgver() {
69 cd "${srcdir}/${pkgname%-git}"
70 _pkgver=$(git describe --tags | sed 's/^v//;s/-.*//')
71}
72
73
74
75prepare() {
76
77### Toolchains are curently not used in favour makepkg.conf
78
79 mkdir -p toolchain
80
81cat > toolchain/clang_x86_64-pc-linux-gnu.cmake<< EOF
82SET(CMAKE_SYSTEM_NAME Linux)
83SET(CMAKE_C_COMPILER "clang")
84SET(CMAKE_CXX_COMPILER "clang++")
85SET(CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld")
86SET(CMAKE_MODULE_LINKER_FLAGS_INIT "-fuse-ld=lld")
87SET(CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld")
88EOF
89
90cat > toolchain/gcc_x86_64-pc-linux-gnu.cmake<< EOF
91SET(CMAKE_SYSTEM_NAME Linux)
92SET(CMAKE_C_COMPILER "gcc")
93SET(CMAKE_CXX_COMPILER "g++")
94SET(CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld")
95SET(CMAKE_MODULE_LINKER_FLAGS_INIT "-fuse-ld=lld")
96SET(CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld")
97EOF
98
99### Failed attempt at getting it to build with CMake 4.x.x
100#########################################################
101
102# echo "in toolchain @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
103# ls ./toolchain
104
105# sed -i 's/(SET CMP0060 OLD)/(SET CMP0060 NEW)/g' CMakeLists.txt
106# sed -i 's/(SET CMP0065 OLD)/(SET CMP0065 NEW)/g' CMakeLists.txt
107# sed -i 's/cmake_minimum_required(VERSION 3\.0)/cmake_minimum_required(VERSION 3.0...4.1.2)/' rts/lib/glad/CMakeLists.txt
108# sed -i 's/ADD_SUBDIRECTORY(gflags)/#ADD_SUBDIRECTORY(gflags)/' rts/lib/CMakeLists.txt
109# sed -i 's/CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )/cmake_minimum_required(VERSION 2.8...4.1.2)/' rts/lib/assimp/CMakeLists.txt
110# sed -i 's/cmake_minimum_required( VERSION 2.6 )/cmake_minimum_required(VERSION 2.6...4.1.2)/' rts/lib/assimp/code/CMakeLists.txt
111# sed -i 's/cmake_minimum_required(VERSION 3.3)/cmake_minimum_required(VERSION 3.3...4.1.2)/' rts/lib/lunasvg/CMakeLists.txt
112# sed -i 's/cmake_minimum_required(VERSION 3.0)/cmake_minimum_required(VERSION 3.0...4.1.2)/' test/lib/catch2/CMakeLists.txt
113# sed -i ':a; N; $!ba; s/\n\s*//g; s/ gflags_nothreads_static/gflags_nothreads_static/' rts/CMakeLists.txt
114# sed -i '/find_package_static(ZLIB/a find_package(gflags REQUIRED)' rts/CMakeLists.txt
115
116 # find_package(gflags REQUIRED)
117 # find_package(gflags COMPONENTS nothreads_static)
118
119
120 #echo "head ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
121 #head -n 10 rts/lib/lunasvg/CMakeLists.txt
122 #echo "head ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
123
124}
125
126build() {
127 ### Checks if _tag is set. If it is not set (or is empty), it will use the value of ${pkgver}
128 ### Default behavior should be that _tag is unset and therefore gets set to ${pkgver}
129 _tag="${_tag:-${pkgver}}"
130
131
132 cd "${srcdir}/${pkgname%-git}"
133 git checkout "${_tag}"
134 git submodule update --init --recursive
135
136 ### Guards CQuadField::GetQuadsOnRay/GetQuadsOnWideRay against invalid ray lengths,
137 ### which abort hardened builds via std::clamp preconditions.
138 ### https://github.com/beyond-all-reason/RecoilEngine/issues/3018
139 patch -Np1 -i "${srcdir}/guard-invalid-ray-length.patch"
140
141 ### Fixes buildCache entries keyed without the unitDef, which return another building's
142 ### build-square test results (wrong colors / canBuild) when different footprints snap
143 ### to the same position+facing.
144 patch -Np1 -i "${srcdir}/buildcache.patch"
145
146 # Fix 1: Missing <cstdint> for UINT8_MAX
147 sed -i '/#include <string>/i #include <cstdint>' rts/Game/ChatMessage.h
148 # === FIX 2: Missing header for Linux SYSCALL's===
149 sed -i '1i #include <unistd.h>' test/other/testMutex.cpp
150 cd "${srcdir}"
151
152
153 ### use the AUR package instead
154 ## pip install compdb
155
156
157
158 ## For deeper debugin switch to:
159 # -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -g -fno-omit-frame-pointer -DNDEBUG -fdiagnostics-color=always" \
160 # -DCMAKE_C_FLAGS_RELWITHDEBINFO="-O2 -g -fno-omit-frame-pointer -DNDEBUG -fdiagnostics-color=always" \
161
162 #Defaults are:
163 #-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O3 -g -DNDEBUG -fdiagnostics-color=always" \
164 #-DCMAKE_C_FLAGS_RELWITHDEBINFO="-O3 -g -DNDEBUG -fdiagnostics-color=always" \
165
166 ###-G Ninja | -G "Unix Makefiles"
167 ### Arch/CachyOS makepkg.conf injects -Wp,-D_GLIBCXX_ASSERTIONS into CXXFLAGS,
168 ### which turns a latent beamlaser bug into hard in-game SIGABRTs:
169 ### https://github.com/beyond-all-reason/RecoilEngine/issues/3018
170 ### Disabled here on purpose for the stable package (upstream stance: don't build hardened).
171 ### NOTE: this masks a real bug, see the issue above.
172 export CXXFLAGS="${CXXFLAGS//-Wp,-D_GLIBCXX_ASSERTIONS}"
173
174 ### CMake 4.x dropped compatibility with cmake_minimum_required(<3.5) used by bundled libs
175 ### (assimp, lunasvg, glad, gflags, catch2, ...). This is the official escape hatch.
176 export CMAKE_POLICY_VERSION_MINIMUM=3.5
177
178 cmake -S "${srcdir}/${pkgname%-git}" -G Ninja \
179 -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
180 -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
181 -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O3 -g -DNDEBUG -fdiagnostics-color=always" \
182 -DCMAKE_C_FLAGS_RELWITHDEBINFO="-O3 -g -DNDEBUG -fdiagnostics-color=always" \
183 -DCMAKE_BUILD_TYPE=RELWITHDEBINFO \
184 -DAI_TYPES=NATIVE \
185 -DINSTALL_PORTABLE=ON \
186 -DCMAKE_USE_RELATIVE_PATHS:BOOL=1 \
187 -DBINDIR:PATH=./ \
188 -DLIBDIR:PATH=./ \
189 -DDATADIR:PATH=./ \
190 -DCMAKE_INSTALL_PREFIX="$(pwd)/install"
191### Disabled in favor of using the settings from makepkg.conf
192# -DCMAKE_TOOLCHAIN_FILE="toolchain/clang_x86_64-pc-linux-gnu.cmake" \
193
194# V=1 make VERBOSE=1 -j1
195 cd "${srcdir}"; ninja #--verbose
196}
197
198
199package() {
200
201 cd "${srcdir}/${pkgname%-git}"
202 git submodule update --init --recursive
203
204 cd "${srcdir}"
205 ninja install
206
207 _get_pkgver ### Get short pkgver to name engine properly.
208
209 ### The Lobby only recognizes engines following the official versioning scheme!
210 ### adding .local to the end of the name allows us to name it however we want.
211 mkdir -p "${pkgdir}/usr/share/recoil-engine"
212
213 ### Check if the folder already exists and if so delete it — this is needed for dirty rebuilds
214 if [ -d "${srcdir}/systemwide_managed_by_pkgmngr-${_pkgver}.local" ]; then
215 rm -rd "${srcdir}/systemwide_managed_by_pkgmngr-${_pkgver}.local"
216 fi
217 ### rename install folder aka give the engine folder a decent name that will be recognized by bar-lobby
218 ### naming the engine folder with .local at the end allows us to name it how ever we want
219 ### otherwise bar-lobby will only recognize folders named after the official versioning scheme
220 mv --force ${srcdir}/install "${srcdir}/systemwide_managed_by_pkgmngr-${_pkgver}.local"
221 cp --reflink=auto --no-preserve=ownership --recursive --no-dereference "${srcdir}/systemwide_managed_by_pkgmngr-${_pkgver}.local" "${pkgdir}/usr/share/recoil-engine/"
222
223}
224
225# vim:set ts=4 sw=4 et:
226

Scan history

Scanned at (UTC)SeverityRules
2026-08-28 19:36:26 Low 2

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion