Compare commits

..

4 Commits
master ... f19

Author SHA1 Message Date
pcpa 843e86ecc0 Correct patch3 application 2014-06-18 16:06:34 -03:00
pcpa 6085cc86f5 Merge back after push of inconsistent master state. 2014-06-18 15:17:49 -03:00
pcpa 5dea087533 Merge with arm fixes and mass rebuild changes 2014-06-18 15:12:52 -03:00
pcpa 4d26cb8326 Add proper patch for gcc 4.9 build 2014-06-18 15:04:22 -03:00
11 changed files with 2509 additions and 3124 deletions

10
.gitignore vendored
View File

@ -1,7 +1,3 @@
/0ad-0.0.17-alpha-unix-build.tar.xz
/0ad-0.0.18-alpha-unix-build.tar.xz
/0ad-0.0.19-alpha-unix-build.tar.xz
/0ad-0.0.20-alpha-unix-build.tar.xz
/0ad-0.0.21-alpha-unix-build.tar.xz
/0ad-0.0.22-alpha-unix-build.tar.xz
/0ad-0.0.23-alpha-unix-build.tar.xz
/0ad-0.0.14-alpha-unix-build.tar.xz
/0ad-0.0.15-alpha-unix-build.tar.xz
/0ad-0.0.16-alpha-unix-build.tar.xz

View File

@ -1,20 +1,18 @@
diff -up libraries/source/fcollada/src/Makefile.orig libraries/source/fcollada/src/Makefile
--- 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
diff -up 0ad-0.0.15-alpha/libraries/source/fcollada/src/Makefile.orig 0ad-0.0.15-alpha/libraries/source/fcollada/src/Makefile
--- 0ad-0.0.15-alpha/libraries/source/fcollada/src/Makefile.orig 2013-12-27 17:28:17.825656505 -0200
+++ 0ad-0.0.15-alpha/libraries/source/fcollada/src/Makefile 2013-12-27 17:30:47.874662251 -0200
@@ -9,10 +9,7 @@ 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_RELEASE := -O1 -DNDEBUG -DRETAIL
-# (-O2 with gcc 4.3 causes linker errors when using this library, for unknown reasons, so stick with -O1 until gcc >4.3 is typical.)
-CXXFLAGS_TEST := -O0 -g -D_DEBUG
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)
@@ -180,72 +177,19 @@ SOURCE = \
INCLUDES_TEST := -IFCollada/FColladaTest $(INCLUDES)
@@ -181,72 +178,19 @@ SOURCE = \
FColladaPlugins/FArchiveXML/FAXSceneExport.cpp \
FColladaPlugins/FArchiveXML/FAXSceneImport.cpp \
@ -63,8 +61,8 @@ diff -up libraries/source/fcollada/src/Makefile.orig libraries/source/fcollada/s
-OBJECTS_ALL = $(OBJECTS_DEBUG) $(OBJECTS_RELEASE) $(OBJECTS_TEST)
+OBJECTS_ALL = $(OBJECTS_RELEASE)
-all: output/libFColladaSD.a output/libFColladaSR.a install
+all: output/libFColladaSR.a install
-all: output_dirs output/libFColladaSD.a output/libFColladaSR.a install
+all: output_dirs output/libFColladaSR.a install
output_dirs:
- bash -c 'mkdir -p output/{debug,release,test}/{FCollada/{FCDocument,FMath,FUtils,FColladaTest/{FCTestAssetManagement,FCTestExportImport,FCTestXRef}},FColladaPlugins/FArchiveXML}'
@ -73,16 +71,16 @@ diff -up libraries/source/fcollada/src/Makefile.orig libraries/source/fcollada/s
- ( cd FCollada/FColladaTest/ ; ../../output/FColladaTest )
- cat FCollada/FColladaTest/FColladaTestLog.txt
-
-output/libFColladaSD.a: $(OBJECTS_DEBUG) | output_dirs
-output/libFColladaSD.a: $(OBJECTS_DEBUG)
- @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
output/libFColladaSR.a: $(OBJECTS_RELEASE)
@echo "$@"
@ar -cr $@ $(OBJECTS_RELEASE); ranlib $@
-output/FColladaTest: $(OBJECTS_TEST) | output_dirs
-output/FColladaTest: $(OBJECTS_TEST)
- $(CXX) -o $@ $(LDFLAGS) $(OBJECTS_TEST) $(LIBS)
-
-install: output/libFColladaSD.a output/libFColladaSR.a
@ -91,19 +89,19 @@ diff -up libraries/source/fcollada/src/Makefile.orig libraries/source/fcollada/s
cp output/libFColladaSR.a ../lib/libFColladaSR.a
dfile = $(@:.o=.d)
@@ -255,18 +199,10 @@ gendep = \
@@ -256,18 +200,10 @@ gendep = \
sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $(dfile) >> $(Pfile) && \
rm -f $(dfile)
-output/debug/%.o: %.cpp | output_dirs
-output/debug/%.o: %.cpp
- @echo "$<"
- $(CXX) $(CXXFLAGS) $(CXXFLAGS_DEBUG) $(INCLUDES) -MD -MF $(dfile) -c $< -o $@
- $(gendep)
output/release/%.o: %.cpp | output_dirs
output/release/%.o: %.cpp
@echo "$<"
$(CXX) $(CXXFLAGS) $(CXXFLAGS_RELEASE) $(INCLUDES) -MD -MF $(dfile) -c $< -o $@
$(gendep)
-output/test/%.o: %.cpp | output_dirs
-output/test/%.o: %.cpp
- @echo "$<"
- $(CXX) $(CXXFLAGS) $(CXXFLAGS_TEST) $(INCLUDES_TEST) -MD -MF $(dfile) -c $< -o $@
- $(gendep)

File diff suppressed because it is too large Load Diff

12
0ad-miniupnpc.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up 0ad-0.0.15-alpha/source/network/NetServer.cpp.orig 0ad-0.0.15-alpha/source/network/NetServer.cpp
--- 0ad-0.0.15-alpha/source/network/NetServer.cpp.orig 2014-04-18 12:08:43.415641350 -0300
+++ 0ad-0.0.15-alpha/source/network/NetServer.cpp 2014-04-18 12:09:27.221643028 -0300
@@ -274,7 +274,7 @@ void* CNetServerWorker::SetupUPnP(void*)
// Check that the port was actually forwarded.
ret = UPNP_GetSpecificPortMappingEntry(urls.controlURL,
data.first.servicetype,
- psPort, protocall,
+ psPort, protocall, externalIPAddress,
intClient, intPort, NULL/*desc*/,
NULL/*enabled*/, duration);

View File

@ -1,38 +0,0 @@
diff -uNr 0ad-0.0.21-alpha.orig/source/scriptinterface/ScriptTypes.h 0ad-0.0.21-alpha/source/scriptinterface/ScriptTypes.h
--- 0ad-0.0.21-alpha.orig/source/scriptinterface/ScriptTypes.h 2016-09-02 18:19:31.000000000 +0200
+++ 0ad-0.0.21-alpha/source/scriptinterface/ScriptTypes.h 2016-11-09 07:14:16.227277422 +0100
@@ -79,19 +79,6 @@
include paths.
#endif
-#if MOZJS_MINOR_VERSION != 3
-#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
-#endif
-
class ScriptInterface;
#endif // INCLUDED_SCRIPTTYPES
diff -uNr 0ad-0.0.21-alpha.orig/source/simulation2/serialization/BinarySerializer.cpp 0ad-0.0.21-alpha/source/simulation2/serialization/BinarySerializer.cpp
--- 0ad-0.0.21-alpha.orig/source/simulation2/serialization/BinarySerializer.cpp 2016-09-18 11:34:45.000000000 +0200
+++ 0ad-0.0.21-alpha/source/simulation2/serialization/BinarySerializer.cpp 2016-11-09 07:29:10.293824242 +0100
@@ -145,11 +145,7 @@
const JSClass* jsclass = JS_GetClass(obj);
if (!jsclass)
throw PSERROR_Serialize_ScriptError("JS_GetClass failed");
-// TODO: Remove this workaround for upstream API breakage when updating SpiderMonkey
-// See https://bugzilla.mozilla.org/show_bug.cgi?id=1236373
-#define JSCLASS_CACHED_PROTO_WIDTH js::JSCLASS_CACHED_PROTO_WIDTH
JSProtoKey protokey = JSCLASS_CACHED_PROTO_KEY(jsclass);
-#undef JSCLASS_CACHED_PROTO_WIDTH
if (protokey == JSProto_Object)
{

View File

@ -1,6 +1,5 @@
diff -uNr 0ad-0.0.23-alpha.orig/build/premake/premake4.lua 0ad-0.0.23-alpha/build/premake/premake4.lua
--- 0ad-0.0.23-alpha.orig/build/premake/premake4.lua 2018-04-29 17:44:48.000000000 +0200
+++ 0ad-0.0.23-alpha/build/premake/premake4.lua 2018-05-22 13:23:25.238894337 +0200
--- 0ad-0.0.16-alpha/build/premake/premake4.lua.orig 2014-05-17 22:21:52.787713008 +0200
+++ 0ad-0.0.16-alpha/build/premake/premake4.lua 2014-05-17 22:22:39.659845979 +0200
@@ -356,26 +356,6 @@
defines { "INSTALLED_LIBDIR=" .. _OPTIONS["libdir"] }
end
@ -18,37 +17,7 @@ diff -uNr 0ad-0.0.23-alpha.orig/build/premake/premake4.lua 0ad-0.0.23-alpha/buil
-
- -- Adding the executable path and taking care of correct escaping
- if _ACTION == "gmake" then
- linkoptions { "-Wl,-rpath,'$$ORIGIN'" }
- elseif _ACTION == "codeblocks" then
- linkoptions { "-Wl,-R\\\\$$$ORIGIN" }
- end
- end
- end
-
end
end
diff -uNr 0ad-0.0.23-alpha.orig/build/premake/premake5.lua 0ad-0.0.23-alpha/build/premake/premake5.lua
--- 0ad-0.0.23-alpha.orig/build/premake/premake5.lua 2018-04-22 20:14:45.000000000 +0200
+++ 0ad-0.0.23-alpha/build/premake/premake5.lua 2018-05-22 13:23:29.022903711 +0200
@@ -344,26 +344,6 @@
defines { "INSTALLED_LIBDIR=" .. _OPTIONS["libdir"] }
end
- if os.istarget("linux") or os.istarget("bsd") then
- -- To use our local shared libraries, they need to be found in the
- -- runtime dynamic linker path. Add their path to -rpath.
- if _OPTIONS["libdir"] then
- linkoptions {"-Wl,-rpath," .. _OPTIONS["libdir"] }
- else
- -- On FreeBSD we need to allow use of $ORIGIN
- if os.istarget("bsd") then
- linkoptions { "-Wl,-z,origin" }
- end
-
- -- Adding the executable path and taking care of correct escaping
- if _ACTION == "gmake" then
- linkoptions { "-Wl,-rpath,'$$ORIGIN'" }
- linkoptions { "-Wl,-rpath,'$$ORIGIN'" }
- elseif _ACTION == "codeblocks" then
- linkoptions { "-Wl,-R\\\\$$$ORIGIN" }
- end

View File

@ -1,24 +0,0 @@
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 = {

73
0ad.6
View File

@ -1,7 +1,7 @@
.TH 0AD "6" "Mar 13 2015" "0ad 0.0.18 Rhododactylos" "User Commands"
.TH 0AD "6" "May 17 2014" "0ad 0.0.16 Patañjali" "User Commands"
.SH NAME
0ad \- manual page for 0ad 0.0.18 Rhododactylos
0ad \- manual page for 0ad 0.0.16 Patañjali
.SH SYNOPSIS
.B 0ad
[\fIoptions\fR]
@ -19,13 +19,13 @@ hobbyist game developers, since 2001.
.PP
Basic gameplay:
.TP
\fB\-autostart\fR=...
\fB\-autostart\fR
load a map instead of showing main menu (see below)
.TP
\fB\-editor\fR
launch the Atlas scenario editor
.TP
\fB\-mod\fR=\fINAME\fR
\fB\-mod\fR \fINAME\fR
start the game using \fINAME\fR mod
.TP
\fB\-quickstart\fR
@ -34,54 +34,56 @@ load faster (disables audio and some system info logging)
.PP
Autostart:
.TP
\fB\-autostart\fR="\fITYPEDIR\fR/\fIMAPNAME\fR"
enables autostart and sets \fIMAPNAME\fR; \fITYPEDIR\fR is \fIskirmishes\fR,
\fIscenarios\fR, or \fIrandom\fR
\fB\-autostart\fR=\fINAME\fR
map \fINAME\fR for scenario, or rms name for random map
.TP
\fB\-autostart-ai\fR=\fIPLAYER\fR:\fIAI\fR
sets the \fIAI\fR for \fIPLAYER\fR (e.g. 2:petra)
adds named \fIAI\fR to the given \fIPLAYER\fR (e.g. 2:testbot)
.TP
\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-civ\fR=\fIPLAYER\fR:\fICIV\fR
sets \fIPLAYER\fR's civilisation to \fICIV\fR (skirmish and random maps only)
.TP
\fB-autostart-aiseed\fR=\fIAISEED\fR
sets the seed used for the \fIAI\fR random generator (default 0, use -1 for random)
\fB-autostart-aidiff\fR=\fIPLAYER\fR:\fIlevel\fR
changes the difficulty setting for \fIAI PLAYER\fR (0: easy, 3: very hard)
.PP
Multiplayer:
.TP
\fB\-autostart-playername\fR=\fINAME\fR
sets local player \fINAME\fR (default 'anonymous')
multiplayer local player \fINAME\fR (default 'anonymous')
.TP
\fB\-autostart-host\fR
sets multiplayer host mode
multiplayer host mode
.TP
\fB\-autostart-host-players\fR=\fINUMBER\fR
sets \fINUMBER\fR of human players for multiplayer games (default 2)
\fB\-autostart-players\fR=\fINUMBER\fR
multiplayer host: \fINUMBER\fR of client players (default 2)
.TP
\fB\-autostart-client\fR=\fIIP\fR
sets multiplayer client to join host host at given \fIIP\fR address
\fB\-autostart-client\fR
multiplayer client mode
.TP
\fB\-autostart-ip\fR=\fIIP\fR
multiplayer client: connect to this host \fIIP\fR
.PP
Random maps only:
.TP
\fB\-autostart-seed\fR=\fISEED\fR
sets random map \fISEED\fR value (default 0, use -1 for random)
\fB\-autostart-random\fR
random map
.TP
\fB\-autostart-random\fR=\fISEED\fR
random map with \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)
random map \fISIZE\fR in tiles (default 192)
.TP
\fB\-autostart-players\fR=\fINUMBER\fI
sets \fINUMBER\fR of players on random map (default 2)
\fINUMBER\fR of players on random map
.TP
\fB-autostart-civ\fR=\fIPLAYER\fR:\fICIV\fR
changes the civilisation of player \fIPLAYER\fR to \fICIV\fR (default athen)
.PP
Configuration:
.TP
\fB\-conf\fR=\fIKEY\fR:\fIVALUE\fR
set a config value
\fB\-conf\fR:\fIKEY\fR=\fIVALUE\fR
set a config value (overrides the contents of system.cfg)
.TP
\fB\-g\fR=\fIF\fR
set the gamma correction to '\fIF\fR' (default 1.0)
@ -122,7 +124,7 @@ complete entity XML schema, used by various analysis tools
.TP
\fB\-replay\fR=\fIPATH\fR
non-visual replay of a previous game, used for analysis purposes
\fIPATH\fR is system path to \fIcommands.txt\fR containing simulation log
\fIPATH\fR is system path to commands.txt containing simulation log
.TP
\fB\-writableRoot\fR
store runtime game data in root data directory
@ -143,7 +145,6 @@ 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
.TP
\fB\-archivebuild-output\fR=\fIPATH\fR
system \fIPATH\fR to output of the resulting .zip archive (use with archivebuild)
@ -152,18 +153,6 @@ system \fIPATH\fR to output of the resulting .zip archive (use with archivebuild
enable deflate compression in the .zip
(no zip compression by default since it hurts compression of release packages)
.SH "EXAMPLES"
.TP
\fB1)\fR "Bob" will host a 2 player game on the Arcadia map:
.nf
-autostart="scenarios/Arcadia 02" -autostart-host -autostart-host-players=2 -autostart-playername="Bob"
.fi
.TP
\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
.SH "REPORTING BUGS"
Bugs should be reported on Trac. For information on reporting problems
and finding logs, see http://trac.wildfiregames.com/wiki/ReportingErrors

231
0ad.spec
View File

@ -1,47 +1,46 @@
# http://trac.wildfiregames.com/wiki/BuildInstructions#Linux
# enable special maintainer debug build ?
%bcond_with debug
%if %{with debug}
%global config debug
%global dbg _dbg
%define with_debug 0
%if %{with_debug}
%define config debug
%define dbg _dbg
%else
%global config release
%global dbg %{nil}
%define config release
%define dbg %{nil}
%endif
# Remember to rerun licensecheck after every update:
# https://bugzilla.redhat.com/show_bug.cgi?id=818401#c46
# http://trac.wildfiregames.com/ticket/1682
%bcond_without system_nvtt
%bcond_without nvtt
%global with_system_nvtt 1
%global without_nvtt 0
Name: 0ad
Version: 0.0.23
Release: 3%{?dist}
Version: 0.0.16
Release: 6%{?dist}
# BSD License:
# build/premake/*
# libraries/source/miniupnpc/* (not built/used)
# libraries/source/valgrind/* (not built/used)
# libraries/valgrind/* (not built/used)
# MIT License:
# libraries/source/fcollada/*
# libraries/source/nvtt/* (not built/used)
# libraries/enet/*
# libraries/fcollada/*
# source/third_party/*
# LGPLv2+
# libraries/source/cxxtest*/* (not built/used)
# libraries/cxxtest/* (not built/used)
# GPLv2+
# source/*
# IBM
# source/tools/fontbuilder2/Packer.py
# MPL-2.0
# libraries/source/spidermonkey/* (not built/used)
# MPL-1.1
# libraries/spidermonkey/* (not built/used)
License: GPLv2+ and BSD and MIT and IBM
Group: Amusements/Games
Summary: Cross-Platform RTS Game of Ancient Warfare
Url: http://play0ad.com
%if ! %{with nvtt}
%if %{without_nvtt}
# wget http://releases.wildfiregames.com/%%{name}-%%{version}-alpha-unix-build.tar.xz
# tar Jxf %%{name}-%%{version}-alpha-unix-build.tar.xz
# rm -fr %%{name}-%%{version}-alpha/libraries/nvtt
@ -69,9 +68,9 @@ Requires: %{name}-data = %{version}
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: DevIL-devel
BuildRequires: enet-devel
BuildRequires: gamin-devel
BuildRequires: gcc-c++
BuildRequires: gloox-devel
BuildRequires: libcurl-devel
BuildRequires: libdnet-devel
@ -82,22 +81,20 @@ BuildRequires: libvorbis-devel
BuildRequires: libxml2-devel
BuildRequires: libzip-devel
BuildRequires: miniupnpc-devel
BuildRequires: mozjs38-devel
BuildRequires: libsodium-devel
%if %{with system_nvtt}
BuildRequires: mozjs24-devel
BuildRequires: nasm
%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: python
BuildRequires: SDL-devel
BuildRequires: subversion
BuildRequires: valgrind-devel
BuildRequires: wxGTK3-devel
BuildRequires: /usr/bin/python
BuildRequires: wxGTK-devel
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
ExclusiveArch: %{ix86} x86_64 %{arm}
# http://trac.wildfiregames.com/ticket/1421
Patch0: %{name}-rpath.patch
@ -106,12 +103,11 @@ Patch0: %{name}-rpath.patch
# It also prevents assumption there that it is building in x86
Patch1: %{name}-debug.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1141464
Patch3: %{name}-valgrind.patch
# Build with miniupnpc-1.9
Patch2: %{name}-miniupnpc.patch
# We have don't want to ensure that we have 38.3.x of mozjs (we just don't have it)
# And other fixes
Patch4: %{name}-mozjs-incompatible.patch
# http://trac.wildfiregames.com/changeset/15334
Patch3: changeset_15334.diff
%description
0 A.D. (pronounced "zero ey-dee") is a free, open-source, cross-platform
@ -129,22 +125,17 @@ hobbyist game developers, since 2001.
%prep
%setup -q -n %{name}-%{version}-alpha
%patch0 -p1
%if ! %{with debug}
%if !%{with_debug}
# disable debug build, and "int 0x3" to trap to debugger (x86 only)
%patch1 -p0
%patch1 -p1
%endif
%patch3 -p1
%patch4 -p1
%patch2 -p1
%patch3 -p3
%if %{with system_nvtt}
rm -fr libraries/source/nvtt
%if %{with_system_nvtt}
rm -fr libraries/nvtt
%endif
rm -fr libraries/source/valgrind
# TODO: drop once fixed in upstream: http://trac.wildfiregames.com/ticket/4319#ticket
sed -i -e "/^URL=/d" build/resources/0ad.desktop
#-----------------------------------------------------------------------
%build
export CFLAGS="%{optflags}"
@ -154,11 +145,13 @@ build/workspaces/update-workspaces.sh \
--bindir %{_bindir} \
--datadir %{_datadir}/%{name} \
--libdir %{_libdir}/%{name} \
--with-system-mozjs38 \
%if %{with system_nvtt}
--with-system-enet \
--with-system-mozjs24 \
--with-system-miniupnpc \
%if %{with_system_nvtt}
--with-system-nvtt \
%endif
%if ! %{with nvtt}
%if %{without_nvtt}
--without-nvtt \
%endif
%{?_smp_mflags}
@ -167,11 +160,9 @@ make %{?_smp_mflags} -C build/workspaces/gcc config=%{config} verbose=1
#-----------------------------------------------------------------------
# Depends on availablity of nvtt
%ifnarch aarch64
%if %{with nvtt}
%if !%{without_nvtt}
%check
LD_LIBRARY_PATH=binaries/system binaries/system/test%{dbg} -libdir binaries/system
%endif
LD_LIBRARY_PATH=binaries/system binaries/system/test%{dbg}
%endif
#-----------------------------------------------------------------------
@ -184,7 +175,7 @@ for name in AtlasUI%{dbg} Collada%{dbg}; do
install -p -m 755 binaries/system/lib${name}.so %{buildroot}%{_libdir}/%{name}/lib${name}.so
done
%if %{with nvtt} && ! %{with system_nvtt}
%if !%{without_nvtt} && !%{with_system_nvtt}
for name in nvcore nvimage nvmath nvtt; do
install -p -m 755 binaries/system/lib${name}.so %{buildroot}%{_libdir}/%{name}/lib${name}.so
done
@ -216,15 +207,14 @@ LD_LIBRARY_PATH=%{_libdir}/0ad %{_bindir}/pyrogenesis%{dbg} "\$@"
EOF
chmod +x %{buildroot}%{_bindir}/0ad
%if %{with debug}
%if %{with_debug}
export STRIP=/bin/true
%endif
#-----------------------------------------------------------------------
%files
%doc README.txt
%license LICENSE.txt
%license license_gpl-2.0.txt license_lgpl-2.1.txt license_mit.txt
%doc README.txt LICENSE.txt
%doc license_gpl-2.0.txt license_lgpl-2.1.txt
%{_bindir}/0ad
%{_bindir}/pyrogenesis%{dbg}
%{_libdir}/%{name}
@ -235,135 +225,6 @@ export STRIP=/bin/true
%{_mandir}/man6/*.6*
%changelog
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.23-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jul 10 2018 Pete Walter <pwalter@fedoraproject.org> - 0.0.23-2
- Rebuild for ICU 62
* Thu May 17 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.0.23-1
- Update to 0.0.23
* Mon Apr 30 2018 Pete Walter <pwalter@fedoraproject.org> - 0.0.22-8
- Rebuild for ICU 61.1
* Wed Mar 14 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.0.22-7
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Wed Mar 07 2018 Adam Williamson <awilliam@redhat.com> - 0.0.22-6
- Rebuild to fix GCC 8 mis-compilation
See https://da.gd/YJVwk ("GCC 8 ABI change on x86_64")
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.22-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Mon Jan 22 2018 Jonathan Wakely <jwakely@redhat.com> - 0.0.22-4
- Rebuilt for Boost 1.66
* Thu Nov 30 2017 Pete Walter <pwalter@fedoraproject.org> - 0.0.22-3
- Rebuild for ICU 60.1
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.22-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.0.22-1
- Update to 0.0.22
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.21-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Mon Jul 17 2017 Jonathan Wakely <jwakely@redhat.com> - 0.0.21-5
- Patched for new GCC and rebuilt for Boost 1.64
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.21-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri Jan 27 2017 Jonathan Wakely <jwakely@redhat.com> - 0.0.21-3
- Rebuilt for Boost 1.63
* Fri Jan 27 2017 Jonathan Wakely <jwakely@redhat.com> - 0.0.21-2
- Rebuilt for Boost 1.63
* Wed Nov 09 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.0.21-1
- Update to 0.0.21
* Fri Jun 24 2016 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.0.20-4
- Rebuild for miniupnpc 2.0
* Fri Apr 15 2016 David Tardon <dtardon@redhat.com> - 0.0.20-3
- rebuild for ICU 57.1
* Sat Apr 9 2016 Peter Robinson <pbrobinson@fedoraproject.org> 0.0.20-2
- Upstream now supports aarch64 (tests currently fail)
* Sat Apr 02 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.0.20-1
- Update to 0.0.20
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.19-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jan 14 2016 Jonathan Wakely <jwakely@redhat.com> - 0.0.19-2
- Rebuilt for Boost 1.60
* Sat Nov 28 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.0.19
- 0.0.19
* Sun Nov 22 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.0.19-0.1.rc2
- 0.0.19-rc2
* Wed Oct 28 2015 David Tardon <dtardon@redhat.com> - 0.0.18-8
- rebuild for ICU 56.1
* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 0.0.18-7
- Rebuilt for Boost 1.59
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.18-6
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 0.0.18-5
- rebuild for Boost 1.58
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.18-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.0.18-3
- Rebuilt for GCC 5 C++11 ABI change
* Tue Mar 17 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.0.18-2
- Use bcond for rpm conditional macros
- Add rpm conditional to build with sdl2
* Sat Mar 14 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.0.18-1
- Update to latest upstream release
- Change to -p0 patches
* Thu Feb 12 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.0.17-3
- Rebuild for gloox 1.0.13
* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 0.0.17-2
- Rebuild for boost 1.57.0
* Sun Oct 12 2014 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.0.17-1
- Update to latest upstream release
- Remove no longer needed miniupnpc patch
- Remove backport changeset_15334 patch
* Sun Sep 14 2014 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.0.16-11
- Remove unused valgrind sources and use system valgrind.h (#1141464)
* Thu Aug 28 2014 David Tardon <dtardon@redhat.com> - 0.0.16-10
- rebuild for ICU 53.1
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.16-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.16-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Wed Jul 23 2014 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.0.16-7
- Rebuild for latest gloox
* Wed Jun 18 2014 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.0.16-6
- Add proper patch for gcc 4.9 build

42
changeset_15334.diff Normal file
View File

@ -0,0 +1,42 @@
Index: /ps/trunk/source/lib/allocators/headerless.cpp
===================================================================
--- /ps/trunk/source/lib/allocators/headerless.cpp (revision 15333)
+++ /ps/trunk/source/lib/allocators/headerless.cpp (revision 15334)
@@ -55,10 +55,12 @@
}
- FreedBlock(uintptr_t id, size_t size)
- : m_magic(s_magic), m_size(size), m_id(id)
- {
- }
-
- ~FreedBlock()
+ void Setup(uintptr_t id, size_t size)
+ {
+ m_magic = s_magic;
+ m_size = size;
+ m_id = id;
+ }
+
+ void Reset()
{
// clear all fields to prevent accidental reuse
@@ -411,6 +413,7 @@
FreedBlock* WriteTags(u8* p, size_t size)
{
- FreedBlock* freedBlock = new(p) FreedBlock(s_headerId, size);
- (void)new(Footer(freedBlock)) FreedBlock(s_footerId, size);
+ FreedBlock* freedBlock = (FreedBlock*)p;
+ freedBlock->Setup(s_headerId, size);
+ Footer(freedBlock)->Setup(s_footerId, size);
m_freeBlocks++;
@@ -431,6 +434,6 @@
FreedBlock* footer = Footer(freedBlock);
- freedBlock->~FreedBlock();
- footer->~FreedBlock();
+ freedBlock->Reset();
+ footer->Reset();
}

View File

@ -1 +1 @@
SHA512 (0ad-0.0.23-alpha-unix-build.tar.xz) = 4a1c86b19e0d8ec7d9b8bf75428df0255f95e7f991f419734f9b6ddc288a537405a34c5d7081f1a97475155c49013af85dee5c0265c35c7dbc003b46637a03d7
3836bbcdf4edc57c2354b4fef6023146 0ad-0.0.16-alpha-unix-build.tar.xz