Mail archive
alpine-devel

Re: [alpine-devel] [PATCH] testing/mednafen: new aport

From: Amat Coder <amatcoder_at_gmail.com>
Date: Wed, 12 Nov 2014 19:35:40 +0000

That patch is because a wrapper is needed to make it work.

Mednafen requires LD_PRELOAD=libGL.so because this library is not
found by dlopen() with musl (same issue than firefox):
https://bugs.freedesktop.org/show_bug.cgi?id=35268

So we need to rename executable to 'mednafen-bin' and to create a script
called 'mednafen' to process:
'LD_PRELOAD=libGL.so exec mednafen-bin $_at_'

Then, argv[0] points to '/usr/bin/mendnafen-bin'
which is not correct.

argv[0] it is only used when invoking '--help' so I changed to avoid
confusion.

  Regards.


2014-11-12 18:36 GMT+00:00 Isaac Dunham <ibid.ag_at_gmail.com>:

> On Wed, Nov 12, 2014 at 05:28:52PM +0000, AmatCoder wrote:
> > --- /dev/null
> > +++ b/testing/mednafen/01-fix_help.patch
> > _at__at_ -0,0 +1,25 @@
> > +--- origin/src/drivers/main.cpp
> > ++++ mednafen/src/drivers/main.cpp
> > +_at__at_ -696,7 +696,7 @@
> > + if(argc <= 1)
> > + {
> > + printf(_("No command-line arguments specified.\n\n"));
> > +- printf(usage_string, argv[0]);
> > ++ printf(usage_string, "/usr/bin/mednafen");
> >
> It looks like this diff is basically 's_argv[0]_"/usr/bin/mednafen"_g'
>
> And I'm wondering what the benefit of that is, because every program
> I have seen uses argv[0], a synonym thereof, or even basename(argv[0]).
> In fact, *not* having the full path unless it was specified is something
> I'd find desireable enough to justify a patch.
>
> Thanks,
> Isaac Dunham
>
>
>



---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Wed Nov 12 2014 - 19:35:40 GMT