- Update to r7970

- Compile in Release mode

OBS-URL: https://build.opensuse.org/package/show/games/0ad?expand=0&rev=10
This commit is contained in:
Philip Taylor 2010-08-15 16:51:34 +00:00 committed by Git OBS Bridge
parent 6f6ec34cdc
commit 6f2f428387
24 changed files with 67 additions and 588 deletions

View File

@ -1,124 +0,0 @@
Index: source/ps/DllLoader.cpp
===================================================================
--- source/ps/DllLoader.cpp (revision 7732)
+++ source/ps/DllLoader.cpp (revision 7795)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Wildfire Games.
+/* Copyright (C) 2010 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -19,19 +19,25 @@
#include "DllLoader.h"
+#include "lib/timer.h"
#include "lib/posix/posix_dlfcn.h"
#include "ps/CStr.h"
#include "ps/CLogger.h"
+#include "ps/GameSetup/Config.h"
void* const HANDLE_UNAVAILABLE = (void*)-1;
+// directory to search for libraries (optionally set by --libdir at build-time,
+// optionally overridden by -libdir at run-time in the test executable);
+// if we don't have an explicit libdir then the linker will look in DT_RUNPATH
+// (which we set to $ORIGIN) to find it in the executable's directory
+#ifdef INSTALLED_LIBDIR
+static CStr g_Libdir = STRINGIZE(INSTALLED_LIBDIR);
+#else
+static CStr g_Libdir = "";
+#endif
-// TODO Use path_util instead, get the actual path to the ps_dbg exe and append
-// the library name.
-
-// note: on Linux, lib is prepended to the SO file name;
-// we don't use a path with '/' so the linker will look in DT_RUNPATH
-// (which we set to $ORIGIN) to find it in the executable's directory
+// note: on Linux, lib is prepended to the SO file name
#if OS_UNIX
static const char* prefix = "lib";
#else
@@ -41,15 +47,26 @@
// but for debugging/performance we prefer to use the same version as the app.
// note: on Windows, the extension is replaced with .dll by dlopen.
#ifndef NDEBUG
-static const char* suffix = "_dbg.so";
+static const char* primarySuffix = "_dbg.so";
+static const char* secondarySuffix = ".so";
#else
-static const char* suffix = ".so";
+static const char* primarySuffix = ".so";
+static const char* secondarySuffix = "_dbg.so";
#endif
// (This class is currently only used by 'Collada' and 'AtlasUI' which follow
// the naming/location convention above - it'll need to be changed if we want
// to support other DLLs.)
+static CStr GenerateFilename(const CStr& name, const CStr& suffix)
+{
+ CStr n;
+ if (!g_Libdir.empty())
+ n = g_Libdir + "/";
+ n += prefix + name + suffix;
+ return n;
+}
+
DllLoader::DllLoader(const char* name)
: m_Name(name), m_Handle(0)
{
@@ -72,23 +89,39 @@
// postcondition: m_Handle valid or == HANDLE_UNAVAILABLE.
if (m_Handle == 0)
{
- CStr filename = CStr(prefix) + m_Name + suffix;
+ TIMER(L"LoadDLL");
// we don't really care when relocations take place, but one of
// {RTLD_NOW, RTLD_LAZY} must be passed. go with the former because
// it is safer and matches the Windows load behavior.
const int flags = RTLD_LOCAL|RTLD_NOW;
+ CStr filename = GenerateFilename(m_Name, primarySuffix);
m_Handle = dlopen(filename, flags);
+ char* primaryError = NULL;
+
// open failed (mostly likely SO not found)
if (! m_Handle)
{
- const char* error = dlerror();
- if (error)
- LOG(CLogger::Error, L"", L"dlopen error: %hs", error);
+ primaryError = dlerror();
+ if (primaryError)
+ primaryError = strdup(primaryError); // don't get overwritten by next dlopen
+
+ // Try to open the other debug/release version
+ filename = GenerateFilename(m_Name, secondarySuffix);
+ m_Handle = dlopen(filename, flags);
+ }
+
+ // open still failed; report the first error
+ if (! m_Handle)
+ {
+ if (primaryError)
+ LOGERROR(L"dlopen error: %hs", primaryError);
m_Handle = HANDLE_UNAVAILABLE;
}
+
+ free(primaryError);
}
return (m_Handle != HANDLE_UNAVAILABLE);
@@ -117,3 +150,8 @@
if (*fptr == NULL)
throw PSERROR_DllLoader_SymbolNotFound();
}
+
+void DllLoader::OverrideLibdir(const CStr& libdir)
+{
+ g_Libdir = libdir;
+}

View File

@ -1,47 +0,0 @@
diff -r f2cdbf31ce9b source/lib/sysdep/arch/x86_x64/topology.cpp
--- source/lib/sysdep/arch/x86_x64/topology.cpp Sat Jul 10 18:42:54 2010 +0100
+++ source/lib/sysdep/arch/x86_x64/topology.cpp Sat Jul 24 22:34:51 2010 +0100
@@ -137,18 +137,24 @@
// core, package and shared cache. if they are available, we can determine
// the exact topology; otherwise we have to guess.
-// side effect: `removes' (via std::unique) duplicate IDs.
-static bool AreApicIdsUnique(u8* apicIds, size_t numProcessors)
+// if false is returned, the APIC IDs are fishy and shouldn't be used.
+// side effect: sorts IDs and `removes' (via std::unique) duplicates.
+static bool AreApicIdsUnique(u8* apicIds, size_t numIds)
{
- u8* const end = std::unique(apicIds, apicIds+numProcessors);
- const size_t numIds = end-apicIds;
- if(numIds == numProcessors) // all unique
+ std::sort(apicIds, apicIds+numIds);
+ u8* const end = std::unique(apicIds, apicIds+numIds);
+ const size_t numUnique = end-apicIds;
+ // all unique => IDs are valid.
+ if(numUnique == numIds)
return true;
- // the only legitimate cause of duplication is when no xAPIC is
- // present (i.e. all are 0)
- debug_assert(numIds == 1);
- debug_assert(apicIds[0] == 0);
+ // all zero => the system lacks an xAPIC.
+ if(numUnique == 1 && apicIds[0] == 0)
+ return false;
+
+ // duplicated IDs => something went wrong. for example, VMs might not
+ // expose all physical processors, and OS X still doesn't support
+ // thread affinity masks.
return false;
}
@@ -245,7 +251,8 @@
// assume cores are enabled and count as processors.
const size_t numPackagesTimesLogical = os_cpu_NumProcessors() / CoresPerPackage();
- debug_assert(numPackagesTimesLogical != 0);
+ // note: this might give numPackagesTimesLogical == 0 (e.g. when running in some VMs)
+
// assume hyperthreads are enabled.
size_t numPackages = numPackagesTimesLogical;
// if they are reported as processors, remove them from the count.

View File

@ -1,26 +0,0 @@
Index: build/premake/src/Src/path.c
===================================================================
--- build/premake/src/Src/path.c 2006-04-20 03:28:20.000000000 +0200
+++ build/premake/src/Src/path.c 2010-07-14 18:09:27.364697234 +0200
@@ -240,7 +240,7 @@
path_translateInPlace(forpart, "posix");
ptr = strrchr(forpart, '/');
- ptr = (ptr != NULL) ? ++ptr : forpart;
+ ptr = (ptr != NULL) ? ptr+1 : forpart;
return ptr;
}
Index: build/premake/src/Src/vs.c
===================================================================
--- build/premake/src/Src/vs.c 2010-06-10 21:15:33.000000000 +0200
+++ build/premake/src/Src/vs.c 2010-07-14 18:09:46.373697698 +0200
@@ -173,7 +173,7 @@
io_print("=\"");
}
-static tag_attr_close()
+static void tag_attr_close()
{
io_print("\"");
attrib++;

View File

@ -1,16 +0,0 @@
Index: libraries/fcollada/src/FCollada/FUtils/FUDebug.cpp
===================================================================
--- libraries/fcollada/src/FCollada/FUtils/FUDebug.cpp 2008-09-08 00:13:25.000000000 +0200
+++ libraries/fcollada/src/FCollada/FUtils/FUDebug.cpp 2010-07-14 19:27:11.850136645 +0200
@@ -20,9 +20,9 @@
#if defined(LINUX) || defined(__APPLE__)
#if defined(UNICODE)
-#define STRING_OUT(sz) fprintf(stderr, TO_STRING(sz).c_str()); fflush(stderr);
+#define STRING_OUT(sz) fprintf(stderr, "%s", TO_STRING(sz).c_str()); fflush(stderr);
#else
-#define STRING_OUT(sz) fprintf(stderr, sz); fflush(stderr);
+#define STRING_OUT(sz) fprintf(stderr, "%s", sz); fflush(stderr);
#endif // UNICODE
#elif defined(WIN32)
#define STRING_OUT(sz) OutputDebugString(sz); OutputDebugString(FC("\n"))

View File

@ -1,79 +0,0 @@
Index: build/premake/premake.lua
===================================================================
--- build/premake/premake.lua (revision 7757)
+++ build/premake/premake.lua (revision 7758)
@@ -6,6 +6,9 @@
addoption("outpath", "Location for generated project files")
addoption("without-tests", "Disable generation of test projects")
addoption("without-pch", "Disable generation and usage of precompiled headers")
+addoption("bindir", "Directory for executables (typically '/usr/games/bin'); default is to be relocatable")
+addoption("datadir", "Directory for data files (typically '/usr/share/games/0ad'); default is ../data/ relative to executable")
+addoption("libdir", "Directory for libraries (typically '/usr/games/lib'); default is ./ relative to executable")
dofile("functions.lua")
dofile("extern_libs.lua")
@@ -206,13 +209,6 @@
end
end
- if OS == "linux" then
- -- To use our local SpiderMonkey library, it needs to be part of the runtime dynamic linker
- -- path. So add the executable path with -rpath:
- -- (TODO: is this a sane way to do it?)
- tinsert(package.linkoptions, {"-Wl,-rpath='$$ORIGIN'"}) -- use Makefile escaping of '$'
- end
-
tinsert(package.buildoptions, {
-- Hide symbols in dynamic shared objects by default, for efficiency and for equivalence with
-- Windows - they should be exported explicitly with __attribute__ ((visibility ("default")))
@@ -233,10 +229,28 @@
if OS == "linux" and options["icc"] then
tinsert(package.libpaths, "/usr/i686-pc-linux-gnu/lib") -- needed for ICC to find libbfd
end
-
- package.defines = {
- -- "CONFIG_USE_MMGR",
- }
+
+ if options["bindir"] then
+ tinsert(package.defines, "INSTALLED_BINDIR=" .. options["bindir"])
+ end
+ if options["datadir"] then
+ tinsert(package.defines, "INSTALLED_DATADIR=" .. options["datadir"])
+ end
+ if options["libdir"] then
+ tinsert(package.defines, "INSTALLED_LIBDIR=" .. options["libdir"])
+ end
+
+ if OS == "linux" then
+ -- To use our local SpiderMonkey library, it needs to be part of the
+ -- runtime dynamic linker path. Add it with -rpath to make sure it gets found.
+ if options["libdir"] then
+ tinsert(package.linkoptions, {"-Wl,-rpath=" .. options["libdir"]})
+ else
+ -- Add the executable path:
+ tinsert(package.linkoptions, {"-Wl,-rpath='$$ORIGIN'"}) -- use Makefile escaping of '$'
+ end
+ end
+
end
end
Index: source/ps/GameSetup/Paths.cpp
===================================================================
--- source/ps/GameSetup/Paths.cpp (revision 7757)
+++ source/ps/GameSetup/Paths.cpp (revision 7758)
@@ -30,7 +30,13 @@
Paths::Paths(const CmdLineArgs& args)
{
m_root = Root(wstring_from_utf8(args.GetArg0()));
+
+#ifdef INSTALLED_DATADIR
+ m_rdata = WIDEN(STRINGIZE(INSTALLED_DATADIR)) L"/";
+#else
m_rdata = m_root/L"data/";
+#endif
+
const wchar_t* subdirectoryName = args.Has("writableRoot")? 0 : L"0ad";
// everything is a subdirectory of the root

View File

@ -1,41 +0,0 @@
Index: libraries/fcollada/src/Makefile
===================================================================
--- libraries/fcollada/src/Makefile 2010-04-03 13:27:24.000000000 +0200
+++ libraries/fcollada/src/Makefile 2010-07-14 18:17:57.672697429 +0200
@@ -8,7 +8,7 @@
endif
CXX := g++
-CXXFLAGS := -fvisibility=hidden -W -Wall -Wno-unused-parameter -Wno-unused-function $(OS_DEFINE) $(PIC_FLAGS)
+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)
@@ -243,7 +243,7 @@
@ar -cr $@ $(OBJECTS_RELEASE); ranlib $@
output/FColladaTest: $(OBJECTS_TEST)
- @$(CXX) -o $@ $(LDFLAGS) $(OBJECTS_TEST) $(LIBS)
+ $(CXX) -o $@ $(LDFLAGS) $(OBJECTS_TEST) $(LIBS)
install: output/libFColladaSD.a output/libFColladaSR.a
cp output/libFColladaSD.a ../lib/libFColladaSD.a
@@ -258,15 +258,15 @@
rm -f $(dfile)
output/debug/%.o: %.cpp
@echo "$<"
- @$(CXX) $(CXXFLAGS) $(CXXFLAGS_DEBUG) $(INCLUDES) -MD -MF $(dfile) -c $< -o $@
+ $(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 $@
+ $(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 $@
+ $(CXX) $(CXXFLAGS) $(CXXFLAGS_TEST) $(INCLUDES_TEST) -MD -MF $(dfile) -c $< -o $@
$(gendep)
clean:

View File

@ -1,35 +0,0 @@
Index: source/ps/VideoMode.cpp
===================================================================
--- source/ps/VideoMode.cpp (revision 7790)
+++ source/ps/VideoMode.cpp (revision 7791)
@@ -96,9 +96,6 @@
// (command line params may override these)
gfx_get_video_mode(&m_PreferredW, &m_PreferredH, &m_PreferredBPP, &m_PreferredFreq);
- SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
- SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
-
int w = m_ConfigW;
int h = m_ConfigH;
@@ -121,9 +118,19 @@
int bpp = GetBestBPP();
+ SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
+ SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
+
if (!SetVideoMode(w, h, bpp, m_ConfigFullscreen))
- return false;
+ {
+ // Fall back to a smaller depth buffer
+ // (The rendering may be ugly but this helps when running in VMware)
+ SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
+ if (!SetVideoMode(w, h, bpp, m_ConfigFullscreen))
+ return false;
+ }
+
// Work around a bug in the proprietary Linux ATI driver (at least versions 8.16.20 and 8.14.13).
// The driver appears to register its own atexit hook on context creation.
// If this atexit hook is called before SDL_Quit destroys the OpenGL context,

View File

@ -1,31 +0,0 @@
Index: source/tools/atlas/GameInterface/GameLoop.cpp
===================================================================
--- source/tools/atlas/GameInterface/GameLoop.cpp (revision 7792)
+++ source/tools/atlas/GameInterface/GameLoop.cpp (revision 7793)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Wildfire Games.
+/* Copyright (C) 2010 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -63,8 +63,7 @@
}
-static MessagePasserImpl msgPasser;
-MessagePasser* AtlasMessage::g_MessagePasser = &msgPasser;
+MessagePasser* AtlasMessage::g_MessagePasser = NULL;
static InputProcessor g_Input;
@@ -118,6 +117,10 @@
return false;
}
+ // Construct a message passer for communicating with Atlas
+ MessagePasserImpl msgPasser;
+ AtlasMessage::g_MessagePasser = &msgPasser;
+
// Pass our message handler to Atlas
Atlas_SetMessagePasser(&msgPasser);

View File

@ -1,45 +0,0 @@
Index: source/ps/DllLoader.h
===================================================================
--- source/ps/DllLoader.h (revision 7794)
+++ source/ps/DllLoader.h (revision 7795)
@@ -68,6 +68,11 @@
template <typename T>
void LoadSymbol(const char* name, T& fptr) const;
+ /**
+ * Override the build-time setting of the directory to search for libraries.
+ */
+ static void OverrideLibdir(const CStr& libdir);
+
private:
// Typeless version - the public LoadSymbol hides the slightly ugly
// casting from users.
Index: libraries/cxxtest/include/cxxtest/PsTestWrapper.h
===================================================================
--- libraries/cxxtest/include/cxxtest/PsTestWrapper.h (revision 7794)
+++ libraries/cxxtest/include/cxxtest/PsTestWrapper.h (revision 7795)
@@ -16,6 +16,8 @@
# define PS_TEST_WRAPPER_BASE GuiListener
#endif
+#include "ps/DllLoader.h"
+
namespace CxxTest
{
extern const char *g_PsArgv0;
@@ -112,12 +114,15 @@
}
} else if ( !strcmp( argv[i], "-list" ) ) {
g_PsListSuites = true;
+ } else if ( !strcmp( argv[i], "-libdir" ) ) {
+ DllLoader::OverrideLibdir( argv[++i] );
} else {
fprintf( stderr, "Unrecognized command line option '%s'\n", argv[i] );
fprintf( stderr, "Permitted options:\n" );
fprintf( stderr, " %s -list\n", argv[0] );
fprintf( stderr, " %s -test TestSuiteName\n", argv[0] );
fprintf( stderr, " %s -test TestSuiteName::test_case_name\n", argv[0] );
+ fprintf( stderr, " %s -libdir .\n", argv[0] );
fprintf( stderr, "\n" );
}
}

View File

@ -1,17 +0,0 @@
Index: source/lib/sysdep/tests/test_sysdep.h
===================================================================
--- source/lib/sysdep/tests/test_sysdep.h (revision 7795)
+++ source/lib/sysdep/tests/test_sysdep.h (revision 7796)
@@ -120,7 +120,11 @@
char root[PATH_MAX];
sprintf_s(root, ARRAY_SIZE(root), "%s/pyrogenesis-test-sysdep-XXXXXX", tmpdir);
TS_ASSERT(mkdtemp(root));
- std::string rootstr(root);
+
+ char rootres[PATH_MAX];
+ TS_ASSERT(realpath(root, rootres));
+
+ std::string rootstr(rootres);
std::wstring rootstrw(wstring_from_utf8(rootstr));
const char* dirs[] = {

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:91a34c7d58a2adb60261e0b65443e0a2b1bbb2fd28dd25af7283fc19463db6fa
size 5097155

View File

@ -1,33 +0,0 @@
diff -r 976c6a6b04e9 source/lib/file/common/trace.cpp
--- source/lib/file/common/trace.cpp Sat Jul 24 19:57:17 2010 +0100
+++ source/lib/file/common/trace.cpp Sat Jul 24 20:30:39 2010 +0100
@@ -57,13 +57,26 @@
wchar_t pathname[PATH_MAX+1] = L""; // includes space for terminator
wchar_t action;
#if EMULATE_SECURE_CRT
- #define TRACE_FORMAT L"%f: %lc \"%" STRINGIZE(PATH_MAX) "l[^\"]\" %zd\n" /* use a macro to allow compile-time type-checking */
- const int fieldsRead = swscanf(text.c_str(), TRACE_FORMAT, &m_timestamp, &action, pathname, &m_size);
+ // The desired code:
+// #define TRACE_FORMAT L"%f: %lc \"%" STRINGIZE(PATH_MAX) "l[^\"]\" %zd\n" /* use a macro to allow compile-time type-checking */
+// const int fieldsRead = swscanf(text.c_str(), TRACE_FORMAT, &m_timestamp, &action, pathname, &m_size);
+ // but that hits http://sources.redhat.com/bugzilla/show_bug.cgi?id=5225 and crashes on glibc 2.7
+ // We need to avoid reading any numbers after the %[]
+ #define TRACE_FORMAT_1 L"%f: %lc \"%" STRINGIZE(PATH_MAX) "l[^\"]\" %n"
+ #define TRACE_FORMAT_2 L"%zd\n"
+ int charsRead = 0;
+ int fieldsRead = swscanf(text.c_str(), TRACE_FORMAT_1, &m_timestamp, &action, pathname, &charsRead);
+ debug_assert(fieldsRead == 3);
+ if (fieldsRead == 3) // first part parsed okay
+ {
+ fieldsRead = swscanf(text.c_str() + charsRead, TRACE_FORMAT_2, &m_size);
+ debug_assert(fieldsRead == 1);
+ }
#else
#define TRACE_FORMAT L"%f: %lc \"%l[^\"]\" %d\n"
const int fieldsRead = swscanf_s(text.c_str(), TRACE_FORMAT, &m_timestamp, &action, 1, pathname, ARRAY_SIZE(pathname), &m_size);
+ debug_assert(fieldsRead == 4);
#endif
- debug_assert(fieldsRead == 4);
debug_assert(action == 'L' || action == 'S');
m_action = (EAction)action;
m_pathname = pathname;

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sun Aug 15 15:29:40 UTC 2010 - philip@zaynar.co.uk
- Update to r7970
- Compile in Release mode
-------------------------------------------------------------------
Mon Jul 12 21:10:44 UTC 2010 - bitshuffler@opensuse.org

View File

@ -1,9 +0,0 @@
[Desktop Entry]
Version=1.0
Name=0 A.D.
Comment=A real-time strategy game of ancient warfare
Exec=/usr/bin/0ad
Icon=0ad
Terminal=false
Type=Application
Categories=Game;StrategyGame;

View File

@ -2,11 +2,11 @@ Format: 1.0
Source: 0ad
Binary: 0ad
Architecture: any
Version: r7732-1
Version: r07970-1
Maintainer: Stephan Kleine <bitshuffler@opensuse.org>
Homepage: http://wildfiregames.com/0ad/
Standards-Version: 3.8.0
Build-Depends: debhelper, libsdl1.2-dev, zlib1g-dev, libpng12-dev, libjpeg62-dev, libgamin-dev, nasm, libwxgtk2.8-dev, libboost1.35-dev, libboost-signals1.35-dev, libopenal-dev, libalut-dev, libvorbis-dev, libogg-dev, binutils-dev, libdevil-dev, libenet-dev, libxml2-dev, pkg-config, libboost-filesystem1.35-dev, zip, libstdc++6-4.3-dev, libsvga1, python
Files:
d8d3379b96b0c39e61c0d460d11bf06a 4366618 0ad-r7732.tar.gz
de993e4b2fd8191252c3a65b72eba516 9203 0ad-r7732.diff.gz
d8d3379b96b0c39e61c0d460d11bf06a 4366618 0ad-r07970.tar.gz
de993e4b2fd8191252c3a65b72eba516 9203 0ad-r07970.diff.gz

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b4cf1f7637f7a7ff1d6fcb8325a2769947e031643fe78eb15973edf5fa59606c
size 4566

3
0ad.sh
View File

@ -1,3 +0,0 @@
#!/bin/sh
/usr/bin/pyrogenesis_dbg "$@"

View File

@ -1,26 +1,12 @@
# norootforbuild
Name: 0ad
Version: r7732
Version: r07970
Release: 1.0
License: GNU GPL v2 or later
Group: Amusements/Games/Strategy/Real Time
Url: http://wildfiregames.com/0ad/
Source: 0ad-%{version}.tar.gz
Source1: 0ad.desktop
Source2: 0ad.png
Source3: 0ad.sh
Patch0: 0ad-cs7755.patch
Patch1: 0ad-cs7757.patch
Patch2: 0ad-cs7758.patch
Patch3: 0ad-cs7759.patch
Patch4: 0ad-cs7791.patch
Patch5: 0ad-cs7793.patch
Patch6: 0ad-cs7795.patch
Patch7: 0ad-cs7796.patch
Patch8: 0ad-DllLoader.patch
Patch9: 0ad-apicids.patch
Patch10: 0ad-traceparse.patch
Source: 0ad-%{version}-alpha-unix-build.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: binutils-devel
BuildRequires: boost-devel
@ -100,44 +86,33 @@ history.
%prep
%setup -q
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8
%patch9
%patch10
%setup -q -n %{name}-%{version}-alpha
%build
export CFLAGS="%{optflags}"
export CPPFLAGS="%{optflags}"
build/workspaces/update-workspaces.sh --verbose --bindir %{_bindir} --datadir %{_datadir}/%{name} --libdir %{_libdir}/%{name}
pushd build/workspaces/gcc
%__make %{?_smp_mflags}
%__make CONFIG=Release %{?_smp_mflags}
popd
%check
#__make check
LD_LIBRARY_PATH=binaries/system binaries/system/test_dbg -libdir binaries/system
LD_LIBRARY_PATH=binaries/system binaries/system/test -libdir binaries/system
%install
#makeinstall
%__install -Dm 0755 binaries/system/pyrogenesis_dbg %{buildroot}%{_bindir}/pyrogenesis_dbg
%__install -Dm 0755 binaries/system/libCollada_dbg.so %{buildroot}%{_libdir}/%{name}/libCollada_dbg.so
%__install -Dm 0755 binaries/system/libAtlasUI_dbg.so %{buildroot}%{_libdir}/%{name}/libAtlasUI_dbg.so
%__install -Dm 0755 binaries/system/libmozjs-ps-debug.so %{buildroot}%{_libdir}/%{name}/libmozjs-ps-debug.so
%__install -Dm 0755 binaries/system/pyrogenesis %{buildroot}%{_bindir}/pyrogenesis
%__install -Dm 0755 binaries/system/libCollada.so %{buildroot}%{_libdir}/%{name}/libCollada.so
%__install -Dm 0755 binaries/system/libAtlasUI.so %{buildroot}%{_libdir}/%{name}/libAtlasUI.so
%__install -Dm 0755 binaries/system/libmozjs-ps-release.so %{buildroot}%{_libdir}/%{name}/libmozjs-ps-release.so
#__install -Dm 0755 binaries/system/ActorEditor_dbg %{buildroot}/%{_libexecdir}/%{name}/bin/ActorEditor_dbg
#__install -Dm 0755 binaries/system/ColourTester_dbg %{buildroot}/%{_libexecdir}/%{name}/bin/ColourTester_dbg
#__install -Dm 0755 binaries/system/ActorEditor %{buildroot}/%{_libexecdir}/%{name}/bin/ActorEditor
#__install -Dm 0755 binaries/system/ColourTester %{buildroot}/%{_libexecdir}/%{name}/bin/ColourTester
%__install -Dm 0644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop
%__install -Dm 0644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/%{name}.png
%__install -Dm 0644 build/resources/0ad.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
%__install -Dm 0644 build/resources/0ad.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
%if 0%{?suse_version}
%suse_update_desktop_file %{name}
@ -147,7 +122,7 @@ LD_LIBRARY_PATH=binaries/system binaries/system/test_dbg -libdir binaries/system
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%endif
%__install -Dm 0755 %{SOURCE3} %{buildroot}%{_bindir}/0ad
%__install -Dm 0755 build/resources/0ad.sh %{buildroot}%{_bindir}/0ad
%__mkdir_p %{buildroot}%{_libdir}/%{name}
%__mkdir_p %{buildroot}%{_datadir}/%{name}
@ -159,10 +134,10 @@ test "%{buildroot}" != "/" && %__rm -rf %{buildroot}
%defattr(-,root,root)
%doc README.txt
%{_bindir}/0ad
%{_bindir}/pyrogenesis_dbg
%{_libdir}/%{name}/libCollada_dbg.so
%{_libdir}/%{name}/libAtlasUI_dbg.so
%{_libdir}/%{name}/libmozjs-ps-debug.so
%{_bindir}/pyrogenesis
%{_libdir}/%{name}/libCollada.so
%{_libdir}/%{name}/libAtlasUI.so
%{_libdir}/%{name}/libmozjs-ps-release.so
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%dir %{_libdir}/%{name}

13
_service Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" ?>
<services>
<service name="download_url">
<param name="protocol">http</param>
<param name="host">releases.wildfiregames.com</param>
<param name="path">/0ad-r07970-alpha-unix-build.tar.gz</param>
</service>
<service name="verify_file">
<param name="file">_service:download_url:0ad-r07970-alpha-unix-build.tar.gz</param>
<param name="verifier">sha256</param>
<param name="checksum">02f205725ed3d9a9d5f353e4f478b9b305f987253f7db13e76fe30c6ea4d5d5b</param>
</service>
</services>

View File

@ -1,3 +1,11 @@
0ad (r07970-1) unstable; urgency=low
* New upstream version.
* Compile in Release mode.
* Use standard games directories.
-- Philip Taylor <philip@zaynar.co.uk> Sun, 15 Aug 2010 16:29:40 +0100
0ad (r7732-1) unstable; urgency=low
* Initial package.

View File

@ -1,7 +1,7 @@
usr/bin/0ad
usr/bin/pyrogenesis_dbg
usr/lib/libAtlasUI_dbg.so
usr/lib/libCollada_dbg.so
usr/lib/libmozjs-ps-debug.so
usr/games/0ad
usr/games/pyrogenesis
usr/lib/games/0ad/libAtlasUI.so
usr/lib/games/0ad/libCollada.so
usr/lib/games/0ad/libmozjs-ps-release.so
usr/share/pixmaps/0ad.png
usr/share/application/0ad.desktop
usr/share/applications/0ad.desktop

View File

@ -26,17 +26,17 @@ build-stamp: config-stamp
dh_testdir
# Add here commands to compile the package.
build/workspaces/update-workspaces.sh --verbose --bindir /usr/bin --datadir /usr/share/0ad --libdir /usr/lib
build/workspaces/update-workspaces.sh --verbose --bindir /usr/games --datadir /usr/share/games/0ad --libdir /usr/lib/games/0ad
# NUMJOBS=1
# ifneq ("",$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
# NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
# endif
# $(MAKE) -j$(NUMJOBS) -C build/workspaces/gcc
$(MAKE) -j2 -C build/workspaces/gcc
$(MAKE) CONFIG=Release -j2 -C build/workspaces/gcc
# Run tests
LD_LIBRARY_PATH=binaries/system binaries/system/test_dbg -libdir binaries/system
LD_LIBRARY_PATH=binaries/system binaries/system/test -libdir binaries/system
touch $@
@ -57,15 +57,18 @@ install: build
# Add here commands to install the package into debian/tmp
# $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
install -Dm 0755 binaries/system/pyrogenesis_dbg $(CURDIR)/debian/tmp/usr/bin/pyrogenesis_dbg
install -Dm 0755 binaries/system/libCollada_dbg.so $(CURDIR)/debian/tmp/usr/lib/libCollada_dbg.so
install -Dm 0755 binaries/system/libAtlasUI_dbg.so $(CURDIR)/debian/tmp/usr/lib/libAtlasUI_dbg.so
install -Dm 0755 binaries/system/libmozjs-ps-debug.so $(CURDIR)/debian/tmp/usr/lib/libmozjs-ps-debug.so
install -Dm 0755 binaries/system/pyrogenesis $(CURDIR)/debian/tmp/usr/games/pyrogenesis
install -Dm 0755 binaries/system/libCollada.so $(CURDIR)/debian/tmp/usr/lib/games/0ad/libCollada.so
install -Dm 0755 binaries/system/libAtlasUI.so $(CURDIR)/debian/tmp/usr/lib/games/0ad/libAtlasUI.so
install -Dm 0755 binaries/system/libmozjs-ps-release.so $(CURDIR)/debian/tmp/usr/lib/games/0ad/libmozjs-ps-release.so
install -Dm 0755 debian/0ad.sh $(CURDIR)/debian/tmp/usr/bin/0ad
sed -i 's/\/usr\/bin/\/usr\/games/' build/resources/0ad.sh
sed -i 's/\/usr\/bin/\/usr\/games/' build/resources/0ad.desktop
install -Dm 0644 debian/0ad.png $(CURDIR)/debian/tmp/usr/share/pixmaps/0ad.png
install -Dm 0644 debian/0ad.desktop $(CURDIR)/debian/tmp/usr/share/application/0ad.desktop
install -Dm 0755 build/resources/0ad.sh $(CURDIR)/debian/tmp/usr/games/0ad
install -Dm 0644 build/resources/0ad.png $(CURDIR)/debian/tmp/usr/share/pixmaps/0ad.png
install -Dm 0644 build/resources/0ad.desktop $(CURDIR)/debian/tmp/usr/share/applications/0ad.desktop
# Build architecture-independent files here.

View File

@ -1,11 +0,0 @@
0ad-cs7755.patch -p0
0ad-cs7757.patch -p0
0ad-cs7758.patch -p0
0ad-cs7759.patch -p0
0ad-cs7791.patch -p0
0ad-cs7793.patch -p0
0ad-cs7795.patch -p0
0ad-cs7796.patch -p0
0ad-DllLoader.patch -p0
0ad-apicids.patch -p0
0ad-traceparse.patch -p0

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eddf91012e76b6d3baf045501f0e3f50d3343805ca88cfd0a4ea5c9f62eb6f06
size 20480