[Update] games/tome4 1.4.9 -> 1.5.1

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Update] games/tome4 1.4.9 -> 1.5.1

Solène Rapenne-2
Hello,

Please find a patch to update games/tome4 to 1.5.1

I updated patch-src_getself_c because the (Free)BSD code changed
upstream and the previous patch wasn't applying anymore.

I hope the patch doesn't get scrambled in the process.


Index: Makefile
===================================================================
RCS file: /cvs/ports/games/tome4/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- Makefile 29 Dec 2016 14:07:11 -0000 1.2
+++ Makefile 20 Mar 2017 11:39:44 -0000
@@ -3,7 +3,7 @@
 COMMENT-main = graphical sdl rogue-like game
 COMMENT-data = data for Tales of Maj'Eyal
 
-V = 1.4.9
+V = 1.5.1
 PKGNAME-main = tome4-${V}
 PKGNAME-data = tome4-data-${V}
 CATEGORIES = games x11
Index: distinfo
===================================================================
RCS file: /cvs/ports/games/tome4/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo 28 Dec 2016 18:34:57 -0000 1.1.1.1
+++ distinfo 20 Mar 2017 11:39:44 -0000
@@ -1,2 +1,2 @@
-SHA256 (t-engine4-src-1.4.9.tar.bz2) = tKcX/jyN0qgithNCXs5iz7q9TEXn5vbg+8ToGx6oAjE=
-SIZE (t-engine4-src-1.4.9.tar.bz2) = 354443574
+SHA256 (t-engine4-src-1.5.1.tar.bz2) = er5VbR72iQ0WrlO4KSwQWSVDopR6QCS7mjtnARp00Lg=
+SIZE (t-engine4-src-1.5.1.tar.bz2) = 421336208
cvs server: Diffing patches
Index: patches/patch-src_getself_c
===================================================================
RCS file: /cvs/ports/games/tome4/patches/patch-src_getself_c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-src_getself_c
--- patches/patch-src_getself_c 28 Dec 2016 18:34:57 -0000 1.1.1.1
+++ patches/patch-src_getself_c 20 Mar 2017 11:39:44 -0000
@@ -1,29 +1,35 @@
-$OpenBSD: patch-src_getself_c,v 1.1.1.1 2016/12/28 18:34:57 awolk Exp $
---- src/getself.c.orig Thu Jan  7 20:09:06 2016
-+++ src/getself.c Tue Nov 29 16:38:12 2016
-@@ -47,7 +47,8 @@ const char *get_self_executable(int argc, char **argv)
+--- src/getself.c.orig Wed Mar  8 18:20:39 2017
++++ src/getself.c Mon Mar 20 10:57:10 2017
+@@ -47,13 +47,7 @@
+ const char *get_self_executable(int argc, char **argv)
+ {
  static char res[PATH_MAX];
- // Like linux, but /proc is not always mounted
- //  return 0 if it's not
-- if (realpath("/proc/curproc/file", res)) return NULL;
-+ //if (realpath("/proc/curproc/file", res)) return NULL;
+- int mib[4];
+- mib[0] = CTL_KERN;
+- mib[1] = KERN_PROC;
+- mib[2] = KERN_PROC_PATHNAME;
+- mib[3] = -1;
+- size_t cb = sizeof(res);
+- sysctl(mib,4,res,&cb,NULL,0);
 + realpath("${GAMEDIR}/", res);
  return res;
  }
 
-@@ -57,8 +58,14 @@ int get_number_cpus()
+@@ -61,7 +55,16 @@
+
+ int get_number_cpus()
  {
- int count;
- size_t size=sizeof(count);
-+ int name[2];
-+ name[0] = CTL_HW;
-+ name[1] = HW_NCPU;
-
-- if (sysctlbyname("hw.ncpu",&count,&size,NULL,0)) return 1;
-+ if (sysctl(name, 2, &count, &size, NULL, 0) < 0) {
-+  count = 1;
-+ }
-+
- return count;
+-       return sysconf(_SC_NPROCESSORS_ONLN);
++       int count;
++       size_t size=sizeof(count);
++       int name[2];
++       name[0] = CTL_HW;
++       name[1] = HW_NCPU;
++      
++       if (sysctl(name, 2, &count, &size, NULL, 0) < 0) {
++         count = 1;
++       }
++       return count;
  }
 
+ #elif defined(SELFEXE_WINDOWS)
cvs server: Diffing pkg
Index: pkg/PLIST-data
===================================================================
RCS file: /cvs/ports/games/tome4/pkg/PLIST-data,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST-data
--- pkg/PLIST-data 29 Dec 2016 14:07:11 -0000 1.2
+++ pkg/PLIST-data 20 Mar 2017 11:39:44 -0000
@@ -2,7 +2,7 @@
 share/tome4/
 share/tome4/game/
 share/tome4/game/modules/
-share/tome4/game/modules/boot-te4-1.4.9.team
-share/tome4/game/modules/tome-1.4.9-gfx.team
-share/tome4/game/modules/tome-1.4.9-music.team
-share/tome4/game/modules/tome-1.4.9.team
+share/tome4/game/modules/boot-te4-1.5.1.team
+share/tome4/game/modules/tome-1.5.1-gfx.team
+share/tome4/game/modules/tome-1.5.1-music.team
+share/tome4/game/modules/tome-1.5.1.team
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/games/tome4/pkg/PLIST-main,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST-main
--- pkg/PLIST-main 29 Dec 2016 14:07:11 -0000 1.2
+++ pkg/PLIST-main 20 Mar 2017 11:39:44 -0000
@@ -5,9 +5,9 @@ share/tome4/bootstrap/boot.lua
 share/tome4/game/addons/
 share/tome4/game/addons/tome-addon-dev.teaa
 share/tome4/game/addons/tome-items-vault.teaa
-share/tome4/game/addons/tome-stone-wardens.teaa
+share/tome4/game/addons/tome-possessors.teaa
 share/tome4/game/engines/
-share/tome4/game/engines/te4-1.4.9.teae
+share/tome4/game/engines/te4-1.5.1.teae
 share/tome4/game/loader/
 share/tome4/game/loader/init.lua
 share/tome4/game/loader/pre-init.lua

Reply | Threaded
Open this post in threaded view
|

Re: [Update] games/tome4 1.4.9 -> 1.5.1

Jeremie Courreges-Anglas-2
Solene Rapenne <[hidden email]> writes:

> Hello,

Hi,

> Please find a patch to update games/tome4 to 1.5.1
>
> I updated patch-src_getself_c because the (Free)BSD code changed
> upstream and the previous patch wasn't applying anymore.
>
> I hope the patch doesn't get scrambled in the process.

Ports-wise:

- better use sysconf than yet another hand-rolled sysctl call -> the
  diff gets shorter.
- also in the updated diff below:
  - add V to SUBST_VARS and regen PLIST.  You'll get less changes when
    updating later.
  - drops REVISION-foo (this should be done when updating to a newer
    version)
  - rm a patched fine remnant

I hope I didn't break anything. :)


Index: Makefile
===================================================================
RCS file: /d/cvs/ports/games/tome4/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- Makefile 3 Mar 2017 21:29:00 -0000 1.4
+++ Makefile 20 Mar 2017 18:21:39 -0000
@@ -3,14 +3,11 @@
 COMMENT-main = graphical sdl rogue-like game
 COMMENT-data = data for Tales of Maj'Eyal
 
-V = 1.4.9
+V = 1.5.1
 PKGNAME-main = tome4-${V}
 PKGNAME-data = tome4-data-${V}
 CATEGORIES = games x11
 
-REVISION-main = 0
-REVISION-data = 0
-
 MASTER_SITES = http://te4.org/dl/t-engine/
 DISTNAME = t-engine4-src-${V}
 EXTRACT_SUFX = .tar.bz2
@@ -39,9 +36,6 @@ RUN_DEPENDS-main = games/tome4,-data
 LIB_DEPENDS-data =
 WANTLIB-data =
 
-GAMEDIR = ${PREFIX}/share/tome4
-SUBST_VARS = GAMEDIR
-
 # The build system hardcodes the use of the "gcc" command
 MODULES = gcc4
 MODGCC4_ARCHS = *
@@ -52,6 +46,9 @@ USE_GMAKE = YES
 MAKE_FLAGS = verbose=1
 MAKE_ENV = config=release
 
+GAMEDIR = ${PREFIX}/share/tome4
+SUBST_VARS += GAMEDIR V
+
 do-configure:
  sed -i 's/gcc /${CC} /g' ${WRKSRC}/build/te4core.lua
  ${SUBST_CMD} ${WRKSRC}/src/getself.c
@@ -62,6 +59,6 @@ do-install:
  ${INSTALL_PROGRAM} ${WRKSRC}/t-engine ${PREFIX}/bin/tome4
  ${INSTALL_DATA_DIR} ${GAMEDIR}
  cd ${WRKSRC}; tar cf - bootstrap game | tar xf - -C ${GAMEDIR}
-
+ rm ${GAMEDIR}/bootstrap/boot.lua.orig
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /d/cvs/ports/games/tome4/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo 28 Dec 2016 18:34:57 -0000 1.1.1.1
+++ distinfo 20 Mar 2017 17:21:47 -0000
@@ -1,2 +1,2 @@
-SHA256 (t-engine4-src-1.4.9.tar.bz2) = tKcX/jyN0qgithNCXs5iz7q9TEXn5vbg+8ToGx6oAjE=
-SIZE (t-engine4-src-1.4.9.tar.bz2) = 354443574
+SHA256 (t-engine4-src-1.5.1.tar.bz2) = er5VbR72iQ0WrlO4KSwQWSVDopR6QCS7mjtnARp00Lg=
+SIZE (t-engine4-src-1.5.1.tar.bz2) = 421336208
Index: patches/patch-src_getself_c
===================================================================
RCS file: /d/cvs/ports/games/tome4/patches/patch-src_getself_c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-src_getself_c
--- patches/patch-src_getself_c 28 Dec 2016 18:34:57 -0000 1.1.1.1
+++ patches/patch-src_getself_c 20 Mar 2017 17:49:13 -0000
@@ -1,29 +1,17 @@
-$OpenBSD: patch-src_getself_c,v 1.1.1.1 2016/12/28 18:34:57 awolk Exp $
---- src/getself.c.orig Thu Jan  7 20:09:06 2016
-+++ src/getself.c Tue Nov 29 16:38:12 2016
-@@ -47,7 +47,8 @@ const char *get_self_executable(int argc, char **argv)
+--- src/getself.c.orig Wed Mar  8 18:20:39 2017
++++ src/getself.c Mon Mar 20 18:46:27 2017
+@@ -47,13 +47,7 @@ int get_number_cpus()
+ const char *get_self_executable(int argc, char **argv)
+ {
  static char res[PATH_MAX];
- // Like linux, but /proc is not always mounted
- //  return 0 if it's not
-- if (realpath("/proc/curproc/file", res)) return NULL;
-+ //if (realpath("/proc/curproc/file", res)) return NULL;
+- int mib[4];
+- mib[0] = CTL_KERN;
+- mib[1] = KERN_PROC;
+- mib[2] = KERN_PROC_PATHNAME;
+- mib[3] = -1;
+- size_t cb = sizeof(res);
+- sysctl(mib,4,res,&cb,NULL,0);
 + realpath("${GAMEDIR}/", res);
  return res;
- }
-
-@@ -57,8 +58,14 @@ int get_number_cpus()
- {
- int count;
- size_t size=sizeof(count);
-+ int name[2];
-+ name[0] = CTL_HW;
-+ name[1] = HW_NCPU;
-
-- if (sysctlbyname("hw.ncpu",&count,&size,NULL,0)) return 1;
-+ if (sysctl(name, 2, &count, &size, NULL, 0) < 0) {
-+  count = 1;
-+ }
-+
- return count;
  }
 
Index: pkg/PLIST-data
===================================================================
RCS file: /d/cvs/ports/games/tome4/pkg/PLIST-data,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST-data
--- pkg/PLIST-data 29 Dec 2016 14:07:11 -0000 1.2
+++ pkg/PLIST-data 20 Mar 2017 17:31:00 -0000
@@ -2,7 +2,83 @@
 share/tome4/
 share/tome4/game/
 share/tome4/game/modules/
-share/tome4/game/modules/boot-te4-1.4.9.team
-share/tome4/game/modules/tome-1.4.9-gfx.team
-share/tome4/game/modules/tome-1.4.9-music.team
-share/tome4/game/modules/tome-1.4.9.team
+share/tome4/game/modules/boot-te4-${V}.team
+share/tome4/game/modules/example/
+share/tome4/game/modules/example/class/
+share/tome4/game/modules/example/class/Actor.lua
+share/tome4/game/modules/example/class/Game.lua
+share/tome4/game/modules/example/class/Grid.lua
+share/tome4/game/modules/example/class/NPC.lua
+share/tome4/game/modules/example/class/Player.lua
+share/tome4/game/modules/example/class/interface/
+share/tome4/game/modules/example/class/interface/Combat.lua
+share/tome4/game/modules/example/data/
+share/tome4/game/modules/example/data/birth/
+share/tome4/game/modules/example/data/birth/descriptors.lua
+share/tome4/game/modules/example/data/damage_types.lua
+share/tome4/game/modules/example/data/general/
+share/tome4/game/modules/example/data/general/grids/
+share/tome4/game/modules/example/data/general/grids/basic.lua
+share/tome4/game/modules/example/data/general/npcs/
+share/tome4/game/modules/example/data/general/npcs/kobold.lua
+share/tome4/game/modules/example/data/gfx/
+share/tome4/game/modules/example/data/gfx/particles/
+share/tome4/game/modules/example/data/gfx/particles/acid.lua
+share/tome4/game/modules/example/data/rooms/
+share/tome4/game/modules/example/data/rooms/pilar.lua
+share/tome4/game/modules/example/data/rooms/simple.lua
+share/tome4/game/modules/example/data/talents.lua
+share/tome4/game/modules/example/data/timed_effects.lua
+share/tome4/game/modules/example/data/zones/
+share/tome4/game/modules/example/data/zones/dungeon/
+share/tome4/game/modules/example/data/zones/dungeon/grids.lua
+share/tome4/game/modules/example/data/zones/dungeon/npcs.lua
+share/tome4/game/modules/example/data/zones/dungeon/objects.lua
+share/tome4/game/modules/example/data/zones/dungeon/traps.lua
+share/tome4/game/modules/example/data/zones/dungeon/zone.lua
+share/tome4/game/modules/example/dialogs/
+share/tome4/game/modules/example/dialogs/DeathDialog.lua
+share/tome4/game/modules/example/dialogs/Quit.lua
+share/tome4/game/modules/example/init.lua
+share/tome4/game/modules/example/load.lua
+share/tome4/game/modules/example_realtime/
+share/tome4/game/modules/example_realtime/class/
+share/tome4/game/modules/example_realtime/class/Actor.lua
+share/tome4/game/modules/example_realtime/class/Game.lua
+share/tome4/game/modules/example_realtime/class/Grid.lua
+share/tome4/game/modules/example_realtime/class/NPC.lua
+share/tome4/game/modules/example_realtime/class/Player.lua
+share/tome4/game/modules/example_realtime/class/interface/
+share/tome4/game/modules/example_realtime/class/interface/Combat.lua
+share/tome4/game/modules/example_realtime/data/
+share/tome4/game/modules/example_realtime/data/birth/
+share/tome4/game/modules/example_realtime/data/birth/descriptors.lua
+share/tome4/game/modules/example_realtime/data/damage_types.lua
+share/tome4/game/modules/example_realtime/data/general/
+share/tome4/game/modules/example_realtime/data/general/grids/
+share/tome4/game/modules/example_realtime/data/general/grids/basic.lua
+share/tome4/game/modules/example_realtime/data/general/npcs/
+share/tome4/game/modules/example_realtime/data/general/npcs/kobold.lua
+share/tome4/game/modules/example_realtime/data/gfx/
+share/tome4/game/modules/example_realtime/data/gfx/particles/
+share/tome4/game/modules/example_realtime/data/gfx/particles/acid.lua
+share/tome4/game/modules/example_realtime/data/rooms/
+share/tome4/game/modules/example_realtime/data/rooms/pilar.lua
+share/tome4/game/modules/example_realtime/data/rooms/simple.lua
+share/tome4/game/modules/example_realtime/data/talents.lua
+share/tome4/game/modules/example_realtime/data/timed_effects.lua
+share/tome4/game/modules/example_realtime/data/zones/
+share/tome4/game/modules/example_realtime/data/zones/dungeon/
+share/tome4/game/modules/example_realtime/data/zones/dungeon/grids.lua
+share/tome4/game/modules/example_realtime/data/zones/dungeon/npcs.lua
+share/tome4/game/modules/example_realtime/data/zones/dungeon/objects.lua
+share/tome4/game/modules/example_realtime/data/zones/dungeon/traps.lua
+share/tome4/game/modules/example_realtime/data/zones/dungeon/zone.lua
+share/tome4/game/modules/example_realtime/dialogs/
+share/tome4/game/modules/example_realtime/dialogs/DeathDialog.lua
+share/tome4/game/modules/example_realtime/dialogs/Quit.lua
+share/tome4/game/modules/example_realtime/init.lua
+share/tome4/game/modules/example_realtime/load.lua
+share/tome4/game/modules/tome-${V}-gfx.team
+share/tome4/game/modules/tome-${V}-music.team
+share/tome4/game/modules/tome-${V}.team
Index: pkg/PLIST-main
===================================================================
RCS file: /d/cvs/ports/games/tome4/pkg/PLIST-main,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST-main
--- pkg/PLIST-main 29 Dec 2016 14:07:11 -0000 1.2
+++ pkg/PLIST-main 20 Mar 2017 17:58:31 -0000
@@ -5,9 +5,9 @@ share/tome4/bootstrap/boot.lua
 share/tome4/game/addons/
 share/tome4/game/addons/tome-addon-dev.teaa
 share/tome4/game/addons/tome-items-vault.teaa
-share/tome4/game/addons/tome-stone-wardens.teaa
+share/tome4/game/addons/tome-possessors.teaa
 share/tome4/game/engines/
-share/tome4/game/engines/te4-1.4.9.teae
+share/tome4/game/engines/te4-${V}.teae
 share/tome4/game/loader/
 share/tome4/game/loader/init.lua
 share/tome4/game/loader/pre-init.lua


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

Reply | Threaded
Open this post in threaded view
|

Re: [Update] games/tome4 1.4.9 -> 1.5.1

Jeremie Courreges-Anglas-2
Jeremie Courreges-Anglas <[hidden email]> writes:

> Solene Rapenne <[hidden email]> writes:
>
>> Hello,
>
> Hi,
>
>> Please find a patch to update games/tome4 to 1.5.1
>>
>> I updated patch-src_getself_c because the (Free)BSD code changed
>> upstream and the previous patch wasn't applying anymore.
>>
>> I hope the patch doesn't get scrambled in the process.
>
> Ports-wise:
>
> - better use sysconf than yet another hand-rolled sysctl call -> the
>   diff gets shorter.
> - also in the updated diff below:
>   - add V to SUBST_VARS and regen PLIST.  You'll get less changes when
>     updating later.
>   - drops REVISION-foo (this should be done when updating to a newer
>     version)
>   - rm a patched fine remnant

After further discussion with Solene:
- kill the example modules
- add a MASTER_SITES mirror hosted by Solene, to provide a fallback if
  upstream keeps on altering existing release tarballs.


Index: Makefile
===================================================================
RCS file: /d/cvs/ports/games/tome4/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- Makefile 3 Mar 2017 21:29:00 -0000 1.4
+++ Makefile 23 Mar 2017 13:30:31 -0000
@@ -3,15 +3,13 @@
 COMMENT-main = graphical sdl rogue-like game
 COMMENT-data = data for Tales of Maj'Eyal
 
-V = 1.4.9
+V = 1.5.1
 PKGNAME-main = tome4-${V}
 PKGNAME-data = tome4-data-${V}
 CATEGORIES = games x11
 
-REVISION-main = 0
-REVISION-data = 0
-
-MASTER_SITES = http://te4.org/dl/t-engine/
+MASTER_SITES = http://te4.org/dl/t-engine/ \
+ http://distfiles-openbsd.perso.pw/
 DISTNAME = t-engine4-src-${V}
 EXTRACT_SUFX = .tar.bz2
 HOMEPAGE = http://te4.org
@@ -39,9 +37,6 @@ RUN_DEPENDS-main = games/tome4,-data
 LIB_DEPENDS-data =
 WANTLIB-data =
 
-GAMEDIR = ${PREFIX}/share/tome4
-SUBST_VARS = GAMEDIR
-
 # The build system hardcodes the use of the "gcc" command
 MODULES = gcc4
 MODGCC4_ARCHS = *
@@ -52,6 +47,9 @@ USE_GMAKE = YES
 MAKE_FLAGS = verbose=1
 MAKE_ENV = config=release
 
+GAMEDIR = ${PREFIX}/share/tome4
+SUBST_VARS += GAMEDIR V
+
 do-configure:
  sed -i 's/gcc /${CC} /g' ${WRKSRC}/build/te4core.lua
  ${SUBST_CMD} ${WRKSRC}/src/getself.c
@@ -62,6 +60,7 @@ do-install:
  ${INSTALL_PROGRAM} ${WRKSRC}/t-engine ${PREFIX}/bin/tome4
  ${INSTALL_DATA_DIR} ${GAMEDIR}
  cd ${WRKSRC}; tar cf - bootstrap game | tar xf - -C ${GAMEDIR}
-
+ rm -R ${GAMEDIR}/game/modules/example*
+ rm ${GAMEDIR}/bootstrap/boot.lua.orig
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /d/cvs/ports/games/tome4/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo 28 Dec 2016 18:34:57 -0000 1.1.1.1
+++ distinfo 20 Mar 2017 17:21:47 -0000
@@ -1,2 +1,2 @@
-SHA256 (t-engine4-src-1.4.9.tar.bz2) = tKcX/jyN0qgithNCXs5iz7q9TEXn5vbg+8ToGx6oAjE=
-SIZE (t-engine4-src-1.4.9.tar.bz2) = 354443574
+SHA256 (t-engine4-src-1.5.1.tar.bz2) = er5VbR72iQ0WrlO4KSwQWSVDopR6QCS7mjtnARp00Lg=
+SIZE (t-engine4-src-1.5.1.tar.bz2) = 421336208
Index: patches/patch-src_getself_c
===================================================================
RCS file: /d/cvs/ports/games/tome4/patches/patch-src_getself_c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-src_getself_c
--- patches/patch-src_getself_c 28 Dec 2016 18:34:57 -0000 1.1.1.1
+++ patches/patch-src_getself_c 20 Mar 2017 17:49:13 -0000
@@ -1,29 +1,17 @@
-$OpenBSD: patch-src_getself_c,v 1.1.1.1 2016/12/28 18:34:57 awolk Exp $
---- src/getself.c.orig Thu Jan  7 20:09:06 2016
-+++ src/getself.c Tue Nov 29 16:38:12 2016
-@@ -47,7 +47,8 @@ const char *get_self_executable(int argc, char **argv)
+--- src/getself.c.orig Wed Mar  8 18:20:39 2017
++++ src/getself.c Mon Mar 20 18:46:27 2017
+@@ -47,13 +47,7 @@ int get_number_cpus()
+ const char *get_self_executable(int argc, char **argv)
+ {
  static char res[PATH_MAX];
- // Like linux, but /proc is not always mounted
- //  return 0 if it's not
-- if (realpath("/proc/curproc/file", res)) return NULL;
-+ //if (realpath("/proc/curproc/file", res)) return NULL;
+- int mib[4];
+- mib[0] = CTL_KERN;
+- mib[1] = KERN_PROC;
+- mib[2] = KERN_PROC_PATHNAME;
+- mib[3] = -1;
+- size_t cb = sizeof(res);
+- sysctl(mib,4,res,&cb,NULL,0);
 + realpath("${GAMEDIR}/", res);
  return res;
- }
-
-@@ -57,8 +58,14 @@ int get_number_cpus()
- {
- int count;
- size_t size=sizeof(count);
-+ int name[2];
-+ name[0] = CTL_HW;
-+ name[1] = HW_NCPU;
-
-- if (sysctlbyname("hw.ncpu",&count,&size,NULL,0)) return 1;
-+ if (sysctl(name, 2, &count, &size, NULL, 0) < 0) {
-+  count = 1;
-+ }
-+
- return count;
  }
 
Index: pkg/PLIST-data
===================================================================
RCS file: /d/cvs/ports/games/tome4/pkg/PLIST-data,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST-data
--- pkg/PLIST-data 29 Dec 2016 14:07:11 -0000 1.2
+++ pkg/PLIST-data 23 Mar 2017 13:31:27 -0000
@@ -2,7 +2,7 @@
 share/tome4/
 share/tome4/game/
 share/tome4/game/modules/
-share/tome4/game/modules/boot-te4-1.4.9.team
-share/tome4/game/modules/tome-1.4.9-gfx.team
-share/tome4/game/modules/tome-1.4.9-music.team
-share/tome4/game/modules/tome-1.4.9.team
+share/tome4/game/modules/boot-te4-${V}.team
+share/tome4/game/modules/tome-${V}-gfx.team
+share/tome4/game/modules/tome-${V}-music.team
+share/tome4/game/modules/tome-${V}.team
Index: pkg/PLIST-main
===================================================================
RCS file: /d/cvs/ports/games/tome4/pkg/PLIST-main,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST-main
--- pkg/PLIST-main 29 Dec 2016 14:07:11 -0000 1.2
+++ pkg/PLIST-main 23 Mar 2017 13:31:27 -0000
@@ -5,9 +5,9 @@ share/tome4/bootstrap/boot.lua
 share/tome4/game/addons/
 share/tome4/game/addons/tome-addon-dev.teaa
 share/tome4/game/addons/tome-items-vault.teaa
-share/tome4/game/addons/tome-stone-wardens.teaa
+share/tome4/game/addons/tome-possessors.teaa
 share/tome4/game/engines/
-share/tome4/game/engines/te4-1.4.9.teae
+share/tome4/game/engines/te4-${V}.teae
 share/tome4/game/loader/
 share/tome4/game/loader/init.lua
 share/tome4/game/loader/pre-init.lua


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

Reply | Threaded
Open this post in threaded view
|

Re: [Update] games/tome4 1.4.9 -> 1.5.1

Solène Rapenne-2
This is fine for me

Le 23 mars 2017 14:56:21 GMT+01:00, Jeremie Courreges-Anglas <[hidden email]> a écrit :

>Jeremie Courreges-Anglas <[hidden email]> writes:
>
>> Solene Rapenne <[hidden email]> writes:
>>
>>> Hello,
>>
>> Hi,
>>
>>> Please find a patch to update games/tome4 to 1.5.1
>>>
>>> I updated patch-src_getself_c because the (Free)BSD code changed
>>> upstream and the previous patch wasn't applying anymore.
>>>
>>> I hope the patch doesn't get scrambled in the process.
>>
>> Ports-wise:
>>
>> - better use sysconf than yet another hand-rolled sysctl call -> the
>>   diff gets shorter.
>> - also in the updated diff below:
>>   - add V to SUBST_VARS and regen PLIST.  You'll get less changes
>when
>>     updating later.
>>   - drops REVISION-foo (this should be done when updating to a newer
>>     version)
>>   - rm a patched fine remnant
>
>After further discussion with Solene:
>- kill the example modules
>- add a MASTER_SITES mirror hosted by Solene, to provide a fallback if
>  upstream keeps on altering existing release tarballs.
>
>
>Index: Makefile
>===================================================================
>RCS file: /d/cvs/ports/games/tome4/Makefile,v
>retrieving revision 1.4
>diff -u -p -r1.4 Makefile
>--- Makefile 3 Mar 2017 21:29:00 -0000 1.4
>+++ Makefile 23 Mar 2017 13:30:31 -0000
>@@ -3,15 +3,13 @@
> COMMENT-main = graphical sdl rogue-like game
> COMMENT-data = data for Tales of Maj'Eyal
>
>-V = 1.4.9
>+V = 1.5.1
> PKGNAME-main = tome4-${V}
> PKGNAME-data = tome4-data-${V}
> CATEGORIES = games x11
>
>-REVISION-main = 0
>-REVISION-data = 0
>-
>-MASTER_SITES = http://te4.org/dl/t-engine/
>+MASTER_SITES = http://te4.org/dl/t-engine/ \
>+ http://distfiles-openbsd.perso.pw/
> DISTNAME = t-engine4-src-${V}
> EXTRACT_SUFX = .tar.bz2
> HOMEPAGE = http://te4.org
>@@ -39,9 +37,6 @@ RUN_DEPENDS-main = games/tome4,-data
> LIB_DEPENDS-data =
> WANTLIB-data =
>
>-GAMEDIR = ${PREFIX}/share/tome4
>-SUBST_VARS = GAMEDIR
>-
> # The build system hardcodes the use of the "gcc" command
> MODULES = gcc4
> MODGCC4_ARCHS = *
>@@ -52,6 +47,9 @@ USE_GMAKE = YES
> MAKE_FLAGS = verbose=1
> MAKE_ENV = config=release
>
>+GAMEDIR = ${PREFIX}/share/tome4
>+SUBST_VARS += GAMEDIR V
>+
> do-configure:
> sed -i 's/gcc /${CC} /g' ${WRKSRC}/build/te4core.lua
> ${SUBST_CMD} ${WRKSRC}/src/getself.c
>@@ -62,6 +60,7 @@ do-install:
> ${INSTALL_PROGRAM} ${WRKSRC}/t-engine ${PREFIX}/bin/tome4
> ${INSTALL_DATA_DIR} ${GAMEDIR}
> cd ${WRKSRC}; tar cf - bootstrap game | tar xf - -C ${GAMEDIR}
>-
>+ rm -R ${GAMEDIR}/game/modules/example*
>+ rm ${GAMEDIR}/bootstrap/boot.lua.orig
>
> .include <bsd.port.mk>
>Index: distinfo
>===================================================================
>RCS file: /d/cvs/ports/games/tome4/distinfo,v
>retrieving revision 1.1.1.1
>diff -u -p -r1.1.1.1 distinfo
>--- distinfo 28 Dec 2016 18:34:57 -0000 1.1.1.1
>+++ distinfo 20 Mar 2017 17:21:47 -0000
>@@ -1,2 +1,2 @@
>-SHA256 (t-engine4-src-1.4.9.tar.bz2) =
>tKcX/jyN0qgithNCXs5iz7q9TEXn5vbg+8ToGx6oAjE=
>-SIZE (t-engine4-src-1.4.9.tar.bz2) = 354443574
>+SHA256 (t-engine4-src-1.5.1.tar.bz2) =
>er5VbR72iQ0WrlO4KSwQWSVDopR6QCS7mjtnARp00Lg=
>+SIZE (t-engine4-src-1.5.1.tar.bz2) = 421336208
>Index: patches/patch-src_getself_c
>===================================================================
>RCS file: /d/cvs/ports/games/tome4/patches/patch-src_getself_c,v
>retrieving revision 1.1.1.1
>diff -u -p -r1.1.1.1 patch-src_getself_c
>--- patches/patch-src_getself_c 28 Dec 2016 18:34:57 -0000 1.1.1.1
>+++ patches/patch-src_getself_c 20 Mar 2017 17:49:13 -0000
>@@ -1,29 +1,17 @@
>-$OpenBSD: patch-src_getself_c,v 1.1.1.1 2016/12/28 18:34:57 awolk Exp
>$
>---- src/getself.c.orig Thu Jan  7 20:09:06 2016
>-+++ src/getself.c Tue Nov 29 16:38:12 2016
>-@@ -47,7 +47,8 @@ const char *get_self_executable(int argc, char
>**argv)
>+--- src/getself.c.orig Wed Mar  8 18:20:39 2017
>++++ src/getself.c Mon Mar 20 18:46:27 2017
>+@@ -47,13 +47,7 @@ int get_number_cpus()
>+ const char *get_self_executable(int argc, char **argv)
>+ {
>   static char res[PATH_MAX];
>- // Like linux, but /proc is not always mounted
>- //  return 0 if it's not
>-- if (realpath("/proc/curproc/file", res)) return NULL;
>-+ //if (realpath("/proc/curproc/file", res)) return NULL;
>+- int mib[4];
>+- mib[0] = CTL_KERN;
>+- mib[1] = KERN_PROC;
>+- mib[2] = KERN_PROC_PATHNAME;
>+- mib[3] = -1;
>+- size_t cb = sizeof(res);
>+- sysctl(mib,4,res,&cb,NULL,0);
> + realpath("${GAMEDIR}/", res);
>   return res;
>- }
>-
>-@@ -57,8 +58,14 @@ int get_number_cpus()
>- {
>- int count;
>- size_t size=sizeof(count);
>-+ int name[2];
>-+ name[0] = CTL_HW;
>-+ name[1] = HW_NCPU;
>-
>-- if (sysctlbyname("hw.ncpu",&count,&size,NULL,0)) return 1;
>-+ if (sysctl(name, 2, &count, &size, NULL, 0) < 0) {
>-+  count = 1;
>-+ }
>-+
>- return count;
>  }
>  
>Index: pkg/PLIST-data
>===================================================================
>RCS file: /d/cvs/ports/games/tome4/pkg/PLIST-data,v
>retrieving revision 1.2
>diff -u -p -r1.2 PLIST-data
>--- pkg/PLIST-data 29 Dec 2016 14:07:11 -0000 1.2
>+++ pkg/PLIST-data 23 Mar 2017 13:31:27 -0000
>@@ -2,7 +2,7 @@
> share/tome4/
> share/tome4/game/
> share/tome4/game/modules/
>-share/tome4/game/modules/boot-te4-1.4.9.team
>-share/tome4/game/modules/tome-1.4.9-gfx.team
>-share/tome4/game/modules/tome-1.4.9-music.team
>-share/tome4/game/modules/tome-1.4.9.team
>+share/tome4/game/modules/boot-te4-${V}.team
>+share/tome4/game/modules/tome-${V}-gfx.team
>+share/tome4/game/modules/tome-${V}-music.team
>+share/tome4/game/modules/tome-${V}.team
>Index: pkg/PLIST-main
>===================================================================
>RCS file: /d/cvs/ports/games/tome4/pkg/PLIST-main,v
>retrieving revision 1.2
>diff -u -p -r1.2 PLIST-main
>--- pkg/PLIST-main 29 Dec 2016 14:07:11 -0000 1.2
>+++ pkg/PLIST-main 23 Mar 2017 13:31:27 -0000
>@@ -5,9 +5,9 @@ share/tome4/bootstrap/boot.lua
> share/tome4/game/addons/
> share/tome4/game/addons/tome-addon-dev.teaa
> share/tome4/game/addons/tome-items-vault.teaa
>-share/tome4/game/addons/tome-stone-wardens.teaa
>+share/tome4/game/addons/tome-possessors.teaa
> share/tome4/game/engines/
>-share/tome4/game/engines/te4-1.4.9.teae
>+share/tome4/game/engines/te4-${V}.teae
> share/tome4/game/loader/
> share/tome4/game/loader/init.lua
> share/tome4/game/loader/pre-init.lua
>
>
>--
>jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524
>E7EE