Index: head/games/0ad/Makefile =================================================================== --- head/games/0ad/Makefile (revision 446959) +++ head/games/0ad/Makefile (revision 446960) @@ -1,84 +1,86 @@ # $FreeBSD$ PORTNAME= 0ad -PORTVERSION= 0.0.21 -PORTREVISION= 8 +PORTVERSION= 0.0.22 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 BUILD_DEPENDS= zip:archivers/zip \ python:lang/python \ 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 + libenet.so:net/enet \ + libtiff.so:graphics/tiff WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-alpha BUILD_WRKSRC= ${WRKSRC}/build/workspaces/gcc MAKE_ARGS= config=release -USES= compiler:c++11-lib dos2unix execinfo gmake iconv openal:al \ +USES= compiler:c++11-lib dos2unix execinfo gmake iconv jpeg openal:al \ pkgconfig tar:xz USE_GNOME= libxml2 gtk20 USE_GL= gl USE_SDL= sdl2 +USE_XORG= x11 xcursor BUNDLE_LIBS= yes DOS2UNIX_REGEX= .*\.([ch]p{0,2}|make) USE_WX= 2.8+ WX_COMPS= wx:lib MAKE_ENV+= JOBS=${_MAKE_JOBS} BROKEN_aarch64= fails to compile: no member named verifyHeapAccessDisassembly BROKEN_armv6= 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' PORTDATA= * .include post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ -e 's|%%CC%%|${CC}|' \ ${WRKSRC}/build/premake/premake4.lua .if ${ARCH} == i386 && ${CHOSEN_COMPILER_TYPE} == gcc @${REINPLACE_CMD} -e '1055,1251s/-rdynamic/-lssp_nonshared &/' \ -e '1441s/"execinfo",/& "ssp_nonshared",/' \ ${WRKSRC}/build/premake/premake4.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 + @${CP} ${FILESDIR}/psutil.diff ${WRKSRC}/libraries/source/spidermonkey/ pre-build: (cd ${WRKSRC}/build/workspaces && ${SETENV} ${MAKE_ENV} ./update-workspaces.sh ${0ADSDLARG} --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 libnvcore.so libnvimage.so libnvmath.so libnvtt.so ${STAGEDIR}${PREFIX}/lib/${PORTNAME}) (cd ${WRKSRC}/binaries/system && ${INSTALL_LIB} libmozjs38-ps-release.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/distinfo =================================================================== --- head/games/0ad/distinfo (revision 446959) +++ head/games/0ad/distinfo (revision 446960) @@ -1,5 +1,5 @@ -TIMESTAMP = 1478641325 -SHA256 (0ad-0.0.21-alpha-unix-build.tar.xz) = 96be23e4284a3931ef9536f988f2517040bde1f8700ee048bff18c932d8683cf -SIZE (0ad-0.0.21-alpha-unix-build.tar.xz) = 29196476 -SHA256 (0ad-0.0.21-alpha-unix-data.tar.xz) = f3ab3c58ffd3bd647a9baba93ea009d5945d2b5bc7db7053a547e07db36faa97 -SIZE (0ad-0.0.21-alpha-unix-data.tar.xz) = 587025496 +TIMESTAMP = 1501175300 +SHA256 (0ad-0.0.22-alpha-unix-build.tar.xz) = fddd36df4fd32b5b31fd8871bc5ed3ec71a921de79517fb6199ba7571ec9f5b1 +SIZE (0ad-0.0.22-alpha-unix-build.tar.xz) = 29199308 +SHA256 (0ad-0.0.22-alpha-unix-data.tar.xz) = 4c32cd0a346815cd260357d55d5a61430f670c78a2fa7a321957c0e4559a766e +SIZE (0ad-0.0.22-alpha-unix-data.tar.xz) = 632555792 Index: head/games/0ad/files/patch-build__premake__premake4.lua =================================================================== --- head/games/0ad/files/patch-build__premake__premake4.lua (revision 446959) +++ head/games/0ad/files/patch-build__premake__premake4.lua (revision 446960) @@ -1,17 +1,17 @@ ---- build/premake/premake4.lua.orig 2014-09-24 10:05:09 UTC +--- build/premake/premake4.lua.orig 2017-07-06 17:29:49 UTC +++ build/premake/premake4.lua -@@ -416,11 +416,11 @@ +@@ -388,11 +388,11 @@ function project_add_x11_dirs() includedirs { "/usr/X11R6/include/X11", "/usr/X11R6/include", - "/usr/local/include/X11", - "/usr/local/include", + "%%LOCALBASE%%/include/X11", + "%%LOCALBASE%%/include", "/usr/include/X11" } - libdirs { "/usr/X11R6/lib" } + libdirs { "%%LOCALBASE%%/lib" } end end Index: head/games/0ad/files/patch-libraries__source__fcollada__src__FCollada__FUtils__FUStringBuilder.hpp =================================================================== --- head/games/0ad/files/patch-libraries__source__fcollada__src__FCollada__FUtils__FUStringBuilder.hpp (revision 446959) +++ head/games/0ad/files/patch-libraries__source__fcollada__src__FCollada__FUtils__FUStringBuilder.hpp (revision 446960) @@ -1,157 +1,157 @@ ---- libraries/source/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp.orig 2014-09-24 10:30:15 UTC +--- libraries/source/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp.orig 2017-07-28 19:57:27 UTC +++ libraries/source/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp @@ -26,63 +26,6 @@ #define SAFE_DELETE_ARRAY(ptr) if (ptr != NULL) { delete [] ptr; ptr = NULL; } #endif -template -void FloatToString(FloatType f, Char* sz) -{ - Char* buffer = sz + 1; - static const int digitCount = 6; - int decimal, sign; - - // ecvt rounds the string for us: http://www.datafocus.com/docs/man3/ecvt.3.asp - char* end = ecvt(f, digitCount, &decimal, &sign); - - if (sign != 0) (*buffer++) = '-'; - int count = digitCount; - if (decimal > digitCount) - { - // We use the scientific notation: P.MeX - (*buffer++) = (*end++); // P is one character. - (*buffer++) = '.'; - - // Mantissa (cleaned for zeroes) - for (--count; count > 0; --count) if (end[count - 1] != '0') break; - for (int i = 0; i < count; ++i) (*buffer++) = (*end++); - if (buffer[-1] == '.') --buffer; - - // Exponent - (*buffer++) = 'e'; - uint32 exponent = decimal - 1; // X - if (exponent >= 10) (*buffer++) = (Char) ('0' + (exponent / 10)); - (*buffer++) = (Char) ('0' + (exponent % 10)); - (*buffer) = 0; - return; - } - else if (decimal > 0) - { - // Simple number: A.B - for (int i = 0; i < decimal; ++i) (*buffer++) = (*end++); - if (decimal < digitCount) (*buffer++) = '.'; - count = digitCount - decimal; - } - else if (decimal < -digitCount) - { - // What case is this? - decimal = count = 0; - } - else if (decimal < 0 || (decimal == 0 && *end != '0')) - { - // Tiny number: 0.Me-X - (*buffer++) = '0'; (*buffer++) = '.'; - for (int i = 0; i < -decimal; ++i) (*buffer++) = '0'; - count = digitCount + decimal; - } - for (; count > 0; --count) if (end[count - 1] != '0') break; - for (int i = 0; i < count; ++i) (*buffer++) = (*end++); - if (decimal == 0 && count == 0) (*buffer++) = '0'; - if (buffer[-1] == '.') --buffer; - (*buffer) = 0; -} - template FUStringBuilderT::FUStringBuilderT(const String& sz) { -@@ -234,53 +177,50 @@ +@@ -234,53 +177,50 @@ void FUStringBuilderT::append(const FUStringBuil template void FUStringBuilderT::append(float f) { -#ifdef WIN32 - // use _isnan method to detect the 1.#IND00 NaN. - if (f != std::numeric_limits::infinity() && f != -std::numeric_limits::infinity() && f != std::numeric_limits::quiet_NaN() && f != std::numeric_limits::signaling_NaN() && !_isnan((double)f)) -#else - if (f != std::numeric_limits::infinity() && f != -std::numeric_limits::infinity() && f != std::numeric_limits::quiet_NaN() && f != std::numeric_limits::signaling_NaN()) -#endif - { - if (IsEquivalent(f, 0.0f, std::numeric_limits::epsilon())) append((Char)'0'); - else - { - Char sz[128]; - FloatToString(f, sz); - append(sz + 1); - } - } - else if (f == std::numeric_limits::infinity()) - { append((Char)'I'); append((Char)'N'); append((Char)'F'); } - else if (f == -std::numeric_limits::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 void FUStringBuilderT::append(double f) { -#ifdef WIN32 - // use _isnan method to detect the .#IND00 NaN. - if (f != std::numeric_limits::infinity() && f != -std::numeric_limits::infinity() && f != std::numeric_limits::quiet_NaN() && f != std::numeric_limits::signaling_NaN() && !_isnan(f)) -#else - if (f != std::numeric_limits::infinity() && f != -std::numeric_limits::infinity() && f != std::numeric_limits::quiet_NaN() && f != std::numeric_limits::signaling_NaN()) -#endif - { - if (IsEquivalent(f, 0.0, std::numeric_limits::epsilon())) append((Char)'0'); - else - { - Char sz[128]; - FloatToString(f, sz); - append(sz + 1); - } + if (f == -std::numeric_limits::infinity()) { + append("-INF"); + return; + } else if (f == std::numeric_limits::infinity()) { + append("INF"); + return; + } else if (f != f) { + append("NaN"); + return; + } else if (-std::numeric_limits::epsilon() < f && f < std::numeric_limits::epsilon()) { + append("0.0E0"); + return; } - else if (f == std::numeric_limits::infinity()) - { append((Char)'I'); append((Char)'N'); append((Char)'F'); } - else if (f == -std::numeric_limits::infinity()) - { append((Char)'-'); append((Char)'I'); append((Char)'N'); append((Char)'F'); } + + if (f < 0.0) { + f = -f; + append('-'); + } + + int e = 0; +// e = floor(log10(f)); +// f = f / pow(10.0, e); + + 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 Index: head/games/0ad/files/patch-libraries__source__fcollada__src__Makefile =================================================================== --- head/games/0ad/files/patch-libraries__source__fcollada__src__Makefile (revision 446959) +++ head/games/0ad/files/patch-libraries__source__fcollada__src__Makefile (revision 446960) @@ -1,11 +1,11 @@ ---- libraries/source/fcollada/src/Makefile.orig 2014-09-27 14:41:22 UTC +--- libraries/source/fcollada/src/Makefile.orig 2014-09-24 14:39:28 UTC +++ libraries/source/fcollada/src/Makefile -@@ -227,7 +227,7 @@ +@@ -227,7 +227,7 @@ OBJECTS_ALL = $(OBJECTS_DEBUG) $(OBJECTS_RELEASE) $(OB all: output/libFColladaSD.a output/libFColladaSR.a install output_dirs: - bash -c 'mkdir -p output/{debug,release,test}/{FCollada/{FCDocument,FMath,FUtils,FColladaTest/{FCTestAssetManagement,FCTestExportImport,FCTestXRef}},FColladaPlugins/FArchiveXML}' + csh -c 'mkdir -p output/{debug,release,test}/{FCollada/{FCDocument,FMath,FUtils,FColladaTest/{FCTestAssetManagement,FCTestExportImport,FCTestXRef}},FColladaPlugins/FArchiveXML}' test: FCollada/FColladaTest/ output/FColladaTest ( cd FCollada/FColladaTest/ ; ../../output/FColladaTest ) Index: head/games/0ad/files/patch-libraries__source__spidermonkey__build.sh =================================================================== --- head/games/0ad/files/patch-libraries__source__spidermonkey__build.sh (revision 446959) +++ head/games/0ad/files/patch-libraries__source__spidermonkey__build.sh (revision 446960) @@ -1,17 +1,24 @@ ---- libraries/source/spidermonkey/build.sh.orig 2015-01-24 14:46:52 UTC +--- libraries/source/spidermonkey/build.sh.orig 2016-10-04 15:01:34 UTC +++ libraries/source/spidermonkey/build.sh -@@ -95,6 +95,14 @@ cd mozjs31/js/src +@@ -90,11 +90,21 @@ cd $FOLDER + # Apply patches + . ../patch.sh + ++patch <../psutil.diff ++ + cd js/src + + # Clean up data generated by previous builds that could cause problems rm -rf build-debug rm -rf build-release - ++ +cp jsnativestack.cpp jsnativestack.cpp.orig +sed 's/# include /#pragma GCC visibility push(default)\ +#include \ +#pragma GCC visibility pop/' jsnativestack.cpp.orig >jsnativestack.cpp + +cp configure configure.orig +sed -e 's/"$ac_cv_have_visibility_class_bug" = "no"; then/"$ac_cv_have_visibility_class_bug" = "no" -a "$OS_ARCH" != "FreeBSD" ; then/' -e 's/-Werror=conversion-null//' configure.orig >configure -+ + # We want separate debug/release versions of the library, so we have to change # the LIBRARY_NAME for each build. - # (We use perl instead of sed so that it works with MozillaBuild on Windows, Index: head/games/0ad/files/patch-source_lib_allocators_page__aligned.cpp =================================================================== --- head/games/0ad/files/patch-source_lib_allocators_page__aligned.cpp (revision 446959) +++ head/games/0ad/files/patch-source_lib_allocators_page__aligned.cpp (revision 446960) @@ -1,20 +1,20 @@ ---- source/lib/allocators/page_aligned.cpp.orig 2011-05-03 12:38:42 UTC +--- 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_PRIVAT +@@ -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, in +@@ -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: head/games/0ad/files/patch-source_lib_sysdep_os_unix_uvm.cpp =================================================================== --- head/games/0ad/files/patch-source_lib_sysdep_os_unix_uvm.cpp (revision 446959) +++ head/games/0ad/files/patch-source_lib_sysdep_os_unix_uvm.cpp (revision 446960) @@ -1,20 +1,20 @@ ---- source/lib/sysdep/os/unix/uvm.cpp.orig 2013-12-06 00:42:50 UTC +--- source/lib/sysdep/os/unix/uvm.cpp.orig 2017-07-28 19:57:26 UTC +++ source/lib/sysdep/os/unix/uvm.cpp @@ -40,7 +40,7 @@ namespace vm { void* ReserveAddressSpace(size_t size, size_t UNUSED(commitSize), PageType UNUSED(pageType), int UNUSED(prot)) { errno = 0; - void* p = mmap(0, size, PROT_NONE, mmap_flags|MAP_NORESERVE, -1, 0); + void* p = mmap(0, size, PROT_NONE, mmap_flags, -1, 0); if(p == MAP_FAILED) return 0; return p; -@@ -77,7 +77,7 @@ bool Commit(uintptr_t address, size_t si +@@ -77,7 +77,7 @@ bool Commit(uintptr_t address, size_t size, PageType U bool Decommit(uintptr_t address, size_t size) { errno = 0; - if(mmap((void*)address, size, PROT_NONE, mmap_flags|MAP_NORESERVE|MAP_FIXED, -1, 0) == MAP_FAILED) + if(mmap((void*)address, size, PROT_NONE, mmap_flags|MAP_FIXED, -1, 0) == MAP_FAILED) return false; return true; } Index: head/games/0ad/files/patch-source_lobby_XmppClient.cpp =================================================================== --- head/games/0ad/files/patch-source_lobby_XmppClient.cpp (nonexistent) +++ head/games/0ad/files/patch-source_lobby_XmppClient.cpp (revision 446960) @@ -0,0 +1,11 @@ +--- source/lobby/XmppClient.cpp.orig 2017-07-28 19:57:26 UTC ++++ source/lobby/XmppClient.cpp +@@ -955,7 +955,7 @@ std::time_t XmppClient::ComputeTimestamp(const glooxwr + if (!strptime(timestampStr.c_str(), "%Y-%m-%dT%H:%M:%SZ", ×tamp)) + LOGERROR("Received delayed message with corrupted timestamp %s", timestampStr.to_string()); + +- return std::mktime(×tamp) - timezone; ++ return std::mktime(×tamp); + } + + /** Property changes on: head/games/0ad/files/patch-source_lobby_XmppClient.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/psutil.diff =================================================================== --- head/games/0ad/files/psutil.diff (nonexistent) +++ head/games/0ad/files/psutil.diff (revision 446960) @@ -0,0 +1,50 @@ +--- python/psutil/psutil/_psutil_bsd.c.orig 2015-09-17 20:12:23 UTC ++++ python/psutil/psutil/_psutil_bsd.c +@@ -957,11 +957,19 @@ psutil_sockaddr_matches(int family, int port, void *pc + psutil_sockaddr_addrlen(family)) == 0); + } + ++#if __FreeBSD_version >= 1200026 ++static struct xtcpcb * ++psutil_search_tcplist(char *buf, struct kinfo_file *kif) ++{ ++ struct xtcpcb *tp; ++ struct xinpcb *inp; ++#else + static struct tcpcb * + psutil_search_tcplist(char *buf, struct kinfo_file *kif) + { + struct tcpcb *tp; + struct inpcb *inp; ++#endif + struct xinpgen *xig, *oxig; + struct xsocket *so; + +@@ -969,9 +977,15 @@ psutil_search_tcplist(char *buf, struct kinfo_file *ki + for (xig = (struct xinpgen *)((char *)xig + xig->xig_len); + xig->xig_len > sizeof(struct xinpgen); + xig = (struct xinpgen *)((char *)xig + xig->xig_len)) { ++#if __FreeBSD_version >= 1200026 ++ tp = (struct xtcpcb *)xig; ++ inp = &tp->xt_inp; ++ so = &inp->xi_socket; ++#else + tp = &((struct xtcpcb *)xig)->xt_tp; + inp = &((struct xtcpcb *)xig)->xt_inp; + so = &((struct xtcpcb *)xig)->xt_socket; ++#endif + + if (so->so_type != kif->kf_sock_type || + so->xso_family != kif->kf_sock_domain || +@@ -1019,7 +1033,11 @@ psutil_proc_connections(PyObject *self, PyObject *args + struct kinfo_file *freep = NULL; + struct kinfo_file *kif; + char *tcplist = NULL; ++#if __FreeBSD_version >= 1200026 ++ struct xtcpcb *tcp; ++#else + struct tcpcb *tcp; ++#endif + + PyObject *retList = PyList_New(0); + PyObject *tuple = NULL; Property changes on: head/games/0ad/files/psutil.diff ___________________________________________________________________ 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