Update to openttd-1.11.0

Maintainer change from bentley@ to solene@

ok paco@ bentley@
tested on powerpc by cwen@
This commit is contained in:
solene 2021-04-27 18:54:08 +00:00
parent 6e62a2b6aa
commit 382374b31d
8 changed files with 119 additions and 162 deletions

View File

@ -1,22 +1,23 @@
# $OpenBSD: Makefile,v 1.70 2020/08/10 21:10:35 solene Exp $
# $OpenBSD: Makefile,v 1.71 2021/04/27 18:54:08 solene Exp $
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
HOMEPAGE= https://www.openttd.org/en/
MAINTAINER = Anthony J. Bentley <anthony@anjbe.name>
MAINTAINER = Solene Rapenne <solene@perso.pw>
# 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
CONFIGURE_ARGS = -DCMAKE_INSTALL_BINDIR=bin \
-DCMAKE_INSTALL_DATADIR=share
MAKE_ENV+= VERBOSE=1
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}
@ -77,6 +64,5 @@ post-install:
${INSTALL_DATA_DIR} ${DOCSDIR}
cd ${WRKSRC}/docs/ && umask 022 && pax -rw . ${DOCSDIR}
rm -rf ${WRKINST}/bundle
rm -rf ${GAMEDIR}/media/openttd.desktop*
.include <bsd.port.mk>

View File

@ -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) = 6805420

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-CMakeLists_txt,v 1.1 2021/04/27 18:54:08 solene Exp $
Disable allegro support.
Ours (4.2.3 at time of writing) is old and seemingly incompatible.
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -121,7 +121,6 @@ find_package(PNG)
if(NOT OPTION_DEDICATED)
if(NOT WIN32)
- find_package(Allegro)
if(NOT APPLE)
find_package(Freetype)
find_package(SDL2)
@@ -253,7 +252,6 @@ if(NOT OPTION_DEDICATED)
link_package(Fluidsynth)
link_package(SDL)
link_package(SDL2 TARGET SDL2::SDL2)
- link_package(Allegro)
link_package(FREETYPE TARGET Freetype::Freetype)
link_package(Fontconfig TARGET Fontconfig::Fontconfig)
link_package(ICU_lx)

View File

@ -1,24 +0,0 @@
$OpenBSD: patch-Makefile_bundle_in,v 1.8 2020/04/07 15:13:34 solene Exp $
Don't gzip(1) the manual page.
Index: Makefile.bundle.in
--- Makefile.bundle.in.orig
+++ Makefile.bundle.in
@@ -75,7 +75,6 @@ endif
ifdef MAN_DIR
$(Q)mkdir -p "$(BUNDLE_DIR)/man/"
$(Q)cp "$(ROOT_DIR)/docs/openttd.6" "$(BUNDLE_DIR)/man/"
- $(Q)gzip -9 "$(BUNDLE_DIR)/man/openttd.6"
endif
$(Q)cp "$(ROOT_DIR)/media/openttd.32.xpm" "$(BUNDLE_DIR)/media/"
$(Q)cp "$(ROOT_DIR)/media/openttd."*.png "$(BUNDLE_DIR)/media/"
@@ -211,7 +210,7 @@ endif
ifdef MAN_DIR
ifndef DO_NOT_INSTALL_MAN
$(Q)install -d "$(INSTALL_MAN_DIR)"
- $(Q)install -m 644 "$(BUNDLE_DIR)/man/openttd.6.gz" "$(INSTALL_MAN_DIR)/${BINARY_NAME}.6.gz"
+ $(Q)install -m 644 "$(BUNDLE_DIR)/man/openttd.6" "$(INSTALL_MAN_DIR)/${BINARY_NAME}.6"
endif
endif
ifdef MENU_DIR

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-config_lib,v 1.7 2020/04/07 15:13:34 solene Exp $
Don't build with -O1. The reason they add it is irrevelant to OpenBSD anyway.
Index: config.lib
--- config.lib.orig
+++ config.lib
@@ -1525,7 +1525,7 @@ make_cflags_and_ldflags() {
cc_build_is_gcc=`basename "$cc_build" | grep "gcc" 2>/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"

View File

@ -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 <endian.h>
+# if BYTE_ORDER == LITTLE_ENDIAN
+# define TTD_ENDIAN TTD_LITTLE_ENDIAN
+# else
+# define TTD_ENDIAN TTD_BIG_ENDIAN
+# endif
#elif !defined(TESTING)
# include <sys/param.h>
# if __BYTE_ORDER == __LITTLE_ENDIAN

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-src_string_func_h,v 1.4 2020/04/07 15:13:34 solene Exp $
$OpenBSD: patch-src_string_func_h,v 1.5 2021/04/27 18:54:08 solene Exp $
Don't use openttd's internal copy of strcasestr().
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 */

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.31 2020/04/07 15:13:34 solene Exp $
@comment $OpenBSD: PLIST,v 1.32 2021/04/27 18:54:08 solene Exp $
@bin bin/openttd
@man man/man6/openttd.6
share/applications/openttd.desktop
@ -29,6 +29,7 @@ share/doc/openttd/ottd-colourtext-palette.png
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
share/openttd/game/compat_1.2.nut
share/openttd/game/compat_1.3.nut
share/openttd/game/compat_1.4.nut
@ -142,85 +145,90 @@ share/openttd/lang/ukrainian.lng
share/openttd/lang/vietnamese.lng
share/openttd/lang/welsh.lng
share/openttd/media/
share/openttd/media/CMakeLists.txt
share/openttd/media/baseset/
share/openttd/media/baseset/CMakeLists.txt
share/openttd/media/baseset/no_music.obm
share/openttd/media/baseset/no_sound.obs
share/openttd/media/baseset/openttd/
share/openttd/media/baseset/openttd.grf
share/openttd/media/baseset/openttd/2ccmap.nfo
share/openttd/media/baseset/openttd/CMakeLists.txt
share/openttd/media/baseset/openttd/airport_preview.nfo
share/openttd/media/baseset/openttd/airport_preview.png
share/openttd/media/baseset/openttd/airports.nfo
share/openttd/media/baseset/openttd/airports.png
share/openttd/media/baseset/openttd/aqueduct.nfo
share/openttd/media/baseset/openttd/aqueduct.png
share/openttd/media/baseset/openttd/autorail.nfo
share/openttd/media/baseset/openttd/autorail.png
share/openttd/media/baseset/openttd/canal_locks.png
share/openttd/media/baseset/openttd/canals.nfo
share/openttd/media/baseset/openttd/canals.png
share/openttd/media/baseset/openttd/chars.nfo
share/openttd/media/baseset/openttd/chars.png
share/openttd/media/baseset/openttd/elrails.nfo
share/openttd/media/baseset/openttd/elrails.png
share/openttd/media/baseset/openttd/flags.nfo
share/openttd/media/baseset/openttd/flags.png
share/openttd/media/baseset/openttd/foundations.nfo
share/openttd/media/baseset/openttd/foundations.png
share/openttd/media/baseset/openttd/mono.nfo
share/openttd/media/baseset/openttd/mono.png
share/openttd/media/baseset/openttd/oneway.nfo
share/openttd/media/baseset/openttd/oneway.png
share/openttd/media/baseset/openttd/openttd.nfo
share/openttd/media/baseset/openttd/openttdgui.nfo
share/openttd/media/baseset/openttd/openttdgui.png
share/openttd/media/baseset/openttd/openttdgui_build_tram.png
share/openttd/media/baseset/openttd/openttdgui_convert_road.png
share/openttd/media/baseset/openttd/openttdgui_convert_tram.png
share/openttd/media/baseset/openttd/openttdgui_group_livery.png
share/openttd/media/baseset/openttd/palette.nfo
share/openttd/media/baseset/openttd/roadstops.nfo
share/openttd/media/baseset/openttd/roadstops.png
share/openttd/media/baseset/openttd/signals.nfo
share/openttd/media/baseset/openttd/signals.png
share/openttd/media/baseset/openttd/sloped_tracks.nfo
share/openttd/media/baseset/openttd/sloped_tracks.png
share/openttd/media/baseset/openttd/tramtracks.nfo
share/openttd/media/baseset/openttd/tramtracks.png
share/openttd/media/baseset/openttd/tramtracks_bare_depot.png
share/openttd/media/baseset/openttd/tunnel_portals.nfo
share/openttd/media/baseset/openttd/tunnel_portals.png
share/openttd/media/baseset/opntitle.dat
share/openttd/media/baseset/orig_dos.obg
share/openttd/media/baseset/orig_dos.obm
share/openttd/media/baseset/orig_dos.obs
share/openttd/media/baseset/orig_dos_de.obg
share/openttd/media/baseset/orig_extra/
share/openttd/media/baseset/orig_extra.grf
share/openttd/media/baseset/orig_extra/CMakeLists.txt
share/openttd/media/baseset/orig_extra/airports_orig_extra.nfo
share/openttd/media/baseset/orig_extra/canals_extra.nfo
share/openttd/media/baseset/orig_extra/chars_orig_extra.nfo
share/openttd/media/baseset/orig_extra/fix_graphics.nfo
share/openttd/media/baseset/orig_extra/fix_graphics.png
share/openttd/media/baseset/orig_extra/orig_extra.nfo
share/openttd/media/baseset/orig_extra/rivers/
share/openttd/media/baseset/orig_extra/rivers/arctic.nfo
share/openttd/media/baseset/orig_extra/rivers/arctic_brown.png
share/openttd/media/baseset/orig_extra/rivers/arctic_snowy.png
share/openttd/media/baseset/orig_extra/rivers/rapids.nfo
share/openttd/media/baseset/orig_extra/rivers/rapids.png
share/openttd/media/baseset/orig_extra/rivers/temperate.nfo
share/openttd/media/baseset/orig_extra/rivers/temperate.png
share/openttd/media/baseset/orig_extra/rivers/toyland.nfo
share/openttd/media/baseset/orig_extra/rivers/toyland.png
share/openttd/media/baseset/orig_extra/rivers/tropic.nfo
share/openttd/media/baseset/orig_extra/rivers/tropic_desert.png
share/openttd/media/baseset/orig_extra/rivers/tropic_forest.png
share/openttd/media/baseset/orig_extra/shore.nfo
share/openttd/media/baseset/orig_extra/shore.png
share/openttd/media/baseset/orig_tto.obm
share/openttd/media/baseset/orig_win.obg
share/openttd/media/baseset/orig_win.obm
share/openttd/media/baseset/orig_win.obs
share/openttd/media/baseset/translations.awk
share/openttd/media/baseset/translations.vbs
share/openttd/media/extra_grf/
share/openttd/media/extra_grf/2ccmap.nfo
share/openttd/media/extra_grf/airport_preview.nfo
share/openttd/media/extra_grf/airport_preview.png
share/openttd/media/extra_grf/airports.nfo
share/openttd/media/extra_grf/airports.png
share/openttd/media/extra_grf/airports_orig_extra.nfo
share/openttd/media/extra_grf/aqueduct.nfo
share/openttd/media/extra_grf/aqueduct.png
share/openttd/media/extra_grf/assemble_nfo.awk
share/openttd/media/extra_grf/autorail.nfo
share/openttd/media/extra_grf/autorail.png
share/openttd/media/extra_grf/canal_locks.png
share/openttd/media/extra_grf/canals.nfo
share/openttd/media/extra_grf/canals.png
share/openttd/media/extra_grf/canals_extra.nfo
share/openttd/media/extra_grf/chars.nfo
share/openttd/media/extra_grf/chars.png
share/openttd/media/extra_grf/chars_orig_extra.nfo
share/openttd/media/extra_grf/elrails.nfo
share/openttd/media/extra_grf/elrails.png
share/openttd/media/extra_grf/fix_graphics.nfo
share/openttd/media/extra_grf/fix_graphics.png
share/openttd/media/extra_grf/flags.nfo
share/openttd/media/extra_grf/flags.png
share/openttd/media/extra_grf/foundations.nfo
share/openttd/media/extra_grf/foundations.png
share/openttd/media/extra_grf/mono.nfo
share/openttd/media/extra_grf/mono.png
share/openttd/media/extra_grf/oneway.nfo
share/openttd/media/extra_grf/oneway.png
share/openttd/media/extra_grf/openttd.nfo
share/openttd/media/extra_grf/openttdgui.nfo
share/openttd/media/extra_grf/openttdgui.png
share/openttd/media/extra_grf/openttdgui_build_tram.png
share/openttd/media/extra_grf/openttdgui_convert_road.png
share/openttd/media/extra_grf/openttdgui_convert_tram.png
share/openttd/media/extra_grf/openttdgui_group_livery.png
share/openttd/media/extra_grf/orig_extra.nfo
share/openttd/media/extra_grf/palette.nfo
share/openttd/media/extra_grf/rivers/
share/openttd/media/extra_grf/rivers/arctic.nfo
share/openttd/media/extra_grf/rivers/arctic_brown.png
share/openttd/media/extra_grf/rivers/arctic_snowy.png
share/openttd/media/extra_grf/rivers/rapids.nfo
share/openttd/media/extra_grf/rivers/rapids.png
share/openttd/media/extra_grf/rivers/temperate.nfo
share/openttd/media/extra_grf/rivers/temperate.png
share/openttd/media/extra_grf/rivers/toyland.nfo
share/openttd/media/extra_grf/rivers/toyland.png
share/openttd/media/extra_grf/rivers/tropic.nfo
share/openttd/media/extra_grf/rivers/tropic_desert.png
share/openttd/media/extra_grf/rivers/tropic_forest.png
share/openttd/media/extra_grf/roadstops.nfo
share/openttd/media/extra_grf/roadstops.png
share/openttd/media/extra_grf/shore.nfo
share/openttd/media/extra_grf/shore.png
share/openttd/media/extra_grf/signals.nfo
share/openttd/media/extra_grf/signals.png
share/openttd/media/extra_grf/sloped_tracks.nfo
share/openttd/media/extra_grf/sloped_tracks.png
share/openttd/media/extra_grf/tramtracks.nfo
share/openttd/media/extra_grf/tramtracks.png
share/openttd/media/extra_grf/tramtracks_bare_depot.png
share/openttd/media/extra_grf/tunnel_portals.nfo
share/openttd/media/extra_grf/tunnel_portals.png
share/openttd/media/openttd.128.png
share/openttd/media/openttd.16.png
share/openttd/media/openttd.256.png
@ -230,7 +238,7 @@ share/openttd/media/openttd.32.xpm
share/openttd/media/openttd.48.png
share/openttd/media/openttd.64.png
share/openttd/media/openttd.64.xpm
share/openttd/media/openttd.ico
share/openttd/media/openttd.desktop
share/openttd/media/openttd.svg
share/openttd/scripts/
share/openttd/scripts/autoexec.scr.example
@ -242,7 +250,8 @@ share/openttd/scripts/on_server_connect.scr.example
share/openttd/scripts/pre_dedicated.scr.example
share/openttd/scripts/pre_server.scr.example
share/openttd/scripts/readme.txt
share/pixmaps/
share/pixmaps/openttd.32.xpm
@tag update-desktop-database
@tag gtk-update-icon-cache %D/share/icons/hicolor
share/pixmaps/
share/pixmaps/openttd.32.xpm
share/pixmaps/openttd.64.xpm