Adapt to lua-5.1.1.
While here, fix build with gcc4, and add missing xdg-dirs to USE_DIRS. Bump PKGREVISION.
This commit is contained in:
parent
0d0d59cb4f
commit
d5c66e5a9d
6 changed files with 109 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
|||
# $NetBSD: Makefile,v 1.12 2006/07/22 04:46:16 rillig Exp $
|
||||
# $NetBSD: Makefile,v 1.13 2006/08/14 22:43:07 wiz Exp $
|
||||
|
||||
DISTNAME= celestia-1.4.1
|
||||
PKGREVISION= 1
|
||||
PKGREVISION= 2
|
||||
CATEGORIES= misc x11
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=celestia/}
|
||||
|
||||
|
@ -12,6 +12,7 @@ COMMENT= Free real-time 3D space simulator
|
|||
DISTINFO_FILE= ${.CURDIR}/../../misc/celestia/distinfo
|
||||
PATCHDIR= ${.CURDIR}/../../misc/celestia/patches
|
||||
|
||||
USE_DIRS+= xdg-1.3
|
||||
USE_LANGUAGES= c c++
|
||||
USE_LIBTOOL= yes
|
||||
USE_PKGLOCALEDIR= yes
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
$NetBSD: distinfo,v 1.11 2006/06/14 12:37:52 markd Exp $
|
||||
$NetBSD: distinfo,v 1.12 2006/08/14 22:43:07 wiz Exp $
|
||||
|
||||
SHA1 (celestia-1.4.1.tar.gz) = 37863498c43d3078b41027706bfa033bccd949a9
|
||||
RMD160 (celestia-1.4.1.tar.gz) = c66c2540e329613dace12e5b12b2dae2a4c679e0
|
||||
Size (celestia-1.4.1.tar.gz) = 23966886 bytes
|
||||
SHA1 (patch-aa) = 06ecb4fb7fa13702bd8dfc2fcf8d240fbb2a4b08
|
||||
SHA1 (patch-aa) = af449be4f92d3bc7e45feebd612f7d6b47299798
|
||||
SHA1 (patch-ab) = e749cc8a8bd9be9dd10b4f53e6d7878875a2aa57
|
||||
SHA1 (patch-ac) = 22e1ed46c832f97a4f2f20b5b6d6255469ea6b90
|
||||
SHA1 (patch-ad) = f7d9d5c3d80385eaba721045ea619f15fa3af326
|
||||
SHA1 (patch-ae) = a7ac58087cc366119f4ac5b193b49dc87ecc261c
|
||||
SHA1 (patch-af) = 124f115719badb0d057cc324ac0455253e25022d
|
||||
SHA1 (patch-ag) = e5300a702a92f3f35f07b34726d80cd825c1a759
|
||||
SHA1 (patch-ah) = 90f20cbbf4a8f187ea39de23f0e5b13aa4e10fb6
|
||||
SHA1 (patch-ai) = d5abfae0b4c4395572f22b6fdd1e7ad7bda4032f
|
||||
SHA1 (patch-aj) = 1ef7a10260a3b1476392c4cae17081ab0e7771b4
|
||||
SHA1 (patch-ak) = 20506d8b2f7c8c9ff778e0844dc999b0e497d644
|
||||
SHA1 (patch-al) = f998727c986145d3f298295bed1760221a686245
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
$NetBSD: patch-aa,v 1.4 2006/02/17 23:46:39 adam Exp $
|
||||
$NetBSD: patch-aa,v 1.5 2006/08/14 22:43:08 wiz Exp $
|
||||
|
||||
--- configure.orig 2006-02-15 22:53:09.000000000 +0100
|
||||
--- configure.orig 2006-02-15 21:53:09.000000000 +0000
|
||||
+++ configure
|
||||
@@ -21716,8 +21716,8 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtoo
|
||||
|
||||
|
@ -78,3 +78,12 @@ $NetBSD: patch-aa,v 1.4 2006/02/17 23:46:39 adam Exp $
|
|||
fi
|
||||
if test -z "$kde_moduledir"; then
|
||||
if test "$kde_qtver" = "2"; then
|
||||
@@ -39509,7 +39509,7 @@ echo "$as_me:$LINENO: checking whether t
|
||||
echo $ECHO_N "checking whether to enable Celestia Extension Language... $ECHO_C" >&6
|
||||
if (test "$enable_lua" != "no"); then
|
||||
CXXFLAGS="$CXXFLAGS -DCELX"
|
||||
- LDFLAGS="$LDFLAGS -llualib -llua"
|
||||
+ LDFLAGS="$LDFLAGS -llua"
|
||||
|
||||
if (test "$lua_includes" != "no"); then
|
||||
CXXFLAGS="$CXXFLAGS -I$lua_includes"
|
||||
|
|
13
misc/celestia/patches/patch-af
Normal file
13
misc/celestia/patches/patch-af
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-af,v 1.3 2006/08/14 22:43:08 wiz Exp $
|
||||
|
||||
--- src/celengine/star.h.orig 2005-12-06 17:30:23.000000000 +0000
|
||||
+++ src/celengine/star.h
|
||||
@@ -30,7 +30,7 @@ class StarDetails
|
||||
// orbits and StarDetails objects. Currently, it's assumed that they
|
||||
// have lifetimes that continue until program termination.
|
||||
public:
|
||||
- StarDetails::StarDetails();
|
||||
+ StarDetails();
|
||||
|
||||
inline float getRadius() const;
|
||||
inline float getTemperature() const;
|
13
misc/celestia/patches/patch-ag
Normal file
13
misc/celestia/patches/patch-ag
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-ag,v 1.3 2006/08/14 22:43:08 wiz Exp $
|
||||
|
||||
--- src/celengine/command.h.orig 2004-12-22 22:07:15.000000000 +0000
|
||||
+++ src/celengine/command.h
|
||||
@@ -94,7 +94,7 @@ class CommandGoto : public Instantaneous
|
||||
class CommandGotoLongLat : public InstantaneousCommand
|
||||
{
|
||||
public:
|
||||
- CommandGotoLongLat::CommandGotoLongLat(double t,
|
||||
+ CommandGotoLongLat(double t,
|
||||
double dist,
|
||||
float _longitude, float _latitude,
|
||||
Vec3f _up);
|
64
misc/celestia/patches/patch-ai
Normal file
64
misc/celestia/patches/patch-ai
Normal file
|
@ -0,0 +1,64 @@
|
|||
$NetBSD: patch-ai,v 1.3 2006/08/14 22:43:08 wiz Exp $
|
||||
|
||||
--- src/celestia/celx.cpp.orig 2006-01-07 00:01:51.000000000 +0000
|
||||
+++ src/celestia/celx.cpp
|
||||
@@ -368,6 +368,18 @@ static CelestiaCore* getAppCore(lua_Stat
|
||||
return appCore;
|
||||
}
|
||||
|
||||
+static void *l_alloc (void *ud, void *ptr, size_t osize, size_t nsize) {
|
||||
+ (void)ud; /* not used */
|
||||
+ (void)osize; /* not used */
|
||||
+ if (nsize == 0) {
|
||||
+ free(ptr); /* ANSI requires that free(NULL) has no effect */
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ else
|
||||
+ /* ANSI requires that realloc(NULL, size) == malloc(size) */
|
||||
+ return realloc(ptr, nsize);
|
||||
+}
|
||||
+
|
||||
|
||||
LuaState::LuaState() :
|
||||
timeout(MaxTimeslice),
|
||||
@@ -378,7 +390,7 @@ LuaState::LuaState() :
|
||||
scriptAwakenTime(0.1),
|
||||
ioMode(NoIO)
|
||||
{
|
||||
- state = lua_open();
|
||||
+ state = lua_newstate(l_alloc, NULL);
|
||||
timer = CreateTimer();
|
||||
screenshotCount = 0;
|
||||
}
|
||||
@@ -472,6 +484,7 @@ void LuaState::cleanup()
|
||||
}
|
||||
|
||||
|
||||
+
|
||||
bool LuaState::createThread()
|
||||
{
|
||||
// Initialize the coroutine which wraps the script
|
||||
@@ -598,7 +611,7 @@ bool LuaState::charEntered(const char* c
|
||||
int stackTop = lua_gettop(costate);
|
||||
if (strcmp(c_p, "y") == 0)
|
||||
{
|
||||
- lua_iolibopen(costate);
|
||||
+ luaopen_io(costate);
|
||||
ioMode = IOAllowed;
|
||||
}
|
||||
else
|
||||
@@ -4577,10 +4590,10 @@ bool LuaState::init(CelestiaCore* appCor
|
||||
initMaps();
|
||||
|
||||
// Import the base and math libraries
|
||||
- lua_baselibopen(state);
|
||||
- lua_mathlibopen(state);
|
||||
- lua_tablibopen(state);
|
||||
- lua_strlibopen(state);
|
||||
+ luaopen_base(state);
|
||||
+ luaopen_math(state);
|
||||
+ luaopen_table(state);
|
||||
+ luaopen_string(state);
|
||||
|
||||
// Add an easy to use wait function, so that script writers can
|
||||
// live in ignorance of coroutines. There will probably be a significant
|
Loading…
Reference in a new issue