openttd: package correctly on Darwindiff -r1.112 -r1.113 pkgsrc/games/openttd/Makefile
(adam)
@@ -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 | |||
3 | DISTNAME= openttd-13.3-source | 3 | DISTNAME= openttd-13.3-source | |
4 | PKGNAME= ${DISTNAME:S/-source//} | 4 | PKGNAME= ${DISTNAME:S/-source//} | |
5 | CATEGORIES= games | 5 | CATEGORIES= games | |
6 | MASTER_SITES= https://proxy.binaries.openttd.org/openttd-releases/${PKGVERSION_NOREV}/ | 6 | MASTER_SITES= https://proxy.binaries.openttd.org/openttd-releases/${PKGVERSION_NOREV}/ | |
7 | MASTER_SITES+= https://cdn.openttd.org/openttd-releases/${PKGVERSION_NOREV}/ | 7 | MASTER_SITES+= https://cdn.openttd.org/openttd-releases/${PKGVERSION_NOREV}/ | |
8 | EXTRACT_SUFX= .tar.xz | 8 | EXTRACT_SUFX= .tar.xz | |
9 | 9 | |||
10 | MAINTAINER= pkgsrc-users@NetBSD.org | 10 | MAINTAINER= pkgsrc-users@NetBSD.org | |
11 | HOMEPAGE= https://www.openttd.org/ | 11 | HOMEPAGE= https://www.openttd.org/ | |
12 | COMMENT= Open source clone of Transport Tycoon Deluxe | 12 | COMMENT= Open source clone of Transport Tycoon Deluxe | |
13 | LICENSE= gnu-gpl-v2 | 13 | LICENSE= gnu-gpl-v2 | |
14 | 14 | |||
15 | WRKSRC= ${WRKDIR}/${PKGNAME_NOREV} | 15 | WRKSRC= ${WRKDIR}/${PKGNAME_NOREV} | |
16 | USE_CMAKE= yes | |||
17 | USE_LANGUAGES= c c++ | 16 | USE_LANGUAGES= c c++ | |
18 | USE_TOOLS+= pkg-config | 17 | USE_TOOLS+= pkg-config | |
19 | CONFIGURE_DIRS= build | |||
20 | CMAKE_ARG_PATH= .. | |||
21 | 18 | |||
22 | # C++17 | 19 | # C++17 | |
23 | GCC_REQD+= 8 # std::charconv | 20 | GCC_REQD+= 8 # std::charconv | |
24 | 21 | |||
25 | BUILD_DEFS+= VARBASE | 22 | BUILD_DEFS+= VARBASE | |
26 | 23 | |||
27 | .include "../../mk/bsd.prefs.mk" | 24 | .include "../../mk/bsd.prefs.mk" | |
28 | 25 | |||
29 | CMAKE_ARGS+= -DPERSONAL_DIR=.openttd | 26 | CMAKE_ARGS+= -DPERSONAL_DIR=.openttd | |
30 | CMAKE_ARGS+= -DSHARED_DIR=${VARBASE}/games/openttd | 27 | CMAKE_ARGS+= -DSHARED_DIR=${VARBASE}/games/openttd | |
31 | CMAKE_ARGS+= -DGLOBAL_DIR=${PREFIX}/share/openttd | 28 | CMAKE_ARGS+= -DGLOBAL_DIR=${PREFIX}/share/openttd | |
32 | CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release | 29 | CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release | |
33 | CMAKE_ARGS+= -DCMAKE_INSTALL_BINDIR=bin | 30 | CMAKE_ARGS+= -DCMAKE_INSTALL_BINDIR=bin | |
34 | CMAKE_ARGS+= -DCMAKE_INSTALL_DATADIR=share | 31 | CMAKE_ARGS+= -DCMAKE_INSTALL_DATADIR=share | |
35 | CMAKE_ARGS+= -DCMAKE_DISABLE_FIND_PACKAGE_Allegro=ON | 32 | CMAKE_ARGS+= -DCMAKE_DISABLE_FIND_PACKAGE_Allegro=ON | |
36 | CMAKE_ARGS+= -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON | 33 | CMAKE_ARGS+= -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON | |
37 | CMAKE_ARGS+= -DCMAKE_DISABLE_FIND_PACKAGE_Grfcodec=ON | 34 | CMAKE_ARGS+= -DCMAKE_DISABLE_FIND_PACKAGE_Grfcodec=ON | |
35 | CMAKE_ARGS+= -DOPTION_INSTALL_FHS=ON | |||
38 | 36 | |||
39 | BUILDLINK_TRANSFORM+= opt:-std=c++17:-std=gnu++17 # alloca | 37 | BUILDLINK_TRANSFORM+= opt:-std=c++17:-std=gnu++17 # alloca | |
40 | BUILDLINK_TRANSFORM+= opt:-std=c++1z:-std=gnu++1z # alloca | 38 | BUILDLINK_TRANSFORM+= opt:-std=c++1z:-std=gnu++1z # alloca | |
41 | 39 | |||
42 | pre-configure: | 40 | PLIST_VARS= unix | |
43 | ${MKDIR} ${WRKSRC}/build | 41 | .if ${OPSYS} != "Darwin" | |
42 | PLIST.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" |
@@ -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 $ | |
2 | bin/openttd | 2 | bin/openttd | |
3 | man/man6/openttd.6 | 3 | man/man6/openttd.6 | |
4 | share/applications/openttd.desktop | 4 | ${PLIST.unix}share/applications/openttd.desktop | |
5 | share/doc/openttd/COPYING.md | 5 | share/doc/openttd/COPYING.md | |
6 | share/doc/openttd/README.md | 6 | share/doc/openttd/README.md | |
7 | share/doc/openttd/changelog.txt | 7 | share/doc/openttd/changelog.txt | |
8 | share/doc/openttd/known-bugs.txt | 8 | share/doc/openttd/known-bugs.txt | |
9 | share/doc/openttd/multiplayer.md | 9 | share/doc/openttd/multiplayer.md | |
10 | share/icons/hicolor/128x128/apps/openttd.png | 10 | ${PLIST.unix}share/icons/hicolor/128x128/apps/openttd.png | |
11 | share/icons/hicolor/16x16/apps/openttd.png | 11 | ${PLIST.unix}share/icons/hicolor/16x16/apps/openttd.png | |
12 | share/icons/hicolor/256x256/apps/openttd.png | 12 | ${PLIST.unix}share/icons/hicolor/256x256/apps/openttd.png | |
13 | share/icons/hicolor/32x32/apps/openttd.png | 13 | ${PLIST.unix}share/icons/hicolor/32x32/apps/openttd.png | |
14 | share/icons/hicolor/48x48/apps/openttd.png | 14 | ${PLIST.unix}share/icons/hicolor/48x48/apps/openttd.png | |
15 | share/icons/hicolor/64x64/apps/openttd.png | 15 | ${PLIST.unix}share/icons/hicolor/64x64/apps/openttd.png | |
16 | share/openttd/ai/compat_0.7.nut | 16 | share/openttd/ai/compat_0.7.nut | |
17 | share/openttd/ai/compat_1.0.nut | 17 | share/openttd/ai/compat_1.0.nut | |
18 | share/openttd/ai/compat_1.1.nut | 18 | share/openttd/ai/compat_1.1.nut | |
19 | share/openttd/ai/compat_1.10.nut | 19 | share/openttd/ai/compat_1.10.nut | |
20 | share/openttd/ai/compat_1.11.nut | 20 | share/openttd/ai/compat_1.11.nut | |
21 | share/openttd/ai/compat_1.2.nut | 21 | share/openttd/ai/compat_1.2.nut | |
22 | share/openttd/ai/compat_1.3.nut | 22 | share/openttd/ai/compat_1.3.nut | |
23 | share/openttd/ai/compat_1.4.nut | 23 | share/openttd/ai/compat_1.4.nut | |
24 | share/openttd/ai/compat_1.5.nut | 24 | share/openttd/ai/compat_1.5.nut | |
25 | share/openttd/ai/compat_1.6.nut | 25 | share/openttd/ai/compat_1.6.nut | |
26 | share/openttd/ai/compat_1.7.nut | 26 | share/openttd/ai/compat_1.7.nut | |
27 | share/openttd/ai/compat_1.8.nut | 27 | share/openttd/ai/compat_1.8.nut | |
28 | share/openttd/ai/compat_1.9.nut | 28 | share/openttd/ai/compat_1.9.nut | |
@@ -118,15 +118,15 @@ share/openttd/lang/turkish.lng | @@ -118,15 +118,15 @@ share/openttd/lang/turkish.lng | |||
118 | share/openttd/lang/ukrainian.lng | 118 | share/openttd/lang/ukrainian.lng | |
119 | share/openttd/lang/urdu.lng | 119 | share/openttd/lang/urdu.lng | |
120 | share/openttd/lang/vietnamese.lng | 120 | share/openttd/lang/vietnamese.lng | |
121 | share/openttd/lang/welsh.lng | 121 | share/openttd/lang/welsh.lng | |
122 | share/openttd/scripts/autoexec.scr.example | 122 | share/openttd/scripts/autoexec.scr.example | |
123 | share/openttd/scripts/game_start.scr.example | 123 | share/openttd/scripts/game_start.scr.example | |
124 | share/openttd/scripts/on_client.scr.example | 124 | share/openttd/scripts/on_client.scr.example | |
125 | share/openttd/scripts/on_dedicated.scr.example | 125 | share/openttd/scripts/on_dedicated.scr.example | |
126 | share/openttd/scripts/on_server.scr.example | 126 | share/openttd/scripts/on_server.scr.example | |
127 | share/openttd/scripts/on_server_connect.scr.example | 127 | share/openttd/scripts/on_server_connect.scr.example | |
128 | share/openttd/scripts/pre_dedicated.scr.example | 128 | share/openttd/scripts/pre_dedicated.scr.example | |
129 | share/openttd/scripts/pre_server.scr.example | 129 | share/openttd/scripts/pre_server.scr.example | |
130 | share/openttd/scripts/readme.txt | 130 | share/openttd/scripts/readme.txt | |
131 | share/pixmaps/openttd.32.xpm | 131 | ${PLIST.unix}share/pixmaps/openttd.32.xpm | |
132 | share/pixmaps/openttd.64.xpm | 132 | ${PLIST.unix}share/pixmaps/openttd.64.xpm |
@@ -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 | |||
3 | BLAKE2s (openttd-13.3-source.tar.xz) = 7fbba0842b627c67a76b911c9cfe810d3ecf2a47240a0838dcbebd95baf94186 | 3 | BLAKE2s (openttd-13.3-source.tar.xz) = 7fbba0842b627c67a76b911c9cfe810d3ecf2a47240a0838dcbebd95baf94186 | |
4 | SHA512 (openttd-13.3-source.tar.xz) = bb91755f65bd3c3f4716b6722f29bc63633e04557d427cb224f4c3aecdbd3744df4921aba3872966fc587541fe2cdaa2fd80891236a9c87826cea0a6865e2318 | 4 | SHA512 (openttd-13.3-source.tar.xz) = bb91755f65bd3c3f4716b6722f29bc63633e04557d427cb224f4c3aecdbd3744df4921aba3872966fc587541fe2cdaa2fd80891236a9c87826cea0a6865e2318 | |
5 | Size (openttd-13.3-source.tar.xz) = 7417568 bytes | 5 | Size (openttd-13.3-source.tar.xz) = 7417568 bytes | |
6 | SHA1 (patch-cmake_InstallAndPackage.cmake) = ccac4a306d243b57cf6dcc36636d65f2dab434aa | 6 | SHA1 (patch-cmake_InstallAndPackage.cmake) = 47cf19bf6b77dc5bcf954ee5ffdb4967f2af19ea | |
7 | SHA1 (patch-src_core_alloc__func.hpp) = 9c5a855316e3262c51c1b4c836de760d53abb759 | 7 | SHA1 (patch-src_core_alloc__func.hpp) = 9c5a855316e3262c51c1b4c836de760d53abb759 |
@@ -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 | |||
3 | Do not try to generate Linux distribution packages. | 3 | Do 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}") |