| @@ -1,96 +1,98 @@ | | | @@ -1,96 +1,98 @@ |
1 | # $NetBSD: Makefile,v 1.73 2023/08/02 19:27:31 nia Exp $ | | 1 | # $NetBSD: Makefile,v 1.74 2023/08/09 09:02:07 nia Exp $ |
2 | | | 2 | |
3 | DISTNAME= warzone2100_src | | 3 | DISTNAME= warzone2100_src |
4 | PKGNAME= warzone2100-4.3.5 | | 4 | PKGNAME= warzone2100-4.3.5 |
5 | PKGREVISION= 1 | | 5 | PKGREVISION= 1 |
6 | CATEGORIES= games | | 6 | CATEGORIES= games |
7 | MASTER_SITES= ${MASTER_SITE_GITHUB:=Warzone2100/} | | 7 | MASTER_SITES= ${MASTER_SITE_GITHUB:=Warzone2100/} |
8 | GITHUB_RELEASE= ${PKGVERSION_NOREV} | | 8 | GITHUB_RELEASE= ${PKGVERSION_NOREV} |
9 | DIST_SUBDIR= wz2100_${PKGVERSION_NOREV} | | 9 | DIST_SUBDIR= wz2100_${PKGVERSION_NOREV} |
10 | EXTRACT_SUFX= .tar.xz | | 10 | EXTRACT_SUFX= .tar.xz |
11 | | | 11 | |
12 | MAINTAINER= pkgsrc-users@NetBSD.org | | 12 | MAINTAINER= pkgsrc-users@NetBSD.org |
13 | HOMEPAGE= https://wz2100.net/ | | 13 | HOMEPAGE= https://wz2100.net/ |
14 | COMMENT= Real-time strategy and real-time tactics hybrid computer game | | 14 | COMMENT= Real-time strategy and real-time tactics hybrid computer game |
15 | LICENSE= gnu-gpl-v2 | | 15 | LICENSE= gnu-gpl-v2 |
16 | | | 16 | |
17 | USE_CMAKE= yes | | 17 | USE_CMAKE= yes |
18 | USE_LANGUAGES= c c++ | | 18 | USE_LANGUAGES= c c++ |
19 | USE_TOOLS+= gmake pkg-config zip | | 19 | USE_TOOLS+= gmake pkg-config zip |
20 | USE_TOOLS+= msgfmt msgmerge xgettext | | 20 | USE_TOOLS+= msgfmt msgmerge xgettext |
21 | | | 21 | |
22 | TOOL_DEPENDS+= asciidoc-[0-9]*:../../textproc/asciidoc | | 22 | TOOL_DEPENDS+= asciidoc-[0-9]*:../../textproc/asciidoc |
23 | | | 23 | |
24 | # Needs gnu standard variant to get alloca builtin. | | 24 | # Needs gnu standard variant to get alloca builtin. |
25 | FORCE_CXX_STD= gnu++11 | | 25 | FORCE_CXX_STD= gnu++14 |
| | | 26 | |
| | | 27 | USE_CXX_FEATURES+= unique_ptr |
26 | | | 28 | |
27 | .include "../../mk/bsd.prefs.mk" | | 29 | .include "../../mk/bsd.prefs.mk" |
28 | | | 30 | |
29 | .if ${OPSYS} == "NetBSD" | | 31 | .if ${OPSYS} == "NetBSD" |
30 | # Could NOT find Gettext: Found unsuitable version "0.16.1", but | | 32 | # Could NOT find Gettext: Found unsuitable version "0.16.1", but |
31 | # required is at least "0.18" | | 33 | # required is at least "0.18" |
32 | TOOLS_PLATFORM.msgfmt= | | 34 | TOOLS_PLATFORM.msgfmt= |
33 | TOOLS_PLATFORM.msgmerge= | | 35 | TOOLS_PLATFORM.msgmerge= |
34 | TOOLS_PLATFORM.xgettext= | | 36 | TOOLS_PLATFORM.xgettext= |
35 | .endif | | 37 | .endif |
36 | | | 38 | |
37 | .include "../../games/warzone2100/options.mk" | | 39 | .include "../../games/warzone2100/options.mk" |
38 | | | 40 | |
39 | WRKSRC= ${WRKDIR}/warzone2100 | | 41 | WRKSRC= ${WRKDIR}/warzone2100 |
40 | CONFIGURE_DIRS= build | | 42 | CONFIGURE_DIRS= build |
41 | CMAKE_ARG_PATH= ${WRKSRC} | | 43 | CMAKE_ARG_PATH= ${WRKSRC} |
42 | | | 44 | |
43 | CMAKE_ARGS+= -DCMAKE_MAKE_PROGRAM=${MAKE_PROGRAM} -DWZ_DISTRIBUTOR=pkgsrc | | 45 | CMAKE_ARGS+= -DCMAKE_MAKE_PROGRAM=${MAKE_PROGRAM} -DWZ_DISTRIBUTOR=pkgsrc |
44 | CMAKE_ARGS+= -DCMAKE_VERBOSE_MAKEFILE=1 | | 46 | CMAKE_ARGS+= -DCMAKE_VERBOSE_MAKEFILE=1 |
45 | | | 47 | |
46 | CFLAGS.NetBSD+= -D_NETBSD_SOURCE | | 48 | CFLAGS.NetBSD+= -D_NETBSD_SOURCE |
47 | CFLAGS.Darwin+= -fobjc-arc | | 49 | CFLAGS.Darwin+= -fobjc-arc |
48 | LDFLAGS.DragonFly+= -lX11 -lintl | | 50 | LDFLAGS.DragonFly+= -lX11 -lintl |
49 | | | 51 | |
50 | BUILDLINK_TRANSFORM+= rm:-Werror | | 52 | BUILDLINK_TRANSFORM+= rm:-Werror |
51 | | | 53 | |
52 | SUBST_CLASSES+= rpath | | 54 | SUBST_CLASSES+= rpath |
53 | SUBST_MESSAGE.rpath= Fixing linker arguments. | | 55 | SUBST_MESSAGE.rpath= Fixing linker arguments. |
54 | SUBST_STAGE.rpath= pre-configure | | 56 | SUBST_STAGE.rpath= pre-configure |
55 | SUBST_FILES.rpath= 3rdparty/basis_universal/CMakeLists.txt | | 57 | SUBST_FILES.rpath= 3rdparty/basis_universal/CMakeLists.txt |
56 | SUBST_SED.rpath= -e 's|-Wl,-rpath |${COMPILER_RPATH_FLAG},|' | | 58 | SUBST_SED.rpath= -e 's|-Wl,-rpath |${COMPILER_RPATH_FLAG},|' |
57 | | | 59 | |
58 | # TODO: Patch installation to comply with the common Unix directories and | | 60 | # TODO: Patch installation to comply with the common Unix directories and |
59 | # eventually add a variable INSTALL_MACOS_BUNDLE somewhere in mk/ | | 61 | # eventually add a variable INSTALL_MACOS_BUNDLE somewhere in mk/ |
60 | # to let the possibility to install the bundle in | | 62 | # to let the possibility to install the bundle in |
61 | # ${LOCALBASE}/Applications/Warzone 2100.app. | | 63 | # ${LOCALBASE}/Applications/Warzone 2100.app. |
62 | # XXX: It installs out of the box but it does not comply with the pkgsrc | | 64 | # XXX: It installs out of the box but it does not comply with the pkgsrc |
63 | # directory hierarchy. | | 65 | # directory hierarchy. |
64 | .if ${OPSYS} == "Darwin" | | 66 | .if ${OPSYS} == "Darwin" |
65 | PLIST_SRC= PLIST.bundle | | 67 | PLIST_SRC= PLIST.bundle |
66 | .endif | | 68 | .endif |
67 | | | 69 | |
68 | pre-configure: | | 70 | pre-configure: |
69 | ${RUN}${MKDIR} ${WRKSRC}/build | | 71 | ${RUN}${MKDIR} ${WRKSRC}/build |
70 | | | 72 | |
71 | .include "../../audio/openal-soft/buildlink3.mk" | | 73 | .include "../../audio/openal-soft/buildlink3.mk" |
72 | .include "../../audio/libvorbis/buildlink3.mk" | | 74 | .include "../../audio/libvorbis/buildlink3.mk" |
73 | .include "../../converters/fribidi/buildlink3.mk" | | 75 | .include "../../converters/fribidi/buildlink3.mk" |
74 | .include "../../converters/libiconv/buildlink3.mk" | | 76 | .include "../../converters/libiconv/buildlink3.mk" |
75 | .include "../../devel/gettext-lib/buildlink3.mk" | | 77 | .include "../../devel/gettext-lib/buildlink3.mk" |
76 | .include "../../devel/physfs/buildlink3.mk" | | 78 | .include "../../devel/physfs/buildlink3.mk" |
77 | .include "../../devel/popt/buildlink3.mk" | | 79 | .include "../../devel/popt/buildlink3.mk" |
78 | .include "../../fonts/fontconfig/buildlink3.mk" | | 80 | .include "../../fonts/fontconfig/buildlink3.mk" |
79 | .include "../../fonts/harfbuzz/buildlink3.mk" | | 81 | .include "../../fonts/harfbuzz/buildlink3.mk" |
80 | .include "../../graphics/freetype2/buildlink3.mk" | | 82 | .include "../../graphics/freetype2/buildlink3.mk" |
81 | BUILDLINK_API_DEPENDS.glew+= glew>=1.5.2 | | 83 | BUILDLINK_API_DEPENDS.glew+= glew>=1.5.2 |
82 | .include "../../graphics/glew/buildlink3.mk" | | 84 | .include "../../graphics/glew/buildlink3.mk" |
83 | .include "../../graphics/hicolor-icon-theme/buildlink3.mk" | | 85 | .include "../../graphics/hicolor-icon-theme/buildlink3.mk" |
84 | .include "../../graphics/png/buildlink3.mk" | | 86 | .include "../../graphics/png/buildlink3.mk" |
85 | .include "../../graphics/quesoglc/buildlink3.mk" | | 87 | .include "../../graphics/quesoglc/buildlink3.mk" |
86 | .include "../../graphics/vulkan-headers/buildlink3.mk" | | 88 | .include "../../graphics/vulkan-headers/buildlink3.mk" |
87 | .include "../../multimedia/libtheora/buildlink3.mk" | | 89 | .include "../../multimedia/libtheora/buildlink3.mk" |
88 | .include "../../net/miniupnpc/buildlink3.mk" | | 90 | .include "../../net/miniupnpc/buildlink3.mk" |
89 | BUILDLINK_API_DEPENDS.libsodium+= libsodium>=1.0.13 | | 91 | BUILDLINK_API_DEPENDS.libsodium+= libsodium>=1.0.13 |
90 | .include "../../security/libsodium/buildlink3.mk" | | 92 | .include "../../security/libsodium/buildlink3.mk" |
91 | .include "../../security/openssl/buildlink3.mk" | | 93 | .include "../../security/openssl/buildlink3.mk" |
92 | .include "../../sysutils/desktop-file-utils/desktopdb.mk" | | 94 | .include "../../sysutils/desktop-file-utils/desktopdb.mk" |
93 | .include "../../www/curl/buildlink3.mk" | | 95 | .include "../../www/curl/buildlink3.mk" |
94 | .include "../../x11/qt5-qtbase/buildlink3.mk" | | 96 | .include "../../x11/qt5-qtbase/buildlink3.mk" |
95 | .include "../../x11/qt5-qtscript/buildlink3.mk" | | 97 | .include "../../x11/qt5-qtscript/buildlink3.mk" |
96 | .include "../../mk/bsd.pkg.mk" | | 98 | .include "../../mk/bsd.pkg.mk" |