Add Löve recipe.

Not quite working, running it leads an undefined reference to some GL
function.
This commit is contained in:
Adrien Destugues
2014-01-28 20:30:36 +01:00
parent 07054711d9
commit 6d1bd8bb7e
2 changed files with 143 additions and 0 deletions

View File

@@ -0,0 +1,88 @@
SUMMARY="LÖVE is an *awesome* framework you can use to make 2D games in Lua."
DESCRIPTION="
Hi there! LÖVE is an *awesome* framework you can use to make 2D games in Lua.
It's free, open-source, and works on Windows, Mac OS X and Linux.
"
HOMEPAGE="http://love2d.org/"
SRC_URI="https://bitbucket.org/rude/love/downloads/love-0.9.0-linux-src.tar.gz"
CHECKSUM_MD5="6591752af4e33f521d616d9b048aa894"
REVISION="1"
LICENSE="Zlib"
COPYRIGHT="2010-2014 Löve"
ARCHITECTURES="x86 x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
# x86_gcc2 is fine as primary target architecture as long as we're building
# for a different secondary architecture.
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
love$secondaryArchSuffix = $portVersion
cmd:love$secondaryArchSuffix = $portVersion
lib:liblove$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libSDL2_2.0$secondaryArchSuffix
lib:libvorbis$secondaryArchSuffix
lib:libvorbisfile$secondaryArchSuffix
lib:libmodplug$secondaryArchSuffix >= 0.8.0
lib:libphysfs$secondaryArchSuffix
lib:libluajit_5.1$secondaryArchSuffix
lib:libopenal$secondaryArchSuffix
lib:libogg$secondaryArchSuffix
lib:libfreetype$secondaryArchSuffix
lib:libIL$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libmpg123$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
devel:libSDL2$secondaryArchSuffix
devel:libvorbis$secondaryArchSuffix
devel:libvorbisfile$secondaryArchSuffix
devel:libmodplug$secondaryArchSuffix >= 0.8.0
devel:libphysfs$secondaryArchSuffix
devel:libluajit_5.1$secondaryArchSuffix
devel:libopenal$secondaryArchSuffix
devel:libogg$secondaryArchSuffix
devel:libfreetype$secondaryArchSuffix
devel:libIL$secondaryArchSuffix
devel:libGL$secondaryArchSuffix
devel:libmpg123$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:make
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
# cmd:libtoolize
cmd:pkg_config$secondaryArchSuffix
"
PATCHES="love-0.9.0.patchset"
BUILD()
{
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLib liblove
packageEntries devel $developDir
}
PROVIDES_devel="
love${secondaryArchSuffix}_devel = $portVersion
devel:liblove$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
love$secondaryArchSuffix == $portVersion base
"

View File

@@ -0,0 +1,55 @@
From 42a0ac9d4b717dccdb1c6f3d9615b702255574d2 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Tue, 28 Jan 2014 20:25:18 +0100
Subject: Hack Glee to compile (we don't need GLX!)
diff --git a/src/modules/graphics/opengl/GLee.c b/src/modules/graphics/opengl/GLee.c
index 789e189..850a87d 100644
--- a/src/modules/graphics/opengl/GLee.c
+++ b/src/modules/graphics/opengl/GLee.c
@@ -22418,7 +22418,7 @@ const char *__GLeeGetExtStrPlat( void )
if (wglGetExtensionsStringARB)
return (const char *)wglGetExtensionsStringARB(wglGetCurrentDC());
-#elif defined(__APPLE__) || defined(__APPLE_CC__)
+#elif defined(__APPLE__) || defined(__APPLE_CC__) || defined(__HAIKU__)
#else
Display *dpy=glXGetCurrentDisplay();
if(dpy)
diff --git a/src/modules/graphics/opengl/GLee.h b/src/modules/graphics/opengl/GLee.h
index 631cddc..42782ec 100644
--- a/src/modules/graphics/opengl/GLee.h
+++ b/src/modules/graphics/opengl/GLee.h
@@ -64,7 +64,9 @@
#define __glxext_h_ /* prevent glxext.h from being included */
#define GLX_GLXEXT_PROTOTYPES
#include <GL/gl.h>
- #include <GL/glx.h>
+ #ifndef __HAIKU__
+ #include <GL/glx.h>
+ #endif
#endif
#ifndef APIENTRY
@@ -1152,7 +1154,7 @@ GLEE_EXTERN GLboolean _GLEE_SGIX_igloo_interface;
DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
#endif
-#elif defined(__APPLE__) || defined(__APPLE_CC__)
+#elif defined(__APPLE__) || defined(__APPLE_CC__) || defined(__HAIKU__)
/* Mac OS X */
@@ -23178,7 +23180,7 @@ GLEE_EXTERN GLboolean _GLEE_WGL_NV_video_output;
#define wglGetVideoInfoNV GLeeFuncPtr_wglGetVideoInfoNV
#endif
#endif
-#elif defined(__APPLE__) || defined(__APPLE_CC__)
+#elif defined(__APPLE__) || defined(__APPLE_CC__) || defined(__HAIKU__)
#else /* GLX */
/* Extension querying variables */
--
1.8.3.4