Re: UPDATE devel/sdl 2.0.5

2016-11-10 Thread Jeremie Courreges-Anglas

Committed, thanks.

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



Re: UPDATE devel/sdl 2.0.5

2016-11-10 Thread David CARLIER
Great. thank to you.

On 10 November 2016 at 16:24, Jeremie Courreges-Anglas  wrote:
>
> Committed, thanks.
>
> --
> jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



Re: UPDATE devel/sdl 2.0.5

2016-10-21 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas  writes:

> David CARLIER  writes:
>
>> Hi,
>>
>> here an update of SDL which seems small but now has now an
>> implementation of SDL_GetBasePath function which can benefit to few
>> video games (like supertux), maybe future Adam Wolk port of
>> falltergeist ...
>
> I'm not sure how I understand how important why this function is
> important.  Right now it seems to return the current working directory.

As discussed with David, the current SDL_GetBasePath implementation is
incorrect.  Instead of misleading applications, let's disable it.

> Anyway, functions were added and the size of the SDL_DropEvent struct
> increased - though in a compatible manner.  So it needs a minor bump.
>
>   http://www.openbsd.org/faq/ports/specialtopics.html#SharedLibs
>
> Which consumers of this library have you tested?

Here's an updated diff, but tests are yet to be performed.


Index: Makefile
===
RCS file: /cvs/ports/devel/sdl2/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- Makefile19 Mar 2016 11:34:50 -  1.14
+++ Makefile21 Oct 2016 13:19:03 -
@@ -3,14 +3,13 @@
 COMMENT=   cross-platform multimedia library
 BROKEN-hppa=   src/atomic/SDL_spinlock.c:101:2: error: #error Please implement 
for your platform.
 
-V= 2.0.4
-REVISION=  0
+V= 2.0.5
 DISTNAME=  SDL2-${V}
 PKGNAME=   sdl2-${V}
 CATEGORIES=devel
 MASTER_SITES=  http://www.libsdl.org/release/
 
-SHARED_LIBS=   SDL20.2
+SHARED_LIBS=   SDL20.3
 
 HOMEPAGE=  http://www.libsdl.org/
 
Index: distinfo
===
RCS file: /cvs/ports/devel/sdl2/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo7 Jan 2016 04:49:37 -   1.4
+++ distinfo21 Oct 2016 13:19:03 -
@@ -1,2 +1,2 @@
-SHA256 (SDL2-2.0.4.tar.gz) = 2lXlQL9jMYJBU4BdWLWQopw50tUGxtAvpAmu3qshF0s=
-SIZE (SDL2-2.0.4.tar.gz) = 4136230
+SHA256 (SDL2-2.0.5.tar.gz) = RCA4z1ny/wbZdgMYE95kOvnJ7cnjMb12HCQuh4U=
+SIZE (SDL2-2.0.5.tar.gz) = 4209352
Index: patches/patch-Makefile_in
===
RCS file: /cvs/ports/devel/sdl2/patches/patch-Makefile_in,v
retrieving revision 1.2
diff -u -p -r1.2 patch-Makefile_in
--- patches/patch-Makefile_in   7 Jan 2016 04:49:37 -   1.2
+++ patches/patch-Makefile_in   21 Oct 2016 13:19:03 -
@@ -1,7 +1,7 @@
 $OpenBSD: patch-Makefile_in,v 1.2 2016/01/07 04:49:37 jsg Exp $
 Makefile.in.orig   Sun Jan  3 06:56:31 2016
-+++ Makefile.inSun Jan  3 11:45:11 2016
-@@ -115,7 +115,7 @@ LT_AGE  = @LT_AGE@
+--- Makefile.in.orig   Thu Oct 20 05:56:26 2016
 Makefile.inThu Oct 20 22:23:28 2016
+@@ -121,7 +121,7 @@ LT_AGE  = @LT_AGE@
  LT_CURRENT  = @LT_CURRENT@
  LT_RELEASE  = @LT_RELEASE@
  LT_REVISION = @LT_REVISION@
Index: patches/patch-src_filesystem_unix_SDL_sysfilesystem_c
===
RCS file: patches/patch-src_filesystem_unix_SDL_sysfilesystem_c
diff -N patches/patch-src_filesystem_unix_SDL_sysfilesystem_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-src_filesystem_unix_SDL_sysfilesystem_c   21 Oct 2016 
13:19:03 -
@@ -0,0 +1,31 @@
+$OpenBSD$
+
+Disable SDL_GetBasePath implementation, not functional.
+
+--- src/filesystem/unix/SDL_sysfilesystem.c.orig   Thu Oct 20 05:56:26 2016
 src/filesystem/unix/SDL_sysfilesystem.cFri Oct 21 15:15:01 2016
+@@ -91,24 +91,6 @@ SDL_GetBasePath(void)
+ }
+ }
+ #endif
+-#if defined(__OPENBSD__)
+-char **retvalargs;
+-size_t len;
+-const int mib[] = { CTL_KERN, KERN_PROC_ARGS, getpid(), KERN_PROC_ARGV };
+-if (sysctl(mib, 4, NULL, &len, NULL, 0) != -1) {
+-retvalargs = SDL_malloc(len);
+-if (!retvalargs) {
+-SDL_OutOfMemory();
+-return NULL;
+-}
+-sysctl(mib, 4, retvalargs, &len, NULL, 0);
+-retval = SDL_malloc(PATH_MAX + 1);
+-if (retval)
+-realpath(retvalargs[0], retval);
+-
+-SDL_free(retvalargs);
+-}
+-#endif
+ #if defined(__SOLARIS__)
+ const char *path = getexecname();
+ if ((path != NULL) && (path[0] == '/')) { /* must be absolute path... */


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



Re: UPDATE devel/sdl 2.0.5

2016-10-20 Thread Jeremie Courreges-Anglas
David CARLIER  writes:

> Hi,
>
> here an update of SDL which seems small but now has now an
> implementation of SDL_GetBasePath function which can benefit to few
> video games (like supertux), maybe future Adam Wolk port of
> falltergeist ...

I'm not sure how I understand how important why this function is
important.  Right now it seems to return the current working directory.


#include 
#include 

int
main(void)
{
char *p;

p = SDL_GetBasePath();
if (!p)
return 1;
printf("%s\n", p);

return 0;
}


Anyway, functions were added and the size of the SDL_DropEvent struct
increased - though in a compatible manner.  So it needs a minor bump.

  http://www.openbsd.org/faq/ports/specialtopics.html#SharedLibs

Which consumers of this library have you tested?


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE