# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
# Contributors: Mr.Smith1974, LaPingvino
pkgname=openloco
pkgver=25.10
pkgrel=1
pkgdesc="An open source re-implementation of Chris Sawyer's Locomotion"
arch=(x86_64 i686)
url="https://github.com/OpenLoco/OpenLoco"
license=(MIT)
depends=(sdl2 libpng openal)
depends_x86_64+=(lib32-glibc lib32-gcc-libs lib32-sdl2 lib32-libpng lib32-openal)
makedepends=(cmake yaml-cpp gtest fmt git)
makedepends_x86_64+=(lib32-gtest)
optdepends=(
'lib32-libpipewire: audio output'
'lib32-libpulse: audio output'
)
options=(!lto)
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/OpenLoco/OpenLoco/archive/refs/tags/v${pkgver}.tar.gz"
"openloco.desktop")
sha256sums=('cc0efc1f30ca92c456879633d0e5de9e0dcfb5f41c5d2a178d234c278b70057f'
'57512f00144c1e0d2cc91c3adbf38460d5ec1223afc27bd16e1271760bce02ae')
build() {
local _flags=(
-DFETCHCONTENT_QUIET=OFF
)
export CXXFLAGS="$CXXFLAGS -m32 -Wno-error=null-dereference"
#export CXXFLAGS="$CXXFLAGS -m32"
cmake -G "Unix Makefiles" -B build -S "OpenLoco-${pkgver}" -Wno-dev \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DUSE_SYSTEM_FMT=ON \
"${_flags[@]}"
cmake --build build
}
check() {
ctest --test-dir build --output-on-failure
}
package() {
install -Dm644 "openloco.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
DESTDIR="${pkgdir}" cmake --install build
# Remove bundled fmt files to avoid conflicts with system fmt package
rm -rf "${pkgdir}/usr/include/fmt"
rm -rf "${pkgdir}/usr/lib/cmake/fmt"
rm -rf "${pkgdir}/usr/lib/pkgconfig/fmt.pc"
install -D "OpenLoco-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
#remove bundled sfl from package
rm -rf "${pkgdir}/usr/share/include/sfl"
}
Search Criteria
Package Details: openloco 25.03-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/openloco.git (read-only, click to copy) |
---|---|
Package Base: | openloco |
Description: | An open source re-implementation of Chris Sawyer's Locomotion |
Upstream URL: | https://github.com/OpenLoco/OpenLoco |
Keywords: | game locomotion manager remaster simulation trains tycoon |
Licenses: | MIT |
Submitter: | Mr.Smith1974 |
Maintainer: | FabioLolix |
Last Packager: | FabioLolix |
Votes: | 6 |
Popularity: | 0.000076 |
First Submitted: | 2023-06-07 08:34 (UTC) |
Last Updated: | 2025-04-06 17:31 (UTC) |
Dependencies (18)
- lib32-fmtAUR
- lib32-gcc-libs (lib32-gcc-libs-gitAUR, lib32-gccrs-libs-gitAUR, lib32-gcc-libs-snapshotAUR)
- lib32-glibc (lib32-glibc-gitAUR, lib32-glibc-eacAUR)
- lib32-libpng
- lib32-openal
- lib32-sdl2AUR (lib32-sdl2-compat-gitAUR, lib32-sdl2-compat)
- lib32-yaml-cppAUR
- libpng (libpng-gitAUR, libpng-apngAUR)
- openal (openal-gitAUR)
- sdl2AUR (sdl2-compat-gitAUR, sdl2-gitAUR, sdl2-compat)
- cmake (cmake3AUR, cmake-gitAUR) (make)
- fmt (fmt-gitAUR) (make)
- git (git-gitAUR, git-glAUR) (make)
- gtest (googletest-gitAUR) (make)
- lib32-gtestAUR (make, x86_64)
- yaml-cpp (make)
- lib32-libpipewire (optional) – audio output
- lib32-libpulse (optional) – audio output
Required by (0)
Sources (2)
LaPingvino commented on 2025-10-17 17:38 (UTC) (edited on 2025-10-17 17:38 (UTC) by LaPingvino)
FabioLolix commented on 2024-10-06 13:41 (UTC)
Thanks for reporting, if you want to make a patch the pkgbuilds are hosted here https://github.com/FabioLolix/PKGBUILD-AUR_fix
sheddow commented on 2024-10-06 13:31 (UTC)
Thanks for maintaining this package! I got this error during compilation: undefined reference to `fmt::v11::vformat[abi:cxx11 (fmt::v11::basic_string_view<char>, fmt::v11::basic_format_args<fmt::v11::context>)'
I found that lib32-fmt is out-of-date, updating it manually to 11.0.2 fixed it. Now it compiles fine, but TimerTest.TestReset fails. All the other tests pass though, and the game seems to run fine regardless
FabioLolix commented on 2024-09-29 13:26 (UTC)
I've got a new build problem
That issue was due to lib32-getest
not in sync with gtest
Some days ago I had updated locally to v24.09.1 but had a build problem
FabioLolix commented on 2024-08-11 13:42 (UTC)
I've got a new build problem
vincentv commented on 2024-07-29 14:25 (UTC) (edited on 2024-07-29 14:28 (UTC) by vincentv)
In case anyone is interested in v24.07, a small patch for the PKGBUILD:
--- <unnamed>
+++ <unnamed>
@@ -2,7 +2,7 @@
# Contributor: Mr.Smith1974
pkgname=openloco
-pkgver=24.04
+pkgver=24.07
pkgrel=1
pkgdesc="An open source re-implementation of Chris Sawyer's Locomotion"
arch=(x86_64 i686)
@@ -18,14 +18,14 @@
)
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/OpenLoco/OpenLoco/archive/refs/tags/v${pkgver}.tar.gz"
"openloco.desktop")
-sha256sums=('2141891fc795460e92657aead379a3bdf32069f7f938e42eae4a1e595edd686b'
+sha256sums=('69c6b353d90b5edcecbb3fe7433483c507d9177cdf2ab8576b46069b6272632d'
'57512f00144c1e0d2cc91c3adbf38460d5ec1223afc27bd16e1271760bce02ae')
options=(!lto)
build() {
export CXXFLAGS="$CXXFLAGS -m32"
cmake -G "Unix Makefiles" -B build -S "OpenLoco-${pkgver}" -Wno-dev \
- -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_BUILD_TYPE=release \
-DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
(I've had to change to build type "release" instead of "None" for it to work on my machine)
FabioLolix commented on 2024-04-01 20:56 (UTC)
- issue reported https://github.com/OpenLoco/OpenLoco/issues/2391
@CodingKoopa thanks for reporting will be added with the new version
FabioLolix commented on 2024-03-19 06:17 (UTC)
New version is failing to build for missing file
==> Starting package()...
-- Install configuration: "None"
-- Installing: /build/openloco/pkg/openloco/usr/bin/OpenLoco
-- Installing: /build/openloco/pkg/openloco/usr/share/doc/openloco/CHANGELOG.md
CMake Error at build/cmake_install.cmake:71 (file):
file INSTALL cannot find
"/build/openloco/src/OpenLoco-24.02.1/DEVELOPMENTLOG.md": No such file or
directory.
==> ERROR: A failure occurred in package().
CodingKoopa commented on 2024-02-10 23:00 (UTC) (edited on 2024-03-24 03:02 (UTC) by CodingKoopa)
Note that this also depends on having a 32-bit client library for your sound server. On PulseAudio, I needed to install lib32-libpulse
to fix ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_pulse.so (libpulse.so.0: cannot open shared object file: No such file or directory)
.
On Pipewire, I instead needed to install lib32-pipewire
(which also depends on lib32-libpipewire
).
Pinned Comments
FabioLolix commented on 2024-10-06 13:41 (UTC)
Thanks for reporting, if you want to make a patch the pkgbuilds are hosted here https://github.com/FabioLolix/PKGBUILD-AUR_fix