[celestia] fix compile issues

Tom Callaway spot at fedoraproject.org
Thu Mar 22 17:14:30 UTC 2012


commit ebdf8cfebcedef7cf7c8421a9f61beffa9920564
Author: Tom Callaway <spot at fedoraproject.org>
Date:   Thu Mar 22 13:14:27 2012 -0400

    fix compile issues

 celestia-1.6.1-gcc47.patch |   22 ++++++++++++++++++++++
 celestia-1.6.1-zlib.patch  |   12 ++++++++++++
 celestia.spec              |   15 +++++++++------
 3 files changed, 43 insertions(+), 6 deletions(-)
---
diff --git a/celestia-1.6.1-gcc47.patch b/celestia-1.6.1-gcc47.patch
new file mode 100644
index 0000000..385f39a
--- /dev/null
+++ b/celestia-1.6.1-gcc47.patch
@@ -0,0 +1,22 @@
+diff -up celestia-1.6.1/src/celengine/frametree.h.gcc47 celestia-1.6.1/src/celengine/frametree.h
+--- celestia-1.6.1/src/celengine/frametree.h.gcc47	2012-03-22 12:56:56.096087430 -0400
++++ celestia-1.6.1/src/celengine/frametree.h	2012-03-22 12:57:04.333022427 -0400
+@@ -13,6 +13,7 @@
+ #ifndef _CELENGINE_FRAMETREE_H_
+ #define _CELENGINE_FRAMETREE_H_
+ 
++#include <unistd.h>
+ #include <vector>
+ 
+ class Star;
+diff -up celestia-1.6.1/src/celengine/planetgrid.cpp.gcc47 celestia-1.6.1/src/celengine/planetgrid.cpp
+--- celestia-1.6.1/src/celengine/planetgrid.cpp.gcc47	2012-03-22 12:53:01.496950513 -0400
++++ celestia-1.6.1/src/celengine/planetgrid.cpp	2012-03-22 12:53:08.812891865 -0400
+@@ -12,6 +12,7 @@
+ 
+ #include <cstdio>
+ #include <cmath>
++#include <celmath/mathlib.h>
+ #include <celmath/intersect.h>
+ #include "planetgrid.h"
+ #include "body.h"
diff --git a/celestia-1.6.1-zlib.patch b/celestia-1.6.1-zlib.patch
new file mode 100644
index 0000000..7566a2d
--- /dev/null
+++ b/celestia-1.6.1-zlib.patch
@@ -0,0 +1,12 @@
+diff -up celestia-1.6.1/src/celestia/imagecapture.cpp.zlib celestia-1.6.1/src/celestia/imagecapture.cpp
+--- celestia-1.6.1/src/celestia/imagecapture.cpp.zlib	2012-03-22 13:02:36.968386333 -0400
++++ celestia-1.6.1/src/celestia/imagecapture.cpp	2012-03-22 13:02:43.201336755 -0400
+@@ -31,6 +31,8 @@ extern "C" {
+ #include "png.h"
+ #endif
+ 
++#include <zlib.h>
++
+ // 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/celestia.spec b/celestia.spec
index 14c2ae6..c25786b 100644
--- a/celestia.spec
+++ b/celestia.spec
@@ -1,15 +1,15 @@
 Name:		celestia
 Version:        1.6.1
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        OpenGL real-time visual space simulation
 Group:          Applications/Emulators
 License:        GPLv2+
 Source0:        http://downloads.sourceforge.net/celestia/celestia-%{version}.tar.gz
 Source3:        celestia.desktop
-Patch1:         celestia-1.5.0-gcc44.patch
-Patch2:         celestia-1.6.0-gcc45.patch
 URL:            http://www.shatters.net/celestia/
-
+Patch0:		celestia-1.6.1-gcc47.patch
+Patch1:		celestia-1.6.1-zlib.patch
+BuildRequires:	zlib-devel
 BuildRequires:  gtkglext-devel
 BuildRequires:  libgnomeui-devel
 BuildRequires:  freeglut-devel
@@ -41,8 +41,8 @@ object you want to visit.
 
 %prep
 %setup -q
-%patch1 -p1 -b .gcc44
-%patch2 -p1 -b .gcc45
+%patch0 -p1 -b .gcc47
+%patch1 -p1 -b .zlib
 
 # Make sure we compile with the right CFLAGS/CXXFLAGS (from Hans de Goede).
 sed -i 's/CFLAGS="\$CFLAGS \$CELESTIAFLAGS \$CELESTIA_CFLAGS"/CFLAGS="\$CFLAGS \$CELESTIAFLAGS"/' configure
@@ -116,6 +116,9 @@ fi
 
 
 %changelog
+* Thu Mar 22 2012 Tom Callaway <spot at fedoraproject.org> - 1.6.1-5
+- fix compile issues (gcc 4.7, zlib)
+
 * Tue Feb 28 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.6.1-4
 - Rebuilt for c++ ABI breakage
 


More information about the scm-commits mailing list