diff --git a/games/0ad/Makefile b/games/0ad/Makefile index da16454a9af2..055246833ffb 100644 --- a/games/0ad/Makefile +++ b/games/0ad/Makefile @@ -1,89 +1,87 @@ PORTNAME= 0ad PORTVERSION= 0.0.26 -PORTREVISION= 14 +PORTREVISION= 15 CATEGORIES= games MASTER_SITES= http://releases.wildfiregames.com/ \ SF/zero-ad/releases DISTFILES= ${PORTNAME}-${PORTVERSION}-alpha-unix-build.tar.xz \ ${PORTNAME}-${PORTVERSION}-alpha-unix-data.tar.xz MAINTAINER= madpilot@FreeBSD.org COMMENT= Real-time strategy (RTS) game of ancient warfare WWW= https://play0ad.com/ BROKEN_aarch64= fails to compile: no member named verifyHeapAccessDisassembly BROKEN_armv6= fails to link: fatal error: conftest: Unknown error: -1 BROKEN_armv7= fails to link: fatal error: conftest: Unknown error: -1 BROKEN_powerpc64= fails to compile: _psutil_bsd.c: error: 'struct xtcpcb' has no member named 'xt_tp' BUILD_DEPENDS= ${RUST_DEFAULT}>=1.35:lang/${RUST_DEFAULT} \ zip:archivers/zip \ cmake:devel/cmake-core -LIB_DEPENDS= libboost_thread.so:devel/boost-libs \ +LIB_DEPENDS= libboost_filesystem.so:devel/boost-libs \ libicui18n.so:devel/icu \ - libpng.so:graphics/png \ - libogg.so:audio/libogg \ - libvorbis.so:audio/libvorbis \ + libpng16.so:graphics/png \ + libvorbisfile.so:audio/libvorbis \ libcurl.so:ftp/curl \ + libfreetype.so:print/freetype2 \ libgloox.so:net-im/gloox \ libminiupnpc.so:net/miniupnpc \ - libnspr4.so:devel/nspr \ libenet.so:net/enet \ - libtiff.so:graphics/tiff \ libsodium.so:security/libsodium \ libfmt.so:devel/libfmt -USES= compiler:c++11-lib desktop-file-utils dos2unix gl gmake gnome \ - iconv jpeg openal:al perl5 pkgconfig python:build sdl tar:xz \ +USES= compiler:c++11-lib desktop-file-utils dos2unix gmake gnome \ + iconv openal:al perl5 pkgconfig python:build sdl tar:xz \ xorg USE_GNOME= libxml2 USE_GL= gl USE_SDL= sdl2 USE_XORG= x11 xcursor USE_PERL5= build WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-alpha BUILD_WRKSRC= ${WRKSRC}/build/workspaces/gcc MAKE_ARGS= config=release verbose=1 CPPFLAGS+= -DU_USING_ICU_NAMESPACE=1 CFLAGS_i386= -msse2 BUNDLE_LIBS= yes DOS2UNIX_REGEX= .*\.([ch]p{0,2}|make) BINARY_ALIAS= python3=${PYTHON_CMD} USE_WX= 3.0+ WX_COMPS= wx:lib MAKE_ENV+= JOBS=${_MAKE_JOBS} PORTDATA= * .include post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ -e 's|%%CC%%|${CC}|' \ ${WRKSRC}/build/premake/premake5.lua ${WRKSRC}/build/premake/extern_libs5.lua .if ${ARCH} == i386 && ${CHOSEN_COMPILER_TYPE} == gcc @${REINPLACE_CMD} -e '1055,1251s/-rdynamic/-lssp_nonshared &/' \ -e '1441s/"execinfo",/& "ssp_nonshared",/' \ ${WRKSRC}/build/premake/premake5.lua .endif pre-build: (cd ${WRKSRC}/build/workspaces && ${SETENV} ${MAKE_ENV} ./update-workspaces.sh --bindir=${PREFIX}/bin --datadir=${DATADIR} --libdir=${PREFIX}/lib/${PORTNAME}) do-install: ${INSTALL_PROGRAM} ${WRKSRC}/binaries/system/pyrogenesis ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/build/resources/0ad.sh ${STAGEDIR}${PREFIX}/bin/0ad ${INSTALL_PROGRAM} ${WRKSRC}/binaries/system/ActorEditor ${STAGEDIR}${PREFIX}/bin ${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME} (cd ${WRKSRC}/binaries/system && ${INSTALL_LIB} libAtlasUI.so libCollada.so libmozjs78-ps-release.so libnvcore.so libnvimage.so libnvmath.so libnvtt.so ${STAGEDIR}${PREFIX}/lib/${PORTNAME}) ${INSTALL_DATA} ${WRKSRC}/build/resources/0ad.desktop ${STAGEDIR}${PREFIX}/share/applications ${INSTALL_DATA} ${WRKSRC}/build/resources/0ad.png ${STAGEDIR}${PREFIX}/share/pixmaps ${MKDIR} ${STAGEDIR}${DATADIR} (cd ${WRKSRC}/binaries/data && ${COPYTREE_SHARE} "config l10n tests tools" ${STAGEDIR}${DATADIR}) ${MKDIR} ${STAGEDIR}${DATADIR}/mods/public ${STAGEDIR}${DATADIR}/mods/mod ${TAR} xf ${WRKSRC}/binaries/data/mods/public/public.zip -C ${STAGEDIR}${DATADIR}/mods/public --no-same-permissions ${TAR} xf ${WRKSRC}/binaries/data/mods/mod/mod.zip -C ${STAGEDIR}${DATADIR}/mods/mod --no-same-permissions .include diff --git a/games/0ad/files/patch-source_network_NetMessage.cpp b/games/0ad/files/patch-source_network_NetMessage.cpp new file mode 100644 index 000000000000..f8722186a922 --- /dev/null +++ b/games/0ad/files/patch-source_network_NetMessage.cpp @@ -0,0 +1,18 @@ +--- source/network/NetMessage.cpp.orig 2023-09-17 08:35:54 UTC ++++ source/network/NetMessage.cpp +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2017 Wildfire Games. ++/* Copyright (C) 2023 Wildfire Games. + * This file is part of 0 A.D. + * + * 0 A.D. is free software: you can redistribute it and/or modify +@@ -216,7 +216,8 @@ CNetMessage* CNetMessageFactory::CreateMessage(const v + break; + + default: +- LOGERROR("CNetMessageFactory::CreateMessage(): Unknown message type '%d' received", header.GetType()); ++ LOGERROR("CNetMessageFactory::CreateMessage(): Unknown message type '%d' received", ++ static_cast(header.GetType())); + break; + } + diff --git a/games/0ad/files/patch-source_simulation2_serialization_BinarySerializer.cpp b/games/0ad/files/patch-source_simulation2_serialization_BinarySerializer.cpp new file mode 100644 index 000000000000..c1c94a1d1e1e --- /dev/null +++ b/games/0ad/files/patch-source_simulation2_serialization_BinarySerializer.cpp @@ -0,0 +1,11 @@ +--- source/simulation2/serialization/BinarySerializer.cpp.orig 2022-08-21 12:45:40 UTC ++++ source/simulation2/serialization/BinarySerializer.cpp +@@ -52,7 +52,7 @@ static u8 GetArrayType(js::Scalar::Type arrayType) + case js::Scalar::Uint8Clamped: + return SCRIPT_TYPED_ARRAY_UINT8_CLAMPED; + default: +- LOGERROR("Cannot serialize unrecognized typed array view: %d", arrayType); ++ LOGERROR("Cannot serialize unrecognized typed array view: %d", static_cast(arrayType)); + throw PSERROR_Serialize_InvalidScriptValue(); + } + }