Package Details: openrct2-git 0.4.4.r18.g1174063c27-1

Git Clone URL: https://aur.archlinux.org/openrct2-git.git (read-only, click to copy)
Package Base: openrct2-git
Description: Open source re-implementation of Roller Coaster Tycoon 2 (requires full copy of the game)
Upstream URL: https://openrct2.io
Licenses: GPL3
Conflicts: openrct2
Provides: openrct2
Submitter: grahamedgecombe
Maintainer: rctdude2
Last Packager: rctdude2
Votes: 29
Popularity: 0.000072
First Submitted: 2014-05-27 09:56 (UTC)
Last Updated: 2023-04-01 20:12 (UTC)

Dependencies (22)

Required by (1)

Sources (1)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 .. 14 Next › Last »

Thaodan commented on 2022-06-12 21:41 (UTC) (edited on 2022-06-12 21:53 (UTC) by Thaodan)

This is my pkgbuild with all the fixes I just mentioned:

diff --git a/PKGBUILD b/PKGBUILD
index 4ec7047..874ce7b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,15 +1,16 @@
 # Maintainer: Graham Edgecombe <graham@grahamedgecombe.com>
 pkgname=openrct2-git
-pkgver=r21143.594b08c91
+pkgver=0.4.0.r236.gb0ffa9d28e
 pkgrel=1
 pkgdesc='Open source re-implementation of Roller Coaster Tycoon 2 (requires full
          copy of the game)'
 arch=('i686' 'x86_64' 'armv7h' 'aarch64')
 url='https://openrct2.io'
 license=('GPL3')
-depends=('hicolor-icon-theme' 'sdl2' 'curl' 'nlohmann-json' 'speexdsp'
-         'fontconfig' 'libpng' 'openssl' 'libzip' 'icu' 'duktape' 'benchmark')
-makedepends=('git' 'cmake' 'discord-rpc-api')
+depends=('hicolor-icon-theme' 'sdl2' 'curl' 'speexdsp'
+         'fontconfig' 'libpng' 'openssl' 'libzip' 'icu' 'benchmark'
+         'libogg' 'libvorbis' 'flac' 'discord-rpc')
+makedepends=('git' 'cmake' 'nlohmann-json')
 optdepends=('zenity: System dialog box support (GNOME/GTK)'
             'kdialog: System dialog box support (KDE)'
             'alsa-lib: ALSA audio driver'
@@ -21,24 +22,29 @@ source=("$pkgname"::'git+https://github.com/OpenRCT2/OpenRCT2.git#branch=develop
 sha256sums=('SKIP')

 pkgver() {
-  cd "$srcdir/$pkgname"
-  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+  cd "$pkgname"
+  git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
 }

 build() {
-  cd "$srcdir/$pkgname"
+  # Required options to workaround GCC 12 issues
+  # https://github.com/OpenRCT2/OpenRCT2/issues/17371
+  CXXFLAGS+=" -Wno-error=maybe-uninitialized  -Wno-error=restrict  -Wno-error=null-dereference"

-  mkdir -p build
-  cd build
-  cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr \
-    -DCMAKE_INSTALL_LIBDIR=/usr/lib ..
-  make all g2
+  # Needed to be able to build while LTO is enabled
+  # https://github.com/OpenRCT2/OpenRCT2/issues/6200
+  CXXFLAGS+="  -Wno-error=stringop-overflow"
+
+  cmake -B build -S "$pkgname" \
+        -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+        -DCMAKE_INSTALL_PREFIX='/usr' \
+        -DSTATIC=OFF \
+        -Wno-dev
+  cmake --build build -v
 }

 package() {
-  cd "$srcdir/$pkgname/build"
-
-  make DESTDIR="$pkgdir" install
+  DESTDIR="$pkgdir" cmake --install build

   rm "$pkgdir/usr/lib/libopenrct2.a"
   rmdir "$pkgdir/usr/lib"

Thaodan commented on 2022-06-12 20:00 (UTC)

Add this to able to compile: export CXXFLAGS+=" -Wno-error=maybe-uninitialized -Wno-error=restrict -Wno-error=null-dereference"

See:

https://github.com/OpenRCT2/OpenRCT2/issues/17371

Thaodan commented on 2022-06-12 19:33 (UTC)

Benchmark is only optional dependency. The pkgbuild should be updated against cmake packaging guidelines.

Thaodan commented on 2022-06-12 19:17 (UTC) (edited on 2022-06-12 21:05 (UTC) by Thaodan)

I think the closest replacement is discord-rpc-git. In any case if build with discord-rpc enabled its a depend and not a make depend.

Thaodan commented on 2022-06-12 19:16 (UTC)

discord-rpc-api doesn't exist anymore.

IntelOrca commented on 2022-06-09 23:23 (UTC) (edited on 2022-06-09 23:23 (UTC) by IntelOrca)

duktape is no longer required

libflac, libogg, and libvorbis are now required (unless disabled via cmake option)

colejohnson66 commented on 2021-04-23 19:57 (UTC) (edited on 2021-04-23 19:59 (UTC) by colejohnson66)

To fix the error, I just opened up PKGBUILD in a text editor and removed the 4 rm lines and 2 rmdir lines inside package() (unified diff below). These should probably be changed to conditional removals ala [[ -f FILE ]] && rm FILE.

--- PKGBUILD    2021-04-22 17:39:41.671454399 -0400
+++ PKGBUILD    2021-04-23 15:56:07.402117749 -0400
@@ -49,12 +49,4 @@
   cd "$srcdir/$pkgname/build"

   make DESTDIR="$pkgdir" install
-
-  rm "$pkgdir/usr/lib/libopenrct2.a"
-  rm "$pkgdir/usr/lib/libdiscord-rpc.a"
-  rmdir "$pkgdir/usr/lib"
-
-  rm "$pkgdir/usr/include/discord_rpc.h"
-  rm "$pkgdir/usr/include/discord_register.h"
-  rmdir "$pkgdir/usr/include"
 }

MrAureliusR commented on 2021-04-04 16:21 (UTC) (edited on 2021-04-04 16:23 (UTC) by MrAureliusR)

Since commit 818b2a5239 on Jan 11 for implementing https://github.com/OpenRCT2/OpenRCT2/pull/13658, openrct2 build will detect the system discord rpc library. > Now if discord-rpc-api is installed, this openrct2-git package will fail with

rm: cannot remove '/home/will/.cache/yay/openrct2-git/pkg/openrct2-git/usr/lib/libdiscord-rpc.a': No such file or directory
==> ERROR: A failure occurred in package().

because openrct2 won't build discord rpc if there is a system one present.

Using the system library or the local discord-rpc repo both produce the same file list, so requiring discord-rpc-api as a build dependency would work here.```

I am having this error and I cannot figure out how to get it to build. Do I need to remove Discord first? I tried added discord-rpc-api to both depends and/or makedepends before building, had no effect. Any tips would be greatly appreciated!

JudgeManganese commented on 2021-02-16 01:08 (UTC)

Since commit 818b2a5239 on Jan 11 for implementing https://github.com/OpenRCT2/OpenRCT2/pull/13658, openrct2 build will detect the system discord rpc library. Now if discord-rpc-api is installed, this openrct2-git package will fail with

rm: cannot remove '/home/will/.cache/yay/openrct2-git/pkg/openrct2-git/usr/lib/libdiscord-rpc.a': No such file or directory
==> ERROR: A failure occurred in package().

because openrct2 won't build discord rpc if there is a system one present.

Using the system library or the local discord-rpc repo both produce the same file list, so requiring discord-rpc-api as a build dependency would work here.