From 6d1bd8bb7e098a114110c9ad701896a69b2e425b Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 28 Jan 2014 20:30:36 +0100 Subject: [PATCH] =?UTF-8?q?Add=20L=C3=B6ve=20recipe.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not quite working, running it leads an undefined reference to some GL function. --- games-engines/love/love-0.9.0.recipe | 88 +++++++++++++++++++ .../love/patches/love-0.9.0.patchset | 55 ++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 games-engines/love/love-0.9.0.recipe create mode 100644 games-engines/love/patches/love-0.9.0.patchset diff --git a/games-engines/love/love-0.9.0.recipe b/games-engines/love/love-0.9.0.recipe new file mode 100644 index 000000000..506fe173a --- /dev/null +++ b/games-engines/love/love-0.9.0.recipe @@ -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 +" diff --git a/games-engines/love/patches/love-0.9.0.patchset b/games-engines/love/patches/love-0.9.0.patchset new file mode 100644 index 000000000..5dc81f5fd --- /dev/null +++ b/games-engines/love/patches/love-0.9.0.patchset @@ -0,0 +1,55 @@ +From 42a0ac9d4b717dccdb1c6f3d9615b702255574d2 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +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 +- #include ++ #ifndef __HAIKU__ ++ #include ++ #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 +