diff options
Diffstat (limited to 'games-action/teeworlds/files/0.6.3/03-use-system-pnglite.patch')
-rw-r--r-- | games-action/teeworlds/files/0.6.3/03-use-system-pnglite.patch | 160 |
1 files changed, 160 insertions, 0 deletions
diff --git a/games-action/teeworlds/files/0.6.3/03-use-system-pnglite.patch b/games-action/teeworlds/files/0.6.3/03-use-system-pnglite.patch new file mode 100644 index 000000000000..81c3d915316b --- /dev/null +++ b/games-action/teeworlds/files/0.6.3/03-use-system-pnglite.patch @@ -0,0 +1,160 @@ +commit 291a375000ac8d9cd5548a863ea6b49c46cfb1bb +Author: hasufell <hasufell@gentoo.org> +Date: Thu Sep 5 12:36:53 2013 +0200 + + Use system pnglite. Based on Gentoo Bugzilla + + From: Azamat H. Hackimov <azamat.hackimov@gmail.com> + + https://bugs.gentoo.org/show_bug.cgi?id=363395 + +diff --git a/bam.lua b/bam.lua +index 35c1d8d..7902a2c 100644 +--- a/bam.lua ++++ b/bam.lua +@@ -11,6 +11,7 @@ config:Add(OptTestCompileC("stackprotector", "int main(){return 0;}", "-fstack-p + config:Add(OptTestCompileC("minmacosxsdk", "int main(){return 0;}", "-mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk")) + config:Add(OptTestCompileC("macosxppc", "int main(){return 0;}", "-arch ppc")) + config:Add(OptLibrary("zlib", "zlib.h", false)) ++config:Add(OptLibrary("pnglite", "pnglite.h", false)) + config:Add(OptLibrary("wavpack", "wavpack/wavpack.h", false)) + config:Add(SDL.OptFind("sdl", true)) + config:Add(FreeType.OptFind("freetype", true)) +@@ -199,26 +200,34 @@ function build(settings) + settings.cc.includes:Add("src/engine/external/zlib") + end + ++ -- build game components ++ engine_settings = settings:Copy() ++ server_settings = engine_settings:Copy() ++ client_settings = engine_settings:Copy() ++ launcher_settings = engine_settings:Copy() ++ ++ if config.pnglite.value == true then ++ client_settings.link.libs:Add("pnglite") ++ if config.pnglite.include_path then ++ client_settings.cc.includes:Add(config.pnglite.include_path) ++ end ++ pnglite = {} ++ else ++ pnglite = Compile(settings, Collect("src/engine/external/pnglite/*.c")) ++ client_settings.cc.includes:Add("src/engine/external/pnglite") ++ end ++ + if config.wavpack.value == true then +- settings.link.libs:Add("wavpack") ++ client_settings.link.libs:Add("wavpack") + if config.wavpack.include_path then +- settings.cc.includes:Add(config.wavpack.include_path) ++ client_settings.cc.includes:Add(config.wavpack.include_path) + end + wavpack = {} + else + wavpack = Compile(settings, Collect("src/engine/external/wavpack/*.c")) +- settings.cc.includes:Add("src/engine/external/") --The header is wavpack/wavpack.h so include the external folder ++ client_settings.cc.includes:Add("src/engine/external/") --The header is wavpack/wavpack.h so include the external folder + end + +- -- build the small libraries +- pnglite = Compile(settings, Collect("src/engine/external/pnglite/*.c")) +- +- -- build game components +- engine_settings = settings:Copy() +- server_settings = engine_settings:Copy() +- client_settings = engine_settings:Copy() +- launcher_settings = engine_settings:Copy() +- + if family == "unix" then + if platform == "macosx" then + client_settings.link.frameworks:Add("OpenGL") +diff --git a/src/engine/client/graphics.cpp b/src/engine/client/graphics.cpp +index 2e8a855..97e4fd7 100644 +--- a/src/engine/client/graphics.cpp ++++ b/src/engine/client/graphics.cpp +@@ -9,7 +9,7 @@ + #include "SDL_opengl.h" + + #include <base/system.h> +-#include <engine/external/pnglite/pnglite.h> ++#include <pnglite.h> + + #include <engine/shared/config.h> + #include <engine/graphics.h> +diff --git a/src/engine/client/graphics_threaded.cpp b/src/engine/client/graphics_threaded.cpp +index e34b725..60246d1 100644 +--- a/src/engine/client/graphics_threaded.cpp ++++ b/src/engine/client/graphics_threaded.cpp +@@ -6,7 +6,7 @@ + #include <base/tl/threading.h> + + #include <base/system.h> +-#include <engine/external/pnglite/pnglite.h> ++#include <pnglite.h> + + #include <engine/shared/config.h> + #include <engine/graphics.h> +diff --git a/src/tools/dilate.cpp b/src/tools/dilate.cpp +index 55094a5..42a5b83 100644 +--- a/src/tools/dilate.cpp ++++ b/src/tools/dilate.cpp +@@ -2,7 +2,7 @@ + /* If you are missing that file, acquire a complete release at teeworlds.com. */ + #include <base/system.h> + #include <base/math.h> +-#include <engine/external/pnglite/pnglite.h> ++#include <pnglite.h> + + typedef struct + { +diff --git a/src/tools/tileset_borderadd.cpp b/src/tools/tileset_borderadd.cpp +index 25e2fa5..88f760a 100644 +--- a/src/tools/tileset_borderadd.cpp ++++ b/src/tools/tileset_borderadd.cpp +@@ -2,7 +2,7 @@ + /* If you are missing that file, acquire a complete release at teeworlds.com. */ + #include <base/math.h> + #include <base/system.h> +-#include <engine/external/pnglite/pnglite.h> ++#include <pnglite.h> + + typedef struct + { +diff --git a/src/tools/tileset_borderfix.cpp b/src/tools/tileset_borderfix.cpp +index 0facb9a..ab36292 100644 +--- a/src/tools/tileset_borderfix.cpp ++++ b/src/tools/tileset_borderfix.cpp +@@ -1,7 +1,7 @@ + /* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */ + /* If you are missing that file, acquire a complete release at teeworlds.com. */ + #include <base/system.h> +-#include <engine/external/pnglite/pnglite.h> ++#include <pnglite.h> + + typedef struct + { +diff --git a/src/tools/tileset_borderrem.cpp b/src/tools/tileset_borderrem.cpp +index d604ecb..8673e41 100644 +--- a/src/tools/tileset_borderrem.cpp ++++ b/src/tools/tileset_borderrem.cpp +@@ -2,7 +2,7 @@ + /* If you are missing that file, acquire a complete release at teeworlds.com. */ + #include <base/math.h> + #include <base/system.h> +-#include <engine/external/pnglite/pnglite.h> ++#include <pnglite.h> + + typedef struct + { +diff --git a/src/tools/tileset_borderset.cpp b/src/tools/tileset_borderset.cpp +index 8b3e299..c762ee2 100644 +--- a/src/tools/tileset_borderset.cpp ++++ b/src/tools/tileset_borderset.cpp +@@ -2,7 +2,7 @@ + /* If you are missing that file, acquire a complete release at teeworlds.com. */ + #include <base/math.h> + #include <base/system.h> +-#include <engine/external/pnglite/pnglite.h> ++#include <pnglite.h> + + typedef struct + { |