Merge remote-tracking branch 'remotes/haikuports/haikuports/master'

This commit is contained in:
Ed Robbins
2014-01-13 23:33:01 +00:00
17 changed files with 541 additions and 367 deletions

View File

@@ -0,0 +1,59 @@
SUMMARY="LuaJIT is a Just-In-Time Compiler (JIT) for the Lua programming language."
HOMEPAGE="http://luajit.org/luajit.html"
SRC_URI="http://luajit.org/download/LuaJIT-$portVersion.tar.gz"
CHECKSUM_MD5="112dfb82548b03377fbefbba2e0e3a5b"
REVISION="1"
ARCHITECTURES="x86 x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
luajit$secondaryArchSuffix = $portVersion compat >= 5.1
lib:libluajit_5.1$secondaryArchSuffix = $portVersion compat >= 2
cmd:luajit_$portVersion$secondaryArchSuffix
cmd:luajit$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
cmd:make
cmd:gcc$secondaryArchSuffix
"
PROVIDES_devel="
luajit${secondaryArchSuffix}_devel = $portVersion compat >= 5.1
devel:libluajit_5.1$secondaryArchSuffix = $portVersion compat >= 2
"
REQUIRES_devel="
luajit$secondaryArchSuffix == $portVersion base
"
PATCHES="luajit-$portVersion.patchset"
SOURCE_DIR="LuaJIT-$portVersion"
BUILD()
{
# Use amalg target as recommended on luajit homepage to get better performance
make $jobArgs amalg PREFIX=$prefix
}
INSTALL()
{
make install PREFIX=$prefix INSTALL_LIB="$libDir" INSTALL_BIN="$binDir" \
INSTALL_INC="$includeDir" INSTALL_SHARE="$dataDir" \
INSTALL_MAN="$manDir/man1" INSTALL_LMOD="$dataDir/lua/5.1"
ln -s $libDir/libluajit-5.1.so.2.0.2 $libDir/libluajit-5.1.so.2
prepareInstalledDevelLib libluajit-5.1
packageEntries devel $developDir
}
LICENSE="MIT"
COPYRIGHT="2005-2013, Mike Pall"
DESCRIPTION="
LuaJIT is a Just-In-Time Compiler (JIT) for the Lua programming language.
Lua is a powerful, dynamic and light-weight programming language. It may be \
embedded or used as a general-purpose, stand-alone language.
"

View File

@@ -0,0 +1,31 @@
From 1e25583ec6480560263118a34c5b5ad86f3e9aca Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 12 Jan 2014 22:49:01 +0100
Subject: Remove hardcoded -lm.
diff --git a/src/Makefile b/src/Makefile
index 999e280..27fc411 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -198,7 +198,7 @@ TARGET_DYNXLDOPTS=
TARGET_LFSFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
TARGET_XCFLAGS= $(TARGET_LFSFLAGS) -U_FORTIFY_SOURCE
TARGET_XLDFLAGS=
-TARGET_XLIBS= -lm
+#TARGET_XLIBS= -lm
TARGET_TCFLAGS= $(CCOPTIONS) $(TARGET_XCFLAGS) $(TARGET_FLAGS) $(TARGET_CFLAGS)
TARGET_ACFLAGS= $(CCOPTIONS) $(TARGET_XCFLAGS) $(TARGET_FLAGS) $(TARGET_CFLAGS)
TARGET_ALDFLAGS= $(LDOPTIONS) $(TARGET_XLDFLAGS) $(TARGET_FLAGS) $(TARGET_LDFLAGS)
@@ -351,7 +351,7 @@ endif
##############################################################################
MINILUA_O= host/minilua.o
-MINILUA_LIBS= -lm
+#MINILUA_LIBS= -lm
MINILUA_T= host/minilua
MINILUA_X= $(MINILUA_T)
--
1.8.3.4

View File

@@ -27,12 +27,13 @@ PROVIDES="
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
libiconv$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
libiconv${secondaryArchSuffic}_devel
devel:libiconv$secondaryArchSuffix
"
BUILD_PREREQUIRES="

View File

@@ -1847,3 +1847,26 @@ index bb0ca91..91577d6 100644
--
1.8.3.4
From bef51860a4e8f12504d8fbd9f421624932f927ad Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Mon, 13 Jan 2014 20:35:48 +0100
Subject: FindFreetype: fix search path.
diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake
index 1df2399..31346a0 100644
--- a/Modules/FindFreetype.cmake
+++ b/Modules/FindFreetype.cmake
@@ -61,7 +61,7 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
/usr/local/X11R6
/usr/local/X11
/usr/freeware
- PATH_SUFFIXES include/freetype2 include
+ PATH_SUFFIXES include/freetype2 include freetype2
)
find_library(FREETYPE_LIBRARY
--
1.8.3.4

View File

@@ -0,0 +1,74 @@
SUMMARY="Open source clone of Theme Hospital"
DESCRIPTION="
CorsixTH aims to reimplement the game engine of Theme Hospital, and be able to
load the original game data files. This means that you will need a purchased
copy of Theme Hospital, or a copy of the demo, in order to use CorsixTH. After
most of the original engine has been reimplemented in open source code, the
project will serve as a base from which extensions and improvements to the
original game can be made.
"
HOMEPAGE="http://github.com/CorsixTH"
SRC_URI="https://github.com/CorsixTH/CorsixTH/archive/v$portVersion.tar.gz"
CHECKSUM_MD5="4557a02d61d7001c1c08960e30c417d7"
REVISION="1"
ARCHITECTURES="x86"
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="
corsix_th = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libsdl$secondaryArchSuffix
lib:libsdl_mixer$secondaryArchSuffix
lib:libavcodec$secondaryArchSuffix
lib:libluajit_5.1$secondaryArchSuffix
lib:libfreetype$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
devel:libsdl$secondaryArchSuffix
devel:libsdl_mixer$secondaryArchSuffix
devel:libavcodec$secondaryArchSuffix
devel:libluajit_5.1$secondaryArchSuffix
devel:libfreetype$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:make
cmd:cmake
cmd:pkg_config$secondaryArchSuffix
"
SOURCE_DIR="CorsixTH-$portVersion"
PATCHES="corsix_th-$portVersion.patchset"
BUILD()
{
cmake . -DLUA_LIBRARY=/system/$relativeLibDir/libluajit-5.1.so.2.0.2 \
-DCMAKE_INSTALL_PREFIX=$appsDir
cd CorsixTH
make $jobArgs
}
INSTALL()
{
touch CorsixTH/LICENSE.txt
make install
addattr -f Icon_Haiku -t "'VICN'" "BEOS:ICON" $appsDir/CorsixTH/CorsixTH
addAppDeskbarSymlink $appsDir/CorsixTH/CorsixTH "Corsix Theme Hospital"
}
# no TEST script available
COPYRIGHT="2005-2013 Corsix"
LICENSE="MIT"

View File

@@ -0,0 +1,77 @@
From 6ffdc30a00c95287e9e42fc65462bbcb17b7cff2 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Mon, 13 Jan 2014 21:36:21 +0100
Subject: Fix config file path.
diff --git a/CorsixTH/Lua/config_finder.lua b/CorsixTH/Lua/config_finder.lua
index 5de4dfb..c643f65 100644
--- a/CorsixTH/Lua/config_finder.lua
+++ b/CorsixTH/Lua/config_finder.lua
@@ -35,7 +35,7 @@ if pathsep == "\\" then
config_path = os.getenv("AppData") or ourpath
else
-- Linux, OS X, etc.
- config_path = os.getenv("XDG_CONFIG_HOME") or pathconcat(os.getenv("HOME") or "~", ".config")
+ config_path = os.getenv("XDG_CONFIG_HOME") or pathconcat(os.getenv("HOME") or "~", "config/settings")
end
if config_path ~= ourpath then
config_path = pathconcat(config_path, "CorsixTH")
--
1.8.3.4
From d2181fb6daaf3b434de528caaaf25c4da8bcb29d Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Mon, 13 Jan 2014 21:36:49 +0100
Subject: Add vector icon.
diff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AJ?PTvcCd?-=s9g!enlCS5
zp2C<dVfa>L^cF>WCu`*3EV3z|Bn&sNIAOSnOUH1HsBgxCnOk#8XBiWqb*>~^{(@~T
zrPZG>o3CUN#Kr}3S+}FK+J<@ZN~`B0UD?uV9`@Kut1G~1Th>`$=HNd@c;YOsXsNTf
z)5?GNb*&XxE(KQSf2P1XiwJPZfQyKLc5O?1cjj$NPh!lrEqTCgksjvYrz1RxbS&Hw
z>C7tiukF<<dOvjZ$!D;2B|c$^$qzebced!IPaZ{A9H)z3?n*YF9FOJGuZoj7`1=u_
z_#{>I@`h??ntWyO$7<KT7aV=_DQs<*Z+J|Q=bN1vv-xHUxGi7ia`1Bzp7@5d#%~6`
aCb&Gl6s2!CYAbyKqb>a=%)?hu`u+{>W&5rG
literal 0
HcmV?d00001
--
1.8.3.4

View File

@@ -70,7 +70,7 @@ INSTALL()
rm -r $prefix/128x128
rm -r $prefix/256x256
addAppDeskbarSymlink $appsDir/openttd "Transport Tycoon Deluxe"
addAppDeskbarSymlink $appsDir/openttd "OpenTTD"
}
# no TEST script available

View File

@@ -11,7 +11,7 @@ HOMEPAGE="http://www.openttd.org"
SRC_URI="http://binaries.openttd.org/extra/opengfx/$portVersion/opengfx-$portVersion-all.zip"
CHECKSUM_MD5="7709afafb1e6429ee517a5c93a03316c"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86"
ARCHITECTURES="any"
SOURCE_DIR="opengfx-$portVersion"
PROVIDES="
@@ -29,7 +29,7 @@ PROVIDES="
BUILD()
{
echo "Nothing to build!"
true
}
INSTALL()

View File

@@ -11,7 +11,7 @@ HOMEPAGE="http://www.openttd.org"
SRC_URI="http://binaries.openttd.org/extra/openmsx/$portVersion/openmsx-$portVersion-all.zip"
CHECKSUM_MD5="858b79d44aea6de5e15d9d1439e86cc3"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86"
ARCHITECTURES="any"
SOURCE_DIR="openmsx-$portVersion"
PROVIDES="
@@ -29,7 +29,7 @@ PROVIDES="
BUILD()
{
echo "Nothing to build!"
true
}
INSTALL()

View File

@@ -11,7 +11,7 @@ HOMEPAGE="http://www.openttd.org"
SRC_URI="http://binaries.openttd.org/extra/opensfx/$portVersion/opensfx-$portVersion-all.zip"
CHECKSUM_MD5="3605b82f24153500c8a1804e4420168a"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86"
ARCHITECTURES="any"
SOURCE_DIR="opensfx-$portVersion"
PROVIDES="
@@ -29,7 +29,7 @@ PROVIDES="
BUILD()
{
echo "Nothing to build!"
true
}
INSTALL()

View File

@@ -1,64 +0,0 @@
diff -r 5002d6aeb85c libsdl-1.2.14/nclude/begin_code.h
--- SDL-1.2.14/include/begin_code.h Fri Jul 09 17:19:18 2010 +0200
+++ SDL-1.2.14-haiku/include/begin_code.h Fri Sep 17 14:58:26 2010 +0000
@@ -43,7 +43,7 @@
#ifndef DECLSPEC
# if defined(__BEOS__) || defined(__HAIKU__)
# if defined(__GNUC__)
-# define DECLSPEC __declspec(dllexport)
+# define DECLSPEC
# else
# define DECLSPEC __declspec(export)
# endif
diff -r 31b0f2e06e3c src/main/beos/SDL_BeApp.cc
--- SDL-1.2.14/src/main/beos/SDL_BeApp.cc Sun Apr 25 20:16:38 2010 -0400
+++ SDL-1.2.14-haiku/src/main/beos/SDL_BeApp.cc Sun Jun 06 08:55:47 2010 +0000
@@ -39,13 +39,15 @@
static int StartBeApp(void *unused)
{
+ if(!be_app) {
BApplication *App;
App = new BApplication("application/x-SDL-executable");
App->Run();
delete App;
- return(0);
+ }
+ return(0);
}
/* Initialize the Be Application, if it's not already started */
@@ -86,7 +88,7 @@
++SDL_BeAppActive;
/* The app is running, and we're ready to go */
- return(0);
+ return(0);
}
/* Quit the Be Application, if there's nothing left to do */
diff -r 31b0f2e06e3c src/video/bwindow/SDL_sysvideo.cc
--- SDL-1.2.14/src/video/bwindow/SDL_sysvideo.cc Sun Apr 25 20:16:38 2010 -0400
+++ SDL-1.2.14-haiku/src/video/bwindow/SDL_sysvideo.cc Sun Jun 06 08:55:47 2010 +0000
@@ -57,7 +57,6 @@
static void BE_FreeHWSurface(_THIS, SDL_Surface *surface);
static int BE_ToggleFullScreen(_THIS, int fullscreen);
-static SDL_Overlay *BE_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, SDL_Surface *display);
/* OpenGL functions */
#if SDL_VIDEO_OPENGL
diff -r 31b0f2e06e3c src/video/bwindow/SDL_sysyuv.h
--- SDL-1.2.14/src/video/bwindow/SDL_sysyuv.h Sun Apr 25 20:16:38 2010 -0400
+++ SDL-1.2.14-haiku/src/video/bwindow/SDL_sysyuv.h Sun Jun 06 08:55:47 2010 +0000
@@ -62,7 +62,7 @@
};
extern BBitmap * BE_GetOverlayBitmap(BRect bounds, color_space cs);
-SDL_Overlay* BE_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, SDL_Surface* display);
+extern SDL_Overlay* BE_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, SDL_Surface* display);
extern int BE_LockYUVOverlay(_THIS, SDL_Overlay* overlay);
extern void BE_UnlockYUVOverlay(_THIS, SDL_Overlay* overlay);
extern int BE_DisplayYUVOverlay(_THIS, SDL_Overlay* overlay, SDL_Rect* src, SDL_Rect* dst);

View File

@@ -1,4 +1,4 @@
From 59cfb52a4c0564e1713c37be2ae6026f9e4e76a9 Mon Sep 17 00:00:00 2001
From ca09de99c346e44cdd1f578848b4958067b5fb06 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Fri, 22 Nov 2013 23:38:56 +0100
Subject: Remove Alsa and ESD detection
@@ -36,7 +36,7 @@ index 08c8e1e..84d9a55 100644
1.8.3.4
From b2657c374826ed213072b5e80263f59a42e76faf Mon Sep 17 00:00:00 2001
From 735586f7d0600476b0b02206daa76926193da957 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Fri, 22 Nov 2013 23:39:26 +0100
Subject: Fix samples vs bytes issues
@@ -67,7 +67,7 @@ index de635f8..7faf571 100644
1.8.3.4
From 847264a916bb4b9e3bfa1ff8217beed67b37b8a4 Mon Sep 17 00:00:00 2001
From 164201f49d1310bdd229feaf33c1f0e988a89f49 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Fri, 22 Nov 2013 23:40:12 +0100
Subject: Various fixes to the video code
@@ -147,7 +147,7 @@ index c32b661..a26f18b 100644
1.8.3.4
From 6a8dccbefe9522f65a07177441a93251cfcc8d9f Mon Sep 17 00:00:00 2001
From ae129e6505148189a3d73fc085f20e214c0d6446 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sat, 23 Nov 2013 11:59:00 +0100
Subject: Actually fix the sample vs bytes problem in audio driver.
@@ -201,7 +201,7 @@ index 7faf571..300bf03 100644
1.8.3.4
From 112569083122d8d14b2571aaf2b73483ce3738db Mon Sep 17 00:00:00 2001
From 9b20d4dc8a3f5d607623b5d8b2c4ce14e830f4c8 Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Sun, 22 Dec 2013 18:37:30 -0700
Subject: Remove Haiku from specialized DECLSPEC definition
@@ -223,3 +223,27 @@ index 27e2f7b..d5e2f1f 100644
--
1.8.3.4
From 09ba1fa7eccef32323c9987bdd4742bca6e9dfbc Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 5 Jan 2014 17:22:10 +0100
Subject: Change prefix from "be" to "os" for OpenGL includes
Accomodate the new OpenGL kit that doesn't have the "be" symlink.
diff --git a/src/video/bwindow/SDL_BWin.h b/src/video/bwindow/SDL_BWin.h
index f2b19a2..2cb94ee 100644
--- a/src/video/bwindow/SDL_BWin.h
+++ b/src/video/bwindow/SDL_BWin.h
@@ -31,7 +31,7 @@
#include <be/game/DirectWindow.h>
#if SDL_VIDEO_OPENGL
#include "SDL_opengl.h"
-#include <be/opengl/GLView.h>
+#include <os/opengl/GLView.h>
#endif
#include <support/UTF8.h>
--
1.8.3.4

View File

@@ -1,39 +0,0 @@
diff -Naur SDL2-2.0.0/include/begin_code.h SDL2-2.0.0-haiku/include/begin_code.h
--- SDL2-2.0.0/include/begin_code.h 2013-08-11 21:57:54.011796480 -0500
+++ SDL2-2.0.0-haiku/include/begin_code.h 2013-08-19 15:12:06.654049280 -0500
@@ -35,13 +35,7 @@
/* Some compilers use a special export keyword */
#ifndef DECLSPEC
-# if defined(__BEOS__) || defined(__HAIKU__)
-# if defined(__GNUC__)
-# define DECLSPEC __declspec(dllexport)
-# else
-# define DECLSPEC __declspec(export)
-# endif
-# elif defined(__WIN32__)
+# if defined(__WIN32__)
# ifdef __BORLANDC__
# ifdef BUILD_SDL
# define DECLSPEC
@@ -54,6 +48,8 @@
# else
# if defined(__GNUC__) && __GNUC__ >= 4
# define DECLSPEC __attribute__ ((visibility("default")))
+# elif defined(__GNUC__) && __GNUC__ >= 2
+# define DECLSPEC __declspec(dllexport)
# else
# define DECLSPEC
# endif
diff -Naur SDL2-2.0.0/src/main/beos/SDL_BApp.h SDL2-2.0.0-haiku/src/main/beos/SDL_BApp.h
--- SDL2-2.0.0/src/main/beos/SDL_BApp.h 2013-08-11 21:57:54.058982400 -0500
+++ SDL2-2.0.0-haiku/src/main/beos/SDL_BApp.h 2013-08-19 15:10:50.412876800 -0500
@@ -371,7 +371,7 @@
/* Members */
- vector<SDL_Window*> _window_map; /* Keeps track of SDL_Windows by index-id*/
+ std::vector<SDL_Window*> _window_map; /* Keeps track of SDL_Windows by index-id*/
display_mode *_saved_mode;
BGLView *_current_context;

View File

@@ -1,249 +0,0 @@
From ca09de99c346e44cdd1f578848b4958067b5fb06 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Fri, 22 Nov 2013 23:38:56 +0100
Subject: Remove Alsa and ESD detection
These will fail on Haiku, and we don't need them anyway.
diff --git a/configure.in b/configure.in
index 08c8e1e..84d9a55 100644
--- a/configure.in
+++ b/configure.in
@@ -361,7 +361,7 @@ CheckALSA()
AC_HELP_STRING([--enable-alsa], [support the ALSA audio API [[default=yes]]]),
, enable_alsa=yes)
if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
- AM_PATH_ALSA(0.9.0, have_alsa=yes, have_alsa=no)
+ have_alsa=no
# Restore all flags from before the ALSA detection runs
CFLAGS="$alsa_save_CFLAGS"
LDFLAGS="$alsa_save_LDFLAGS"
@@ -460,7 +460,7 @@ CheckESD()
AC_HELP_STRING([--enable-esd], [support the Enlightened Sound Daemon [[default=yes]]]),
, enable_esd=yes)
if test x$enable_audio = xyes -a x$enable_esd = xyes; then
- AM_PATH_ESD(0.2.8, have_esd=yes, have_esd=no)
+ have_esd=no
if test x$have_esd = xyes; then
AC_ARG_ENABLE(esd-shared,
AC_HELP_STRING([--enable-esd-shared], [dynamically load ESD audio support [[default=yes]]]),
@@ -2963,3 +2963,4 @@ AC_OUTPUT([
: >build-deps
if test x"$MAKE" = x; then MAKE=make; fi; $MAKE depend
])
+AC_CONFIG_MACRO_DIR([acinclude])
--
1.8.3.4
From 735586f7d0600476b0b02206daa76926193da957 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Fri, 22 Nov 2013 23:39:26 +0100
Subject: Fix samples vs bytes issues
This was particularly noticeable in Milkytracker (SDL version) and
Hivelytracker, where all the audio timing relies on the buffer being
played during the right time.
diff --git a/src/audio/baudio/SDL_beaudio.cc b/src/audio/baudio/SDL_beaudio.cc
index de635f8..7faf571 100644
--- a/src/audio/baudio/SDL_beaudio.cc
+++ b/src/audio/baudio/SDL_beaudio.cc
@@ -199,11 +199,11 @@ int BE_OpenAudio(_THIS, SDL_AudioSpec *spec)
return (-1);
}
- format.buffer_size = spec->samples;
-
/* Calculate the final parameters for this audio specification */
SDL_CalculateAudioSpec(spec);
+ format.buffer_size = spec->samples;
+
/* Subscribe to the audio stream (creates a new thread) */
{ sigset_t omask;
SDL_MaskSignals(&omask);
--
1.8.3.4
From 164201f49d1310bdd229feaf33c1f0e988a89f49 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Fri, 22 Nov 2013 23:40:12 +0100
Subject: Various fixes to the video code
* Do not center the window each time it is resized
* Do not reset video mode if we didn't enter fullscreen
* remove annoying debug print
diff --git a/src/video/bwindow/SDL_sysvideo.cc b/src/video/bwindow/SDL_sysvideo.cc
index c32b661..a26f18b 100644
--- a/src/video/bwindow/SDL_sysvideo.cc
+++ b/src/video/bwindow/SDL_sysvideo.cc
@@ -406,6 +406,7 @@ static int BE_SetFullScreen(_THIS, SDL_Surface *screen, int fullscreen)
{
// printf("SetFullScreen(%d)\n", fullscreen);
BScreen bscreen;
+ static bool firstTime = true;
// SetFullSscreen() does not work as expected if called in a window
// that was never shown. This is probably a bug in the Haiku Game Kit that needs
@@ -425,6 +426,8 @@ static int BE_SetFullScreen(_THIS, SDL_Surface *screen, int fullscreen)
int width = screen->w;
int height = screen->h;
+ bool wasFullScreen = SDL_Win->IsFullScreen();
+
if (fullscreen) {
// Set resolution to the closest available one that matches the
// current SDL resolution.
@@ -444,7 +447,8 @@ static int BE_SetFullScreen(_THIS, SDL_Surface *screen, int fullscreen)
} else {
// Reset to the previous known resolution as we are now in window
// mode.
- bscreen.SetMode(&saved_mode);
+ if(wasFullScreen)
+ bscreen.SetMode(&saved_mode);
}
// Effectivelly set/reset full screen mode. If we are already in
@@ -456,14 +460,6 @@ static int BE_SetFullScreen(_THIS, SDL_Surface *screen, int fullscreen)
// printf("Going windowed\n");
SDL_Win->SetFullScreen(fullscreen);
- // Calculate offsets for centering the window (in window mode) and for
- // dentering the bitmap (in full screen mode).
- BRect bounds = bscreen.Frame();
- bounds.PrintToStream();
- int32 cx = (bounds.IntegerWidth() - width)/2;
- int32 cy = (bounds.IntegerHeight() - height)/2;
-
- // printf ("cx = %d, cy = %d\n", cx, cy);
if (!SDL_Win->IsFullScreen()) {
// printf("Doing not fullscreen stuff.\n");
// We are not in full screen mode, so we want to change the window
@@ -471,10 +467,18 @@ static int BE_SetFullScreen(_THIS, SDL_Surface *screen, int fullscreen)
SDL_Win->ResizeTo(width, height);
// And also center the window and reset the drawing offset.
- SDL_Win->MoveTo(cx, cy);
+ if(firstTime || wasFullScreen) {
+ SDL_Win->CenterOnScreen();
+ firstTime = false;
+ }
SDL_Win->SetXYOffset(0, 0);
} else {
- // printf("Doing fullscreen stuff.");
+ // Calculate offsets for centering the bitmap.
+
+ BRect bounds = bscreen.Frame();
+ int cx = (bounds.Width() - width) / 2;
+ int cy = (bounds.Height() - height) / 2;
+
// Center the bitmap whenever we are in full screen mode.
SDL_Win->SetXYOffset(cx, cy);
}
--
1.8.3.4
From ae129e6505148189a3d73fc085f20e214c0d6446 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sat, 23 Nov 2013 11:59:00 +0100
Subject: Actually fix the sample vs bytes problem in audio driver.
diff --git a/src/audio/baudio/SDL_beaudio.cc b/src/audio/baudio/SDL_beaudio.cc
index 7faf571..300bf03 100644
--- a/src/audio/baudio/SDL_beaudio.cc
+++ b/src/audio/baudio/SDL_beaudio.cc
@@ -161,25 +161,30 @@ int BE_OpenAudio(_THIS, SDL_AudioSpec *spec)
format.byte_order = B_MEDIA_LITTLE_ENDIAN;
format.frame_rate = (float) spec->freq;
format.channel_count = spec->channels; /* !!! FIXME: support > 2? */
+ int samplesize = 1;
while ((!valid_datatype) && (test_format)) {
valid_datatype = 1;
spec->format = test_format;
switch (test_format) {
case AUDIO_S8:
format.format = media_raw_audio_format::B_AUDIO_CHAR;
+ samplesize = 1;
break;
case AUDIO_U8:
format.format = media_raw_audio_format::B_AUDIO_UCHAR;
+ samplesize = 1;
break;
case AUDIO_S16LSB:
format.format = media_raw_audio_format::B_AUDIO_SHORT;
+ samplesize = 2;
break;
case AUDIO_S16MSB:
format.format = media_raw_audio_format::B_AUDIO_SHORT;
format.byte_order = B_MEDIA_BIG_ENDIAN;
+ samplesize = 2;
break;
default:
@@ -202,7 +207,7 @@ int BE_OpenAudio(_THIS, SDL_AudioSpec *spec)
/* Calculate the final parameters for this audio specification */
SDL_CalculateAudioSpec(spec);
- format.buffer_size = spec->samples;
+ format.buffer_size = spec->samples * spec->channels * samplesize;
/* Subscribe to the audio stream (creates a new thread) */
{ sigset_t omask;
--
1.8.3.4
From 9b20d4dc8a3f5d607623b5d8b2c4ce14e830f4c8 Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Sun, 22 Dec 2013 18:37:30 -0700
Subject: Remove Haiku from specialized DECLSPEC definition
diff --git a/include/begin_code.h b/include/begin_code.h
index 27e2f7b..d5e2f1f 100644
--- a/include/begin_code.h
+++ b/include/begin_code.h
@@ -41,7 +41,7 @@
* Some compilers use a special export keyword
*/
#ifndef DECLSPEC
-# if defined(__BEOS__) || defined(__HAIKU__)
+# if defined(__BEOS__)
# if defined(__GNUC__)
# define DECLSPEC
# else
--
1.8.3.4
From 09ba1fa7eccef32323c9987bdd4742bca6e9dfbc Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 5 Jan 2014 17:22:10 +0100
Subject: Change prefix from "be" to "os" for OpenGL includes
Accomodate the new OpenGL kit that doesn't have the "be" symlink.
diff --git a/src/video/bwindow/SDL_BWin.h b/src/video/bwindow/SDL_BWin.h
index f2b19a2..2cb94ee 100644
--- a/src/video/bwindow/SDL_BWin.h
+++ b/src/video/bwindow/SDL_BWin.h
@@ -31,7 +31,7 @@
#include <be/game/DirectWindow.h>
#if SDL_VIDEO_OPENGL
#include "SDL_opengl.h"
-#include <be/opengl/GLView.h>
+#include <os/opengl/GLView.h>
#endif
#include <support/UTF8.h>
--
1.8.3.4

View File

@@ -0,0 +1,39 @@
SUMMARY="A utility to read and write to network connections"
DESCRIPTION="
Netcat is a simple utility which reads and writes data across network connections, \
using the TCP or UDP protocol.
"
HOMEPAGE="http://nc110.sourceforge.net"
SRC_URI="svn://svn.code.sf.net/p/nc110/code/nc110#22"
LICENSE="Public Domain"
COPYRIGHT="1996 hobbit"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PATCHES="netcat-1.10.patchset"
PROVIDES="
netcat = $portVersion
cmd:nc = $portVersion
"
REQUIRES="
haiku >= $haikuVersion
"
BUILD_REQUIRES="
haiku_devel >= $haikuVersion
"
BUILD_PREREQUIRES="
cmd:gcc
cmd:make
"
BUILD()
{
make haiku
}
INSTALL()
{
mkdir -p $binDir
cp nc $binDir
}

View File

@@ -0,0 +1,175 @@
From ea019e9659fb07d24ec113afdb264c235f1683be Mon Sep 17 00:00:00 2001
From: Puck Meerburg <puck@puckipedia.nl>
Date: Sat, 11 Jan 2014 10:56:27 +0100
Subject: Add Haiku fixes
diff --git a/Makefile b/Makefile
index 99f2795..ce1ebe5 100644
--- a/Makefile
+++ b/Makefile
@@ -69,6 +69,9 @@ aix:
linux:
make -e $(ALL) $(MFLAGS) XFLAGS='-DLINUX' STATIC=-static
+haiku:
+ make -e $(ALL) $(MFLAGS) XFLAGS='-DHAIKU -lnetwork' STATIC=-static
+
# irix 5.2, dunno 'bout earlier versions. If STATIC='-non_shared' doesn't
# work for you, null it out and yell at SGI for their STUPID default
# of apparently not installing /usr/lib/nonshared/*. Sheesh.
diff --git a/generic.h b/generic.h
index b3dd5f5..568e3b3 100644
--- a/generic.h
+++ b/generic.h
@@ -42,6 +42,9 @@
/* random() is generally considered better than rand() */
#define HAVE_RANDOM
+/* moved here to be able to turn it off per platform */
+#define HAVE_BIND
+
/* the srand48/lrand48/etc family is s'posedly even better */
#define HAVE_RAND48
/* bmc@telebase and others have suggested these macros if a box *does* have
@@ -360,6 +363,12 @@ There's a BIG swamp lurking where network code of any sort lives.
#undef HAVE_SELECT_X
#endif /* NeXTSTEP 3.2 motorola */
+/* Haiku contains this version of netcat by default,
+ and doesn't like res_init for some reason */
+#ifdef HAIKU
+#undef HAVE_BIND
+#endif
+
/* Make some "generic" assumptions if all else fails */
#ifdef GENERIC
#undef HAVE_FLOCK
diff --git a/netcat.c b/netcat.c
index 3cab37d..37bc104 100644
--- a/netcat.c
+++ b/netcat.c
@@ -31,7 +31,6 @@
/* conditional includes -- a very messy section which you may have to dink
for your own architecture [and please send diffs...]: */
/* #undef _POSIX_SOURCE /* might need this for something? */
-#define HAVE_BIND /* ASSUMPTION -- seems to work everywhere! */
#define HAVE_HELP /* undefine if you dont want the help text */
/* #define ANAL /* if you want case-sensitive DNS matching */
@@ -158,6 +157,7 @@ USHORT o_random = 0;
USHORT o_udpmode = 0;
USHORT o_verbose = 0;
unsigned int o_wait = 0;
+unsigned int o_quittimeout = 0;
USHORT o_zero = 0;
/* o_tn in optional section */
@@ -170,6 +170,9 @@ USHORT o_zero = 0;
#define Debug(x) /* nil... */
#endif
+#ifdef HAVE_HELP
+void helpme();
+#endif
/* support routines -- the bulk of this thing. Placed in such an order that
we don't have to forward-declare anything: */
@@ -224,6 +227,14 @@ void catch ()
bail (" punt!");
}
+/* quitaftertimeout :
+ signal handler which quits after user given seconds after close of stdin */
+void quitaftertimeout ()
+{
+ close(netfd);
+ exit(0);
+}
+
/* timeout and other signal handling cruft */
void tmtravel ()
{
@@ -1171,15 +1182,19 @@ int readwrite (fd)
} /* select fuckup */
/* if we have a timeout AND stdin is closed AND we haven't heard anything
from the net during that time, assume it's dead and close it too. */
- if (rr == 0) {
- if (! FD_ISSET (0, ding1))
- netretry--; /* we actually try a coupla times. */
- if (! netretry) {
- if (o_verbose > 1) /* normally we don't care */
- holler ("net timeout");
- close (fd);
- return (0); /* not an error! */
+/* we need this section if -q is not given, otherwise we don't quit if we
+ don't receive from net, we quit after timeout given with -q */
+ if (o_quittimeout == 0) {
+ if (rr == 0) {
+ if (! FD_ISSET (0, ding1))
+ netretry--; /* we actually try a coupla times. */
+ if (! netretry) {
+ if (o_verbose > 1) /* normally we don't care */
+ holler ("net timeout");
+ close (fd);
+ return (0); /* not an error! */
}
+ }
} /* select timeout */
/* xxx: should we check the exception fds too? The read fds seem to give
us the right info, and none of the examples I found bothered. */
@@ -1214,6 +1229,15 @@ Debug (("got %d from the net, errno %d", rr, errno))
if (rr <= 0) { /* at end, or fukt, or ... */
FD_CLR (0, ding1); /* disable and close stdin */
close (0);
+ if (o_quittimeout > 0) {
+ if (o_verbose > 1)
+ fprintf (stderr, "STDIN closed, quit after %d seconds\n", o_quittimeout);
+ signal (SIGALRM, quitaftertimeout);
+ alarm (o_quittimeout);
+ // if -q argument is < 0 we don't trigger any signal and we also don't
+ // check for rr == 0 above, hence this is an infinite loop, essentially
+ // waiting forever on fd or net.
+ }
} else {
rzleft = rr;
zp = bigbuf_in;
@@ -1387,7 +1411,7 @@ main (argc, argv)
/* If your shitbox doesn't have getopt, step into the nineties already. */
/* optarg, optind = next-argv-component [i.e. flag arg]; optopt = last-char */
- while ((x = getopt (argc, argv, "ae:g:G:hi:lno:p:rs:tuvw:z")) != EOF) {
+ while ((x = getopt (argc, argv, "ae:g:G:hi:lno:p:q:rs:tuvw:z")) != EOF) {
/* Debug (("in go: x now %c, optarg %x optind %d", x, optarg, optind)) */
switch (x) {
case 'a':
@@ -1439,6 +1463,9 @@ main (argc, argv)
if (o_lport == 0)
bail ("invalid local port %s", optarg);
break;
+ case 'q': /* set the quit timeout */
+ o_quittimeout = atoi(optarg);
+ break;
case 'r': /* randomize various things */
o_random++; break;
case 's': /* local source address */
@@ -1625,7 +1652,7 @@ Debug (("netfd %d from port %d to port %d", netfd, ourport, curport))
#ifdef HAVE_HELP /* unless we wanna be *really* cryptic */
/* helpme :
the obvious */
-helpme()
+void helpme()
{
o_verbose = 1;
holler ("[v1.10]\n\
@@ -1648,6 +1675,7 @@ options:");
-n numeric-only IP addresses, no DNS\n\
-o file hex dump of traffic\n\
-p port local port number\n\
+ -q timeout set timeout for connecting\n\
-r randomize local and remote ports\n\
-s addr local source address");
#ifdef TELNET
--
1.8.3.4

View File

@@ -35,8 +35,31 @@ PROVIDES="
devel:libintl$secondaryArchSuffix = 8.1.1 compat >= 8
lib:libasprintf$secondaryArchSuffix = 0.0.0 compat >= 0
lib:libgettextlib_0.18.1$secondaryArchSuffix = $portVersion
lib:libgettextpo = 0.5.1$secondaryArchSuffix compat >= 0
lib:libgettextpo$secondaryArchSuffix = 0.5.1 compat >= 0
lib:libgettextsrc_0.18.1$secondaryArchSuffix = $portVersion
cmd:autopoint$secondaryArchSuffix
cmd:envsubst$secondaryArchSuffix
cmd:gettext$secondaryArchSuffix
cmd:gettext.sh$secondaryArchSuffix
cmd:gettextize$secondaryArchSuffix
cmd:msgattrib$secondaryArchSuffix
cmd:msgcat$secondaryArchSuffix
cmd:msgcmp$secondaryArchSuffix
cmd:msgcomm$secondaryArchSuffix
cmd:msgconv$secondaryArchSuffix
cmd:msgen$secondaryArchSuffix
cmd:msgexec$secondaryArchSuffix
cmd:msgfilter$secondaryArchSuffix
cmd:msgfmt$secondaryArchSuffix
cmd:msggrep$secondaryArchSuffix
cmd:msginit$secondaryArchSuffix
cmd:msgmerge$secondaryArchSuffix
cmd:msgunfmt$secondaryArchSuffix
cmd:msguniq$secondaryArchSuffix
cmd:ngettext$secondaryArchSuffix
cmd:recode_sr_latin$secondaryArchSuffix
cmd:xgettext$secondaryArchSuffix
"
if [ -z "$secondaryArchSuffix" ]; then
PROVIDES="$PROVIDES