From 948f0ac5b9c489d4fa8cbb57fb7b8add86021e3a Mon Sep 17 00:00:00 2001 From: David Spencer Date: Mon, 27 Jul 2015 23:38:47 +0100 Subject: academic/celestia: Patched for libpng16. Fixes build failure on -current. Signed-off-by: David Spencer Signed-off-by: Willy Sudiarto Raharjo --- academic/celestia/celestia-1.6.1-libpng15.patch | 14 ++++++++++++++ academic/celestia/celestia-1.6.1-libpng16.patch | 25 +++++++++++++++++++++++++ academic/celestia/celestia.SlackBuild | 6 +++++- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 academic/celestia/celestia-1.6.1-libpng15.patch create mode 100644 academic/celestia/celestia-1.6.1-libpng16.patch (limited to 'academic') diff --git a/academic/celestia/celestia-1.6.1-libpng15.patch b/academic/celestia/celestia-1.6.1-libpng15.patch new file mode 100644 index 0000000000..5dffbab246 --- /dev/null +++ b/academic/celestia/celestia-1.6.1-libpng15.patch @@ -0,0 +1,14 @@ +imagecapture.cpp:184:40: error: ‘Z_BEST_COMPRESSION’ was not declared in this scope + +--- src/celestia/imagecapture.cpp ++++ src/celestia/imagecapture.cpp +@@ -31,6 +31,9 @@ + #include "png.h" + #endif + ++// Z_BEST_COMPRESSION ++#include ++ + // Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng + #ifndef png_jmpbuf + #define png_jmpbuf(png_ptr) png_ptr->jmpbuf diff --git a/academic/celestia/celestia-1.6.1-libpng16.patch b/academic/celestia/celestia-1.6.1-libpng16.patch new file mode 100644 index 0000000000..78911cb557 --- /dev/null +++ b/academic/celestia/celestia-1.6.1-libpng16.patch @@ -0,0 +1,25 @@ +image.cpp:530:61: error: ‘memcpy’ was not declared in this scope + +https://bugs.gentoo.org/show_bug.cgi?id=464764 + +Patch written by Lars Wendler +--- a/celestia/src/celengine/image.cpp ++++ b/celestia/src/celengine/image.cpp +@@ -42,6 +42,7 @@ extern "C" { + #include "jpeglib.h" + #else + #include ++#include + #include + #endif + } +--- a/celestia/src/celengine/texture.cpp ++++ b/celestia/src/celengine/texture.cpp +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #ifndef _WIN32 + #ifndef TARGET_OS_MAC diff --git a/academic/celestia/celestia.SlackBuild b/academic/celestia/celestia.SlackBuild index 1802c08d6d..4faaed06ae 100644 --- a/academic/celestia/celestia.SlackBuild +++ b/academic/celestia/celestia.SlackBuild @@ -72,9 +72,13 @@ find -L . \ # Note that the kde frontend will only build with kde3 FRONTEND=${FRONTEND:-gtk} -# Fix incomatibility with gcc 4.7 +# Fix incompatibility with gcc 4.7 patch -p1 -i $CWD/celestia-1.6.1-gcc47.patch +# Fix libpng incompatibilities (thanks to Arch Linux) +patch -p0 -i $CWD/celestia-1.6.1-libpng15.patch +patch -p2 -i $CWD/celestia-1.6.1-libpng16.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ -- cgit v1.2.3