Compare commits

..

No commits in common. "rawhide" and "f32" have entirely different histories.

23 changed files with 2790 additions and 5313 deletions

8
.gitignore vendored
View file

@ -6,11 +6,3 @@
/0ad-0.0.22-alpha-unix-build.tar.xz
/0ad-0.0.23-alpha-unix-build.tar.xz
/0ad-0.0.23b-alpha-unix-build.tar.xz
/0ad-0.0.24b-alpha-unix-build.tar.xz
/0ad-0.0.25-alpha-unix-build.tar.xz
/0ad-0.0.25b-alpha-unix-build.tar.xz
/0ad-0.0.26-alpha-unix-build.tar.xz
/0001-Bug-1654457-Update-virtualenv-to-20.0.31.-r-mhentges.patch
/0ad-0.27.0-unix-build.tar.xz
/0ad-0.27.1-unix-build.tar.xz
/premake-core-5.0.0-beta7.tar.gz

View file

@ -1,298 +0,0 @@
From d242631245edb66816ef9960bdb2c61b68e56cec Mon Sep 17 00:00:00 2001
From: phosit <phosit@3db68df2-c116-0410-a063-a993310a9797>
Date: Wed, 13 Dec 2023 19:42:00 +0000
Subject: [PATCH] Fix build with libxml2 v2.12.1
libxml2 v2.12.1 includes less header indirectly. Also `xmlError*` has to be changed to `const xmlError*`.
Original Patch By: Riesi
Accepted By: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D5219
git-svn-id: https://svn.wildfiregames.com/public/ps/trunk@27980 3db68df2-c116-0410-a063-a993310a9797
---
.../src/FCollada/FUtils/FUXmlDocument.cpp | 6 ++-
.../FArchiveXML/FArchiveXML.cpp | 43 ++++++++++---------
source/collada/CommonConvert.cpp | 5 ++-
source/collada/XMLFix.cpp | 4 +-
source/ps/XML/RelaxNG.cpp | 7 ++-
source/ps/XML/Xeromyces.cpp | 6 ++-
6 files changed, 41 insertions(+), 30 deletions(-)
diff --git a/libraries/source/fcollada/src/FCollada/FUtils/FUXmlDocument.cpp b/libraries/source/fcollada/src/FCollada/FUtils/FUXmlDocument.cpp
index 5349249a87..dd7be51672 100644
--- a/libraries/source/fcollada/src/FCollada/FUtils/FUXmlDocument.cpp
+++ b/libraries/source/fcollada/src/FCollada/FUtils/FUXmlDocument.cpp
@@ -2,7 +2,7 @@
Copyright (C) 2005-2007 Feeling Software Inc.
Portions of the code are:
Copyright (C) 2005-2007 Sony Computer Entertainment America
-
+
MIT License: http://www.opensource.org/licenses/mit-license.php
*/
@@ -13,10 +13,12 @@
#include "FUFile.h"
#include "FCDocument/FCDocument.h"
+#include <libxml/parser.h>
+
#define MAX_FILE_SIZE 10240000
//
// FUXmlDocument
-//
+//
FUXmlDocument::FUXmlDocument(FUFileManager* manager, const fchar* _filename, bool _isParsing)
: isParsing(_isParsing), filename(_filename)
diff --git a/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FArchiveXML.cpp b/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FArchiveXML.cpp
index af67478960..8222f6b244 100644
--- a/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FArchiveXML.cpp
+++ b/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FArchiveXML.cpp
@@ -2,7 +2,7 @@
Copyright (C) 2005-2007 Feeling Software Inc.
Portions of the code are:
Copyright (C) 2005-2007 Sony Computer Entertainment America
-
+
MIT License: http://www.opensource.org/licenses/mit-license.php
*/
@@ -77,6 +77,7 @@
#include "FCDocument/FCDVersion.h"
#include "FUtils/FUXmlDocument.h"
+#include <libxml/xmlIO.h>
//
// Constants
@@ -442,7 +443,7 @@ bool FArchiveXML::ImportFileFromMemory(const fchar* filePath, FCDocument* fcdocu
}
if (status) FUError::Error(FUError::DEBUG_LEVEL, FUError::DEBUG_LOAD_SUCCESSFUL);
- return status;
+ return status;
}
bool FArchiveXML::ExportFile(FCDocument* fcdocument, const fchar* filePath)
@@ -515,13 +516,13 @@ bool FArchiveXML::EndExport(fm::vector<uint8>& outData)
xmlOutputBufferPtr buf = xmlAllocOutputBuffer(NULL);
xmlNodeDumpOutput(buf, rootNode->doc, rootNode, 0, 0, NULL);
-#ifdef LIBXML2_NEW_BUFFER
- outData.resize(xmlOutputBufferGetSize(buf) * sizeof(xmlChar));
- memcpy(outData.begin(), xmlOutputBufferGetContent(buf), outData.size());
-#else
- outData.resize(buf->buffer->use * sizeof(xmlChar));
- memcpy(outData.begin(), buf->buffer->content, outData.size());
-#endif
+#ifdef LIBXML2_NEW_BUFFER
+ outData.resize(xmlOutputBufferGetSize(buf) * sizeof(xmlChar));
+ memcpy(outData.begin(), xmlOutputBufferGetContent(buf), outData.size());
+#else
+ outData.resize(buf->buffer->use * sizeof(xmlChar));
+ memcpy(outData.begin(), buf->buffer->content, outData.size());
+#endif
xmlOutputBufferClose(buf);
daeDocument.ReleaseXmlData();
@@ -591,7 +592,7 @@ bool FArchiveXML::Import(FCDocument* theDocument, xmlNode* colladaNode)
else if (IsEquivalent(child->name, DAE_LIBRARY_PMATERIAL_ELEMENT)) n.order = PHYSICS_MATERIAL;
else if (IsEquivalent(child->name, DAE_LIBRARY_PMODEL_ELEMENT)) n.order = PHYSICS_MODEL;
else if (IsEquivalent(child->name, DAE_LIBRARY_PSCENE_ELEMENT)) n.order = PHYSICS_SCENE;
- else if (IsEquivalent(child->name, DAE_ASSET_ELEMENT))
+ else if (IsEquivalent(child->name, DAE_ASSET_ELEMENT))
{
// Read in the asset information
status &= (FArchiveXML::LoadAsset(theDocument->GetAsset(), child));
@@ -679,9 +680,9 @@ bool FArchiveXML::Import(FCDocument* theDocument, xmlNode* colladaNode)
case IMAGE: status &= (FArchiveXML::LoadImageLibrary(theDocument->GetImageLibrary(), n.node)); break;
case LIGHT: status &= (FArchiveXML::LoadLightLibrary(theDocument->GetLightLibrary(), n.node)); break;
case MATERIAL: status &= (FArchiveXML::LoadMaterialLibrary(theDocument->GetMaterialLibrary(), n.node)); break;
- case PHYSICS_MODEL:
+ case PHYSICS_MODEL:
{
- status &= (FArchiveXML::LoadPhysicsModelLibrary(theDocument->GetPhysicsModelLibrary(), n.node));
+ status &= (FArchiveXML::LoadPhysicsModelLibrary(theDocument->GetPhysicsModelLibrary(), n.node));
size_t physicsModelCount = theDocument->GetPhysicsModelLibrary()->GetEntityCount();
for (size_t physicsModelCounter = 0; physicsModelCounter < physicsModelCount; physicsModelCounter++)
{
@@ -790,7 +791,7 @@ bool FArchiveXML::Import(FCDocument* theDocument, xmlNode* colladaNode)
{
// [staylor] Why is this done here? Shouldn't it be in FCDExternalReferenceManager?
// If it is, change it, either way delete the FUAssert (thanks)
- //FUAssert(false == true, ;);
+ // FUAssert(false == true, ;);
FArchiveXML::RegisterLoadedDocument(theDocument);
//FCDExternalReferenceManager::RegisterLoadedDocument(theDocument);
}
@@ -891,14 +892,14 @@ bool FArchiveXML::ExportDocument(FCDocument* theDocument, xmlNode* colladaNode)
// Export the emitter library
xmlNode* libraryNode = AddChild(typedTechniqueNode, DAE_LIBRARY_EMITTER_ELEMENT);
- if (!theDocument->GetEmitterLibrary()->GetTransientFlag())
+ if (!theDocument->GetEmitterLibrary()->GetTransientFlag())
FArchiveXML::WriteLibrary(theDocument->GetEmitterLibrary(), libraryNode);
}
// Write out the animations
if (animationLibraryNode != NULL)
{
- if (!theDocument->GetAnimationLibrary()->GetTransientFlag())
+ if (!theDocument->GetAnimationLibrary()->GetTransientFlag())
FArchiveXML::WriteLibrary(theDocument->GetAnimationLibrary(), animationLibraryNode);
}
@@ -978,7 +979,7 @@ xmlNode* FArchiveXML::WriteParentSwitch(FCDObject* object, const FUObjectType* o
{
return FArchiveXML::WriteSwitch(object, &objectType->GetParent(), node);
}
- else
+ else
{
FUBreak;
return NULL;
@@ -986,7 +987,7 @@ xmlNode* FArchiveXML::WriteParentSwitch(FCDObject* object, const FUObjectType* o
}
bool FArchiveXML::LoadAnimationLibrary(FCDObject* object, xmlNode* node)
-{
+{
return FArchiveXML::LoadLibrary<FCDAnimation>(object, node);
}
@@ -996,17 +997,17 @@ bool FArchiveXML::LoadAnimationClipLibrary(FCDObject* object, xmlNode* node)
}
bool FArchiveXML::LoadCameraLibrary(FCDObject* object, xmlNode* node)
-{
+{
return FArchiveXML::LoadLibrary<FCDCamera>(object, node);
}
bool FArchiveXML::LoadControllerLibrary(FCDObject* object, xmlNode* node)
-{
+{
return FArchiveXML::LoadLibrary<FCDController>(object, node);
}
bool FArchiveXML::LoadEffectLibrary(FCDObject* object, xmlNode* node)
-{
+{
return FArchiveXML::LoadLibrary<FCDEffect>(object, node);
}
@@ -1016,7 +1017,7 @@ bool FArchiveXML::LoadEmitterLibrary(FCDObject* object, xmlNode* node)
}
bool FArchiveXML::LoadForceFieldLibrary(FCDObject* object, xmlNode* node)
-{
+{
return FArchiveXML::LoadLibrary<FCDForceField>(object, node);
}
diff --git a/source/collada/CommonConvert.cpp b/source/collada/CommonConvert.cpp
index 391fcf47f6..c742873b45 100644
--- a/source/collada/CommonConvert.cpp
+++ b/source/collada/CommonConvert.cpp
@@ -1,4 +1,4 @@
-/* Copyright (C) 2018 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
@@ -28,8 +28,9 @@
#include "FUtils/FUDaeSyntax.h"
#include "FUtils/FUFileManager.h"
-#include <cassert>
#include <algorithm>
+#include <cassert>
+#include <libxml/xmlerror.h>
void require_(int line, bool value, const char* type, const char* message)
{
diff --git a/source/collada/XMLFix.cpp b/source/collada/XMLFix.cpp
index 2f1d67770e..fc5aa6bb38 100644
--- a/source/collada/XMLFix.cpp
+++ b/source/collada/XMLFix.cpp
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 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
@@ -23,6 +23,8 @@
#include "FUtils/FUXmlParser.h"
+#include <libxml/parser.h>
+
/*
Things that are fixed here:
diff --git a/source/ps/XML/RelaxNG.cpp b/source/ps/XML/RelaxNG.cpp
index 116b0007bf..296ed14403 100644
--- a/source/ps/XML/RelaxNG.cpp
+++ b/source/ps/XML/RelaxNG.cpp
@@ -1,4 +1,4 @@
-/* Copyright (C) 2021 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
@@ -25,9 +25,11 @@
#include "ps/CStr.h"
#include "ps/Filesystem.h"
+#include <libxml/parser.h>
#include <libxml/relaxng.h>
#include <map>
#include <mutex>
+#include <type_traits>
TIMER_ADD_CLIENT(xml_validation);
@@ -46,7 +48,8 @@ void ClearSchemaCache()
g_SchemaCache.clear();
}
-static void relaxNGErrorHandler(void* UNUSED(userData), xmlErrorPtr error)
+static void relaxNGErrorHandler(void* UNUSED(userData),
+ std::conditional_t<LIBXML_VERSION >= 21200, const xmlError, xmlError>* error)
{
// Strip a trailing newline
std::string message = error->message;
diff --git a/source/ps/XML/Xeromyces.cpp b/source/ps/XML/Xeromyces.cpp
index 5051c2bc74..3e83859d6f 100644
--- a/source/ps/XML/Xeromyces.cpp
+++ b/source/ps/XML/Xeromyces.cpp
@@ -1,4 +1,4 @@
-/* Copyright (C) 2021 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
@@ -33,12 +33,14 @@
#include "Xeromyces.h"
#include <libxml/parser.h>
+#include <type_traits>
static std::mutex g_ValidatorCacheLock;
static std::map<const std::string, RelaxNGValidator> g_ValidatorCache;
static bool g_XeromycesStarted = false;
-static void errorHandler(void* UNUSED(userData), xmlErrorPtr error)
+static void errorHandler(void* UNUSED(userData),
+ std::conditional_t<LIBXML_VERSION >= 21200, const xmlError, xmlError>* error)
{
// Strip a trailing newline
std::string message = error->message;
--
2.43.0

View file

@ -1,51 +0,0 @@
From 093e1eb23519ab4a4633a999a555a58e4fd5343e Mon Sep 17 00:00:00 2001
From: Stan <Stan@3db68df2-c116-0410-a063-a993310a9797>
Date: Sat, 13 May 2023 12:08:23 +0000
Subject: [PATCH] Fix compilation with GCC 13.
gcc-13 less often includes cstdint so one might need to include it manually if needed.
The headers already included in Message.h are included within namespace AtlasMessage which didn't break by chance, move them out and add cstdint.
Patch by: @sera
Reviewed by: @phosit
Fixes: #6800
Differential Revision: https://code.wildfiregames.com/D4997
git-svn-id: https://svn.wildfiregames.com/public/ps/trunk@27644 3db68df2-c116-0410-a063-a993310a9797
---
source/tools/atlas/GameInterface/Messages.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/source/tools/atlas/GameInterface/Messages.h b/source/tools/atlas/GameInterface/Messages.h
index 2fa4780921..a486d93a68 100644
--- a/source/tools/atlas/GameInterface/Messages.h
+++ b/source/tools/atlas/GameInterface/Messages.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2022 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
@@ -18,13 +18,15 @@
#ifndef INCLUDED_MESSAGES
#define INCLUDED_MESSAGES
+#include <cstdint>
+#include <string>
+#include <vector>
+
+// Opens namespace AtlasMessage, closes it on second inclusion!
#ifndef MESSAGES_SKIP_SETUP
#include "MessagesSetup.h"
#endif
-#include <vector>
-#include <string>
-
// TODO: organisation, documentation, etc
#ifdef _MSC_VER // (can't use MSC_VERSION here since this file is included by Atlas too)
--
2.41.0

View file

@ -1,51 +0,0 @@
From 839edc3ae61cd313d37a14a9a24e2ef1bd4e5808 Mon Sep 17 00:00:00 2001
From: Stan <Stan@3db68df2-c116-0410-a063-a993310a9797>
Date: Wed, 31 May 2023 12:03:04 +0000
Subject: [PATCH] Fix the removal of implicit conversions in libfmt 10 by using
explicit casts. Patch by: @phosit Accepted by: @vladislavbelov Comments by:
@sera
Differential Revision: https://code.wildfiregames.com/D4998
git-svn-id: https://svn.wildfiregames.com/public/ps/trunk@27657 3db68df2-c116-0410-a063-a993310a9797
---
source/network/NetMessage.cpp | 5 +++--
source/simulation2/serialization/BinarySerializer.cpp | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/source/network/NetMessage.cpp b/source/network/NetMessage.cpp
index 61126d8e1b..9515d939de 100644
--- a/source/network/NetMessage.cpp
+++ b/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 void* pData,
break;
default:
- LOGERROR("CNetMessageFactory::CreateMessage(): Unknown message type '%d' received", header.GetType());
+ LOGERROR("CNetMessageFactory::CreateMessage(): Unknown message type '%d' received",
+ static_cast<int>(header.GetType()));
break;
}
diff --git a/source/simulation2/serialization/BinarySerializer.cpp b/source/simulation2/serialization/BinarySerializer.cpp
index c24b84bb2c..4a6b57d7a9 100644
--- a/source/simulation2/serialization/BinarySerializer.cpp
+++ b/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<int>(arrayType));
throw PSERROR_Serialize_InvalidScriptValue();
}
}
--
2.41.0

View file

@ -1,81 +0,0 @@
From 95f1e91ef71d912be5f6dddb6fac68671d850fd6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= <fzatlouk@redhat.com>
Date: Sun, 24 Jul 2022 11:11:01 +0200
Subject: [PATCH] Python/Build: Use r instead of rU file read modes
Fixes Python 3.11 build
---
python/mozbuild/mozbuild/action/process_define_files.py | 2 +-
python/mozbuild/mozbuild/preprocessor.py | 6 +++---
python/mozbuild/mozbuild/util.py | 4 +++-
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/python/mozbuild/mozbuild/action/process_define_files.py b/python/mozbuild/mozbuild/action/process_define_files.py
index 6fff0d1..de2bcf4 100644
--- a/python/mozbuild/mozbuild/action/process_define_files.py
+++ b/python/mozbuild/mozbuild/action/process_define_files.py
@@ -36,7 +36,7 @@ def process_define_file(output, input):
not config.substs.get('JS_STANDALONE'):
config = PartialConfigEnvironment(mozpath.join(topobjdir, 'js', 'src'))
- with open(path, 'rU') as input:
+ with open(path, 'r') as input:
r = re.compile('^\s*#\s*(?P<cmd>[a-z]+)(?:\s+(?P<name>\S+)(?:\s+(?P<value>\S+))?)?', re.U)
for l in input:
m = r.match(l)
diff --git a/python/mozbuild/mozbuild/preprocessor.py b/python/mozbuild/mozbuild/preprocessor.py
index 0e3a750..66f5cf7 100644
--- a/python/mozbuild/mozbuild/preprocessor.py
+++ b/python/mozbuild/mozbuild/preprocessor.py
@@ -517,7 +517,7 @@ class Preprocessor:
if args:
for f in args:
- with io.open(f, 'rU', encoding='utf-8') as input:
+ with io.open(f, 'r', encoding='utf-8') as input:
self.processFile(input=input, output=out)
if depfile:
mk = Makefile()
@@ -807,7 +807,7 @@ class Preprocessor:
args = self.applyFilters(args)
if not os.path.isabs(args):
args = os.path.join(self.curdir, args)
- args = io.open(args, 'rU', encoding='utf-8')
+ args = io.open(args, 'r', encoding='utf-8')
except Preprocessor.Error:
raise
except Exception:
@@ -862,7 +862,7 @@ def preprocess(includes=[sys.stdin], defines={},
pp = Preprocessor(defines=defines,
marker=marker)
for f in includes:
- with io.open(f, 'rU', encoding='utf-8') as input:
+ with io.open(f, 'r', encoding='utf-8') as input:
pp.processFile(input=input, output=output)
return pp.includes
diff --git a/python/mozbuild/mozbuild/util.py b/python/mozbuild/mozbuild/util.py
index 044cf64..eb992ce 100644
--- a/python/mozbuild/mozbuild/util.py
+++ b/python/mozbuild/mozbuild/util.py
@@ -54,6 +54,8 @@ def exec_(object, globals=None, locals=None):
def _open(path, mode):
+ if mode == "rU":
+ mode = "r"
if 'b' in mode:
return io.open(path, mode)
return io.open(path, mode, encoding='utf-8', newline='\n')
@@ -220,7 +222,7 @@ class FileAvoidWrite(BytesIO):
still occur, as well as diff capture if requested.
"""
- def __init__(self, filename, capture_diff=False, dry_run=False, readmode='rU'):
+ def __init__(self, filename, capture_diff=False, dry_run=False, readmode='r'):
BytesIO.__init__(self)
self.name = filename
assert type(capture_diff) == bool
--
2.37.1

View file

@ -1,26 +0,0 @@
diff -up source/gui/tests/test_CGUIText.h.orig source/gui/tests/test_CGUIText.h
--- source/gui/tests/test_CGUIText.h.orig 2022-09-23 16:16:46.000000000 -0300
+++ source/gui/tests/test_CGUIText.h 2022-09-26 11:32:31.318155833 -0300
@@ -316,6 +316,11 @@ public:
void test_regression_rP26522()
{
+ if (!VfsDirectoryExists(L"mods/mod/"))
+ {
+ debug_printf("Skipping regression rP26522 tests (can't find binaries/data/mods/mod/)\n");
+ return;
+ }
TS_ASSERT_OK(g_VFS->Mount(L"", DataDir() / "mods" / "mod" / "", VFS_MOUNT_MUST_EXIST));
CGUI gui(g_ScriptContext);
--- source/network/tests/test_StunClient.h
+++ source/network/tests/test_StunClient.h
@@ -42,7 +42,7 @@
CStr ip;
TS_ASSERT(StunClient::FindLocalIP(ip));
// Quick validation that this looks like a valid IP address.
- if (ip.size() < 8 || ip.size() > 15)
+ if (ip.size() < 7 || ip.size() > 15)
{
TS_FAIL("StunClient::FindLocalIP did not return a valid IPV4 address: wrong size");
return;

View file

@ -1,21 +1,20 @@
diff -up libraries/source/fcollada/src/Makefile.orig libraries/source/fcollada/src/Makefile
--- libraries/source/fcollada/src/Makefile.orig 2021-02-22 11:16:57.680708209 -0300
+++ libraries/source/fcollada/src/Makefile 2021-02-22 11:23:49.577033354 -0300
@@ -9,13 +9,10 @@ endif
--- libraries/source/fcollada/src/Makefile.orig 2015-03-14 13:28:07.304868532 -0300
+++ libraries/source/fcollada/src/Makefile 2015-03-14 13:28:11.168868680 -0300
@@ -9,12 +9,9 @@ endif
CXX ?= g++
CXXFLAGS += -fvisibility=hidden -W -Wall -Wno-unused-parameter -Wno-unused-function $(OS_DEFINE) $(PIC_FLAGS) $(CPPFLAGS)
-CXXFLAGS_DEBUG := -O0 -g -D_DEBUG -DRETAIL
CXXFLAGS_RELEASE := -O2 -DNDEBUG -DRETAIL
-CXXFLAGS_TEST := -O0 -g -D_DEBUG
LDFLAGS_TEST= -ldl
LIBS += `pkg-config libxml-2.0 --libs`
INCLUDES += -IFCollada `pkg-config libxml-2.0 --cflags`
-INCLUDES_TEST := -IFCollada/FColladaTest $(INCLUDES)
# FCollada is not aliasing-safe, so disallow dangerous optimisations
# (TODO: It'd be nice to fix FCollada, but that looks hard)
@@ -181,57 +178,16 @@ SOURCE = \
@@ -180,72 +177,19 @@ SOURCE = \
FColladaPlugins/FArchiveXML/FAXSceneExport.cpp \
FColladaPlugins/FArchiveXML/FAXSceneImport.cpp \
@ -68,33 +67,23 @@ diff -up libraries/source/fcollada/src/Makefile.orig libraries/source/fcollada/s
+all: output/libFColladaSR.a install
output_dirs:
- @for x in debug release test; \
+ @for x in release; \
do \
mkdir -p output/$$x/FColladaPlugins/FArchiveXML; \
- for y in FCDocument FMath FUtils FColladaTest; \
+ for y in FCDocument FMath FUtils; \
do \
for z in FCTestAssetManagement FCTestExportImport FCTestXRef; \
do \
@@ -240,23 +196,11 @@ output_dirs:
done \
done
- bash -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 )
- (cp -r FCollada/FColladaTest/Samples/ output/Samples && cd output/ && ./FColladaTest && cat FColladaTestLog.txt)
- ( cd FCollada/FColladaTest/ ; ../../output/FColladaTest )
- cat FCollada/FColladaTest/FColladaTestLog.txt
-
-output/libFColladaSD.a: $(OBJECTS_DEBUG) | output_dirs
- @echo "$@"
- @ar -cr $@ $(OBJECTS_DEBUG); ranlib $@
-
+ bash -c 'mkdir -p output/release/{FCollada/{FCDocument,FMath,FUtils,FColladaTest/{FCTestAssetManagement,FCTestExportImport,FCTestXRef}},FColladaPlugins/FArchiveXML}'
output/libFColladaSR.a: $(OBJECTS_RELEASE) | output_dirs
@echo "$@"
@ar -cr $@ $(OBJECTS_RELEASE); ranlib $@
-output/FColladaTest: $(OBJECTS_TEST) | output_dirs
- $(CXX) -o $@ $(OBJECTS_TEST) $(LIBS) $(LDFLAGS_TEST)
- $(CXX) -o $@ $(LDFLAGS) $(OBJECTS_TEST) $(LIBS)
-
-install: output/libFColladaSD.a output/libFColladaSR.a
- cp output/libFColladaSD.a ../lib/libFColladaSD.a
@ -102,7 +91,7 @@ diff -up libraries/source/fcollada/src/Makefile.orig libraries/source/fcollada/s
cp output/libFColladaSR.a ../lib/libFColladaSR.a
dfile = $(@:.o=.d)
@@ -266,18 +210,10 @@ gendep = \
@@ -255,18 +199,10 @@ gendep = \
sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $(dfile) >> $(Pfile) && \
rm -f $(dfile)

41
0ad-fcollada.patch Normal file
View file

@ -0,0 +1,41 @@
diff -up 0ad-0.0.23b-alpha/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FArchiveXML.h.orig 0ad-0.0.23b-alpha/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FArchiveXML.h
--- 0ad-0.0.23b-alpha/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FArchiveXML.h.orig 2020-03-30 16:28:20.011982827 -0300
+++ 0ad-0.0.23b-alpha/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FArchiveXML.h 2020-03-31 11:43:27.669098382 -0300
@@ -553,7 +553,16 @@ public:
static void WritePhysicsRigidBodyParameters(FCDPhysicsRigidBodyParameters* physicsRigidBodyParameters, xmlNode* techniqueNode);
template <class TYPE, int QUAL>
- static xmlNode* AddPhysicsParameter(xmlNode* parentNode, const char* name, FCDParameterAnimatableT<TYPE,QUAL>& value);
+ static xmlNode* AddPhysicsParameter(xmlNode* parentNode, const char* name, FCDParameterAnimatableT<TYPE,QUAL>& value) {
+ xmlNode* paramNode = AddChild(parentNode, name);
+ AddContent(paramNode, FUStringConversion::ToString((TYPE&) value));
+ if (value.IsAnimated())
+ {
+ const FCDAnimated* animated = value.GetAnimated();
+ FArchiveXML::WriteAnimatedValue(animated, paramNode, name);
+ }
+ return paramNode;
+ }
//
diff -up 0ad-0.0.23b-alpha/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FAXPhysicsExport.cpp.orig 0ad-0.0.23b-alpha/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FAXPhysicsExport.cpp
--- 0ad-0.0.23b-alpha/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FAXPhysicsExport.cpp.orig 2008-09-07 19:13:25.000000000 -0300
+++ 0ad-0.0.23b-alpha/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FAXPhysicsExport.cpp 2020-03-31 11:43:24.577115067 -0300
@@ -329,16 +329,3 @@ void FArchiveXML::WritePhysicsRigidBodyP
FArchiveXML::LetWriteObject(physicsRigidBodyParameters->GetPhysicsShape(i), techniqueNode);
}
}
-
-template <class TYPE, int QUAL>
-xmlNode* FArchiveXML::AddPhysicsParameter(xmlNode* parentNode, const char* name, FCDParameterAnimatableT<TYPE,QUAL>& value)
-{
- xmlNode* paramNode = AddChild(parentNode, name);
- AddContent(paramNode, FUStringConversion::ToString((TYPE&) value));
- if (value.IsAnimated())
- {
- const FCDAnimated* animated = value.GetAnimated();
- FArchiveXML::WriteAnimatedValue(animated, paramNode, name);
- }
- return paramNode;
-}

View file

@ -1,38 +0,0 @@
diff -ur 0ad-0.0.26-alpha.orig/build/premake/premake5/contrib/libzip/config.h 0ad-0.0.26-alpha/build/premake/premake5/contrib/libzip/config.h
--- 0ad-0.0.26-alpha.orig/build/premake/premake5/contrib/libzip/config.h 2022-08-21 14:46:10.000000000 +0200
+++ 0ad-0.0.26-alpha/build/premake/premake5/contrib/libzip/config.h 2023-12-19 11:59:06.813263959 +0100
@@ -22,6 +22,8 @@
/* #undef HAVE_STRUCT_TM_TM_ZONE */
#ifdef _WIN32
#define HAVE_MOVEFILEEXA
+#else
+#define HAVE_UNISTD_H
#endif
/* #undef HAVE_STRINGS_H */
/* #undef HAVE_UNISTD_H */
diff -ur 0ad-0.0.26-alpha.orig/build/premake/premake5/contrib/libzip/mkstemp.c 0ad-0.0.26-alpha/build/premake/premake5/contrib/libzip/mkstemp.c
--- 0ad-0.0.26-alpha.orig/build/premake/premake5/contrib/libzip/mkstemp.c 2022-08-21 14:46:10.000000000 +0200
+++ 0ad-0.0.26-alpha/build/premake/premake5/contrib/libzip/mkstemp.c 2023-12-19 11:48:55.459472284 +0100
@@ -40,6 +40,8 @@
#include <fcntl.h>
#ifdef _WIN32
#include <io.h>
+#else
+#include <unistd.h>
#endif
#include <stdio.h>
#include <stdlib.h>
diff -ur 0ad-0.0.26-alpha.orig/build/premake/premake5/contrib/libzip/zip_fdopen.c 0ad-0.0.26-alpha/build/premake/premake5/contrib/libzip/zip_fdopen.c
--- 0ad-0.0.26-alpha.orig/build/premake/premake5/contrib/libzip/zip_fdopen.c 2022-08-21 14:46:10.000000000 +0200
+++ 0ad-0.0.26-alpha/build/premake/premake5/contrib/libzip/zip_fdopen.c 2023-12-19 12:06:24.709819140 +0100
@@ -35,6 +35,10 @@
#include "zipint.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
ZIP_EXTERN struct zip *

View file

@ -1,33 +0,0 @@
From 5643e90b19ea443d69b3d83dab5b79bd2c7ca8db Mon Sep 17 00:00:00 2001
From: Heiko Becker <mail@heiko-becker.de>
Date: Sat, 9 Nov 2024 13:25:52 +0100
Subject: [PATCH] Fix building with ICU >= 76
Since version 76 ICU wants to prevent overlinking [1] and icu-i18n
doesn't add icu-uc to the link interface anymore.
[1] https://github.com/unicode-org/icu/commit/199bc827021ffdb43b6579d68e5eecf54c7f6f56
---
build/premake/extern_libs5.lua | 2 ++
1 file changed, 2 insertions(+)
diff --git a/build/premake/extern_libs5.lua b/build/premake/extern_libs5.lua
index 8bbf808912..de84a8272e 100644
--- a/build/premake/extern_libs5.lua
+++ b/build/premake/extern_libs5.lua
@@ -432,6 +432,7 @@ extern_lib_defs = {
add_default_include_paths("icu")
else
pkgconfig.add_includes("icu-i18n")
+ pkgconfig.add_includes("icu-uc")
end
end,
link_settings = function()
@@ -444,6 +445,7 @@ extern_lib_defs = {
})
else
pkgconfig.add_links("icu-i18n")
+ pkgconfig.add_links("icu-uc")
end
end,
},

File diff suppressed because it is too large Load diff

View file

@ -1,37 +0,0 @@
diff -Naur 0ad-0.0.26-alpha.old/source/network/NetServer.cpp 0ad-0.0.26-alpha/source/network/NetServer.cpp
--- 0ad-0.0.26-alpha.old/source/network/NetServer.cpp 2024-10-08 23:50:11.583206377 +0200
+++ 0ad-0.0.26-alpha/source/network/NetServer.cpp 2024-10-08 23:53:47.161712553 +0200
@@ -302,7 +302,11 @@
else if ((devlist = upnpDiscover(10000, 0, 0, 0, 0, 0)) != NULL)
#endif
{
+#if defined(MINIUPNPC_API_VERSION) && MINIUPNPC_API_VERSION >= 18
+ ret = UPNP_GetValidIGD(devlist, &urls, &data, internalIPAddress, sizeof(internalIPAddress), nullptr, 0);
+#else
ret = UPNP_GetValidIGD(devlist, &urls, &data, internalIPAddress, sizeof(internalIPAddress));
+#endif
allocatedUrls = ret != 0; // urls is allocated on non-zero return values
}
else
@@ -320,10 +324,21 @@
case 1:
LOGMESSAGE("Net server: found valid IGD = %s", urls.controlURL);
break;
+#if defined(MINIUPNPC_API_VERSION) && MINIUPNPC_API_VERSION >= 18
+ case 2:
+ LOGMESSAGE("Net server: found IGD with reserved IP = %s, will try to continue anyway", urls.controlURL);
+ break;
+ case 3:
+#else
case 2:
+#endif
LOGMESSAGE("Net server: found a valid, not connected IGD = %s, will try to continue anyway", urls.controlURL);
break;
+#if defined(MINIUPNPC_API_VERSION) && MINIUPNPC_API_VERSION >= 18
+ case 4:
+#else
case 3:
+#endif
LOGMESSAGE("Net server: found a UPnP device unrecognized as IGD = %s, will try to continue anyway", urls.controlURL);
break;
default:

21
0ad-mozjs38.patch Normal file
View file

@ -0,0 +1,21 @@
diff -up 0ad-0.0.23b-alpha/libraries/source/spidermonkey/build.sh.orig 0ad-0.0.23b-alpha/libraries/source/spidermonkey/build.sh
--- 0ad-0.0.23b-alpha/libraries/source/spidermonkey/build.sh.orig 2019-09-30 15:33:27.690089303 -0300
+++ 0ad-0.0.23b-alpha/libraries/source/spidermonkey/build.sh 2019-09-30 15:47:16.201374941 -0300
@@ -27,7 +27,7 @@ fi
MAKE_OPTS="${JOBS}"
-CONF_OPTS="--enable-shared-js --disable-tests --without-intl-api"
+CONF_OPTS="--enable-shared-js --disable-tests --without-intl-api --disable-optimize"
# Bug 1269319
# When compiled with GCC 6 (or later), SpiderMonkey 38 (and versions up to 49) is
@@ -37,7 +37,7 @@ if [ "${OS}" != "Windows_NT" ]
then
if [ "`${CXX:=g++} -dumpversion | cut -f1 -d.`" -ge "6" ]
then
- CXXFLAGS="${CXXFLAGS} -fno-schedule-insns2 -fno-delete-null-pointer-checks"
+ CXXFLAGS="${CXXFLAGS} -fpermissive -fno-tree-vrp -fno-strict-aliasing -fno-schedule-insns2 -fno-delete-null-pointer-checks"
fi
fi

336
0ad-ppc64.patch Normal file
View file

@ -0,0 +1,336 @@
commit 25511c8fd48533d34475dbc9215032ce76e77e93
Author: root <root@rcs-power9-talos>
Date: Mon Aug 20 17:54:30 2018 -0400
Enable support for powerpc64 systems
All features tested and work, internal checks pass
diff --git a/build/premake/premake4.lua b/build/premake/premake4.lua
index 8b997e22a7..c62bcb3634 100644
--- a/build/premake/premake4.lua
+++ b/build/premake/premake4.lua
@@ -88,6 +88,8 @@ else
arch = "arm"
elseif string.find(machine, "aarch64") == 1 then
arch = "aarch64"
+ 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
@@ -823,6 +825,8 @@ function setup_all_libs ()
table.insert(source_dirs, "lib/sysdep/arch/x86_x64");
elseif arch == "arm" then
table.insert(source_dirs, "lib/sysdep/arch/arm");
+ elseif arch == "ppc64" then
+ table.insert(source_dirs, "lib/sysdep/arch/ppc64");
elseif arch == "aarch64" then
table.insert(source_dirs, "lib/sysdep/arch/aarch64");
end
diff --git a/build/premake/premake5.lua b/build/premake/premake5.lua
index 36928fb290..2dab672961 100644
--- a/build/premake/premake5.lua
+++ b/build/premake/premake5.lua
@@ -81,6 +81,8 @@ else
arch = "arm"
elseif string.find(machine, "aarch64") == 1 then
arch = "aarch64"
+ 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
@@ -823,6 +825,8 @@ function setup_all_libs ()
table.insert(source_dirs, "lib/sysdep/arch/x86_x64");
elseif arch == "arm" then
table.insert(source_dirs, "lib/sysdep/arch/arm");
+ elseif arch == "ppc64" then
+ table.insert(source_dirs, "lib/sysdep/arch/ppc64");
elseif arch == "aarch64" then
table.insert(source_dirs, "lib/sysdep/arch/aarch64");
end
diff --git a/libraries/source/nvtt/src/src/nvcore/poshlib/posh.h b/libraries/source/nvtt/src/src/nvcore/poshlib/posh.h
index 2a178ab843..953601b327 100644
--- a/libraries/source/nvtt/src/src/nvcore/poshlib/posh.h
+++ b/libraries/source/nvtt/src/src/nvcore/poshlib/posh.h
@@ -663,7 +663,7 @@ Metrowerks:
** the MIPS series, so we have to be careful about those.
** ----------------------------------------------------------------------------
*/
-#if defined POSH_CPU_X86 || defined POSH_CPU_AXP || defined POSH_CPU_STRONGARM || defined POSH_CPU_AARCH64 || defined POSH_OS_WIN32 || defined POSH_OS_WINCE || defined __MIPSEL__
+#if defined POSH_CPU_X86 || defined POSH_CPU_AXP || defined POSH_CPU_STRONGARM || defined POSH_CPU_AARCH64 || defined POSH_OS_WIN32 || defined POSH_OS_WINCE || defined __MIPSEL__ || __LITTLE_ENDIAN__
# define POSH_ENDIAN_STRING "little"
# define POSH_LITTLE_ENDIAN 1
#else
diff --git a/libraries/source/nvtt/src/src/nvmath/Plane.h b/libraries/source/nvtt/src/src/nvmath/Plane.h
index bc7128c4f5..6c989fd075 100644
--- a/libraries/source/nvtt/src/src/nvmath/Plane.h
+++ b/libraries/source/nvtt/src/src/nvmath/Plane.h
@@ -6,6 +6,10 @@
#include <nvmath/nvmath.h>
#include <nvmath/Vector.h>
+#if NV_USE_ALTIVEC
+#undef vector
+#endif
+
namespace nv
{
class Matrix;
diff --git a/libraries/source/nvtt/src/src/nvtt/squish/simd_ve.h b/libraries/source/nvtt/src/src/nvtt/squish/simd_ve.h
index 56ed95e0a6..a21ea47fe0 100644
--- a/libraries/source/nvtt/src/src/nvtt/squish/simd_ve.h
+++ b/libraries/source/nvtt/src/src/nvtt/squish/simd_ve.h
@@ -1,6 +1,7 @@
/* -----------------------------------------------------------------------------
Copyright (c) 2006 Simon Brown si@sjbrown.co.uk
+ Copyright (c) 2016 Raptor Engineering, LLC
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -31,7 +32,7 @@
namespace squish {
-#define VEC4_CONST( X ) Vec4( ( vector float )( X ) )
+#define VEC4_CONST( X ) Vec4( vec_splats( (float)X ) )
class Vec4
{
@@ -96,7 +97,7 @@ public:
Vec4& operator*=( Arg v )
{
- m_v = vec_madd( m_v, v.m_v, ( vector float )( -0.0f ) );
+ m_v = vec_madd( m_v, v.m_v, vec_splats( -0.0f ) );
return *this;
}
@@ -112,7 +113,7 @@ public:
friend Vec4 operator*( Vec4::Arg left, Vec4::Arg right )
{
- return Vec4( vec_madd( left.m_v, right.m_v, ( vector float )( -0.0f ) ) );
+ return Vec4( vec_madd( left.m_v, right.m_v, vec_splats( -0.0f ) ) );
}
//! Returns a*b + c
@@ -133,7 +134,7 @@ public:
vector float estimate = vec_re( v.m_v );
// one round of Newton-Rhaphson refinement
- vector float diff = vec_nmsub( estimate, v.m_v, ( vector float )( 1.0f ) );
+ vector float diff = vec_nmsub( estimate, v.m_v, vec_splats( 1.0f ) );
return Vec4( vec_madd( diff, estimate, estimate ) );
}
diff --git a/source/graphics/TextureConverter.cpp b/source/graphics/TextureConverter.cpp
index 05392da6ee..531aec74ca 100644
--- a/source/graphics/TextureConverter.cpp
+++ b/source/graphics/TextureConverter.cpp
@@ -45,6 +45,10 @@ struct BufferOutputHandler : public nvtt::OutputHandler
{
}
+ virtual void endImage()
+ {
+ }
+
virtual bool writeData(const void* data, int size)
{
size_t off = buffer.size();
diff --git a/source/lib/alignment.h b/source/lib/alignment.h
index f7b20dd29a..ad81081a55 100644
--- a/source/lib/alignment.h
+++ b/source/lib/alignment.h
@@ -80,7 +80,18 @@ static const size_t cacheLineSize = 64; // (L2)
// MMU pages
//
+#ifdef __PPC64__
+// NOTE: ppc64 can operate in either 4k or 64k page size mode
+// If the define page size is larger than the active page size,
+// the allocator functions normally. If the defined page size
+// is less than the active page size, the allocator fails tests.
+//
+// Define the page size to the maximum known architectural page
+// size on ppc64 systems.
+static const size_t g_PageSize = 64 * 1024; // 64 KB
+#else
static const size_t g_PageSize = 4 * 1024; // 4 KB
+#endif
static const size_t g_LargePageSize = 2 * 1024 * 1024; // 2 MB
diff --git a/source/lib/byte_order.h b/source/lib/byte_order.h
index c75be1384e..32476eeccc 100644
--- a/source/lib/byte_order.h
+++ b/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 || defined(__LITTLE_ENDIAN__)
+# if ARCH_IA32 || ARCH_IA64 || ARCH_AMD64 || ARCH_ALPHA || ARCH_ARM || ARCH_AARCH64 || ARCH_PPC64 || ARCH_MIPS || defined(__LITTLE_ENDIAN__)
# define BYTE_ORDER LITTLE_ENDIAN
# else
# define BYTE_ORDER BIG_ENDIAN
diff --git a/source/lib/sysdep/arch.h b/source/lib/sysdep/arch.h
index e3e520f2e1..789a5e3ae3 100644
--- a/source/lib/sysdep/arch.h
+++ b/source/lib/sysdep/arch.h
@@ -64,6 +64,12 @@
#else
# define ARCH_AARCH64 0
#endif
+// .. PowerPC64 (PPC64)
+#if defined(__PPC64__)
+# define ARCH_PPC64 1
+#else
+# define ARCH_PPC64 0
+#endif
// .. MIPS
#if defined(__MIPS__) || defined(__mips__) || defined(__mips)
# define ARCH_MIPS 1
@@ -72,7 +78,7 @@
#endif
// ensure exactly one architecture has been detected
-#if (ARCH_IA32+ARCH_IA64+ARCH_AMD64+ARCH_ALPHA+ARCH_ARM+ARCH_AARCH64+ARCH_MIPS) != 1
+#if (ARCH_IA32+ARCH_IA64+ARCH_AMD64+ARCH_ALPHA+ARCH_ARM+ARCH_AARCH64+ARCH_PPC64+ARCH_MIPS) != 1
# error "architecture not correctly detected (either none or multiple ARCH_* defined)"
#endif
diff --git a/source/lib/sysdep/arch/ppc64/ppc64.cpp b/source/lib/sysdep/arch/ppc64/ppc64.cpp
new file mode 100644
index 0000000000..66a9b5ff75
--- /dev/null
+++ b/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
+}
diff --git a/source/ps/GameSetup/HWDetect.cpp b/source/ps/GameSetup/HWDetect.cpp
index f2c0f4765f..82829d80bd 100644
--- a/source/ps/GameSetup/HWDetect.cpp
+++ b/source/ps/GameSetup/HWDetect.cpp
@@ -247,6 +247,7 @@ void RunHardwareDetection()
scriptInterface.SetProperty(settings, "arch_amd64", ARCH_AMD64);
scriptInterface.SetProperty(settings, "arch_arm", ARCH_ARM);
scriptInterface.SetProperty(settings, "arch_aarch64", ARCH_AARCH64);
+ scriptInterface.SetProperty(settings, "arch_ppc64", ARCH_PPC64);
#ifdef NDEBUG
scriptInterface.SetProperty(settings, "build_debug", 0);
diff --git a/extract/0ad-0.0.23b-alpha/libraries/source/spidermonkey/Fixppc64.diff b/extract/0ad-0.0.23b-alpha/libraries/source/spidermonkey/Fixppc64.diff
new file mode 100644
index 0000000..7b8ea69
--- /dev/null
+++ b/libraries/source/spidermonkey/Fixppc64.diff
@@ -0,0 +1,47 @@
+From a0b0b09b078356dcc54113f085042c5deff9050d Mon Sep 17 00:00:00 2001
+From: Mark Benvenuto <mark.benvenuto@mongodb.com>
+Date: Thu, 17 Dec 2015 15:13:41 -0500
+Subject: [PATCH] SERVER-21845 Fix debug non-jit builds of spidermonkey
+
+---
+ .../mozjs-38/extract/js/src/jit/CodeGenerator.cpp | 6 +++---
+ .../mozjs-38/extract/js/src/jit/none/MacroAssembler-none.h | 6 ++++++
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/src/third_party/mozjs-38/extract/js/src/jit/CodeGenerator.cpp b/src/third_party/mozjs-38/extract/js/src/jit/CodeGenerator.cpp
+index 82f9cf6869c..f04ef3fa2b0 100644
+--- a/js/src/jit/CodeGenerator.cpp
++++ b/js/src/jit/CodeGenerator.cpp
+@@ -3464,12 +3464,12 @@ CodeGenerator::visitCallDirectEvalV(LCallDirectEvalV* lir)
+ callVM(DirectEvalValueInfo, lir);
+ }
+
+-// Registers safe for use before generatePrologue().
+-static const uint32_t EntryTempMask = Registers::TempMask & ~(1 << OsrFrameReg.code());
+-
+ void
+ CodeGenerator::generateArgumentsChecks(bool bailout)
+ {
++ // Registers safe for use before generatePrologue().
++ static const uint32_t EntryTempMask = Registers::TempMask & ~(1 << OsrFrameReg.code());
++
+ // This function can be used the normal way to check the argument types,
+ // before entering the function and bailout when arguments don't match.
+ // For debug purpose, this is can also be used to force/check that the
+diff --git a/src/third_party/mozjs-38/extract/js/src/jit/none/MacroAssembler-none.h b/src/third_party/mozjs-38/extract/js/src/jit/none/MacroAssembler-none.h
+index 77ed4382749..ef1ec17d766 100644
+--- a/js/src/jit/none/MacroAssembler-none.h
++++ b/js/src/jit/none/MacroAssembler-none.h
+@@ -131,6 +131,12 @@ class Assembler : public AssemblerShared
+ static void ToggleCall(CodeLocationLabel, bool) { MOZ_CRASH(); }
+
+ static uintptr_t GetPointer(uint8_t*) { MOZ_CRASH(); }
++
++ void verifyHeapAccessDisassembly(uint32_t begin, uint32_t end,
++ const Disassembler::HeapAccess &heapAccess)
++ {
++ MOZ_CRASH();
++ }
+ };
+
+ class Operand
diff --git a/extract2/0ad-0.0.23b-alpha/libraries/source/spidermonkey/patch.sh b/extract/0ad-0.0.23b-alpha/libraries/source/spidermonkey/patch.sh
index b10d82f..dd1f6c6 100644
--- a/libraries/source/spidermonkey/patch.sh
+++ b/libraries/source/spidermonkey/patch.sh
@@ -53,3 +53,5 @@ patch -p1 < ../FixTracelogger.diff
# Based on: https://svnweb.freebsd.org/ports/head/sysutils/py-psutil121/files/patch-_psutil_bsd.c?revision=436575&view=markup
# Related: https://bugzilla.mozilla.org/show_bug.cgi?id=1238983
patch -p0 < ../FixpsutilFreeBSD.diff
+
+patch -p1 < ../Fixppc64.diff

View file

@ -1,35 +0,0 @@
--- 0ad-0.0.26-alpha/libraries/source/spidermonkey/patch.sh.virtualenv 2022-09-30 13:48:58.606978147 +0200
+++ 0ad-0.0.26-alpha/libraries/source/spidermonkey/patch.sh 2022-09-30 13:49:52.645852256 +0200
@@ -2,6 +2,17 @@
# Apply patches if needed
# This script gets called from build.sh.
+git init . -b main
+git config user.name 'rpm-build'
+git config user.email '<rpm-build>'
+git add .
+git commit -m 'Initial commit'
+git am --keep-cr __SOURCE3__
+git am --keep-cr __SOURCE4__
+
+# Use python3.11 instead of 3.12 for Fedora builds
+sed -i -e 's/exec python3 /exec python3.11 /' js/src/configure*
+
# SM78 fails to create virtual envs on macs with python > 3.7
# Unfortunately, 3.7 is mostly unavailable on ARM macs.
# Therefore, replace the custom script with a more up-to-date version from pip
@@ -24,14 +24,6 @@
export PYTHONPATH="$(pwd)/virtualenv:$PYTHONPATH"
patch -p1 < ../FixVirtualEnv.diff
fi
-else
- # In python 3.10 `sysconfig._get_default_scheme()` was renamed to
- # `sysconfig.get_default_scheme()`. This breaks the version of
- # `virtualenv` bundled with the spidermonkey source code.
- #
- # It is assumed that the updated version fetched for macOS systems
- # above does not have this problem.
- patch -p1 < ../FixVirtualenvForPython310.diff
fi
# Mozglue symbols need to be linked against static builds.

12
0ad-ryzen-3000.patch Normal file
View file

@ -0,0 +1,12 @@
Index: trunk/source/lib/sysdep/arch/x86_x64/cache.cpp
===================================================================
--- trunk/source/lib/sysdep/arch/x86_x64/cache.cpp (revision 23261)
+++ trunk/source/lib/sysdep/arch/x86_x64/cache.cpp (revision 23262)
@@ -90,5 +90,6 @@
{
0, 1, 2, 0, 4, 0, 8, 0,
- 16, 0, 32, 48, 64, 96, 128, x86_x64::Cache::fullyAssociative
+ // TODO: The second '16' does not obey to the specifications and is only a workaround. For a correct implementation please look here: https://community.amd.com/thread/244207
+ 16, 16, 32, 48, 64, 96, 128, x86_x64::Cache::fullyAssociative
};

24
0ad-valgrind.patch Normal file
View file

@ -0,0 +1,24 @@
diff -uNr 0ad-0.0.23-alpha.orig/build/premake/extern_libs4.lua 0ad-0.0.23-alpha/build/premake/extern_libs4.lua
--- 0ad-0.0.23-alpha.orig/build/premake/extern_libs4.lua 2018-04-08 23:41:31.000000000 +0200
+++ 0ad-0.0.23-alpha/build/premake/extern_libs4.lua 2018-05-22 13:24:21.468033629 +0200
@@ -655,7 +655,7 @@
},
valgrind = {
compile_settings = function()
- add_source_include_paths("valgrind")
+ pkgconfig_cflags("valgrind")
end,
},
vorbis = {
diff -uNr 0ad-0.0.23-alpha.orig/build/premake/extern_libs5.lua 0ad-0.0.23-alpha/build/premake/extern_libs5.lua
--- 0ad-0.0.23-alpha.orig/build/premake/extern_libs5.lua 2018-04-29 17:44:48.000000000 +0200
+++ 0ad-0.0.23-alpha/build/premake/extern_libs5.lua 2018-05-22 13:24:21.468033629 +0200
@@ -620,7 +620,7 @@
},
valgrind = {
compile_settings = function()
- add_source_include_paths("valgrind")
+ pkgconfig.add_includes("valgrind")
end,
},
vorbis = {

111
0ad.6
View file

@ -1,7 +1,7 @@
.TH 0AD "6" "Sep 24 2022" "0ad 0.0.26 Zhuangzi" "User Commands"
.TH 0AD "6" "Mar 13 2015" "0ad 0.0.18 Rhododactylos" "User Commands"
.SH NAME
0ad \- manual page for 0ad 0.0.26 Zhuangzi
0ad \- manual page for 0ad 0.0.18 Rhododactylos
.SH SYNOPSIS
.B 0ad
[\fIoptions\fR]
@ -38,50 +38,17 @@ Autostart:
enables autostart and sets \fIMAPNAME\fR; \fITYPEDIR\fR is \fIskirmishes\fR,
\fIscenarios\fR, or \fIrandom\fR
.TP
\fB\-autostart-seed\fR=\fISEED\fR:\fIAI\fR
sets randomozation seed value (default 0, use -1 for random)
.TP
\fB\-autostart-ai\fR=\fIPLAYER\fR:\fIAI\fR
sets the \fIAI\fR for \fIPLAYER\fR (e.g. 2:petra)
.TP
\fB\-autostart-aidiff\fR=\fIPLAYER\fR:\fIDIFF\fR
sets the \fIDIFF\fRiculty of \fIPLAYER\fR's \fIAI\fR (0: sandbox, 5: very hard)
\fB-autostart-aidiff\fR=\fIPLAYER\fR:\fIDIFF\fR
sets the \fIDIFF\fRiculty of \fIPLAYER\fR's \fIAI\fR (0: easy, 3: very hard)
.TP
\fB\-autostart-aiseed\fR=\fIAISEED\fR
sets the seed used for the \fIAI\fR random generator (default 0, use -1 for
random)
.TP
\fB\-autostart-civ\fR=\fIPLAYER\fR:\fICIV\fR
\fB-autostart-civ\fR=\fIPLAYER\fR:\fICIV\fR
sets \fIPLAYER\fR's civilisation to \fICIV\fR (skirmish and random maps only)
.TP
\fB\-autostart-team\fR=\fIPLAYER\fR:\fITEAM\fR
sets the team for \fIPLAYER\fR (e.g. 2:2).
.TP
\fB\-autostart-ceasefire\fR=\fINUM\fR
sets a ceasefire duration \fINUM\fR (default 0 minutes)
.TP
\fB\-autostart-nonvisual\fR
disable any graphics and sounds
.TP
\fB\-autostart-victory\fR=\fISCRIPTNAME\fR
sets the victory conditions with \fISCRIPTNAME\fR located in
simulation/data/settings/victory_conditions/ (default conquest). When the
first given \fISCRIPTNAME\fR is "endless", no victory conditions will apply.
.TP
\fB\-autostart-wonderduration\fR=\fINUM\fR
sets the victory duration \fINUM\fR for wonder victory condition (default
10 minutes)
.TP
\fB\-autostart-relicduration\fR=\fINUM\fR
sets the victory duration \fINUM\fR for relic victory condition (default
10 minutes)
.TP
\fB\-autostart-reliccount\fR=\fINUM\fR
sets the number of relics for relic victory condition (default 2 relics)
.TP
\fB\-autostart-disable-replay\fR
disable saving of replays
\fB-autostart-aiseed\fR=\fIAISEED\fR
sets the seed used for the \fIAI\fR random generator (default 0, use -1 for random)
.PP
Multiplayer:
@ -101,24 +68,24 @@ sets multiplayer client to join host host at given \fIIP\fR address
.PP
Random maps only:
.TP
\fB\-autostart-seed\fR=\fISEED\fR
sets random map \fISEED\fR value (default 0, use -1 for random)
.TP
\fB\-autostart-size\fR=\fITILES\fR
sets random map size in \fITILES\fR (default 192)
.TP
\fB\-autostart-players\fR=\fINUMBER\fI
sets \fINUMBER\fR of players on random map (default 2)
.PP
RL client:
.TP
\fB\-rl-interface\fR
Run the RL interface (see source/tools/rlclient)
.PP
Configuration:
.TP
\fB\-conf\fR=\fIKEY\fR:\fIVALUE\fR
set a config value
.TP
\fB\-g\fR=\fIF\fR
set the gamma correction to '\fIF\fR' (default 1.0)
.TP
\fB\-nosound\fR
disable audio
.TP
@ -137,18 +104,9 @@ set screen \fIX\fR resolution to '\fIN\fR'
\fB\-yres\fR=\fIN\fR
set screen \fIY\fR resolution to '\fIN\fR'
.PP
Installing modes:
\fBPATHS\fR
install mods located at \fIPATHS\fR. For instance:
"./pyrogenesis mod1.pyromod mod2.zip"
.PP
Advanced / diagnostic:
.TP
\fB\-version\fR
print the version of the engine and exit
.TP
\fB\-dumpSchema\fR
creates a file \fIentity.rng\fR in the working directory, containing
complete entity XML schema, used by various analysis tools
@ -166,11 +124,6 @@ complete entity XML schema, used by various analysis tools
non-visual replay of a previous game, used for analysis purposes
\fIPATH\fR is system path to \fIcommands.txt\fR containing simulation log
.TP
.TP
\fB\-replay-visual\fR=\fIPATH\fR
visual replay of a previous game, used for analysis purposes
\fIPATH\fR is system path to \fIcommands.txt\fR containing simulation log
.TP
\fB\-writableRoot\fR
store runtime game data in root data directory
(only use if you have write permissions on that directory)
@ -184,35 +137,16 @@ run much slower with this option!
checks simulation state each turn for serialization errors; on test
failure, error is displayed and logs created in oos_log within the
game's log folder. \fBNOTE\fR: game will run much slower with this option!
.TP
\fB\-rejointest\fR=\fIN\fR
simulates a rejoin and checks simulation state each turn for serialization
errors; this is similar to a serialization test but much faster and
less complete. It should be enough for debugging most rejoin OOSes.
.TP
\fB\-unique-logs\fR
adds unix timestamp and process id to the filename of mainlog.html,
interestinglog.html and oos_dump.txt to prevent these files from becoming
overwritten by another pyrogenesis process.
.TP
\fB\-hashtest-full\fR=\fIX\fR
whether to enable computation of full hashes in replaymode (default true).
Can be disabled to improve performance.
.TP
\fB\-hashtest-quick\fR=\fIX\fR
whether to enable computation of quick hashes in replaymode (default false).
Can be enabled for debugging purposes.
.PP
Archive builder:
.TP
\fB\-archivebuild\fR=\fIPATH\fR
system \fIPATH\fR of the base directory containing mod data to be
archived/precached specify all mods it depends on with \fB-mod\fR=\fINAME\fR
system \fIPATH\fR of the base directory containing mod data to be archived/precached
specify all mods it depends on with \fB-mod\fR=\fINAME\fR
.TP
\fB\-archivebuild-output\fR=\fIPATH\fR
system \fIPATH\fR to output of the resulting .zip archive (use with
archivebuild)
system \fIPATH\fR to output of the resulting .zip archive (use with archivebuild)
.TP
\fB\-archivebuild-compress\fR
enable deflate compression in the .zip
@ -224,22 +158,11 @@ enable deflate compression in the .zip
.nf
-autostart="scenarios/Arcadia 02" -autostart-host -autostart-host-players=2 -autostart-playername="Bob"
.fi
"Alice" joins the match as player 2:
.nf
-autostart="scenarios/Arcadia" -autostart-client=127.0.0.1 -autostart-playername="Alice"
.fi
The players use the developer overlay to control players.
.TP
\fB2)\fR Load Alpine Lakes random map with random seed, 2 players (Athens
and Britons), and player 2 is PetraBot:
\fB2)\fR Load Alpine Lakes random map with random seed, 2 players (Athens and Britons), and player 2 is PetraBot:
.nf
-autostart="random/alpine_lakes" -autostart-seed=-1 -autostart-players=2 -autostart-civ=1:athen -autostart-civ=2:brit -autostart-ai=2:petra
.fi
.TP
\fB3)\fR Observe the PetraBot on a triggerscript map:
.nf
-autostart="random/jebel_barkal" -autostart-seed=-1 -autostart-players=2 -autostart-civ=1:athen -autostart-civ=2:brit -autostart-ai=1:petra -autostart-ai=2:petra -autostart-player=-1
.fi
.SH "REPORTING BUGS"
Bugs should be reported on Trac. For information on reporting problems

344
0ad.spec
View file

@ -10,9 +10,7 @@
%global dbg %{nil}
%endif
# Does not build with mozjs-78
# source/scriptinterface/ScriptTypes.h:85:2: error: #error Your compiler is trying to use an untested minor version of the SpiderMonkey library. If you are a package maintainer, please make sure to check very carefully that this version does not change the behaviour of the code executed by SpiderMonkey. Different parts of the game (e.g. the multiplayer mode) rely on deterministic behaviour of the JavaScript engine. A simple way for testing this would be playing a network game with one player using the old version and one player using the new version. Another way for testing is running replays and comparing the final hash (check trac.wildfiregames.com/wiki/Debugging#Replaymode). For more information check this link: trac.wildfiregames.com/wiki/Debugging#Outofsync
%bcond_without system_mozjs115
%bcond_with system_mozjs38
# Remember to rerun licensecheck after every update:
# https://bugzilla.redhat.com/show_bug.cgi?id=818401#c46
@ -23,11 +21,11 @@
# Exclude private libraries from autogenerated provides and requires
%global __provides_exclude_from ^%{_libdir}/0ad/
%global __requires_exclude ^(libAtlasUI.*\.so|libCollada.*\.so|libmozjs78.*\.so)
%global __requires_exclude ^(libAtlasUI.*\.so|libCollada.*\.so|libmozjs38.*\.so)
Name: 0ad
Version: 0.27.1
Release: 7%{?dist}
Version: 0.0.23b
Release: 17%{?dist}
# BSD License:
# build/premake/*
# libraries/source/miniupnpc/* (not built/used)
@ -44,8 +42,7 @@ Release: 7%{?dist}
# source/tools/fontbuilder2/Packer.py
# MPL-2.0
# libraries/source/spidermonkey/* (not built/used)
# Automatically converted from old format: GPLv2+ and BSD and MIT and IBM and MPLv2.0 - review is highly recommended.
License: GPL-2.0-or-later AND LicenseRef-Callaway-BSD AND LicenseRef-Callaway-MIT AND IPL-1.0 AND MPL-2.0
License: GPLv2+ and BSD and MIT and IBM
Summary: Cross-Platform RTS Game of Ancient Warfare
Url: http://play0ad.com
@ -57,7 +54,7 @@ Url: http://play0ad.com
# tar Jcf %%{name}-%%{version}-alpha-unix-build.tar.xz %%{name}-%%{version}-alpha
Source0: %{name}-%{version}-alpha-unix-build.tar.xz
%else
Source0: http://releases.wildfiregames.com/%{name}-%{version}-unix-build.tar.xz
Source0: http://releases.wildfiregames.com/%{name}-%{version}-alpha-unix-build.tar.xz
%endif
# Simplify checking differences when updating the package
@ -73,92 +70,87 @@ Source1: %{name}-licensecheck.txt
# and disabled options were not added to the manual page.
Source2: %{name}.6
# Patches to bundled mozjs for Python 3.11 and setuptools 60+ compatibility
Source3: 0001-Bug-1654457-Update-virtualenv-to-20.0.31.-r-mhentges.patch
Source4: 0001-Python-Build-Use-r-instead-of-rU-file-read-modes.patch
Source5: premake-core-5.0.0-beta7.tar.gz
Requires: %{name}-data = %{version}
Requires: hicolor-icon-theme
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: cxxtest
BuildRequires: desktop-file-utils
BuildRequires: enet-devel
BuildRequires: gamin-devel
BuildRequires: gcc-c++
BuildRequires: gloox-devel
BuildRequires: fmt-devel
BuildRequires: libcurl-devel
BuildRequires: libdnet-devel
BuildRequires: libicu-devel
BuildRequires: libjpeg-turbo-devel
BuildRequires: libpng-devel
BuildRequires: libsodium-devel
BuildRequires: libvorbis-devel
BuildRequires: libxml2-devel
BuilDrequires: libuuid-devel
BuildRequires: libzip-devel
BuildRequires: make
BuildRequires: miniupnpc-devel
BuildRequires: libsodium-devel
%if %{with system_nvtt}
BuildRequires: nvidia-texture-tools-devel
%endif
BuildRequires: openal-soft-devel
BuildRequires: openjpeg-devel
BuildRequires: pkgconfig
BuildRequires: python2
BuildRequires: SDL2-devel
BuildRequires: subversion
BuildRequires: valgrind-devel
BuildRequires: wxGTK-devel
BuildRequires: wxGTK3-devel
BuildRequires: /usr/bin/appstream-util
BuildRequires: /usr/bin/python
%if %{without system_mozjs115}
%if %{without system_mozjs38}
# bundled mozjs
BuildRequires: pkgconfig(nspr)
BuildRequires: pkgconfig(libffi)
BuildRequires: pkgconfig(zlib)
BuildRequires: readline-devel
BuildRequires: rustc
BuildRequires: cargo
BuildRequires: /usr/bin/zip
# for patching bundled mozjs
BuildRequires: git-core
%else
BuildRequires: pkgconfig(mozjs-115)
%endif
# bundled mozjs: For build time tests only
BuildRequires: python3.11-devel
BuildRequires: python-devel
BuildRequires: perl-devel
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc64le
%if %{without system_mozjs115}
Provides: bundled(mozjs) = 115
%if %{without system_mozjs38}
Provides: bundled(mozjs) = 38
%endif
# Only do fcollada debug build with enabling debug maintainer mode
# It also prevents assumption there that it is building in x86
Patch1: %{name}-debug.patch
Patch2: %{name}-check.patch
Patch3: %{name}-python311.patch
Patch4: 0001-Fix-the-removal-of-implicit-conversions-in-libfmt-10.patch
Patch5: 0001-Fix-compilation-with-GCC-13.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2255223
Patch6: 0ad-gcc-14.patch
Patch7: 0001-Fix-build-with-libxml2-v2.12.1.patch
# https://gitea.wildfiregames.com/0ad/0ad/commit/38e3f5cec04f29f747515248ca3f002bd1cc52a8
Patch8: %{name}-miniupnp228.patch
# https://gitea.wildfiregames.com/0ad/0ad/commit/5643e90b19ea443d69b3d83dab5b79bd2c7ca8db
Patch9: 0ad-icu76.patch
# https://gitea.wildfiregames.com/0ad/0ad/pulls/7234
# pulled from https://gitlab.archlinux.org/archlinux/packaging/packages/0ad/-/blob/a26-20/49507c04e027b0d48e050bfc38ae2b631d7403c7.patch
# due to 500 errors upstream
Patch10: 49507c04e027b0d48e050bfc38ae2b631d7403c7.patch
# Re-enable ppc64le
Patch11: 638c04987ef134edea2b87d5f97996219206cebb.patch
Patch12: 59cb3cd67b2b51a5bcc9d052d8d77e2f2a4b89b7.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1141464
Patch3: %{name}-valgrind.patch
# Fix build on ppc64le with patches from https://wiki.raptorcs.com/wiki/Porting/0ad
Patch5: %{name}-ppc64.patch
# Due to significant reports matching:
# https://trac.wildfiregames.com/ticket/4053
# [[PATCH] Building spidermonkey on GCC 6 results in segfaults in the Garbage Collector]
# Basically reinstantiate:
# https://src.fedoraproject.org/rpms/mozjs38/c/761399aba092bcb1299bb4fccfd60f370ab4216e
Patch6: %{name}-mozjs38.patch
# Possibly a gcc 10 or binutils 2.34 ld bug. Likely there is an explanation,
# but could not create a simple reproducer.
# Workaround was a single template declaration/definition by defining the
# template in the header file with the class declaration.
# https://bugzilla.redhat.com/show_bug.cgi?id=1799112
Patch7: %{name}-fcollada.patch
# Workaround for Ryzen 3000 CPU support
# https://bugzilla.redhat.com/show_bug.cgi?id=1822835
# https://trac.wildfiregames.com/changeset/23262
Patch8: 0ad-ryzen-3000.patch
%description
0 A.D. (pronounced "zero ey-dee") is a free, open-source, cross-platform
@ -174,31 +166,23 @@ hobbyist game developers, since 2001.
#-----------------------------------------------------------------------
%prep
%setup -q -n %{name}-%{version}
%setup -q -n %{name}-%{version}-alpha
%if ! %{with debug}
# disable debug build, and "int 0x3" to trap to debugger (x86 only)
#%%patch -P1 -p0
%patch1 -p0
%endif
#%%patch -P2 -p0
%patch3 -p1
%patch5 -p1
%patch6 -p1
# Related to 0ad-mozjs38.patch
%ifarch %{ix86}
sed -i "s/\(-fno-delete-null-pointer-checks\)/\1 -O0/" \
libraries/source/spidermonkey/build.sh
%endif
#end Related to 0ad-mozjs38.patch
# Patch bundled mozjs for Python 3.11 and setuptools 60+ compatibility
#%%patch -P3 -p1
#sed -e 's|__SOURCE3__|%{SOURCE3}|' \
# -e 's|__SOURCE4__|%{SOURCE4}|' \
# -i libraries/source/spidermonkey/patch.sh
#%%patch -P4 -p1
#%%patch -P5 -p1
#%%patch -P6 -p1
#%%patch -P7 -p1
#%%patch -P8 -p1
#%%patch -P9 -p1
#%%patch -P10 -p1
%patch -P11 -p1
%patch -P12 -p1
cp %{SOURCE5} libraries/source/premake-core/
%patch7 -p1
%patch8 -p1
%if %{with system_nvtt}
rm -fr libraries/source/nvtt
@ -208,26 +192,15 @@ rm -fr libraries/source/valgrind
#-----------------------------------------------------------------------
%build
# LTO appears to break hotkey tests in GuiManager test suite.
# Disable LTO to fix the failing tests.
%define _lto_cflags %{nil}
%set_build_flags
# Unset RUSTFLAGS to work around mozjs not supporting taking more than one flag
# https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/243#comment-134252
unset RUSTFLAGS
./libraries/source/premake-core/build.sh
./libraries/source/cxxtest-4.4/build.sh
./libraries/source/fcollada/build.sh
export CFLAGS="%{optflags}"
# avoid warnings with gcc 4.7 due to _FORTIFY_SOURCE in CPPFLAGS
export CPPFLAGS="`echo %{optflags} | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//'`"
build/workspaces/update-workspaces.sh \
--bindir=%{_bindir} \
--datadir=%{_datadir}/%{name} \
--libdir=%{_libdir}/%{name} \
%if %{with system_mozjs115}
--with-system-mozjs \
%if %{with system_mozjs38}
--with-system-mozjs38 \
%endif
%if %{with system_nvtt}
--with-system-nvtt \
@ -256,11 +229,11 @@ for name in nvcore nvimage nvmath nvtt; do
done
%endif
%if %{without system_mozjs115}
%if %{without system_mozjs38}
%if %{with debug}
name=mozjs115-ps-debug
name=mozjs38-ps-debug
%else
name=mozjs115-ps-release
name=mozjs38-ps-release
%endif
install -p -m 755 binaries/system/lib${name}.so %{buildroot}%{_libdir}/%{name}/lib${name}.so
%endif
@ -288,17 +261,19 @@ export STRIP=/bin/true
#-----------------------------------------------------------------------
%check
# Depends on availablity of nvtt
#%%if %{with nvtt}
#LD_LIBRARY_PATH=binaries/system binaries/system/test%{dbg} -libdir binaries/system
#%%endif
%ifnarch aarch64 ppc64le
%if %{with nvtt}
LD_LIBRARY_PATH=binaries/system binaries/system/test%{dbg} -libdir binaries/system
%endif
%endif
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/0ad.appdata.xml
desktop-file-validate %{buildroot}%{_datadir}/applications/0ad.desktop
#-----------------------------------------------------------------------
%files
%doc README.md
%license LICENSE.md
%doc README.txt
%license LICENSE.txt
%license license_gpl-2.0.txt license_lgpl-2.1.txt license_mit.txt
%{_bindir}/0ad
%{_bindir}/pyrogenesis%{dbg}
@ -310,187 +285,6 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/0ad.desktop
%{_mandir}/man6/*.6*
%changelog
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.27.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Mon Jan 12 2026 Jonathan Wakely <jwakely@fedoraproject.org> - 0.27.1-6
- Rebuilt for Boost 1.90
* Tue Sep 23 2025 Gwyn Ciesla <gwync@protonmail.com> - 0.27.1-5
- Re-enable ppc64le
* Fri Aug 08 2025 František Zatloukal <fzatlouk@redhat.com> - 0.27.1-4
- Rebuild for mozjs115 rebuilt with icu 77.1
* Wed Aug 06 2025 František Zatloukal <fzatlouk@redhat.com> - 0.27.1-3
- Rebuilt for icu 77.1
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.27.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu Jul 17 2025 Gwyn Ciesla <gwync@protonmail.com> - 0.27.1-1
- 0.27.1
* Mon Jul 14 2025 Gwyn Ciesla <gwync@protonmail.com> - 0.27.0-1
- 0.27.0, drop ppc64le, unsupported by premake.
* Mon Jul 14 2025 Gwyn Ciesla <gwync@protonmail.com> - 0.0.26-31
- miniupnp rebuild.
* Thu Mar 13 2025 Dennis Gilmore <dennis@ausil.us> - 0.0.26-30
- add patch for audio device crash
* Tue Feb 18 2025 Dennis Gilmore <dennis@ausil.us> - 0.0.26-29
- Rebuild for updated dependencies.
* Tue Jan 28 2025 Simone Caronni <negativo17@gmail.com> - 0.0.26-28
- Rebuild for updated dependencies.
* Mon Jan 20 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.26-27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.26-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Mon Dec 09 2024 Pete Walter <pwalter@fedoraproject.org> - 0.0.26-25
- Rebuild for ICU 76
* Tue Oct 08 2024 Simone Caronni <negativo17@gmail.com> - 0.0.26-24
- Rebuild for updated miniupnpc.
* Wed Sep 04 2024 Miroslav Suchý <msuchy@redhat.com> - 0.0.26-23
- convert license to SPDX
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.26-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Tue Mar 19 2024 Dominik Mierzejewski <dominik@greysector.net> - 0.0.26-21
- Rebuild for gloox 1.0.28
* Wed Jan 31 2024 Pete Walter <pwalter@fedoraproject.org> - 0.0.26-20
- Rebuild for ICU 74
* Mon Jan 29 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.26-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.26-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.26-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jan 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.26-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jan 17 2024 Jonathan Wakely <jwakely@redhat.com> - 0.0.26-15
- Rebuilt for Boost 1.83
* Wed Oct 18 2023 Kalev Lember <klember@redhat.com> - 0.0.26-14
- Use python3.11 during build time to fix FTBFS (#2225686)
* Thu Oct 05 2023 Remi Collet <remi@remirepo.net> - 0.0.26-13
- rebuild for new libsodium
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.26-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jul 11 2023 František Zatloukal <fzatlouk@redhat.com> - 0.0.26-11
- Rebuilt for ICU 73.2
* Wed Jun 28 2023 Kalev Lember <klember@redhat.com> - 0.0.26-10
- Backport an upstream patch to fix the build with fmt 10
- Backport an upstream patch to fix atlas build with gcc 13
* Wed Jun 28 2023 Vitaly Zaitsev <vitaly@easycoding.org> - 0.0.26-9
- Rebuilt due to fmt 10 update.
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.26-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Dec 31 2022 Pete Walter <pwalter@fedoraproject.org> - 0.0.26-7
- Rebuild for ICU 71
* Tue Dec 06 2022 Kalev Lember <klember@redhat.com> - 0.0.26-6
- Drop unused openjpeg-devel build dep
* Wed Nov 23 2022 Kalev Lember <klember@redhat.com> - 0.0.26-5
- Rebuild for wxGLCanvas ABI change
* Thu Oct 20 2022 Scott Talbert <swt@techie.net> - 0.0.26-4
- Rebuild with wxWidgets 3.2
* Sat Oct 01 2022 Kalev Lember <klember@redhat.com> - 0.0.26-3
- Fix a self test failure when building under systemd-nspawn based mock
- Re-enable self tests for all arches
* Fri Sep 30 2022 Kalev Lember <klember@redhat.com> - 0.0.26-2
- Fix FTBFS with Python 3.11 and setuptools 60+ in F37 (#2045149)
* Mon Sep 26 2022 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.0.26-1
- Update to 0.0.26
* Mon Aug 01 2022 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.0.25b-6
- Rebuilt for ICU 71.1
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.25b-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed May 04 2022 Thomas Rodgers <trodgers@redhat.com> - 0.0.25b-4
- Rebuilt for Boost 1.78
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.25b-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Sep 27 2021 Bruno Wolff III <bruno@wolff.to> - 0.0.25b-2
- Fix for building bundled spidermonkey with python3.10
* Mon Sep 06 2021 Kalev Lember <klember@redhat.com> - 0.0.25b-1
- Update to 0.0.25b
* Sun Aug 08 2021 Kalev Lember <klember@redhat.com> - 0.0.25-1
- Update to 0.0.25
* Fri Aug 06 2021 Jonathan Wakely <jwakely@redhat.com> - 0.0.24b-6
- Rebuilt for Boost 1.76
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.24b-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Jul 05 2021 Richard Shaw <hobbes1069@gmail.com> - 0.0.24b-4
- Rebuild for new fmt version.
* Wed May 19 2021 Pete Walter <pwalter@fedoraproject.org> - 0.0.24b-3
- Rebuild for ICU 69
* Sat Feb 27 2021 Kalev Lember <klember@redhat.com> - 0.0.24b-2
- Use set_build_flags macro to set CFLAGS/CXXFLAGS/LDFLAGS
- Disable LTO to fix self test failures
* Mon Feb 22 2021 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.0.24b-1
- Update to 0.0.24b
* Wed Feb 03 2021 Kalev Lember <klember@redhat.com> - 0.0.23b-24
- Drop unused gamin-devel build dep
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.23b-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Jan 22 14:23:02 GMT 2021 Jonathan Wakely <jwakely@redhat.com> - 0.0.23b-22
- Rebuilt for Boost 1.75
* Fri Jul 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.23b-21
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 27 2020 Jeff Law <law@redhat.com> - 0.0.23b-20
- Disable LTO on i686 for now
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.23b-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jun 03 2020 Björn Esser <besser82@fedoraproject.org> - 0.0.23b-18
- Rebuilt for Boost 1.73 again
* Sun May 31 2020 Björn Esser <besser82@fedoraproject.org> - 0.0.23b-17
- Rebuild (gloox)

View file

@ -1,48 +0,0 @@
From 49507c04e027b0d48e050bfc38ae2b631d7403c7 Mon Sep 17 00:00:00 2001
From: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Date: Wed, 20 Nov 2024 20:19:36 +0100
Subject: [PATCH] Make failed audio device query non fatal
Querring the audio device name may fail. The name is only used for the
sake of logging it for debugging. Avoid querry failure to be fatal and
insted just log the issue.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
---
source/soundmanager/SoundManager.cpp | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/source/soundmanager/SoundManager.cpp b/source/soundmanager/SoundManager.cpp
index 6cd34f19ac..ed045d8efd 100644
--- a/source/soundmanager/SoundManager.cpp
+++ b/source/soundmanager/SoundManager.cpp
@@ -838,15 +838,23 @@ void CSoundManager::RunHardwareDetection()
else
devices = alcGetString(nullptr, ALC_DEVICE_SPECIFIER);
}
- WARN_IF_FALSE(devices);
m_SoundCardNames.clear();
- do
+ if (devices)
{
- m_SoundCardNames += devices;
- devices += strlen(devices) + 1;
- m_SoundCardNames += "; ";
- } while (*devices);
+ do
+ {
+ m_SoundCardNames += devices;
+ devices += strlen(devices) + 1;
+ m_SoundCardNames += "; ";
+ } while (*devices);
+ }
+ else
+ {
+ const char* failMsg = "Failed to query audio device names";
+ LOGERROR(failMsg);
+ m_SoundCardNames = failMsg;
+ }
// Driver version
const ALCchar* al_version = alGetString(AL_VERSION);

View file

@ -1,11 +0,0 @@
--- 0ad-0.27.1/libraries/source/premake-core/build.sh~ 2025-07-14 09:31:46.000000000 -0500
+++ 0ad-0.27.1/libraries/source/premake-core/build.sh 2025-10-22 13:12:20.324058370 -0500
@@ -8,7 +8,7 @@
cd "$(dirname "$0")"
-PV=5.0.0-beta4
+PV=5.0.0-beta7
LIB_VERSION=${PV}+wfg0
fetch()

View file

@ -1,217 +0,0 @@
From 638c04987ef134edea2b87d5f97996219206cebb Mon Sep 17 00:00:00 2001
From: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Date: Wed, 19 Feb 2025 20:07:09 +0100
Subject: [PATCH] Bump premake to version 5.0.0-beta6
This makes 5.0.0-beta5 the minimally supported version as the gmake2
action was renamed to gmake while gmake was renamed to gmakelegacy. So
from now on gmake action is to be used.
Clear out all old version dependent code.
Fixes: #7789
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
---
build/premake/cxxtest/cxxtest.lua | 6 ++--
build/premake/extern_libs5.lua | 48 ++++----------------------
build/premake/pkgconfig/pkgconfig.lua | 26 +++-----------
build/premake/premake5.lua | 24 ++++++-------
build/workspaces/update-workspaces.sh | 4 +--
libraries/get-windows-libs.bat | 2 +-
libraries/source/premake-core/build.sh | 4 +--
7 files changed, 31 insertions(+), 83 deletions(-)
diff --git a/build/premake/cxxtest/cxxtest.lua b/build/premake/cxxtest/cxxtest.lua
index 70840b70a2..c9e35d5c26 100644
--- a/build/premake/cxxtest/cxxtest.lua
+++ b/build/premake/cxxtest/cxxtest.lua
@@ -41,7 +41,7 @@ function m.init(have_std, have_eh, runner, includes, root_includes)
-- With gmake, create a Utility project that generates the test root file
-- This is a workaround for https://github.com/premake/premake-core/issues/286
- if _ACTION == "gmake2" then
+ if _ACTION == "gmake" then
project "cxxtestroot"
kind "Makefile"
@@ -64,7 +64,7 @@ function m.configure_project(hdrfiles)
-- Generate the root file, or make sure the utility for generating
-- it is a dependancy with gmake.
- if _ACTION == "gmake2" then
+ if _ACTION == "gmake" then
dependson { "cxxtestroot" }
else
prebuildmessage 'Generating test root file'
@@ -92,7 +92,7 @@ function m.configure_project(hdrfiles)
-- Add source files
files { "%{wks.location}/generated/test_root.cpp" }
- if not (_ACTION == "gmake2") then
+ if not (_ACTION == "gmake") then
for _,hdrfile in ipairs(hdrfiles) do
local srcfile = "%{wks.location}/generated/".. path.getbasename(hdrfile) .. ".cpp"
files { srcfile }
diff --git a/build/premake/extern_libs5.lua b/build/premake/extern_libs5.lua
index 575b7f1dc0..b70df7d620 100644
--- a/build/premake/extern_libs5.lua
+++ b/build/premake/extern_libs5.lua
@@ -38,33 +38,15 @@ local function add_source_lib_paths(extern_lib)
end
local function add_default_include_paths(extern_lib)
- -- As of premake5-beta2, `sysincludedirs` has been deprecated in favour of
- -- `externalincludedirs`, and continuing to use it causes warnings to be emitted.
- --
- -- We use `externalincludedirs` when available to prevent the warnings, falling back
- -- to `sysincludedirs` when not to prevent breakage of the `--with-system-premake5`
- -- build argument.
- if externalincludedirs then
- externalincludedirs { libraries_dir .. extern_lib .. "/include" }
- else
- sysincludedirs { libraries_dir .. extern_lib .. "/include" }
- end
+ externalincludedirs { libraries_dir .. extern_lib .. "/include" }
end
local function add_source_include_paths(extern_lib)
- if externalincludedirs then
- externalincludedirs { libraries_source_dir .. extern_lib .. "/include" }
- else
- sysincludedirs { libraries_source_dir .. extern_lib .. "/include" }
- end
+ externalincludedirs { libraries_source_dir .. extern_lib .. "/include" }
end
local function add_third_party_include_paths(extern_lib)
- if externalincludedirs then
- externalincludedirs { third_party_source_dir .. extern_lib .. "/include" }
- else
- sysincludedirs { third_party_source_dir .. extern_lib .. "/include" }
- end
+ externalincludedirs { third_party_source_dir .. extern_lib .. "/include" }
end
local function wx_config_path()
@@ -239,11 +221,7 @@ extern_lib_defs = {
end
-- TODO: This actually applies to most libraries we use on BSDs, make this a global setting.
if os.istarget("bsd") then
- if externalincludedirs then
- externalincludedirs { "/usr/local/include" }
- else
- sysincludedirs { "/usr/local/include" }
- end
+ externalincludedirs { "/usr/local/include" }
end
end,
link_settings = function()
@@ -274,11 +252,7 @@ extern_lib_defs = {
cxxtest = {
compile_settings = function()
if not _OPTIONS["with-system-cxxtest"] then
- if externalincludedirs then
- externalincludedirs { libraries_source_dir .. "cxxtest-4.4" }
- else
- sysincludedirs { libraries_source_dir .. "cxxtest-4.4" }
- end
+ externalincludedirs { libraries_source_dir .. "cxxtest-4.4" }
-- Upstream uses WIN32 instead of _WIN32 define
if os.istarget("windows") then
defines { "WIN32" }
@@ -658,18 +632,10 @@ extern_lib_defs = {
end
else
filter "Debug"
- if externalincludedirs then
- externalincludedirs { libraries_source_dir.."spidermonkey/include-debug" }
- else
- sysincludedirs { libraries_source_dir.."spidermonkey/include-debug" }
- end
+ externalincludedirs { libraries_source_dir.."spidermonkey/include-debug" }
defines { "DEBUG" }
filter "Release"
- if externalincludedirs then
- externalincludedirs { libraries_source_dir.."spidermonkey/include-release" }
- else
- sysincludedirs { libraries_source_dir.."spidermonkey/include-release" }
- end
+ externalincludedirs { libraries_source_dir.."spidermonkey/include-release" }
filter { }
end
end,
diff --git a/build/premake/pkgconfig/pkgconfig.lua b/build/premake/pkgconfig/pkgconfig.lua
index 28d20490bd..1f06c8b0ad 100644
--- a/build/premake/pkgconfig/pkgconfig.lua
+++ b/build/premake/pkgconfig/pkgconfig.lua
@@ -47,33 +47,17 @@ end
function m.add_includes(lib, alternative_cmd, alternative_flags)
local dirs, files, options = parse_pkg_config_includes(lib, alternative_cmd, alternative_flags)
- -- As of premake5-beta2, `sysincludedirs` has been deprecated in favour of
- -- `externalincludedirs`, and continuing to use it causes warnings to be emitted.
- -- We use `externalincludedirs` when available to prevent the warnings, falling back
- -- to `sysincludedirs` when not to prevent breakage of the `--with-system-premake5`
- -- build argument.
- if externalincludedirs then
- externalincludedirs(dirs)
- else
- sysincludedirs(dirs)
- end
-
+ externalincludedirs(dirs)
forceincludes(files)
buildoptions(options)
end
function m.add_includes_after(lib, alternative_cmd, alternative_flags)
- -- Support for includedirsafter was added after the 5.0.0-beta2 release.
- -- Fall back if unavailable to support `--with-system-premake5`
- if includedirsafter then
- local dirs, files, options = parse_pkg_config_includes(lib, alternative_cmd, alternative_flags)
+ local dirs, files, options = parse_pkg_config_includes(lib, alternative_cmd, alternative_flags)
- includedirsafter(dirs)
- forceincludes(files)
- buildoptions(options)
- else
- m.add_includes(lib, alternative_cmd, alternative_flags)
- end
+ includedirsafter(dirs)
+ forceincludes(files)
+ buildoptions(options)
end
function m.add_links(lib, alternative_cmd, alternative_flags)
diff --git a/build/workspaces/update-workspaces.sh b/build/workspaces/update-workspaces.sh
index 566546e344..c5a5fb89cd 100755
--- a/build/workspaces/update-workspaces.sh
+++ b/build/workspaces/update-workspaces.sh
@@ -48,10 +48,10 @@ export HOSTTYPE="$HOSTTYPE"
echo "Premake args: ${premake_args}"
if [ "$OS" != "Darwin" ]; then
# shellcheck disable=SC2086
- ${premake_command} --file="premake5.lua" --outpath="../workspaces/gcc/" ${premake_args} gmake2 || die "Premake failed"
+ ${premake_command} --file="premake5.lua" --outpath="../workspaces/gcc/" ${premake_args} gmake || die "Premake failed"
else
# shellcheck disable=SC2086
- ${premake_command} --file="premake5.lua" --outpath="../workspaces/gcc/" --macosx-version-min="${MIN_OSX_VERSION}" ${premake_args} gmake2 || die "Premake failed"
+ ${premake_command} --file="premake5.lua" --outpath="../workspaces/gcc/" --macosx-version-min="${MIN_OSX_VERSION}" ${premake_args} gmake || die "Premake failed"
# Also generate xcode workspaces if on OS X
# shellcheck disable=SC2086
${premake_command} --file="premake5.lua" --outpath="../workspaces/xcode4" --macosx-version-min="${MIN_OSX_VERSION}" ${premake_args} xcode4 || die "Premake failed"
--- 0ad-0.27.1/build/premake/premake5.lua~ 2025-07-14 09:31:46.000000000 -0500
+++ 0ad-0.27.1/build/premake/premake5.lua 2025-10-22 15:09:46.033963492 -0500
@@ -28,12 +28,6 @@
newoption { trigger = "datadir", description = "Directory for data files (typically '/usr/share/games/0ad'); default is ../data/ relative to executable" }
newoption { trigger = "libdir", description = "Directory for libraries (typically '/usr/lib/games/0ad'); default is ./ relative to executable" }
-if _ACTION == "gmake" then
- print("Premake action 'gmake' is no longer supported by pyrogenesis, use 'gmake2'")
- print("Example: 'premake5 --file=build/premake/premake5.lua gmake2'")
- os.exit(1)
-end
-
-- On Windows check if wxWidgets is available, if not disable atlas and emit warning.
-- This is because there are currently not prebuilt binaries provided.
if not _OPTIONS["without-atlas"] and os.istarget("windows") then

View file

@ -1,3 +1 @@
SHA512 (0ad-0.27.1-unix-build.tar.xz) = 7ddc355afed44511f3c62bb4119e308f921fc9624980a3171853d923042777eeb248a1ce326d3768f23596d75e8346025321d7d72d6fa3b1106a5818ca62b40d
SHA512 (0001-Bug-1654457-Update-virtualenv-to-20.0.31.-r-mhentges.patch) = 0b9107cc6d5abc57f1a63dec435e1e5e836caeb0a27e32e77c2d60f67fd598c195e93540139ebf1a9bbaabf84b9ece2986282c829a7c056384e54e2dece2532d
SHA512 (premake-core-5.0.0-beta7.tar.gz) = b6ed480c85db82d749b22b1b97537da525d8eb062514766393c1ff4fc8077289c0037200b7bc260754f320fd5d9c109cb56adbaeec59d485cd95728564927499
SHA512 (0ad-0.0.23b-alpha-unix-build.tar.xz) = 82934313c46c4fd89e3841d5bbf901904abbd2108e9749529d7282bd24ac53b9e6878681c06e6019f4d8ec0e425c28300b0aafc9610a66a331777ffb58ed6135