mirror of
https://abf.rosa.ru/djam/0ad.git
synced 2025-02-23 15:02:47 +00:00
New version 0.0.16
This commit is contained in:
parent
9202ccd6f7
commit
d6b3caddcb
7 changed files with 259 additions and 96 deletions
2
.abf.yml
2
.abf.yml
|
@ -1,2 +1,2 @@
|
||||||
sources:
|
sources:
|
||||||
0ad-0.0.14-alpha-unix-build.tar.xz: fc167b0f8ca6290686bd643400249113841bdd23
|
0ad-0.0.16-alpha-unix-build.tar.xz: 4931b9f6cd68ef131832eeedf8b502b54f204cce
|
||||||
|
|
21
0ad-check.patch
Normal file
21
0ad-check.patch
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
diff -up 0ad-0.0.15-alpha/source/lib/allocators/tests/test_headerless.h.orig 0ad-0.0.15-alpha/source/lib/allocators/tests/test_headerless.h
|
||||||
|
--- 0ad-0.0.15-alpha/source/lib/allocators/tests/test_headerless.h.orig 2014-04-18 18:59:21.714584836 -0300
|
||||||
|
+++ 0ad-0.0.15-alpha/source/lib/allocators/tests/test_headerless.h 2014-04-18 19:00:01.101586345 -0300
|
||||||
|
@@ -114,14 +114,14 @@ public:
|
||||||
|
|
||||||
|
srand(1);
|
||||||
|
|
||||||
|
+ const size_t maxSize = (size_t)((rand() / (float)RAND_MAX) * poolSize);
|
||||||
|
+ const size_t size = std::max((size_t)HeaderlessAllocator::minAllocationSize, round_down(maxSize, HeaderlessAllocator::allocationAlignment));
|
||||||
|
+ // (the size_t cast on minAllocationSize prevents max taking a reference to the non-defined variable)
|
||||||
|
for(int i = 0; i < 1000; i++)
|
||||||
|
{
|
||||||
|
// allocate
|
||||||
|
if(rand() >= RAND_MAX/2)
|
||||||
|
{
|
||||||
|
- const size_t maxSize = (size_t)((rand() / (float)RAND_MAX) * poolSize);
|
||||||
|
- const size_t size = std::max((size_t)HeaderlessAllocator::minAllocationSize, round_down(maxSize, HeaderlessAllocator::allocationAlignment));
|
||||||
|
- // (the size_t cast on minAllocationSize prevents max taking a reference to the non-defined variable)
|
||||||
|
void* p = a.Allocate(size);
|
||||||
|
if(!p)
|
||||||
|
continue;
|
110
0ad-debug.patch
Normal file
110
0ad-debug.patch
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
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 := -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)
|
||||||
|
@@ -181,72 +178,19 @@ SOURCE = \
|
||||||
|
FColladaPlugins/FArchiveXML/FAXSceneExport.cpp \
|
||||||
|
FColladaPlugins/FArchiveXML/FAXSceneImport.cpp \
|
||||||
|
|
||||||
|
-TEST_SOURCE = \
|
||||||
|
- FCollada/FMath/FMArrayTest.cpp \
|
||||||
|
- FCollada/FMath/FMQuaternionTest.cpp \
|
||||||
|
- FCollada/FMath/FMTreeTest.cpp \
|
||||||
|
- FCollada/FUtils/FUBoundingTest.cpp \
|
||||||
|
- FCollada/FUtils/FUCrc32Test.cpp \
|
||||||
|
- FCollada/FUtils/FUEventTest.cpp \
|
||||||
|
- FCollada/FUtils/FUFileManagerTest.cpp \
|
||||||
|
- FCollada/FUtils/FUFunctorTest.cpp \
|
||||||
|
- FCollada/FUtils/FUObjectTest.cpp \
|
||||||
|
- FCollada/FUtils/FUStringBuilderTest.cpp \
|
||||||
|
- FCollada/FUtils/FUStringConversionTest.cpp \
|
||||||
|
- FCollada/FUtils/FUStringTest.cpp \
|
||||||
|
- FCollada/FUtils/FUTestBed.cpp \
|
||||||
|
- FCollada/FUtils/FUUniqueStringMapTest.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTest.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestAnimation.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestArchiving.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestController.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestGeometryPolygonsTools.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestParameters.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestSceneGraph.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestAssetManagement/FCTAMCrossCloning.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestAssetManagement/FCTAssetManagement.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestExportImport/FCTEIAnimation.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestExportImport/FCTEICamera.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestExportImport/FCTEIEmitter.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestExportImport/FCTEIExtra.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestExportImport/FCTEIGeometry.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestExportImport/FCTEILight.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestExportImport/FCTEIMaterial.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestExportImport/FCTEIPhysics.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestExportImport/FCTEIVisualScene.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestExportImport/FCTestExportImport.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestXRef/FCTestXRef.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestXRef/FCTestXRefAcyclic.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestXRef/FCTestXRefSimple.cpp \
|
||||||
|
- FCollada/FColladaTest/FCTestXRef/FCTestXRefTree.cpp \
|
||||||
|
-
|
||||||
|
-OBJECTS_DEBUG = $(addprefix output/debug/,$(SOURCE:.cpp=.o))
|
||||||
|
OBJECTS_RELEASE = $(addprefix output/release/,$(SOURCE:.cpp=.o))
|
||||||
|
-OBJECTS_TEST = $(addprefix output/test/,$(SOURCE:.cpp=.o) $(TEST_SOURCE:.cpp=.o))
|
||||||
|
-OBJECTS_ALL = $(OBJECTS_DEBUG) $(OBJECTS_RELEASE) $(OBJECTS_TEST)
|
||||||
|
+OBJECTS_ALL = $(OBJECTS_RELEASE)
|
||||||
|
|
||||||
|
-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}'
|
||||||
|
-
|
||||||
|
-test: FCollada/FColladaTest/ output/FColladaTest
|
||||||
|
- ( cd FCollada/FColladaTest/ ; ../../output/FColladaTest )
|
||||||
|
- cat FCollada/FColladaTest/FColladaTestLog.txt
|
||||||
|
-
|
||||||
|
-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)
|
||||||
|
@echo "$@"
|
||||||
|
@ar -cr $@ $(OBJECTS_RELEASE); ranlib $@
|
||||||
|
|
||||||
|
-output/FColladaTest: $(OBJECTS_TEST)
|
||||||
|
- $(CXX) -o $@ $(LDFLAGS) $(OBJECTS_TEST) $(LIBS)
|
||||||
|
-
|
||||||
|
-install: output/libFColladaSD.a output/libFColladaSR.a
|
||||||
|
- cp output/libFColladaSD.a ../lib/libFColladaSD.a
|
||||||
|
+install: output/libFColladaSR.a
|
||||||
|
cp output/libFColladaSR.a ../lib/libFColladaSR.a
|
||||||
|
|
||||||
|
dfile = $(@:.o=.d)
|
||||||
|
@@ -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
|
||||||
|
- @echo "$<"
|
||||||
|
- $(CXX) $(CXXFLAGS) $(CXXFLAGS_DEBUG) $(INCLUDES) -MD -MF $(dfile) -c $< -o $@
|
||||||
|
- $(gendep)
|
||||||
|
output/release/%.o: %.cpp
|
||||||
|
@echo "$<"
|
||||||
|
$(CXX) $(CXXFLAGS) $(CXXFLAGS_RELEASE) $(INCLUDES) -MD -MF $(dfile) -c $< -o $@
|
||||||
|
$(gendep)
|
||||||
|
-output/test/%.o: %.cpp
|
||||||
|
- @echo "$<"
|
||||||
|
- $(CXX) $(CXXFLAGS) $(CXXFLAGS_TEST) $(INCLUDES_TEST) -MD -MF $(dfile) -c $< -o $@
|
||||||
|
- $(gendep)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf output
|
12
0ad-miniupnpc.patch
Normal file
12
0ad-miniupnpc.patch
Normal 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);
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
diff -up 0ad-0.0.11-alpha/build/premake/premake4.lua.orig 0ad-0.0.11-alpha/build/premake/premake4.lua
|
--- 0ad-0.0.16-alpha/build/premake/premake4.lua.orig 2014-05-17 22:21:52.787713008 +0200
|
||||||
--- 0ad-0.0.11-alpha/build/premake/premake4.lua.orig 2012-09-08 10:11:31.662784857 -0300
|
+++ 0ad-0.0.16-alpha/build/premake/premake4.lua 2014-05-17 22:22:39.659845979 +0200
|
||||||
+++ 0ad-0.0.11-alpha/build/premake/premake4.lua 2012-09-08 10:11:41.465795036 -0300
|
@@ -356,26 +356,6 @@
|
||||||
@@ -308,26 +308,6 @@ function project_set_build_flags()
|
|
||||||
defines { "INSTALLED_LIBDIR=" .. _OPTIONS["libdir"] }
|
defines { "INSTALLED_LIBDIR=" .. _OPTIONS["libdir"] }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -20,7 +19,7 @@ diff -up 0ad-0.0.11-alpha/build/premake/premake4.lua.orig 0ad-0.0.11-alpha/build
|
||||||
- if _ACTION == "gmake" then
|
- if _ACTION == "gmake" then
|
||||||
- linkoptions { "-Wl,-rpath,'$$ORIGIN'" }
|
- linkoptions { "-Wl,-rpath,'$$ORIGIN'" }
|
||||||
- elseif _ACTION == "codeblocks" then
|
- elseif _ACTION == "codeblocks" then
|
||||||
- linkoptions { "-Wl,-R\\\\$$ORIGIN" }
|
- linkoptions { "-Wl,-R\\\\$$$ORIGIN" }
|
||||||
- end
|
- end
|
||||||
- end
|
- end
|
||||||
- end
|
- end
|
||||||
|
|
44
0ad.6
44
0ad.6
|
@ -1,7 +1,7 @@
|
||||||
.TH 0AD "1" "Sep 8 2012" "0ad 0.0.11" "User Commands"
|
.TH 0AD "6" "May 17 2014" "0ad 0.0.16 Patañjali" "User Commands"
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
0ad \- manual page for 0ad 0.0.11
|
0ad \- manual page for 0ad 0.0.16 Patañjali
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B 0ad
|
.B 0ad
|
||||||
[\fIoptions\fR]
|
[\fIoptions\fR]
|
||||||
|
@ -39,6 +39,9 @@ map \fINAME\fR for scenario, or rms name for random map
|
||||||
.TP
|
.TP
|
||||||
\fB\-autostart-ai\fR=\fIPLAYER\fR:\fIAI\fR
|
\fB\-autostart-ai\fR=\fIPLAYER\fR:\fIAI\fR
|
||||||
adds named \fIAI\fR to the given \fIPLAYER\fR (e.g. 2:testbot)
|
adds named \fIAI\fR to the given \fIPLAYER\fR (e.g. 2:testbot)
|
||||||
|
.TP
|
||||||
|
\fB-autostart-aidiff\fR=\fIPLAYER\fR:\fIlevel\fR
|
||||||
|
changes the difficulty setting for \fIAI PLAYER\fR (0: easy, 3: very hard)
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Multiplayer:
|
Multiplayer:
|
||||||
|
@ -72,6 +75,9 @@ random map \fISIZE\fR in tiles (default 192)
|
||||||
.TP
|
.TP
|
||||||
\fB\-autostart-players\fR=\fINUMBER\fI
|
\fB\-autostart-players\fR=\fINUMBER\fI
|
||||||
\fINUMBER\fR of players on random map
|
\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
|
.PP
|
||||||
Configuration:
|
Configuration:
|
||||||
|
@ -85,8 +91,8 @@ set the gamma correction to '\fIF\fR' (default 1.0)
|
||||||
\fB\-nosound\fR
|
\fB\-nosound\fR
|
||||||
disable audio
|
disable audio
|
||||||
.TP
|
.TP
|
||||||
\fB\-onlyPublicFiles\fR
|
\fB-noUserMod\fR
|
||||||
force game to use only the public (default) mod
|
disable loading of the user mod
|
||||||
.TP
|
.TP
|
||||||
\fB\-shadows\fR
|
\fB\-shadows\fR
|
||||||
enable shadows
|
enable shadows
|
||||||
|
@ -104,9 +110,18 @@ set screen \fIY\fR resolution to '\fIN\fR'
|
||||||
Advanced / diagnostic:
|
Advanced / diagnostic:
|
||||||
.TP
|
.TP
|
||||||
\fB\-dumpSchema\fR
|
\fB\-dumpSchema\fR
|
||||||
creates a file entity.rng in the working directory, containing
|
creates a file \fIentity.rng\fR in the working directory, containing
|
||||||
complete entity XML schema, used by various analysis tools
|
complete entity XML schema, used by various analysis tools
|
||||||
.TP
|
.TP
|
||||||
|
\fB\-entgraph\fR
|
||||||
|
(disabled)
|
||||||
|
.TP
|
||||||
|
\fB\-listfiles\fR
|
||||||
|
(disabled)
|
||||||
|
.TP
|
||||||
|
\fB\-profile\fR=\fINAME\fR
|
||||||
|
(disabled)
|
||||||
|
.TP
|
||||||
\fB\-replay\fR=\fIPATH\fR
|
\fB\-replay\fR=\fIPATH\fR
|
||||||
non-visual replay of a previous game, used for analysis purposes
|
non-visual replay of a previous game, used for analysis purposes
|
||||||
\fIPATH\fR is system path to commands.txt containing simulation log
|
\fIPATH\fR is system path to commands.txt containing simulation log
|
||||||
|
@ -114,6 +129,16 @@ non-visual replay of a previous game, used for analysis purposes
|
||||||
\fB\-writableRoot\fR
|
\fB\-writableRoot\fR
|
||||||
store runtime game data in root data directory
|
store runtime game data in root data directory
|
||||||
(only use if you have write permissions on that directory)
|
(only use if you have write permissions on that directory)
|
||||||
|
.TP
|
||||||
|
\fB\-ooslog\fR
|
||||||
|
dumps simulation state in binary and ASCII representations each turn,
|
||||||
|
files created in sim_log within the game's log folder. \fBNOTE\fR: game will
|
||||||
|
run much slower with this option!
|
||||||
|
.TP
|
||||||
|
\fB-serializationtest\fR
|
||||||
|
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!
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Archive builder:
|
Archive builder:
|
||||||
|
@ -129,13 +154,8 @@ enable deflate compression in the .zip
|
||||||
(no zip compression by default since it hurts compression of release packages)
|
(no zip compression by default since it hurts compression of release packages)
|
||||||
|
|
||||||
.SH "REPORTING BUGS"
|
.SH "REPORTING BUGS"
|
||||||
Bugs should be reported on Trac: http://trac.wildfiregames.com/
|
Bugs should be reported on Trac. For information on reporting problems
|
||||||
.br
|
and finding logs, see http://trac.wildfiregames.com/wiki/ReportingErrors
|
||||||
On Linux / OS X: If the game detects an error, it should generate crashlog.txt
|
|
||||||
in ~/.config/0ad/logs/ . If it doesn't, it should at least print some
|
|
||||||
information on stdout. Attach crashlog.txt or the other information to the
|
|
||||||
bug report. It might also help to run the game in gdb and copy the output of
|
|
||||||
the "bt full" command, if possible.
|
|
||||||
|
|
||||||
.SH COPYRIGHT
|
.SH COPYRIGHT
|
||||||
0 A.D. is released as open source: you can freely use, copy, modify and
|
0 A.D. is released as open source: you can freely use, copy, modify and
|
||||||
|
|
157
0ad.spec
157
0ad.spec
|
@ -1,95 +1,69 @@
|
||||||
# http://trac.wildfiregames.com/wiki/BuildInstructions#Linux
|
# http://trac.wildfiregames.com/wiki/BuildInstructions#Linux
|
||||||
|
|
||||||
# conditionals left for the sake of users building from source, but
|
# enable special maintainer debug build ?
|
||||||
# nvtt (due to s3tc patented code) is not supported and not built.
|
%define with_debug 0
|
||||||
%global with_system_nvtt 0
|
%if %{with_debug}
|
||||||
%global without_nvtt 1
|
%define config debug
|
||||||
|
%define dbg _dbg
|
||||||
%bcond_with debug
|
|
||||||
%if %{with debug}
|
|
||||||
%define config debug
|
|
||||||
%define dbg _dbg
|
|
||||||
%undefine _enable_debug_packages
|
|
||||||
%undefine debug_package
|
|
||||||
%else
|
%else
|
||||||
%define config release
|
%define config release
|
||||||
%define dbg %{nil}
|
%define dbg %{nil}
|
||||||
# 0ad-debug is useless if 0ad is stripped
|
|
||||||
# install gamin-debug to verify reason of patch0
|
|
||||||
%define _enable_debug_packages %{nil}
|
|
||||||
%define debug_package %{nil}
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%global with_system_nvtt 0
|
||||||
|
%global without_nvtt 1
|
||||||
|
%global with_system_enet 1
|
||||||
|
|
||||||
|
Summary: Cross-Platform RTS Game of Ancient Warfare
|
||||||
Name: 0ad
|
Name: 0ad
|
||||||
|
Version: 0.0.16
|
||||||
|
Release: 1
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 0.0.14
|
|
||||||
Release: 2
|
|
||||||
# BSD License:
|
|
||||||
# build/premake/*
|
|
||||||
# libraries/valgrind/* (not built/used)
|
|
||||||
# MIT License:
|
|
||||||
# libraries/enet/*
|
|
||||||
# libraries/fcollada/*
|
|
||||||
# source/third_party/*
|
|
||||||
# LGPLv2+
|
|
||||||
# libraries/cxxtest/* (not built/used)
|
|
||||||
# GPLv2+
|
|
||||||
# source/*
|
|
||||||
# IBM
|
|
||||||
# source/tools/fontbuilder2/Packer.py
|
|
||||||
# MPL-1.1
|
|
||||||
# libraries/spidermonkey/* (not built/used)
|
|
||||||
License: GPLv2+ and BSD and MIT and IBM
|
License: GPLv2+ and BSD and MIT and IBM
|
||||||
Group: Games/Strategy
|
Group: Games/Strategy
|
||||||
Summary: Cross-Platform RTS Game of Ancient Warfare
|
Url: http://play0ad.com
|
||||||
Url: http://play0ad.com/
|
|
||||||
|
|
||||||
%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
|
|
||||||
# rm -f %%{name}-%%{version}-alpha-unix-build.tar.xz
|
|
||||||
# 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}-alpha-unix-build.tar.xz
|
Source0: http://releases.wildfiregames.com/%{name}-%{version}-alpha-unix-build.tar.xz
|
||||||
%endif
|
|
||||||
|
|
||||||
# adapted from binaries/system/readme.txt
|
# adapted from binaries/system/readme.txt
|
||||||
# It is advisable to review this file at on newer versions, to update the
|
# It is advisable to review this file at on newer versions, to update the
|
||||||
# version field and check for extra options. Note that windows specific,
|
# version field and check for extra options. Note that windows specific,
|
||||||
# and disabled options were not added to the manual page.
|
# and disabled options were not added to the manual page.
|
||||||
Source1: %{name}.6
|
Source1: %{name}.6
|
||||||
Requires: %{name}-data
|
# http://trac.wildfiregames.com/ticket/1421
|
||||||
BuildRequires: boost-devel
|
Patch0: %{name}-rpath.patch
|
||||||
|
# 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
|
||||||
|
# Build with miniupnpc-1.9
|
||||||
|
Patch2: %{name}-miniupnpc.patch
|
||||||
|
# After some trial&error this corrects a %%check failure with gcc 4.9 on i686
|
||||||
|
Patch3: %{name}-check.patch
|
||||||
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: desktop-file-utils
|
BuildRequires: desktop-file-utils
|
||||||
BuildRequires: devil-devel
|
BuildRequires: nasm
|
||||||
#BuildRequires: gamin-devel
|
BuildRequires: subversion
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: boost-devel
|
||||||
BuildRequires: jpeg-devel
|
BuildRequires: jpeg-devel
|
||||||
BuildRequires: libdnet-devel
|
BuildRequires: libdnet-devel
|
||||||
BuildRequires: jpeg-devel
|
BuildRequires: miniupnpc-devel
|
||||||
BuildRequires: pkgconfig(libpng)
|
|
||||||
BuildRequires: pkgconfig(vorbis)
|
|
||||||
BuildRequires: pkgconfig(libxml-2.0)
|
|
||||||
BuildRequires: nasm
|
|
||||||
%if %{with_system_nvtt}
|
%if %{with_system_nvtt}
|
||||||
BuildRequires: nvidia-texture-tools
|
BuildRequires: nvidia-texture-tools-devel
|
||||||
%endif
|
%endif
|
||||||
|
BuildRequires: wxgtku-devel
|
||||||
|
BuildRequires: pkgconfig(gloox)
|
||||||
|
BuildRequires: pkgconfig(icu-i18n)
|
||||||
|
BuildRequires: pkgconfig(IL)
|
||||||
BuildRequires: pkgconfig(libcurl)
|
BuildRequires: pkgconfig(libcurl)
|
||||||
BuildRequires: pkgconfig(libenet)
|
BuildRequires: pkgconfig(libenet)
|
||||||
BuildRequires: pkgconfig(libpng)
|
BuildRequires: pkgconfig(libpng)
|
||||||
|
BuildRequires: pkgconfig(libxml-2.0)
|
||||||
BuildRequires: pkgconfig(libzip)
|
BuildRequires: pkgconfig(libzip)
|
||||||
BuildRequires: pkgconfig(mozjs185)
|
BuildRequires: pkgconfig(mozjs-24)
|
||||||
BuildRequires: pkgconfig(openal)
|
BuildRequires: pkgconfig(openal)
|
||||||
BuildRequires: python
|
|
||||||
BuildRequires: pkgconfig(sdl)
|
BuildRequires: pkgconfig(sdl)
|
||||||
BuildRequires: subversion
|
BuildRequires: pkgconfig(vorbis)
|
||||||
BuildRequires: wxgtku-devel
|
Requires: %{name}-data
|
||||||
|
ExclusiveArch: %{ix86} x86_64
|
||||||
# http://trac.wildfiregames.com/ticket/1421
|
|
||||||
Patch1: %{name}-rpath.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
0 A.D. (pronounced "zero ey-dee") is a free, open-source, cross-platform
|
0 A.D. (pronounced "zero ey-dee") is a free, open-source, cross-platform
|
||||||
|
@ -105,43 +79,60 @@ hobbyist game developers, since 2001.
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README.txt LICENSE.txt
|
%doc README.txt LICENSE.txt
|
||||||
%doc license_gpl-2.0.txt license_lgpl-2.1.txt license_dbghelp.txt
|
%doc license_gpl-2.0.txt license_lgpl-2.1.txt
|
||||||
%{_gamesbindir}/0ad
|
%{_gamesbindir}/0ad
|
||||||
%{_gamesbindir}/pyrogenesis%{dbg}
|
%{_gamesbindir}/pyrogenesis%{dbg}
|
||||||
%{_libdir}/%{name}
|
%{_libdir}/%{name}
|
||||||
%{_datadir}/pixmaps/%{name}.png
|
%{_datadir}/pixmaps/%{name}.png
|
||||||
|
%{_datadir}/appdata/0ad.appdata.xml
|
||||||
%{_datadir}/applications/%{name}.desktop
|
%{_datadir}/applications/%{name}.desktop
|
||||||
%{_gamesdatadir}/%{name}
|
%{_gamesdatadir}/%{name}
|
||||||
%{_mandir}/man6/*.6*
|
%{_mandir}/man6/*.6*
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}-alpha
|
%setup -q -n %{name}-%{version}-alpha
|
||||||
|
%patch0 -p1
|
||||||
|
%if !%{with_debug}
|
||||||
|
# disable debug build, and "int 0x3" to trap to debugger (x86 only)
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%endif
|
||||||
|
%if %{mdvver} >= 201400
|
||||||
|
%patch2 -p1
|
||||||
|
%endif
|
||||||
|
%patch3 -p1
|
||||||
|
|
||||||
|
%if %{with_system_nvtt}
|
||||||
|
rm -fr libraries/nvtt
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
export CC=%{__cc}
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
export CPPFLAGS="%{optflags}"
|
|
||||||
# avoid warnings with gcc 4.7 due to _FORTIFY_SOURCE in CPPFLAGS
|
# avoid warnings with gcc 4.7 due to _FORTIFY_SOURCE in CPPFLAGS
|
||||||
export CPPFLAGS="`echo %{optflags} | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//'`"
|
export CPPFLAGS="`echo %{optflags} | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//'`"
|
||||||
build/workspaces/update-workspaces.sh \
|
build/workspaces/update-workspaces.sh \
|
||||||
--bindir %{_gamesbindir} \
|
--bindir %{_gamesbindir} \
|
||||||
--datadir %{_gamesdatadir}/%{name} \
|
--datadir %{_gamesdatadir}/%{name} \
|
||||||
--libdir %{_libdir}/%{name} \
|
--libdir %{_libdir}/%{name} \
|
||||||
--with-system-enet \
|
%if %{with_system_enet}
|
||||||
--with-system-mozjs185 \
|
--with-system-enet \
|
||||||
|
%endif
|
||||||
|
--with-system-mozjs24 \
|
||||||
|
--with-system-miniupnpc \
|
||||||
%if %{with_system_nvtt}
|
%if %{with_system_nvtt}
|
||||||
--with-system-nvtt \
|
--with-system-nvtt \
|
||||||
%endif
|
%endif
|
||||||
%if %{without_nvtt}
|
%if %{without_nvtt}
|
||||||
--without-nvtt \
|
--without-nvtt \
|
||||||
%endif
|
%endif
|
||||||
%{_smp_mflags}
|
%{?_smp_mflags}
|
||||||
|
|
||||||
%make -C build/workspaces/gcc config=%{config} verbose=1
|
%make -C build/workspaces/gcc config=%{config} verbose=1
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
export CC=%{__cc}
|
||||||
install -d -m 755 %{buildroot}%{_gamesbindir}
|
install -d -m 755 %{buildroot}%{_gamesbindir}
|
||||||
install -m 755 binaries/system/pyrogenesis%{dbg} %{buildroot}%{_gamesbindir}/pyrogenesis%{dbg}
|
install -m 755 binaries/system/pyrogenesis%{dbg} %{buildroot}%{_gamesbindir}/pyrogenesis%{dbg}
|
||||||
|
|
||||||
|
@ -150,12 +141,19 @@ for name in AtlasUI%{dbg} Collada%{dbg}; do
|
||||||
install -m 755 binaries/system/lib${name}.so %{buildroot}%{_libdir}/%{name}/lib${name}.so
|
install -m 755 binaries/system/lib${name}.so %{buildroot}%{_libdir}/%{name}/lib${name}.so
|
||||||
done
|
done
|
||||||
|
|
||||||
|
%if !%{with_system_enet}
|
||||||
|
install -p -m 755 binaries/system/libenet.so.1 %{buildroot}%{_libdir}/%{name}/libenet.so.1
|
||||||
|
%endif
|
||||||
|
|
||||||
%if !%{without_nvtt} && !%{with_system_nvtt}
|
%if !%{without_nvtt} && !%{with_system_nvtt}
|
||||||
for name in nvcore nvimage nvmath nvtt; do
|
for name in nvcore nvimage nvmath nvtt; do
|
||||||
install -p -m 755 binaries/system/lib${name}.so %{buildroot}%{_libdir}/%{name}/lib${name}.so
|
install -p -m 755 binaries/system/lib${name}.so %{buildroot}%{_libdir}/%{name}/lib${name}.so
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
install -d -m 755 %{buildroot}%{_datadir}/appdata
|
||||||
|
install -p -m 644 build/resources/0ad.appdata.xml %{buildroot}%{_datadir}/appdata
|
||||||
|
|
||||||
install -d -m 755 %{buildroot}%{_gamesdatadir}/applications
|
install -d -m 755 %{buildroot}%{_gamesdatadir}/applications
|
||||||
install -m 644 build/resources/0ad.desktop %{buildroot}%{_gamesdatadir}/applications/%{name}.desktop
|
install -m 644 build/resources/0ad.desktop %{buildroot}%{_gamesdatadir}/applications/%{name}.desktop
|
||||||
perl -pi -e 's|%{_bindir}/0ad|%{_gamesbindir}/0ad|;' \
|
perl -pi -e 's|%{_bindir}/0ad|%{_gamesbindir}/0ad|;' \
|
||||||
|
@ -171,6 +169,8 @@ install -d -m 755 %{buildroot}%{_mandir}/man6
|
||||||
install -p -m 644 %{SOURCE1} %{buildroot}%{_mandir}/man6/%{name}.6
|
install -p -m 644 %{SOURCE1} %{buildroot}%{_mandir}/man6/%{name}.6
|
||||||
ln -sf %{name}.6 %{buildroot}%{_mandir}/man6/pyrogenesis.6
|
ln -sf %{name}.6 %{buildroot}%{_mandir}/man6/pyrogenesis.6
|
||||||
|
|
||||||
|
desktop-file-validate %{buildroot}%{_gamesdatadir}/applications/%{name}.desktop
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_datadir}
|
mkdir -p %{buildroot}%{_datadir}
|
||||||
mv -f %{buildroot}%{_gamesdatadir}/{pixmaps,applications} %{buildroot}%{_datadir}
|
mv -f %{buildroot}%{_gamesdatadir}/{pixmaps,applications} %{buildroot}%{_datadir}
|
||||||
|
|
||||||
|
@ -189,5 +189,6 @@ export EXCLUDE_FROM_FULL_STRIP="libAtlasUI_dbg.so libCollada_dbg.so pyrogenesis_
|
||||||
# Depends on availablity of nvtt
|
# Depends on availablity of nvtt
|
||||||
%if !%{without_nvtt}
|
%if !%{without_nvtt}
|
||||||
%check
|
%check
|
||||||
LD_LIBRARY_PATH=binaries/system binaries/system/test%{dbg} -libdir binaries/system
|
export CC=%{__cc}
|
||||||
|
LD_LIBRARY_PATH=binaries/system binaries/system/test%{dbg}
|
||||||
%endif
|
%endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue