Re: [update] games/0ad: 0.0.23b -> 0.0.25b

2021-11-22 Thread Anthony J. Bentley
Omar Polo writes:
> I realized that it doesn't need python 2 anymore (thanks solene@!) so
> I'm dropping the explicit MODPY_VERSION too.  It built fine without
> python 2 if I did everything correctly (moved the python executable,
> I know, don't do this at home kids, but I wanted to avoid removing all
> the packages that depends on it just to try the update.)  Revised diff
> attached.

ok bentley@



Re: [update] games/0ad: 0.0.23b -> 0.0.25b

2021-11-21 Thread Florian Viehweger
Am Mon, 15 Nov 2021 10:43:09 +0100
schrieb Omar Polo :

> Omar Polo  writes:
> 
> > Klemens Nanni  writes:
> >
> >> On Mon, Nov 15, 2021 at 01:23:21AM +0100, Omar Polo wrote:
> >>> P.S.: if you're wondering about the `CONFIGURE_ENV += SHELL=sh' is
> >>> because one of the python scripts checked if SHELL is defined and
> >>> raised an error if not instead of defaulting to /bin/sh.
> >>
> >> Just say so in a comment above, otherwise future porters will
> >> scratch their heads again ;-)
> >
> > sure, here's an updated patch
> 
> I realized that it doesn't need python 2 anymore (thanks solene@!) so
> I'm dropping the explicit MODPY_VERSION too.  It built fine without
> python 2 if I did everything correctly (moved the python executable,
> I know, don't do this at home kids, but I wanted to avoid removing all
> the packages that depends on it just to try the update.)  Revised diff
> attached.
> 
> Just out of curiosity I tried to build it with --with-native-mozjs and
> it fails with:
> 
> ../../../source/scriptinterface/ScriptTypes.h:85:2: error: Your
> compiler is trying to use an untested minor version of the
> SpiderMonkey library. If you are a package maintainer, please make
> sure to check very carefully that this version does not change the
> behaviour of the code executed by SpiderMonkey. Different parts of
> the game (e.g. the multiplayer mode) rely on deterministic behaviour
> of the JavaScript engine. A simple way for testing this would be
> playing a network game with one player using the old version and one
> player using the new version. Another way for testing is running
> replays and comparing the final hash (check
> trac.wildfiregames.com/wiki/Debugging#Replaymode). For more
> information check this link:
> trac.wildfiregames.com/wiki/Debugging#Outofsync
> 
> Even if now works (I haven't tested the multiplayer) it may break with
> future mozjs updates (or maybe upstream is exaggerating?)  I've
> mentioned this in a comment.

I've played 0ad with Omar for several hours and we found no issues.
Everything was working as expected.

We did play using solely OpenBSD and with OpenBSD + Linux mixed
installations. No interoperability problems found.

Thank you for your work!

> (oh and I sorted LIB_DEPENDS, don't know why fmt ended up in the wrong
> spot)
> 
> 
> Index: Makefile.inc
> ===
> RCS file: /home/cvs/ports/games/0ad/Makefile.inc,v
> retrieving revision 1.12
> diff -u -p -r1.12 Makefile.inc
> --- Makefile.inc  14 Jun 2021 10:19:46 -  1.12
> +++ Makefile.inc  13 Nov 2021 18:17:39 -
> @@ -4,7 +4,7 @@ ONLY_FOR_ARCHS =  amd64 i386
>  
>  CATEGORIES = games
>  
> -V ?= 0.0.23b
> +V ?= 0.0.25b
>  
>  HOMEPAGE =   https://play0ad.com/
>  
> Index: base/Makefile
> ===
> RCS file: /home/cvs/ports/games/0ad/base/Makefile,v
> retrieving revision 1.34
> diff -u -p -r1.34 Makefile
> --- base/Makefile 22 Jun 2021 04:34:08 -  1.34
> +++ base/Makefile 15 Nov 2021 09:55:01 -
> @@ -1,31 +1,28 @@
>  # $OpenBSD: Makefile,v 1.34 2021/06/22 04:34:08 rsadowski Exp $
>  
> -# XXX fix build with icu >=5.9.1 (remove at next update?)
> -CXXFLAGS +=  -DU_USING_ICU_NAMESPACE=1
> -
>  COMMENT =historical real-time strategy game
>  
>  DISTNAME =   0ad-${V}-alpha-unix-build
>  PKGNAME =0ad-${V}
> -REVISION =   3
>  
>  USE_WXNEEDED =   Yes
>  
>  SO_VERSION = 0.0
> -SHARED_LIBS +=  mozjs38-ps-release${SO_VERSION}
> +SHARED_LIBS +=  mozjs78-ps-release${SO_VERSION}
>  
> -WANTLIB += ${COMPILER_LIBCXX} GL SDL2 X11 Xcursor boost_filesystem
> -WANTLIB += boost_system c curl enet execinfo gloox iconv icui18n
> -WANTLIB += icuuc m miniupnpc nspr4 ogg openal plc4 plds4 png sodium
> -WANTLIB += vorbis vorbisfile xml2 z
> +WANTLIB += ${COMPILER_LIBCXX} GL SDL2 X11 boost_filesystem
> +WANTLIB += boost_system c crypto curl enet execinfo fmt gloox iconv
> +WANTLIB += icudata icui18n icuuc idn m miniupnpc ogg openal
> +WANTLIB += png sodium ssl vorbis vorbisfile xml2 z
>  
>  BUILD_DEPENDS =  archivers/zip \
> + lang/rust,-main \
>   shells/bash
>  LIB_DEPENDS =audio/libvorbis \
>   audio/openal \
>   converters/libiconv \
>   devel/boost \
> - devel/nspr \
> + devel/fmt \
>   devel/sdl2 \
>   graphics/png \
>   net/curl \
> @@ -38,7 +35,6 @@ LIB_DEPENDS =   audio/libvorbis \
>  RUN_DEPENDS =devel/desktop-file-utils \
>   games/0ad/data=${V}
>  MODULES =lang/python
> -MODPY_VERSION =  ${MODPY_DEFAULT_VERSION_2}
>  
>  COMPILER =  

Re: [update] games/0ad: 0.0.23b -> 0.0.25b

2021-11-15 Thread Omar Polo
Omar Polo  writes:

> Klemens Nanni  writes:
>
>> On Mon, Nov 15, 2021 at 01:23:21AM +0100, Omar Polo wrote:
>>> P.S.: if you're wondering about the `CONFIGURE_ENV += SHELL=sh' is
>>> because one of the python scripts checked if SHELL is defined and raised
>>> an error if not instead of defaulting to /bin/sh.
>>
>> Just say so in a comment above, otherwise future porters will scratch
>> their heads again ;-)
>
> sure, here's an updated patch

I realized that it doesn't need python 2 anymore (thanks solene@!) so
I'm dropping the explicit MODPY_VERSION too.  It built fine without
python 2 if I did everything correctly (moved the python executable,
I know, don't do this at home kids, but I wanted to avoid removing all
the packages that depends on it just to try the update.)  Revised diff
attached.

Just out of curiosity I tried to build it with --with-native-mozjs and
it fails with:

../../../source/scriptinterface/ScriptTypes.h:85:2: error: Your compiler
is trying to use an untested minor version of the SpiderMonkey
library. If you are a package maintainer, please make sure to check very
carefully that this version does not change the behaviour of the code
executed by SpiderMonkey. Different parts of the game (e.g. the
multiplayer mode) rely on deterministic behaviour of the JavaScript
engine. A simple way for testing this would be playing a network game
with one player using the old version and one player using the new
version. Another way for testing is running replays and comparing the
final hash (check trac.wildfiregames.com/wiki/Debugging#Replaymode). For
more information check this link:
trac.wildfiregames.com/wiki/Debugging#Outofsync

Even if now works (I haven't tested the multiplayer) it may break with
future mozjs updates (or maybe upstream is exaggerating?)  I've
mentioned this in a comment.

(oh and I sorted LIB_DEPENDS, don't know why fmt ended up in the wrong
spot)


Index: Makefile.inc
===
RCS file: /home/cvs/ports/games/0ad/Makefile.inc,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile.inc
--- Makefile.inc14 Jun 2021 10:19:46 -  1.12
+++ Makefile.inc13 Nov 2021 18:17:39 -
@@ -4,7 +4,7 @@ ONLY_FOR_ARCHS =amd64 i386
 
 CATEGORIES =   games
 
-V ?=   0.0.23b
+V ?=   0.0.25b
 
 HOMEPAGE = https://play0ad.com/
 
Index: base/Makefile
===
RCS file: /home/cvs/ports/games/0ad/base/Makefile,v
retrieving revision 1.34
diff -u -p -r1.34 Makefile
--- base/Makefile   22 Jun 2021 04:34:08 -  1.34
+++ base/Makefile   15 Nov 2021 09:55:01 -
@@ -1,31 +1,28 @@
 # $OpenBSD: Makefile,v 1.34 2021/06/22 04:34:08 rsadowski Exp $
 
-# XXX fix build with icu >=5.9.1 (remove at next update?)
-CXXFLAGS +=-DU_USING_ICU_NAMESPACE=1
-
 COMMENT =  historical real-time strategy game
 
 DISTNAME = 0ad-${V}-alpha-unix-build
 PKGNAME =  0ad-${V}
-REVISION = 3
 
 USE_WXNEEDED = Yes
 
 SO_VERSION =   0.0
-SHARED_LIBS +=  mozjs38-ps-release${SO_VERSION}
+SHARED_LIBS +=  mozjs78-ps-release${SO_VERSION}
 
-WANTLIB += ${COMPILER_LIBCXX} GL SDL2 X11 Xcursor boost_filesystem
-WANTLIB += boost_system c curl enet execinfo gloox iconv icui18n
-WANTLIB += icuuc m miniupnpc nspr4 ogg openal plc4 plds4 png sodium
-WANTLIB += vorbis vorbisfile xml2 z
+WANTLIB += ${COMPILER_LIBCXX} GL SDL2 X11 boost_filesystem
+WANTLIB += boost_system c crypto curl enet execinfo fmt gloox iconv
+WANTLIB += icudata icui18n icuuc idn m miniupnpc ogg openal
+WANTLIB += png sodium ssl vorbis vorbisfile xml2 z
 
 BUILD_DEPENDS =archivers/zip \
+   lang/rust,-main \
shells/bash
 LIB_DEPENDS =  audio/libvorbis \
audio/openal \
converters/libiconv \
devel/boost \
-   devel/nspr \
+   devel/fmt \
devel/sdl2 \
graphics/png \
net/curl \
@@ -38,7 +35,6 @@ LIB_DEPENDS = audio/libvorbis \
 RUN_DEPENDS =  devel/desktop-file-utils \
games/0ad/data=${V}
 MODULES =  lang/python
-MODPY_VERSION =${MODPY_DEFAULT_VERSION_2}
 
 COMPILER = base-clang ports-gcc
 
@@ -49,16 +45,24 @@ MAKE_FLAGS =SILENT=
 MAKE_ENV = CC="${CC}" \
CXX="${CXX}" \
CFLAGS="${CFLAGS}" \
-   CXXFLAGS="${CXXFLAGS}"
+   CXXFLAGS="${CXXFLAGS} -I${X11BASE}/include" \
+   LDFLAGS="-liconv"
 
-FIX_CRLF_FILES =   build/premake/premake4/build/gmake.bsd/Premake4.make
+FIX_CRLF_FILES =   build/premake/premake5/build/gmake.bsd/Premake5.make
 PA

Re: [update] games/0ad: 0.0.23b -> 0.0.25b

2021-11-14 Thread Omar Polo


Klemens Nanni  writes:

> On Mon, Nov 15, 2021 at 01:23:21AM +0100, Omar Polo wrote:
>> P.S.: if you're wondering about the `CONFIGURE_ENV += SHELL=sh' is
>> because one of the python scripts checked if SHELL is defined and raised
>> an error if not instead of defaulting to /bin/sh.
>
> Just say so in a comment above, otherwise future porters will scratch
> their heads again ;-)

sure, here's an updated patch


Index: Makefile.inc
===
RCS file: /home/cvs/ports/games/0ad/Makefile.inc,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile.inc
--- Makefile.inc14 Jun 2021 10:19:46 -  1.12
+++ Makefile.inc13 Nov 2021 18:17:39 -
@@ -4,7 +4,7 @@ ONLY_FOR_ARCHS =amd64 i386
 
 CATEGORIES =   games
 
-V ?=   0.0.23b
+V ?=   0.0.25b
 
 HOMEPAGE = https://play0ad.com/
 
Index: base/Makefile
===
RCS file: /home/cvs/ports/games/0ad/base/Makefile,v
retrieving revision 1.34
diff -u -p -r1.34 Makefile
--- base/Makefile   22 Jun 2021 04:34:08 -  1.34
+++ base/Makefile   15 Nov 2021 07:49:15 -
@@ -1,31 +1,27 @@
 # $OpenBSD: Makefile,v 1.34 2021/06/22 04:34:08 rsadowski Exp $
 
-# XXX fix build with icu >=5.9.1 (remove at next update?)
-CXXFLAGS +=-DU_USING_ICU_NAMESPACE=1
-
 COMMENT =  historical real-time strategy game
 
 DISTNAME = 0ad-${V}-alpha-unix-build
 PKGNAME =  0ad-${V}
-REVISION = 3
 
 USE_WXNEEDED = Yes
 
 SO_VERSION =   0.0
-SHARED_LIBS +=  mozjs38-ps-release${SO_VERSION}
+SHARED_LIBS +=  mozjs78-ps-release${SO_VERSION}
 
-WANTLIB += ${COMPILER_LIBCXX} GL SDL2 X11 Xcursor boost_filesystem
-WANTLIB += boost_system c curl enet execinfo gloox iconv icui18n
-WANTLIB += icuuc m miniupnpc nspr4 ogg openal plc4 plds4 png sodium
-WANTLIB += vorbis vorbisfile xml2 z
+WANTLIB += ${COMPILER_LIBCXX} GL SDL2 X11 boost_filesystem
+WANTLIB += boost_system c crypto curl enet execinfo fmt gloox iconv
+WANTLIB += icudata icui18n icuuc idn m miniupnpc ogg openal
+WANTLIB += png sodium ssl vorbis vorbisfile xml2 z
 
 BUILD_DEPENDS =archivers/zip \
+   lang/rust,-main \
shells/bash
 LIB_DEPENDS =  audio/libvorbis \
audio/openal \
converters/libiconv \
devel/boost \
-   devel/nspr \
devel/sdl2 \
graphics/png \
net/curl \
@@ -33,6 +29,7 @@ LIB_DEPENDS = audio/libvorbis \
net/gloox>=1.0.20 \
net/miniupnp/miniupnpc \
security/libsodium \
+   devel/fmt \
textproc/icu4c \
textproc/libxml
 RUN_DEPENDS =  devel/desktop-file-utils \
@@ -49,16 +46,22 @@ MAKE_FLAGS =SILENT=
 MAKE_ENV = CC="${CC}" \
CXX="${CXX}" \
CFLAGS="${CFLAGS}" \
-   CXXFLAGS="${CXXFLAGS}"
+   CXXFLAGS="${CXXFLAGS} -I${X11BASE}/include" \
+   LDFLAGS="-liconv"
 
-FIX_CRLF_FILES =   build/premake/premake4/build/gmake.bsd/Premake4.make
+FIX_CRLF_FILES =   build/premake/premake5/build/gmake.bsd/Premake5.make
 PATCHORIG =.orig.port
 
 USE_GMAKE =Yes
+
+# libraries/source/spidermonkey/mozjs-*/python/mach/mach/mixin/process.py
+# checks this var and errors out if undefined:
+#  Exception: Could not detect environment shell!
+CONFIGURE_ENV +=   SHELL=sh
+
 CONFIGURE_ARGS +=  --without-nvtt \
--datadir=${PREFIX}/share/0ad \
--libdir=${PREFIX}/lib \
-   --premake4 \
--minimal-flags
 
 # XXX atlas (the level editor) requires threaded libxml
Index: base/distinfo
===
RCS file: /home/cvs/ports/games/0ad/base/distinfo,v
retrieving revision 1.8
diff -u -p -r1.8 distinfo
--- base/distinfo   25 Dec 2018 00:32:55 -  1.8
+++ base/distinfo   13 Nov 2021 18:18:56 -
@@ -1,2 +1,2 @@
-SHA256 (0ad-0.0.23b-alpha-unix-build.tar.gz) = 
vC22XgkHb45yPFdDOedza1Vx1SXeOYXLuVyhHzGMx6g=
-SIZE (0ad-0.0.23b-alpha-unix-build.tar.gz) = 34609819
+SHA256 (0ad-0.0.25b-alpha-unix-build.tar.gz) = 
AnMMMof21FEekRntNF1CSk7z9aMb9KCnzHntgNv+PIA=
+SIZE (0ad-0.0.25b-alpha-unix-build.tar.gz) = 78022628
Index: base/patches/patch-build_premake_premake4_build_gmake_bsd_Premake4_make
===
RCS file: 
base/patches/patch-build_premake_premake4_build_gmake_bsd_Premake4_make
diff -N base/patches/patch-build_premake_premake4_b

Re: [update] games/0ad: 0.0.23b -> 0.0.25b

2021-11-14 Thread Klemens Nanni
On Mon, Nov 15, 2021 at 01:23:21AM +0100, Omar Polo wrote:
> P.S.: if you're wondering about the `CONFIGURE_ENV += SHELL=sh' is
> because one of the python scripts checked if SHELL is defined and raised
> an error if not instead of defaulting to /bin/sh.

Just say so in a comment above, otherwise future porters will scratch
their heads again ;-)