pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

openttd: Import 13.4 to update



Module Name:	pkgsrc-wip
Committed By:	Frédéric Fauberteau <frederic%fauberteau.org@localhost>
Pushed By:	frederic
Date:		Wed Apr 24 12:55:59 2024 +0200
Changeset:	fbd66909a00239bd6dde6375dcbe269524add790

Added Files:
	openttd/DESCR
	openttd/MESSAGE
	openttd/Makefile
	openttd/PLIST
	openttd/distinfo
	openttd/patches/patch-cmake_InstallAndPackage.cmake
	openttd/patches/patch-cmake_PackageBundle.cmake
	openttd/patches/patch-src_core_alloc__func.hpp

Log Message:
openttd: Import 13.4 to update

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=fbd66909a00239bd6dde6375dcbe269524add790

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 openttd/DESCR                                      |   3 +
 openttd/MESSAGE                                    |  14 +++
 openttd/Makefile                                   |  59 +++++++++
 openttd/PLIST                                      | 132 +++++++++++++++++++++
 openttd/distinfo                                   |   8 ++
 .../patches/patch-cmake_InstallAndPackage.cmake    |  29 +++++
 openttd/patches/patch-cmake_PackageBundle.cmake    |  15 +++
 openttd/patches/patch-src_core_alloc__func.hpp     |  17 +++
 8 files changed, 277 insertions(+)

diffs:
diff --git a/openttd/DESCR b/openttd/DESCR
new file mode 100644
index 0000000000..5462a0f15c
--- /dev/null
+++ b/openttd/DESCR
@@ -0,0 +1,3 @@
+OpenTTD is an open source simulation game based upon the popular Microprose
+game "Transport Tycoon Deluxe", written by Chris Sawyer. It attempts to mimic
+the original game as closely as possible while extending it with new features.
diff --git a/openttd/MESSAGE b/openttd/MESSAGE
new file mode 100644
index 0000000000..204f22fd44
--- /dev/null
+++ b/openttd/MESSAGE
@@ -0,0 +1,14 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.6 2019/09/18 18:32:22 nia Exp $
+
+To run openttd you need data files provided by the original Transport
+Tycoon Deluxe, or free data files available in games/openttd-data package.
+
+In order to play, the following files should be copied from the original TTD
+to ${PREFIX}/share/openttd/data:
+	sample.cat
+	trg1r.grf, trgcr.grf, trghr.grf, trgir.grf, trgtr.grf
+All *.gm files should be copied to ${PREFIX}/share/openttd/gm
+in order to play original MIDI music.
+
+===========================================================================
diff --git a/openttd/Makefile b/openttd/Makefile
new file mode 100644
index 0000000000..cb43a5459e
--- /dev/null
+++ b/openttd/Makefile
@@ -0,0 +1,59 @@
+# $NetBSD: Makefile,v 1.121 2024/04/06 08:05:35 wiz Exp $
+
+DISTNAME=	openttd-13.4-source
+PKGNAME=	${DISTNAME:S/-source//}
+PKGREVISION=	4
+CATEGORIES=	games
+MASTER_SITES=	https://proxy.binaries.openttd.org/openttd-releases/${PKGVERSION_NOREV}/
+MASTER_SITES+=	https://cdn.openttd.org/openttd-releases/${PKGVERSION_NOREV}/
+EXTRACT_SUFX=	.tar.xz
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://www.openttd.org/
+COMMENT=	Open source clone of Transport Tycoon Deluxe
+LICENSE=	gnu-gpl-v2
+
+WRKSRC=		${WRKDIR}/${PKGNAME_NOREV}
+USE_LANGUAGES=	c c++
+USE_TOOLS+=	pkg-config
+
+USE_CXX_FEATURES+=	c++17 charconv
+
+BUILD_DEFS+=	VARBASE
+
+# Uses alloca, cannot use standard C++ on NetBSD
+FORCE_CXX_STD=		gnu++17
+
+.include "../../mk/bsd.prefs.mk"
+
+CMAKE_ARGS+=	-DPERSONAL_DIR=.openttd
+CMAKE_ARGS+=	-DSHARED_DIR=${VARBASE}/games/openttd
+CMAKE_ARGS+=	-DGLOBAL_DIR=${PREFIX}/share/openttd
+CMAKE_ARGS+=	-DCMAKE_BUILD_TYPE=Release
+CMAKE_ARGS+=	-DCMAKE_INSTALL_BINDIR=bin
+CMAKE_ARGS+=	-DCMAKE_INSTALL_DATADIR=share
+CMAKE_ARGS+=	-DCMAKE_DISABLE_FIND_PACKAGE_Allegro=ON
+CMAKE_ARGS+=	-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON
+CMAKE_ARGS+=	-DCMAKE_DISABLE_FIND_PACKAGE_Grfcodec=ON
+CMAKE_ARGS+=	-DOPTION_INSTALL_FHS=ON
+
+PLIST_VARS=	unix
+.if ${OPSYS} != "Darwin"
+PLIST.unix=	yes
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../fonts/fontconfig/buildlink3.mk"
+.include "../../graphics/freetype2/buildlink3.mk"
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../textproc/icu/buildlink3.mk"
+.endif
+
+.include "../../archivers/lzo/buildlink3.mk"
+.include "../../archivers/xz/buildlink3.mk"
+.include "../../audio/fluidsynth/buildlink3.mk"
+.include "../../converters/libiconv/buildlink3.mk"
+.include "../../devel/cmake/build.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/openttd/PLIST b/openttd/PLIST
new file mode 100644
index 0000000000..80ab2f14e7
--- /dev/null
+++ b/openttd/PLIST
@@ -0,0 +1,132 @@
+@comment $NetBSD: PLIST,v 1.31 2023/07/17 21:07:58 adam Exp $
+bin/openttd
+man/man6/openttd.6
+${PLIST.unix}share/applications/openttd.desktop
+share/doc/openttd/COPYING.md
+share/doc/openttd/README.md
+share/doc/openttd/changelog.txt
+share/doc/openttd/known-bugs.txt
+share/doc/openttd/multiplayer.md
+${PLIST.unix}share/icons/hicolor/128x128/apps/openttd.png
+${PLIST.unix}share/icons/hicolor/16x16/apps/openttd.png
+${PLIST.unix}share/icons/hicolor/256x256/apps/openttd.png
+${PLIST.unix}share/icons/hicolor/32x32/apps/openttd.png
+${PLIST.unix}share/icons/hicolor/48x48/apps/openttd.png
+${PLIST.unix}share/icons/hicolor/64x64/apps/openttd.png
+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
+share/openttd/ai/compat_1.5.nut
+share/openttd/ai/compat_1.6.nut
+share/openttd/ai/compat_1.7.nut
+share/openttd/ai/compat_1.8.nut
+share/openttd/ai/compat_1.9.nut
+share/openttd/ai/compat_12.nut
+share/openttd/ai/compat_13.nut
+share/openttd/baseset/no_music.obm
+share/openttd/baseset/no_sound.obs
+share/openttd/baseset/openttd.32.bmp
+share/openttd/baseset/openttd.grf
+share/openttd/baseset/opntitle.dat
+share/openttd/baseset/orig_dos.obg
+share/openttd/baseset/orig_dos.obm
+share/openttd/baseset/orig_dos.obs
+share/openttd/baseset/orig_dos_de.obg
+share/openttd/baseset/orig_extra.grf
+share/openttd/baseset/orig_tto.obm
+share/openttd/baseset/orig_win.obg
+share/openttd/baseset/orig_win.obm
+share/openttd/baseset/orig_win.obs
+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
+share/openttd/game/compat_1.5.nut
+share/openttd/game/compat_1.6.nut
+share/openttd/game/compat_1.7.nut
+share/openttd/game/compat_1.8.nut
+share/openttd/game/compat_1.9.nut
+share/openttd/game/compat_12.nut
+share/openttd/game/compat_13.nut
+share/openttd/lang/afrikaans.lng
+share/openttd/lang/arabic_egypt.lng
+share/openttd/lang/basque.lng
+share/openttd/lang/belarusian.lng
+share/openttd/lang/brazilian_portuguese.lng
+share/openttd/lang/bulgarian.lng
+share/openttd/lang/catalan.lng
+share/openttd/lang/chuvash.lng
+share/openttd/lang/croatian.lng
+share/openttd/lang/czech.lng
+share/openttd/lang/danish.lng
+share/openttd/lang/dutch.lng
+share/openttd/lang/english.lng
+share/openttd/lang/english_AU.lng
+share/openttd/lang/english_US.lng
+share/openttd/lang/esperanto.lng
+share/openttd/lang/estonian.lng
+share/openttd/lang/faroese.lng
+share/openttd/lang/finnish.lng
+share/openttd/lang/french.lng
+share/openttd/lang/frisian.lng
+share/openttd/lang/gaelic.lng
+share/openttd/lang/galician.lng
+share/openttd/lang/german.lng
+share/openttd/lang/greek.lng
+share/openttd/lang/hebrew.lng
+share/openttd/lang/hindi.lng
+share/openttd/lang/hungarian.lng
+share/openttd/lang/icelandic.lng
+share/openttd/lang/ido.lng
+share/openttd/lang/indonesian.lng
+share/openttd/lang/irish.lng
+share/openttd/lang/italian.lng
+share/openttd/lang/japanese.lng
+share/openttd/lang/korean.lng
+share/openttd/lang/latin.lng
+share/openttd/lang/latvian.lng
+share/openttd/lang/lithuanian.lng
+share/openttd/lang/luxembourgish.lng
+share/openttd/lang/macedonian.lng
+share/openttd/lang/malay.lng
+share/openttd/lang/maltese.lng
+share/openttd/lang/marathi.lng
+share/openttd/lang/norwegian_bokmal.lng
+share/openttd/lang/norwegian_nynorsk.lng
+share/openttd/lang/persian.lng
+share/openttd/lang/polish.lng
+share/openttd/lang/portuguese.lng
+share/openttd/lang/romanian.lng
+share/openttd/lang/russian.lng
+share/openttd/lang/serbian.lng
+share/openttd/lang/simplified_chinese.lng
+share/openttd/lang/slovak.lng
+share/openttd/lang/slovenian.lng
+share/openttd/lang/spanish.lng
+share/openttd/lang/spanish_MX.lng
+share/openttd/lang/swedish.lng
+share/openttd/lang/tamil.lng
+share/openttd/lang/thai.lng
+share/openttd/lang/traditional_chinese.lng
+share/openttd/lang/turkish.lng
+share/openttd/lang/ukrainian.lng
+share/openttd/lang/urdu.lng
+share/openttd/lang/vietnamese.lng
+share/openttd/lang/welsh.lng
+share/openttd/scripts/autoexec.scr.example
+share/openttd/scripts/game_start.scr.example
+share/openttd/scripts/on_client.scr.example
+share/openttd/scripts/on_dedicated.scr.example
+share/openttd/scripts/on_server.scr.example
+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
+${PLIST.unix}share/pixmaps/openttd.32.xpm
+${PLIST.unix}share/pixmaps/openttd.64.xpm
diff --git a/openttd/distinfo b/openttd/distinfo
new file mode 100644
index 0000000000..67ffad2ab4
--- /dev/null
+++ b/openttd/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.46 2023/10/15 15:32:26 triaxx Exp $
+
+BLAKE2s (openttd-13.4-source.tar.xz) = d2529ea293b329f14b24e1c6e115061f960f5be45f402a1e4e5c77d760726a74
+SHA512 (openttd-13.4-source.tar.xz) = 84f57a39c0dade44f0e6153dff7a40eec0da8e2f892ce870d5f9e037f80daa5c7c46ff786fa51c3671366dd5056504cd7ccbc1c4e5bce8b2c5575533b454c001
+Size (openttd-13.4-source.tar.xz) = 7428012 bytes
+SHA1 (patch-cmake_PackageBundle.cmake) = a22c8080c03ac8885beac3fc4b2b1c2f94eafe6b
+SHA1 (patch-cmake_InstallAndPackage.cmake) = 47cf19bf6b77dc5bcf954ee5ffdb4967f2af19ea
+SHA1 (patch-src_core_alloc__func.hpp) = 9c5a855316e3262c51c1b4c836de760d53abb759
diff --git a/openttd/patches/patch-cmake_InstallAndPackage.cmake b/openttd/patches/patch-cmake_InstallAndPackage.cmake
new file mode 100644
index 0000000000..241e59354d
--- /dev/null
+++ b/openttd/patches/patch-cmake_InstallAndPackage.cmake
@@ -0,0 +1,29 @@
+$NetBSD: patch-cmake_InstallAndPackage.cmake,v 1.3 2023/07/17 21:07:58 adam Exp $
+
+Do not try to generate Linux distribution packages.
+
+--- cmake/InstallAndPackage.cmake.orig	2023-06-11 16:42:59.000000000 +0000
++++ cmake/InstallAndPackage.cmake
+@@ -121,7 +121,7 @@ set(CPACK_PACKAGE_EXECUTABLES "openttd;O
+ set(CPACK_STRIP_FILES YES)
+ set(CPACK_OUTPUT_FILE_PREFIX "bundles")
+ 
+-if(APPLE)
++if(FALSE)
+     # Stripping would produce unreadable stacktraces.
+     set(CPACK_STRIP_FILES NO)
+     set(CPACK_GENERATOR "Bundle")
+@@ -154,10 +154,11 @@ elseif(UNIX)
+     if(OPTION_PACKAGE_DEPENDENCIES)
+         set(CPACK_GENERATOR "TXZ")
+         set(PLATFORM "generic")
+-    elseif(NOT OPTION_INSTALL_FHS)
++    else()
+         set(CPACK_GENERATOR "TXZ")
+         set(PLATFORM "unknown")
+-    else()
++    endif()
++    if(FALSE)
+         find_program(LSB_RELEASE_EXEC lsb_release)
+         execute_process(COMMAND ${LSB_RELEASE_EXEC} -is
+             OUTPUT_VARIABLE LSB_RELEASE_ID
diff --git a/openttd/patches/patch-cmake_PackageBundle.cmake b/openttd/patches/patch-cmake_PackageBundle.cmake
new file mode 100644
index 0000000000..3c3cdef27b
--- /dev/null
+++ b/openttd/patches/patch-cmake_PackageBundle.cmake
@@ -0,0 +1,15 @@
+$NetBSD: patch-cmake_PackageBundle.cmake,v 1.1 2023/10/15 15:21:59 triaxx Exp $
+
+Let installed files inside ${LOCALBASE}.
+
+--- cmake/PackageBundle.cmake.orig	2023-02-05 17:19:16.000000000 +0000
++++ cmake/PackageBundle.cmake
+@@ -19,7 +19,7 @@ install(
+     "
+         include(BundleUtilities)
+         set(BU_CHMOD_BUNDLE_ITEMS TRUE)
+-        fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/../MacOS/openttd\"  \"\" \"\")
++        fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/bin/openttd\"  \"\" \"\")
+     "
+     DESTINATION .
+     COMPONENT Runtime)
diff --git a/openttd/patches/patch-src_core_alloc__func.hpp b/openttd/patches/patch-src_core_alloc__func.hpp
new file mode 100644
index 0000000000..eb25ebab84
--- /dev/null
+++ b/openttd/patches/patch-src_core_alloc__func.hpp
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_core_alloc__func.hpp,v 1.3 2022/12/28 10:13:30 nia Exp $
+
+Need alloca.h to use alloca on SunOS.
+
+--- src/core/alloc_func.hpp.orig	2022-04-02 10:38:20.000000000 +0000
++++ src/core/alloc_func.hpp
+@@ -10,6 +10,10 @@
+ #ifndef ALLOC_FUNC_HPP
+ #define ALLOC_FUNC_HPP
+ 
++#ifdef __sun
++#include <alloca.h>
++#endif
++
+ /*
+  * Functions to exit badly with an error message.
+  * It has to be linked so the error messages are not


Home | Main Index | Thread Index | Old Index