new recipe: powder-toy (#848)

This commit is contained in:
Calvin Hill
2017-01-14 18:03:10 +00:00
committed by waddlesplash
parent 1061d46735
commit cbb0239967
2 changed files with 124 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
From 7840aa9c4f2f758f3321104450924f8e25093518 Mon Sep 17 00:00:00 2001
From: Calvin Hill <calvin@hakobaito.co.uk>
Date: Sun, 30 Oct 2016 20:43:50 +0000
Subject: [PATCH] Added Haiku target
---
SConscript | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/SConscript b/SConscript
index 97ac57d..bca80eb 100644
--- a/SConscript
+++ b/SConscript
@@ -41,6 +41,7 @@ def AddSconsOption(name, default, hasArgs, help):
AddSconsOption('win', False, False, "Target Windows.")
AddSconsOption('lin', False, False, "Target Linux.")
AddSconsOption('mac', False, False, "Target Mac OS X.")
+AddSconsOption('haiku', False, False, "Target Haiku.")
AddSconsOption('msvc', False, False, "Use the Microsoft Visual Studio compiler.")
AddSconsOption("tool", False, True, "Tool prefix appended before gcc/g++.")
@@ -87,8 +88,10 @@ elif GetOption('lin'):
platform = "Linux"
elif GetOption('mac'):
platform = "Darwin"
-elif compilePlatform not in ["Linux", "Windows", "Darwin"]:
- FatalError("Unknown platform: {0}".format(platform))
+elif GetOption('haiku'):
+ platform = "Linux"
+#elif compilePlatform not in ["Linux", "Windows", "Darwin"]:
+# FatalError("Unknown platform: {0}".format(platform))
msvc = GetOption('msvc')
if msvc and platform != "Windows":
@@ -416,6 +419,9 @@ elif platform == "Linux":
elif platform == "Darwin":
env.Append(CPPDEFINES=['MACOSX'])
#env.Append(LINKFLAGS=['-headerpad_max_install_names']) #needed in some cross compiles
+elif platform == "Haiku":
+ env.Append(LINKFLAGS=['-lroot'])
+ env.Append(LINKFLAGS=['-lnetwork'])
#Add architecture flags and defines
@@ -503,6 +509,7 @@ elif GetOption("no-warnings"):
env.Append(CCFLAGS=['-w'])
+
#Add version defines
if GetOption('save-version'):
env.Append(CPPDEFINES=["SAVE_VERSION={0}".format(GetOption('save-version'))])
--
2.7.4

View File

@@ -0,0 +1,70 @@
SUMMARY="A free physics sandbox game"
DESCRIPTION="The Powder Toy is a free physics sandbox game,\
which simulates air pressure and velocity, heat, gravity and \
a countless number of interactions between different substances! \
The game provides you with various building materials, liquids, gases \
and electronic components which can be used to construct complex machines,\
guns, bombs, realistic terrains and almost anything else."
HOMEPAGE="http://powdertoy.co.uk/"
COPYRIGHT="2008-2010 Stanislaw Skowronek
2010-2016 Simon Robertshaw"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/simtr/The-Powder-Toy/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="9a7de557e771f88e823d06cc21d16f1fbbca930ce751720bc9035d00073d6635"
SOURCE_DIR="The-Powder-Toy-$portVersion"
PATCHES="thepowdertoy-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PROVIDES="
powder = $portVersion compat >= 1
cmd:powder = 1.0.0 compat >= 1
"
REQUIRES="
haiku
lib:libsdl
lib:libfftw3
lib:libfftw3f
lib:liblua
lib:libgl
lib:libbz2
lib:libz
"
BUILD_REQUIRES="
haiku_devel
devel:libsdl
lua51_devel
devel:liblua
devel:liblua5.1
devel:libfftw3
devel:libfftw3f
devel:libbz2
devel:libz
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:gcc
cmd:ld
cmd:libtoolize
cmd:make
cmd:cmake
cmd:python
cmd:scons
cmd:pkg_config
"
BUILD()
{
scons -Q
}
INSTALL()
{
mkdir -p $appsDir
cp build/powder $appsDir/Powder
addAppDeskbarSymlink $appsDir/Powder
}