diff --git a/games-engines/love/additional-files/love.rdef.in b/games-engines/love/additional-files/love.rdef.in new file mode 100644 index 000000000..f37650bdb --- /dev/null +++ b/games-engines/love/additional-files/love.rdef.in @@ -0,0 +1,26 @@ + +resource app_flags B_SINGLE_LAUNCH | B_ARGV_ONLY; + +resource app_version { + major = @MAJOR@, + middle = @MIDDLE@, + minor = @MINOR@, + variety = B_APPV_FINAL, + internal = 0, + short_info = "LÖVE", + long_info = "A framework to make 2D games in Lua" +}; + +resource app_signature "application/x-vnd.love"; + +resource vector_icon { + $"6E6369660403E74A9904004C0327AAE105FF040205C6BBB925C374BE25C3D1B6" + $"2EBFA9B353C090B353BE47B353B381BF7BB381BE38B381C014B93DC638B64EC3" + $"43B979C611B9EDC5B3B9B4C5E5BE50C1960205C717B9AEC9C7BC69C3CFBEAEBA" + $"49C63CBEACC21FBA10C66EB998C6C1B9D5C69ABC61C991C004CC2CBF47CC2CC1" + $"B0CC2CCC2CC004CC2CC11DCC2CBF3D0205C6BBB925C96BBBE0C374BE25B9EDC5" + $"B3BE50C196B9B4C5E5B93DC638B979C611BC05C908BFA9CBA2BEECCBA2C154CB" + $"A2CBD0BF7BCBD0C094CBD0BEB30606FE0BC00ABCADBCBDBADDBEF8BA55BA83BB" + $"66BFB1C5A0B5DBBFF4BFB1C5A0BFAFC5A0BFAFC5A0C985BFF4C2A3BADDC4DDBB" + $"66C068BA55BF55BCAD040A000100000A010101000A020102000A03010300" +}; diff --git a/games-engines/love/love-0.9.1.recipe b/games-engines/love/love-0.10.2.recipe similarity index 76% rename from games-engines/love/love-0.9.1.recipe rename to games-engines/love/love-0.10.2.recipe index 34d310404..45a16229d 100644 --- a/games-engines/love/love-0.9.1.recipe +++ b/games-engines/love/love-0.10.2.recipe @@ -2,12 +2,13 @@ SUMMARY="A framework to make 2D games in Lua" DESCRIPTION="LÖVE is a framework to make 2D games in Lua. It's free, open-source, and works also on Windows, Mac OS X and Linux." HOMEPAGE="http://love2d.org/" -COPYRIGHT="2010-2014 Löve" +COPYRIGHT="2010-2016 Löve" LICENSE="Zlib" REVISION="1" SOURCE_URI="https://bitbucket.org/rude/love/downloads/love-$portVersion-linux-src.tar.gz" -CHECKSUM_SHA256="04dd0946bd82ec839c454c161bf0e5da870f393af62d09dc229990f5176833de" +CHECKSUM_SHA256="b26b306b113158927ae12d2faadb606eb1db49ffdcd7592d6a0a3fc0af21a387" PATCHES="love-$portVersion.patchset" +ADDITIONAL_FILES="love.rdef.in" ARCHITECTURES="!x86_gcc2 x86 x86_64" SECONDARY_ARCHITECTURES="x86" @@ -19,25 +20,26 @@ PROVIDES=" " REQUIRES=" haiku$secondaryArchSuffix + lib:libbz2$secondaryArchSuffix + lib:libfreetype$secondaryArchSuffix + lib:libGL$secondaryArchSuffix + lib:libIL$secondaryArchSuffix + lib:libjasper$secondaryArchSuffix + lib:libjpeg$secondaryArchSuffix + lib:libluajit_5.1$secondaryArchSuffix + lib:libmng$secondaryArchSuffix + lib:libmodplug$secondaryArchSuffix + lib:libmpg123$secondaryArchSuffix + lib:libogg$secondaryArchSuffix + lib:libopenal$secondaryArchSuffix + lib:libphysfs$secondaryArchSuffix + lib:libpng$secondaryArchSuffix lib:libSDL2_2.0$secondaryArchSuffix + lib:libtheora$secondaryArchSuffix + lib:libtiff$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 - lib:libtiff$secondaryArchSuffix - lib:libpng$secondaryArchSuffix - lib:libmng$secondaryArchSuffix - lib:libjpeg$secondaryArchSuffix - lib:libjasper$secondaryArchSuffix - lib:libbz2$secondaryArchSuffix " PROVIDES_devel=" @@ -50,46 +52,60 @@ REQUIRES_devel=" BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel - devel:libSDL2$secondaryArchSuffix + devel:libbz2$secondaryArchSuffix + devel:libfreetype$secondaryArchSuffix + devel:libGL$secondaryArchSuffix + devel:libIL$secondaryArchSuffix + devel:libjasper$secondaryArchSuffix + devel:libjpeg$secondaryArchSuffix + devel:libluajit_5.1$secondaryArchSuffix + devel:libmng$secondaryArchSuffix + devel:libmodplug$secondaryArchSuffix + devel:libmpg123$secondaryArchSuffix + devel:libogg$secondaryArchSuffix + devel:libopenal$secondaryArchSuffix + devel:libphysfs$secondaryArchSuffix + devel:libpng$secondaryArchSuffix + devel:libSDL2_2.0$secondaryArchSuffix + devel:libtheora$secondaryArchSuffix + devel:libtiff$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 - devel:libtiff$secondaryArchSuffix - devel:libpng$secondaryArchSuffix - devel:libmng$secondaryArchSuffix - devel:libjpeg$secondaryArchSuffix - devel:libjasper$secondaryArchSuffix - devel:libbz2$secondaryArchSuffix " BUILD_PREREQUIRES=" - cmd:make + cmd:awk + cmd:cmp + cmd:dd + cmd:diff cmd:gcc$secondaryArchSuffix cmd:ld$secondaryArchSuffix + cmd:make cmd:pkg_config$secondaryArchSuffix - cmd:awk " BUILD() { runConfigure ./configure - # The pkg-config for freetype doesn't give this directory, which means - # there is no good way of finding it... - make $jobArgs CXXFLAGS="-I/system/develop/headers/x86/freetype2/ --std=c++11" + + make $jobArgs } INSTALL() { make install + local MAJOR="`echo "$portVersion" | cut -d. -f1`" + local MIDDLE="`echo "$portVersion" | cut -d. -f2`" + local MINOR="`echo "$portVersion" | cut -d. -f3`" + sed \ + -e "s|@MAJOR@|$MAJOR|" \ + -e "s|@MIDDLE@|$MIDDLE|" \ + -e "s|@MINOR@|$MINOR|" \ + $portDir/additional-files/love.rdef.in > love.rdef + + addResourcesToBinaries love.rdef $binDir/love + prepareInstalledDevelLib liblove packageEntries devel $developDir } diff --git a/games-engines/love/patches/love-0.10.2.patchset b/games-engines/love/patches/love-0.10.2.patchset new file mode 100644 index 000000000..5ee52cc33 --- /dev/null +++ b/games-engines/love/patches/love-0.10.2.patchset @@ -0,0 +1,58 @@ +From 9e3c2856953b79d7159d8b1062e48bf2e1761426 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sat, 6 May 2017 11:09:02 +0200 +Subject: Add Haiku to the known platforms + + +diff --git a/src/common/config.h b/src/common/config.h +index 8bb43ba..72918b6 100644 +--- a/src/common/config.h ++++ b/src/common/config.h +@@ -48,7 +48,7 @@ + # define LOVE_MACOSX 1 + # endif + #endif +-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) ++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__HAIKU__) + // I know it's not linux, but it seems most "linux-only" code is bsd-compatible + # define LOVE_LINUX 1 + #endif +-- +2.12.2 + + +From 7184051b36f1df6c2551e78215343e0c7e4725b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sat, 6 May 2017 11:18:30 +0200 +Subject: Build fix for Haiku + + +diff --git a/src/modules/system/System.cpp b/src/modules/system/System.cpp +index 5ad3911..0f018c9 100755 +--- a/src/modules/system/System.cpp ++++ b/src/modules/system/System.cpp +@@ -39,8 +39,10 @@ + #if defined(LOVE_ANDROID) + #include "common/android.h" + #elif defined(LOVE_LINUX) ++#ifndef __HAIKU__ + #include + #endif ++#endif + + #if defined(LOVE_LINUX) + static void sigchld_handler(int sig) +@@ -132,8 +134,10 @@ bool System::openURL(const std::string &url) const + + // Note: at the moment this process inherits our file descriptors. + // Note: the below const_cast is really ugly as well. ++ #ifndef __HAIKU__ + if (posix_spawnp(&pid, "xdg-open", nullptr, nullptr, const_cast(argv), environ) != 0) + return false; ++ #endif + + // Check if xdg-open already completed (or failed.) + int status = 0; +-- +2.12.2 + diff --git a/games-engines/love/patches/love-0.9.1.patchset b/games-engines/love/patches/love-0.9.1.patchset deleted file mode 100644 index b499d739a..000000000 --- a/games-engines/love/patches/love-0.9.1.patchset +++ /dev/null @@ -1,82 +0,0 @@ -From b3d9ed404fd92939782fd6ae4dee62dc86768270 Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Tue, 2 Sep 2014 23:01:32 +0200 -Subject: Fixup Glee for Haiku support. - - -diff --git a/src/modules/graphics/opengl/GLee.c b/src/modules/graphics/opengl/GLee.c -index f0d1beb..d3307a8 100644 ---- a/src/modules/graphics/opengl/GLee.c -+++ b/src/modules/graphics/opengl/GLee.c -@@ -42,7 +42,7 @@ - #include - #include "GLee.h" - --#if defined(__APPLE__) || defined(__APPLE_CC__) -+#if defined(__APPLE__) || defined(__APPLE_CC__) || defined(__HAIKU__) - #define GLEE_USE_SDL - #ifdef GLEE_USE_SDL - #include -@@ -55,7 +55,7 @@ typedef GLuint(*GLEE_LINK_FUNCTION)(void); - - GLboolean __GLeeInited=GL_FALSE; - --#ifndef _WIN32 -+#if !defined(_WIN32) && !defined(__HAIKU__) - #define __stdcall /* nothing */ - #endif - -@@ -68,7 +68,7 @@ GLEE_FUNC __GLeeGetProcAddress(const char *extname) - { - #ifdef _WIN32 - return (GLEE_FUNC)wglGetProcAddress(extname); --#elif defined(__APPLE__) || defined(__APPLE_CC__) -+#elif defined(__APPLE__) || defined(__APPLE_CC__) || defined(__HAIKU__) - #if defined(GLEE_USE_SDL) - return SDL_GL_GetProcAddress(extname); - #else -@@ -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 07aadb1..92c3ef6 100644 ---- a/src/modules/graphics/opengl/GLee.h -+++ b/src/modules/graphics/opengl/GLee.h -@@ -64,7 +64,10 @@ - #define __glxext_h_ /* prevent glxext.h from being included */ - #define GLX_GLXEXT_PROTOTYPES - #include -+ -+#ifndef __HAIKU__ - #include -+#endif - - typedef XID GLEE_GLXContextID; - #endif -@@ -1154,7 +1157,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 */ - -@@ -23180,7 +23183,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 -