You are not logged in.

#1 2021-09-02 05:10:13

yokai.shogun
Member
From: Canada
Registered: 2021-09-02
Posts: 5
Website

PKGBUILD review request: uqm-megamod

Hi, I wrote a pkgbuild for uqm-megamod by serosis and separate pkgbuild's for the content packages. It's the best and most complete version of the game to my knowledge. Let me know if and what is there to fix. Thanks!

uqm-megamod | PKGBUILD | tree
uqm-megamod-data | PKGBUILD | tree
uqm-megamod-addon-hd | PKGBUILD | tree
uqm-megamod-addon-3do | PKGBUILD | tree
uqm-megamod-addon-sol-textures | PKGBUILD | tree
uqm-megamod-addon-vols-remix | PKGBUILD | tree

Last edited by yokai.shogun (2021-09-03 15:22:22)

Offline

#2 2021-09-02 08:38:11

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: PKGBUILD review request: uqm-megamod

Could you please post the contents of all source entries that are not downloadable or at least the contents of config.state.  uqm-megamod is failing to build for me in a clean chroot with a default generated config.

==> Starting prepare()...
'echo -n' capable echo found.
Sed stream editor found.
tr found.
Make found.
build/unix/config_proginfo_host: line 253: libmikmod-config: command not found
build/unix/config_proginfo_host: line 254: libmikmod-config: command not found
build/unix/config_proginfo_host: line 255: libmikmod-config: command not found
GNU C compiler found.
We have a C preprocessor.
We have a C dependency generator.
We have a C compiler.
We have a C++ preprocessor.
We have a C++ dependency generator.
We have a C++ compiler.
We have a linker.
Little-endian machine detected.
Simple DirectMedia Layer version 1.2.15 found.
Simple DirectMedia Layer version 2.x found.
libpng found.
Symbol 'readdir_r' found.
Symbol 'setenv' found.
Symbol 'strupr' not found.
Symbol 'strcasecmp' found.
Symbol 'stricmp' not found.
Symbol 'acos' not found.
Symbol 'iswgraph' found.
Type 'wchar_t' found.
Type 'wint_t' found.
Symbol 'getopt_long' found.
Header 'regex.h' found.
Type '_Bool' found.
Preprocessor macro 'WIN32' not found.
Preprocessor macro '__MINGW32__' not found.
OpenGL found.
libmikmod not found.
==> ERROR: A failure occurred in prepare().
    Aborting...

Last edited by loqs (2021-09-02 08:43:57)

Offline

#3 2021-09-02 10:59:58

a821
Member
Registered: 2012-10-31
Posts: 381

Re: PKGBUILD review request: uqm-megamod

At a glance, there are unquoted references to $pkgdir and $srcdir. The license should be "GPL2" (not "GPLv2") per convention.

And I'm wondering, why are the sources downloaded from your(?) fork and not from the upstream URL?

Offline

#4 2021-09-02 14:25:11

yokai.shogun
Member
From: Canada
Registered: 2021-09-02
Posts: 5
Website

Re: PKGBUILD review request: uqm-megamod

Hi, I edited my post to include all the files and to reflect the suggested changes I made. It wouldn't build without the "config.state" because by default it tries to use system libmikmod and lua instead of included ones. I fixed the license and quoted everything that should be quoted. I use my own fork as a source for content because when I try to use Serosis' website as source, where he keeps built versions of the content packages, for example http://files.serosis.net/MegaMod/0.8.0. … ontent.uqm it gives me:

curl: (22) The requested URL returned error: 406

Should I just use my fork completely as a base? The only change I made is add Nintendo Switch build support to it, and a few minor changes like change the location of user dir, which I am doing anyway using a patch. And I might want to work more on my fork in the future.

Offline

#5 2021-09-02 14:52:59

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: PKGBUILD review request: uqm-megamod

Can uqm-megamod not use the system provided mikmod and lua52?  Missing depends on glu.  Is sdl2 needed as well as sdl?
Adding the following before reprocess config adds FULL RELRO:

  sed -i 's/uqm_CFLAGS="$uqm_CFLAGS -Isrc"/uqm_CFLAGS="$CPPFLAGS $CFLAGS $uqm_CFLAGS -Isrc"/' Makeproject
  sed -i 's/uqm_CXXFLAGS="$uqm_CXXFLAGS -Isrc"/uqm_CXXFLAGS="$CPPFLAGS $CXXFLAGS $uqm_CXXFLAGS -Isrc"\nuqm_LDFLAGS="$LDFLAGS $uqm_LDFLAGS"/' Makeproject

uqm-megamod-data/uqm-megamod-addons-hd/uqm-megamod-addons-3do appear to be https://creativecommons.org/licenses/by-nc-sa/2.5/ instead of GPL2

Offline

#6 2021-09-02 15:14:33

yokai.shogun
Member
From: Canada
Registered: 2021-09-02
Posts: 5
Website

Re: PKGBUILD review request: uqm-megamod

Edited to reflect the changes. I'm not sure if it can use system mikmod and lua, it failed to build for me. I'll give it another try. Added dependency for "glu". Modified config.state to build against SDL2 instead of SDL1 and removed SDL1 dependency. Added FULL RELRO. Fixed the licenses for content packs. Now using my fork of the content repo as upstream and download source.

Edit:

I get this on build when trying to build using system mikmod and lua, by modifying the config.state from 'internal' to 'external':

src/libs/luauqm/luauqm.c:40:11: error: ‘LUA_BITLIBNAME’ undeclared here (not in a function); did you mean ‘LUA_IOLIBNAME’?
   40 |         { LUA_BITLIBNAME,    luaopen_bit32 },
      |           ^~~~~~~~~~~~~~
      |           LUA_IOLIBNAME
src/libs/luauqm/luauqm.c:40:30: error: ‘luaopen_bit32’ undeclared here (not in a function); did you mean ‘luaopen_math’?
   40 |         { LUA_BITLIBNAME,    luaopen_bit32 },
      |                              ^~~~~~~~~~~~~
      |                              luaopen_math
make: *** [Makefile.build:68: obj/release/src/libs/luauqm/luauqm.c.o] Error 1
make: *** Waiting for unfinished jobs....
==> ERROR: A failure occurred in build().
    Aborting...

config.state

...
CHOICE_mikmod_VALUE='external'
CHOICE_lua_VALUE='external'
...

Last edited by yokai.shogun (2021-09-02 15:24:25)

Offline

#7 2021-09-02 16:11:29

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: PKGBUILD review request: uqm-megamod

Adding "lua52" "libmikmod" to depends and the following ugly addition builds locally

build() {
  CFLAGS+=" $(pkgconf --cflags lua52 pkgconf --cflags libmikmod)"
  LDFLAGS+=" $(pkgconf --libs lua52) $(pkgconf --libs libmikmod)"
  cd "${srcdir}/${pkgname}-${pkgver}"
....

Offline

#8 2021-09-02 16:20:34

yokai.shogun
Member
From: Canada
Registered: 2021-09-02
Posts: 5
Website

Re: PKGBUILD review request: uqm-megamod

Yes, builds and runs well for me as well. Edited the post to reflect the changes. I also added Sol Texture and Vol's Remix content packs while I'm at it.

Edit:

It's available on AUR now:

https://aur.archlinux.org/packages/uqm-megamod/
https://aur.archlinux.org/packages/uqm-megamod-data/
https://aur.archlinux.org/packages/uqm- … -addon-hd/
https://aur.archlinux.org/packages/uqm- … addon-3do/
https://aur.archlinux.org/packages/uqm- … -textures/
https://aur.archlinux.org/packages/uqm- … ols-remix/

Thanks for the input and let me know if there's anything else to fix or improve!

Last edited by yokai.shogun (2021-09-03 01:17:05)

Offline

#9 2021-09-03 07:55:59

a821
Member
Registered: 2012-10-31
Posts: 381

Re: PKGBUILD review request: uqm-megamod

yokai.shogun wrote:

I use my own fork as a source for content because when I try to use Serosis' website as source, where he keeps built versions of the content packages, for example http://files.serosis.net/MegaMod/0.8.0. … ontent.uqm it gives me:

curl: (22) The requested URL returned error: 406

It seems upstream blocks "curl" as user-agent (wget works), so you could set DLAGENTS in the PKGBUILD. For example, this works for me™

DLAGENTS=('http::/usr/bin/curl -gqb "" -A "Mozilla/5.0" -fLC - --retry 3 --retry-delay 3 -o %o %u')
yokai.shogun wrote:

Should I just use my fork completely as a base? The only change I made is add Nintendo Switch build support to it, and a few minor changes like change the location of user dir, which I am doing anyway using a patch. And I might want to work more on my fork in the future.

IMHO, it is OK to use your own fork, but for the sake of transparency one should mention/comment on what you are modifying...

Offline

#10 2021-09-03 15:09:52

yokai.shogun
Member
From: Canada
Registered: 2021-09-02
Posts: 5
Website

Re: PKGBUILD review request: uqm-megamod

Okay, it worked for me too after replacing "http" with "https" and using https in the upstream. Uploaded to aur to reflect the changes. The main change in my fork is the addition of Nintendo Switch build support, other than that, there are no changes for now. I will use Serosis' fork for this set of packages and when I add more to mine, I will rename it and upload as a separate package here.

Offline

Board footer

Powered by FluxBB