Initial .bep and .patch files for numptyphysics. TODO: figure out fix for happyhttp close(), and add an HVIF icon

This commit is contained in:
Scott McCreary
2010-09-21 23:27:45 +00:00
parent e95118f7fc
commit 83c7c978df
2 changed files with 121 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
DESCRIPTION="Numpty Physics is a drawing puzzle game in the spirit of Crayon Physics"
HOMEPAGE="http://numptyphysics.garage.maemo.org"
SRC_URI="svn+https://vcs.maemo.org/svn/numptyphysics/trunk/#157"
#CHECKSUM_MD5=""
REVISION="1"
STATUS_HAIKU="unstable"
DEPEND="media-libs/libsdl >= 1.2.14
dev-games/box2d >= 2.1.2"
BUILD {
cd numptyphysics-0.2-157
libtoolize --force --copy --install
aclocal
autoconf
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
--bindir=`finddir B_APPS_DIRECTORY`/numptyphysics \
--datarootdir=`finddir B_APPS_DIRECTORY`
# TODO: figure out how to move the ~/.numptyphysics directory to ~/config/settings/numptyphysics
make
}
INSTALL {
cd numptyphysics-0.2-157
make install
}
LICENSE="GNU GPL v3"
COPYRIGHT="2008 Tim Edmonds"

View File

@@ -0,0 +1,95 @@
Index: Canvas.cpp
===================================================================
--- numptyphysics-0.2-157/Canvas.cpp (revision 157)
+++ numptyphysics-0.2-157/Canvas.cpp (working copy)
@@ -26,7 +26,7 @@
#define Window X11Window //oops
#define Font X11Font //oops
#include <SDL/SDL_syswm.h>
-#ifndef WIN32
+#if (!defined(WIN32) && !defined(__HAIKU__))
#include <X11/X.h>
#include <X11/Xlib.h>
#endif
@@ -753,8 +753,8 @@
SDL_VERSION( &sys.version );
SDL_GetWMInfo( &sys );
-#if !defined(WIN32) && !(defined(__APPLE__) && defined(__MACH__))
- /* No X11 stuff on Windows and Mac OS X */
+#if !defined(WIN32) && !defined(__HAIKU__) && !(defined(__APPLE__) && defined(__MACH__))
+ /* No X11 stuff on Windows, Haiku and Mac OS X */
// take focus...
XEvent ev = { 0 };
@@ -840,7 +840,11 @@
int Canvas::writeBMP( const char* filename ) const
{
-#pragma pack(push,1)
+#ifdef __HAIKU__
+#pragma pack(1)
+#else
+#pragma pack(1,push)
+#endif
typedef struct {
unsigned short int type; /* Magic identifier */
unsigned int size; /* File size in bytes */
@@ -861,7 +865,11 @@
} BMPINFOHEADER;
int check_BMPHEADER[(sizeof(BMPHEADER)==14)-1];
int check_BMPINFOHEADER[(sizeof(BMPINFOHEADER)==40)-1];
+#ifdef __HAIKU__
+#pragma pack()
+#else
#pragma pack(pop)
+#endif
int w = width();
int h = height();
Index: configure.in
===================================================================
--- numptyphysics-0.2-157/configure.in (revision 157)
+++ numptyphysics-0.2-157/configure.in (working copy)
@@ -77,6 +77,7 @@
AC_CHECK_LIB(stdc++, main)
AC_CHECK_LIB(X11, main)
AC_CHECK_LIB(z, main)
+AC_CHECK_LIB(network, socket)
AC_CONFIG_FILES([Makefile])
Index: happyhttp.cpp
===================================================================
--- numptyphysics-0.2-157/happyhttp.cpp (revision 157)
+++ numptyphysics-0.2-157/happyhttp.cpp (working copy)
@@ -28,7 +28,7 @@
#include "happyhttp.h"
#ifndef WIN32
-// #include <sys/types.h>
+
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@@ -41,6 +41,10 @@
#define vsnprintf _vsnprintf
#endif
+#ifdef __HAIKU__
+ #include <sys/select.h>
+#endif
+
#include <cstdio>
#include <cstring>
#include <cstdarg>
@@ -278,6 +282,9 @@
#ifdef WIN32
if( m_Sock >= 0 )
::closesocket( m_Sock );
+#elif __HAIKU__
+// need to figure this part out for Haiku still
+//
#else
if( m_Sock >= 0 )
::close( m_Sock );