diff options
author | madpilot <madpilot@FreeBSD.org> | 2018-07-05 17:57:06 +0800 |
---|---|---|
committer | madpilot <madpilot@FreeBSD.org> | 2018-07-05 17:57:06 +0800 |
commit | 473dfbc4154d5a0301ff49187c79ea0c33c1a90d (patch) | |
tree | 0c06d9e9f0f953bf20d101127920eb3171c2b13d | |
parent | 783cdd5c4849d991665a1b095cc25a0ab95ca17a (diff) | |
download | freebsd-ports-gnome-473dfbc4154d5a0301ff49187c79ea0c33c1a90d.tar.gz freebsd-ports-gnome-473dfbc4154d5a0301ff49187c79ea0c33c1a90d.tar.zst freebsd-ports-gnome-473dfbc4154d5a0301ff49187c79ea0c33c1a90d.zip |
- Update 0ad to Alpha 23 Ken Wood
- Make build verbose
- Rename patches to follow new naming convention
- New version requires WxGTK 3.0 minimum
- Add missing dependency on desktop-file-utils
14 files changed, 319 insertions, 120 deletions
diff --git a/games/0ad/Makefile b/games/0ad/Makefile index b39163449657..98e44ca50de9 100644 --- a/games/0ad/Makefile +++ b/games/0ad/Makefile @@ -1,8 +1,7 @@ # $FreeBSD$ PORTNAME= 0ad -PORTVERSION= 0.0.22 -PORTREVISION= 10 +PORTVERSION= 0.0.23 CATEGORIES= games MASTER_SITES= http://releases.wildfiregames.com/ \ SF/zero-ad/releases @@ -24,13 +23,14 @@ LIB_DEPENDS= libboost_thread.so:devel/boost-libs \ libminiupnpc.so:net/miniupnpc \ libnspr4.so:devel/nspr \ libenet.so:net/enet \ - libtiff.so:graphics/tiff + libtiff.so:graphics/tiff \ + libsodium.so:security/libsodium WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-alpha BUILD_WRKSRC= ${WRKSRC}/build/workspaces/gcc -MAKE_ARGS= config=release +MAKE_ARGS= config=release verbose=1 CPPFLAGS+= -DU_USING_ICU_NAMESPACE=1 -USES= compiler:c++11-lib dos2unix gmake iconv jpeg openal:al \ +USES= compiler:c++11-lib desktop-file-utils dos2unix gmake iconv jpeg openal:al \ pkgconfig python:build tar:xz USE_GNOME= libxml2 gtk20 USE_GL= gl @@ -40,7 +40,7 @@ BUNDLE_LIBS= yes DOS2UNIX_REGEX= .*\.([ch]p{0,2}|make) BINARY_ALIAS= python=${PYTHON_CMD} -USE_WX= 2.8+ +USE_WX= 3.0+ WX_COMPS= wx:lib MAKE_ENV+= JOBS=${_MAKE_JOBS} @@ -56,28 +56,26 @@ PORTDATA= * post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ -e 's|%%CC%%|${CC}|' \ - ${WRKSRC}/build/premake/premake4.lua + ${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/premake4.lua + ${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 - @${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}) + (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 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}) + (cd ${WRKSRC}/binaries/system && ${INSTALL_LIB} libAtlasUI.so libCollada.so libmozjs38-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} diff --git a/games/0ad/distinfo b/games/0ad/distinfo index b3a8f8340f67..0111acf388de 100644 --- a/games/0ad/distinfo +++ b/games/0ad/distinfo @@ -1,5 +1,5 @@ -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 +TIMESTAMP = 1530535030 +SHA256 (0ad-0.0.23-alpha-unix-build.tar.xz) = cfa1e3b6989466961451c95a96c19c274cd373ce6d98f83836e6f862c9d3e163 +SIZE (0ad-0.0.23-alpha-unix-build.tar.xz) = 31907988 +SHA256 (0ad-0.0.23-alpha-unix-data.tar.xz) = fdbf774637252dbedf339fbe29b77d7d585ab53a9a5ddede56dd7b8fda66d8ac +SIZE (0ad-0.0.23-alpha-unix-data.tar.xz) = 691973492 diff --git a/games/0ad/files/patch-build__premake__extern_libs4.lua b/games/0ad/files/patch-build_premake_extern__libs5.lua index 2961665d12ff..946c30375b72 100644 --- a/games/0ad/files/patch-build__premake__extern_libs4.lua +++ b/games/0ad/files/patch-build_premake_extern__libs5.lua @@ -1,16 +1,16 @@ ---- build/premake/extern_libs4.lua.orig 2015-11-19 23:47:41 UTC -+++ build/premake/extern_libs4.lua -@@ -237,7 +237,7 @@ extern_lib_defs = { +--- build/premake/extern_libs5.lua.orig 2018-04-29 15:44:48 UTC ++++ build/premake/extern_libs5.lua +@@ -191,7 +191,7 @@ extern_lib_defs = { end -- TODO: This actually applies to most libraries we use on BSDs, make this a global setting. - if os.is("bsd") then -- includedirs { "/usr/local/include" } -+ includedirs { "%%LOCALBASE%%/include" } + if os.istarget("bsd") then +- sysincludedirs { "/usr/local/include" } ++ sysincludedirs { "%%LOCALBASE%%/include" } end end, link_settings = function() -@@ -347,9 +347,6 @@ extern_lib_defs = { - elseif os.is("macosx") then +@@ -301,9 +301,6 @@ extern_lib_defs = { + elseif os.istarget("macosx") then add_default_include_paths("iconv") defines { "LIBICONV_STATIC" } - elseif os.getversion().description == "FreeBSD" then diff --git a/games/0ad/files/patch-build__premake__premake4.lua b/games/0ad/files/patch-build_premake_premake5.lua index 316c4bdf9501..edd965ab45dd 100644 --- a/games/0ad/files/patch-build__premake__premake4.lua +++ b/games/0ad/files/patch-build_premake_premake5.lua @@ -1,7 +1,7 @@ ---- build/premake/premake4.lua.orig 2017-07-06 17:29:49 UTC -+++ build/premake/premake4.lua -@@ -388,11 +388,11 @@ function project_add_x11_dirs() - includedirs { +--- build/premake/premake5.lua.orig 2018-04-22 18:14:45 UTC ++++ build/premake/premake5.lua +@@ -376,11 +376,11 @@ function project_add_x11_dirs() + sysincludedirs { "/usr/X11R6/include/X11", "/usr/X11R6/include", - "/usr/local/include/X11", diff --git a/games/0ad/files/patch-build__workspaces__update-workspaces.sh b/games/0ad/files/patch-build_workspaces_update-workspaces.sh index 311f65a0c84f..311f65a0c84f 100644 --- a/games/0ad/files/patch-build__workspaces__update-workspaces.sh +++ b/games/0ad/files/patch-build_workspaces_update-workspaces.sh diff --git a/games/0ad/files/patch-libraries__source__fcollada__src__FCollada__FUtils__FUStringBuilder.hpp b/games/0ad/files/patch-libraries_source_fcollada_src_FCollada_FUtils_FUStringBuilder.hpp index 1e7b881a41fb..1e7b881a41fb 100644 --- a/games/0ad/files/patch-libraries__source__fcollada__src__FCollada__FUtils__FUStringBuilder.hpp +++ b/games/0ad/files/patch-libraries_source_fcollada_src_FCollada_FUtils_FUStringBuilder.hpp diff --git a/games/0ad/files/patch-libraries__source__fcollada__src__Makefile b/games/0ad/files/patch-libraries_source_fcollada_src_Makefile index ed6bd804207e..ed6bd804207e 100644 --- a/games/0ad/files/patch-libraries__source__fcollada__src__Makefile +++ b/games/0ad/files/patch-libraries_source_fcollada_src_Makefile diff --git a/games/0ad/files/patch-libraries_source_spidermonkey_FixpsutilFreeBSD.diff b/games/0ad/files/patch-libraries_source_spidermonkey_FixpsutilFreeBSD.diff new file mode 100644 index 000000000000..78701a995867 --- /dev/null +++ b/games/0ad/files/patch-libraries_source_spidermonkey_FixpsutilFreeBSD.diff @@ -0,0 +1,168 @@ +--- libraries/source/spidermonkey/FixpsutilFreeBSD.diff.orig 2017-09-13 00:10:27 UTC ++++ libraries/source/spidermonkey/FixpsutilFreeBSD.diff +@@ -1,6 +1,6 @@ +---- python/psutil/psutil/_psutil_bsd.c +-+++ python/psutil/psutil/_psutil_bsd.c +-@@ -957,11 +957,19 @@ psutil_sockaddr_matches(int family, int port, void *pc ++--- ./python/psutil/psutil/_psutil_bsd.c.orig 2015-09-17 22:12:23.000000000 +0200 +++++ ./python/psutil/psutil/_psutil_bsd.c ++@@ -957,11 +957,19 @@ + psutil_sockaddr_addrlen(family)) == 0); + } + +@@ -20,7 +20,7 @@ + struct xinpgen *xig, *oxig; + struct xsocket *so; + +-@@ -969,9 +977,15 @@ psutil_search_tcplist(char *buf, struct kinfo_file *ki ++@@ -969,9 +977,15 @@ + for (xig = (struct xinpgen *)((char *)xig + xig->xig_len); + xig->xig_len > sizeof(struct xinpgen); + xig = (struct xinpgen *)((char *)xig + xig->xig_len)) { +@@ -36,7 +36,44 @@ + + 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 ++@@ -981,20 +995,36 @@ ++ if (kif->kf_sock_domain == AF_INET) { ++ if (!psutil_sockaddr_matches( ++ AF_INET, inp->inp_lport, &inp->inp_laddr, +++#if __FreeBSD_version < 1200031 ++ &kif->kf_sa_local)) +++#else +++ &kif->kf_un.kf_sock.kf_sa_local)) +++#endif ++ continue; ++ if (!psutil_sockaddr_matches( ++ AF_INET, inp->inp_fport, &inp->inp_faddr, +++#if __FreeBSD_version < 1200031 ++ &kif->kf_sa_peer)) +++#else +++ &kif->kf_un.kf_sock.kf_sa_peer)) +++#endif ++ continue; ++ } else { ++ if (!psutil_sockaddr_matches( ++ AF_INET6, inp->inp_lport, &inp->in6p_laddr, +++#if __FreeBSD_version < 1200031 ++ &kif->kf_sa_local)) +++#else +++ &kif->kf_un.kf_sock.kf_sa_peer)) +++#endif ++ continue; ++ if (!psutil_sockaddr_matches( ++ AF_INET6, inp->inp_fport, &inp->in6p_faddr, +++#if __FreeBSD_version < 1200031 ++ &kif->kf_sa_peer)) +++#else +++ &kif->kf_un.kf_sock.kf_sa_peer)) +++#endif ++ continue; ++ } ++ ++@@ -1019,7 +1049,11 @@ + struct kinfo_file *freep = NULL; + struct kinfo_file *kif; + char *tcplist = NULL; +@@ -48,3 +85,100 @@ + + PyObject *retList = PyList_New(0); + PyObject *tuple = NULL; ++@@ -1094,19 +1128,35 @@ ++ inet_ntop( ++ kif->kf_sock_domain, ++ psutil_sockaddr_addr(kif->kf_sock_domain, +++#if __FreeBSD_version < 1200031 ++ &kif->kf_sa_local), +++#else +++ &kif->kf_un.kf_sock.kf_sa_local), +++#endif ++ lip, ++ sizeof(lip)); ++ inet_ntop( ++ kif->kf_sock_domain, ++ psutil_sockaddr_addr(kif->kf_sock_domain, +++#if __FreeBSD_version < 1200031 ++ &kif->kf_sa_peer), +++#else +++ &kif->kf_un.kf_sock.kf_sa_peer), +++#endif ++ rip, ++ sizeof(rip)); ++ lport = htons(psutil_sockaddr_port(kif->kf_sock_domain, +++#if __FreeBSD_version < 1200031 ++ &kif->kf_sa_local)); +++#else +++ &kif->kf_un.kf_sock.kf_sa_local)); +++#endif ++ rport = htons(psutil_sockaddr_port(kif->kf_sock_domain, +++#if __FreeBSD_version < 1200031 ++ &kif->kf_sa_peer)); +++#else +++ &kif->kf_un.kf_sock.kf_sa_peer)); +++#endif ++ ++ // construct python tuple/list ++ laddr = Py_BuildValue("(si)", lip, lport); ++@@ -1137,7 +1187,11 @@ ++ else if (kif->kf_sock_domain == AF_UNIX) { ++ struct sockaddr_un *sun; ++ +++#if __FreeBSD_version < 1200031 ++ sun = (struct sockaddr_un *)&kif->kf_sa_local; +++#else +++ sun = (struct sockaddr_un *)&kif->kf_un.kf_sock.kf_sa_local; +++#endif ++ snprintf( ++ path, sizeof(path), "%.*s", ++ (sun->sun_len - (sizeof(*sun) - sizeof(sun->sun_path))), ++@@ -1779,7 +1833,11 @@ ++ struct xinpgen *xig, *exig; ++ struct xinpcb *xip; ++ struct xtcpcb *xtp; +++#if __FreeBSD_version >= 1200026 +++ struct xinpcb *inp; +++#else ++ struct inpcb *inp; +++#endif ++ struct xsocket *so; ++ struct sock *sock; ++ const char *varname; ++@@ -1849,13 +1907,21 @@ ++ PyErr_Format(PyExc_RuntimeError, "struct xinpcb size mismatch"); ++ goto error; ++ } +++#if __FreeBSD_version >= 1200026 +++ inp = xip; +++#else ++ inp = &xip->xi_inp; +++#endif ++ so = &xip->xi_socket; ++ break; ++ } ++ ++ inp = &xtp->xt_inp; +++#if __FreeBSD_version >= 1200026 +++ so = &xtp->xt_inp.xi_socket; +++#else ++ so = &xtp->xt_socket; +++#endif ++ char lip[200], rip[200]; ++ int family, lport, rport, pid, status; ++ ++@@ -1863,9 +1929,14 @@ ++ pid = psutil_get_pid_from_sock(hash); ++ if (pid < 0) ++ continue; +++ ++ lport = ntohs(inp->inp_lport); ++ rport = ntohs(inp->inp_fport); +++#if __FreeBSD_version >= 1200026 +++ status = xtp->t_state; +++#else ++ status = xtp->xt_tp.t_state; +++#endif ++ ++ if (inp->inp_vflag & INP_IPV4) { ++ family = AF_INET; diff --git a/games/0ad/files/patch-libraries__source__spidermonkey__build.sh b/games/0ad/files/patch-libraries_source_spidermonkey_build.sh index cb4a6555583d..661627fc0407 100644 --- a/games/0ad/files/patch-libraries__source__spidermonkey__build.sh +++ b/games/0ad/files/patch-libraries_source_spidermonkey_build.sh @@ -1,17 +1,9 @@ --- libraries/source/spidermonkey/build.sh.orig 2016-10-04 15:01:34 UTC +++ libraries/source/spidermonkey/build.sh -@@ -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 +@@ -96,6 +96,14 @@ cd js/src rm -rf build-debug rm -rf build-release -+ + +cp jsnativestack.cpp jsnativestack.cpp.orig +sed 's/# include <pthread_np.h>/#pragma GCC visibility push(default)\ +#include <pthread_np.h>\ @@ -19,6 +11,7 @@ + +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, diff --git a/games/0ad/files/patch-source_lobby_XmppClient.cpp b/games/0ad/files/patch-source_lobby_XmppClient.cpp deleted file mode 100644 index d795d910536b..000000000000 --- a/games/0ad/files/patch-source_lobby_XmppClient.cpp +++ /dev/null @@ -1,30 +0,0 @@ ---- source/lobby/XmppClient.cpp.orig 2017-06-18 18:48:18 UTC -+++ source/lobby/XmppClient.cpp -@@ -25,10 +25,6 @@ - - #include "i18n/L10n.h" - --#if OS_WIN --#include "lib/sysdep/os/win/wposix/wtime.h" --#endif -- - #include "lib/external_libraries/enet.h" - #include "lib/utf8.h" - #include "network/NetServer.h" -@@ -948,14 +944,8 @@ std::time_t XmppClient::ComputeTimestamp(const glooxwr - if (!msg.when()) - return std::time(nullptr); - -- glooxwrapper::string timestampStr = msg.when()->stamp(); -- struct tm timestamp = {0}; -- -- // See http://xmpp.org/extensions/xep-0082.html#sect-idp285136 for format -- 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; -+ // See XEP-0082 for the date format -+ return g_L10n.ParseDateTime(msg.when()->stamp().to_string(), "Y-M-d'T'H:m:sZ", Locale::getUS()) / 1000.0; - } - - /** diff --git a/games/0ad/files/patch-source_tools_atlas_AtlasObject_AtlasObjectImpl.cpp b/games/0ad/files/patch-source_tools_atlas_AtlasObject_AtlasObjectImpl.cpp new file mode 100644 index 000000000000..b67f4c71c6e6 --- /dev/null +++ b/games/0ad/files/patch-source_tools_atlas_AtlasObject_AtlasObjectImpl.cpp @@ -0,0 +1,30 @@ +--- source/tools/atlas/AtlasObject/AtlasObjectImpl.cpp.orig 2016-11-23 14:09:58 UTC ++++ source/tools/atlas/AtlasObject/AtlasObjectImpl.cpp +@@ -164,7 +164,12 @@ void AtObj::add(const char* key, AtObj& data) + + void AtObj::add(const char* key, const wxString& value) + { +- add(key, value.wc_str()); ++ const AtNode* o = new AtNode(value.wc_str()); ++ ++ if (!p) ++ p = new AtNode(); ++ ++ p = p->addChild(key, AtNode::Ptr(o)); + } + + void AtObj::add(const char* key, const wchar_t* value) +@@ -187,7 +192,12 @@ void AtObj::set(const char* key, AtObj& data) + + void AtObj::set(const char* key, const wxString& value) + { +- set(key, value.wc_str()); ++ const AtNode* o = new AtNode(value.wc_str()); ++ ++ if (!p) ++ p = new AtNode(); ++ ++ p = p->setChild(key, AtNode::Ptr(o)); + } + + void AtObj::set(const char* key, const wchar_t* value) diff --git a/games/0ad/files/patch-source_tools_atlas_AtlasUI_CustomControls_MapDialog_MapDialog.cpp b/games/0ad/files/patch-source_tools_atlas_AtlasUI_CustomControls_MapDialog_MapDialog.cpp new file mode 100644 index 000000000000..d9653b27468f --- /dev/null +++ b/games/0ad/files/patch-source_tools_atlas_AtlasUI_CustomControls_MapDialog_MapDialog.cpp @@ -0,0 +1,34 @@ +--- source/tools/atlas/AtlasUI/CustomControls/MapDialog/MapDialog.cpp.orig 2018-03-13 20:26:30 UTC ++++ source/tools/atlas/AtlasUI/CustomControls/MapDialog/MapDialog.cpp +@@ -166,11 +166,11 @@ void MapDialog::OnListBox(wxCommandEvent& evt) + else + { + wxString filePath = GetSelectedFilePath(); +- AtlasMessage::qVFSFileExists qry(filePath.wc_str()); ++ AtlasMessage::qVFSFileExists qry(filePath.ToStdWstring()); + qry.Post(); + if (!filePath.IsEmpty() && qry.exists) + { +- AtlasMessage::qVFSFileRealPath qry(filePath.wc_str()); ++ AtlasMessage::qVFSFileRealPath qry(filePath.ToStdWstring()); + qry.Post(); + wxDynamicCast(FindWindow(ID_MapDialogFilename), wxTextCtrl)->ChangeValue(*qry.realPath); + } +@@ -221,7 +221,7 @@ void MapDialog::OpenFile() + if (filePath.empty()) + return; + +- AtlasMessage::qVFSFileExists qry(filePath.wc_str()); ++ AtlasMessage::qVFSFileExists qry(filePath.ToStdWstring()); + qry.Post(); + if (!qry.exists) + return; +@@ -236,7 +236,7 @@ void MapDialog::SaveFile() + return; + + // TODO: this test would work better outside the VFS +- AtlasMessage::qVFSFileExists qry(filePath.wc_str()); ++ AtlasMessage::qVFSFileExists qry(filePath.ToStdWstring()); + qry.Post(); + if (qry.exists) + { diff --git a/games/0ad/files/patch-source_tools_atlas_AtlasUI_ScenarioEditor_ScenarioEditor.cpp b/games/0ad/files/patch-source_tools_atlas_AtlasUI_ScenarioEditor_ScenarioEditor.cpp new file mode 100644 index 000000000000..4b1b88917a8c --- /dev/null +++ b/games/0ad/files/patch-source_tools_atlas_AtlasUI_ScenarioEditor_ScenarioEditor.cpp @@ -0,0 +1,56 @@ +--- source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp.orig 2018-03-13 20:20:45 UTC ++++ source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp +@@ -723,7 +723,7 @@ bool ScenarioEditor::OpenFile(const wxString& name, co + wxBusyInfo busy(_("Loading ") + name); + wxBusyCursor busyc; + +- AtlasMessage::qVFSFileExists qry(filename.wc_str()); ++ AtlasMessage::qVFSFileExists qry(filename.ToStdWstring()); + qry.Post(); + if (!qry.exists) + return false; +@@ -733,7 +733,7 @@ bool ScenarioEditor::OpenFile(const wxString& name, co + m_ToolManager.SetCurrentTool(_T("")); + // TODO: clear the undo buffer, etc + +- std::wstring map(filename.wc_str()); ++ std::wstring map(filename.ToStdWstring()); + POST_MESSAGE(LoadMap, (map)); + + SetOpenFilename(name); +@@ -786,7 +786,7 @@ void ScenarioEditor::OnImportHeightmap(wxCommandEvent& + + OpenFile(_T(""), _T("maps/scenarios/_default.xml")); + +- std::wstring image(dlg.GetPath().wc_str()); ++ std::wstring image(dlg.GetPath().ToStdWstring()); + POST_MESSAGE(ImportHeightmap, (image)); + + // TODO: Make this a non-undoable command +@@ -830,7 +830,7 @@ void ScenarioEditor::OnSave(wxCommandEvent& event) + // the preview units.) + m_ToolManager.SetCurrentTool(_T("")); + +- std::wstring map(m_OpenFilename.wc_str()); ++ std::wstring map(m_OpenFilename.ToStdWstring()); + POST_MESSAGE(SaveMap, (map)); + + // Wait for it to finish saving +@@ -852,7 +852,7 @@ void ScenarioEditor::OnSaveAs(wxCommandEvent& WXUNUSED + + m_ToolManager.SetCurrentTool(_T("")); + +- std::wstring map(filePath.wc_str()); ++ std::wstring map(filePath.ToStdWstring()); + POST_MESSAGE(SaveMap, (map)); + + SetOpenFilename(filePath); +@@ -920,7 +920,7 @@ void ScenarioEditor::OnJavaScript(wxCommandEvent& WXUN + wxString cmd = ::wxGetTextFromUser(_T(""), _("JS command"), _T(""), this); + if (cmd.IsEmpty()) + return; +- POST_MESSAGE(JavaScript, ((std::wstring)cmd.wc_str())); ++ POST_MESSAGE(JavaScript, ((std::wstring)cmd.ToStdWstring())); + } + + void ScenarioEditor::OnCameraReset(wxCommandEvent& WXUNUSED(event)) diff --git a/games/0ad/files/psutil.diff b/games/0ad/files/psutil.diff deleted file mode 100644 index 256ec324dfde..000000000000 --- a/games/0ad/files/psutil.diff +++ /dev/null @@ -1,50 +0,0 @@ ---- 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; |