summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordsomero <xgizzmo@slackbuilds.org>2011-03-21 23:32:52 -0400
committerRobby Workman <rworkman@slackbuilds.org>2011-03-24 19:23:15 -0500
commit89e256b5923d04b8647724660bb70388459ae407 (patch)
tree0d92cdf7406957cecb736e797574cb11caa573fe
parent4922dae2f51bf0aaf6a0d685ada2f5627f9f6a3e (diff)
downloadslackbuilds-89e256b5923d04b8647724660bb70388459ae407.tar.gz
academic/celestia: Updated gcc patch for gcc 4.5.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
-rw-r--r--academic/celestia/celestia-1.5.1-gcc44.patch30
-rw-r--r--academic/celestia/celestia-1.6.0-gcc45.patch51
-rw-r--r--academic/celestia/celestia.SlackBuild4
-rw-r--r--academic/celestia/celestia.info2
4 files changed, 54 insertions, 33 deletions
diff --git a/academic/celestia/celestia-1.5.1-gcc44.patch b/academic/celestia/celestia-1.5.1-gcc44.patch
deleted file mode 100644
index 6f484484f7..0000000000
--- a/academic/celestia/celestia-1.5.1-gcc44.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff -NrU5 celestia-1.5.1.orig/src/celengine/overlay.h celestia-1.5.1/src/celengine/overlay.h
---- celestia-1.5.1.orig/src/celengine/overlay.h 2009-05-17 15:01:34.000000000 -0600
-+++ celestia-1.5.1/src/celengine/overlay.h 2009-05-17 15:02:56.000000000 -0600
-@@ -9,10 +9,11 @@
-
- #ifndef _OVERLAY_H_
- #define _OVERLAY_H_
-
- #include <string>
-+#include <cstdio>
- #include <iostream>
- #include <celtxf/texturefont.h>
-
-
- class Overlay;
-diff -NrU5 celestia-1.5.1.orig/src/celengine/star.cpp celestia-1.5.1/src/celengine/star.cpp
---- celestia-1.5.1.orig/src/celengine/star.cpp 2009-05-17 15:01:34.000000000 -0600
-+++ celestia-1.5.1/src/celengine/star.cpp 2009-05-17 15:03:43.000000000 -0600
-@@ -7,10 +7,11 @@
- // as published by the Free Software Foundation; either version 2
- // of the License, or (at your option) any later version.
-
- #include <celmath/mathlib.h>
- #include <cstring>
-+#include <cstdio>
- #include <cassert>
- #include "celestia.h"
- #include "astro.h"
- #include "orbit.h"
- #include "star.h"
diff --git a/academic/celestia/celestia-1.6.0-gcc45.patch b/academic/celestia/celestia-1.6.0-gcc45.patch
new file mode 100644
index 0000000000..8ee9adb2aa
--- /dev/null
+++ b/academic/celestia/celestia-1.6.0-gcc45.patch
@@ -0,0 +1,51 @@
+Fixing build with GCC-4.5
+
+http://bugs.gentoo.org/show_bug.cgi?id=317507
+
+Patch written by Philipp <sefi@s-e-f-i.de>
+--- src/celengine/overlay.h
++++ src/celengine/overlay.h
+@@ -12,6 +12,7 @@
+
+ #include <string>
+ #include <iostream>
++#include <cstdio>
+ #include <celtxf/texturefont.h>
+
+
+--- src/celmath/mathlib.h
++++ src/celmath/mathlib.h
+@@ -44,11 +44,6 @@
+ template<class T> T radToDeg(T r)
+ return r * 180 / static_cast<T>(PI);
+ }
+
+-template<class T> T abs(T x)
+-{
+- return (x < 0) ? -x : x;
+-}
+-
+ template<class T> T square(T x)
+ {
+ return x * x;
+--- src/celengine/star.cpp
++++ src/celengine/star.cpp
+@@ -10,6 +10,7 @@
+ #include <celmath/mathlib.h>
+ #include <cstring>
+ #include <cassert>
++#include <cstdio>
+ #include "celestia.h"
+ #include "astro.h"
+ #include "orbit.h"
+--- src/celestia/celx_object.cpp
++++ src/celestia/celx_object.cpp
+@@ -773,7 +773,7 @@ static int object_mark(lua_State* l)
+ markAlpha = 1.0f;
+
+ Color markColorAlpha(0.0f, 1.0f, 0.0f, 0.9f);
+- markColorAlpha = Color::Color(markColor, markAlpha);
++ markColorAlpha = Color(markColor, markAlpha);
+
+ const char* markLabel = celx.safeGetString(6, WrongType, "Fifth argument to object:mark must be a string");
+ if (markLabel == NULL)
diff --git a/academic/celestia/celestia.SlackBuild b/academic/celestia/celestia.SlackBuild
index d662525482..96a7b5bd72 100644
--- a/academic/celestia/celestia.SlackBuild
+++ b/academic/celestia/celestia.SlackBuild
@@ -75,8 +75,8 @@ FRONTEND=${FRONTEND:-gtk}
# Fix detecting libpng 1.4
patch -p0 -i $CWD/celestia-1.6.0-libpng14.patch
-# Fix build errors for gcc 4.4
-patch -p1 -i $CWD/celestia-1.5.1-gcc44.patch
+# Fix build errors for gcc 4.5
+patch -p0 -i $CWD/celestia-1.6.0-gcc45.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/academic/celestia/celestia.info b/academic/celestia/celestia.info
index a82f1c9fbf..6dfd5d7a37 100644
--- a/academic/celestia/celestia.info
+++ b/academic/celestia/celestia.info
@@ -7,4 +7,4 @@ MD5SUM="9b96a8e7666ab5a26f032b9d605e023d"
MD5SUM_x86_64=""
MAINTAINER="Heinz Wiesinger"
EMAIL="pprkut@liwjatan.at"
-APPROVED="Erik Hanson"
+APPROVED="dsomero"