mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
Add recipe for XAMOS.
This commit is contained in:
81
dev-lang/xamos/patches/xamos-0.29.patchset
Normal file
81
dev-lang/xamos/patches/xamos-0.29.patchset
Normal file
@@ -0,0 +1,81 @@
|
||||
From f02982020ebc693e0f1c6f10523fa54282a42cce Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Thu, 1 May 2014 13:52:57 +0200
|
||||
Subject: Fix build on gcc2, add Haiku makefile.
|
||||
|
||||
|
||||
diff --git a/src/GameEngineWrapper.cpp b/src/GameEngineWrapper.cpp
|
||||
index d3099a8..854d8fb 100644
|
||||
--- a/src/GameEngineWrapper.cpp
|
||||
+++ b/src/GameEngineWrapper.cpp
|
||||
@@ -2416,7 +2416,7 @@ bool GameEngineWrapper::sdlinit()
|
||||
#endif
|
||||
|
||||
// Set the window caption (patch - do not use Unicode on Amiga-like systems which do not support it):
|
||||
-#if defined(USESDL) && !defined(AMIGOID)
|
||||
+#if defined(USESDL) && !defined(AMIGOID) && __GNUC__ > 2
|
||||
SDL_WM_SetCaption( "XAMOS alpha 0.29 \u00a9 2012 Mequa Innovations", NULL ); // \u00a9
|
||||
#endif
|
||||
#if defined(USESDL) && defined(AMIGOID)
|
||||
diff --git a/src/GameEngineWrapper.h b/src/GameEngineWrapper.h
|
||||
index 60f27c7..c9f2c67 100644
|
||||
--- a/src/GameEngineWrapper.h
|
||||
+++ b/src/GameEngineWrapper.h
|
||||
@@ -46,6 +46,9 @@ using namespace boost;
|
||||
|
||||
#if defined(USESDL) && !defined(USEBOOST)
|
||||
// Deprecated:
|
||||
+#if __GNUC__ <= 2
|
||||
+#include <hash_map>
|
||||
+#else
|
||||
#include <ext/hash_map>
|
||||
|
||||
// TODO - allow hash_map for other compilers besides G++
|
||||
@@ -54,6 +57,7 @@ using namespace __gnu_cxx;
|
||||
// Added - fix for hash_map using std::string:
|
||||
namespace __gnu_cxx //std
|
||||
{
|
||||
+#endif
|
||||
template<> struct hash< std::string >
|
||||
{
|
||||
size_t operator()( const std::string& x ) const
|
||||
@@ -61,8 +65,10 @@ namespace __gnu_cxx //std
|
||||
return hash< const char* >()( x.c_str() );
|
||||
}
|
||||
};
|
||||
+#if __GNUC__ > 2
|
||||
}
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
// Added - detect all Amiga-like systems:
|
||||
#if !defined(AMIGOID) && (defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__) || defined (__amigaos4__))
|
||||
diff --git a/src/Makefile_haiku b/src/Makefile_haiku
|
||||
new file mode 100644
|
||||
index 0000000..25e31e6
|
||||
--- /dev/null
|
||||
+++ b/src/Makefile_haiku
|
||||
@@ -0,0 +1,20 @@
|
||||
+CC=g++
|
||||
+
|
||||
+CFLAGS=-c -Wall -pedantic -Wno-deprecated -O3 -D USESDL
|
||||
+LDFLAGS=-lSDL_image -lSDL_gfx -lSDL_mixer -ljpeg -lpng -lvorbisfile -lvorbis -logg -lSDL_ttf -lfreetype -lz -lSDL -lGL -lGLU
|
||||
+
|
||||
+SOURCES=main.cpp XAMOS.cpp SDL_collide.cpp Console.cpp AMALDebugTest.cpp PrintStream.cpp AMALBank.cpp AMALEnvGen.cpp AMALParser.cpp AMALInterpreter.cpp AMALCompiler.cpp AmalPrograms.cpp Timer.cpp AMOS_Sprite.cpp MequaScript.cpp AMOS_System.cpp GameEngineWrapper.cpp Mytype.cpp Mytypearray.cpp TheTokens.cpp Parser.cpp Dumper.cpp Interpreter.cpp CommandWrapper.cpp ActiveObject.cpp
|
||||
+OBJECTS=$(SOURCES:.cpp=.o)
|
||||
+EXECUTABLE=../XAMOS
|
||||
+
|
||||
+all: $(SOURCES) $(EXECUTABLE)
|
||||
+
|
||||
+$(EXECUTABLE): $(OBJECTS)
|
||||
+ $(CC) $(OBJECTS) -o $@ $(LDFLAGS)
|
||||
+
|
||||
+.cpp.o:
|
||||
+ $(CC) $(CFLAGS) $< -o $@
|
||||
+
|
||||
+clean:
|
||||
+ rm -rf $(EXECUTABLE) *.o
|
||||
+
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
55
dev-lang/xamos/xamos-0.29.recipe
Normal file
55
dev-lang/xamos/xamos-0.29.recipe
Normal file
@@ -0,0 +1,55 @@
|
||||
SUMMARY="Cross-platform AMOS BASIC reimplementation"
|
||||
DESCRIPTION="
|
||||
This project is a complete re-write of jAMOS in C++ using SDL libraries and
|
||||
(optional) Boost headers.
|
||||
|
||||
This initial release is run-only and does not feature an editor at this stage.
|
||||
However, it is compatible with almost all programs created with the latest
|
||||
jAMOS editor. All jAMOS examples (without AMAL) are running in XAMOS, often
|
||||
with a serious speed boost over the Java original, particularly on low-end
|
||||
platforms.
|
||||
"
|
||||
HOMEPAGE="http://sourceforge.net/projects/xamos"
|
||||
SRC_URI="http://sourceforge.net/projects/xamos/files/XAMOS_src.zip"
|
||||
CHECKSUM_SHA256="f559794ed7a443f00a21b3c0050e8ee70a9d1340ad41e46a5f87f5238bc7479e"
|
||||
ARCHITECTURES="x86_gcc2"
|
||||
LICENSE="BSD (2-clause)"
|
||||
COPYRIGHT="2012 Mequa Innovations"
|
||||
REVISION="1"
|
||||
|
||||
PROVIDES="
|
||||
xamos = $portVersion
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel >= $haikuVersion
|
||||
devel:libsdl
|
||||
devel:sdl_image
|
||||
devel:sdl_mixer
|
||||
devel:sdl_ttf
|
||||
devel:sdl_gfx
|
||||
devel:libglu
|
||||
devel:libjpeg
|
||||
devel:libpng
|
||||
devel:libvorbisfile
|
||||
devel:libogg
|
||||
devel:libfreetype
|
||||
devel:libz
|
||||
"
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:make
|
||||
cmd:gcc
|
||||
"
|
||||
|
||||
SOURCE_DIR="XAMOS"
|
||||
PATCHES="xamos-$portVersion.patchset"
|
||||
|
||||
BUILD() {
|
||||
cd src
|
||||
make -f Makefile_aros
|
||||
}
|
||||
|
||||
INSTALL() {
|
||||
false
|
||||
}
|
||||
Reference in New Issue
Block a user