Mon Jul 17 21:07:58 2023 UTC ()
openttd: package correctly on Darwin


(adam)
diff -r1.112 -r1.113 pkgsrc/games/openttd/Makefile
diff -r1.30 -r1.31 pkgsrc/games/openttd/PLIST
diff -r1.43 -r1.44 pkgsrc/games/openttd/distinfo
diff -r1.2 -r1.3 pkgsrc/games/openttd/patches/patch-cmake_InstallAndPackage.cmake

cvs diff -r1.112 -r1.113 pkgsrc/games/openttd/Makefile (expand / switch to unified diff)

--- pkgsrc/games/openttd/Makefile 2023/07/17 20:26:08 1.112
+++ pkgsrc/games/openttd/Makefile 2023/07/17 21:07:58 1.113
@@ -1,58 +1,59 @@ @@ -1,58 +1,59 @@
1# $NetBSD: Makefile,v 1.112 2023/07/17 20:26:08 triaxx Exp $ 1# $NetBSD: Makefile,v 1.113 2023/07/17 21:07:58 adam Exp $
2 2
3DISTNAME= openttd-13.3-source 3DISTNAME= openttd-13.3-source
4PKGNAME= ${DISTNAME:S/-source//} 4PKGNAME= ${DISTNAME:S/-source//}
5CATEGORIES= games 5CATEGORIES= games
6MASTER_SITES= https://proxy.binaries.openttd.org/openttd-releases/${PKGVERSION_NOREV}/ 6MASTER_SITES= https://proxy.binaries.openttd.org/openttd-releases/${PKGVERSION_NOREV}/
7MASTER_SITES+= https://cdn.openttd.org/openttd-releases/${PKGVERSION_NOREV}/ 7MASTER_SITES+= https://cdn.openttd.org/openttd-releases/${PKGVERSION_NOREV}/
8EXTRACT_SUFX= .tar.xz 8EXTRACT_SUFX= .tar.xz
9 9
10MAINTAINER= pkgsrc-users@NetBSD.org 10MAINTAINER= pkgsrc-users@NetBSD.org
11HOMEPAGE= https://www.openttd.org/ 11HOMEPAGE= https://www.openttd.org/
12COMMENT= Open source clone of Transport Tycoon Deluxe 12COMMENT= Open source clone of Transport Tycoon Deluxe
13LICENSE= gnu-gpl-v2 13LICENSE= gnu-gpl-v2
14 14
15WRKSRC= ${WRKDIR}/${PKGNAME_NOREV} 15WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
16USE_CMAKE= yes 
17USE_LANGUAGES= c c++ 16USE_LANGUAGES= c c++
18USE_TOOLS+= pkg-config 17USE_TOOLS+= pkg-config
19CONFIGURE_DIRS= build 
20CMAKE_ARG_PATH= .. 
21 18
22# C++17 19# C++17
23GCC_REQD+= 8 # std::charconv 20GCC_REQD+= 8 # std::charconv
24 21
25BUILD_DEFS+= VARBASE 22BUILD_DEFS+= VARBASE
26 23
27.include "../../mk/bsd.prefs.mk" 24.include "../../mk/bsd.prefs.mk"
28 25
29CMAKE_ARGS+= -DPERSONAL_DIR=.openttd 26CMAKE_ARGS+= -DPERSONAL_DIR=.openttd
30CMAKE_ARGS+= -DSHARED_DIR=${VARBASE}/games/openttd 27CMAKE_ARGS+= -DSHARED_DIR=${VARBASE}/games/openttd
31CMAKE_ARGS+= -DGLOBAL_DIR=${PREFIX}/share/openttd 28CMAKE_ARGS+= -DGLOBAL_DIR=${PREFIX}/share/openttd
32CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release 29CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release
33CMAKE_ARGS+= -DCMAKE_INSTALL_BINDIR=bin 30CMAKE_ARGS+= -DCMAKE_INSTALL_BINDIR=bin
34CMAKE_ARGS+= -DCMAKE_INSTALL_DATADIR=share 31CMAKE_ARGS+= -DCMAKE_INSTALL_DATADIR=share
35CMAKE_ARGS+= -DCMAKE_DISABLE_FIND_PACKAGE_Allegro=ON 32CMAKE_ARGS+= -DCMAKE_DISABLE_FIND_PACKAGE_Allegro=ON
36CMAKE_ARGS+= -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON 33CMAKE_ARGS+= -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON
37CMAKE_ARGS+= -DCMAKE_DISABLE_FIND_PACKAGE_Grfcodec=ON 34CMAKE_ARGS+= -DCMAKE_DISABLE_FIND_PACKAGE_Grfcodec=ON
 35CMAKE_ARGS+= -DOPTION_INSTALL_FHS=ON
38 36
39BUILDLINK_TRANSFORM+= opt:-std=c++17:-std=gnu++17 # alloca 37BUILDLINK_TRANSFORM+= opt:-std=c++17:-std=gnu++17 # alloca
40BUILDLINK_TRANSFORM+= opt:-std=c++1z:-std=gnu++1z # alloca 38BUILDLINK_TRANSFORM+= opt:-std=c++1z:-std=gnu++1z # alloca
41 39
42pre-configure: 40PLIST_VARS= unix
43 ${MKDIR} ${WRKSRC}/build 41.if ${OPSYS} != "Darwin"
 42PLIST.unix= yes
 43.include "../../devel/SDL2/buildlink3.mk"
 44.include "../../fonts/fontconfig/buildlink3.mk"
 45.include "../../graphics/freetype2/buildlink3.mk"
 46.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
 47.include "../../sysutils/desktop-file-utils/desktopdb.mk"
 48.include "../../textproc/icu/buildlink3.mk"
 49.endif
44 50
45.include "../../archivers/lzo/buildlink3.mk" 51.include "../../archivers/lzo/buildlink3.mk"
46.include "../../archivers/xz/buildlink3.mk" 52.include "../../archivers/xz/buildlink3.mk"
47.include "../../audio/fluidsynth/buildlink3.mk" 53.include "../../audio/fluidsynth/buildlink3.mk"
48.include "../../converters/libiconv/buildlink3.mk" 54.include "../../converters/libiconv/buildlink3.mk"
49.include "../../devel/SDL2/buildlink3.mk" 55.include "../../devel/cmake/build.mk"
50.include "../../devel/zlib/buildlink3.mk" 56.include "../../devel/zlib/buildlink3.mk"
51.include "../../fonts/fontconfig/buildlink3.mk" 
52.include "../../graphics/freetype2/buildlink3.mk" 
53.include "../../graphics/hicolor-icon-theme/buildlink3.mk" 
54.include "../../graphics/png/buildlink3.mk" 57.include "../../graphics/png/buildlink3.mk"
55.include "../../sysutils/desktop-file-utils/desktopdb.mk" 
56.include "../../textproc/icu/buildlink3.mk" 
57.include "../../mk/pthread.buildlink3.mk" 58.include "../../mk/pthread.buildlink3.mk"
58.include "../../mk/bsd.pkg.mk" 59.include "../../mk/bsd.pkg.mk"

cvs diff -r1.30 -r1.31 pkgsrc/games/openttd/PLIST (expand / switch to unified diff)

--- pkgsrc/games/openttd/PLIST 2023/07/17 20:26:08 1.30
+++ pkgsrc/games/openttd/PLIST 2023/07/17 21:07:58 1.31
@@ -1,28 +1,28 @@ @@ -1,28 +1,28 @@
1@comment $NetBSD: PLIST,v 1.30 2023/07/17 20:26:08 triaxx Exp $ 1@comment $NetBSD: PLIST,v 1.31 2023/07/17 21:07:58 adam Exp $
2bin/openttd 2bin/openttd
3man/man6/openttd.6 3man/man6/openttd.6
4share/applications/openttd.desktop 4${PLIST.unix}share/applications/openttd.desktop
5share/doc/openttd/COPYING.md 5share/doc/openttd/COPYING.md
6share/doc/openttd/README.md 6share/doc/openttd/README.md
7share/doc/openttd/changelog.txt 7share/doc/openttd/changelog.txt
8share/doc/openttd/known-bugs.txt 8share/doc/openttd/known-bugs.txt
9share/doc/openttd/multiplayer.md 9share/doc/openttd/multiplayer.md
10share/icons/hicolor/128x128/apps/openttd.png 10${PLIST.unix}share/icons/hicolor/128x128/apps/openttd.png
11share/icons/hicolor/16x16/apps/openttd.png 11${PLIST.unix}share/icons/hicolor/16x16/apps/openttd.png
12share/icons/hicolor/256x256/apps/openttd.png 12${PLIST.unix}share/icons/hicolor/256x256/apps/openttd.png
13share/icons/hicolor/32x32/apps/openttd.png 13${PLIST.unix}share/icons/hicolor/32x32/apps/openttd.png
14share/icons/hicolor/48x48/apps/openttd.png 14${PLIST.unix}share/icons/hicolor/48x48/apps/openttd.png
15share/icons/hicolor/64x64/apps/openttd.png 15${PLIST.unix}share/icons/hicolor/64x64/apps/openttd.png
16share/openttd/ai/compat_0.7.nut 16share/openttd/ai/compat_0.7.nut
17share/openttd/ai/compat_1.0.nut 17share/openttd/ai/compat_1.0.nut
18share/openttd/ai/compat_1.1.nut 18share/openttd/ai/compat_1.1.nut
19share/openttd/ai/compat_1.10.nut 19share/openttd/ai/compat_1.10.nut
20share/openttd/ai/compat_1.11.nut 20share/openttd/ai/compat_1.11.nut
21share/openttd/ai/compat_1.2.nut 21share/openttd/ai/compat_1.2.nut
22share/openttd/ai/compat_1.3.nut 22share/openttd/ai/compat_1.3.nut
23share/openttd/ai/compat_1.4.nut 23share/openttd/ai/compat_1.4.nut
24share/openttd/ai/compat_1.5.nut 24share/openttd/ai/compat_1.5.nut
25share/openttd/ai/compat_1.6.nut 25share/openttd/ai/compat_1.6.nut
26share/openttd/ai/compat_1.7.nut 26share/openttd/ai/compat_1.7.nut
27share/openttd/ai/compat_1.8.nut 27share/openttd/ai/compat_1.8.nut
28share/openttd/ai/compat_1.9.nut 28share/openttd/ai/compat_1.9.nut
@@ -118,15 +118,15 @@ share/openttd/lang/turkish.lng @@ -118,15 +118,15 @@ share/openttd/lang/turkish.lng
118share/openttd/lang/ukrainian.lng 118share/openttd/lang/ukrainian.lng
119share/openttd/lang/urdu.lng 119share/openttd/lang/urdu.lng
120share/openttd/lang/vietnamese.lng 120share/openttd/lang/vietnamese.lng
121share/openttd/lang/welsh.lng 121share/openttd/lang/welsh.lng
122share/openttd/scripts/autoexec.scr.example 122share/openttd/scripts/autoexec.scr.example
123share/openttd/scripts/game_start.scr.example 123share/openttd/scripts/game_start.scr.example
124share/openttd/scripts/on_client.scr.example 124share/openttd/scripts/on_client.scr.example
125share/openttd/scripts/on_dedicated.scr.example 125share/openttd/scripts/on_dedicated.scr.example
126share/openttd/scripts/on_server.scr.example 126share/openttd/scripts/on_server.scr.example
127share/openttd/scripts/on_server_connect.scr.example 127share/openttd/scripts/on_server_connect.scr.example
128share/openttd/scripts/pre_dedicated.scr.example 128share/openttd/scripts/pre_dedicated.scr.example
129share/openttd/scripts/pre_server.scr.example 129share/openttd/scripts/pre_server.scr.example
130share/openttd/scripts/readme.txt 130share/openttd/scripts/readme.txt
131share/pixmaps/openttd.32.xpm 131${PLIST.unix}share/pixmaps/openttd.32.xpm
132share/pixmaps/openttd.64.xpm 132${PLIST.unix}share/pixmaps/openttd.64.xpm

cvs diff -r1.43 -r1.44 pkgsrc/games/openttd/distinfo (expand / switch to unified diff)

--- pkgsrc/games/openttd/distinfo 2023/07/17 20:26:08 1.43
+++ pkgsrc/games/openttd/distinfo 2023/07/17 21:07:58 1.44
@@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
1$NetBSD: distinfo,v 1.43 2023/07/17 20:26:08 triaxx Exp $ 1$NetBSD: distinfo,v 1.44 2023/07/17 21:07:58 adam Exp $
2 2
3BLAKE2s (openttd-13.3-source.tar.xz) = 7fbba0842b627c67a76b911c9cfe810d3ecf2a47240a0838dcbebd95baf94186 3BLAKE2s (openttd-13.3-source.tar.xz) = 7fbba0842b627c67a76b911c9cfe810d3ecf2a47240a0838dcbebd95baf94186
4SHA512 (openttd-13.3-source.tar.xz) = bb91755f65bd3c3f4716b6722f29bc63633e04557d427cb224f4c3aecdbd3744df4921aba3872966fc587541fe2cdaa2fd80891236a9c87826cea0a6865e2318 4SHA512 (openttd-13.3-source.tar.xz) = bb91755f65bd3c3f4716b6722f29bc63633e04557d427cb224f4c3aecdbd3744df4921aba3872966fc587541fe2cdaa2fd80891236a9c87826cea0a6865e2318
5Size (openttd-13.3-source.tar.xz) = 7417568 bytes 5Size (openttd-13.3-source.tar.xz) = 7417568 bytes
6SHA1 (patch-cmake_InstallAndPackage.cmake) = ccac4a306d243b57cf6dcc36636d65f2dab434aa 6SHA1 (patch-cmake_InstallAndPackage.cmake) = 47cf19bf6b77dc5bcf954ee5ffdb4967f2af19ea
7SHA1 (patch-src_core_alloc__func.hpp) = 9c5a855316e3262c51c1b4c836de760d53abb759 7SHA1 (patch-src_core_alloc__func.hpp) = 9c5a855316e3262c51c1b4c836de760d53abb759

cvs diff -r1.2 -r1.3 pkgsrc/games/openttd/patches/patch-cmake_InstallAndPackage.cmake (expand / switch to unified diff)

--- pkgsrc/games/openttd/patches/patch-cmake_InstallAndPackage.cmake 2023/07/17 20:26:08 1.2
+++ pkgsrc/games/openttd/patches/patch-cmake_InstallAndPackage.cmake 2023/07/17 21:07:58 1.3
@@ -1,59 +1,29 @@ @@ -1,59 +1,29 @@
1$NetBSD: patch-cmake_InstallAndPackage.cmake,v 1.2 2023/07/17 20:26:08 triaxx Exp $ 1$NetBSD: patch-cmake_InstallAndPackage.cmake,v 1.3 2023/07/17 21:07:58 adam Exp $
2 2
3Do not try to generate Linux distribution packages. 3Do not try to generate Linux distribution packages.
4 4
5--- cmake/InstallAndPackage.cmake.orig 2023-06-11 16:42:59.000000000 +0000 5--- cmake/InstallAndPackage.cmake.orig 2023-06-11 16:42:59.000000000 +0000
6+++ cmake/InstallAndPackage.cmake 6+++ cmake/InstallAndPackage.cmake
7@@ -154,51 +154,9 @@ elseif(UNIX) 7@@ -121,7 +121,7 @@ set(CPACK_PACKAGE_EXECUTABLES "openttd;O
 8 set(CPACK_STRIP_FILES YES)
 9 set(CPACK_OUTPUT_FILE_PREFIX "bundles")
 10
 11-if(APPLE)
 12+if(FALSE)
 13 # Stripping would produce unreadable stacktraces.
 14 set(CPACK_STRIP_FILES NO)
 15 set(CPACK_GENERATOR "Bundle")
 16@@ -154,10 +154,11 @@ elseif(UNIX)
8 if(OPTION_PACKAGE_DEPENDENCIES) 17 if(OPTION_PACKAGE_DEPENDENCIES)
9 set(CPACK_GENERATOR "TXZ") 18 set(CPACK_GENERATOR "TXZ")
10 set(PLATFORM "generic") 19 set(PLATFORM "generic")
11- elseif(NOT OPTION_INSTALL_FHS) 20- elseif(NOT OPTION_INSTALL_FHS)
12+ else(NOT OPTION_INSTALL_FHS) 21+ else()
13 set(CPACK_GENERATOR "TXZ") 22 set(CPACK_GENERATOR "TXZ")
14 set(PLATFORM "unknown") 23 set(PLATFORM "unknown")
15- else() 24- else()
16- find_program(LSB_RELEASE_EXEC lsb_release) 25+ endif()
17- execute_process(COMMAND ${LSB_RELEASE_EXEC} -is 26+ if(FALSE)
18- OUTPUT_VARIABLE LSB_RELEASE_ID 27 find_program(LSB_RELEASE_EXEC lsb_release)
19- OUTPUT_STRIP_TRAILING_WHITESPACE 28 execute_process(COMMAND ${LSB_RELEASE_EXEC} -is
20- ) 29 OUTPUT_VARIABLE LSB_RELEASE_ID
21- if(LSB_RELEASE_ID) 
22- if(LSB_RELEASE_ID STREQUAL "Ubuntu" OR LSB_RELEASE_ID STREQUAL "Debian") 
23- execute_process(COMMAND ${LSB_RELEASE_EXEC} -cs 
24- OUTPUT_VARIABLE LSB_RELEASE_CODENAME 
25- OUTPUT_STRIP_TRAILING_WHITESPACE 
26- ) 
27- string(TOLOWER "${LSB_RELEASE_ID}-${LSB_RELEASE_CODENAME}" PLATFORM) 
28- 
29- set(CPACK_GENERATOR "DEB") 
30- include(PackageDeb) 
31- else() 
32- set(UNSUPPORTED_PLATFORM_NAME "LSB-based Linux distribution '${LSB_RELEASE_ID}'") 
33- endif() 
34- elseif(EXISTS "/etc/os-release") 
35- file(STRINGS "/etc/os-release" OS_RELEASE_CONTENTS REGEX "^ID=") 
36- string(REGEX MATCH "ID=(.*)" _ ${OS_RELEASE_CONTENTS}) 
37- set(DISTRO_ID ${CMAKE_MATCH_1}) 
38- if(DISTRO_ID STREQUAL "arch") 
39- set(PLATFORM "arch") 
40- set(CPACK_GENERATOR "TXZ") 
41- elseif(DISTRO_ID STREQUAL "fedora" OR DISTRO_ID STREQUAL "rhel") 
42- set(PLATFORM "fedora") 
43- set(CPACK_GENERATOR "RPM") 
44- include(PackageRPM) 
45- else() 
46- set(UNSUPPORTED_PLATFORM_NAME "Linux distribution '${DISTRO_ID}' from /etc/os-release") 
47- endif() 
48- else() 
49- set(UNSUPPORTED_PLATFORM_NAME "Linux distribution") 
50- endif() 
51- 
52- if(NOT PLATFORM) 
53- set(PLATFORM "generic") 
54- set(CPACK_GENERATOR "TXZ") 
55- message(WARNING "Unknown ${UNSUPPORTED_PLATFORM_NAME} found for packaging; can only pack to a txz. Please consider creating a Pull Request to add support for this distribution.") 
56- endif() 
57 endif() 
58  
59 set(CPACK_PACKAGE_FILE_NAME "openttd-#CPACK_PACKAGE_VERSION#-linux-${PLATFORM}-${CPACK_SYSTEM_NAME}")