pkgsrc-Changes archive

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

CVS commit: pkgsrc/games/0ad



Module Name:    pkgsrc
Committed By:   nikita
Date:           Thu May  4 15:20:52 UTC 2023

Added Files:
        pkgsrc/games/0ad: DESCR Makefile Makefile.common PLIST distinfo
            options.mk
        pkgsrc/games/0ad/patches: patch-build_premake_extern__libs5.lua
            patch-build_workspaces_clean-workspaces.sh
            patch-build_workspaces_update-workspaces.sh
            patch-libraries_source_fcollada_include_FCDocument_FCDocument.h
            patch-libraries_source_fcollada_include_FUtils_FUCriticalSection.h
            patch-libraries_source_fcollada_include_FUtils_Platforms.h
            patch-libraries_source_fcollada_src_FCollada_FCDocument_FCDocument.h
            patch-libraries_source_fcollada_src_FCollada_FUtils_FUCriticalSection.h
            patch-libraries_source_fcollada_src_FCollada_FUtils_FUStringBuilder.hpp
            patch-libraries_source_fcollada_src_FCollada_FUtils_Platforms.h
            patch-libraries_source_spidermonkey_build.sh
            patch-source_lib_allocators_page__aligned.cpp
            patch-source_maths_tests_test__Bound.h
            patch-source_network_StunClient.cpp
            patch-source_scriptinterface_ScriptTypes.h
            patch-source_scriptinterface_tests_test__ScriptConversions.h
            patch-source_third__party_mikktspace_weldmesh.cpp
            patch-source_third__party_tinygettext_include_tinygettext_iconv.hpp

Log Message:
0ad: import as games/0ad version 0.0.26.alpha

from wip/0ad, with contributions by micha@, Kamil Rytarowski, nikita@,
and others.

0 A.D. (pronounced "zero-ey-dee") is a free, open-source, historical
Real Time Strategy (RTS) game currently under development by
Wildfire Games, a global group of volunteer game developers. As the
leader of an ancient civilization, you must gather the resources you need
to raise a military force and dominate your enemies.

History is Yours for the Taking

"0 A.D." is a time period that never actually existed: In the usual
calendar, one goes from 1 B.C. to 1 A.D. and skips zero. This reflects
the historical fiction in the game: Who would have won if all the
factions were pitted against each other when each of them was at its
prime?

We intend to portray some of the major civilizations over the millennium
of 500 B.C. to 500 A.D. (Hence the midpoint, zero.) That is an ambitious
prospect, so in the first edition of 0 A.D. we focus on the last five
centuries B.C. Perhaps in future expansion packs, more civilizations will
be added, along with additional gameplay features.
We put a strong emphasis on historical accuracy while developing 0 A.D.
We plan all our units and all our buildings based on reconstructions of
how the units and the buildings might have looked like in the ancient
world. We even name them in the original languages, such as Greek and
Latin. But it's worth remembering that any game should be fun to play,
so, in many cases, we preferred playability over historical accuracy.

0 A.D. is Free of Charge

0 A.D. is completely downloadable at no cost and always will be. No
"freemium" model, no in-game advertising, no catch. This is our iron-clad
guarantee.
Although you might find some people selling copies of 0 A.D. on physical
media, remember, you will always have the option to download 0 A.D.
gratis on the internet, directly from the developers.

0 A.D. is Free as in "Freedom"

0 A.D. is freely licensed software, because we believe everyone should
have access to great games, and that everyone can learn from developing
them. You can redistribute and modify the game as long as you abide by
the GPL. And you can even use parts of the art and sound for your own
projects as long as you abide by CC BY-SA.

0 A.D. is Still Under Development

Work on 0 A.D. began in 2001, first as a mod concept for
Age of Empires II: The Age of Kings. In 2003 development moved to a
standalone game with its own engine, Pyrogenesis. In 2009-2010, the game
was released as free, open-source software and and much of the codebase
was rewritten.
Currently, 0 A.D. is still in alpha phase, which means an early
experimental phase. It is playable, and you can already download and test
the game, but some features are still missing. When will 0 A.D. be
released? It is very hard to predict. Even after we are done implementing
all the features, we will want to conduct extensive beta testing, which
can take a while. Information about release dates will be released at the
appropriate time.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/games/0ad/DESCR pkgsrc/games/0ad/Makefile \
    pkgsrc/games/0ad/Makefile.common pkgsrc/games/0ad/PLIST \
    pkgsrc/games/0ad/distinfo pkgsrc/games/0ad/options.mk
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/games/0ad/patches/patch-build_premake_extern__libs5.lua \
    pkgsrc/games/0ad/patches/patch-build_workspaces_clean-workspaces.sh \
    pkgsrc/games/0ad/patches/patch-build_workspaces_update-workspaces.sh \
    pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_include_FCDocument_FCDocument.h \
    pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_include_FUtils_FUCriticalSection.h \
    pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_include_FUtils_Platforms.h \
    pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FCDocument_FCDocument.h \
    pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_FUCriticalSection.h \
    pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_FUStringBuilder.hpp \
    pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_Platforms.h \
    pkgsrc/games/0ad/patches/patch-libraries_source_spidermonkey_build.sh \
    pkgsrc/games/0ad/patches/patch-source_lib_allocators_page__aligned.cpp \
    pkgsrc/games/0ad/patches/patch-source_maths_tests_test__Bound.h \
    pkgsrc/games/0ad/patches/patch-source_network_StunClient.cpp \
    pkgsrc/games/0ad/patches/patch-source_scriptinterface_ScriptTypes.h \
    pkgsrc/games/0ad/patches/patch-source_scriptinterface_tests_test__ScriptConversions.h \
    pkgsrc/games/0ad/patches/patch-source_third__party_mikktspace_weldmesh.cpp \
    pkgsrc/games/0ad/patches/patch-source_third__party_tinygettext_include_tinygettext_iconv.hpp

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

Added files:

Index: pkgsrc/games/0ad/DESCR
diff -u /dev/null pkgsrc/games/0ad/DESCR:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/DESCR      Thu May  4 15:20:52 2023
@@ -0,0 +1,57 @@
+0 A.D. (pronounced "zero-ey-dee") is a free, open-source, historical
+Real Time Strategy (RTS) game currently under development by
+Wildfire Games, a global group of volunteer game developers. As the
+leader of an ancient civilization, you must gather the resources you need
+to raise a military force and dominate your enemies.
+
+History is Yours for the Taking
+
+"0 A.D." is a time period that never actually existed: In the usual
+calendar, one goes from 1 B.C. to 1 A.D. and skips zero. This reflects
+the historical fiction in the game: Who would have won if all the
+factions were pitted against each other when each of them was at its
+prime?
+
+We intend to portray some of the major civilizations over the millennium
+of 500 B.C. to 500 A.D. (Hence the midpoint, zero.) That is an ambitious
+prospect, so in the first edition of 0 A.D. we focus on the last five
+centuries B.C. Perhaps in future expansion packs, more civilizations will
+be added, along with additional gameplay features.
+We put a strong emphasis on historical accuracy while developing 0 A.D.
+We plan all our units and all our buildings based on reconstructions of
+how the units and the buildings might have looked like in the ancient
+world. We even name them in the original languages, such as Greek and
+Latin. But it's worth remembering that any game should be fun to play,
+so, in many cases, we preferred playability over historical accuracy.
+
+0 A.D. is Free of Charge
+
+0 A.D. is completely downloadable at no cost and always will be. No
+"freemium" model, no in-game advertising, no catch. This is our iron-clad
+guarantee.
+Although you might find some people selling copies of 0 A.D. on physical
+media, remember, you will always have the option to download 0 A.D.
+gratis on the internet, directly from the developers.
+
+0 A.D. is Free as in "Freedom"
+
+0 A.D. is freely licensed software, because we believe everyone should
+have access to great games, and that everyone can learn from developing
+them. You can redistribute and modify the game as long as you abide by
+the GPL. And you can even use parts of the art and sound for your own
+projects as long as you abide by CC BY-SA.
+
+0 A.D. is Still Under Development
+
+Work on 0 A.D. began in 2001, first as a mod concept for
+Age of Empires II: The Age of Kings. In 2003 development moved to a
+standalone game with its own engine, Pyrogenesis. In 2009-2010, the game
+was released as free, open-source software and and much of the codebase
+was rewritten.
+Currently, 0 A.D. is still in alpha phase, which means an early
+experimental phase. It is playable, and you can already download and test
+the game, but some features are still missing. When will 0 A.D. be
+released? It is very hard to predict. Even after we are done implementing
+all the features, we will want to conduct extensive beta testing, which
+can take a while. Information about release dates will be released at the
+appropriate time.
Index: pkgsrc/games/0ad/Makefile
diff -u /dev/null pkgsrc/games/0ad/Makefile:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/Makefile   Thu May  4 15:20:52 2023
@@ -0,0 +1,150 @@
+# $NetBSD: Makefile,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+.include "Makefile.common"
+
+DISTNAME=      ${DISTVERSION}-build
+PKGNAME=       ${DISTNAME:S/-unix-build//:S/-alpha/.alpha/}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+COMMENT=       Historical real-time strategy game
+LICENSE=       gnu-gpl-v2 AND gnu-lgpl-v2.1
+
+WRKSRC=                ${WRKDIR}/${DISTNAME:S/-unix-build//}
+# Requires C++17 and add "--std" option itself
+GCC_REQD+=     7
+USE_LANGUAGES= c c++
+
+USE_TOOLS+=    cmake bash gmake pax perl pkg-config
+
+PYTHON_VERSIONS_INCOMPATIBLE=  27
+
+DEPENDS+=              0ad-data-${PKGVERSION}:../../wip/0ad-data
+BUILD_DEPENDS+=                premake5-[0-9]*:../../devel/premake5
+TOOL_DEPENDS+=         python${PYTHON_VERSION_DEFAULT}-[0-9]*:../../lang/python${PYTHON_VERSION_DEFAULT}
+TOOL_DEPENDS+=         patchelf-[0-9]*:../../devel/patchelf
+
+SUBST_CLASSES+=                        sysincludedir
+SUBST_MESSAGE.sysincludedir=   Fixing "/usr/local" path assumption
+SUBST_STAGE.sysincludedir=     pre-configure
+SUBST_FILES.sysincludedir=     build/premake/extern_libs5.lua
+SUBST_FILES.sysincludedir+=    build/premake/premake5.lua
+SUBST_SED.sysincludedir+=      -e "s,/usr/local/,${PREFIX}/,g"
+
+# thanks to Guix:
+# 0ad only builds fine with a specific version of mozjs
+# (version 78.6 for 0ad-0.0.25).
+# Here we change the error in case of version mismatch to a warning,
+# and add some minor compatibility fixes.
+SUBST_CLASSES+=                mozjs
+SUBST_MESSAGE.mozjs=   Fixing mozjs version error
+SUBST_STAGE.mozjs=     pre-configure
+SUBST_FILES.mozjs=     source/scriptinterface/ScriptTypes.h
+SUBST_SED.mozjs+=      -e "s,\#error Your compiler is trying to use,\#warning Your compiler is trying to use,g"
+
+SUBST_CLASSES+=                mozjs2
+SUBST_MESSAGE.mozjs2=  Fixing mozjs version error
+SUBST_STAGE.mozjs2=    pre-configure
+SUBST_FILES.mozjs2+=   source/scriptinterface/ScriptContext.cpp
+SUBST_SED.mozjs2+=     -e "s|JS::PrepareZoneForGC(|JS::PrepareZoneForGC(m_cx, |g"
+
+DATADIR=               ${PREFIX}/share/${PKGBASE}
+
+INSTALLATION_DIRS+=    bin
+INSTALLATION_DIRS+=    lib/${PKGBASE}
+INSTALLATION_DIRS+=    ${DATADIR}
+INSTALLATION_DIRS+=    ${DATADIR}/mods/public
+INSTALLATION_DIRS+=    ${DATADIR}/mods/mod
+INSTALLATION_DIRS+=    ${DATADIR}/config
+INSTALLATION_DIRS+=    share/applications
+INSTALLATION_DIRS+=    share/pixmaps
+
+.if ${MACHINE_ARCH} == "i386"
+CFLAGS+=       -msse
+.endif
+
+.include "options.mk"
+
+# nvtt, notes from gentoo:
+# Build bundled NVTT
+# nvtt is abandoned upstream and 0ad has forked it and added fixes.
+# Use their copy. bug #768930
+# --with-system-nvtt
+
+do-configure:
+       ${RUN} cd ${WRKSRC}/build/workspaces && ./clean-workspaces.sh
+       ${RUN} cd ${WRKSRC}/build/workspaces && ./update-workspaces.sh \
+               --bindir=${PREFIX}/bin \
+               --datadir=${DATADIR} \
+               --libdir=${PREFIX}/lib/${PKGBASE} \
+               --with-system-premake5 \
+               --with-system-mozjs \
+               --without-pch \
+               ${CONFIGURE_EDITOR} ${CONFIGURE_TESTS}
+
+do-build:
+       ${RUN} cd ${WRKSRC} && \
+               ${GMAKE} config=release verbose=1 -j ${_MAKE_JOBS_N:U1} \
+               -C build/workspaces/gcc
+
+do-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/binaries/system/pyrogenesis ${DESTDIR}${PREFIX}/bin
+       ${INSTALL_SCRIPT} ${WRKSRC}/build/resources/0ad.sh ${DESTDIR}${PREFIX}/bin/0ad
+.if !empty(PKG_OPTIONS:Meditor)
+       ${INSTALL_PROGRAM} ${WRKSRC}/binaries/system/ActorEditor ${DESTDIR}${PREFIX}/bin
+       # why? you have the rpath. don't produce nonsense?
+       ${PREFIX}/bin/patchelf --force-rpath --set-rpath \
+               ${PREFIX}/lib/${PKGBASE}:${PREFIX}/lib \
+               ${DESTDIR}${PREFIX}/bin/ActorEditor
+       ${PREFIX}/bin/patchelf --replace-needed \
+               "../../../binaries/system/libAtlasUI.so" libAtlasUI.so \
+               ${DESTDIR}${PREFIX}/bin/ActorEditor
+       cd ${WRKSRC}/binaries/system && ${INSTALL_LIB} \
+               libAtlasUI.so libAtlasObject.a ${DESTDIR}${PREFIX}/lib/${PKGBASE}
+.endif
+       # TODO: all of these should be .so.
+       cd ${WRKSRC}/binaries/system && ${INSTALL_LIB} libatlas.a \
+               libengine.a libgladwrapper.a libglooxwrapper.a libgraphics.a \
+               libgui.a liblobby.a liblowlevel.a libmocks_real.a libmocks_test.a \
+               libmongoose.a libnetwork.a librlinterface.a libscriptinterface.a \
+               libsimulation2.a libtinygettext.a libCollada.so \
+               libnvcore.so libnvimage.so libnvmath.so libnvtt.so \
+               ${DESTDIR}${PREFIX}/lib/${PKGBASE}
+       # hack. figure out where to set the rpath in the cmake build of the bundled nvtt.
+.for f in libnvcore libnvimage libnvmath libnvtt
+       ${PREFIX}/bin/patchelf \
+               --force-rpath \
+               --set-rpath ${PREFIX}/lib/${PKGBASE}:${PREFIX}/lib \
+               ${DESTDIR}${PREFIX}/lib/${PKGBASE}/${f}.so
+.endfor
+       ${INSTALL_DATA} ${WRKSRC}/build/resources/0ad.desktop ${DESTDIR}${PREFIX}/share/applications
+       ${INSTALL_DATA} ${WRKSRC}/build/resources/0ad.png ${DESTDIR}${PREFIX}/share/pixmaps
+       cd ${WRKSRC}/binaries/data && ${PAX} -rw l10n ${DESTDIR}${DATADIR}
+.if !empty(PKG_OPTIONS:Mtests)
+       cd ${WRKSRC}/binaries/data && ${PAX} -rw tests ${DESTDIR}${DATADIR}
+.endif
+
+.include "../../audio/libvorbis/buildlink3.mk"
+.include "../../audio/openal-soft/buildlink3.mk"
+.include "../../chat/gloox/buildlink3.mk"
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../devel/boost-headers/buildlink3.mk"
+.include "../../devel/boost-libs/buildlink3.mk"
+.include "../../devel/nspr/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../graphics/MesaLib/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../graphics/openexr/buildlink3.mk"
+.include "../../graphics/tiff/buildlink3.mk"
+.include "../../lang/mozjs78/buildlink3.mk"
+.include "../../lang/python/tool.mk"
+.include "../../multimedia/libogg/buildlink3.mk"
+.include "../../net/enet/buildlink3.mk"
+.include "../../net/miniupnpc/buildlink3.mk"
+.include "../../security/libsodium/buildlink3.mk"
+.include "../../textproc/fmtlib/buildlink3.mk"
+.include "../../textproc/icu/buildlink3.mk"
+.include "../../textproc/libxml2/buildlink3.mk"
+.include "../../www/curl/buildlink3.mk"
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../mk/jpeg.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/games/0ad/Makefile.common
diff -u /dev/null pkgsrc/games/0ad/Makefile.common:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/Makefile.common    Thu May  4 15:20:52 2023
@@ -0,0 +1,9 @@
+# $NetBSD: Makefile.common,v 1.1 2023/05/04 15:20:52 nikita Exp $
+# used by wip/0ad-data/Makefile
+
+DISTVERSION=   0ad-0.0.26-alpha-unix
+CATEGORIES=    games
+MASTER_SITES=  http://releases.wildfiregames.com/
+EXTRACT_SUFX=  .tar.xz
+
+HOMEPAGE=      https://play0ad.com/
Index: pkgsrc/games/0ad/PLIST
diff -u /dev/null pkgsrc/games/0ad/PLIST:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/PLIST      Thu May  4 15:20:52 2023
@@ -0,0 +1,61 @@
+@comment $NetBSD: PLIST,v 1.1 2023/05/04 15:20:52 nikita Exp $
+bin/0ad
+${PLIST.editor}bin/ActorEditor
+bin/pyrogenesis
+${PLIST.editor}lib/0ad/libAtlasObject.a
+${PLIST.editor}lib/0ad/libAtlasUI.so
+lib/0ad/libCollada.so
+lib/0ad/libatlas.a
+lib/0ad/libengine.a
+lib/0ad/libgladwrapper.a
+lib/0ad/libglooxwrapper.a
+lib/0ad/libgraphics.a
+lib/0ad/libgui.a
+lib/0ad/liblobby.a
+lib/0ad/liblowlevel.a
+lib/0ad/libmocks_real.a
+lib/0ad/libmocks_test.a
+lib/0ad/libmongoose.a
+lib/0ad/libnetwork.a
+lib/0ad/libnvcore.so
+lib/0ad/libnvimage.so
+lib/0ad/libnvmath.so
+lib/0ad/libnvtt.so
+lib/0ad/librlinterface.a
+lib/0ad/libscriptinterface.a
+lib/0ad/libsimulation2.a
+lib/0ad/libtinygettext.a
+share/0ad/l10n/.tx/config
+share/0ad/l10n/ast.engine.po
+share/0ad/l10n/ca.engine.po
+share/0ad/l10n/cs.engine.po
+share/0ad/l10n/de.engine.po
+share/0ad/l10n/el.engine.po
+share/0ad/l10n/en_GB.engine.po
+share/0ad/l10n/engine.pot
+share/0ad/l10n/es.engine.po
+share/0ad/l10n/eu.engine.po
+share/0ad/l10n/fi.engine.po
+share/0ad/l10n/fr.engine.po
+share/0ad/l10n/gd.engine.po
+share/0ad/l10n/hu.engine.po
+share/0ad/l10n/id.engine.po
+share/0ad/l10n/it.engine.po
+share/0ad/l10n/messages.json
+share/0ad/l10n/nl.engine.po
+share/0ad/l10n/pl.engine.po
+share/0ad/l10n/pt_BR.engine.po
+share/0ad/l10n/ru.engine.po
+share/0ad/l10n/sk.engine.po
+share/0ad/l10n/sv.engine.po
+share/0ad/l10n/tr.engine.po
+share/0ad/l10n/uk.engine.po
+${PLIST.tests}share/0ad/tests/collada/bogus_material_target.dae
+${PLIST.tests}share/0ad/tests/collada/skeletons.xml
+${PLIST.tests}share/0ad/tests/collada/sphere.dae
+${PLIST.tests}share/0ad/tests/collada/sphere.pmd
+${PLIST.tests}share/0ad/tests/test_setup.js
+share/applications/0ad.desktop
+share/pixmaps/0ad.png
+@pkgdir share/0ad/mods/public
+@pkgdir share/0ad/mods/mod
Index: pkgsrc/games/0ad/distinfo
diff -u /dev/null pkgsrc/games/0ad/distinfo:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/distinfo   Thu May  4 15:20:52 2023
@@ -0,0 +1,23 @@
+$NetBSD: distinfo,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+BLAKE2s (0ad-0.0.26-alpha-unix-build.tar.xz) = c731d26db0269bc9de34bf75705eb2031a105b676217a1da916c79c2d2237015
+SHA512 (0ad-0.0.26-alpha-unix-build.tar.xz) = aaf647d5d8454c244015d2a198beeaaebc571a5bc96446f3acff8dbd05f9843029c500bf4162651a5e1fcdb42bd5fb5b4f5c512c78372479fbd8565dd093f272
+Size (0ad-0.0.26-alpha-unix-build.tar.xz) = 75599800 bytes
+SHA1 (patch-build_premake_extern__libs5.lua) = e3d804571682c04cada5c39c11313874039ead72
+SHA1 (patch-build_workspaces_clean-workspaces.sh) = 6c48565a0463d6f9e3ab914e2923811b121935cc
+SHA1 (patch-build_workspaces_update-workspaces.sh) = 4a6ec008da64a98230173f3a242cea2503321631
+SHA1 (patch-libraries_source_fcollada_include_FCDocument_FCDocument.h) = 96aef76c02ae4a3f47fdb7c31bf7d11490ba5d09
+SHA1 (patch-libraries_source_fcollada_include_FUtils_FUCriticalSection.h) = 956ba6c19b0f3ea2a35f686bf1825efc07169b89
+SHA1 (patch-libraries_source_fcollada_include_FUtils_Platforms.h) = 32308e3fe673903b4b1a17c364840818136411b9
+SHA1 (patch-libraries_source_fcollada_src_FCollada_FCDocument_FCDocument.h) = ae1edd27218707be0ea77456569fcd262d9230d2
+SHA1 (patch-libraries_source_fcollada_src_FCollada_FUtils_FUCriticalSection.h) = fd181f746bba33ceb917a5de4794296c229213fc
+SHA1 (patch-libraries_source_fcollada_src_FCollada_FUtils_FUStringBuilder.hpp) = f71f1f361601b2ce561c00a811d33bce6735a06d
+SHA1 (patch-libraries_source_fcollada_src_FCollada_FUtils_Platforms.h) = 6887cca8e6ff1765a6b666bd595f8bcb41c2a90f
+SHA1 (patch-libraries_source_spidermonkey_build.sh) = 34225c82659cc236bff076301dd52adca9888f92
+SHA1 (patch-source_lib_allocators_page__aligned.cpp) = c25054afd543a1a90530964a63b2b692b1687765
+SHA1 (patch-source_maths_tests_test__Bound.h) = 8d6b79199d86dabdddf3dca68eed2d252ef9a649
+SHA1 (patch-source_network_StunClient.cpp) = 6267d44c3d0345d3e47c19746f105657ba984876
+SHA1 (patch-source_scriptinterface_ScriptTypes.h) = f2351c637ba7ed7a36b4399b6e89a0d8281c9ad4
+SHA1 (patch-source_scriptinterface_tests_test__ScriptConversions.h) = d415a86d59f50daa5acd594265f026e88b5a37b9
+SHA1 (patch-source_third__party_mikktspace_weldmesh.cpp) = 35df7dd5d5d2aa784ef03599a47cc69982ebe332
+SHA1 (patch-source_third__party_tinygettext_include_tinygettext_iconv.hpp) = 9778a9729202a95a5b5ec3f66419d31aa9b423b9
Index: pkgsrc/games/0ad/options.mk
diff -u /dev/null pkgsrc/games/0ad/options.mk:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/options.mk Thu May  4 15:20:52 2023
@@ -0,0 +1,24 @@
+# $NetBSD: options.mk,v 1.1 2023/05/04 15:20:52 nikita Exp $
+PKG_OPTIONS_VAR=       PKG_OPTIONS.0ad
+PKG_SUPPORTED_OPTIONS+=        tests editor
+
+PLIST_VARS+=           editor tests
+
+.include "../../mk/bsd.options.mk"
+
+.if ${PKG_OPTIONS:Mtests}
+CONFIGURE_TESTS?=
+PLIST.tests=                   yes
+.else
+CONFIGURE_TESTS?=              --without-tests
+.endif
+
+# TODO: not entirely working binary (loads, complains about files not found),
+# something is missing.
+.if ${PKG_OPTIONS:Meditor}
+CONFIGURE_EDITOR?=
+.include "../../x11/wxGTK32/buildlink3.mk"
+PLIST.editor=                  yes
+.else
+CONFIGURE_EDITOR?=             --disable-atlas
+.endif

Index: pkgsrc/games/0ad/patches/patch-build_premake_extern__libs5.lua
diff -u /dev/null pkgsrc/games/0ad/patches/patch-build_premake_extern__libs5.lua:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/patches/patch-build_premake_extern__libs5.lua      Thu May  4 15:20:52 2023
@@ -0,0 +1,13 @@
+$NetBSD: patch-build_premake_extern__libs5.lua,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+--- build/premake/extern_libs5.lua.orig        2021-07-27 21:57:08.000000000 +0000
++++ build/premake/extern_libs5.lua
+@@ -350,7 +350,7 @@ extern_lib_defs = {
+                       elseif os.istarget("macosx") then
+                               add_default_include_paths("iconv")
+                               defines { "LIBICONV_STATIC" }
+-                      elseif os.getversion().description == "FreeBSD" then
++                      elseif os.getversion().description == "NetBSD" then
+                               -- On FreeBSD you need this flag to tell it to use the BSD libc iconv
+                               defines { "LIBICONV_PLUG" }
+                       end
Index: pkgsrc/games/0ad/patches/patch-build_workspaces_clean-workspaces.sh
diff -u /dev/null pkgsrc/games/0ad/patches/patch-build_workspaces_clean-workspaces.sh:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/patches/patch-build_workspaces_clean-workspaces.sh Thu May  4 15:20:52 2023
@@ -0,0 +1,23 @@
+$NetBSD: patch-build_workspaces_clean-workspaces.sh,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+
+--- -build/workspaces/clean-workspaces.sh.orig 2022-08-21 14:46:47.000000000 +0200
++++ build/workspaces/clean-workspaces.sh       2023-05-03 20:01:25.557929713 +0200
+@@ -3,7 +3,7 @@
+ # Some of our makefiles depend on GNU make, so we set some sane defaults if MAKE
+ # is not set.
+ case "`uname -s`" in
+-  "FreeBSD" | "OpenBSD" )
++  "FreeBSD" | "NetBSD" | "OpenBSD" )
+     MAKE=${MAKE:="gmake"}
+     ;;
+   * )
+@@ -64,7 +64,7 @@
+ echo "Removing generated stub and test files..."
+ 
+ find ../../source -name "stub_*.cpp" -type f -exec rm {} \;
+-find ../../source -name "test_*.cpp" -type f -not -name "test_setup.cpp" -exec rm {} \;
++find ../../source -name "test_*.cpp" -type f ! -name "test_setup.cpp" -exec rm {} \;
+ 
+ echo "Cleaning build output..."
+ 
Index: pkgsrc/games/0ad/patches/patch-build_workspaces_update-workspaces.sh
diff -u /dev/null pkgsrc/games/0ad/patches/patch-build_workspaces_update-workspaces.sh:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/patches/patch-build_workspaces_update-workspaces.sh        Thu May  4 15:20:52 2023
@@ -0,0 +1,40 @@
+$NetBSD: patch-build_workspaces_update-workspaces.sh,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+--- build/workspaces/update-workspaces.sh.orig 2021-07-27 21:57:40.000000000 +0000
++++ build/workspaces/update-workspaces.sh
+@@ -1,10 +1,5 @@
+ #!/bin/sh
+ 
+-if [ "$(id -u)" = "0" ]; then
+-   echo "Running as root will mess up file permissions. Aborting ..." 1>&2
+-   exit 1
+-fi
+-
+ die()
+ {
+   echo ERROR: $*
+@@ -26,7 +21,7 @@ JOBS=${JOBS:="-j2"}
+ # Some of our makefiles depend on GNU make, so we set some sane defaults if MAKE
+ # is not set.
+ case "`uname -s`" in
+-  "FreeBSD" | "OpenBSD" )
++  "FreeBSD" | "NetBSD" | "OpenBSD" )
+     MAKE=${MAKE:="gmake"}
+     ;;
+   * )
+@@ -120,11 +115,14 @@ if [ "$with_system_premake5" = "false" ]
+   ${MAKE} -C $PREMAKE_BUILD_DIR ${JOBS} || die "Premake build failed"
+ 
+   premake_command="premake5/bin/release/premake5"
++  cd ..
++else
++  cd ../premake
+ fi
++# Now in build/premake subdirectory
+ 
+ echo
+ 
+-cd ..
+ 
+ # If we're in bash then make HOSTTYPE available to Premake, for primitive arch-detection
+ export HOSTTYPE="$HOSTTYPE"
Index: pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_include_FCDocument_FCDocument.h
diff -u /dev/null pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_include_FCDocument_FCDocument.h:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_include_FCDocument_FCDocument.h    Thu May  4 15:20:52 2023
@@ -0,0 +1,13 @@
+$NetBSD: patch-libraries_source_fcollada_include_FCDocument_FCDocument.h,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+--- libraries/source/fcollada/include/FCDocument/FCDocument.h.orig     2012-06-04 21:33:15.000000000 +0000
++++ libraries/source/fcollada/include/FCDocument/FCDocument.h
+@@ -30,7 +30,7 @@
+ #if defined(WIN32)
+ template <class T> class FCOLLADA_EXPORT FCDLibrary; /**< Trick Doxygen. */
+ template <class T> class FCOLLADA_EXPORT FUUniqueStringMapT; /**< Trick Doxygen. */
+-#elif defined(LINUX) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
++#elif defined(LINUX) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ template <class T> class FCDLibrary; /**< Trick Doxygen. */
+ template <class T> class FUUniqueStringMapT; /**< Trick Doxygen. */
+ #endif // LINUX
Index: pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_include_FUtils_FUCriticalSection.h
diff -u /dev/null pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_include_FUtils_FUCriticalSection.h:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_include_FUtils_FUCriticalSection.h Thu May  4 15:20:52 2023
@@ -0,0 +1,13 @@
+$NetBSD: patch-libraries_source_fcollada_include_FUtils_FUCriticalSection.h,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+--- libraries/source/fcollada/include/FUtils/FUCriticalSection.h.orig  2021-08-25 14:44:15.000000000 +0000
++++ libraries/source/fcollada/include/FUtils/FUCriticalSection.h
+@@ -33,7 +33,7 @@ private:
+ #elif defined(__APPLE__)
+       //Do something here.
+       MPCriticalRegionID criticalSection;
+-#elif defined(LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
++#elif defined(LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ #else
+ #warning "FUCriticalSection: Critical section not implemented for other platforms."
+ #endif
Index: pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_include_FUtils_Platforms.h
diff -u /dev/null pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_include_FUtils_Platforms.h:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_include_FUtils_Platforms.h Thu May  4 15:20:52 2023
@@ -0,0 +1,43 @@
+$NetBSD: patch-libraries_source_fcollada_include_FUtils_Platforms.h,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+--- libraries/source/fcollada/include/FUtils/Platforms.h.orig  2012-06-04 21:33:15.000000000 +0000
++++ libraries/source/fcollada/include/FUtils/Platforms.h
+@@ -74,7 +74,7 @@
+ #include <wchar.h>
+ #include <stdint.h>
+ 
+-#elif defined(LINUX) || defined(__PPU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
++#elif defined(LINUX) || defined(__PPU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ #include <ctype.h>
+ #include <wctype.h>
+ #include <unistd.h>
+@@ -82,9 +82,9 @@
+ #include <wchar.h>
+ #include <stdarg.h>
+ 
+-#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
+ #include <malloc.h>
+-#endif // !__FreeBSD__ && !__OpenBSD__
++#endif // !__FreeBSD__ && !__NetBSD__ && !__OpenBSD__
+ 
+ #include <stdlib.h>
+ #include <stdio.h>
+@@ -125,7 +125,7 @@ typedef uint8_t byte;
+ #endif // PLATFORMS
+ 
+ // Important functions that some OSes have missing!
+-#if defined(__APPLE__) || defined(LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
++#if defined(__APPLE__) || defined(LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ inline char* strlower(char* str) { char* it = str; while (*it != 0) { *it = tolower(*it); ++it; } return str; }
+ inline wchar_t* wcslwr(wchar_t* str) { wchar_t* it = str; while (*it != 0) { *it = towlower(*it); ++it; } return str; }
+ inline int wcsicmp(const wchar_t* s1, const wchar_t* s2) { wchar_t c1 = *s1, c2 = *s2; while (c1 != 0 && c2 != 0) { if (c1 >= 'a' && c1 <= 'z') c1 -= 'a' + 'A'; if (c2 >= 'a' && c2 <= 'z') c2 -= 
'a' + 'A'; if (c2 < c1) return -1; else if (c2 > c1) return 1; c1 = *(++s1); c2 = *(++s2); } return 0; }
+@@ -139,7 +139,7 @@ inline int wcsicmp(const wchar_t* s1, co
+ #elif defined(__PPU__)
+ #define glClearDepth glClearDepthf
+ 
+-#endif // __APPLE__ || LINUX || _FreeBSD__ || __FreeBSD_kernel__ || __OpenBSD__
++#endif // __APPLE__ || LINUX || _FreeBSD__ || __FreeBSD_kernel__ || __NetBSD__ || __OpenBSD__
+ 
+ // Cross-platform needed functions
+ #ifdef WIN32
Index: pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FCDocument_FCDocument.h
diff -u /dev/null pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FCDocument_FCDocument.h:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FCDocument_FCDocument.h       Thu May  4 15:20:52 2023
@@ -0,0 +1,13 @@
+$NetBSD: patch-libraries_source_fcollada_src_FCollada_FCDocument_FCDocument.h,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+--- libraries/source/fcollada/src/FCollada/FCDocument/FCDocument.h.orig
++++ libraries/source/fcollada/src/FCollada/FCDocument/FCDocument.h
+@@ -30,7 +30,7 @@
+ #if defined(WIN32)
+ template <class T> class FCOLLADA_EXPORT FCDLibrary; /**< Trick Doxygen. */
+ template <class T> class FCOLLADA_EXPORT FUUniqueStringMapT; /**< Trick Doxygen. */
+-#elif defined(LINUX) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
++#elif defined(LINUX) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ template <class T> class FCDLibrary; /**< Trick Doxygen. */
+ template <class T> class FUUniqueStringMapT; /**< Trick Doxygen. */
+ #endif // LINUX
Index: pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_FUCriticalSection.h
diff -u /dev/null pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_FUCriticalSection.h:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_FUCriticalSection.h    Thu May  4 15:20:52 2023
@@ -0,0 +1,13 @@
+$NetBSD: patch-libraries_source_fcollada_src_FCollada_FUtils_FUCriticalSection.h,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+--- libraries/source/fcollada/src/FCollada/FUtils/FUCriticalSection.h.orig
++++ libraries/source/fcollada/src/FCollada/FUtils/FUCriticalSection.h
+@@ -33,7 +33,7 @@ private:
+ #elif defined(__APPLE__)
+       //Do something here.
+       MPCriticalRegionID criticalSection;
+-#elif defined(LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
++#elif defined(LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ #else
+ #warning "FUCriticalSection: Critical section not implemented for other platforms."
+ #endif
Index: pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_FUStringBuilder.hpp
diff -u /dev/null pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_FUStringBuilder.hpp:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_FUStringBuilder.hpp    Thu May  4 15:20:52 2023
@@ -0,0 +1,85 @@
+$NetBSD: patch-libraries_source_fcollada_src_FCollada_FUtils_FUStringBuilder.hpp,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+--- libraries/source/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp.orig     2021-08-25 14:44:24.000000000 +0000
++++ libraries/source/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp
+@@ -174,46 +174,45 @@ void FUStringBuilderT<Char>::append(cons
+ template <class Char>
+ void FUStringBuilderT<Char>::append(float f)
+ {
+-#ifdef WIN32
+-      // use <float.h> _isnan method to detect the 1.#IND00 NaN.
+-      if (f != std::numeric_limits<float>::infinity() && f != -std::numeric_limits<float>::infinity() && f != std::numeric_limits<float>::quiet_NaN() && f != 
std::numeric_limits<float>::signaling_NaN() && !_isnan((double)f))
+-#else
+-      if (f != std::numeric_limits<float>::infinity() && f != -std::numeric_limits<float>::infinity() && f != std::numeric_limits<float>::quiet_NaN() && f != 
std::numeric_limits<float>::signaling_NaN())
+-#endif
+-      {
+-              if (IsEquivalent(f, 0.0f, std::numeric_limits<float>::epsilon())) append((Char)'0');
+-              else
+-                      for (Char c : ToXmlDouble(f))
+-                              append(c);
+-      }
+-      else if (f == std::numeric_limits<float>::infinity())
+-      { append((Char)'I'); append((Char)'N'); append((Char)'F'); }
+-      else if (f == -std::numeric_limits<float>::infinity())
+-      { append((Char)'-'); append((Char)'I'); append((Char)'N'); append((Char)'F'); }
+-      else
+-      { append((Char)'N'); append((Char)'a'); append((Char)'N'); }
++      append((double)f);
+ }
+ template <class Char>
+ void FUStringBuilderT<Char>::append(double f)
+ {
+-#ifdef WIN32
+-      // use <float.h> _isnan method to detect the .#IND00 NaN.
+-      if (f != std::numeric_limits<float>::infinity() && f != -std::numeric_limits<float>::infinity() && f != std::numeric_limits<float>::quiet_NaN() && f != 
std::numeric_limits<float>::signaling_NaN() && !_isnan(f))
+-#else
+-      if (f != std::numeric_limits<float>::infinity() && f != -std::numeric_limits<float>::infinity() && f != std::numeric_limits<float>::quiet_NaN() && f != 
std::numeric_limits<float>::signaling_NaN())
+-#endif
+-      {
+-              if (IsEquivalent(f, 0.0, std::numeric_limits<double>::epsilon())) append((Char)'0');
+-              else
+-                      for (Char c : ToXmlDouble(f))
+-                              append(c);
+-      }
+-      else if (f == std::numeric_limits<double>::infinity())
+-      { append((Char)'I'); append((Char)'N'); append((Char)'F'); }
+-      else if (f == -std::numeric_limits<double>::infinity())
+-      { append((Char)'-'); append((Char)'I'); append((Char)'N'); append((Char)'F'); }
++      if (f == -std::numeric_limits<double>::infinity()) {
++              append("-INF");
++              return;
++      } else if (f == std::numeric_limits<double>::infinity()) {
++              append("INF");
++              return;
++      } else if (f != f) {
++              append("NaN");
++              return;
++      } else if (-std::numeric_limits<double>::epsilon() < f && f < std::numeric_limits<double>::epsilon()) {
++              append("0.0E0");
++              return;
++      }
++      if (f < 0.0) {
++              f = -f;
++              append('-');
++      }
++
++      int e = 0;
++      if (f < 1.0)
++              for (; f < 1.0; f *= 10.0)
++                      e--;
+       else
+-      { append((Char)'N'); append((Char)'a'); append((Char)'N'); }
++              for (; f >= 10.0; f /= 10.0)
++                      e++;
++
++      char tmp[10];
++      sprintf(tmp, "%.6g", f);
++      append(tmp);
++      if (tmp[1] == 0) // only one digit, add missing part according canonical representation
++              append(".0");
++
++      sprintf(tmp, "E%d", e);
++      append(tmp);
+ }
+ template <class Char>
+ void FUStringBuilderT<Char>::append(const FMVector2& v)
Index: pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_Platforms.h
diff -u /dev/null pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_Platforms.h:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_Platforms.h    Thu May  4 15:20:52 2023
@@ -0,0 +1,34 @@
+$NetBSD: patch-libraries_source_fcollada_src_FCollada_FUtils_Platforms.h,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+--- libraries/source/fcollada/src/FCollada/FUtils/Platforms.h.orig     2012-06-04 21:33:15.000000000 +0000
++++ libraries/source/fcollada/src/FCollada/FUtils/Platforms.h
+@@ -74,7 +74,7 @@
+ #include <wchar.h>
+ #include <stdint.h>
+ 
+-#elif defined(LINUX) || defined(__PPU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
++#elif defined(LINUX) || defined(__PPU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ #include <ctype.h>
+ #include <wctype.h>
+ #include <unistd.h>
+@@ -82,9 +82,9 @@
+ #include <wchar.h>
+ #include <stdarg.h>
+ 
+-#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
+ #include <malloc.h>
+-#endif // !__FreeBSD__ && !__OpenBSD__
++#endif // !__FreeBSD__ && !__NetBSD__ && !__OpenBSD__
+ 
+ #include <stdlib.h>
+ #include <stdio.h>
+@@ -125,7 +125,7 @@
+ #endif // PLATFORMS
+ 
+ // Important functions that some OSes have missing!
+-#if defined(__APPLE__) || defined(LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
++#if defined(__APPLE__) || defined(LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ inline char* strlower(char* str) { char* it = str; while (*it != 0) { *it = tolower(*it); ++it; } return str; }
+ inline wchar_t* wcslwr(wchar_t* str) { wchar_t* it = str; while (*it != 0) { *it = towlower(*it); ++it; } return str; }
+ inline int wcsicmp(const wchar_t* s1, const wchar_t* s2) { wchar_t c1 = *s1, c2 = *s2; while (c1 != 0 && c2 != 0) { if (c1 >= 'a' && c1 <= 'z') c1 -= 'a' + 'A'; if (c2 >= 'a' && c2 <= 'z') c2 -= 
'a' + 'A'; if (c2 < c1) return -1; else if (c2 > c1) return 1; c1 = *(++s1); c2 = *(++s2); } return 0; }
Index: pkgsrc/games/0ad/patches/patch-libraries_source_spidermonkey_build.sh
diff -u /dev/null pkgsrc/games/0ad/patches/patch-libraries_source_spidermonkey_build.sh:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/patches/patch-libraries_source_spidermonkey_build.sh       Thu May  4 15:20:52 2023
@@ -0,0 +1,20 @@
+$NetBSD: patch-libraries_source_spidermonkey_build.sh,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+
+--- libraries/source/spidermonkey/build.sh.orig        2023-05-03 20:04:57.672955809 +0200
++++ libraries/source/spidermonkey/build.sh     2023-05-03 20:06:29.174827445 +0200
+@@ -51,12 +51,12 @@
+ then
+   ARCH=${ARCH:=""}
+   if [ -z "${ARCH}" ]; then
+-    if [ "`uname -m`" == "arm64" ]; then
++    if [ "`uname -m`" = "arm64" ]; then
+       ARCH="aarch64"
+     else
+       ARCH="x86_64"
+     fi
+-  elif [ $ARCH == "arm64"  ]; then
++  elif [ $ARCH = "arm64"  ]; then
+     # SM78 doesn't know about arm64 yet, and that's passed by build-osx-libs.sh, so fix it explicitly.
+     ARCH="aarch64"
+   fi
Index: pkgsrc/games/0ad/patches/patch-source_lib_allocators_page__aligned.cpp
diff -u /dev/null pkgsrc/games/0ad/patches/patch-source_lib_allocators_page__aligned.cpp:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/patches/patch-source_lib_allocators_page__aligned.cpp      Thu May  4 15:20:52 2023
@@ -0,0 +1,23 @@
+$NetBSD: patch-source_lib_allocators_page__aligned.cpp,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+
+--- source/lib/allocators/page_aligned.cpp.orig        2017-07-28 19:57:26 UTC
++++ source/lib/allocators/page_aligned.cpp
+@@ -49,7 +49,7 @@ static const int mmap_flags = MAP_PRIVATE|MAP_ANONYMOU
+ Status mem_Reserve(size_t size, u8** pp)
+ {
+       errno = 0;
+-      void* ret = mmap(0, size, PROT_NONE, mmap_flags|MAP_NORESERVE, -1, 0);
++      void* ret = mmap(0, size, PROT_NONE, mmap_flags, -1, 0);
+       *pp = (u8*)ret;
+       return StatusFromMap(ret);
+ }
+@@ -76,7 +76,7 @@ Status mem_Commit(u8* p, size_t size, int prot)
+ Status mem_Decommit(u8* p, size_t size)
+ {
+       errno = 0;
+-      void* ret = mmap(p, size, PROT_NONE, mmap_flags|MAP_NORESERVE|MAP_FIXED, -1, 0);
++      void* ret = mmap(p, size, PROT_NONE, mmap_flags|MAP_FIXED, -1, 0);
+       return StatusFromMap(ret);
+ }
+ 
Index: pkgsrc/games/0ad/patches/patch-source_maths_tests_test__Bound.h
diff -u /dev/null pkgsrc/games/0ad/patches/patch-source_maths_tests_test__Bound.h:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/patches/patch-source_maths_tests_test__Bound.h     Thu May  4 15:20:52 2023
@@ -0,0 +1,18 @@
+$NetBSD: patch-source_maths_tests_test__Bound.h,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+
+--- source/maths/tests/test_Bound.h.orig       2023-05-04 00:38:25.197319481 +0200
++++ source/maths/tests/test_Bound.h    2023-05-04 00:43:35.449226082 +0200
+@@ -203,9 +203,9 @@
+               CBoundingBoxOriented result;
+               flatAabb.Transform(transform, result);
+ 
+-              TS_ASSERT(!isnan(result.m_Basis[0].X) && !isnan(result.m_Basis[0].Y) && !isnan(result.m_Basis[0].Z));
+-              TS_ASSERT(!isnan(result.m_Basis[1].X) && !isnan(result.m_Basis[1].Y) && !isnan(result.m_Basis[1].Z));
+-              TS_ASSERT(!isnan(result.m_Basis[2].X) && !isnan(result.m_Basis[2].Y) && !isnan(result.m_Basis[2].Z));
++              TS_ASSERT(!std::isnan(result.m_Basis[0].X) && !std::isnan(result.m_Basis[0].Y) && !std::isnan(result.m_Basis[0].Z));
++              TS_ASSERT(!std::isnan(result.m_Basis[1].X) && !std::isnan(result.m_Basis[1].Y) && !std::isnan(result.m_Basis[1].Z));
++              TS_ASSERT(!std::isnan(result.m_Basis[2].X) && !std::isnan(result.m_Basis[2].Y) && !std::isnan(result.m_Basis[2].Z));
+       }
+ 
+       void test_point_visibility()
Index: pkgsrc/games/0ad/patches/patch-source_network_StunClient.cpp
diff -u /dev/null pkgsrc/games/0ad/patches/patch-source_network_StunClient.cpp:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/patches/patch-source_network_StunClient.cpp        Thu May  4 15:20:52 2023
@@ -0,0 +1,14 @@
+$NetBSD: patch-source_network_StunClient.cpp,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+Add header file for std::byte.
+
+--- source/network/StunClient.cpp.orig 2021-07-27 21:57:02.000000000 +0000
++++ source/network/StunClient.cpp
+@@ -28,6 +28,7 @@
+ #include "lib/external_libraries/enet.h"
+ 
+ #include <chrono>
++#include <cstddef>
+ #include <vector>
+ #include <thread>
+ 
Index: pkgsrc/games/0ad/patches/patch-source_scriptinterface_ScriptTypes.h
diff -u /dev/null pkgsrc/games/0ad/patches/patch-source_scriptinterface_ScriptTypes.h:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/patches/patch-source_scriptinterface_ScriptTypes.h Thu May  4 15:20:52 2023
@@ -0,0 +1,20 @@
+$NetBSD: patch-source_scriptinterface_ScriptTypes.h,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+--- source/scriptinterface/ScriptTypes.h.orig  2021-07-27 21:56:58.000000000 +0000
++++ source/scriptinterface/ScriptTypes.h
+@@ -81,6 +81,7 @@ system-installed version. Make sure you 
+ include paths.
+ #endif
+ 
++#if 0
+ #if MOZJS_MINOR_VERSION != 6
+ #error Your compiler is trying to use an untested minor version of the \
+ SpiderMonkey library. If you are a package maintainer, please make sure \
+@@ -93,6 +94,7 @@ version. Another way for testing is runn
+ final hash (check trac.wildfiregames.com/wiki/Debugging#Replaymode). \
+ For more information check this link: trac.wildfiregames.com/wiki/Debugging#Outofsync
+ #endif
++#endif
+ 
+ class ScriptInterface;
+ 
Index: pkgsrc/games/0ad/patches/patch-source_scriptinterface_tests_test__ScriptConversions.h
diff -u /dev/null pkgsrc/games/0ad/patches/patch-source_scriptinterface_tests_test__ScriptConversions.h:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/patches/patch-source_scriptinterface_tests_test__ScriptConversions.h       Thu May  4 15:20:52 2023
@@ -0,0 +1,14 @@
+$NetBSD: patch-source_scriptinterface_tests_test__ScriptConversions.h,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+
+--- source/scriptinterface/tests/test_ScriptConversions.h.orig 2023-05-04 01:07:22.308333403 +0200
++++ source/scriptinterface/tests/test_ScriptConversions.h      2023-05-04 01:07:53.059298729 +0200
+@@ -208,7 +208,7 @@
+               JS::RootedValue testNANVal(rq.cx);
+               Script::ToJSVal(rq, &testNANVal, NAN);
+               TS_ASSERT(Script::FromJSVal(rq, testNANVal, f));
+-              TS_ASSERT(isnan(f));
++              TS_ASSERT(std::isnan(f));
+       }
+ 
+       // NOTE: fixed and vector conversions are defined in simulation2/scripting/EngineScriptConversions.cpp
Index: pkgsrc/games/0ad/patches/patch-source_third__party_mikktspace_weldmesh.cpp
diff -u /dev/null pkgsrc/games/0ad/patches/patch-source_third__party_mikktspace_weldmesh.cpp:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/patches/patch-source_third__party_mikktspace_weldmesh.cpp  Thu May  4 15:20:52 2023
@@ -0,0 +1,18 @@
+$NetBSD: patch-source_third__party_mikktspace_weldmesh.cpp,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+--- source/third_party/mikktspace/weldmesh.cpp.orig    2013-12-06 00:42:50.000000000 +0000
++++ source/third_party/mikktspace/weldmesh.cpp
+@@ -30,7 +30,7 @@
+ #include <string.h>
+ #include <assert.h>
+ 
+-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
++#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ #include <stdlib.h>  /* BSD-based OSes get their malloc stuff through here */
+ #else
+ #include <malloc.h> 
+@@ -199,4 +199,3 @@ static void MergeVertsFast(int * piCurNr
+                                                  pfVertexDataIn, iNrVerticesIn, iFloatsPerVert, iL, iR_in, iChannelNum);      // weld all right of (or equal to) fSep
+       }
+ }
+-
Index: pkgsrc/games/0ad/patches/patch-source_third__party_tinygettext_include_tinygettext_iconv.hpp
diff -u /dev/null pkgsrc/games/0ad/patches/patch-source_third__party_tinygettext_include_tinygettext_iconv.hpp:1.1
--- /dev/null   Thu May  4 15:20:52 2023
+++ pkgsrc/games/0ad/patches/patch-source_third__party_tinygettext_include_tinygettext_iconv.hpp        Thu May  4 15:20:52 2023
@@ -0,0 +1,20 @@
+$NetBSD: patch-source_third__party_tinygettext_include_tinygettext_iconv.hpp,v 1.1 2023/05/04 15:20:52 nikita Exp $
+
+tinygettext fails with NetBSD iconv.
+Use iconv from SDL2 instead.
+
+--- source/third_party/tinygettext/include/tinygettext/iconv.hpp.orig  2021-07-27 21:57:05.000000000 +0000
++++ source/third_party/tinygettext/include/tinygettext/iconv.hpp
+@@ -22,8 +22,11 @@
+ 
+ #include <string>
+ 
++// pkgsrc
++#define TINYGETTEXT_WITH_SDL
++
+ #ifdef TINYGETTEXT_WITH_SDL
+-#  include "SDL.h"
++#  include "SDL2/SDL.h"
+ #else
+ #  include <iconv.h>
+ #endif



Home | Main Index | Thread Index | Old Index