mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
Initial bep file for celestia, fails to build on gcc2, missing "limits", should build on gcc4 but untested, so
marking as unstable for now.
This commit is contained in:
24
sci-astronomy/celestia/celestia-1.6.0.bep
Normal file
24
sci-astronomy/celestia/celestia-1.6.0.bep
Normal file
@@ -0,0 +1,24 @@
|
||||
DESCRIPTION="Celestia - The free space simulation"
|
||||
HOMEPAGE="http://www.shatters.net/celestia/"
|
||||
SRC_URI="http://sourceforge.net/projects/celestia/files/Celestia-source/1.6.0/celestia-1.6.0.tar.gz/download"
|
||||
CHECKSUM_MD5="9b96a8e7666ab5a26f032b9d605e023d"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="unstable"
|
||||
DEPEND="dev-lang/lua >= 5.1.4
|
||||
sys-devel/gettext >= 0.17"
|
||||
|
||||
BUILD {
|
||||
cd celestia-1.6.0
|
||||
libtoolize --force --copy --install
|
||||
autoreconf -i
|
||||
./configure --prefix=/boot/apps/celestia --with-glut
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL {
|
||||
cd celestia-1.6.0
|
||||
make install
|
||||
}
|
||||
|
||||
LICENSE="GNU GPL v2"
|
||||
COPYRIGHT="2001-2008 Celestia Development Team"
|
||||
121
sci-astronomy/celestia/patches/celestia-1.6.0.patch
Normal file
121
sci-astronomy/celestia/patches/celestia-1.6.0.patch
Normal file
@@ -0,0 +1,121 @@
|
||||
diff -Naur celestia-1.6.0/configure.in celestia-1.6.0-haiku/configure.in
|
||||
--- celestia-1.6.0/configure.in 2009-06-22 15:52:39.019660800 +0000
|
||||
+++ celestia-1.6.0-haiku/configure.in 2010-08-12 23:41:43.749469696 +0000
|
||||
@@ -193,7 +193,7 @@
|
||||
AM_CONDITIONAL(ENABLE_SPICE, test "$SPICELIB" != "")
|
||||
|
||||
|
||||
-LIBS="$LIBS -lm"
|
||||
+LIBS="$LIBS -lintl"
|
||||
|
||||
dnl Use Gtk if requested
|
||||
GTK_LIBS=""
|
||||
@@ -237,7 +237,7 @@
|
||||
CFLAGS="$CFLAGS $CELESTIAFLAGS $CELESTIA_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $CELESTIAFLAGS $CELESTIA_CXXFLAGS"
|
||||
LIBS="$LIBS $CELESTIALIBS"
|
||||
-LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lXmu -lXi -lXext -lX11 -lm -lz $X_EXTRA_LIBS"
|
||||
+LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lz $X_EXTRA_LIBS"
|
||||
|
||||
dnl Check for zlib -- libGL requires it.
|
||||
AC_CHECK_LIB(z, deflate, ,
|
||||
diff -Naur celestia-1.6.0/data/Makefile.am celestia-1.6.0-haiku/data/Makefile.am
|
||||
--- celestia-1.6.0/data/Makefile.am 2009-06-22 15:48:06.024903680 +0000
|
||||
+++ celestia-1.6.0-haiku/data/Makefile.am 2010-08-12 23:56:00.052428800 +0000
|
||||
@@ -15,8 +15,7 @@
|
||||
$(wildcard *.xyz) \
|
||||
$(wildcard *.xyzv) \
|
||||
$(wildcard *.dsc) \
|
||||
- $(wildcard *.stc) \
|
||||
- stars.dat
|
||||
+ $(wildcard *.stc)
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(pkgdata_DATA) \
|
||||
diff -Naur celestia-1.6.0/src/celengine/astro.cpp celestia-1.6.0-haiku/src/celengine/astro.cpp
|
||||
--- celestia-1.6.0/src/celengine/astro.cpp 2009-06-22 15:44:08.046137344 +0000
|
||||
+++ celestia-1.6.0-haiku/src/celengine/astro.cpp 2010-08-12 19:00:33.000000000 +0000
|
||||
@@ -522,7 +522,7 @@
|
||||
cal_time.tm_sec = (int)seconds;
|
||||
cal_time.tm_wday = wday;
|
||||
cal_time.tm_gmtoff = utc_offset;
|
||||
-#if defined(TARGET_OS_MAC) || defined(__FreeBSD__)
|
||||
+#if defined(TARGET_OS_MAC) || defined(__FreeBSD__) || defined(__HAIKU__)
|
||||
// tm_zone is a non-const string field on the Mac and FreeBSD (why?)
|
||||
cal_time.tm_zone = const_cast<char*>(tzname.c_str());
|
||||
#else
|
||||
diff -Naur celestia-1.6.0/src/celengine/glext.cpp celestia-1.6.0-haiku/src/celengine/glext.cpp
|
||||
--- celestia-1.6.0/src/celengine/glext.cpp 2009-06-22 15:44:08.049020928 +0000
|
||||
+++ celestia-1.6.0-haiku/src/celengine/glext.cpp 2010-08-12 19:07:19.000000000 +0000
|
||||
@@ -12,10 +12,10 @@
|
||||
|
||||
#ifndef _WIN32
|
||||
// Assume that this is a UNIX/X11 system if it's not Windows or Mac OS X.
|
||||
-#ifndef TARGET_OS_MAC
|
||||
+#if !defined(TARGET_OS_MAC) && !defined(__HAIKU__)
|
||||
#include "GL/glx.h"
|
||||
#include <dlfcn.h>
|
||||
-#endif /* ! TARGET_OS_MAC */
|
||||
+#endif /* ! TARGET_OS_MAC || HAIKU */
|
||||
#endif /* ! _WIN32 */
|
||||
|
||||
#include "glext.h"
|
||||
@@ -306,7 +306,7 @@
|
||||
|
||||
#else
|
||||
|
||||
-#ifndef TARGET_OS_MAC
|
||||
+#if !defined(TARGET_OS_MAC) && !defined(__HAIKU__)
|
||||
#if defined(_WIN32)
|
||||
|
||||
#define GET_GL_PROC_ADDRESS(name) wglGetProcAddress(name)
|
||||
@@ -692,9 +692,11 @@
|
||||
|
||||
static void InitExt_GLX_SGI_video_sync()
|
||||
{
|
||||
+#if defined(GET_GL_PROC_ADDRESS)
|
||||
glx::glXGetVideoSyncSGI = (glx::PFNGLXGETVIDEOSYNCSGIPROC) GET_GL_PROC_ADDRESS("glXGetVideoSyncSGI");
|
||||
glx::glXWaitVideoSyncSGI = (glx::PFNGLXWAITVIDEOSYNCSGIPROC) GET_GL_PROC_ADDRESS("glXWaitVideoSyncSGI");
|
||||
glx::glXGetRefreshRateSGI = (glx::PFNGLXGETREFRESHRATESGIPROC) GET_GL_PROC_ADDRESS("glXGetRefreshRateSGI");
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
||||
diff -Naur celestia-1.6.0/src/celengine/image.cpp celestia-1.6.0-haiku/src/celengine/image.cpp
|
||||
--- celestia-1.6.0/src/celengine/image.cpp 2009-06-22 15:44:08.049545216 +0000
|
||||
+++ celestia-1.6.0-haiku/src/celengine/image.cpp 2010-08-12 19:09:42.000000000 +0000
|
||||
@@ -737,7 +737,7 @@
|
||||
|
||||
if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
|
||||
{
|
||||
- png_set_gray_1_2_4_to_8(png_ptr);
|
||||
+ png_set_expand_gray_1_2_4_to_8(png_ptr);
|
||||
}
|
||||
|
||||
if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
|
||||
diff -Naur celestia-1.6.0/src/celutil/unixdirectory.cpp celestia-1.6.0-haiku/src/celutil/unixdirectory.cpp
|
||||
--- celestia-1.6.0/src/celutil/unixdirectory.cpp 2009-06-22 15:44:24.030408704 +0000
|
||||
+++ celestia-1.6.0-haiku/src/celutil/unixdirectory.cpp 2010-08-12 18:58:58.000000000 +0000
|
||||
@@ -11,19 +11,19 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
+#if !defined(__HAIKU__)
|
||||
#include <wordexp.h>
|
||||
+#endif
|
||||
#include "directory.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
-#ifdef TARGET_OS_MAC
|
||||
-#ifdef QT_CORE_LIB
|
||||
+#if defined(__HAIKU__) || defined(TARGET_OS_MAC) && defined(QT_CORE_LIB)
|
||||
// Crash on Mac OS X / Qt4 version when calling wordfree.
|
||||
// This seems to happen only with Leopard.
|
||||
#define WORDEXP_PROBLEM
|
||||
#endif
|
||||
-#endif
|
||||
|
||||
class UnixDirectory : public Directory
|
||||
{
|
||||
Reference in New Issue
Block a user