Index: head/games/0ad/Makefile =================================================================== --- head/games/0ad/Makefile (revision 567404) +++ head/games/0ad/Makefile (revision 567405) @@ -1,92 +1,95 @@ # $FreeBSD$ PORTNAME= 0ad PORTVERSION= 0.0.24b 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 BROKEN_FreeBSD_11= fails to link: undefined reference to gloox::Client::Client(...) 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 LIB_DEPENDS= libboost_thread.so:devel/boost-libs \ libicui18n.so:devel/icu \ libpng.so:graphics/png \ libogg.so:audio/libogg \ libvorbis.so:audio/libvorbis \ libcurl.so:ftp/curl \ 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 pkgconfig python:build sdl tar:xz xorg USE_GNOME= libxml2 USE_GL= gl USE_SDL= sdl2 USE_XORG= x11 xcursor WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-alpha BUILD_WRKSRC= ${WRKSRC}/build/workspaces/gcc MAKE_ARGS= config=release verbose=1 CPPFLAGS+= -DU_USING_ICU_NAMESPACE=1 -CFLAGS+= -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 + +.if ${ARCH} == i386 +CFLAGS+= -msse2 +.endif 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 @${REINPLACE_CMD} 's,^\(Exec=\)/usr/local,\1${PREFIX},' \ ${WRKSRC}/build/resources/0ad.desktop @${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|' \ ${WRKSRC}/build/resources/0ad.sh 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 Index: head/games/0ad/files/patch-build_premake_premake5.lua =================================================================== --- head/games/0ad/files/patch-build_premake_premake5.lua (revision 567404) +++ head/games/0ad/files/patch-build_premake_premake5.lua (revision 567405) @@ -1,11 +1,29 @@ ---- build/premake/premake5.lua.orig 2021-02-06 00:32:37 UTC +--- build/premake/premake5.lua.orig 2021-02-28 23:45:14 UTC +++ build/premake/premake5.lua +@@ -87,6 +87,8 @@ else + arch = "aarch64" + elseif string.find(machine, "e2k") == 1 then + arch = "e2k" ++ elseif string.find(machine, "ppc64") == 1 or string.find(machine, "powerpc64") == 1 then ++ arch = "ppc64" + else + print("WARNING: Cannot determine architecture from GCC, assuming x86") + end @@ -365,7 +365,7 @@ function project_set_build_flags() if os.istarget("linux") or os.istarget("bsd") then if _OPTIONS["prefer-local-libs"] then - libdirs { "/usr/local/lib" } + libdirs { "%%LOCALBASE%%/lib" } end -- To use our local shared libraries, they need to be found in the +@@ -865,6 +867,8 @@ function setup_all_libs () + table.insert(source_dirs, "lib/sysdep/arch/aarch64"); + elseif arch == "e2k" then + table.insert(source_dirs, "lib/sysdep/arch/e2k"); ++ elseif arch == "ppc64" then ++ table.insert(source_dirs, "lib/sysdep/arch/ppc64"); + end + + -- OS-specific Index: head/games/0ad/files/patch-libraries_source_nvtt_src_src_nvcore_Debug.cpp =================================================================== --- head/games/0ad/files/patch-libraries_source_nvtt_src_src_nvcore_Debug.cpp (nonexistent) +++ head/games/0ad/files/patch-libraries_source_nvtt_src_src_nvcore_Debug.cpp (revision 567405) @@ -0,0 +1,12 @@ +--- libraries/source/nvtt/src/src/nvcore/Debug.cpp.orig 2021-02-28 23:45:14 UTC ++++ libraries/source/nvtt/src/src/nvcore/Debug.cpp +@@ -628,6 +628,9 @@ namespace + # elif NV_CPU_X86 + ucontext_t * ucp = (ucontext_t *)secret; + return (void *)ucp->uc_mcontext.mc_eip; ++# elif NV_CPU_PPC ++ ucontext_t * ucp = (ucontext_t *)secret; ++ return (void *)ucp->uc_mcontext.mc_srr0; + # else + # error "Unknown CPU" + # endif Property changes on: head/games/0ad/files/patch-libraries_source_nvtt_src_src_nvcore_Debug.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/0ad/files/patch-source_lib_byte__order.h =================================================================== --- head/games/0ad/files/patch-source_lib_byte__order.h (nonexistent) +++ head/games/0ad/files/patch-source_lib_byte__order.h (revision 567405) @@ -0,0 +1,11 @@ +--- source/lib/byte_order.h.orig 2021-02-28 23:45:13 UTC ++++ source/lib/byte_order.h +@@ -33,7 +33,7 @@ + #ifndef BYTE_ORDER + # define LITTLE_ENDIAN 0x4321 + # define BIG_ENDIAN 0x1234 +-# if ARCH_IA32 || ARCH_IA64 || ARCH_AMD64 || ARCH_ALPHA || ARCH_ARM || ARCH_AARCH64 || ARCH_MIPS || ARCH_E2K || defined(__LITTLE_ENDIAN__) ++# if ARCH_IA32 || ARCH_IA64 || ARCH_AMD64 || ARCH_ALPHA || ARCH_ARM || ARCH_AARCH64 || ARCH_MIPS || ARCH_E2K || ARCH_PPC64 || defined(__LITTLE_ENDIAN__) + # define BYTE_ORDER LITTLE_ENDIAN + # else + # define BYTE_ORDER BIG_ENDIAN Property changes on: head/games/0ad/files/patch-source_lib_byte__order.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/0ad/files/patch-source_lib_sysdep_arch.h =================================================================== --- head/games/0ad/files/patch-source_lib_sysdep_arch.h (nonexistent) +++ head/games/0ad/files/patch-source_lib_sysdep_arch.h (revision 567405) @@ -0,0 +1,18 @@ +--- source/lib/sysdep/arch.h.orig 2021-02-28 23:45:13 UTC ++++ source/lib/sysdep/arch.h +@@ -76,9 +76,14 @@ + #else + # define ARCH_E2K 0 + #endif ++#if defined(__PPC64__) ++# define ARCH_PPC64 1 ++#else ++# define ARCH_PPC64 0 ++#endif + + // ensure exactly one architecture has been detected +-#if (ARCH_IA32+ARCH_IA64+ARCH_AMD64+ARCH_ALPHA+ARCH_ARM+ARCH_AARCH64+ARCH_MIPS+ARCH_E2K) != 1 ++#if (ARCH_IA32+ARCH_IA64+ARCH_AMD64+ARCH_ALPHA+ARCH_ARM+ARCH_AARCH64+ARCH_MIPS+ARCH_E2K+ARCH_PPC64) != 1 + # error "architecture not correctly detected (either none or multiple ARCH_* defined)" + #endif + Property changes on: head/games/0ad/files/patch-source_lib_sysdep_arch.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/0ad/files/patch-source_lib_sysdep_arch_ppc64_ppc64.cpp =================================================================== --- head/games/0ad/files/patch-source_lib_sysdep_arch_ppc64_ppc64.cpp (nonexistent) +++ head/games/0ad/files/patch-source_lib_sysdep_arch_ppc64_ppc64.cpp (revision 567405) @@ -0,0 +1,53 @@ +--- source/lib/sysdep/arch/ppc64/ppc64.cpp.orig 2021-02-28 23:47:02 UTC ++++ source/lib/sysdep/arch/ppc64/ppc64.cpp +@@ -0,0 +1,50 @@ ++/* Copyright (C) 2012 Wildfire Games ++ * Copyright (C) 2018 Raptor Engineering, LLC ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining ++ * a copy of this software and associated documentation files (the ++ * "Software"), to deal in the Software without restriction, including ++ * without limitation the rights to use, copy, modify, merge, publish, ++ * distribute, sublicense, and/or sell copies of the Software, and to ++ * permit persons to whom the Software is furnished to do so, subject to ++ * the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included ++ * in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ++ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ++ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ++ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ++ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++/* ++ * routines specific to POWER ++ */ ++ ++#include "precompiled.h" ++ ++#include "lib/sysdep/cpu.h" ++ ++intptr_t cpu_AtomicAdd(volatile intptr_t* location, intptr_t increment) ++{ ++ return __sync_fetch_and_add(location, increment); ++} ++ ++bool cpu_CAS(volatile intptr_t* location, intptr_t expected, intptr_t newValue) ++{ ++ return __sync_bool_compare_and_swap(location, expected, newValue); ++} ++ ++bool cpu_CAS64(volatile i64* location, i64 expected, i64 newValue) ++{ ++ return __sync_bool_compare_and_swap(location, expected, newValue); ++} ++ ++const char* cpu_IdentifierString() ++{ ++ return "IBM POWER"; // TODO ++} Property changes on: head/games/0ad/files/patch-source_lib_sysdep_arch_ppc64_ppc64.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/0ad/files/patch-source_ps_GameSetup_HWDetect.cpp =================================================================== --- head/games/0ad/files/patch-source_ps_GameSetup_HWDetect.cpp (nonexistent) +++ head/games/0ad/files/patch-source_ps_GameSetup_HWDetect.cpp (revision 567405) @@ -0,0 +1,10 @@ +--- source/ps/GameSetup/HWDetect.cpp.orig 2021-02-28 23:45:13 UTC ++++ source/ps/GameSetup/HWDetect.cpp +@@ -124,6 +124,7 @@ void RunHardwareDetection() + scriptInterface.SetProperty(settings, "arch_arm", ARCH_ARM); + scriptInterface.SetProperty(settings, "arch_aarch64", ARCH_AARCH64); + scriptInterface.SetProperty(settings, "arch_e2k", ARCH_E2K); ++ scriptInterface.SetProperty(settings, "arch_ppc64", ARCH_PPC64); + + #ifdef NDEBUG + scriptInterface.SetProperty(settings, "build_debug", 0); Property changes on: head/games/0ad/files/patch-source_ps_GameSetup_HWDetect.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property