Re: WIP UPDATE: games/openttd

2021-04-06 Thread Paco Esteban
On Tue, 06 Apr 2021, Solene Rapenne wrote:

> On Sun, 28 Feb 2021 23:09:24 -0700
> "Anthony J. Bentley" :
> 
> > Hi,
> > 
> > Here's an update to openttd-1.11.0-beta2.
> > 
> > Upstream claims new OpenGL support, faster video, and 60fps.
> > 
> > The build system has been switched to CMake. This led to the GTK icons
> > and .desktop file not being installed, a bug upstream claims will be
> > fixed before release; see:
> >   https://github.com/OpenTTD/OpenTTD/issues/8613
> >   https://github.com/OpenTTD/OpenTTD/issues/8778
> > 
> > The endian patch no longer applies and seems to have been refactored
> > although the original pull request was merged. I'd appreciate a
> > test on PowerPC to make sure this is still correct.
> > 
> 
> Update to 1.11.0, the Allegro patch wasn't applying since last diff,
> context around second hunk slightly changed.
> 
> I don't understand the .desktop issue, I read on github that it should
> be fixed but I see a rm -fr openttd.desktop* in the post-install target?
> 
> Game works fine, fast mode is a LOT faster and draw a LOT less CPU :)

Builds and runs fine for me on amd64.  Tried at 1080 60fps it does not
get over 20% CPU at any time :-)

I don't have any big-ish saved game to test (I would have to look at my
backups).  I also tested it with a 32bpp graphics set and it works
smoothly.

ok paco

> 
> Index: Makefile
> ===
> RCS file: /home/reposync/ports/games/openttd/Makefile,v
> retrieving revision 1.70
> diff -u -p -r1.70 Makefile
> --- Makefile  10 Aug 2020 21:10:35 -  1.70
> +++ Makefile  1 Apr 2021 14:55:34 -
> @@ -2,9 +2,9 @@
>  
>  COMMENT= open source clone of the game Transport Tycoon Deluxe
>  
> -V =  1.10.3
> +V =  1.11.0
>  DISTNAME =   openttd-$V-source
> -PKGNAME =openttd-$V
> +PKGNAME =openttd-1.11.0
>  
>  CATEGORIES=  games
>  
> @@ -15,8 +15,9 @@ MAINTAINER =Anthony J. Bentley   # GPLv2 only
>  PERMIT_PACKAGE=  Yes
>  
> +WANTLIB += ${COMPILER_LIBCXX} 
>  WANTLIB += SDL2 c fluidsynth fontconfig freetype icudata icui18n icuuc
> -WANTLIB += lzma lzo2 m png pthread ${COMPILER_LIBCXX} xdg-basedir z
> +WANTLIB += lzma lzo2 m png pthread z
>  
>  COMPILER =   base-clang ports-gcc base-gcc
>  
> @@ -25,13 +26,14 @@ EXTRACT_SUFX =.tar.xz
>  
>  DIST_SUBDIR =openttd
>  
> +MODULES =devel/cmake
> +
>  LIB_DEPENDS= archivers/lzo2 \
>   audio/fluidsynth \
>   devel/sdl2 \
>   graphics/png \
>   textproc/icu4c \
> - archivers/xz \
> - x11/libxdg-basedir
> + archivers/xz
>  
>  RUN_DEPENDS =audio/timidity \
>   devel/desktop-file-utils \
> @@ -40,36 +42,21 @@ RUN_DEPENDS = audio/timidity \
>   games/openttd-data/opensfx \
>   x11/gtk+3,-guic
>  
> -CONFIGURE_STYLE= simple
> -CONFIGURE_ARGS+= --prefix-dir=${PREFIX} \
> - --binary-dir=bin \
> - --data-dir=share/openttd \
> - --icon-dir=share/pixmaps \
> - --man-dir=man/man6 \
> - --personal-dir=.openttd \
> - --install-dir=${WRKINST} \
> - --with-png \
> - --with-zlib \
> - --without-allegro \
> - --CFLAGS_BUILD="${CFLAGS}" \
> - --disable-strip
> -
> -MAKE_ENV+=   VERBOSE=1
> +CONFIGURE_ARGS = -DCMAKE_INSTALL_BINDIR=bin \
> + -DCMAKE_INSTALL_DATADIR=share
>  
> -USE_GMAKE=   Yes
>  NO_TEST= Yes
>  
>  DOCSDIR= ${PREFIX}/share/doc/openttd
>  EXAMPLESDIR= ${PREFIX}/share/examples/openttd
>  GAMEDIR= ${PREFIX}/share/openttd
>  
> -FAKE_FLAGS=BUNDLE_DIR=${WRKINST}/bundle BUNDLES_DIR=${WRKINST}/bundle
> -
>  WRKDIST =${WRKDIR}/openttd-$V
>  
>  DEBUG_PACKAGES = ${BUILD_PACKAGES}
>  
>  post-install:
> + gunzip ${PREFIX}/man/man6/openttd.6.gz
>   ${INSTALL_DATA_DIR} ${GAMEDIR}/media
>   cd ${WRKSRC}/media/ && umask 022 && pax -rw . ${GAMEDIR}/media
>   ${INSTALL_DATA_DIR} ${EXAMPLESDIR}
> Index: distinfo
> ===
> RCS file: /home/reposync/ports/games/openttd/distinfo,v
> retrieving revision 1.37
> diff -u -p -r1.37 distinfo
> --- distinfo  10 Aug 2020 21:10:35 -  1.37
> +++ distinfo  1 Apr 2021 14:55:47 -
> @@ -1,2 +1,2 @@
> -SHA256 (openttd/openttd-1.10.3-source.tar.xz) = 
> wRYB71R+sfbU+aA1vRngp2C0eHLOfZtBF6qkWsN3tTs=
> -SIZE (openttd/openttd-1.10.3-source.tar.xz) = 6815924
> +SHA256 (openttd/openttd-1.11.0-source.tar.xz) = 
> XmUYTgc2i6Gvpi27PjWrrubE2mcw/0vJ60RH1TNjx6g=
> +SIZE (openttd/openttd-1.11.0-source.tar.xz) = 

Re: WIP UPDATE: games/openttd

2021-04-06 Thread Solene Rapenne
On Sun, 28 Feb 2021 23:09:24 -0700
"Anthony J. Bentley" :

> Hi,
> 
> Here's an update to openttd-1.11.0-beta2.
> 
> Upstream claims new OpenGL support, faster video, and 60fps.
> 
> The build system has been switched to CMake. This led to the GTK icons
> and .desktop file not being installed, a bug upstream claims will be
> fixed before release; see:
>   https://github.com/OpenTTD/OpenTTD/issues/8613
>   https://github.com/OpenTTD/OpenTTD/issues/8778
> 
> The endian patch no longer applies and seems to have been refactored
> although the original pull request was merged. I'd appreciate a
> test on PowerPC to make sure this is still correct.
> 

Update to 1.11.0, the Allegro patch wasn't applying since last diff,
context around second hunk slightly changed.

I don't understand the .desktop issue, I read on github that it should
be fixed but I see a rm -fr openttd.desktop* in the post-install target?

Game works fine, fast mode is a LOT faster and draw a LOT less CPU :)

Index: Makefile
===
RCS file: /home/reposync/ports/games/openttd/Makefile,v
retrieving revision 1.70
diff -u -p -r1.70 Makefile
--- Makefile10 Aug 2020 21:10:35 -  1.70
+++ Makefile1 Apr 2021 14:55:34 -
@@ -2,9 +2,9 @@
 
 COMMENT=   open source clone of the game Transport Tycoon Deluxe
 
-V =1.10.3
+V =1.11.0
 DISTNAME = openttd-$V-source
-PKGNAME =  openttd-$V
+PKGNAME =  openttd-1.11.0
 
 CATEGORIES=games
 
@@ -15,8 +15,9 @@ MAINTAINER =  Anthony J. Bentley /dev/null`
-   if [ -n "$cc_build_is_gcc" ]; then
-   # Just add -O1 to the tools needed for building.
--  CFLAGS_BUILD="$CFLAGS_BUILD -D_FORTIFY_SOURCE=2 -O1"
-+  CFLAGS_BUILD="$CFLAGS_BUILD -D_FORTIFY_SOURCE=2"
-   if [ "$os" = "MINGW" ]; then
-   # Prevent undefined references when 
_FORTIFY_SOURCE > 0
-   LDFLAGS_BUILD="$LDFLAGS_BUILD -fstack-protector"
Index: patches/patch-src_core_endian_type_hpp
===
RCS file: 
/home/reposync/ports/games/openttd/patches/patch-src_core_endian_type_hpp,v
retrieving revision 1.1
diff -u -p -r1.1 patch-src_core_endian_type_hpp
--- patches/patch-src_core_endian_type_hpp  12 Feb 2020 10:23:36 -  
1.1
+++ patches/patch-src_core_endian_type_hpp  1 Mar 2021 08:07:21 -
@@ -1,22 +0,0 @@
-$OpenBSD: patch-src_core_endian_type_hpp,v 1.1 2020/02/12 10:23:36 cwen Exp $
-
-Fix endianness detection, see:
-https://github.com/OpenTTD/OpenTTD/pull/7996
-
-Index: src/core/endian_type.hpp
 src/core/endian_type.hpp.orig
-+++ src/core/endian_type.hpp
-@@ -35,6 +35,13 @@
- # else
- # define TTD_ENDIAN TTD_BIG_ENDIAN
- # endif
-+#elif defined(__OpenBSD__)
-+# include 
-+# if BYTE_ORDER == LITTLE_ENDIAN
-+# define TTD_ENDIAN TTD_LITTLE_ENDIAN
-+# else
-+# define TTD_ENDIAN TTD_BIG_ENDIAN
-+# endif
- #elif !defined(TESTING)
- # include 
- # if __BYTE_ORDER == __LITTLE_ENDIAN
Index: patches/patch-src_string_func_h
===
RCS file: /home/reposync/ports/games/openttd/patches/patch-src_string_func_h,v
retrieving revision 1.4
diff -u -p -r1.4 patch-src_string_func_h
--- patches/patch-src_string_func_h 7 Apr 2020 15:13:34 -   1.4
+++ patches/patch-src_string_func_h 1 Mar 2021 08:07:21 -
@@ -3,7 +3,7 @@ Don't use openttd's internal copy of str
 Index: src/string_func.h
 --- src/string_func.h.orig
 +++ src/string_func.h
-@@ -248,7 +248,7 @@ static inline bool IsWhitespace(WChar c)
+@@ -260,7 +260,7 @@ static inline bool IsWhitespace(WChar c)
  #endif
  
  /* strcasestr is available for _GNU_SOURCE, BSD and some Apple */
Index: pkg/PLIST
===
RCS file: /home/reposync/ports/games/openttd/pkg/PLIST,v
retrieving revision 1.31
diff -u -p -r1.31 PLIST
--- pkg/PLIST   7 Apr 2020 15:13:34 -   1.31
+++ pkg/PLIST   6 Apr 2021 13:53:57 -
@@ -29,6 +29,7 @@ share/doc/openttd/ottd-colourtext-palett
 share/doc/openttd/palettes/
 share/doc/openttd/palettes/openttd.gpl
 share/doc/openttd/palettes/palette.act
+share/doc/openttd/palettes/palette_key.png
 share/doc/openttd/tileh.png
 share/doc/pkg-readmes/${PKGSTEM}
 share/examples/openttd/
@@ -52,6 +53,7 @@ share/openttd/ai/compat_0.7.nut
 share/openttd/ai/compat_1.0.nut
 share/openttd/ai/compat_1.1.nut
 share/openttd/ai/compat_1.10.nut
+share/openttd/ai/compat_1.11.nut
 share/openttd/ai/compat_1.2.nut
 share/openttd/ai/compat_1.3.nut
 share/openttd/ai/compat_1.4.nut
@@ -76,6 +78,7 @@ share/openttd/baseset/orig_win.obm
 share/openttd/baseset/orig_win.obs
 share/openttd/game/
 share/openttd/game/compat_1.10.nut
+share/openttd/game/compat_1.11.nut
 

Re: WIP UPDATE: games/openttd

2021-03-01 Thread Charlene Wendling
Hi,

On Sun, 28 Feb 2021 23:09:24 -0700
"Anthony J. Bentley"  wrote:

> Hi,
> 
> Here's an update to openttd-1.11.0-beta2.
> 
> Upstream claims new OpenGL support, faster video, and 60fps.
> 
> The build system has been switched to CMake. This led to the GTK icons
> and .desktop file not being installed, a bug upstream claims will be
> fixed before release; see:
>   https://github.com/OpenTTD/OpenTTD/issues/8613
>   https://github.com/OpenTTD/OpenTTD/issues/8778
> 
> The endian patch no longer applies and seems to have been refactored
> although the original pull request was merged. I'd appreciate a
> test on PowerPC to make sure this is still correct.

I've built and tested that update on macppc, colors are still correct.



WIP UPDATE: games/openttd

2021-02-28 Thread Anthony J. Bentley
Hi,

Here's an update to openttd-1.11.0-beta2.

Upstream claims new OpenGL support, faster video, and 60fps.

The build system has been switched to CMake. This led to the GTK icons
and .desktop file not being installed, a bug upstream claims will be
fixed before release; see:
  https://github.com/OpenTTD/OpenTTD/issues/8613
  https://github.com/OpenTTD/OpenTTD/issues/8778

The endian patch no longer applies and seems to have been refactored
although the original pull request was merged. I'd appreciate a
test on PowerPC to make sure this is still correct.

Index: Makefile
===
RCS file: /cvs/ports/games/openttd/Makefile,v
retrieving revision 1.70
diff -u -p -r1.70 Makefile
--- Makefile10 Aug 2020 21:10:35 -  1.70
+++ Makefile1 Mar 2021 06:00:18 -
@@ -2,9 +2,9 @@
 
 COMMENT=   open source clone of the game Transport Tycoon Deluxe
 
-V =1.10.3
+V =1.11.0-beta2
 DISTNAME = openttd-$V-source
-PKGNAME =  openttd-$V
+PKGNAME =  openttd-1.11.0beta2
 
 CATEGORIES=games
 
@@ -15,8 +15,9 @@ MAINTAINER =  Anthony J. Bentley /dev/null`
-   if [ -n "$cc_build_is_gcc" ]; then
-   # Just add -O1 to the tools needed for building.
--  CFLAGS_BUILD="$CFLAGS_BUILD -D_FORTIFY_SOURCE=2 -O1"
-+  CFLAGS_BUILD="$CFLAGS_BUILD -D_FORTIFY_SOURCE=2"
-   if [ "$os" = "MINGW" ]; then
-   # Prevent undefined references when 
_FORTIFY_SOURCE > 0
-   LDFLAGS_BUILD="$LDFLAGS_BUILD -fstack-protector"
Index: patches/patch-src_core_endian_type_hpp
===
RCS file: patches/patch-src_core_endian_type_hpp
diff -N patches/patch-src_core_endian_type_hpp
--- patches/patch-src_core_endian_type_hpp  12 Feb 2020 10:23:36 -  
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,22 +0,0 @@
-$OpenBSD: patch-src_core_endian_type_hpp,v 1.1 2020/02/12 10:23:36 cwen Exp $
-
-Fix endianness detection, see:
-https://github.com/OpenTTD/OpenTTD/pull/7996
-
-Index: src/core/endian_type.hpp
 src/core/endian_type.hpp.orig
-+++ src/core/endian_type.hpp
-@@ -35,6 +35,13 @@
- # else
- # define TTD_ENDIAN TTD_BIG_ENDIAN
- # endif
-+#elif defined(__OpenBSD__)
-+# include 
-+# if BYTE_ORDER == LITTLE_ENDIAN
-+# define TTD_ENDIAN TTD_LITTLE_ENDIAN
-+# else
-+# define TTD_ENDIAN TTD_BIG_ENDIAN
-+# endif
- #elif !defined(TESTING)
- # include 
- # if __BYTE_ORDER == __LITTLE_ENDIAN
Index: patches/patch-src_string_func_h
===
RCS file: /cvs/ports/games/openttd/patches/patch-src_string_func_h,v
retrieving revision 1.4
diff -u -p -r1.4 patch-src_string_func_h
--- patches/patch-src_string_func_h 7 Apr 2020 15:13:34 -   1.4
+++ patches/patch-src_string_func_h 1 Mar 2021 06:00:18 -
@@ -3,7 +3,7 @@ Don't use openttd's internal copy of str
 Index: src/string_func.h
 --- src/string_func.h.orig
 +++ src/string_func.h
-@@ -248,7 +248,7 @@ static inline bool IsWhitespace(WChar c)
+@@ -260,7 +260,7 @@ static inline bool IsWhitespace(WChar c)
  #endif
  
  /* strcasestr is available for _GNU_SOURCE, BSD and some Apple */
Index: pkg/PLIST
===
RCS file: /cvs/ports/games/openttd/pkg/PLIST,v
retrieving revision 1.31
diff -u -p -r1.31 PLIST
--- pkg/PLIST   7 Apr 2020 15:13:34 -   1.31
+++ pkg/PLIST   1 Mar 2021 06:00:18 -
@@ -1,7 +1,6 @@
 @comment $OpenBSD: PLIST,v 1.31 2020/04/07 15:13:34 solene Exp $
 @bin bin/openttd
 @man man/man6/openttd.6
-share/applications/openttd.desktop
 share/doc/openttd/
 share/doc/openttd/COPYING.md
 share/doc/openttd/README.md
@@ -29,6 +28,7 @@ share/doc/openttd/ottd-colourtext-palett
 share/doc/openttd/palettes/
 share/doc/openttd/palettes/openttd.gpl
 share/doc/openttd/palettes/palette.act
+share/doc/openttd/palettes/palette_key.png
 share/doc/openttd/tileh.png
 share/doc/pkg-readmes/${PKGSTEM}
 share/examples/openttd/
@@ -41,17 +41,12 @@ share/examples/openttd/on_server_connect
 share/examples/openttd/pre_dedicated.scr.example
 share/examples/openttd/pre_server.scr.example
 share/examples/openttd/readme.txt
-share/icons/hicolor/128x128/apps/openttd.png
-share/icons/hicolor/16x16/apps/openttd.png
-share/icons/hicolor/256x256/apps/openttd.png
-share/icons/hicolor/32x32/apps/openttd.png
-share/icons/hicolor/48x48/apps/openttd.png
-share/icons/hicolor/64x64/apps/openttd.png
 share/openttd/ai/
 share/openttd/ai/compat_0.7.nut
 share/openttd/ai/compat_1.0.nut
 share/openttd/ai/compat_1.1.nut
 share/openttd/ai/compat_1.10.nut
+share/openttd/ai/compat_1.11.nut
 share/openttd/ai/compat_1.2.nut
 share/openttd/ai/compat_1.3.nut
 share/openttd/ai/compat_1.4.nut
@@ -76,6 +71,7 @@