NEW: games/arxlibertatis

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

NEW: games/arxlibertatis

Eternae Nox
games/arxlibertatis

Arx Libertatis is a cross-platform, open source port of Arx Fatalis,
a 2002 first-person role-playing game / dungeon crawler developed by Arkane Studios.
Arx Fatalis features crafting, melee and ranged combat,
as well as a unique casting system where the player draws runes
in real time to effect the desired spell.

Tarball:
https://github.com/subliminalshadow/openbsd/raw/master/arxlibertatis.tar.gz

Reply | Threaded
Open this post in threaded view
|

Re: NEW: games/arxlibertatis

Anthony J. Bentley-3
Eternae Nox writes:

> games/arxlibertatis
>
> Arx Libertatis is a cross-platform, open source port of Arx Fatalis,
> a 2002 first-person role-playing game / dungeon crawler developed by Arkane S
> tudios.
> Arx Fatalis features crafting, melee and ranged combat,
> as well as a unique casting system where the player draws runes
> in real time to effect the desired spell.
>
> Tarball:
> https://github.com/subliminalshadow/openbsd/raw/master/arxlibertatis.tar.gz
Thanks for the port. Some comments:

- why rename to arxlibertatis? freebsd and gentoo both use arx-libertatis.
- license marker (GPLv3+) is necessary for PERMIT_*.
- your RUN_DEPENDS need to be LIB_DEPENDS. (Otherwise what would happen if
  you tried to build without them installed?)
- don't pass linker flags through CXX, and definitely don't hardcode to g++.
  You can get the effect you want with "CONFIGURE_ENV = LDFLAGS=-pthread".
- use WRKDIST/WRKBUILD instead of writing out the full pathnames.
- runtime directories are wrong...

[I] Application:227      Using config file "/usr/ports/mystuff/games/arx-libertatis/${XDG_CONFIG_HOME/arx/cfg.ini"
(snip)
Searched in these locations:
 * /usr/ports/mystuff/games/arx-libertatis/${XDG_DATA_HOME/arx/
 * /usr/ports/mystuff/games/arx-libertatis/${XDG_DATA_DIRS/games/arx/
 * /usr/ports/mystuff/games/arx-libertatis/${XDG_DATA_DIRS/arx/
 * /usr/ports/mystuff/games/arx-libertatis/-/usr/local/share/games/arx/
 * /usr/ports/mystuff/games/arx-libertatis/-/usr/local/share/arx/
 * /usr/share/}/games/arx/
 * /usr/share/}/arx/
 * /opt/games/arx/
 * /opt/arx/

Those XDG dirs shouldn't be prefixed with anything. And it seems to
literally use the variable name instead of evaluating it (creating
${XDG_CONFIG_HOME/ and ${XDG_DATA_HOME/ in $PWD along the way).

Some more minor things:

- COMMENT should probably mention genre (3D dungeon crawling RPG) for
  people who browse package lists looking for games to play.
- DESCR typically wraps at 72 characters (not a hard requirement).
- It helps to reorder things to match Makefile.template. This makes it
  easier to review and update since people read that one all the time.
  Again, not a requirement.

Attached is a port with all of the above fixed except the runtime
directory stuff. That needs a closer look.

--
Anthony J. Bentley

arx-libertatis.tar.gz (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NEW: games/arxlibertatis

Eternae Nox
This post has NOT been accepted by the mailing list yet.
Patched runtime directory path.

Game data should be stored either here:
/usr/local/games/arx
Or here:
$HOME/.local/share/arx
for users and testers.

Tarball:
https://github.com/subliminalshadow/openbsd/raw/master/arx-libertatis.tar.gz
Reply | Threaded
Open this post in threaded view
|

Re: NEW: games/arxlibertatis

Eternae Nox
In reply to this post by Eternae Nox
Patched runtime directory path.

Game data should be stored either here:
/usr/local/share/games/arx
Or here:
/home/username/.local/share/arx
so the game can detect it.

Tarball:
https://github.com/subliminalshadow/openbsd/raw/master/arx-libertatis.tar.gz

Reply | Threaded
Open this post in threaded view
|

Re: NEW: games/arxlibertatis

Anthony J. Bentley-3
Eternae Nox writes:
> Patched runtime directory path.
>
> Game data should be stored either here:
> /usr/local/share/games/arx
> Or here:
> /home/username/.local/share/arx
> so the game can detect it.

(snip)
        set(USER_DIR_PREFIXES
-               "\${XDG_DATA_HOME:-$HOME/.local/share}"
+               ".local/share"
                CACHE STRING "User dir paths"
        )


That's not the right way to fix the problem... in Bourne shell,
${XDG_DATA_HOME:-$HOME/.local/share} expands to either
$XDG_DATA_HOME or (if XDG_DATA_HOME isn't set) to $HOME/.local/share.
That expansion is supposed to happen at runtime. Your change makes it
look under $PWD/.local/share, which only works if you're in your home
directory.

That said, the port itself runs fine on amd64. I bought the game and
messed around, it's kinda fun...

--
Anthony J. Bentley

Reply | Threaded
Open this post in threaded view
|

Re: NEW: games/arxlibertatis

Eternae Nox
In reply to this post by Eternae Nox
Using proper paths yields bad results:
$HOME/.local/share
$HOME/.config
becomes:
/home/user/$HOME/.local/share/arx/
/home/user/$HOME/.config/arx/cfg.ini
just like it happened with original paths. The game wont accept anything else than a hardcoded path, this yields the same results:
/home/$USER/.local/share
/home/$(whoami)/.local/share
and similar variations thereof. An easy solution which "just works" is a wrapper script.

That's why I made the game executable use the current directory. Now it can be used with the wrapper script I've put in an updated tarball:
https://github.com/subliminalshadow/openbsd/raw/master/arx-libertatis.tar.gz

It runs when started from any given directory now, and always looks in $HOME and /usr/local/share/games/arx for data files.