Re: Teeworlds update - Teeworlds 0.7.5

2021-10-18 Thread Thomas Frohwein
On Thu, Sep 16, 2021 at 10:32:37AM +0200, Stefan Hagen wrote:
> Stefan Hagen wrote:
> > Daniel Dickman wrote:
> > > On Tue, Sep 14, 2021 at 2:16 AM Stefan Hagen
> > >  wrote:
> > > >
> > > > Daniel Dickman wrote:
> > > > > I’ve tried the update and unfortunately it doesn’t work for me. Which
> > > > > is too bad because I really want to switch this one over to python3.
> > > > >
> > > > > After I launch teeworlds, I see a loading bar and hear the music. Then
> > > > > the screen goes red and I don’t see anything.
> > > > >
> > > > > I’m on the latest OpenBSD release that sysupgrade gives me. And this
> > > > > box (a lenovo amd64 laptop) has an amdgpu video card.
> > > > >
> > > > > If you want me to try anything else let me know.
> > > >
> > > > This is unexpected, because I'm running it on amdgpu as well.
> > > > See: https://codevoid.de/9/p/rec-screen-20210914_080244.mp4
> > > >
> > > > Is there any console output that looks interesting? Something in
> > > > /var/log/messages or Xorg.0.log?
> > > 
> > > nothing stands out.
> > > 
> > > >
> > > > The only issue on amdgpu for me (which is not present on intel) is that
> > > > amdgpu freaks out when switching from window mode to fullscreen mode.
> > > > Starting the game in one of these modes is fine, but switching within
> > > > the game leads to weird flickering and I need to restart X.
> > > >
> > > 
> > > if it works for you, i'm willing to commit it to get rid of the
> > > python2 dep (and if no one else objects to doing this)
> > > 
> > > and if other people have the same issue as me then maybe it could
> > > create more motivation to help fix the issue.
> > > 
> > > my 2 cents (the port itself looked fine to me).

I agree. Haven't checked it on amdgpu; only inteldrm.

> > Maybe we should really submit it and someone who can reproduce the crash
> > is able to provide a fix or more info before 7.0. And if not... it's not
> > mission critical software.
> 
> Sorry, I mixed up the symptoms. You had the red screen. Solene
> experienced a crash on quitting the application and had to kill -9 it
> (on intel).

I get a segfault on quitting with the gamecontroller plugged in, but
not without it. There might be a bug in the SDL2 backend:

(gdb) bt full
#0  0x08455211e1a2 in BSD_JoystickClose () from 
/usr/local/lib/libSDL2.so.0.10
No symbol table info available.
#1  0x084552056dc8 in SDL_JoystickClose_REAL () from 
/usr/local/lib/libSDL2.so.0.10
No symbol table info available.
#2  0x0842a2c7aa1c in CInput::CloseJoysticks() ()
No symbol table info available.
#3  0x0842a2c7aab2 in CInput::~CInput() ()
No symbol table info available.
#4  0x0842a2c7498e in main ()
No symbol table info available.

Can probably look into that later. For now I think that teeworlds 0.6.4
is getting too old and we should update and fix the remaining issues as
needed based on the new version.

The following lines are superfluous and the port builds fine without
them:

WRKSRC= ${WRKDIR}/${DISTNAME}
WRKDIST=${WRKSRC}

ok thfr@ for the update with those 2 lines removed.



Re: Teeworlds update - Teeworlds 0.7.5

2021-09-16 Thread Stefan Hagen
Stefan Hagen wrote:
> Daniel Dickman wrote:
> > On Tue, Sep 14, 2021 at 2:16 AM Stefan Hagen
> >  wrote:
> > >
> > > Daniel Dickman wrote:
> > > > I’ve tried the update and unfortunately it doesn’t work for me. Which
> > > > is too bad because I really want to switch this one over to python3.
> > > >
> > > > After I launch teeworlds, I see a loading bar and hear the music. Then
> > > > the screen goes red and I don’t see anything.
> > > >
> > > > I’m on the latest OpenBSD release that sysupgrade gives me. And this
> > > > box (a lenovo amd64 laptop) has an amdgpu video card.
> > > >
> > > > If you want me to try anything else let me know.
> > >
> > > This is unexpected, because I'm running it on amdgpu as well.
> > > See: https://codevoid.de/9/p/rec-screen-20210914_080244.mp4
> > >
> > > Is there any console output that looks interesting? Something in
> > > /var/log/messages or Xorg.0.log?
> > 
> > nothing stands out.
> > 
> > >
> > > The only issue on amdgpu for me (which is not present on intel) is that
> > > amdgpu freaks out when switching from window mode to fullscreen mode.
> > > Starting the game in one of these modes is fine, but switching within
> > > the game leads to weird flickering and I need to restart X.
> > >
> > 
> > if it works for you, i'm willing to commit it to get rid of the
> > python2 dep (and if no one else objects to doing this)
> > 
> > and if other people have the same issue as me then maybe it could
> > create more motivation to help fix the issue.
> > 
> > my 2 cents (the port itself looked fine to me).
> 
> I got another report from solene@ that the game is starting but when she 
> actually tries to play, the screen becomes solid red. She's using 
> amdgpu.
> 
> Maybe we should really submit it and someone who can reproduce the crash
> is able to provide a fix or more info before 7.0. And if not... it's not
> mission critical software.

Sorry, I mixed up the symptoms. You had the red screen. Solene
experienced a crash on quitting the application and had to kill -9 it
(on intel).




Re: Teeworlds update - Teeworlds 0.7.5

2021-09-16 Thread Stefan Hagen
Daniel Dickman wrote:
> On Tue, Sep 14, 2021 at 2:16 AM Stefan Hagen
>  wrote:
> >
> > Daniel Dickman wrote:
> > > I’ve tried the update and unfortunately it doesn’t work for me. Which
> > > is too bad because I really want to switch this one over to python3.
> > >
> > > After I launch teeworlds, I see a loading bar and hear the music. Then
> > > the screen goes red and I don’t see anything.
> > >
> > > I’m on the latest OpenBSD release that sysupgrade gives me. And this
> > > box (a lenovo amd64 laptop) has an amdgpu video card.
> > >
> > > If you want me to try anything else let me know.
> >
> > This is unexpected, because I'm running it on amdgpu as well.
> > See: https://codevoid.de/9/p/rec-screen-20210914_080244.mp4
> >
> > Is there any console output that looks interesting? Something in
> > /var/log/messages or Xorg.0.log?
> 
> nothing stands out.
> 
> >
> > The only issue on amdgpu for me (which is not present on intel) is that
> > amdgpu freaks out when switching from window mode to fullscreen mode.
> > Starting the game in one of these modes is fine, but switching within
> > the game leads to weird flickering and I need to restart X.
> >
> 
> if it works for you, i'm willing to commit it to get rid of the
> python2 dep (and if no one else objects to doing this)
> 
> and if other people have the same issue as me then maybe it could
> create more motivation to help fix the issue.
> 
> my 2 cents (the port itself looked fine to me).

I got another report from solene@ that the game is starting but when she 
actually tries to play, the screen becomes solid red. She's using 
amdgpu.

Maybe we should really submit it and someone who can reproduce the crash
is able to provide a fix or more info before 7.0. And if not... it's not
mission critical software.

Best regards,
Stefan



Re: Teeworlds update - Teeworlds 0.7.5

2021-09-15 Thread Daniel Dickman
On Tue, Sep 14, 2021 at 2:16 AM Stefan Hagen
 wrote:
>
> Daniel Dickman wrote:
> > I’ve tried the update and unfortunately it doesn’t work for me. Which
> > is too bad because I really want to switch this one over to python3.
> >
> > After I launch teeworlds, I see a loading bar and hear the music. Then
> > the screen goes red and I don’t see anything.
> >
> > I’m on the latest OpenBSD release that sysupgrade gives me. And this
> > box (a lenovo amd64 laptop) has an amdgpu video card.
> >
> > If you want me to try anything else let me know.
>
> This is unexpected, because I'm running it on amdgpu as well.
> See: https://codevoid.de/9/p/rec-screen-20210914_080244.mp4
>
> Is there any console output that looks interesting? Something in
> /var/log/messages or Xorg.0.log?

nothing stands out.

>
> The only issue on amdgpu for me (which is not present on intel) is that
> amdgpu freaks out when switching from window mode to fullscreen mode.
> Starting the game in one of these modes is fine, but switching within
> the game leads to weird flickering and I need to restart X.
>

if it works for you, i'm willing to commit it to get rid of the
python2 dep (and if no one else objects to doing this)

and if other people have the same issue as me then maybe it could
create more motivation to help fix the issue.

my 2 cents (the port itself looked fine to me).



Re: Teeworlds update - Teeworlds 0.7.5

2021-09-14 Thread Stefan Hagen
Daniel Dickman wrote:
> I’ve tried the update and unfortunately it doesn’t work for me. Which
> is too bad because I really want to switch this one over to python3.
>
> After I launch teeworlds, I see a loading bar and hear the music. Then
> the screen goes red and I don’t see anything.
>
> I’m on the latest OpenBSD release that sysupgrade gives me. And this
> box (a lenovo amd64 laptop) has an amdgpu video card.
>
> If you want me to try anything else let me know.

This is unexpected, because I'm running it on amdgpu as well.
See: https://codevoid.de/9/p/rec-screen-20210914_080244.mp4

Is there any console output that looks interesting? Something in
/var/log/messages or Xorg.0.log?

The only issue on amdgpu for me (which is not present on intel) is that
amdgpu freaks out when switching from window mode to fullscreen mode.
Starting the game in one of these modes is fine, but switching within
the game leads to weird flickering and I need to restart X.

Best regards,
Stefan



Re: Teeworlds update - Teeworlds 0.7.5

2021-09-13 Thread Daniel Dickman


> On Sep 12, 2021, at 10:23 AM, Stefan Hagen  
> wrote:
> 
> Daniel Dickman wrote:
 On Sep 12, 2021, at 9:57 AM, Stefan Hagen  
 wrote:
>>> Stuart Henderson wrote:
> On 2021/09/12 07:35, Daniel Dickman wrote:
> Can take a look if no one beats me to it but one question below.
>> On Sep 12, 2021, at 3:22 AM, Stefan Hagen  
>> wrote:
>> *ping*
>> Stefan Hagen wrote:
>>> Stefan Hagen wrote:
 Stefan Hagen wrote:
> Updated version below with the following changes:
> * dropped MESSAGE (outdated)
> * dropped ONLY_FOR_ARCHS
> * brought back your patch-src_base_detect_h which fixes BE archs
> * put myself into the maintainer seat
>> -MODULES=lang/python
>> -MODPY_VERSION =${MODPY_DEFAULT_VERSION_2}
>> +FLAVORS=python3
>> +FLAVOR=python3
>> +
> Why switch to a flavored port? For leaf ports (like games) it’s
> probably not needed.
>>> I reverted this bit back to:
>>> MODPY_VERSION =${MODPY_DEFAULT_VERSION_3}
>> Actually you should just drop this line as that’s already the default.
>> (Try “make show= MODPY_VERSION” from the shell with and without that line)
> 
> As long as MODPY_VERSION == MODPY_DEFAULT_VERSION_3 the line is not needed.

I’ve tried the update and unfortunately it doesn’t work for me. Which is too 
bad because I really want to switch this one over to python3.

After I launch teeworlds, I see a loading bar and hear the music. Then the 
screen goes red and I don’t see anything.

I’m on the latest OpenBSD release that sysupgrade gives me. And this box (a 
lenovo amd64 laptop) has an amdgpu video card.

If you want me to try anything else let me know.







Re: Teeworlds update - Teeworlds 0.7.5

2021-09-12 Thread Stefan Hagen
Daniel Dickman wrote:
> > On Sep 12, 2021, at 9:57 AM, Stefan Hagen  
> > wrote:
> > 
> > Stuart Henderson wrote:
> >>> On 2021/09/12 07:35, Daniel Dickman wrote:
> >>> Can take a look if no one beats me to it but one question below.
> >>> 
>  On Sep 12, 2021, at 3:22 AM, Stefan Hagen  
>  wrote:
>  
>  *ping*
>  
>  Stefan Hagen wrote:
> > Stefan Hagen wrote:
> >> Stefan Hagen wrote:
> >>> Updated version below with the following changes:
> >>> 
> >>> * dropped MESSAGE (outdated)
> >>> * dropped ONLY_FOR_ARCHS
> >>> * brought back your patch-src_base_detect_h which fixes BE archs
> >>> * put myself into the maintainer seat
>  
>  
>  -MODULES=lang/python
>  -MODPY_VERSION =${MODPY_DEFAULT_VERSION_2}
>  +FLAVORS=python3
>  +FLAVOR=python3
>  +
>  
> >>> 
> >>> Why switch to a flavored port? For leaf ports (like games) it’s
> >>> probably not needed.
> >
> > I reverted this bit back to:
> >  MODPY_VERSION =${MODPY_DEFAULT_VERSION_3}
> 
> Actually you should just drop this line as that’s already the default.
> 
> (Try “make show= MODPY_VERSION” from the shell with and without that line)

As long as MODPY_VERSION == MODPY_DEFAULT_VERSION_3 the line is not needed.

Index: games/teeworlds/Makefile
===
RCS file: /cvs/ports/games/teeworlds/Makefile,v
retrieving revision 1.28
diff -u -p -u -p -r1.28 Makefile
--- games/teeworlds/Makefile23 Feb 2021 19:39:23 -  1.28
+++ games/teeworlds/Makefile12 Sep 2021 14:04:56 -
@@ -1,76 +1,54 @@
 # $OpenBSD: Makefile,v 1.28 2021/02/23 19:39:23 sthen Exp $
 
-# Crashes on strict-alignment archs, see: src/base/system.c:164
-ONLY_FOR_ARCHS=amd64 i386 powerpc
-
 COMMENT=   platform game featuring buggers equipped with weapons
 
-V= 0.6.4
-DISTNAME=  teeworlds-${V}-src
+V= 0.7.5
 PKGNAME=   teeworlds-${V}
+DISTNAME=  ${PKGNAME}-src
+
 CATEGORIES=games
-REVISION=  3
 
-HOMEPAGE=  https://www.teeworlds.com/
+HOMEPAGE=  https://www.teeworlds.com
+
+MAINTAINER=Stefan Hagen 
 
-BAM_VERSION=   0.4.0
-BAM_WRKSRC=${WRKSRC}/bam-${BAM_VERSION}
+MASTER_SITES=  https://github.com/teeworlds/teeworlds/releases/download/${V}/
+# maps repo without tags/releases on 
https://github.com/teeworlds/teeworlds-maps
+# therefore hosted as archive on perso.pw
+MASTER_SITES0= http://distfiles-openbsd.perso.pw/
 
-MASTER_SITES=  https://downloads.teeworlds.com/
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX} bam-${BAM_VERSION}${EXTRACT_SUFX}
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
+   teeworlds-${V}-data.tar.gz{teeworlds-data.tar.gz}:0
 
 # BSD-like
 PERMIT_PACKAGE=Yes
 
-WANTLIB=   GL GLU SDL X11 c freetype m pthread ${COMPILER_LIBCXX} wavpack z
+WANTLIB=   GL SDL2 X11 c crypto freetype m pthread ${COMPILER_LIBCXX}
+WANTLIB+=  wavpack z
 
 COMPILER = base-clang ports-gcc
 
 LIB_DEPENDS=   audio/wavpack \
-   devel/sdl
+   devel/sdl2
 
-MODULES=   lang/python
-MODPY_VERSION =${MODPY_DEFAULT_VERSION_2}
+MODULES=   devel/cmake lang/python
 MODPY_RUNDEP=  No
 
-SUBST_VARS=CC CXX CFLAGS CXXFLAGS X11BASE
+CONFIGURE_STYLE=   cmake
+CONFIGURE_ARGS=-DPYTHON_EXECUTABLE="${MODPY_BIN}"
 
 NO_TEST=   Yes
 
+WRKSRC=${WRKDIR}/${DISTNAME}
+WRKDIST=   ${WRKSRC}
+
 # Give it a chance on ppc
 CXXFLAGS+= -fsigned-char
 
-post-extract:
-   @mv ${WRKDIR}/bam-${BAM_VERSION} ${BAM_WRKSRC}
-
-pre-configure:
-   @${SUBST_CMD} ${WRKSRC}/src/engine/shared/storage.cpp \
-   ${WRKSRC}/src/game/client/gameclient.cpp \
-   ${WRKSRC}/scripts/build.py \
-   ${WRKSRC}/scripts/compiler.py \
-   ${WRKSRC}/scripts/font_installer.sh \
-   ${WRKSRC}/scripts/make_src.py \
-   ${WRKSRC}/bam.lua \
-   ${WRKSRC}/configure.lua \
-   ${BAM_WRKSRC}/make_unix.sh \
-   ${BAM_WRKSRC}/src/driver_gcc.lua \
-   ${BAM_WRKSRC}/src/base.lua
-   # Make sure internal wavpack and zlib can't be picked up
-   rm -rf ${WRKSRC}/src/engine/external/{wavpack,zlib}
-   # Don't provide an extra copy of DejaVu
-   rm -rf ${WRKSRC}/data/fonts
-
-# build bam executable - teeworlds own build system
-pre-build:
-   cd ${BAM_WRKSRC} && /bin/sh -v make_unix.sh
-
-do-build:
-   cd ${WRKSRC} && CC=${CC} ${BAM_WRKSRC}/bam -a -v release 
wavpack=${LOCALBASE}
-
-do-install:
-   ${INSTALL_PROGRAM} ${WRKSRC}/teeworlds ${PREFIX}/bin
-   ${INSTALL_PROGRAM} ${WRKSRC}/teeworlds_srv ${PREFIX}/bin
-   ${INSTALL_DATA_DIR} ${PREFIX}/share/teeworlds
-   cd ${WRKSRC}; tar cf - data | tar xf - -C ${PREFIX}/share/teeworlds
+post-install:
+   ${INSTALL_DATA_DIR} ${WRKDIST}/datasrc/maps
+   ${INSTALL_DATA_DIR} ${WRKDIST}/datasrc/maps
+ 

Re: Teeworlds update - Teeworlds 0.7.5

2021-09-12 Thread Daniel Dickman



> On Sep 12, 2021, at 9:57 AM, Stefan Hagen  
> wrote:
> 
> Stuart Henderson wrote:
>>> On 2021/09/12 07:35, Daniel Dickman wrote:
>>> Can take a look if no one beats me to it but one question below.
>>> 
 On Sep 12, 2021, at 3:22 AM, Stefan Hagen  
 wrote:
 
 *ping*
 
 Stefan Hagen wrote:
> Stefan Hagen wrote:
>> Stefan Hagen wrote:
>>> Updated version below with the following changes:
>>> 
>>> * dropped MESSAGE (outdated)
>>> * dropped ONLY_FOR_ARCHS
>>> * brought back your patch-src_base_detect_h which fixes BE archs
>>> * put myself into the maintainer seat
 
 
 -MODULES=lang/python
 -MODPY_VERSION =${MODPY_DEFAULT_VERSION_2}
 +FLAVORS=python3
 +FLAVOR=python3
 +
 
>>> 
>>> Why switch to a flavored port? For leaf ports (like games) it’s probably 
>>> not needed.
>> 
>> Yes this should not be flavoured, that is only for ports providing
>> python modules. Stand-alone software (e.g. equivalent to lua ports using
>> MODLUA_SA) which just happens to have some bits using Python don't use it.
>> 
> 
> Thanks. I thought this is the new way of setting the python version as 
> this was mentioned on other ports. I didn't catch that this is only for 
> python modules.
> 
> I reverted this bit back to:
>  MODPY_VERSION =${MODPY_DEFAULT_VERSION_3}


Actually you should just drop this line as that’s already the default.

(Try “make show= MODPY_VERSION” from the shell with and without that line)


Re: Teeworlds update - Teeworlds 0.7.5

2021-09-12 Thread Stefan Hagen
Stuart Henderson wrote:
> On 2021/09/12 07:35, Daniel Dickman wrote:
> > Can take a look if no one beats me to it but one question below.
> > 
> > > On Sep 12, 2021, at 3:22 AM, Stefan Hagen  
> > > wrote:
> > > 
> > > *ping*
> > > 
> > > Stefan Hagen wrote:
> > >> Stefan Hagen wrote:
> > >>> Stefan Hagen wrote:
> >  Updated version below with the following changes:
> >  
> >  * dropped MESSAGE (outdated)
> >  * dropped ONLY_FOR_ARCHS
> >  * brought back your patch-src_base_detect_h which fixes BE archs
> >  * put myself into the maintainer seat
> > > 
> > > 
> > > -MODULES=lang/python
> > > -MODPY_VERSION =${MODPY_DEFAULT_VERSION_2}
> > > +FLAVORS=python3
> > > +FLAVOR=python3
> > > +
> > > 
> > 
> > Why switch to a flavored port? For leaf ports (like games) it’s probably 
> > not needed.
> 
> Yes this should not be flavoured, that is only for ports providing
> python modules. Stand-alone software (e.g. equivalent to lua ports using
> MODLUA_SA) which just happens to have some bits using Python don't use it.
> 

Thanks. I thought this is the new way of setting the python version as 
this was mentioned on other ports. I didn't catch that this is only for 
python modules.

I reverted this bit back to:
  MODPY_VERSION =   ${MODPY_DEFAULT_VERSION_3}

Index: games/teeworlds/Makefile
===
RCS file: /cvs/ports/games/teeworlds/Makefile,v
retrieving revision 1.28
diff -u -p -u -p -r1.28 Makefile
--- games/teeworlds/Makefile23 Feb 2021 19:39:23 -  1.28
+++ games/teeworlds/Makefile12 Sep 2021 13:52:39 -
@@ -1,76 +1,55 @@
 # $OpenBSD: Makefile,v 1.28 2021/02/23 19:39:23 sthen Exp $
 
-# Crashes on strict-alignment archs, see: src/base/system.c:164
-ONLY_FOR_ARCHS=amd64 i386 powerpc
-
 COMMENT=   platform game featuring buggers equipped with weapons
 
-V= 0.6.4
-DISTNAME=  teeworlds-${V}-src
+V= 0.7.5
 PKGNAME=   teeworlds-${V}
+DISTNAME=  ${PKGNAME}-src
+
 CATEGORIES=games
-REVISION=  3
 
-HOMEPAGE=  https://www.teeworlds.com/
+HOMEPAGE=  https://www.teeworlds.com
+
+MAINTAINER=Stefan Hagen 
 
-BAM_VERSION=   0.4.0
-BAM_WRKSRC=${WRKSRC}/bam-${BAM_VERSION}
+MASTER_SITES=  https://github.com/teeworlds/teeworlds/releases/download/${V}/
+# maps repo without tags/releases on 
https://github.com/teeworlds/teeworlds-maps
+# therefore hosted as archive on perso.pw
+MASTER_SITES0= http://distfiles-openbsd.perso.pw/
 
-MASTER_SITES=  https://downloads.teeworlds.com/
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX} bam-${BAM_VERSION}${EXTRACT_SUFX}
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
+   teeworlds-${V}-data.tar.gz{teeworlds-data.tar.gz}:0
 
 # BSD-like
 PERMIT_PACKAGE=Yes
 
-WANTLIB=   GL GLU SDL X11 c freetype m pthread ${COMPILER_LIBCXX} wavpack z
+WANTLIB=   GL SDL2 X11 c crypto freetype m pthread ${COMPILER_LIBCXX}
+WANTLIB+=  wavpack z
 
 COMPILER = base-clang ports-gcc
 
 LIB_DEPENDS=   audio/wavpack \
-   devel/sdl
+   devel/sdl2
 
-MODULES=   lang/python
-MODPY_VERSION =${MODPY_DEFAULT_VERSION_2}
+MODULES=   devel/cmake lang/python
+MODPY_VERSION =${MODPY_DEFAULT_VERSION_3}
 MODPY_RUNDEP=  No
 
-SUBST_VARS=CC CXX CFLAGS CXXFLAGS X11BASE
+CONFIGURE_STYLE=   cmake
+CONFIGURE_ARGS=-DPYTHON_EXECUTABLE="${MODPY_BIN}"
 
 NO_TEST=   Yes
 
+WRKSRC=${WRKDIR}/${DISTNAME}
+WRKDIST=   ${WRKSRC}
+
 # Give it a chance on ppc
 CXXFLAGS+= -fsigned-char
 
-post-extract:
-   @mv ${WRKDIR}/bam-${BAM_VERSION} ${BAM_WRKSRC}
-
-pre-configure:
-   @${SUBST_CMD} ${WRKSRC}/src/engine/shared/storage.cpp \
-   ${WRKSRC}/src/game/client/gameclient.cpp \
-   ${WRKSRC}/scripts/build.py \
-   ${WRKSRC}/scripts/compiler.py \
-   ${WRKSRC}/scripts/font_installer.sh \
-   ${WRKSRC}/scripts/make_src.py \
-   ${WRKSRC}/bam.lua \
-   ${WRKSRC}/configure.lua \
-   ${BAM_WRKSRC}/make_unix.sh \
-   ${BAM_WRKSRC}/src/driver_gcc.lua \
-   ${BAM_WRKSRC}/src/base.lua
-   # Make sure internal wavpack and zlib can't be picked up
-   rm -rf ${WRKSRC}/src/engine/external/{wavpack,zlib}
-   # Don't provide an extra copy of DejaVu
-   rm -rf ${WRKSRC}/data/fonts
-
-# build bam executable - teeworlds own build system
-pre-build:
-   cd ${BAM_WRKSRC} && /bin/sh -v make_unix.sh
-
-do-build:
-   cd ${WRKSRC} && CC=${CC} ${BAM_WRKSRC}/bam -a -v release 
wavpack=${LOCALBASE}
-
-do-install:
-   ${INSTALL_PROGRAM} ${WRKSRC}/teeworlds ${PREFIX}/bin
-   ${INSTALL_PROGRAM} ${WRKSRC}/teeworlds_srv ${PREFIX}/bin
-   ${INSTALL_DATA_DIR} ${PREFIX}/share/teeworlds
-   cd ${WRKSRC}; tar cf - data | tar xf - -C ${PREFIX}/share/teeworlds
+post-install:
+   ${INSTALL_DATA_DIR} 

Re: Teeworlds update - Teeworlds 0.7.5

2021-09-12 Thread Stuart Henderson
On 2021/09/12 07:35, Daniel Dickman wrote:
> Can take a look if no one beats me to it but one question below.
> 
> > On Sep 12, 2021, at 3:22 AM, Stefan Hagen  
> > wrote:
> > 
> > *ping*
> > 
> > Stefan Hagen wrote:
> >> Stefan Hagen wrote:
> >>> Stefan Hagen wrote:
>  Updated version below with the following changes:
>  
>  * dropped MESSAGE (outdated)
>  * dropped ONLY_FOR_ARCHS
>  * brought back your patch-src_base_detect_h which fixes BE archs
>  * put myself into the maintainer seat
> > 
> > 
> > -MODULES=lang/python
> > -MODPY_VERSION =${MODPY_DEFAULT_VERSION_2}
> > +FLAVORS=python3
> > +FLAVOR=python3
> > +
> > 
> 
> Why switch to a flavored port? For leaf ports (like games) it’s probably not 
> needed.
> 
> 
> 

Yes this should not be flavoured, that is only for ports providing
python modules. Stand-alone software (e.g. equivalent to lua ports using
MODLUA_SA) which just happens to have some bits using Python don't use it.



Re: Teeworlds update - Teeworlds 0.7.5

2021-09-12 Thread Daniel Dickman
Can take a look if no one beats me to it but one question below.

> On Sep 12, 2021, at 3:22 AM, Stefan Hagen  
> wrote:
> 
> *ping*
> 
> Stefan Hagen wrote:
>> Stefan Hagen wrote:
>>> Stefan Hagen wrote:
 Updated version below with the following changes:
 
 * dropped MESSAGE (outdated)
 * dropped ONLY_FOR_ARCHS
 * brought back your patch-src_base_detect_h which fixes BE archs
 * put myself into the maintainer seat
> 
> 
> -MODULES=lang/python
> -MODPY_VERSION =${MODPY_DEFAULT_VERSION_2}
> +FLAVORS=python3
> +FLAVOR=python3
> +
> 

Why switch to a flavored port? For leaf ports (like games) it’s probably not 
needed.





Re: Teeworlds update - Teeworlds 0.7.5

2021-09-12 Thread Stefan Hagen
*ping*

Stefan Hagen wrote:
> Stefan Hagen wrote:
> > Stefan Hagen wrote:
> > > Updated version below with the following changes:
> > > 
> > > * dropped MESSAGE (outdated)
> > > * dropped ONLY_FOR_ARCHS
> > > * brought back your patch-src_base_detect_h which fixes BE archs
> > > * put myself into the maintainer seat

Index: games/teeworlds/Makefile
===
RCS file: /cvs/ports/games/teeworlds/Makefile,v
retrieving revision 1.28
diff -u -p -u -p -r1.28 Makefile
--- games/teeworlds/Makefile23 Feb 2021 19:39:23 -  1.28
+++ games/teeworlds/Makefile17 Aug 2021 17:48:43 -
@@ -1,76 +1,57 @@
 # $OpenBSD: Makefile,v 1.28 2021/02/23 19:39:23 sthen Exp $
 
-# Crashes on strict-alignment archs, see: src/base/system.c:164
-ONLY_FOR_ARCHS=amd64 i386 powerpc
-
 COMMENT=   platform game featuring buggers equipped with weapons
 
-V= 0.6.4
-DISTNAME=  teeworlds-${V}-src
+V= 0.7.5
 PKGNAME=   teeworlds-${V}
+DISTNAME=  ${PKGNAME}-src
+
 CATEGORIES=games
-REVISION=  3
 
-HOMEPAGE=  https://www.teeworlds.com/
+HOMEPAGE=  https://www.teeworlds.com
+
+MAINTAINER=Stefan Hagen 
 
-BAM_VERSION=   0.4.0
-BAM_WRKSRC=${WRKSRC}/bam-${BAM_VERSION}
+MASTER_SITES=  https://github.com/teeworlds/teeworlds/releases/download/${V}/
+# maps repo without tags/releases on 
https://github.com/teeworlds/teeworlds-maps
+# therefore hosted as archive on perso.pw
+MASTER_SITES0= http://distfiles-openbsd.perso.pw/
 
-MASTER_SITES=  https://downloads.teeworlds.com/
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX} bam-${BAM_VERSION}${EXTRACT_SUFX}
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
+   teeworlds-${V}-data.tar.gz{teeworlds-data.tar.gz}:0
 
 # BSD-like
 PERMIT_PACKAGE=Yes
 
-WANTLIB=   GL GLU SDL X11 c freetype m pthread ${COMPILER_LIBCXX} wavpack z
+WANTLIB=   GL SDL2 X11 c crypto freetype m pthread ${COMPILER_LIBCXX}
+WANTLIB+=  wavpack z
 
 COMPILER = base-clang ports-gcc
 
 LIB_DEPENDS=   audio/wavpack \
-   devel/sdl
+   devel/sdl2
 
-MODULES=   lang/python
-MODPY_VERSION =${MODPY_DEFAULT_VERSION_2}
+FLAVORS=   python3
+FLAVOR=python3
+
+MODULES=   devel/cmake lang/python
 MODPY_RUNDEP=  No
 
-SUBST_VARS=CC CXX CFLAGS CXXFLAGS X11BASE
+CONFIGURE_STYLE=   cmake
+CONFIGURE_ARGS=-DPYTHON_EXECUTABLE="${MODPY_BIN}"
 
 NO_TEST=   Yes
 
+WRKSRC=${WRKDIR}/${DISTNAME}
+WRKDIST=   ${WRKSRC}
+
 # Give it a chance on ppc
 CXXFLAGS+= -fsigned-char
 
-post-extract:
-   @mv ${WRKDIR}/bam-${BAM_VERSION} ${BAM_WRKSRC}
-
-pre-configure:
-   @${SUBST_CMD} ${WRKSRC}/src/engine/shared/storage.cpp \
-   ${WRKSRC}/src/game/client/gameclient.cpp \
-   ${WRKSRC}/scripts/build.py \
-   ${WRKSRC}/scripts/compiler.py \
-   ${WRKSRC}/scripts/font_installer.sh \
-   ${WRKSRC}/scripts/make_src.py \
-   ${WRKSRC}/bam.lua \
-   ${WRKSRC}/configure.lua \
-   ${BAM_WRKSRC}/make_unix.sh \
-   ${BAM_WRKSRC}/src/driver_gcc.lua \
-   ${BAM_WRKSRC}/src/base.lua
-   # Make sure internal wavpack and zlib can't be picked up
-   rm -rf ${WRKSRC}/src/engine/external/{wavpack,zlib}
-   # Don't provide an extra copy of DejaVu
-   rm -rf ${WRKSRC}/data/fonts
-
-# build bam executable - teeworlds own build system
-pre-build:
-   cd ${BAM_WRKSRC} && /bin/sh -v make_unix.sh
-
-do-build:
-   cd ${WRKSRC} && CC=${CC} ${BAM_WRKSRC}/bam -a -v release 
wavpack=${LOCALBASE}
-
-do-install:
-   ${INSTALL_PROGRAM} ${WRKSRC}/teeworlds ${PREFIX}/bin
-   ${INSTALL_PROGRAM} ${WRKSRC}/teeworlds_srv ${PREFIX}/bin
-   ${INSTALL_DATA_DIR} ${PREFIX}/share/teeworlds
-   cd ${WRKSRC}; tar cf - data | tar xf - -C ${PREFIX}/share/teeworlds
+post-install:
+   ${INSTALL_DATA_DIR} ${WRKDIST}/datasrc/maps
+   ${INSTALL_DATA_DIR} ${WRKDIST}/datasrc/maps
+   ${INSTALL_DATA} ${WRKDIR}/maps/* ${WRKDIST}/datasrc/maps/
+   ${INSTALL_DATA} ${WRKDIR}/languages/* ${WRKDIST}/datasrc/languages/
 
 .include 
Index: games/teeworlds/distinfo
===
RCS file: /cvs/ports/games/teeworlds/distinfo,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 distinfo
--- games/teeworlds/distinfo30 Nov 2016 18:17:03 -  1.6
+++ games/teeworlds/distinfo17 Aug 2021 17:48:43 -
@@ -1,4 +1,4 @@
-SHA256 (bam-0.4.0.tar.gz) = Xk5JILTSZdpYL2Z3TpseyN37513cAo+6hsEvaG6hjbM=
-SHA256 (teeworlds-0.6.4-src.tar.gz) = 
wmHRnrsAtUUfqizrSnypRcrSrdSLBgRutDtAzMn9mOI=
-SIZE (bam-0.4.0.tar.gz) = 206780
-SIZE (teeworlds-0.6.4-src.tar.gz) = 8771622
+SHA256 (teeworlds-0.7.5-data.tar.gz) = 
My+UViTDKr75PkYu8/IfHWJGpPqF0ynJN49vEG4h6iI=
+SHA256 (teeworlds-0.7.5-src.tar.gz) = 
/N4iIzmOAnQ07JYxUQPphh/EWBYbSbFZCNxWuOeo7Nk=
+SIZE 

Re: Teeworlds update - Teeworlds 0.7.5

2021-08-17 Thread Stefan Hagen
Stefan Hagen wrote:
> Stefan Hagen wrote:
> > Updated version below with the following changes:
> > 
> > * dropped MESSAGE (outdated)
> > * dropped ONLY_FOR_ARCHS
> > * brought back your patch-src_base_detect_h which fixes BE archs
> > * put myself into the maintainer seat
> 
> Again with a small, non-functional correction:
> 
>   -MODPY_VERSION =${MODPY_DEFAULT_VERSION_3}
>   +FLAVORS=   python3
>   +FLAVOR=python3

The more I learn, the more I fix. This time:

* When using MASTER_SITES, do not use GH_*, but DISTNAME

But I think we reached nitpick level. So if an experienced eye could
cross check and OK (if OK), that would be great.

Index: games/teeworlds/Makefile
===
RCS file: /cvs/ports/games/teeworlds/Makefile,v
retrieving revision 1.28
diff -u -p -u -p -r1.28 Makefile
--- games/teeworlds/Makefile23 Feb 2021 19:39:23 -  1.28
+++ games/teeworlds/Makefile17 Aug 2021 17:48:43 -
@@ -1,76 +1,57 @@
 # $OpenBSD: Makefile,v 1.28 2021/02/23 19:39:23 sthen Exp $
 
-# Crashes on strict-alignment archs, see: src/base/system.c:164
-ONLY_FOR_ARCHS=amd64 i386 powerpc
-
 COMMENT=   platform game featuring buggers equipped with weapons
 
-V= 0.6.4
-DISTNAME=  teeworlds-${V}-src
+V= 0.7.5
 PKGNAME=   teeworlds-${V}
+DISTNAME=  ${PKGNAME}-src
+
 CATEGORIES=games
-REVISION=  3
 
-HOMEPAGE=  https://www.teeworlds.com/
+HOMEPAGE=  https://www.teeworlds.com
+
+MAINTAINER=Stefan Hagen 
 
-BAM_VERSION=   0.4.0
-BAM_WRKSRC=${WRKSRC}/bam-${BAM_VERSION}
+MASTER_SITES=  https://github.com/teeworlds/teeworlds/releases/download/${V}/
+# maps repo without tags/releases on 
https://github.com/teeworlds/teeworlds-maps
+# therefore hosted as archive on perso.pw
+MASTER_SITES0= http://distfiles-openbsd.perso.pw/
 
-MASTER_SITES=  https://downloads.teeworlds.com/
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX} bam-${BAM_VERSION}${EXTRACT_SUFX}
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
+   teeworlds-${V}-data.tar.gz{teeworlds-data.tar.gz}:0
 
 # BSD-like
 PERMIT_PACKAGE=Yes
 
-WANTLIB=   GL GLU SDL X11 c freetype m pthread ${COMPILER_LIBCXX} wavpack z
+WANTLIB=   GL SDL2 X11 c crypto freetype m pthread ${COMPILER_LIBCXX}
+WANTLIB+=  wavpack z
 
 COMPILER = base-clang ports-gcc
 
 LIB_DEPENDS=   audio/wavpack \
-   devel/sdl
+   devel/sdl2
 
-MODULES=   lang/python
-MODPY_VERSION =${MODPY_DEFAULT_VERSION_2}
+FLAVORS=   python3
+FLAVOR=python3
+
+MODULES=   devel/cmake lang/python
 MODPY_RUNDEP=  No
 
-SUBST_VARS=CC CXX CFLAGS CXXFLAGS X11BASE
+CONFIGURE_STYLE=   cmake
+CONFIGURE_ARGS=-DPYTHON_EXECUTABLE="${MODPY_BIN}"
 
 NO_TEST=   Yes
 
+WRKSRC=${WRKDIR}/${DISTNAME}
+WRKDIST=   ${WRKSRC}
+
 # Give it a chance on ppc
 CXXFLAGS+= -fsigned-char
 
-post-extract:
-   @mv ${WRKDIR}/bam-${BAM_VERSION} ${BAM_WRKSRC}
-
-pre-configure:
-   @${SUBST_CMD} ${WRKSRC}/src/engine/shared/storage.cpp \
-   ${WRKSRC}/src/game/client/gameclient.cpp \
-   ${WRKSRC}/scripts/build.py \
-   ${WRKSRC}/scripts/compiler.py \
-   ${WRKSRC}/scripts/font_installer.sh \
-   ${WRKSRC}/scripts/make_src.py \
-   ${WRKSRC}/bam.lua \
-   ${WRKSRC}/configure.lua \
-   ${BAM_WRKSRC}/make_unix.sh \
-   ${BAM_WRKSRC}/src/driver_gcc.lua \
-   ${BAM_WRKSRC}/src/base.lua
-   # Make sure internal wavpack and zlib can't be picked up
-   rm -rf ${WRKSRC}/src/engine/external/{wavpack,zlib}
-   # Don't provide an extra copy of DejaVu
-   rm -rf ${WRKSRC}/data/fonts
-
-# build bam executable - teeworlds own build system
-pre-build:
-   cd ${BAM_WRKSRC} && /bin/sh -v make_unix.sh
-
-do-build:
-   cd ${WRKSRC} && CC=${CC} ${BAM_WRKSRC}/bam -a -v release 
wavpack=${LOCALBASE}
-
-do-install:
-   ${INSTALL_PROGRAM} ${WRKSRC}/teeworlds ${PREFIX}/bin
-   ${INSTALL_PROGRAM} ${WRKSRC}/teeworlds_srv ${PREFIX}/bin
-   ${INSTALL_DATA_DIR} ${PREFIX}/share/teeworlds
-   cd ${WRKSRC}; tar cf - data | tar xf - -C ${PREFIX}/share/teeworlds
+post-install:
+   ${INSTALL_DATA_DIR} ${WRKDIST}/datasrc/maps
+   ${INSTALL_DATA_DIR} ${WRKDIST}/datasrc/maps
+   ${INSTALL_DATA} ${WRKDIR}/maps/* ${WRKDIST}/datasrc/maps/
+   ${INSTALL_DATA} ${WRKDIR}/languages/* ${WRKDIST}/datasrc/languages/
 
 .include 
Index: games/teeworlds/distinfo
===
RCS file: /cvs/ports/games/teeworlds/distinfo,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 distinfo
--- games/teeworlds/distinfo30 Nov 2016 18:17:03 -  1.6
+++ games/teeworlds/distinfo17 Aug 2021 17:48:43 -
@@ -1,4 +1,4 @@
-SHA256 (bam-0.4.0.tar.gz) = 

Re: Teeworlds update - Teeworlds 0.7.5

2021-08-16 Thread Stefan Hagen
Stefan Hagen wrote:
> Stefan Hagen wrote:
> > Stefan Hagen wrote:
> >>> Updated version below with the following changes:
> >>>
> >>> * dropped MESSAGE (outdated)
> >>> * dropped ONLY_FOR_ARCHS
> >>> * brought back your patch-src_base_detect_h which fixes BE archs
> >>> * put myself into the maintainer seat

Again with a small, non-functional correction:

  -MODPY_VERSION =${MODPY_DEFAULT_VERSION_3}
  +FLAVORS=   python3
  +FLAVOR=python3

Index: games/teeworlds/Makefile
===
RCS file: /cvs/ports/games/teeworlds/Makefile,v
retrieving revision 1.28
diff -u -p -u -p -r1.28 Makefile
--- games/teeworlds/Makefile23 Feb 2021 19:39:23 -  1.28
+++ games/teeworlds/Makefile16 Aug 2021 11:32:05 -
@@ -1,76 +1,59 @@
 # $OpenBSD: Makefile,v 1.28 2021/02/23 19:39:23 sthen Exp $
 
-# Crashes on strict-alignment archs, see: src/base/system.c:164
-ONLY_FOR_ARCHS=amd64 i386 powerpc
-
 COMMENT=   platform game featuring buggers equipped with weapons
 
-V= 0.6.4
-DISTNAME=  teeworlds-${V}-src
-PKGNAME=   teeworlds-${V}
+V= 0.7.5
+GH_ACCOUNT=teeworlds
+GH_PROJECT=teeworlds
+GH_TAGNAME=${V}
+
 CATEGORIES=games
-REVISION=  3
 
-HOMEPAGE=  https://www.teeworlds.com/
+HOMEPAGE=  https://www.teeworlds.com
+
+PKGNAME=   ${GH_PROJECT}-${V}
+DISTNAME=  ${PKGNAME}-src
 
-BAM_VERSION=   0.4.0
-BAM_WRKSRC=${WRKSRC}/bam-${BAM_VERSION}
+MAINTAINER=Stefan Hagen 
 
-MASTER_SITES=  https://downloads.teeworlds.com/
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX} bam-${BAM_VERSION}${EXTRACT_SUFX}
+MASTER_SITES=  https://github.com/teeworlds/teeworlds/releases/download/${V}/
+# maps repo without tags/releases on 
https://github.com/teeworlds/teeworlds-maps
+# therefore hosted as archive on perso.pw
+MASTER_SITES0= http://distfiles-openbsd.perso.pw/
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} teeworlds-data.tar.gz:0
 
 # BSD-like
 PERMIT_PACKAGE=Yes
 
-WANTLIB=   GL GLU SDL X11 c freetype m pthread ${COMPILER_LIBCXX} wavpack z
+WANTLIB=   GL SDL2 X11 c crypto freetype m pthread ${COMPILER_LIBCXX}
+WANTLIB+=  wavpack z
 
 COMPILER = base-clang ports-gcc
 
 LIB_DEPENDS=   audio/wavpack \
-   devel/sdl
+   devel/sdl2
 
-MODULES=   lang/python
-MODPY_VERSION =${MODPY_DEFAULT_VERSION_2}
+FLAVORS=   python3
+FLAVOR=python3
+
+MODULES=   devel/cmake lang/python
 MODPY_RUNDEP=  No
 
-SUBST_VARS=CC CXX CFLAGS CXXFLAGS X11BASE
+CONFIGURE_STYLE=   cmake
+CONFIGURE_ARGS=-DPYTHON_EXECUTABLE="${MODPY_BIN}"
 
 NO_TEST=   Yes
 
+WRKSRC=${WRKDIR}/${DISTNAME}
+WRKDIST=   ${WRKSRC}
+
 # Give it a chance on ppc
 CXXFLAGS+= -fsigned-char
 
-post-extract:
-   @mv ${WRKDIR}/bam-${BAM_VERSION} ${BAM_WRKSRC}
-
-pre-configure:
-   @${SUBST_CMD} ${WRKSRC}/src/engine/shared/storage.cpp \
-   ${WRKSRC}/src/game/client/gameclient.cpp \
-   ${WRKSRC}/scripts/build.py \
-   ${WRKSRC}/scripts/compiler.py \
-   ${WRKSRC}/scripts/font_installer.sh \
-   ${WRKSRC}/scripts/make_src.py \
-   ${WRKSRC}/bam.lua \
-   ${WRKSRC}/configure.lua \
-   ${BAM_WRKSRC}/make_unix.sh \
-   ${BAM_WRKSRC}/src/driver_gcc.lua \
-   ${BAM_WRKSRC}/src/base.lua
-   # Make sure internal wavpack and zlib can't be picked up
-   rm -rf ${WRKSRC}/src/engine/external/{wavpack,zlib}
-   # Don't provide an extra copy of DejaVu
-   rm -rf ${WRKSRC}/data/fonts
-
-# build bam executable - teeworlds own build system
-pre-build:
-   cd ${BAM_WRKSRC} && /bin/sh -v make_unix.sh
-
-do-build:
-   cd ${WRKSRC} && CC=${CC} ${BAM_WRKSRC}/bam -a -v release 
wavpack=${LOCALBASE}
-
-do-install:
-   ${INSTALL_PROGRAM} ${WRKSRC}/teeworlds ${PREFIX}/bin
-   ${INSTALL_PROGRAM} ${WRKSRC}/teeworlds_srv ${PREFIX}/bin
-   ${INSTALL_DATA_DIR} ${PREFIX}/share/teeworlds
-   cd ${WRKSRC}; tar cf - data | tar xf - -C ${PREFIX}/share/teeworlds
+post-install:
+   ${INSTALL_DATA_DIR} ${WRKDIST}/datasrc/maps
+   ${INSTALL_DATA_DIR} ${WRKDIST}/datasrc/maps
+   ${INSTALL_DATA} ${WRKDIR}/maps/* ${WRKDIST}/datasrc/maps/
+   ${INSTALL_DATA} ${WRKDIR}/languages/* ${WRKDIST}/datasrc/languages/
 
 .include 
Index: games/teeworlds/distinfo
===
RCS file: /cvs/ports/games/teeworlds/distinfo,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 distinfo
--- games/teeworlds/distinfo30 Nov 2016 18:17:03 -  1.6
+++ games/teeworlds/distinfo16 Aug 2021 11:32:05 -
@@ -1,4 +1,4 @@
-SHA256 (bam-0.4.0.tar.gz) = Xk5JILTSZdpYL2Z3TpseyN37513cAo+6hsEvaG6hjbM=
-SHA256 (teeworlds-0.6.4-src.tar.gz) = 
wmHRnrsAtUUfqizrSnypRcrSrdSLBgRutDtAzMn9mOI=
-SIZE (bam-0.4.0.tar.gz) = 206780
-SIZE 

Re: Teeworlds update - Teeworlds 0.7.5

2021-08-10 Thread Stefan Hagen
Stefan Hagen wrote:
> Stefan Hagen wrote:
>>> Updated version below with the following changes:
>>>
>>> * dropped MESSAGE (outdated)
>>> * dropped ONLY_FOR_ARCHS
>>> * brought back your patch-src_base_detect_h which fixes BE archs
>>> * put myself into the maintainer seat
>>>
>>> Best Regards,
>>> Stefan
>>
>> Again, with a working patch.
> 
> I'm not sure what kills the patch, but it doesn't want to work inline.
> Also I got a report that the port is working fine on radeondrm.
> 
> Patch is attached now.

And the patch was missing a patch :(
The good news is, I fixed my vim to let patches alone (note: autocmd on
FileType gets executed on :r  as well...)

I redid the whole cvs rm/add process and now it's there.


Index: games/teeworlds/Makefile
===
RCS file: /cvs/ports/games/teeworlds/Makefile,v
retrieving revision 1.28
diff -u -p -u -p -r1.28 Makefile
--- games/teeworlds/Makefile23 Feb 2021 19:39:23 -  1.28
+++ games/teeworlds/Makefile10 Aug 2021 21:26:43 -
@@ -1,76 +1,57 @@
 # $OpenBSD: Makefile,v 1.28 2021/02/23 19:39:23 sthen Exp $
 
-# Crashes on strict-alignment archs, see: src/base/system.c:164
-ONLY_FOR_ARCHS=amd64 i386 powerpc
-
 COMMENT=   platform game featuring buggers equipped with weapons
 
-V= 0.6.4
-DISTNAME=  teeworlds-${V}-src
-PKGNAME=   teeworlds-${V}
+V= 0.7.5
+GH_ACCOUNT=teeworlds
+GH_PROJECT=teeworlds
+GH_TAGNAME=${V}
+
 CATEGORIES=games
-REVISION=  3
 
-HOMEPAGE=  https://www.teeworlds.com/
+HOMEPAGE=  https://www.teeworlds.com
+
+PKGNAME=   ${GH_PROJECT}-${V}
+DISTNAME=  ${PKGNAME}-src
 
-BAM_VERSION=   0.4.0
-BAM_WRKSRC=${WRKSRC}/bam-${BAM_VERSION}
+MAINTAINER=Stefan Hagen 
 
-MASTER_SITES=  https://downloads.teeworlds.com/
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX} bam-${BAM_VERSION}${EXTRACT_SUFX}
+MASTER_SITES=  https://github.com/teeworlds/teeworlds/releases/download/${V}/
+# maps repo without tags/releases on 
https://github.com/teeworlds/teeworlds-maps
+# therefore hosted as archive on perso.pw
+MASTER_SITES0= http://distfiles-openbsd.perso.pw/
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} teeworlds-data.tar.gz:0
 
 # BSD-like
 PERMIT_PACKAGE=Yes
 
-WANTLIB=   GL GLU SDL X11 c freetype m pthread ${COMPILER_LIBCXX} wavpack z
+WANTLIB=   GL SDL2 X11 c crypto freetype m pthread ${COMPILER_LIBCXX}
+WANTLIB+=  wavpack z
 
 COMPILER = base-clang ports-gcc
 
 LIB_DEPENDS=   audio/wavpack \
-   devel/sdl
+   devel/sdl2
 
-MODULES=   lang/python
-MODPY_VERSION =${MODPY_DEFAULT_VERSION_2}
+MODULES=   devel/cmake lang/python
+MODPY_VERSION =${MODPY_DEFAULT_VERSION_3}
 MODPY_RUNDEP=  No
 
-SUBST_VARS=CC CXX CFLAGS CXXFLAGS X11BASE
+CONFIGURE_STYLE=   cmake
+CONFIGURE_ARGS=-DPYTHON_EXECUTABLE="${MODPY_BIN}"
 
 NO_TEST=   Yes
 
+WRKSRC=${WRKDIR}/${DISTNAME}
+WRKDIST=   ${WRKSRC}
+
 # Give it a chance on ppc
 CXXFLAGS+= -fsigned-char
 
-post-extract:
-   @mv ${WRKDIR}/bam-${BAM_VERSION} ${BAM_WRKSRC}
-
-pre-configure:
-   @${SUBST_CMD} ${WRKSRC}/src/engine/shared/storage.cpp \
-   ${WRKSRC}/src/game/client/gameclient.cpp \
-   ${WRKSRC}/scripts/build.py \
-   ${WRKSRC}/scripts/compiler.py \
-   ${WRKSRC}/scripts/font_installer.sh \
-   ${WRKSRC}/scripts/make_src.py \
-   ${WRKSRC}/bam.lua \
-   ${WRKSRC}/configure.lua \
-   ${BAM_WRKSRC}/make_unix.sh \
-   ${BAM_WRKSRC}/src/driver_gcc.lua \
-   ${BAM_WRKSRC}/src/base.lua
-   # Make sure internal wavpack and zlib can't be picked up
-   rm -rf ${WRKSRC}/src/engine/external/{wavpack,zlib}
-   # Don't provide an extra copy of DejaVu
-   rm -rf ${WRKSRC}/data/fonts
-
-# build bam executable - teeworlds own build system
-pre-build:
-   cd ${BAM_WRKSRC} && /bin/sh -v make_unix.sh
-
-do-build:
-   cd ${WRKSRC} && CC=${CC} ${BAM_WRKSRC}/bam -a -v release 
wavpack=${LOCALBASE}
-
-do-install:
-   ${INSTALL_PROGRAM} ${WRKSRC}/teeworlds ${PREFIX}/bin
-   ${INSTALL_PROGRAM} ${WRKSRC}/teeworlds_srv ${PREFIX}/bin
-   ${INSTALL_DATA_DIR} ${PREFIX}/share/teeworlds
-   cd ${WRKSRC}; tar cf - data | tar xf - -C ${PREFIX}/share/teeworlds
+post-install:
+   ${INSTALL_DATA_DIR} ${WRKDIST}/datasrc/maps
+   ${INSTALL_DATA_DIR} ${WRKDIST}/datasrc/maps
+   ${INSTALL_DATA} ${WRKDIR}/maps/* ${WRKDIST}/datasrc/maps/
+   ${INSTALL_DATA} ${WRKDIR}/languages/* ${WRKDIST}/datasrc/languages/
 
 .include 
Index: games/teeworlds/distinfo
===
RCS file: /cvs/ports/games/teeworlds/distinfo,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 distinfo
--- games/teeworlds/distinfo30 Nov 2016 18:17:03 -  1.6
+++ games/teeworlds/distinfo10 

Re: Teeworlds update - Teeworlds 0.7.5

2021-08-10 Thread Stefan Hagen
Stefan Hagen wrote:
> Stefan Hagen wrote:
>> Donovan Watteau wrote:
>>> I did some tests on loongson, macppc and amd64.
>>
>> Neat, thank you. I successfully compiled teeworlds on a sparc64 machine.
>> It doesn't have a graphics card that's able to handle SDL stuff though.
>> The server part runs fine.
>>
>>> The server part does run on loongson, so I'd suggest removing the whole
>>> ONLY_FOR_ARCHS line.  I think it should probably work on arm64 and
>>> powerpc64 too, but I don't have the hardware to confirm that.
>>>
>>> As for macppc and other big-endian hosts, my original patch
>>> (patch-src_base_detect_h) needs to be kept, otherwise big-endian hosts
>>> are misdetected as being little-endian (since it checks for internal
>>> defines instead of using the proper visible symbols). With this,
>>> both the client and the server appear to be OK on my PowerBook G4.
>>>
>>> New suggested changes (on top of yours) below [1].
>>
>> Thanks. Yes, we should keep that one.
>>
>>> However, the game is still unplayable by default on all my
>>> machines here:
>>>
>>> [...issues...]
>>>
>>> I have no idea about the origin of this.  Happens on an Intel
>>> Haswell GPU and on an old ATI Radeon Mobility.  I'm curious to
>>> know if others experience this problem too, or if I'm just in
>>> bad luck with I have here.
>>
>> Hmm. I don't have any of those problems. Teeworlds runs fine here on two
>> Intel machines:
>>
>> * Intel i5 Gen3 / HD 4000 (on a small laptop screen)
>> * Intel i7 Gen8 / UHD 630 (on a 4k screen)
>>
>> I got one report with this double mouse issue on a dual screen setup,
>> where the fullscreen mode also spans over both screens. This is
>> something for upstream to look into imho.
>>
>> Updated version below with the following changes:
>>
>> * dropped MESSAGE (outdated)
>> * dropped ONLY_FOR_ARCHS
>> * brought back your patch-src_base_detect_h which fixes BE archs
>> * put myself into the maintainer seat
>>
>> Best Regards,
>> Stefan
>
> Again, with a working patch.

I'm not sure what kills the patch, but it doesn't want to work inline.
Also I got a report that the port is working fine on radeondrm.

Patch is attached now.

Sorry, for the noise.
Index: games/teeworlds/Makefile
===
RCS file: /cvs/ports/games/teeworlds/Makefile,v
retrieving revision 1.28
diff -u -p -u -p -r1.28 Makefile
--- games/teeworlds/Makefile23 Feb 2021 19:39:23 -  1.28
+++ games/teeworlds/Makefile10 Aug 2021 20:11:01 -
@@ -1,76 +1,57 @@
 # $OpenBSD: Makefile,v 1.28 2021/02/23 19:39:23 sthen Exp $
 
-# Crashes on strict-alignment archs, see: src/base/system.c:164
-ONLY_FOR_ARCHS=amd64 i386 powerpc
-
 COMMENT=   platform game featuring buggers equipped with weapons
 
-V= 0.6.4
-DISTNAME=  teeworlds-${V}-src
-PKGNAME=   teeworlds-${V}
+V= 0.7.5
+GH_ACCOUNT=teeworlds
+GH_PROJECT=teeworlds
+GH_TAGNAME=${V}
+
 CATEGORIES=games
-REVISION=  3
 
-HOMEPAGE=  https://www.teeworlds.com/
+HOMEPAGE=  https://www.teeworlds.com
+
+PKGNAME=   ${GH_PROJECT}-${V}
+DISTNAME=  ${PKGNAME}-src
 
-BAM_VERSION=   0.4.0
-BAM_WRKSRC=${WRKSRC}/bam-${BAM_VERSION}
+MAINTAINER=Stefan Hagen 
 
-MASTER_SITES=  https://downloads.teeworlds.com/
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX} bam-${BAM_VERSION}${EXTRACT_SUFX}
+MASTER_SITES=  https://github.com/teeworlds/teeworlds/releases/download/${V}/
+# maps repo without tags/releases on 
https://github.com/teeworlds/teeworlds-maps
+# therefore hosted as archive on perso.pw
+MASTER_SITES0= http://distfiles-openbsd.perso.pw/
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} teeworlds-data.tar.gz:0
 
 # BSD-like
 PERMIT_PACKAGE=Yes
 
-WANTLIB=   GL GLU SDL X11 c freetype m pthread ${COMPILER_LIBCXX} wavpack z
+WANTLIB=   GL SDL2 X11 c crypto freetype m pthread ${COMPILER_LIBCXX}
+WANTLIB+=  wavpack z
 
 COMPILER = base-clang ports-gcc
 
 LIB_DEPENDS=   audio/wavpack \
-   devel/sdl
+   devel/sdl2
 
-MODULES=   lang/python
-MODPY_VERSION =${MODPY_DEFAULT_VERSION_2}
+MODULES=   devel/cmake lang/python
+MODPY_VERSION =${MODPY_DEFAULT_VERSION_3}
 MODPY_RUNDEP=  No
 
-SUBST_VARS=CC CXX CFLAGS CXXFLAGS X11BASE
+CONFIGURE_STYLE=   cmake
+CONFIGURE_ARGS=-DPYTHON_EXECUTABLE="${MODPY_BIN}"
 
 NO_TEST=   Yes
 
+WRKSRC=${WRKDIR}/${DISTNAME}
+WRKDIST=   ${WRKSRC}
+
 # Give it a chance on ppc
 CXXFLAGS+= -fsigned-char
 
-post-extract:
-   @mv ${WRKDIR}/bam-${BAM_VERSION} ${BAM_WRKSRC}
-
-pre-configure:
-   @${SUBST_CMD} ${WRKSRC}/src/engine/shared/storage.cpp \
-   ${WRKSRC}/src/game/client/gameclient.cpp \
-   ${WRKSRC}/scripts/build.py \
-   ${WRKSRC}/scripts/compiler.py \
-   ${WRKSRC}/scripts/font_installer.sh \
-   ${WRKSRC}/scripts/make_src.py \
-   ${WRKSRC}/bam.lua 

Re: Teeworlds update - Teeworlds 0.7.5

2021-08-10 Thread Stefan Hagen
Stefan Hagen wrote:
> Donovan Watteau wrote:
>> I did some tests on loongson, macppc and amd64.
>
> Neat, thank you. I successfully compiled teeworlds on a sparc64 machine.
> It doesn't have a graphics card that's able to handle SDL stuff though.
> The server part runs fine.
>
>> The server part does run on loongson, so I'd suggest removing the whole
>> ONLY_FOR_ARCHS line.  I think it should probably work on arm64 and
>> powerpc64 too, but I don't have the hardware to confirm that.
>>
>> As for macppc and other big-endian hosts, my original patch
>> (patch-src_base_detect_h) needs to be kept, otherwise big-endian hosts
>> are misdetected as being little-endian (since it checks for internal
>> defines instead of using the proper visible symbols). With this,
>> both the client and the server appear to be OK on my PowerBook G4.
>>
>> New suggested changes (on top of yours) below [1].
>
> Thanks. Yes, we should keep that one.
>
>> However, the game is still unplayable by default on all my
>> machines here:
>>
>> [...issues...]
>>
>> I have no idea about the origin of this.  Happens on an Intel
>> Haswell GPU and on an old ATI Radeon Mobility.  I'm curious to
>> know if others experience this problem too, or if I'm just in
>> bad luck with I have here.
>
> Hmm. I don't have any of those problems. Teeworlds runs fine here on two
> Intel machines:
>
> * Intel i5 Gen3 / HD 4000 (on a small laptop screen)
> * Intel i7 Gen8 / UHD 630 (on a 4k screen)
>
> I got one report with this double mouse issue on a dual screen setup,
> where the fullscreen mode also spans over both screens. This is
> something for upstream to look into imho.
>
> Updated version below with the following changes:
>
> * dropped MESSAGE (outdated)
> * dropped ONLY_FOR_ARCHS
> * brought back your patch-src_base_detect_h which fixes BE archs
> * put myself into the maintainer seat
>
> Best Regards,
> Stefan

Again, with a working patch.

Index: games/teeworlds/Makefile
===
RCS file: /cvs/ports/games/teeworlds/Makefile,v
retrieving revision 1.28
diff -u -p -u -p -r1.28 Makefile
--- games/teeworlds/Makefile23 Feb 2021 19:39:23 -  1.28
+++ games/teeworlds/Makefile10 Aug 2021 20:11:01 -
@@ -1,76 +1,57 @@
 # $OpenBSD: Makefile,v 1.28 2021/02/23 19:39:23 sthen Exp $
 
-# Crashes on strict-alignment archs, see: src/base/system.c:164
-ONLY_FOR_ARCHS=amd64 i386 powerpc
-
 COMMENT=   platform game featuring buggers equipped with weapons
 
-V= 0.6.4
-DISTNAME=  teeworlds-${V}-src
-PKGNAME=   teeworlds-${V}
+V= 0.7.5
+GH_ACCOUNT=teeworlds
+GH_PROJECT=teeworlds
+GH_TAGNAME=${V}
+
 CATEGORIES=games
-REVISION=  3
 
-HOMEPAGE=  https://www.teeworlds.com/
+HOMEPAGE=  https://www.teeworlds.com
+
+PKGNAME=   ${GH_PROJECT}-${V}
+DISTNAME=  ${PKGNAME}-src
 
-BAM_VERSION=   0.4.0
-BAM_WRKSRC=${WRKSRC}/bam-${BAM_VERSION}
+MAINTAINER=Stefan Hagen 
 
-MASTER_SITES=  https://downloads.teeworlds.com/
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX} bam-${BAM_VERSION}${EXTRACT_SUFX}
+MASTER_SITES=  https://github.com/teeworlds/teeworlds/releases/download/${V}/
+# maps repo without tags/releases on 
https://github.com/teeworlds/teeworlds-maps
+# therefore hosted as archive on perso.pw
+MASTER_SITES0= http://distfiles-openbsd.perso.pw/
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} teeworlds-data.tar.gz:0
 
 # BSD-like
 PERMIT_PACKAGE=Yes
 
-WANTLIB=   GL GLU SDL X11 c freetype m pthread ${COMPILER_LIBCXX} wavpack z
+WANTLIB=   GL SDL2 X11 c crypto freetype m pthread ${COMPILER_LIBCXX}
+WANTLIB+=  wavpack z
 
 COMPILER = base-clang ports-gcc
 
 LIB_DEPENDS=   audio/wavpack \
-   devel/sdl
+   devel/sdl2
 
-MODULES=   lang/python
-MODPY_VERSION =${MODPY_DEFAULT_VERSION_2}
+MODULES=   devel/cmake lang/python
+MODPY_VERSION =${MODPY_DEFAULT_VERSION_3}
 MODPY_RUNDEP=  No
 
-SUBST_VARS=CC CXX CFLAGS CXXFLAGS X11BASE
+CONFIGURE_STYLE=   cmake
+CONFIGURE_ARGS=-DPYTHON_EXECUTABLE="${MODPY_BIN}"
 
 NO_TEST=   Yes
 
+WRKSRC=${WRKDIR}/${DISTNAME}
+WRKDIST=   ${WRKSRC}
+
 # Give it a chance on ppc
 CXXFLAGS+= -fsigned-char
 
-post-extract:
-   @mv ${WRKDIR}/bam-${BAM_VERSION} ${BAM_WRKSRC}
-
-pre-configure:
-   @${SUBST_CMD} ${WRKSRC}/src/engine/shared/storage.cpp \
-   ${WRKSRC}/src/game/client/gameclient.cpp \
-   ${WRKSRC}/scripts/build.py \
-   ${WRKSRC}/scripts/compiler.py \
-   ${WRKSRC}/scripts/font_installer.sh \
-   ${WRKSRC}/scripts/make_src.py \
-   ${WRKSRC}/bam.lua \
-   ${WRKSRC}/configure.lua \
-   ${BAM_WRKSRC}/make_unix.sh \
-   ${BAM_WRKSRC}/src/driver_gcc.lua \
-   ${BAM_WRKSRC}/src/base.lua
-   # Make sure internal wavpack and zlib can't be picked up
-   

Re: Teeworlds update - Teeworlds 0.7.5

2021-08-10 Thread Stefan Hagen
Donovan Watteau wrote:
> I did some tests on loongson, macppc and amd64.

Neat, thank you. I successfully compiled teeworlds on a sparc64 machine.
It doesn't have a graphics card that's able to handle SDL stuff though.
The server part runs fine.

> The server part does run on loongson, so I'd suggest removing the whole
> ONLY_FOR_ARCHS line.  I think it should probably work on arm64 and
> powerpc64 too, but I don't have the hardware to confirm that.
>
> As for macppc and other big-endian hosts, my original patch
> (patch-src_base_detect_h) needs to be kept, otherwise big-endian hosts
> are misdetected as being little-endian (since it checks for internal
> defines instead of using the proper visible symbols). With this,
> both the client and the server appear to be OK on my PowerBook G4.
>
> New suggested changes (on top of yours) below [1].

Thanks. Yes, we should keep that one.

> However, the game is still unplayable by default on all my
> machines here:
>
> [...issues...]
>
> I have no idea about the origin of this.  Happens on an Intel
> Haswell GPU and on an old ATI Radeon Mobility.  I'm curious to
> know if others experience this problem too, or if I'm just in
> bad luck with I have here.

Hmm. I don't have any of those problems. Teeworlds runs fine here on two
Intel machines:

* Intel i5 Gen3 / HD 4000 (on a small laptop screen)
* Intel i7 Gen8 / UHD 630 (on a 4k screen)

I got one report with this double mouse issue on a dual screen setup,
where the fullscreen mode also spans over both screens. This is
something for upstream to look into imho.

Updated version below with the following changes:

* dropped MESSAGE (outdated)
* dropped ONLY_FOR_ARCHS
* brought back your patch-src_base_detect_h which fixes BE archs
* put myself into the maintainer seat

Best Regards,
Stefan


Index: Makefile
===
RCS file: /cvs/ports/games/teeworlds/Makefile,v
retrieving revision 1.28
diff -u -p -u -p -r1.28 Makefile
--- Makefile23 Feb 2021 19:39:23 -  1.28
+++ Makefile10 Aug 2021 19:27:19 -
@@ -1,76 +1,57 @@
 # $OpenBSD: Makefile,v 1.28 2021/02/23 19:39:23 sthen Exp $
 
-# Crashes on strict-alignment archs, see: src/base/system.c:164
-ONLY_FOR_ARCHS=amd64 i386 powerpc
-
 COMMENT=   platform game featuring buggers equipped with weapons
 
-V= 0.6.4
-DISTNAME=  teeworlds-${V}-src
-PKGNAME=   teeworlds-${V}
+V= 0.7.5
+GH_ACCOUNT=teeworlds
+GH_PROJECT=teeworlds
+GH_TAGNAME=${V}
+
 CATEGORIES=games
-REVISION=  3
 
-HOMEPAGE=  https://www.teeworlds.com/
+HOMEPAGE=  https://www.teeworlds.com
+
+PKGNAME=   ${GH_PROJECT}-${V}
+DISTNAME=  ${PKGNAME}-src
 
-BAM_VERSION=   0.4.0
-BAM_WRKSRC=${WRKSRC}/bam-${BAM_VERSION}
+MAINTAINER=Stefan Hagen 
 
-MASTER_SITES=  https://downloads.teeworlds.com/
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX} bam-${BAM_VERSION}${EXTRACT_SUFX}
+MASTER_SITES=  https://github.com/teeworlds/teeworlds/releases/download/${V}/
+# maps repo without tags/releases on 
https://github.com/teeworlds/teeworlds-maps
+# therefore hosted as archive on perso.pw
+MASTER_SITES0= http://distfiles-openbsd.perso.pw/
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} teeworlds-data.tar.gz:0
 
 # BSD-like
 PERMIT_PACKAGE=Yes
 
-WANTLIB=   GL GLU SDL X11 c freetype m pthread ${COMPILER_LIBCXX} wavpack z
+WANTLIB=   GL SDL2 X11 c crypto freetype m pthread ${COMPILER_LIBCXX}
+WANTLIB+=  wavpack z
 
 COMPILER = base-clang ports-gcc
 
 LIB_DEPENDS=   audio/wavpack \
-   devel/sdl
+   devel/sdl2
 
-MODULES=   lang/python
-MODPY_VERSION =${MODPY_DEFAULT_VERSION_2}
+MODULES=   devel/cmake lang/python
+MODPY_VERSION =${MODPY_DEFAULT_VERSION_3}
 MODPY_RUNDEP=  No
 
-SUBST_VARS=CC CXX CFLAGS CXXFLAGS X11BASE
+CONFIGURE_STYLE=   cmake
+CONFIGURE_ARGS=-DPYTHON_EXECUTABLE="${MODPY_BIN}"
 
 NO_TEST=   Yes
 
+WRKSRC=${WRKDIR}/${DISTNAME}
+WRKDIST=   ${WRKSRC}
+
 # Give it a chance on ppc
 CXXFLAGS+= -fsigned-char
 
-post-extract:
-   @mv ${WRKDIR}/bam-${BAM_VERSION} ${BAM_WRKSRC}
-
-pre-configure:
-   @${SUBST_CMD} ${WRKSRC}/src/engine/shared/storage.cpp \
-   ${WRKSRC}/src/game/client/gameclient.cpp \
-   ${WRKSRC}/scripts/build.py \
-   ${WRKSRC}/scripts/compiler.py \
-   ${WRKSRC}/scripts/font_installer.sh \
-   ${WRKSRC}/scripts/make_src.py \
-   ${WRKSRC}/bam.lua \
-   ${WRKSRC}/configure.lua \
-   ${BAM_WRKSRC}/make_unix.sh \
-   ${BAM_WRKSRC}/src/driver_gcc.lua \
-   ${BAM_WRKSRC}/src/base.lua
-   # Make sure internal wavpack and zlib can't be picked up
-   rm -rf ${WRKSRC}/src/engine/external/{wavpack,zlib}
-   # Don't provide an extra copy of DejaVu
-   rm -rf ${WRKSRC}/data/fonts
-
-# build bam executable - 

Re: Teeworlds update - Teeworlds 0.7.5

2021-08-09 Thread Donovan Watteau
I did some tests on loongson, macppc and amd64.

The server part does run on loongson, so I'd suggest removing the whole
ONLY_FOR_ARCHS line.  I think it should probably work on arm64 and
powerpc64 too, but I don't have the hardware to confirm that.

As for macppc and other big-endian hosts, my original patch
(patch-src_base_detect_h) needs to be kept, otherwise big-endian hosts
are misdetected as being little-endian (since it checks for internal
defines instead of using the proper visible symbols).  With this,
both the client and the server appear to be OK on my PowerBook G4.

New suggested changes (on top of yours) below [1].

However, the game is still unplayable by default on all my
machines here:

- Start from scratch, with no Teeworlds configuration leftovers.
- Start the game, it goes to fullscreen by default.
- Then, I see two mouse cursors: the one from Xorg, and the
  one from the game.  The one from the game has no effect as
  long as I'm in fullscreen, so I can't click on anything.
  Just press Esc and Enter so that you can quit the game with
  a new configuration file written to the disk.
- echo gfx_fullscreen 0 >> ~/.local/share/teeworlds/settings*.json
- Now you can run the game in windowed mode, where the mouse bug
  doesn't happen.  But this is just a work-around.
- If I quit again, the whole Xorg screen sometimes freezes until
  I kill(1) Teeworlds.
- (The stuff in pkg/MESSAGE has no effect and is probably very
  outdated nowadays with SDL2.)

I have no idea about the origin of this.  Happens on an Intel
Haswell GPU and on an old ATI Radeon Mobility.  I'm curious to
know if others experience this problem too, or if I'm just in
bad luck with I have here.

Donovan

[1]:

--- games/teeworlds/Makefile.orig
+++ games/teeworlds/Makefile
@@ -1,7 +1,5 @@
 # $OpenBSD: Makefile,v 1.28 2021/02/23 19:39:23 sthen Exp $
 
-ONLY_FOR_ARCHS=amd64 i386 powerpc
-
 COMMENT=   platform game featuring buggers equipped with weapons
 
 V= 0.7.5
--- /dev/null
+++ games/teeworlds/patches/patch-src_base_detect_h
@@ -0,0 +1,26 @@
+$OpenBSD: patch-src_base_detect_h,v 1.1 2015/12/27 17:56:22 jasper Exp $
+
+Fix endianness detection.
+
+Index: src/base/detect.h
+--- src/base/detect.h.orig
 src/base/detect.h
+@@ -85,15 +85,15 @@
+ 
+ /* use gcc endianness definitions when available */
+ #if defined(__GNUC__) && !defined(__APPLE__) && !defined(__MINGW32__) && 
!defined(__sun)
+-  #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
++  #if defined(__FreeBSD__) || defined(__NetBSD__)
+   #include 
+   #else
+   #include 
+   #endif
+ 
+-  #if __BYTE_ORDER == __LITTLE_ENDIAN
++  #if BYTE_ORDER == LITTLE_ENDIAN
+   #define CONF_ARCH_ENDIAN_LITTLE 1
+-  #elif __BYTE_ORDER == __BIG_ENDIAN
++  #elif BYTE_ORDER == BIG_ENDIAN
+   #define CONF_ARCH_ENDIAN_BIG 1
+   #endif
+ #endif



Re: Teeworlds update - Teeworlds 0.7.5

2021-08-09 Thread Stefan Hagen
Donovan Watteau wrote:
> Stefan Hagen wrote:
>> Stuart Henderson wrote:
>>> On 2019/07/17 17:05, Neon King wrote:
 Hello dear ports@readers,

 The following diff upgrades Teeworlds game to the latest version. Changelog
 is available on their homepage https://teeworlds.com/
>>
>> I've fixed up this port and updated teeworlds to version 0.7.5.
>> Note that version 0.7.x is incompatible with servers from 0.6.x.
>>
>> [... nice stuff ...]
>>
>> I won't mind taking MAINTAINER for this port, but as Neon King and
>> Donovan (CC) offered port updates earlier, I won't mind if they pick
>> this up.
>
> I was its previous maintainer (I lost my interest in contributing
> through mailing-lists) and your diff looks really good to me,
> I think you'd maintain it really well.

Thank you, Donovan,

Here is the same diff with a little tweak:

I changed this:

post-install:
   mv ${WRKDIR}/maps/* ${WRKDIST}/datasrc/maps ; \
   mv ${WRKDIR}/languages/* ${WRKDIST}/datasrc/languages ; \
   rm -rf ${WRKDIR}/maps ; rm -rf ${WRKDIR}/languages ;

To this:

post-install:
${INSTALL_DATA_DIR} ${WRKDIST}/datasrc/maps
${INSTALL_DATA_DIR} ${WRKDIST}/datasrc/maps
${INSTALL_DATA} ${WRKDIR}/maps/* ${WRKDIST}/datasrc/maps/
${INSTALL_DATA} ${WRKDIR}/languages/* ${WRKDIST}/datasrc/languages/

Moving the files leads to different WRKDIST contents after a
fake/clean/fake cycle:

$ make fake # maps are copied to DISTDIR
$ make clean=fake   # maps are deleted from DESTDIR
$ make fake # maps are gone in WRKDIR and can't be copied

And using INSTALL_DATA(_DIR) is nicer anyway.

Again, OK?

Best Regards,
Stefan

Index: games/teeworlds/Makefile
===
RCS file: /cvs/ports/games/teeworlds/Makefile,v
retrieving revision 1.28
diff -u -p -u -p -r1.28 Makefile
--- games/teeworlds/Makefile23 Feb 2021 19:39:23 -  1.28
+++ games/teeworlds/Makefile9 Aug 2021 10:52:08 -
@@ -1,76 +1,57 @@
 # $OpenBSD: Makefile,v 1.28 2021/02/23 19:39:23 sthen Exp $
 
-# Crashes on strict-alignment archs, see: src/base/system.c:164
 ONLY_FOR_ARCHS=amd64 i386 powerpc
 
 COMMENT=   platform game featuring buggers equipped with weapons
 
-V= 0.6.4
-DISTNAME=  teeworlds-${V}-src
-PKGNAME=   teeworlds-${V}
+V= 0.7.5
+GH_ACCOUNT=teeworlds
+GH_PROJECT=teeworlds
+GH_TAGNAME=${V}
+
 CATEGORIES=games
-REVISION=  3
 
-HOMEPAGE=  https://www.teeworlds.com/
+HOMEPAGE=  https://www.teeworlds.com
 
-BAM_VERSION=   0.4.0
-BAM_WRKSRC=${WRKSRC}/bam-${BAM_VERSION}
+PKGNAME=   ${GH_PROJECT}-${V}
+DISTNAME=  ${PKGNAME}-src
 
-MASTER_SITES=  https://downloads.teeworlds.com/
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX} bam-${BAM_VERSION}${EXTRACT_SUFX}
+MASTER_SITES=  https://github.com/teeworlds/teeworlds/releases/download/${V}/
+# maps repo without tags/releases on 
https://github.com/teeworlds/teeworlds-maps
+# therefore hosted as archive on perso.pw
+MASTER_SITES0= http://distfiles-openbsd.perso.pw/
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} teeworlds-data.tar.gz:0
 
 # BSD-like
 PERMIT_PACKAGE=Yes
 
-WANTLIB=   GL GLU SDL X11 c freetype m pthread ${COMPILER_LIBCXX} wavpack z
+WANTLIB=   GL SDL2 X11 c crypto freetype m pthread ${COMPILER_LIBCXX}
+WANTLIB+=  wavpack z
 
 COMPILER = base-clang ports-gcc
 
 LIB_DEPENDS=   audio/wavpack \
-   devel/sdl
+   devel/sdl2
 
-MODULES=   lang/python
-MODPY_VERSION =${MODPY_DEFAULT_VERSION_2}
+MODULES=   devel/cmake lang/python
+MODPY_VERSION =${MODPY_DEFAULT_VERSION_3}
 MODPY_RUNDEP=  No
 
-SUBST_VARS=CC CXX CFLAGS CXXFLAGS X11BASE
+CONFIGURE_STYLE=   cmake
+CONFIGURE_ARGS=-DPYTHON_EXECUTABLE="${MODPY_BIN}"
 
 NO_TEST=   Yes
 
+WRKSRC=${WRKDIR}/${DISTNAME}
+WRKDIST=   ${WRKSRC}
+
 # Give it a chance on ppc
 CXXFLAGS+= -fsigned-char
 
-post-extract:
-   @mv ${WRKDIR}/bam-${BAM_VERSION} ${BAM_WRKSRC}
-
-pre-configure:
-   @${SUBST_CMD} ${WRKSRC}/src/engine/shared/storage.cpp \
-   ${WRKSRC}/src/game/client/gameclient.cpp \
-   ${WRKSRC}/scripts/build.py \
-   ${WRKSRC}/scripts/compiler.py \
-   ${WRKSRC}/scripts/font_installer.sh \
-   ${WRKSRC}/scripts/make_src.py \
-   ${WRKSRC}/bam.lua \
-   ${WRKSRC}/configure.lua \
-   ${BAM_WRKSRC}/make_unix.sh \
-   ${BAM_WRKSRC}/src/driver_gcc.lua \
-   ${BAM_WRKSRC}/src/base.lua
-   # Make sure internal wavpack and zlib can't be picked up
-   rm -rf ${WRKSRC}/src/engine/external/{wavpack,zlib}
-   # Don't provide an extra copy of DejaVu
-   rm -rf ${WRKSRC}/data/fonts
-
-# build bam executable - teeworlds own build system
-pre-build:
-   cd ${BAM_WRKSRC} && /bin/sh -v make_unix.sh
-
-do-build:
-   cd ${WRKSRC} && 

Re: Teeworlds update - Teeworlds 0.7.5

2021-08-09 Thread Donovan Watteau
Stefan Hagen wrote:
> Stuart Henderson wrote:
> > On 2019/07/17 17:05, Neon King wrote:
> >> Hello dear ports@readers,
> >>
> >> The following diff upgrades Teeworlds game to the latest version. Changelog
> >> is available on their homepage https://teeworlds.com/
> 
> I've fixed up this port and updated teeworlds to version 0.7.5.
> Note that version 0.7.x is incompatible with servers from 0.6.x.
> 
> [... nice stuff ...]
> 
> I won't mind taking MAINTAINER for this port, but as Neon King and
> Donovan (CC) offered port updates earlier, I won't mind if they pick
> this up.

Hi,

I was its previous maintainer (I lost my interest in contributing
through mailing-lists) and your diff looks really good to me,
I think you'd maintain it really well.

- Nice to see that bam and its too-many patches are gone now.
- For the strict-alignment part, yes it looks like that part is
  fixed now. I'll give it a shot on loongson and macppc (it used
  to work in the last version I maintained here) but I've never
  made that a "blocker" (I think I was its only user there :).
- I confirm that using the a copy of DejavuSans.ttf broke at
  some point (my last upgrade proposal dropped it). I agree that
  it's probably not worth it to try patching this anymore: small
  gain, and the less we patch the easier it is to maintain.
- Nice that it can still use system zlib and wavpack.
- No idea about the maps. You used to need them if you hosted a
  server with the default maps, so what you're doing here looks
  good.

I used to have some GLU crashes on amd64 after upgrading it to
0.7.2 back then, but that was circa OpenBSD 6.4 so it's probably
OK nowadays.

I'll build and test this on various machines here, but your
upgrade proposal looks really good to me. Nice work.

Donovan



Re: Teeworlds update - Teeworlds 0.7.5

2021-08-08 Thread Stefan Hagen
Stuart Henderson wrote:
> On 2019/07/17 17:05, Neon King wrote:
>> Hello dear ports@readers,
>>
>> The following diff upgrades Teeworlds game to the latest version. Changelog
>> is available on their homepage https://teeworlds.com/

I've fixed up this port and updated teeworlds to version 0.7.5.
Note that version 0.7.x is incompatible with servers from 0.6.x.

- switched to GH_*
- moved to cmake and dropped BAM
- dropped unnecessary patches (all of them)
- avoid git from running (new patch)
- the strict-alignment crash *should* be resolved. The TODO in the code
  is gone and the function looks different now
- replaced SDL with SDL2
- update to python3

All the fixes for build.lua, configure.lua and scripts/* are not
necessary anymore because the cmake build is not using these files.

The only file used in the script/ folder is cmd5.py.

The maps (teeworlds-data) are optional. They are downloaded on demand
when playing. I'm not sure if they are necessary when hosting a game.
The previous port did not contain them. But as Neon King got them
hosted, I included them as well.

I tried to go around the local copy of DejavuSans.ttf. Unfortunately the
current version does not pick up the system font. It shows buttons
without text. System wavpack and zlib are still used. The bundled
pnglite is used.

Portcheck and make port-lib-depends-check are happy. Tested on amd64.
I also played this for a few hours on various servers.

I won't mind taking MAINTAINER for this port, but as Neon King and
Donovan (CC) offered port updates earlier, I won't mind if they pick
this up.

OK?

Best Regards,
Stefan

Index: games/teeworlds/Makefile
===
RCS file: /cvs/ports/games/teeworlds/Makefile,v
retrieving revision 1.28
diff -u -p -u -p -r1.28 Makefile
--- games/teeworlds/Makefile23 Feb 2021 19:39:23 -  1.28
+++ games/teeworlds/Makefile8 Aug 2021 19:58:01 -
@@ -1,76 +1,56 @@
 # $OpenBSD: Makefile,v 1.28 2021/02/23 19:39:23 sthen Exp $
 
-# Crashes on strict-alignment archs, see: src/base/system.c:164
 ONLY_FOR_ARCHS=amd64 i386 powerpc
 
 COMMENT=   platform game featuring buggers equipped with weapons
 
-V= 0.6.4
-DISTNAME=  teeworlds-${V}-src
-PKGNAME=   teeworlds-${V}
+V= 0.7.5
+GH_ACCOUNT=teeworlds
+GH_PROJECT=teeworlds
+GH_TAGNAME=${V}
+
 CATEGORIES=games
-REVISION=  3
 
-HOMEPAGE=  https://www.teeworlds.com/
+HOMEPAGE=  https://www.teeworlds.com
 
-BAM_VERSION=   0.4.0
-BAM_WRKSRC=${WRKSRC}/bam-${BAM_VERSION}
+PKGNAME=   ${GH_PROJECT}-${V}
+DISTNAME=  ${PKGNAME}-src
 
-MASTER_SITES=  https://downloads.teeworlds.com/
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX} bam-${BAM_VERSION}${EXTRACT_SUFX}
+MASTER_SITES=  https://github.com/teeworlds/teeworlds/releases/download/${V}/
+# maps repo without tags/releases on 
https://github.com/teeworlds/teeworlds-maps
+# therefore hosted as archive on perso.pw
+MASTER_SITES0= http://distfiles-openbsd.perso.pw/
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} teeworlds-data.tar.gz:0
 
 # BSD-like
 PERMIT_PACKAGE=Yes
 
-WANTLIB=   GL GLU SDL X11 c freetype m pthread ${COMPILER_LIBCXX} wavpack z
+WANTLIB=   GL SDL2 X11 c crypto freetype m pthread ${COMPILER_LIBCXX}
+WANTLIB+=  wavpack z
 
 COMPILER = base-clang ports-gcc
 
 LIB_DEPENDS=   audio/wavpack \
-   devel/sdl
+   devel/sdl2
 
-MODULES=   lang/python
-MODPY_VERSION =${MODPY_DEFAULT_VERSION_2}
+MODULES=   devel/cmake lang/python
+MODPY_VERSION =${MODPY_DEFAULT_VERSION_3}
 MODPY_RUNDEP=  No
 
-SUBST_VARS=CC CXX CFLAGS CXXFLAGS X11BASE
+CONFIGURE_STYLE=   cmake
+CONFIGURE_ARGS=-DPYTHON_EXECUTABLE="${MODPY_BIN}"
 
 NO_TEST=   Yes
 
+WRKSRC=${WRKDIR}/${DISTNAME}
+WRKDIST=   ${WRKSRC}
+
 # Give it a chance on ppc
 CXXFLAGS+= -fsigned-char
 
-post-extract:
-   @mv ${WRKDIR}/bam-${BAM_VERSION} ${BAM_WRKSRC}
-
-pre-configure:
-   @${SUBST_CMD} ${WRKSRC}/src/engine/shared/storage.cpp \
-   ${WRKSRC}/src/game/client/gameclient.cpp \
-   ${WRKSRC}/scripts/build.py \
-   ${WRKSRC}/scripts/compiler.py \
-   ${WRKSRC}/scripts/font_installer.sh \
-   ${WRKSRC}/scripts/make_src.py \
-   ${WRKSRC}/bam.lua \
-   ${WRKSRC}/configure.lua \
-   ${BAM_WRKSRC}/make_unix.sh \
-   ${BAM_WRKSRC}/src/driver_gcc.lua \
-   ${BAM_WRKSRC}/src/base.lua
-   # Make sure internal wavpack and zlib can't be picked up
-   rm -rf ${WRKSRC}/src/engine/external/{wavpack,zlib}
-   # Don't provide an extra copy of DejaVu
-   rm -rf ${WRKSRC}/data/fonts
-
-# build bam executable - teeworlds own build system
-pre-build:
-   cd ${BAM_WRKSRC} && /bin/sh -v make_unix.sh
-
-do-build:
-   cd ${WRKSRC} && CC=${CC} ${BAM_WRKSRC}/bam -a -v release