Cleanup: fix names of recipe and patch files.

* this fixes the wrong recipe names introduced by myself in #d525fee
* adjust patch names to match corresponding recipes
* additionally: create 'additional-files' folders as hint to some
  ports that do not have a proper recipe yet
This commit is contained in:
Oliver Tappe
2013-08-25 23:47:39 +02:00
parent 096da200da
commit aec3652b01
208 changed files with 199 additions and 8094 deletions

View File

@@ -1,736 +0,0 @@
diff -urN allegro-4.3.10/fix.sh allegro-4.3.10-haiku/fix.sh
--- allegro-4.3.10/fix.sh 2008-01-01 13:59:18.000000000 -0800
+++ allegro-4.3.10-haiku/fix.sh 2008-08-23 17:29:03.000000000 -0700
@@ -9,7 +9,7 @@
echo
echo "Usage: $0 <platform> [--quick|--dtou|--utod|--utom|--mtou]"
echo
- echo "Where platform is one of: bcc32, beos, djgpp, mingw, qnx, unix"
+ echo "Where platform is one of: bcc32, beos, djgpp, haiku, mingw, qnx, unix"
echo "mac, macosx, macosx-universal and watcom."
echo "The --quick parameter turns off text file conversion, --dtou converts from"
echo "DOS/Win32 format to Unix, --utod converts from Unix to DOS/Win32 format,"
@@ -140,6 +140,7 @@
"bcc32" ) proc_fix "Windows (BCC32)" "makefile.bcc" "ALLEGRO_BCC32";;
"beos" ) proc_fix "BeOS" "makefile.be" "ALLEGRO_BEOS";;
"djgpp" ) proc_fix "DOS (djgpp)" "makefile.dj" "ALLEGRO_DJGPP";;
+ "haiku" ) proc_fix "Haiku" "makefile.haiku" "ALLEGRO_HAIKU";;
"mingw" ) proc_fix "Windows (MinGW)" "makefile.mgw" "ALLEGRO_MINGW32";;
"mingw32" ) proc_fix "Windows (MinGW)" "makefile.mgw" "ALLEGRO_MINGW32";;
# The 'msvc' target is undocumented in the help message, but is used
diff -urN allegro-4.3.10/include/allegro/internal/alconfig.h allegro-4.3.10-haiku/include/allegro/internal/alconfig.h
--- allegro-4.3.10/include/allegro/internal/alconfig.h 2007-06-24 01:13:22.000000000 -0700
+++ allegro-4.3.10-haiku/include/allegro/internal/alconfig.h 2008-08-25 22:04:47.000000000 -0700
@@ -48,6 +48,8 @@
#include "allegro/platform/albcc32.h"
#elif defined ALLEGRO_MSVC
#include "allegro/platform/almsvc.h"
+ #elif defined ALLEGRO_HAIKU
+ #include "allegro/platform/alhakcfg.h"
#elif defined ALLEGRO_BEOS
#include "allegro/platform/albecfg.h"
#elif defined ALLEGRO_MPW
diff -urN allegro-4.3.10/include/allegro/platform/ainthaiku.h allegro-4.3.10-haiku/include/allegro/platform/ainthaiku.h
--- allegro-4.3.10/include/allegro/platform/ainthaiku.h 1969-12-31 16:00:00.000000000 -0800
+++ allegro-4.3.10-haiku/include/allegro/platform/ainthaiku.h 2006-03-18 07:05:34.000000000 -0800
@@ -0,0 +1,151 @@
+/* ______ ___ ___
+ * /\ _ \ /\_ \ /\_ \
+ * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
+ * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
+ * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
+ * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
+ * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
+ * /\____/
+ * \_/__/
+ *
+ * Definitions for internal use by the BeOS configuration.
+ *
+ * By Jason Wilkins.
+ *
+ * See readme.txt for copyright information.
+ */
+
+
+#include "bealleg.h"
+
+#ifdef __cplusplus
+extern status_t ignore_result;
+
+extern volatile int32 focus_count;
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define WND_TITLE_SIZE 128
+
+AL_ARRAY(char, wnd_title);
+
+int be_key_init(void);
+void be_key_exit(void);
+void be_key_set_leds(int leds);
+void be_key_set_rate(int delay, int repeat);
+void be_key_wait_for_input(void);
+void be_key_stop_waiting_for_input(void);
+void be_key_suspend(void);
+void be_key_resume(void);
+
+int be_sys_init(void);
+void be_sys_exit(void);
+void _be_sys_get_executable_name(char *output, int size);
+void be_sys_get_executable_name(char *output, int size);
+int be_sys_find_resource(char *dest, AL_CONST char *resource, int size);
+void be_sys_set_window_title(AL_CONST char *name);
+int be_sys_set_close_button_callback(void (*proc)(void));
+void be_sys_message(AL_CONST char *msg);
+int be_sys_set_display_switch_mode(int mode);
+int be_sys_desktop_color_depth(void);
+int be_sys_get_desktop_resolution(int *width, int *height);
+void be_sys_get_gfx_safe_mode(int *driver, struct GFX_MODE *mode);
+void be_sys_yield_timeslice(void);
+void *be_sys_create_mutex(void);
+void be_sys_destroy_mutex(void *handle);
+void be_sys_lock_mutex(void *handle);
+void be_sys_unlock_mutex(void *handle);
+void be_sys_suspend(void);
+void be_sys_resume(void);
+void be_main_suspend(void);
+void be_main_resume(void);
+
+struct BITMAP *be_gfx_bwindowscreen_accel_init(int w, int h, int v_w, int v_h, int color_depth);
+struct BITMAP *be_gfx_bwindowscreen_init(int w, int h, int v_w, int v_h, int color_depth);
+void be_gfx_bwindowscreen_exit(struct BITMAP *b);
+void be_gfx_bwindowscreen_acquire(struct BITMAP *b);
+void be_gfx_bwindowscreen_release(struct BITMAP *b);
+void be_gfx_bwindowscreen_set_palette(AL_CONST struct RGB *p, int from, int to, int vsync);
+int be_gfx_bwindowscreen_scroll(int x, int y);
+int be_gfx_bwindowscreen_request_scroll(int x, int y);
+int be_gfx_bwindowscreen_poll_scroll(void);
+int be_gfx_bwindowscreen_request_video_bitmap(struct BITMAP *bitmap);
+void be_gfx_vsync(void);
+struct GFX_MODE_LIST *be_gfx_bwindowscreen_fetch_mode_list(void);
+void be_gfx_bwindowscreen_accelerate(int color_depth);
+#ifdef ALLEGRO_NO_ASM
+uintptr_t be_gfx_bwindowscreen_read_write_bank(BITMAP *bmp, int lyne);
+void be_gfx_bwindowscreen_unwrite_bank(BITMAP *bmp);
+#else
+uintptr_t _be_gfx_bwindowscreen_read_write_bank_asm(BITMAP *bmp, int lyne);
+void _be_gfx_bwindowscreen_unwrite_bank_asm(BITMAP *bmp);
+#endif
+
+struct BITMAP *be_gfx_bdirectwindow_init(int w, int h, int v_w, int v_h, int color_depth);
+void be_gfx_bdirectwindow_exit(struct BITMAP *b);
+void be_gfx_bdirectwindow_acquire(struct BITMAP *bmp);
+void be_gfx_bdirectwindow_release(struct BITMAP *bmp);
+void be_gfx_bdirectwindow_set_palette(AL_CONST struct RGB *p, int from, int to, int vsync);
+
+struct BITMAP *be_gfx_bwindow_init(int w, int h, int v_w, int v_h, int color_depth);
+void be_gfx_bwindow_exit(struct BITMAP *b);
+void be_gfx_bwindow_acquire(struct BITMAP *bmp);
+void be_gfx_bwindow_release(struct BITMAP *bmp);
+void be_gfx_bwindow_set_palette(AL_CONST struct RGB *p, int from, int to, int vsync);
+
+#ifdef ALLEGRO_NO_ASM
+void _be_gfx_bwindow_unwrite_bank(BITMAP *bmp);
+uintptr_t _be_gfx_bwindow_read_write_bank(BITMAP *bmp, int lyne);
+#else
+void _be_gfx_bwindow_unwrite_bank_asm(BITMAP *bmp);
+uintptr_t _be_gfx_bwindow_read_write_bank_asm(BITMAP *bmp, int lyne);
+#endif
+
+struct BITMAP *be_gfx_overlay_init(int w, int h, int v_w, int v_h, int color_depth);
+void be_gfx_overlay_exit(struct BITMAP *b);
+
+int be_time_init(void);
+void be_time_exit(void);
+void be_time_rest(unsigned int tyme, AL_METHOD(void, callback, (void)));
+void be_time_suspend(void);
+void be_time_resume(void);
+
+int be_mouse_init(void);
+void be_mouse_exit(void);
+void be_mouse_position(int x, int y);
+void be_mouse_set_range(int x1, int y_1, int x2, int y2);
+void be_mouse_set_speed(int xspeed, int yspeed);
+void be_mouse_get_mickeys(int *mickeyx, int *mickeyy);
+
+int be_joy_init(void);
+void be_joy_exit(void);
+int be_joy_poll(void);
+
+int be_sound_detect(int input);
+int be_sound_init(int input, int voices);
+void be_sound_exit(int input);
+void *be_sound_lock_voice(int voice, int start, int end);
+void be_sound_unlock_voice(int voice);
+int be_sound_buffer_size(void);
+int be_sound_set_mixer_volume(int volume);
+int be_sound_get_mixer_volume(void);
+void be_sound_suspend(void);
+void be_sound_resume(void);
+
+int be_midi_detect(int input);
+int be_midi_init(int input, int voices);
+void be_midi_exit(int input);
+int be_midi_set_mixer_volume(int volume);
+int be_midi_get_mixer_volume(void);
+void be_midi_key_on(int inst, int note, int bend, int vol, int pan);
+void be_midi_key_off(int voice);
+void be_midi_set_volume(int voice, int vol);
+void be_midi_set_pitch(int voice, int note, int bend);
+void be_midi_set_pan(int voice, int pan);
+
+#ifdef __cplusplus
+}
+#endif
diff -urN allegro-4.3.10/include/allegro/platform/alhaiku.h allegro-4.3.10-haiku/include/allegro/platform/alhaiku.h
--- allegro-4.3.10/include/allegro/platform/alhaiku.h 1969-12-31 16:00:00.000000000 -0800
+++ allegro-4.3.10-haiku/include/allegro/platform/alhaiku.h 2002-10-01 11:05:12.000000000 -0700
@@ -0,0 +1,76 @@
+/* ______ ___ ___
+ * /\ _ \ /\_ \ /\_ \
+ * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
+ * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
+ * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
+ * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
+ * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
+ * /\____/
+ * \_/__/
+ *
+ * BeOS specific definitions header file.
+ *
+ * By Jason Wilkins.
+ *
+ * See readme.txt for copyright information.
+ */
+
+
+/* system driver */
+#define SYSTEM_BEOS AL_ID('B','S','Y','S')
+AL_VAR(SYSTEM_DRIVER, system_beos);
+
+/* timer driver */
+#define TIMER_BEOS AL_ID('B','T','I','M')
+AL_VAR(TIMER_DRIVER, timer_beos);
+
+/* keyboard driver */
+#define KEYBOARD_BEOS AL_ID('B','K','E','Y')
+AL_VAR(KEYBOARD_DRIVER, keyboard_beos);
+
+/* mouse driver */
+#define MOUSE_BEOS AL_ID('B','M','O','U')
+AL_VAR(MOUSE_DRIVER, mouse_beos);
+
+/* joystick driver */
+#define JOYSTICK_BEOS AL_ID('B','J','O','Y')
+AL_VAR(JOYSTICK_DRIVER, joystick_beos);
+
+/* graphics drivers */
+#define GFX_BWINDOWSCREEN_ACCEL AL_ID('B','W','S','A')
+#define GFX_BWINDOWSCREEN AL_ID('B','W','S',' ')
+AL_VAR(GFX_DRIVER, gfx_beos_bwindowscreen_accel);
+AL_VAR(GFX_DRIVER, gfx_beos_bwindowscreen);
+
+#define GFX_BDIRECTWINDOW AL_ID('B','D','W','N')
+#define GFX_BWINDOW AL_ID('B','W','N',' ')
+AL_VAR(GFX_DRIVER, gfx_beos_bdirectwindow);
+AL_VAR(GFX_DRIVER, gfx_beos_bwindow);
+
+#define GFX_BWINDOW_OVERLAY AL_ID('B','O','V','L')
+AL_VAR(GFX_DRIVER, gfx_beos_overlay);
+
+/* digi drivers */
+#define DIGI_BEOS AL_ID('B','D','I','G')
+AL_VAR(DIGI_DRIVER, digi_beos);
+
+/* midi drivers */
+#define MIDI_BEOS AL_ID('B','M','I','D')
+AL_VAR(MIDI_DRIVER, midi_beos);
+
+#define GFX_DRIVER_BEOS \
+ { GFX_BWINDOWSCREEN_ACCEL, &gfx_beos_bwindowscreen_accel, TRUE }, \
+ { GFX_BWINDOWSCREEN, &gfx_beos_bwindowscreen, TRUE }, \
+ { GFX_BDIRECTWINDOW, &gfx_beos_bdirectwindow, TRUE }, \
+ { GFX_BWINDOW, &gfx_beos_bwindow, TRUE }, \
+ { GFX_BWINDOW_OVERLAY, &gfx_beos_overlay, TRUE },
+
+#define DIGI_DRIVER_BEOS \
+ { DIGI_BEOS, &digi_beos, TRUE },
+
+#define MIDI_DRIVER_BEOS \
+ { MIDI_BEOS, &midi_beos, TRUE },
+
+#define JOYSTICK_DRIVER_BEOS \
+ { JOYSTICK_BEOS, &joystick_beos, TRUE },
+
diff -urN allegro-4.3.10/include/allegro/platform/alhakcfg.h allegro-4.3.10-haiku/include/allegro/platform/alhakcfg.h
--- allegro-4.3.10/include/allegro/platform/alhakcfg.h 1969-12-31 16:00:00.000000000 -0800
+++ allegro-4.3.10-haiku/include/allegro/platform/alhakcfg.h 2008-08-25 22:07:11.000000000 -0700
@@ -0,0 +1,43 @@
+/* ______ ___ ___
+ * /\ _ \ /\_ \ /\_ \
+ * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
+ * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
+ * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
+ * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
+ * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
+ * /\____/
+ * \_/__/
+ *
+ * Configuration defines for use with BeOS.
+ *
+ * By Jason Wilkins.
+ *
+ * See readme.txt for copyright information.
+ */
+
+
+#include <fcntl.h>
+#include <unistd.h>
+
+/* provide implementations of missing functions */
+#define ALLEGRO_NO_STRICMP
+#define ALLEGRO_NO_STRLWR
+#define ALLEGRO_NO_STRUPR
+
+/* a static auto config */
+#define ALLEGRO_HAVE_DIRENT_H 1
+#define ALLEGRO_HAVE_INTTYPES_H 1 /* TODO: check this */
+#define ALLEGRO_HAVE_STDINT_H 1 /* TODO: check this */
+#define ALLEGRO_HAVE_SYS_TIME_H 1
+
+/* describe this platform */
+#define ALLEGRO_PLATFORM_STR "Haiku"
+#define ALLEGRO_LITTLE_ENDIAN
+#define ALLEGRO_CONSOLE_OK
+#define ALLEGRO_USE_CONSTRUCTOR
+#define ALLEGRO_MULTITHREADED
+
+/* arrange for other headers to be included later on */
+#define ALLEGRO_EXTRA_HEADER "allegro/platform/alhaiku.h"
+#define ALLEGRO_INTERNAL_HEADER "allegro/platform/ainthaiku.h"
+#define ALLEGRO_ASMCAPA_HEADER "obj/beos/asmcapa.h"
diff -urN allegro-4.3.10/makefile.all allegro-4.3.10-haiku/makefile.all
--- allegro-4.3.10/makefile.all 2008-01-14 03:55:28.000000000 -0800
+++ allegro-4.3.10-haiku/makefile.all 2008-08-23 17:44:44.000000000 -0700
@@ -8,7 +8,7 @@
# DEBUGMODE=2 selects a build intended to debug Allegro itself.
# PROFILEMODE=1 selects a profiling build.
# WARNMODE=1 selects strict compiler warnings.
-# STATICLINK=1 use static linking (MinGW32, MSVC, BeOS).
+# STATICLINK=1 use static linking (MinGW32, MSVC, BeOS, Haiku).
# STATICRUNTIME=1 link to a static C runtime library (/MT) (MSVC)
# TARGET_ARCH_COMPAT optimize for the given processor while preserving backwards
# compatibility with older processors (GCC-based platforms).
@@ -132,7 +132,7 @@
# XXX this is duplicated in makefile.in
DOCBASEFILES = ahack changes faq mistakes help thanks allegro const abi api packfile \
readme makedoc datafile grabber dat dat2c dat2s license addons targets
-DOCBUILDFILES = bcc32 beos darwin djgpp dmc linux macosx mingw32 msvc qnx unix watcom
+DOCBUILDFILES = bcc32 beos darwin djgpp dmc haiku linux macosx mingw32 msvc qnx unix watcom
DOCTXTBUILDFILES = $(addprefix docs/build/,$(addsuffix .txt,$(DOCBUILDFILES)))
DOCS = $(addprefix docs/txt/,$(addsuffix .txt,$(filter-out changes thanks readme, $(DOCBASEFILES))))
diff -urN allegro-4.3.10/makefile.haiku allegro-4.3.10-haiku/makefile.haiku
--- allegro-4.3.10/makefile.haiku 1969-12-31 16:00:00.000000000 -0800
+++ allegro-4.3.10-haiku/makefile.haiku 2008-08-25 21:19:47.000000000 -0700
@@ -0,0 +1,315 @@
+#
+# Rules for building the Allegro library with Haiku. This file is included
+# by the primary makefile, and should not be used directly.
+#
+# The "depend" target uses sed.
+#
+# See makefile.all for a list of the available targets.
+
+
+
+# -------- define some variables that the primary makefile will use --------
+
+PLATFORM = Haiku
+CC = gcc
+EXE =
+OBJ = .o
+HTML = html
+
+PLATFORM_DIR = obj/beos
+
+UNIX_TOOLS = 1
+
+ifdef STATICLINK
+
+# -------- link as a static library --------
+OBJ_DIR = obj/beos/$(VERSION)
+LIB_NAME = lib/beos/lib$(VERSION).a
+
+else
+
+# -------- link as a DLL --------
+OBJ_DIR = obj/beos/$(VERSION)
+LIB_NAME = lib/beos/lib$(VERSION)-$(shared_version).so
+
+endif # STATICLINK
+
+# -------- give a sensible default target for make without any args --------
+
+.PHONY: _default
+
+_default: default
+
+
+# -------- decide what compiler options to use --------
+
+ifdef WARNMODE
+WFLAGS = -Wall -W -Wstrict-prototypes -Wno-unused -Wno-multichar -Wno-ctor-dtor-privacy -Werror
+else
+WFLAGS = -Wall -Wno-unused -Wno-multichar -Wno-ctor-dtor-privacy
+endif
+
+ifdef TARGET_ARCH_COMPAT
+ TARGET_ARCH = $(GCC_MTUNE)=$(TARGET_ARCH_COMPAT)
+else
+ ifdef TARGET_ARCH_EXCL
+ TARGET_ARCH = -march=$(TARGET_ARCH_EXCL)
+ else
+ TARGET_ARCH = $(GCC_MTUNE)=i586
+ endif
+endif
+
+ifndef TARGET_OPTS
+ TARGET_OPTS = -O6 -funroll-loops -ffast-math
+endif
+
+OFLAGS = $(TARGET_ARCH) $(TARGET_OPTS)
+
+CFLAGS = -DALLEGRO_LIB_BUILD
+
+
+
+ifdef DEBUGMODE
+
+# -------- debugging build --------
+CFLAGS += -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -g -O0
+SFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS)
+LFLAGS = -g
+
+else
+ifdef PROFILEMODE
+
+# -------- profiling build --------
+CFLAGS += $(WFLAGS) $(OFLAGS) -pg
+SFLAGS = $(WFLAGS)
+LFLAGS = -pg
+
+else
+
+# -------- optimised build --------
+CFLAGS += $(WFLAGS) $(OFLAGS) -fomit-frame-pointer
+SFLAGS = $(WFLAGS)
+
+ifndef SYMBOLMODE
+LFLAGS = -s
+else
+LFLAGS =
+endif
+
+endif
+endif
+
+
+# -------- list which platform specific objects to include --------
+
+VPATH = src/haiku src/misc src/unix tools/haiku
+
+ifdef ALLEGRO_USE_C
+
+# ------ build a C-only version ------
+
+VPATH += src/c
+MY_OBJECTS = $(C_OBJECTS) cmiscs
+CFLAGS +=
+
+else
+
+# ------ build the normal asm version ------
+
+VPATH += src/i386
+MY_OBJECTS = $(I386_OBJECTS)
+
+endif # ALLEGRO_USE_C
+
+OBJECT_LIST = $(COMMON_OBJECTS) $(MY_OBJECTS) $(basename $(notdir $(ALLEGRO_SRC_HAIKU_FILES)))
+
+LIBRARIES = -lbe -lgame -ldevice -lmidi -lmedia -lnetwork
+
+PROGRAMS = bfixicon
+
+bfixicon: tools/haiku/bfixicon
+
+DISTCLEAN_FILES += tools/haiku/bfixicon
+
+
+
+# -------- rules for installing and removing the library files --------
+
+INSTALLDIR = /boot/develop
+LIBDIR = lib/x86
+INCDIR = headers
+
+SHARED_LIBDIR = /boot/common/lib
+
+
+ifdef STATICLINK
+
+$(INSTALLDIR)/$(LIBDIR)/lib$(VERSION).a: $(LIB_NAME)
+ cp $< $@
+
+else
+
+$(SHARED_LIBDIR)/lib$(VERSION)-$(shared_version).so: $(LIB_NAME)
+ cp $< $@
+
+endif
+
+
+/bin/allegro-config:
+ifdef STATICLINK
+ sed -e "s/@LINK_WITH_STATIC_LIBS@/yes/" misc/allegro-config.in >temp
+else
+ sed -e "s/@LINK_WITH_STATIC_LIBS@/no/" misc/allegro-config.in >temp
+endif
+ sed -e "s/@prefix@/\/boot\/develop/" temp > temp2
+ sed -e "s/@LIB_TO_LINK@/$(VERSION)/" temp2 > temp
+ sed -e "s/@LDFLAGS@//" temp > temp2
+ sed -e "s/@LIBS@/$(LIBRARIES)/" temp2 > temp
+ sed -e "s/include/headers/" temp >temp2
+ sed -e "s/ -l\$${lib_type}_unsharable//" temp2 >temp
+ sed -e "s/libdirs=-L\$${exec_prefix}\/lib/libdirs=\"-L\$${exec_prefix}\/lib\/x86 -L\/boot\/common\/lib\"/" temp >/bin/allegro-config
+ rm -f temp temp2
+ chmod a+x /bin/allegro-config
+
+
+HEADERS = $(INSTALLDIR)/$(INCDIR)/bealleg.h \
+ $(INSTALLDIR)/$(INCDIR)/allegro/platform/aintbeos.h \
+ $(INSTALLDIR)/$(INCDIR)/allegro/platform/al386gcc.h \
+ $(INSTALLDIR)/$(INCDIR)/allegro/platform/albecfg.h \
+ $(INSTALLDIR)/$(INCDIR)/allegro/platform/alplatf.h \
+ $(INSTALLDIR)/$(INCDIR)/allegro/platform/astdint.h \
+ $(INSTALLDIR)/$(INCDIR)/allegro/platform/albeos.h
+
+ifdef STATICLINK
+ INSTALL_FILES = $(INSTALLDIR)/$(LIBDIR)/lib$(VERSION).a
+else
+ INSTALL_FILES = $(SHARED_LIBDIR)/lib$(VERSION)-$(shared_version).so
+endif
+
+INSTALL_FILES += $(HEADERS) /bin/allegro-config
+
+
+install: generic-install
+ @echo The $(DESCRIPTION) $(PLATFORM) library has been installed.
+
+UNINSTALL_FILES = $(INSTALLDIR)/$(LIBDIR)/liballeg.a \
+ $(INSTALLDIR)/$(LIBDIR)/liballd.a \
+ $(INSTALLDIR)/$(LIBDIR)/liballp.a \
+ $(SHARED_LIBDIR)/liballeg-$(shared_version).so \
+ $(SHARED_LIBDIR)/liballd-$(shared_version).so \
+ $(SHARED_LIBDIR)/liballp-$(shared_version).so \
+ $(HEADERS) \
+ /bin/allegro-config
+
+uninstall: generic-uninstall
+ @echo All gone!
+
+
+
+# -------- test capabilities --------
+
+TEST_CPP = @echo ...system compiler
+
+include makefile.tst
+
+
+
+# -------- finally, we get to the fun part... --------
+
+ifdef PROFILEMODE
+OTHER_OBJECTS = /boot/develop/lib/x86/i386-mcount.o
+endif
+
+ifdef STATICLINK
+
+# -------- link as a static library --------
+define MAKE_LIB
+ar rs $(LIB_NAME) $(OBJECTS) $(OTHER_OBJECTS)
+endef
+
+else
+
+# -------- link as a shared library --------
+
+define MAKE_LIB
+$(CC) -nostart $(PFLAGS) -o $(LIB_NAME) $(OBJECTS) $(OTHER_OBJECTS) $(LIBRARIES)
+endef
+
+endif # STATICLINK
+
+COMPILE_FLAGS = $(subst src/,-DALLEGRO_SRC ,$(findstring src/, $<))$(CFLAGS)
+
+$(OBJ_DIR)/%.o: %.c
+ $(CC) $(COMPILE_FLAGS) -I. -I./include -o $@ -c $<
+
+$(OBJ_DIR)/%.o: %.cpp
+ $(CC) $(COMPILE_FLAGS) -I. -I./include -o $@ -c $<
+
+$(OBJ_DIR)/%.o: %.s
+ $(CC) $(SFLAGS) -I. -I./include -x assembler-with-cpp -o $@ -c $<
+
+demos/shooter/shooter: $(OBJECTS_SHOOTER) $(LIB_NAME)
+ $(CC) $(LFLAGS) -o $@ $(OBJECTS_SHOOTER) $(LIB_NAME) $(LIBRARIES)
+
+demos/skater/skater: $(OBJECTS_SKATER) $(LIB_NAME)
+ $(CC) $(LFLAGS) -o $@ $(OBJECTS_SKATER) $(LIB_NAME) $(LIBRARIES)
+
+*/%: $(OBJ_DIR)/%.o $(LIB_NAME)
+ $(CC) $(LFLAGS) -o $@ $< $(LIB_NAME) $(LIBRARIES)
+
+obj/haiku/asmdef.inc: obj/haiku/asmdef
+ obj/haiku/asmdef obj/haiku/asmdef.inc
+
+obj/haiku/asmdef: src/i386/asmdef.c include/*.h include/allegro/*.h obj/haiku/asmcapa.h
+ $(CC) -O $(WFLAGS) -I. -I./include -o obj/haiku/asmdef src/i386/asmdef.c
+
+define LINK_WITHOUT_LIB
+ $(CC) $(LFLAGS) -o $@ $^ $(OTHER_OBJECTS)
+endef
+
+PLUGIN_LIB = lib/haiku/lib$(VERY_SHORT_VERSION)dat.a
+PLUGINS_H = obj/haiku/plugins.h
+PLUGIN_DEPS = $(LIB_NAME) $(PLUGIN_LIB)
+PLUGIN_SCR = scr
+
+define GENERATE_PLUGINS_H
+cat tools/plugins/*.inc > obj/haiku/plugins.h
+endef
+
+define MAKE_PLUGIN_LIB
+ar rs $(PLUGIN_LIB) $(PLUGIN_OBJS)
+endef
+
+define LINK_WITH_PLUGINS
+$(CC) $(LFLAGS) -o $@ $< $(strip $(PLUGIN_LIB) $(addprefix @,$(PLUGIN_SCRIPTS)) $(LIB_NAME))
+endef
+
+tools/haiku/%: $(OBJ_DIR)/%.o $(LIB_NAME)
+ $(CC) $(LFLAGS) -o $@ $< $(LIB_NAME) $(LIBRARIES)
+
+
+
+# -------- demo program iconification --------
+
+.PHONY: fixdemo
+
+fixdemo: demos/shooter/shooter demo/demo.dat tools/haiku/bfixicon
+ tools/haiku/bfixicon demos/shooter/shooter -d demos/shooter/demo.dat SHIP3 GAME_PAL
+
+
+
+# -------- generate automatic dependencies --------
+
+DEPEND_PARAMS = -MM -MG -I. -I./include -DSCAN_DEPEND -DALLEGRO_HAIKU
+
+depend:
+ $(CC) $(DEPEND_PARAMS) src/*.c src/haiku/*.c src/i386/*.c src/misc/*.c src/unix/*.c demos/shooter/*.c > _depend.tmp
+ $(CC) $(DEPEND_PARAMS) docs/src/makedoc/*.c examples/*.c setup/*.c tests/*.c tools/*.c tools/plugins/*.c >> _depend.tmp
+ $(CC) $(DEPEND_PARAMS) demos/skater/source/*.c >> _depend.tmp
+ $(CC) $(DEPEND_PARAMS) -x c src/haiku/*.cpp tests/*.cpp tools/haiku/*.cpp >> _depend.tmp
+ $(CC) $(DEPEND_PARAMS) -x assembler-with-cpp src/i386/*.s src/misc/*.s >> _depend.tmp
+ sed -e "s/^[a-zA-Z0-9_\/]*\///" _depend.tmp > _depend2.tmp
+ sed -e "s/^\([a-zA-Z0-9_]*\.o *:\)/obj\/haiku\/alleg\/\1/" _depend2.tmp > obj/haiku/alleg/makefile.dep
+ sed -e "s/^\([a-zA-Z0-9_]*\.o *:\)/obj\/haiku\/alld\/\1/" _depend2.tmp > obj/haiku/alld/makefile.dep
+ sed -e "s/^\([a-zA-Z0-9_]*\.o *:\)/obj\/haiku\/allp\/\1/" _depend2.tmp > obj/haiku/allp/makefile.dep
+ rm _depend.tmp _depend2.tmp
diff -urN allegro-4.3.10/misc/mkunixdists.sh allegro-4.3.10-haiku/misc/mkunixdists.sh
--- allegro-4.3.10/misc/mkunixdists.sh 2008-01-10 13:45:48.000000000 -0800
+++ allegro-4.3.10-haiku/misc/mkunixdists.sh 2008-08-23 20:56:44.000000000 -0700
@@ -73,9 +73,9 @@
# Hack'n'slash
echo "Stripping to form end-user distribution"
(cd $dir/$basename && {
- (cd src && rm -rf beos qnx dos mac ppc win)
- (cd obj && rm -rf bcc32 beos qnx djgpp mingw32 msvc watcom)
- (cd lib && rm -rf bcc32 beos qnx djgpp mingw32 msvc watcom)
+ (cd src && rm -rf beos haiku qnx dos mac ppc win)
+ (cd obj && rm -rf bcc32 beos haiku qnx djgpp mingw32 msvc watcom)
+ (cd lib && rm -rf bcc32 beos haiku qnx djgpp mingw32 msvc watcom)
(cd include && rm -f bealleg.h qnxalleg.h macalleg.h winalleg.h)
(cd misc && rm -f cmplog.pl dllsyms.lst findtext.sh fixpatch.sh fixver.sh)
(cd misc && rm -f allegro-config-qnx.sh zipup.sh zipwin.sh *.bat *.c)
@@ -91,11 +91,11 @@
# jpgalleg addon
(cd addons/jpgalleg && rm -rf examples)
- (cd addons/jpgalleg && rm -f makefile.be makefile.mgw makefile.dj)
+ (cd addons/jpgalleg && rm -f makefile.be makefile.haiku makefile.mgw makefile.dj)
(cd addons/jpgalleg && rm -f makefile.osx makefile.vc fix.bat readme.txt)
(cd addons/jpgalleg/misc && rm -f fixver.sh runner.c)
- (cd addons/jpgalleg/lib && rm -rf beos djgpp macosx mingw32 msvc)
- (cd addons/jpgalleg/obj && rm -rf beos djgpp macosx mingw32 msvc)
+ (cd addons/jpgalleg/lib && rm -rf beos djgpp haiku macosx mingw32 msvc)
+ (cd addons/jpgalleg/obj && rm -rf beos djgpp haiku macosx mingw32 msvc)
# logg addon
(cd addons/logg && rm -f Makefile.mingw play_ogg.c stream_ogg.c fix.bat)
diff -urN allegro-4.3.10/misc/zipup.sh allegro-4.3.10-haiku/misc/zipup.sh
--- allegro-4.3.10/misc/zipup.sh 2008-01-19 04:16:56.000000000 -0800
+++ allegro-4.3.10-haiku/misc/zipup.sh 2008-08-23 20:53:10.000000000 -0700
@@ -126,6 +126,14 @@
make depend UNIX_TOOLS=1 CC=gcc
+# generate dependencies for Haiku
+echo "Generating Haiku dependencies..."
+
+./fix.sh haiku --quick
+
+make depend UNIX_TOOLS=1 CC=gcc
+
+
# generate dependencies for QNX
echo "Generating QNX dependencies..."
@@ -164,7 +172,7 @@
for base in abi ahack allegro const faq help mistakes; do
./_makedoc.exe -ascii docs/txt/$base.txt docs/src/$base._tx
done
-for base in bcc32 beos darwin djgpp linux macosx mingw32 msvc qnx unix watcom; do
+for base in bcc32 beos darwin djgpp haiku linux macosx mingw32 msvc qnx unix watcom; do
./_makedoc.exe -ascii docs/build/$base.txt docs/src/build/$base._tx
done
diff -urN allegro-4.3.10/tools/dat2c.c allegro-4.3.10-haiku/tools/dat2c.c
--- allegro-4.3.10/tools/dat2c.c 2005-04-28 02:53:38.000000000 -0700
+++ allegro-4.3.10-haiku/tools/dat2c.c 2008-08-23 20:44:06.000000000 -0700
@@ -342,7 +342,7 @@
}
if (dat2c->lformat == lineformat_default)
-#if (defined ALLEGRO_UNIX || defined ALLEGRO_QNX || defined ALLEGRO_BEOS || defined ALLEGRO_MACOSX)
+#if (defined ALLEGRO_UNIX || defined ALLEGRO_QNX || defined ALLEGRO_BEOS || defined ALLEGRO_HAIKU || defined ALLEGRO_MACOSX)
dat2c->lformat = lineformat_unix;
#elif (defined ALLEGRO_WINDOWS || defined ALLEGRO_DOS)
dat2c->lformat = lineformat_dos;
diff -urN allegro-4.3.10/tools/datedit.c allegro-4.3.10-haiku/tools/datedit.c
--- allegro-4.3.10/tools/datedit.c 2007-10-08 09:23:36.000000000 -0700
+++ allegro-4.3.10-haiku/tools/datedit.c 2008-08-23 20:42:07.000000000 -0700
@@ -121,6 +121,8 @@
#include "obj/dmc/plugins.h"
#elif defined ALLEGRO_BEOS
#include "obj/beos/plugins.h"
+ #elif defined ALLEGRO_HAIKU
+ #include "obj/beos/plugins.h"
#elif defined ALLEGRO_BCC32
#include "obj/bcc32/plugins.h"
#elif defined ALLEGRO_MPW

View File

@@ -1,657 +0,0 @@
diff -urN allegro-4.3.10/fix.sh allegro-4.3.10-haiku/fix.sh
--- allegro-4.3.10/fix.sh 2008-01-01 13:59:18.000000000 -0800
+++ allegro-4.3.10-haiku/fix.sh 2008-08-26 23:51:47.000000000 -0700
@@ -9,7 +9,7 @@
echo
echo "Usage: $0 <platform> [--quick|--dtou|--utod|--utom|--mtou]"
echo
- echo "Where platform is one of: bcc32, beos, djgpp, mingw, qnx, unix"
+ echo "Where platform is one of: bcc32, beos, djgpp, haiku, mingw, qnx, unix"
echo "mac, macosx, macosx-universal and watcom."
echo "The --quick parameter turns off text file conversion, --dtou converts from"
echo "DOS/Win32 format to Unix, --utod converts from Unix to DOS/Win32 format,"
@@ -140,6 +140,7 @@
"bcc32" ) proc_fix "Windows (BCC32)" "makefile.bcc" "ALLEGRO_BCC32";;
"beos" ) proc_fix "BeOS" "makefile.be" "ALLEGRO_BEOS";;
"djgpp" ) proc_fix "DOS (djgpp)" "makefile.dj" "ALLEGRO_DJGPP";;
+ "haiku" ) proc_fix "Haiku" "makefile.be" "ALLEGRO_HAIKU";;
"mingw" ) proc_fix "Windows (MinGW)" "makefile.mgw" "ALLEGRO_MINGW32";;
"mingw32" ) proc_fix "Windows (MinGW)" "makefile.mgw" "ALLEGRO_MINGW32";;
# The 'msvc' target is undocumented in the help message, but is used
diff -urN allegro-4.3.10/include/allegro/internal/aintern.h allegro-4.3.10-haiku/include/allegro/internal/aintern.h
--- allegro-4.3.10/include/allegro/internal/aintern.h 2008-01-05 14:37:14.000000000 -0800
+++ allegro-4.3.10-haiku/include/allegro/internal/aintern.h 2008-08-26 22:35:46.000000000 -0700
@@ -189,7 +189,7 @@
#if (defined ALLEGRO_DOS) || (defined ALLEGRO_DJGPP) || (defined ALLEGRO_WATCOM) || \
- (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS)
+ (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS) || (defined ALLEGRO_HAIKU)
AL_ARRAY(char *, _pckeys_names);
diff -urN allegro-4.3.10/include/allegro/internal/alconfig.h allegro-4.3.10-haiku/include/allegro/internal/alconfig.h
--- allegro-4.3.10/include/allegro/internal/alconfig.h 2007-06-24 01:13:22.000000000 -0700
+++ allegro-4.3.10-haiku/include/allegro/internal/alconfig.h 2008-08-26 22:20:39.000000000 -0700
@@ -48,6 +48,8 @@
#include "allegro/platform/albcc32.h"
#elif defined ALLEGRO_MSVC
#include "allegro/platform/almsvc.h"
+ #elif defined ALLEGRO_HAIKU
+ #include "allegro/platform/albecfg.h"
#elif defined ALLEGRO_BEOS
#include "allegro/platform/albecfg.h"
#elif defined ALLEGRO_MPW
diff -urN allegro-4.3.10/include/allegro/platform/albecfg.h allegro-4.3.10-haiku/include/allegro/platform/albecfg.h
--- allegro-4.3.10/include/allegro/platform/albecfg.h 2007-06-15 19:52:28.000000000 -0700
+++ allegro-4.3.10-haiku/include/allegro/platform/albecfg.h 2008-08-26 22:24:41.000000000 -0700
@@ -31,7 +31,12 @@
#define ALLEGRO_HAVE_SYS_TIME_H 1
/* describe this platform */
-#define ALLEGRO_PLATFORM_STR "BeOS"
+#if defined __BEOS__ && !defined __HAIKU__
+ #define ALLEGRO_PLATFORM_STR "BeOS"
+#endif
+#if defined __HAIKU__
+ #define ALLEGRO_PLATFORM_STR "Haiku"
+#endif
#define ALLEGRO_LITTLE_ENDIAN
#define ALLEGRO_CONSOLE_OK
#define ALLEGRO_USE_CONSTRUCTOR
diff -urN allegro-4.3.10/makefile.all allegro-4.3.10-haiku/makefile.all
--- allegro-4.3.10/makefile.all 2008-01-14 03:55:28.000000000 -0800
+++ allegro-4.3.10-haiku/makefile.all 2008-08-23 17:44:44.000000000 -0700
@@ -8,7 +8,7 @@
# DEBUGMODE=2 selects a build intended to debug Allegro itself.
# PROFILEMODE=1 selects a profiling build.
# WARNMODE=1 selects strict compiler warnings.
-# STATICLINK=1 use static linking (MinGW32, MSVC, BeOS).
+# STATICLINK=1 use static linking (MinGW32, MSVC, BeOS, Haiku).
# STATICRUNTIME=1 link to a static C runtime library (/MT) (MSVC)
# TARGET_ARCH_COMPAT optimize for the given processor while preserving backwards
# compatibility with older processors (GCC-based platforms).
@@ -132,7 +132,7 @@
# XXX this is duplicated in makefile.in
DOCBASEFILES = ahack changes faq mistakes help thanks allegro const abi api packfile \
readme makedoc datafile grabber dat dat2c dat2s license addons targets
-DOCBUILDFILES = bcc32 beos darwin djgpp dmc linux macosx mingw32 msvc qnx unix watcom
+DOCBUILDFILES = bcc32 beos darwin djgpp dmc haiku linux macosx mingw32 msvc qnx unix watcom
DOCTXTBUILDFILES = $(addprefix docs/build/,$(addsuffix .txt,$(DOCBUILDFILES)))
DOCS = $(addprefix docs/txt/,$(addsuffix .txt,$(filter-out changes thanks readme, $(DOCBASEFILES))))
diff -urN allegro-4.3.10/makefile.be allegro-4.3.10-haiku/makefile.be
--- allegro-4.3.10/makefile.be 2008-01-11 03:30:16.000000000 -0800
+++ allegro-4.3.10-haiku/makefile.be 2008-08-26 22:11:32.000000000 -0700
@@ -10,7 +10,15 @@
# -------- define some variables that the primary makefile will use --------
+
+ifeq ($(OS),BeOS)
PLATFORM = BeOS
+endif
+
+ifeq ($(OS),Haiku)
+PLATFORM = Haiku
+endif
+
CC = gcc
EXE =
OBJ = .o
@@ -123,7 +131,13 @@
OBJECT_LIST = $(COMMON_OBJECTS) $(MY_OBJECTS) $(basename $(notdir $(ALLEGRO_SRC_BEOS_FILES)))
+ifeq ($(OS),BeOS)
LIBRARIES = -lbe -lgame -ldevice -lmidi -lmedia -lnet
+endif
+
+ifeq ($(OS),Haiku)
+LIBRARIES = -lbe -lgame -ldevice -lmidi -lmedia -lnetwork
+endif
PROGRAMS = bfixicon
@@ -167,7 +181,14 @@
sed -e "s/@LIBS@/$(LIBRARIES)/" temp2 > temp
sed -e "s/include/headers/" temp >temp2
sed -e "s/ -l\$${lib_type}_unsharable//" temp2 >temp
+
+ifeq ($(OS),BeOS)
sed -e "s/libdirs=-L\$${exec_prefix}\/lib/libdirs=\"-L\$${exec_prefix}\/lib\/x86 -L\/boot\/home\/config\/lib\"/" temp >/bin/allegro-config
+endif
+ifeq ($(OS),Haiku)
+ sed -e "s/libdirs=-L\$${exec_prefix}\/lib/libdirs=\"-L\$${exec_prefix}\/lib\/x86 -L\/boot\/common\/lib\"/" temp >/bin/allegro-config
+endif
+
rm -f temp temp2
chmod a+x /bin/allegro-config
diff -urN allegro-4.3.10/misc/mkunixdists.sh allegro-4.3.10-haiku/misc/mkunixdists.sh
--- allegro-4.3.10/misc/mkunixdists.sh 2008-01-10 13:45:48.000000000 -0800
+++ allegro-4.3.10-haiku/misc/mkunixdists.sh 2008-08-23 20:56:44.000000000 -0700
@@ -73,9 +73,9 @@
# Hack'n'slash
echo "Stripping to form end-user distribution"
(cd $dir/$basename && {
- (cd src && rm -rf beos qnx dos mac ppc win)
- (cd obj && rm -rf bcc32 beos qnx djgpp mingw32 msvc watcom)
- (cd lib && rm -rf bcc32 beos qnx djgpp mingw32 msvc watcom)
+ (cd src && rm -rf beos haiku qnx dos mac ppc win)
+ (cd obj && rm -rf bcc32 beos haiku qnx djgpp mingw32 msvc watcom)
+ (cd lib && rm -rf bcc32 beos haiku qnx djgpp mingw32 msvc watcom)
(cd include && rm -f bealleg.h qnxalleg.h macalleg.h winalleg.h)
(cd misc && rm -f cmplog.pl dllsyms.lst findtext.sh fixpatch.sh fixver.sh)
(cd misc && rm -f allegro-config-qnx.sh zipup.sh zipwin.sh *.bat *.c)
@@ -91,11 +91,11 @@
# jpgalleg addon
(cd addons/jpgalleg && rm -rf examples)
- (cd addons/jpgalleg && rm -f makefile.be makefile.mgw makefile.dj)
+ (cd addons/jpgalleg && rm -f makefile.be makefile.haiku makefile.mgw makefile.dj)
(cd addons/jpgalleg && rm -f makefile.osx makefile.vc fix.bat readme.txt)
(cd addons/jpgalleg/misc && rm -f fixver.sh runner.c)
- (cd addons/jpgalleg/lib && rm -rf beos djgpp macosx mingw32 msvc)
- (cd addons/jpgalleg/obj && rm -rf beos djgpp macosx mingw32 msvc)
+ (cd addons/jpgalleg/lib && rm -rf beos djgpp haiku macosx mingw32 msvc)
+ (cd addons/jpgalleg/obj && rm -rf beos djgpp haiku macosx mingw32 msvc)
# logg addon
(cd addons/logg && rm -f Makefile.mingw play_ogg.c stream_ogg.c fix.bat)
diff -urN allegro-4.3.10/misc/zipup.sh allegro-4.3.10-haiku/misc/zipup.sh
--- allegro-4.3.10/misc/zipup.sh 2008-01-19 04:16:56.000000000 -0800
+++ allegro-4.3.10-haiku/misc/zipup.sh 2008-08-23 20:53:10.000000000 -0700
@@ -126,6 +126,14 @@
make depend UNIX_TOOLS=1 CC=gcc
+# generate dependencies for Haiku
+echo "Generating Haiku dependencies..."
+
+./fix.sh haiku --quick
+
+make depend UNIX_TOOLS=1 CC=gcc
+
+
# generate dependencies for QNX
echo "Generating QNX dependencies..."
@@ -164,7 +172,7 @@
for base in abi ahack allegro const faq help mistakes; do
./_makedoc.exe -ascii docs/txt/$base.txt docs/src/$base._tx
done
-for base in bcc32 beos darwin djgpp linux macosx mingw32 msvc qnx unix watcom; do
+for base in bcc32 beos darwin djgpp haiku linux macosx mingw32 msvc qnx unix watcom; do
./_makedoc.exe -ascii docs/build/$base.txt docs/src/build/$base._tx
done
diff -urN allegro-4.3.10/setup/keyconf.c allegro-4.3.10-haiku/setup/keyconf.c
--- allegro-4.3.10/setup/keyconf.c 2005-04-07 16:37:20.000000000 -0700
+++ allegro-4.3.10-haiku/setup/keyconf.c 2008-08-26 22:40:30.000000000 -0700
@@ -25,8 +25,8 @@
/* The code can't link on platforms that don't use src/misc/pckeys.c (everything
- * but DOS, QNX, BEOS). */
-#if (defined ALLEGRO_DOS) || (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS)
+ * but DOS, QNX, BEOS, HAIKU). */
+#if (defined ALLEGRO_DOS) || (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS) || (defined ALLEGRO_HAIKU)
char *ascii_name[32] =
diff -urN allegro-4.3.10/src/beos/baccel.cpp allegro-4.3.10-haiku/src/beos/baccel.cpp
--- allegro-4.3.10/src/beos/baccel.cpp 2002-09-01 16:18:56.000000000 -0700
+++ allegro-4.3.10-haiku/src/beos/baccel.cpp 2008-08-26 22:44:08.000000000 -0700
@@ -20,7 +20,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bdispsw.cpp allegro-4.3.10-haiku/src/beos/bdispsw.cpp
--- allegro-4.3.10/src/beos/bdispsw.cpp 2002-04-06 07:18:16.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/bdispsw.cpp 2008-08-26 22:44:30.000000000 -0700
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bdwindow.cpp allegro-4.3.10-haiku/src/beos/bdwindow.cpp
--- allegro-4.3.10/src/beos/bdwindow.cpp 2005-10-27 13:57:00.000000000 -0700
+++ allegro-4.3.10-haiku/src/beos/bdwindow.cpp 2008-08-26 22:44:57.000000000 -0700
@@ -21,7 +21,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bgfx.c allegro-4.3.10-haiku/src/beos/bgfx.c
--- allegro-4.3.10/src/beos/bgfx.c 2004-11-26 08:05:12.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/bgfx.c 2008-08-26 22:45:13.000000000 -0700
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
diff -urN allegro-4.3.10/src/beos/bgfxapi.cpp allegro-4.3.10-haiku/src/beos/bgfxapi.cpp
--- allegro-4.3.10/src/beos/bgfxapi.cpp 2002-12-07 13:12:30.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/bgfxapi.cpp 2008-08-26 22:45:26.000000000 -0700
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bgfxdrv.c allegro-4.3.10-haiku/src/beos/bgfxdrv.c
--- allegro-4.3.10/src/beos/bgfxdrv.c 2001-11-06 07:30:48.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/bgfxdrv.c 2008-08-26 22:45:49.000000000 -0700
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BEGIN_GFX_DRIVER_LIST
GFX_DRIVER_BEOS
diff -urN allegro-4.3.10/src/beos/bjoy.c allegro-4.3.10-haiku/src/beos/bjoy.c
--- allegro-4.3.10/src/beos/bjoy.c 2001-11-06 09:16:42.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/bjoy.c 2008-08-26 22:46:06.000000000 -0700
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bjoyapi.cpp allegro-4.3.10-haiku/src/beos/bjoyapi.cpp
--- allegro-4.3.10/src/beos/bjoyapi.cpp 2004-07-04 07:44:50.000000000 -0700
+++ allegro-4.3.10-haiku/src/beos/bjoyapi.cpp 2008-08-26 22:46:32.000000000 -0700
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
static BJoystick *be_joy = NULL;
static int32 num_devices, num_axes, num_hats, num_buttons;
diff -urN allegro-4.3.10/src/beos/bjoydrv.c allegro-4.3.10-haiku/src/beos/bjoydrv.c
--- allegro-4.3.10/src/beos/bjoydrv.c 2001-11-06 07:30:48.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/bjoydrv.c 2008-08-26 22:46:46.000000000 -0700
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BEGIN_JOYSTICK_DRIVER_LIST
JOYSTICK_DRIVER_BEOS
diff -urN allegro-4.3.10/src/beos/bkey.c allegro-4.3.10-haiku/src/beos/bkey.c
--- allegro-4.3.10/src/beos/bkey.c 2004-12-03 12:56:28.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/bkey.c 2008-08-26 22:47:00.000000000 -0700
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
diff -urN allegro-4.3.10/src/beos/bkeyapi.cpp allegro-4.3.10-haiku/src/beos/bkeyapi.cpp
--- allegro-4.3.10/src/beos/bkeyapi.cpp 2005-10-27 13:57:00.000000000 -0700
+++ allegro-4.3.10-haiku/src/beos/bkeyapi.cpp 2008-08-26 22:47:20.000000000 -0700
@@ -22,9 +22,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
#define KEY_ID_PC101 0 // the docs say it should be 0x83ab, but they lie
diff -urN allegro-4.3.10/src/beos/bkeydrv.c allegro-4.3.10-haiku/src/beos/bkeydrv.c
--- allegro-4.3.10/src/beos/bkeydrv.c 2001-11-06 07:30:48.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/bkeydrv.c 2008-08-26 22:47:53.000000000 -0700
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
_DRIVER_INFO _keyboard_driver_list[] =
{
diff -urN allegro-4.3.10/src/beos/bmidi.c allegro-4.3.10-haiku/src/beos/bmidi.c
--- allegro-4.3.10/src/beos/bmidi.c 2006-03-18 07:05:34.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/bmidi.c 2008-08-26 22:48:11.000000000 -0700
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
MIDI_DRIVER midi_beos =
{
diff -urN allegro-4.3.10/src/beos/bmidiapi.cpp allegro-4.3.10-haiku/src/beos/bmidiapi.cpp
--- allegro-4.3.10/src/beos/bmidiapi.cpp 2007-08-09 14:48:38.000000000 -0700
+++ allegro-4.3.10-haiku/src/beos/bmidiapi.cpp 2008-08-26 22:48:29.000000000 -0700
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BMidiSynth *_be_midisynth = NULL;
diff -urN allegro-4.3.10/src/beos/bmididrv.c allegro-4.3.10-haiku/src/beos/bmididrv.c
--- allegro-4.3.10/src/beos/bmididrv.c 2001-11-06 07:30:48.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/bmididrv.c 2008-08-26 22:48:50.000000000 -0700
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BEGIN_MIDI_DRIVER_LIST
MIDI_DRIVER_BEOS
diff -urN allegro-4.3.10/src/beos/bmousapi.cpp allegro-4.3.10-haiku/src/beos/bmousapi.cpp
--- allegro-4.3.10/src/beos/bmousapi.cpp 2005-10-27 13:57:00.000000000 -0700
+++ allegro-4.3.10-haiku/src/beos/bmousapi.cpp 2008-08-26 22:49:09.000000000 -0700
@@ -23,9 +23,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
#define MOUSE_THREAD_NAME "mouse driver"
#define MOUSE_THREAD_PRIORITY 60
diff -urN allegro-4.3.10/src/beos/bmousdrv.c allegro-4.3.10-haiku/src/beos/bmousdrv.c
--- allegro-4.3.10/src/beos/bmousdrv.c 2001-11-06 07:30:48.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/bmousdrv.c 2008-08-26 22:49:25.000000000 -0700
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
diff -urN allegro-4.3.10/src/beos/bmouse.c allegro-4.3.10-haiku/src/beos/bmouse.c
--- allegro-4.3.10/src/beos/bmouse.c 2004-12-04 05:24:16.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/bmouse.c 2008-08-26 22:49:38.000000000 -0700
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
diff -urN allegro-4.3.10/src/beos/boverlay.cpp allegro-4.3.10-haiku/src/beos/boverlay.cpp
--- allegro-4.3.10/src/beos/boverlay.cpp 2002-11-15 03:53:40.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/boverlay.cpp 2008-08-26 22:49:53.000000000 -0700
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bsnd.c allegro-4.3.10-haiku/src/beos/bsnd.c
--- allegro-4.3.10/src/beos/bsnd.c 2006-03-18 07:05:34.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/bsnd.c 2008-08-26 22:50:07.000000000 -0700
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
DIGI_DRIVER digi_beos =
{
diff -urN allegro-4.3.10/src/beos/bsndapi.cpp allegro-4.3.10-haiku/src/beos/bsndapi.cpp
--- allegro-4.3.10/src/beos/bsndapi.cpp 2006-03-18 07:05:34.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/bsndapi.cpp 2008-08-26 22:50:22.000000000 -0700
@@ -20,7 +20,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bsnddrv.c allegro-4.3.10-haiku/src/beos/bsnddrv.c
--- allegro-4.3.10/src/beos/bsnddrv.c 2001-11-06 07:30:48.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/bsnddrv.c 2008-08-26 22:50:52.000000000 -0700
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BEGIN_DIGI_DRIVER_LIST
DIGI_DRIVER_BEOS
diff -urN allegro-4.3.10/src/beos/bsysapi.cpp allegro-4.3.10-haiku/src/beos/bsysapi.cpp
--- allegro-4.3.10/src/beos/bsysapi.cpp 2005-10-27 13:57:00.000000000 -0700
+++ allegro-4.3.10-haiku/src/beos/bsysapi.cpp 2008-08-26 22:51:53.000000000 -0700
@@ -27,9 +27,9 @@
#include <sys/utsname.h>
#endif
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
#define SYS_THREAD_PRIORITY B_NORMAL_PRIORITY
#define SYS_THREAD_NAME "system driver"
diff -urN allegro-4.3.10/src/beos/bsysdrv.c allegro-4.3.10-haiku/src/beos/bsysdrv.c
--- allegro-4.3.10/src/beos/bsysdrv.c 2001-11-06 07:30:48.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/bsysdrv.c 2008-08-26 22:52:11.000000000 -0700
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
_DRIVER_INFO _system_driver_list[] =
{
diff -urN allegro-4.3.10/src/beos/bsystem.c allegro-4.3.10-haiku/src/beos/bsystem.c
--- allegro-4.3.10/src/beos/bsystem.c 2002-12-07 13:10:58.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/bsystem.c 2008-08-26 23:39:03.000000000 -0700
@@ -19,11 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
-
-
+#endif
SYSTEM_DRIVER system_beos = {
SYSTEM_BEOS,
diff -urN allegro-4.3.10/src/beos/btimeapi.cpp allegro-4.3.10-haiku/src/beos/btimeapi.cpp
--- allegro-4.3.10/src/beos/btimeapi.cpp 2004-07-27 04:33:22.000000000 -0700
+++ allegro-4.3.10-haiku/src/beos/btimeapi.cpp 2008-08-26 22:52:45.000000000 -0700
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/btimedrv.c allegro-4.3.10-haiku/src/beos/btimedrv.c
--- allegro-4.3.10/src/beos/btimedrv.c 2001-11-06 07:30:48.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/btimedrv.c 2008-08-26 22:53:00.000000000 -0700
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
_DRIVER_INFO _timer_driver_list[] = {
{TIMER_BEOS, &timer_beos, TRUE},
diff -urN allegro-4.3.10/src/beos/btimer.c allegro-4.3.10-haiku/src/beos/btimer.c
--- allegro-4.3.10/src/beos/btimer.c 2004-08-21 19:57:14.000000000 -0700
+++ allegro-4.3.10-haiku/src/beos/btimer.c 2008-08-26 22:53:13.000000000 -0700
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bwindow.cpp allegro-4.3.10-haiku/src/beos/bwindow.cpp
--- allegro-4.3.10/src/beos/bwindow.cpp 2002-11-15 03:53:40.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/bwindow.cpp 2008-08-26 22:53:28.000000000 -0700
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bwscreen.cpp allegro-4.3.10-haiku/src/beos/bwscreen.cpp
--- allegro-4.3.10/src/beos/bwscreen.cpp 2004-11-26 09:27:02.000000000 -0800
+++ allegro-4.3.10-haiku/src/beos/bwscreen.cpp 2008-08-26 22:53:51.000000000 -0700
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/midi.c allegro-4.3.10-haiku/src/midi.c
--- allegro-4.3.10/src/midi.c 2007-04-12 09:19:54.000000000 -0700
+++ allegro-4.3.10-haiku/src/midi.c 2008-08-26 22:56:43.000000000 -0700
@@ -1122,7 +1122,7 @@
running_status = 0;
while (p < end) { /* work through data stream */
-#ifdef ALLEGRO_BEOS
+#if defined ALLEGRO_BEOS || defined ALLEGRO_HAIKU
/* Is there a bug in this routine, or in gcc under BeOS/x86? --PW */
{ int i; for (i=1; i; i--); }
#endif
diff -urN allegro-4.3.10/tools/dat2c.c allegro-4.3.10-haiku/tools/dat2c.c
--- allegro-4.3.10/tools/dat2c.c 2005-04-28 02:53:38.000000000 -0700
+++ allegro-4.3.10-haiku/tools/dat2c.c 2008-08-23 20:44:06.000000000 -0700
@@ -342,7 +342,7 @@
}
if (dat2c->lformat == lineformat_default)
-#if (defined ALLEGRO_UNIX || defined ALLEGRO_QNX || defined ALLEGRO_BEOS || defined ALLEGRO_MACOSX)
+#if (defined ALLEGRO_UNIX || defined ALLEGRO_QNX || defined ALLEGRO_BEOS || defined ALLEGRO_HAIKU || defined ALLEGRO_MACOSX)
dat2c->lformat = lineformat_unix;
#elif (defined ALLEGRO_WINDOWS || defined ALLEGRO_DOS)
dat2c->lformat = lineformat_dos;
diff -urN allegro-4.3.10/tools/datedit.c allegro-4.3.10-haiku/tools/datedit.c
--- allegro-4.3.10/tools/datedit.c 2007-10-08 09:23:36.000000000 -0700
+++ allegro-4.3.10-haiku/tools/datedit.c 2008-08-23 20:42:07.000000000 -0700
@@ -121,6 +121,8 @@
#include "obj/dmc/plugins.h"
#elif defined ALLEGRO_BEOS
#include "obj/beos/plugins.h"
+ #elif defined ALLEGRO_HAIKU
+ #include "obj/beos/plugins.h"
#elif defined ALLEGRO_BCC32
#include "obj/bcc32/plugins.h"
#elif defined ALLEGRO_MPW

View File

@@ -1,325 +0,0 @@
diff -urN allegro-4.3.10/addons/allegrogl/fix.sh allegro-4.3.10-haiku-fixes/addons/allegrogl/fix.sh
--- allegro-4.3.10/addons/allegrogl/fix.sh 2008-01-01 03:20:16.000000000 -0800
+++ allegro-4.3.10-haiku-fixes/addons/allegrogl/fix.sh 2008-08-31 09:12:54.000000000 -0700
@@ -18,7 +18,7 @@
echo "Compilation target adjustment."
echo " Usage: fix <platform> [--dtou|--utod|--quick]"
echo ""
-echo " <platform> is one of: djgpp, mingw32, unix, macosx"
+echo " <platform> is one of: djgpp, haiku, mingw32, unix, macosx"
echo ""
echo " --dtou converts from DOS/Win32 format to Unix"
echo " --utod converts from Unix format to DOS/Win32"
@@ -79,6 +79,7 @@
case "$1" in
djgpp ) proc_fix "DJGPP" "makefile.dj";;
+ haiku ) proc_fix "Haiku" "makefile.gen";;
mingw ) proc_fix "Mingw32" "makefile.mgw";;
mingw32 ) proc_fix "Mingw32" "makefile.mgw";;
# used only by allegro's zipup.sh in packaging process
diff -urN allegro-4.3.10/addons/loadpng/Makefile.be allegro-4.3.10-haiku-fixes/addons/loadpng/Makefile.be
--- allegro-4.3.10/addons/loadpng/Makefile.be 1969-12-31 16:00:00.000000000 -0800
+++ allegro-4.3.10-haiku-fixes/addons/loadpng/Makefile.be 2008-08-31 09:01:30.000000000 -0700
@@ -0,0 +1,57 @@
+## Aux -*- Makefile -*- for BeOS/Haiku
+
+prefix := `/boot/common/bin/allegro-config --prefix`
+libdir := $(prefix)/lib
+includedir := $(prefix)/include
+DESTDIR :=
+
+EXAMPLECFLAGS := -Wno-deprecated-declarations -I/boot/common/include
+EXAMPLELIBS := -lpng -lz `/boot/common/bin/allegro-config --libs --addon` -L/boot/common/lib
+
+
+#--------------------------------------------------
+# Note: this is for gcc
+# And I don't really think you should use it, but it's up to you
+.PHONY: shared
+
+SHAREDLIB := libloadpng-$(VERSION).so
+
+shared: $(SHAREDLIB)
+
+$(SHAREDLIB): loadpng.c savepng.c regpng.c
+ $(CC) -o $(SHAREDLIB) $(CFLAGS) -fPIC -shared loadpng.c savepng.c regpng.c
+
+#--------------------------------------------------
+.PHONY: install install-headers install-shared
+
+install: $(LIB) install-headers
+ install -d -m 755 $(DESTDIR)$(libdir)
+ install -m 644 $(LIB) $(DESTDIR)$(libdir)
+ @echo -
+ @echo loadpng is now installed.
+
+install-shared: $(SHAREDLIB) install-headers
+ install -d -m 755 $(DESTDIR)$(libdir)
+ install -m 755 $(SHAREDLIB) $(DESTDIR)$(libdir)
+
+install-headers:
+ install -d -m 755 $(DESTDIR)$(includedir)
+ install -m 644 loadpng.h $(DESTDIR)$(includedir)
+
+#--------------------------------------------------
+.PHONY: uninstall
+
+uninstall:
+ -rm -f $(DESTDIR)$(includedir)/loadpng.h
+ -rm -f $(DESTDIR)$(libdir)/$(LIB)
+ @echo -
+ @echo loadpng is now uninstalled.
+
+#--------------------------------------------------
+.PHONY: clean veryclean
+
+clean:
+ - rm -f loadpng.o savepng.o regpng.o $(LIB) $(SHAREDLIB)
+
+veryclean: clean
+ - rm -f $(EXAMPLES) examples/saved.png
diff -urN allegro-4.3.10/addons/loadpng/fix.sh allegro-4.3.10-haiku-fixes/addons/loadpng/fix.sh
--- allegro-4.3.10/addons/loadpng/fix.sh 2007-12-27 17:05:30.000000000 -0800
+++ allegro-4.3.10-haiku-fixes/addons/loadpng/fix.sh 2008-08-31 09:04:07.000000000 -0700
@@ -8,7 +8,7 @@
echo
echo "Usage: $0 <platform> [--quick|--dtou|--utod]"
echo
- echo "Where platform is one of: djgpp, mingw32, unix"
+ echo "Where platform is one of: beos, djgpp, haiku, mingw32, unix"
echo "The --quick parameter turns off text file conversion, --dtou converts from"
echo "DOS/Win32 format to Unix, --utod converts from Unix to DOS/Win32 format."
echo "If no parameter is specified --quick is assumed."
@@ -95,7 +95,9 @@
fi
case "$1" in
+ "beos" ) proc_fix "BeOS" "Makefile.be";;
"djgpp" ) proc_fix "DOS (djgpp)" "Makefile.dj";;
+ "haiku" ) proc_fix "Haiku" "Makefile.be";;
"mingw" ) proc_fix "Windows (MinGW)" "Makefile.mgw";;
"mingw32" ) proc_fix "Windows (MinGW)" "Makefile.mgw";;
"unix" ) proc_fix "Unix" "Makefile.unx";;
diff -urN allegro-4.3.10/addons/logg/Makefile.be allegro-4.3.10-haiku-fixes/addons/logg/Makefile.be
--- allegro-4.3.10/addons/logg/Makefile.be 1969-12-31 16:00:00.000000000 -0800
+++ allegro-4.3.10-haiku-fixes/addons/logg/Makefile.be 2008-08-31 08:57:22.000000000 -0700
@@ -0,0 +1,43 @@
+PREFIX=`/boot/common/bin/allegro-config --prefix`
+CC=gcc
+FLAGS=-O2 -g0 `/boot/common/bin/allegro-config --cflags --addon` -I/boot/common/include
+LFLAGS=-L. -L/boot/common/lib -llogg -logg -lvorbis -lvorbisfile `/boot/common/bin/allegro-config --libs --addon`
+
+all: lib play_ogg stream_ogg
+
+lib: liblogg.a
+
+liblogg.a: logg.o
+ ar rc $@ $^
+ ranlib $@
+
+logg.o: logg.c logg.h
+ $(CC) $(FLAGS) -c logg.c
+
+play_ogg: play_ogg.c liblogg.a
+ gcc $(FLAGS) play_ogg.c -o play_ogg $(LFLAGS)
+
+stream_ogg: stream_ogg.c liblogg.a
+ gcc $(FLAGS) stream_ogg.c -o stream_ogg $(LFLAGS)
+
+clean:
+ rm -f logg.o
+
+veryclean: clean
+ rm -f liblogg.a
+ rm -f play_ogg
+ rm -f stream_ogg
+
+install:
+ cp -f logg.h $(DESTDIR)$(PREFIX)/include
+ cp -f liblogg.a $(DESTDIR)$(PREFIX)/lib
+ @echo -
+ @echo logg is now installed.
+
+uninstall:
+ rm -f $(DESTDIR)$(PREFIX)/include/logg.h
+ rm -f $(DESTDIR)$(PREFIX)/lib/liblogg.a
+ @echo -
+ @echo logg is now uninstalled.
+
+examples: play_ogg stream_ogg
diff -urN allegro-4.3.10/addons/logg/fix.sh allegro-4.3.10-haiku-fixes/addons/logg/fix.sh
--- allegro-4.3.10/addons/logg/fix.sh 2007-12-31 11:24:16.000000000 -0800
+++ allegro-4.3.10-haiku-fixes/addons/logg/fix.sh 2008-08-31 09:06:13.000000000 -0700
@@ -8,7 +8,7 @@
echo
echo "Usage: $0 <platform> [--quick|--dtou|--utod]"
echo
- echo "Where platform is one of: mingw32, unix"
+ echo "Where platform is one of: beos, haiku, mingw32, unix"
echo "The --quick parameter turns off text file conversion, --dtou converts from"
echo "DOS/Win32 format to Unix, --utod converts from Unix to DOS/Win32 format."
echo "If no parameter is specified --quick is assumed."
@@ -94,6 +94,8 @@
fi
case "$1" in
+ "beos" ) proc_fix "BeOS" "Makefile.be";;
+ "haiku" ) proc_fix "Haiku" "Makefile.be";;
"mingw" ) proc_fix "Windows (MinGW)" "Makefile.migw";;
"mingw32" ) proc_fix "Windows (MinGW)" "Makefile.migw";;
"unix" ) proc_fix "Unix" "Makefile.unix";;
diff -urN allegro-4.3.10/fix.sh allegro-4.3.10-haiku-fixes/fix.sh
--- allegro-4.3.10/fix.sh 2008-01-01 13:59:18.000000000 -0800
+++ allegro-4.3.10-haiku-fixes/fix.sh 2008-08-26 22:13:03.000000000 -0700
@@ -9,7 +9,7 @@
echo
echo "Usage: $0 <platform> [--quick|--dtou|--utod|--utom|--mtou]"
echo
- echo "Where platform is one of: bcc32, beos, djgpp, mingw, qnx, unix"
+ echo "Where platform is one of: bcc32, beos, djgpp, haiku, mingw, qnx, unix"
echo "mac, macosx, macosx-universal and watcom."
echo "The --quick parameter turns off text file conversion, --dtou converts from"
echo "DOS/Win32 format to Unix, --utod converts from Unix to DOS/Win32 format,"
@@ -140,6 +140,7 @@
"bcc32" ) proc_fix "Windows (BCC32)" "makefile.bcc" "ALLEGRO_BCC32";;
"beos" ) proc_fix "BeOS" "makefile.be" "ALLEGRO_BEOS";;
"djgpp" ) proc_fix "DOS (djgpp)" "makefile.dj" "ALLEGRO_DJGPP";;
+ "haiku" ) proc_fix "Haiku" "makefile.be" "ALLEGRO_HAIKU";;
"mingw" ) proc_fix "Windows (MinGW)" "makefile.mgw" "ALLEGRO_MINGW32";;
"mingw32" ) proc_fix "Windows (MinGW)" "makefile.mgw" "ALLEGRO_MINGW32";;
# The 'msvc' target is undocumented in the help message, but is used
diff -urN allegro-4.3.10/include/allegro/platform/alplatf.h allegro-4.3.10-haiku-fixes/include/allegro/platform/alplatf.h
--- allegro-4.3.10/include/allegro/platform/alplatf.h 2008-01-19 16:00:54.000000000 -0800
+++ allegro-4.3.10-haiku-fixes/include/allegro/platform/alplatf.h 2008-08-23 17:23:59.000000000 -0700
@@ -1,2 +1,2 @@
/* generated by fix.sh */
-#define ALLEGRO_UNIX
+#define ALLEGRO_BEOS
diff -urN allegro-4.3.10/makefile.all allegro-4.3.10-haiku-fixes/makefile.all
--- allegro-4.3.10/makefile.all 2008-01-14 03:55:28.000000000 -0800
+++ allegro-4.3.10-haiku-fixes/makefile.all 2008-08-23 17:45:06.000000000 -0700
@@ -8,7 +8,7 @@
# DEBUGMODE=2 selects a build intended to debug Allegro itself.
# PROFILEMODE=1 selects a profiling build.
# WARNMODE=1 selects strict compiler warnings.
-# STATICLINK=1 use static linking (MinGW32, MSVC, BeOS).
+# STATICLINK=1 use static linking (MinGW32, MSVC, BeOS, Haiku).
# STATICRUNTIME=1 link to a static C runtime library (/MT) (MSVC)
# TARGET_ARCH_COMPAT optimize for the given processor while preserving backwards
# compatibility with older processors (GCC-based platforms).
@@ -132,7 +132,7 @@
# XXX this is duplicated in makefile.in
DOCBASEFILES = ahack changes faq mistakes help thanks allegro const abi api packfile \
readme makedoc datafile grabber dat dat2c dat2s license addons targets
-DOCBUILDFILES = bcc32 beos darwin djgpp dmc linux macosx mingw32 msvc qnx unix watcom
+DOCBUILDFILES = bcc32 beos darwin djgpp dmc haiku linux macosx mingw32 msvc qnx unix watcom
DOCTXTBUILDFILES = $(addprefix docs/build/,$(addsuffix .txt,$(DOCBUILDFILES)))
DOCS = $(addprefix docs/txt/,$(addsuffix .txt,$(filter-out changes thanks readme, $(DOCBASEFILES))))
diff -urN allegro-4.3.10/misc/mkunixdists.sh allegro-4.3.10-haiku-fixes/misc/mkunixdists.sh
--- allegro-4.3.10/misc/mkunixdists.sh 2008-01-10 13:45:48.000000000 -0800
+++ allegro-4.3.10-haiku-fixes/misc/mkunixdists.sh 2008-08-23 20:56:44.000000000 -0700
@@ -73,9 +73,9 @@
# Hack'n'slash
echo "Stripping to form end-user distribution"
(cd $dir/$basename && {
- (cd src && rm -rf beos qnx dos mac ppc win)
- (cd obj && rm -rf bcc32 beos qnx djgpp mingw32 msvc watcom)
- (cd lib && rm -rf bcc32 beos qnx djgpp mingw32 msvc watcom)
+ (cd src && rm -rf beos haiku qnx dos mac ppc win)
+ (cd obj && rm -rf bcc32 beos haiku qnx djgpp mingw32 msvc watcom)
+ (cd lib && rm -rf bcc32 beos haiku qnx djgpp mingw32 msvc watcom)
(cd include && rm -f bealleg.h qnxalleg.h macalleg.h winalleg.h)
(cd misc && rm -f cmplog.pl dllsyms.lst findtext.sh fixpatch.sh fixver.sh)
(cd misc && rm -f allegro-config-qnx.sh zipup.sh zipwin.sh *.bat *.c)
@@ -91,11 +91,11 @@
# jpgalleg addon
(cd addons/jpgalleg && rm -rf examples)
- (cd addons/jpgalleg && rm -f makefile.be makefile.mgw makefile.dj)
+ (cd addons/jpgalleg && rm -f makefile.be makefile.haiku makefile.mgw makefile.dj)
(cd addons/jpgalleg && rm -f makefile.osx makefile.vc fix.bat readme.txt)
(cd addons/jpgalleg/misc && rm -f fixver.sh runner.c)
- (cd addons/jpgalleg/lib && rm -rf beos djgpp macosx mingw32 msvc)
- (cd addons/jpgalleg/obj && rm -rf beos djgpp macosx mingw32 msvc)
+ (cd addons/jpgalleg/lib && rm -rf beos djgpp haiku macosx mingw32 msvc)
+ (cd addons/jpgalleg/obj && rm -rf beos djgpp haiku macosx mingw32 msvc)
# logg addon
(cd addons/logg && rm -f Makefile.mingw play_ogg.c stream_ogg.c fix.bat)
diff -urN allegro-4.3.10/misc/zipup.sh allegro-4.3.10-haiku-fixes/misc/zipup.sh
--- allegro-4.3.10/misc/zipup.sh 2008-01-19 04:16:56.000000000 -0800
+++ allegro-4.3.10-haiku-fixes/misc/zipup.sh 2008-08-23 20:53:10.000000000 -0700
@@ -126,6 +126,14 @@
make depend UNIX_TOOLS=1 CC=gcc
+# generate dependencies for Haiku
+echo "Generating Haiku dependencies..."
+
+./fix.sh haiku --quick
+
+make depend UNIX_TOOLS=1 CC=gcc
+
+
# generate dependencies for QNX
echo "Generating QNX dependencies..."
@@ -164,7 +172,7 @@
for base in abi ahack allegro const faq help mistakes; do
./_makedoc.exe -ascii docs/txt/$base.txt docs/src/$base._tx
done
-for base in bcc32 beos darwin djgpp linux macosx mingw32 msvc qnx unix watcom; do
+for base in bcc32 beos darwin djgpp haiku linux macosx mingw32 msvc qnx unix watcom; do
./_makedoc.exe -ascii docs/build/$base.txt docs/src/build/$base._tx
done
diff -urN allegro-4.3.10/src/i386/asmdefs.inc allegro-4.3.10-haiku-fixes/src/i386/asmdefs.inc
--- allegro-4.3.10/src/i386/asmdefs.inc 2007-06-15 19:52:28.000000000 -0700
+++ allegro-4.3.10-haiku-fixes/src/i386/asmdefs.inc 2008-08-31 09:35:34.000000000 -0700
@@ -31,6 +31,8 @@
#include "obj/msvc/asmdef.inc"
#elif defined ALLEGRO_WATCOM
#include "obj/watcom/asmdef.inc"
+#elif defined ALLEGRO_HAIKU
+ #include "obj/beos/asmdef.inc"
#elif defined ALLEGRO_BEOS
#include "obj/beos/asmdef.inc"
#elif defined ALLEGRO_QNX
diff -urN allegro-4.3.10/tools/dat2c.c allegro-4.3.10-haiku-fixes/tools/dat2c.c
--- allegro-4.3.10/tools/dat2c.c 2005-04-28 02:53:38.000000000 -0700
+++ allegro-4.3.10-haiku-fixes/tools/dat2c.c 2008-08-23 20:44:06.000000000 -0700
@@ -342,7 +342,7 @@
}
if (dat2c->lformat == lineformat_default)
-#if (defined ALLEGRO_UNIX || defined ALLEGRO_QNX || defined ALLEGRO_BEOS || defined ALLEGRO_MACOSX)
+#if (defined ALLEGRO_UNIX || defined ALLEGRO_QNX || defined ALLEGRO_BEOS || defined ALLEGRO_HAIKU || defined ALLEGRO_MACOSX)
dat2c->lformat = lineformat_unix;
#elif (defined ALLEGRO_WINDOWS || defined ALLEGRO_DOS)
dat2c->lformat = lineformat_dos;
diff -urN allegro-4.3.10/tools/datedit.c allegro-4.3.10-haiku-fixes/tools/datedit.c
--- allegro-4.3.10/tools/datedit.c 2007-10-08 09:23:36.000000000 -0700
+++ allegro-4.3.10-haiku-fixes/tools/datedit.c 2008-08-23 20:42:07.000000000 -0700
@@ -121,6 +121,8 @@
#include "obj/dmc/plugins.h"
#elif defined ALLEGRO_BEOS
#include "obj/beos/plugins.h"
+ #elif defined ALLEGRO_HAIKU
+ #include "obj/beos/plugins.h"
#elif defined ALLEGRO_BCC32
#include "obj/bcc32/plugins.h"
#elif defined ALLEGRO_MPW
diff -urN allegro-4.3.10/tools/grabber.c allegro-4.3.10-haiku-fixes/tools/grabber.c
--- allegro-4.3.10/tools/grabber.c 2006-07-24 06:09:26.000000000 -0700
+++ allegro-4.3.10-haiku-fixes/tools/grabber.c 2008-08-23 20:38:47.000000000 -0700
@@ -3132,6 +3132,7 @@
case OSTYPE_QNX: s = "QNX"; break;
case OSTYPE_UNIX: s = "Unix"; break;
case OSTYPE_BEOS: s = "BeOS"; break;
+ case OSTYPE_HAIKU: s = "Haiku"; break;
case OSTYPE_MACOS: s = "MacOS"; break;
case OSTYPE_MACOSX: s = "MacOS X"; break;
default: s = "Unknown"; break;

View File

@@ -1,792 +0,0 @@
diff -urN allegro-4.3.10/addons/allegrogl/fix.sh allegro-4.3.10-haiku/addons/allegrogl/fix.sh
--- allegro-4.3.10/addons/allegrogl/fix.sh 2008-01-01 11:20:16.000000000 +0000
+++ allegro-4.3.10-haiku/addons/allegrogl/fix.sh 2008-09-13 20:09:02.000000000 +0000
@@ -18,7 +18,7 @@
echo "Compilation target adjustment."
echo " Usage: fix <platform> [--dtou|--utod|--quick]"
echo ""
-echo " <platform> is one of: djgpp, mingw32, unix, macosx"
+echo " <platform> is one of: djgpp, haiku, mingw32, unix, macosx"
echo ""
echo " --dtou converts from DOS/Win32 format to Unix"
echo " --utod converts from Unix format to DOS/Win32"
@@ -79,6 +79,7 @@
case "$1" in
djgpp ) proc_fix "DJGPP" "makefile.dj";;
+ haiku ) proc_fix "Haiku" "makefile.gen";;
mingw ) proc_fix "Mingw32" "makefile.mgw";;
mingw32 ) proc_fix "Mingw32" "makefile.mgw";;
# used only by allegro's zipup.sh in packaging process
diff -urN allegro-4.3.10/addons/jpgalleg/fix.sh allegro-4.3.10-haiku/addons/jpgalleg/fix.sh
--- allegro-4.3.10/addons/jpgalleg/fix.sh 2008-01-04 19:55:22.000000000 +0000
+++ allegro-4.3.10-haiku/addons/jpgalleg/fix.sh 2008-09-13 18:13:30.000000000 +0000
@@ -94,6 +94,7 @@
"mingw" ) proc_fix "MinGW32" "makefile.mgw";;
"msvc" ) proc_fix "MSVC" "makefile.vc";;
"beos" ) proc_fix "BeOS" "makefile.be";;
+ "haiku" ) proc_fix "Haiku" "makefile.be";;
"unix" ) proc_fix "Unix" "makefile.uni";;
"macosx" ) proc_fix "MacOS X" "makefile.osx";;
"help" ) proc_help;;
diff -urN allegro-4.3.10/addons/loadpng/fix.sh allegro-4.3.10-haiku/addons/loadpng/fix.sh
--- allegro-4.3.10/addons/loadpng/fix.sh 2007-12-28 01:05:30.000000000 +0000
+++ allegro-4.3.10-haiku/addons/loadpng/fix.sh 2008-09-13 20:09:10.000000000 +0000
@@ -8,7 +8,7 @@
echo
echo "Usage: $0 <platform> [--quick|--dtou|--utod]"
echo
- echo "Where platform is one of: djgpp, mingw32, unix"
+ echo "Where platform is one of: beos, djgpp, haiku, mingw32, unix"
echo "The --quick parameter turns off text file conversion, --dtou converts from"
echo "DOS/Win32 format to Unix, --utod converts from Unix to DOS/Win32 format."
echo "If no parameter is specified --quick is assumed."
@@ -95,7 +95,9 @@
fi
case "$1" in
+ "beos" ) proc_fix "BeOS" "Makefile.be";;
"djgpp" ) proc_fix "DOS (djgpp)" "Makefile.dj";;
+ "haiku" ) proc_fix "Haiku" "Makefile.be";;
"mingw" ) proc_fix "Windows (MinGW)" "Makefile.mgw";;
"mingw32" ) proc_fix "Windows (MinGW)" "Makefile.mgw";;
"unix" ) proc_fix "Unix" "Makefile.unx";;
diff -urN allegro-4.3.10/addons/logg/fix.sh allegro-4.3.10-haiku/addons/logg/fix.sh
--- allegro-4.3.10/addons/logg/fix.sh 2007-12-31 19:24:16.000000000 +0000
+++ allegro-4.3.10-haiku/addons/logg/fix.sh 2008-09-13 20:11:46.000000000 +0000
@@ -8,7 +8,7 @@
echo
echo "Usage: $0 <platform> [--quick|--dtou|--utod]"
echo
- echo "Where platform is one of: mingw32, unix"
+ echo "Where platform is one of: beos, haiku, mingw32, unix"
echo "The --quick parameter turns off text file conversion, --dtou converts from"
echo "DOS/Win32 format to Unix, --utod converts from Unix to DOS/Win32 format."
echo "If no parameter is specified --quick is assumed."
@@ -94,6 +94,8 @@
fi
case "$1" in
+ "beos" ) proc_fix "BeOS" "Makefile.be";;
+ "haiku" ) proc_fix "Haiku" "Makefile.be";;
"mingw" ) proc_fix "Windows (MinGW)" "Makefile.migw";;
"mingw32" ) proc_fix "Windows (MinGW)" "Makefile.migw";;
"unix" ) proc_fix "Unix" "Makefile.unix";;
diff -urN allegro-4.3.10/fix.sh allegro-4.3.10-haiku/fix.sh
--- allegro-4.3.10/fix.sh 2008-01-01 21:59:18.000000000 +0000
+++ allegro-4.3.10-haiku/fix.sh 2008-09-13 20:11:46.000000000 +0000
@@ -9,7 +9,7 @@
echo
echo "Usage: $0 <platform> [--quick|--dtou|--utod|--utom|--mtou]"
echo
- echo "Where platform is one of: bcc32, beos, djgpp, mingw, qnx, unix"
+ echo "Where platform is one of: bcc32, beos, djgpp, haiku, mingw, qnx, unix"
echo "mac, macosx, macosx-universal and watcom."
echo "The --quick parameter turns off text file conversion, --dtou converts from"
echo "DOS/Win32 format to Unix, --utod converts from Unix to DOS/Win32 format,"
@@ -140,6 +140,7 @@
"bcc32" ) proc_fix "Windows (BCC32)" "makefile.bcc" "ALLEGRO_BCC32";;
"beos" ) proc_fix "BeOS" "makefile.be" "ALLEGRO_BEOS";;
"djgpp" ) proc_fix "DOS (djgpp)" "makefile.dj" "ALLEGRO_DJGPP";;
+ "haiku" ) proc_fix "Haiku" "makefile.be" "ALLEGRO_HAIKU";;
"mingw" ) proc_fix "Windows (MinGW)" "makefile.mgw" "ALLEGRO_MINGW32";;
"mingw32" ) proc_fix "Windows (MinGW)" "makefile.mgw" "ALLEGRO_MINGW32";;
# The 'msvc' target is undocumented in the help message, but is used
diff -urN allegro-4.3.10/include/allegro/internal/aintern.h allegro-4.3.10-haiku/include/allegro/internal/aintern.h
--- allegro-4.3.10/include/allegro/internal/aintern.h 2008-01-05 22:37:14.000000000 +0000
+++ allegro-4.3.10-haiku/include/allegro/internal/aintern.h 2008-09-13 20:11:46.000000000 +0000
@@ -189,7 +189,7 @@
#if (defined ALLEGRO_DOS) || (defined ALLEGRO_DJGPP) || (defined ALLEGRO_WATCOM) || \
- (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS)
+ (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS) || (defined ALLEGRO_HAIKU)
AL_ARRAY(char *, _pckeys_names);
diff -urN allegro-4.3.10/include/allegro/internal/alconfig.h allegro-4.3.10-haiku/include/allegro/internal/alconfig.h
--- allegro-4.3.10/include/allegro/internal/alconfig.h 2007-06-24 08:13:22.000000000 +0000
+++ allegro-4.3.10-haiku/include/allegro/internal/alconfig.h 2008-09-13 20:11:46.000000000 +0000
@@ -48,6 +48,8 @@
#include "allegro/platform/albcc32.h"
#elif defined ALLEGRO_MSVC
#include "allegro/platform/almsvc.h"
+ #elif defined ALLEGRO_HAIKU
+ #include "allegro/platform/albecfg.h"
#elif defined ALLEGRO_BEOS
#include "allegro/platform/albecfg.h"
#elif defined ALLEGRO_MPW
diff -urN allegro-4.3.10/include/allegro/platform/albecfg.h allegro-4.3.10-haiku/include/allegro/platform/albecfg.h
--- allegro-4.3.10/include/allegro/platform/albecfg.h 2007-06-16 02:52:28.000000000 +0000
+++ allegro-4.3.10-haiku/include/allegro/platform/albecfg.h 2008-09-13 20:11:46.000000000 +0000
@@ -31,7 +31,13 @@
#define ALLEGRO_HAVE_SYS_TIME_H 1
/* describe this platform */
-#define ALLEGRO_PLATFORM_STR "BeOS"
+#if defined __BEOS__ && !defined __HAIKU__
+ #define ALLEGRO_PLATFORM_STR "BeOS"
+#endif
+#if defined __HAIKU__
+ #define ALLEGRO_PLATFORM_STR "Haiku"
+ #define ALLEGRO_HAVE_LIBPTHREAD 1
+#endif
#define ALLEGRO_LITTLE_ENDIAN
#define ALLEGRO_CONSOLE_OK
#define ALLEGRO_USE_CONSTRUCTOR
diff -urN allegro-4.3.10/include/allegro/platform/albeos.h allegro-4.3.10-haiku/include/allegro/platform/albeos.h
--- allegro-4.3.10/include/allegro/platform/albeos.h 2002-10-01 18:05:12.000000000 +0000
+++ allegro-4.3.10-haiku/include/allegro/platform/albeos.h 2008-09-13 20:11:46.000000000 +0000
@@ -74,3 +74,7 @@
#define JOYSTICK_DRIVER_BEOS \
{ JOYSTICK_BEOS, &joystick_beos, TRUE },
+#if defined __HAIKU__
+#define TIMERDRV_UNIX_PTHREADS AL_ID('P','T','H','R')
+#endif
+
diff -urN allegro-4.3.10/include/allegro/platform/alunixac.hin allegro-4.3.10-haiku/include/allegro/platform/alunixac.hin
--- allegro-4.3.10/include/allegro/platform/alunixac.hin 2007-07-15 05:28:14.000000000 +0000
+++ allegro-4.3.10-haiku/include/allegro/platform/alunixac.hin 2008-09-13 20:11:46.000000000 +0000
@@ -68,7 +68,7 @@
#undef ALLEGRO_DARWIN
/* Define if you have the pthread library. */
-#undef ALLEGRO_HAVE_LIBPTHREAD
+/* #undef ALLEGRO_HAVE_LIBPTHREAD */
/* Define if constructor attribute is supported. */
#undef ALLEGRO_USE_CONSTRUCTOR
@@ -159,7 +159,7 @@
/* Define as the return type of signal handlers (`int' or `void'). */
/* TODO: rename this */
-#undef RETSIGTYPE
+/* #undef RETSIGTYPE */
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
diff -urN allegro-4.3.10/include/allegro/system.h allegro-4.3.10-haiku/include/allegro/system.h
--- allegro-4.3.10/include/allegro/system.h 2008-01-02 10:39:24.000000000 +0000
+++ allegro-4.3.10-haiku/include/allegro/system.h 2008-09-13 20:11:46.000000000 +0000
@@ -61,6 +61,7 @@
#define OSTYPE_QNX AL_ID('Q','N','X',' ')
#define OSTYPE_UNIX AL_ID('U','N','I','X')
#define OSTYPE_BEOS AL_ID('B','E','O','S')
+#define OSTYPE_HAIKU AL_ID('H','A','I','K')
#define OSTYPE_MACOS AL_ID('M','A','C',' ')
#define OSTYPE_MACOSX AL_ID('M','A','C','X')
diff -urN allegro-4.3.10/makefile.all allegro-4.3.10-haiku/makefile.all
--- allegro-4.3.10/makefile.all 2008-01-14 11:55:28.000000000 +0000
+++ allegro-4.3.10-haiku/makefile.all 2008-09-13 20:11:46.000000000 +0000
@@ -8,7 +8,7 @@
# DEBUGMODE=2 selects a build intended to debug Allegro itself.
# PROFILEMODE=1 selects a profiling build.
# WARNMODE=1 selects strict compiler warnings.
-# STATICLINK=1 use static linking (MinGW32, MSVC, BeOS).
+# STATICLINK=1 use static linking (MinGW32, MSVC, BeOS, Haiku).
# STATICRUNTIME=1 link to a static C runtime library (/MT) (MSVC)
# TARGET_ARCH_COMPAT optimize for the given processor while preserving backwards
# compatibility with older processors (GCC-based platforms).
@@ -132,7 +132,7 @@
# XXX this is duplicated in makefile.in
DOCBASEFILES = ahack changes faq mistakes help thanks allegro const abi api packfile \
readme makedoc datafile grabber dat dat2c dat2s license addons targets
-DOCBUILDFILES = bcc32 beos darwin djgpp dmc linux macosx mingw32 msvc qnx unix watcom
+DOCBUILDFILES = bcc32 beos darwin djgpp dmc haiku linux macosx mingw32 msvc qnx unix watcom
DOCTXTBUILDFILES = $(addprefix docs/build/,$(addsuffix .txt,$(DOCBUILDFILES)))
DOCS = $(addprefix docs/txt/,$(addsuffix .txt,$(filter-out changes thanks readme, $(DOCBASEFILES))))
diff -urN allegro-4.3.10/makefile.be allegro-4.3.10-haiku/makefile.be
--- allegro-4.3.10/makefile.be 2008-01-11 11:30:16.000000000 +0000
+++ allegro-4.3.10-haiku/makefile.be 2008-09-13 20:11:46.000000000 +0000
@@ -10,7 +10,15 @@
# -------- define some variables that the primary makefile will use --------
+
+ifeq ($(OS),BeOS)
PLATFORM = BeOS
+endif
+
+ifeq ($(OS),Haiku)
+PLATFORM = Haiku
+endif
+
CC = gcc
EXE =
OBJ = .o
@@ -123,7 +131,13 @@
OBJECT_LIST = $(COMMON_OBJECTS) $(MY_OBJECTS) $(basename $(notdir $(ALLEGRO_SRC_BEOS_FILES)))
+ifeq ($(OS),BeOS)
LIBRARIES = -lbe -lgame -ldevice -lmidi -lmedia -lnet
+endif
+
+ifeq ($(OS),Haiku)
+LIBRARIES = -lbe -lgame -ldevice -lmidi -lmedia -lnetwork
+endif
PROGRAMS = bfixicon
@@ -167,7 +181,14 @@
sed -e "s/@LIBS@/$(LIBRARIES)/" temp2 > temp
sed -e "s/include/headers/" temp >temp2
sed -e "s/ -l\$${lib_type}_unsharable//" temp2 >temp
+
+ifeq ($(OS),BeOS)
sed -e "s/libdirs=-L\$${exec_prefix}\/lib/libdirs=\"-L\$${exec_prefix}\/lib\/x86 -L\/boot\/home\/config\/lib\"/" temp >/bin/allegro-config
+endif
+ifeq ($(OS),Haiku)
+ sed -e "s/libdirs=-L\$${exec_prefix}\/lib/libdirs=\"-L\$${exec_prefix}\/lib\/x86 -L\/boot\/common\/lib\"/" temp >/bin/allegro-config
+endif
+
rm -f temp temp2
chmod a+x /bin/allegro-config
diff -urN allegro-4.3.10/misc/mkunixdists.sh allegro-4.3.10-haiku/misc/mkunixdists.sh
--- allegro-4.3.10/misc/mkunixdists.sh 2008-01-10 21:45:48.000000000 +0000
+++ allegro-4.3.10-haiku/misc/mkunixdists.sh 2008-09-13 20:11:46.000000000 +0000
@@ -73,9 +73,9 @@
# Hack'n'slash
echo "Stripping to form end-user distribution"
(cd $dir/$basename && {
- (cd src && rm -rf beos qnx dos mac ppc win)
- (cd obj && rm -rf bcc32 beos qnx djgpp mingw32 msvc watcom)
- (cd lib && rm -rf bcc32 beos qnx djgpp mingw32 msvc watcom)
+ (cd src && rm -rf beos haiku qnx dos mac ppc win)
+ (cd obj && rm -rf bcc32 beos haiku qnx djgpp mingw32 msvc watcom)
+ (cd lib && rm -rf bcc32 beos haiku qnx djgpp mingw32 msvc watcom)
(cd include && rm -f bealleg.h qnxalleg.h macalleg.h winalleg.h)
(cd misc && rm -f cmplog.pl dllsyms.lst findtext.sh fixpatch.sh fixver.sh)
(cd misc && rm -f allegro-config-qnx.sh zipup.sh zipwin.sh *.bat *.c)
@@ -94,8 +94,8 @@
(cd addons/jpgalleg && rm -f makefile.be makefile.mgw makefile.dj)
(cd addons/jpgalleg && rm -f makefile.osx makefile.vc fix.bat readme.txt)
(cd addons/jpgalleg/misc && rm -f fixver.sh runner.c)
- (cd addons/jpgalleg/lib && rm -rf beos djgpp macosx mingw32 msvc)
- (cd addons/jpgalleg/obj && rm -rf beos djgpp macosx mingw32 msvc)
+ (cd addons/jpgalleg/lib && rm -rf beos djgpp haiku macosx mingw32 msvc)
+ (cd addons/jpgalleg/obj && rm -rf beos djgpp haiku macosx mingw32 msvc)
# logg addon
(cd addons/logg && rm -f Makefile.mingw play_ogg.c stream_ogg.c fix.bat)
diff -urN allegro-4.3.10/misc/zipup.sh allegro-4.3.10-haiku/misc/zipup.sh
--- allegro-4.3.10/misc/zipup.sh 2008-01-19 12:16:56.000000000 +0000
+++ allegro-4.3.10-haiku/misc/zipup.sh 2008-09-13 20:11:46.000000000 +0000
@@ -125,6 +125,12 @@
make depend UNIX_TOOLS=1 CC=gcc
+# generate dependencies for Haiku
+echo "Generating Haiku dependencies..."
+
+./fix.sh haiku --quick
+
+make depend UNIX_TOOLS=1 CC=gcc
# generate dependencies for QNX
echo "Generating QNX dependencies..."
@@ -164,7 +170,7 @@
for base in abi ahack allegro const faq help mistakes; do
./_makedoc.exe -ascii docs/txt/$base.txt docs/src/$base._tx
done
-for base in bcc32 beos darwin djgpp linux macosx mingw32 msvc qnx unix watcom; do
+for base in bcc32 beos darwin djgpp haiku linux macosx mingw32 msvc qnx unix watcom; do
./_makedoc.exe -ascii docs/build/$base.txt docs/src/build/$base._tx
done
diff -urN allegro-4.3.10/setup/keyconf.c allegro-4.3.10-haiku/setup/keyconf.c
--- allegro-4.3.10/setup/keyconf.c 2005-04-07 23:37:20.000000000 +0000
+++ allegro-4.3.10-haiku/setup/keyconf.c 2008-09-13 20:11:46.000000000 +0000
@@ -25,8 +25,8 @@
/* The code can't link on platforms that don't use src/misc/pckeys.c (everything
- * but DOS, QNX, BEOS). */
-#if (defined ALLEGRO_DOS) || (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS)
+ * but DOS, QNX, BEOS, HAIKU). */
+#if (defined ALLEGRO_DOS) || (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS) || (defined ALLEGRO_HAIKU)
char *ascii_name[32] =
diff -urN allegro-4.3.10/src/beos/baccel.cpp allegro-4.3.10-haiku/src/beos/baccel.cpp
--- allegro-4.3.10/src/beos/baccel.cpp 2002-09-01 23:18:56.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/baccel.cpp 2008-09-13 20:11:46.000000000 +0000
@@ -20,7 +20,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bdispsw.cpp allegro-4.3.10-haiku/src/beos/bdispsw.cpp
--- allegro-4.3.10/src/beos/bdispsw.cpp 2002-04-06 15:18:16.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bdispsw.cpp 2008-09-13 20:11:46.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bdwindow.cpp allegro-4.3.10-haiku/src/beos/bdwindow.cpp
--- allegro-4.3.10/src/beos/bdwindow.cpp 2005-10-27 20:57:00.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bdwindow.cpp 2008-09-13 20:11:46.000000000 +0000
@@ -21,7 +21,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bgfx.c allegro-4.3.10-haiku/src/beos/bgfx.c
--- allegro-4.3.10/src/beos/bgfx.c 2004-11-26 16:05:12.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bgfx.c 2008-09-13 20:11:46.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
diff -urN allegro-4.3.10/src/beos/bgfxapi.cpp allegro-4.3.10-haiku/src/beos/bgfxapi.cpp
--- allegro-4.3.10/src/beos/bgfxapi.cpp 2002-12-07 21:12:30.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bgfxapi.cpp 2008-09-13 20:11:46.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bgfxdrv.c allegro-4.3.10-haiku/src/beos/bgfxdrv.c
--- allegro-4.3.10/src/beos/bgfxdrv.c 2001-11-06 15:30:48.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bgfxdrv.c 2008-09-13 20:11:46.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BEGIN_GFX_DRIVER_LIST
GFX_DRIVER_BEOS
diff -urN allegro-4.3.10/src/beos/bjoy.c allegro-4.3.10-haiku/src/beos/bjoy.c
--- allegro-4.3.10/src/beos/bjoy.c 2001-11-06 17:16:42.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bjoy.c 2008-09-13 20:11:46.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bjoyapi.cpp allegro-4.3.10-haiku/src/beos/bjoyapi.cpp
--- allegro-4.3.10/src/beos/bjoyapi.cpp 2004-07-04 14:44:50.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bjoyapi.cpp 2008-09-13 20:11:46.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
static BJoystick *be_joy = NULL;
static int32 num_devices, num_axes, num_hats, num_buttons;
diff -urN allegro-4.3.10/src/beos/bjoydrv.c allegro-4.3.10-haiku/src/beos/bjoydrv.c
--- allegro-4.3.10/src/beos/bjoydrv.c 2001-11-06 15:30:48.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bjoydrv.c 2008-09-13 20:11:46.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BEGIN_JOYSTICK_DRIVER_LIST
JOYSTICK_DRIVER_BEOS
diff -urN allegro-4.3.10/src/beos/bkey.c allegro-4.3.10-haiku/src/beos/bkey.c
--- allegro-4.3.10/src/beos/bkey.c 2004-12-03 20:56:28.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bkey.c 2008-09-13 20:11:46.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
diff -urN allegro-4.3.10/src/beos/bkeyapi.cpp allegro-4.3.10-haiku/src/beos/bkeyapi.cpp
--- allegro-4.3.10/src/beos/bkeyapi.cpp 2005-10-27 20:57:00.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bkeyapi.cpp 2008-09-13 20:11:46.000000000 +0000
@@ -22,9 +22,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
#define KEY_ID_PC101 0 // the docs say it should be 0x83ab, but they lie
diff -urN allegro-4.3.10/src/beos/bkeydrv.c allegro-4.3.10-haiku/src/beos/bkeydrv.c
--- allegro-4.3.10/src/beos/bkeydrv.c 2001-11-06 15:30:48.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bkeydrv.c 2008-09-13 20:11:46.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
_DRIVER_INFO _keyboard_driver_list[] =
{
diff -urN allegro-4.3.10/src/beos/bmidi.c allegro-4.3.10-haiku/src/beos/bmidi.c
--- allegro-4.3.10/src/beos/bmidi.c 2006-03-18 15:05:34.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bmidi.c 2008-09-13 20:11:46.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
MIDI_DRIVER midi_beos =
{
diff -urN allegro-4.3.10/src/beos/bmidiapi.cpp allegro-4.3.10-haiku/src/beos/bmidiapi.cpp
--- allegro-4.3.10/src/beos/bmidiapi.cpp 2007-08-09 21:48:38.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bmidiapi.cpp 2008-09-13 20:11:46.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BMidiSynth *_be_midisynth = NULL;
diff -urN allegro-4.3.10/src/beos/bmididrv.c allegro-4.3.10-haiku/src/beos/bmididrv.c
--- allegro-4.3.10/src/beos/bmididrv.c 2001-11-06 15:30:48.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bmididrv.c 2008-09-13 20:11:46.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BEGIN_MIDI_DRIVER_LIST
MIDI_DRIVER_BEOS
diff -urN allegro-4.3.10/src/beos/bmousapi.cpp allegro-4.3.10-haiku/src/beos/bmousapi.cpp
--- allegro-4.3.10/src/beos/bmousapi.cpp 2005-10-27 20:57:00.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bmousapi.cpp 2008-09-13 20:11:46.000000000 +0000
@@ -23,9 +23,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
#define MOUSE_THREAD_NAME "mouse driver"
#define MOUSE_THREAD_PRIORITY 60
diff -urN allegro-4.3.10/src/beos/bmousdrv.c allegro-4.3.10-haiku/src/beos/bmousdrv.c
--- allegro-4.3.10/src/beos/bmousdrv.c 2001-11-06 15:30:48.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bmousdrv.c 2008-09-13 20:11:46.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
diff -urN allegro-4.3.10/src/beos/bmouse.c allegro-4.3.10-haiku/src/beos/bmouse.c
--- allegro-4.3.10/src/beos/bmouse.c 2004-12-04 13:24:16.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bmouse.c 2008-09-13 20:11:46.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
diff -urN allegro-4.3.10/src/beos/boverlay.cpp allegro-4.3.10-haiku/src/beos/boverlay.cpp
--- allegro-4.3.10/src/beos/boverlay.cpp 2002-11-15 11:53:40.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/boverlay.cpp 2008-09-13 20:11:46.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bsnd.c allegro-4.3.10-haiku/src/beos/bsnd.c
--- allegro-4.3.10/src/beos/bsnd.c 2006-03-18 15:05:34.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bsnd.c 2008-09-13 20:11:47.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
DIGI_DRIVER digi_beos =
{
diff -urN allegro-4.3.10/src/beos/bsndapi.cpp allegro-4.3.10-haiku/src/beos/bsndapi.cpp
--- allegro-4.3.10/src/beos/bsndapi.cpp 2006-03-18 15:05:34.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bsndapi.cpp 2008-09-13 20:11:47.000000000 +0000
@@ -20,7 +20,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bsnddrv.c allegro-4.3.10-haiku/src/beos/bsnddrv.c
--- allegro-4.3.10/src/beos/bsnddrv.c 2001-11-06 15:30:48.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bsnddrv.c 2008-09-13 20:11:47.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BEGIN_DIGI_DRIVER_LIST
DIGI_DRIVER_BEOS
diff -urN allegro-4.3.10/src/beos/bsysapi.cpp allegro-4.3.10-haiku/src/beos/bsysapi.cpp
--- allegro-4.3.10/src/beos/bsysapi.cpp 2005-10-27 20:57:00.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bsysapi.cpp 2008-09-13 20:11:47.000000000 +0000
@@ -27,9 +27,9 @@
#include <sys/utsname.h>
#endif
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
#define SYS_THREAD_PRIORITY B_NORMAL_PRIORITY
#define SYS_THREAD_NAME "system driver"
diff -urN allegro-4.3.10/src/beos/bsysdrv.c allegro-4.3.10-haiku/src/beos/bsysdrv.c
--- allegro-4.3.10/src/beos/bsysdrv.c 2001-11-06 15:30:48.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bsysdrv.c 2008-09-13 20:11:47.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
_DRIVER_INFO _system_driver_list[] =
{
diff -urN allegro-4.3.10/src/beos/bsystem.c allegro-4.3.10-haiku/src/beos/bsystem.c
--- allegro-4.3.10/src/beos/bsystem.c 2002-12-07 21:10:58.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bsystem.c 2008-09-13 20:11:47.000000000 +0000
@@ -19,11 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
-
-
+#endif
SYSTEM_DRIVER system_beos = {
SYSTEM_BEOS,
diff -urN allegro-4.3.10/src/beos/btimeapi.cpp allegro-4.3.10-haiku/src/beos/btimeapi.cpp
--- allegro-4.3.10/src/beos/btimeapi.cpp 2004-07-27 11:33:22.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/btimeapi.cpp 2008-09-13 20:11:47.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/btimedrv.c allegro-4.3.10-haiku/src/beos/btimedrv.c
--- allegro-4.3.10/src/beos/btimedrv.c 2001-11-06 15:30:48.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/btimedrv.c 2008-09-13 20:11:47.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
_DRIVER_INFO _timer_driver_list[] = {
{TIMER_BEOS, &timer_beos, TRUE},
diff -urN allegro-4.3.10/src/beos/btimer.c allegro-4.3.10-haiku/src/beos/btimer.c
--- allegro-4.3.10/src/beos/btimer.c 2004-08-22 02:57:14.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/btimer.c 2008-09-13 20:11:47.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bwindow.cpp allegro-4.3.10-haiku/src/beos/bwindow.cpp
--- allegro-4.3.10/src/beos/bwindow.cpp 2002-11-15 11:53:40.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bwindow.cpp 2008-09-13 20:11:47.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bwscreen.cpp allegro-4.3.10-haiku/src/beos/bwscreen.cpp
--- allegro-4.3.10/src/beos/bwscreen.cpp 2004-11-26 17:27:02.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bwscreen.cpp 2008-09-13 20:11:47.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/i386/asmdefs.inc allegro-4.3.10-haiku/src/i386/asmdefs.inc
--- allegro-4.3.10/src/i386/asmdefs.inc 2007-06-16 02:52:28.000000000 +0000
+++ allegro-4.3.10-haiku/src/i386/asmdefs.inc 2008-09-13 20:11:47.000000000 +0000
@@ -31,6 +31,8 @@
#include "obj/msvc/asmdef.inc"
#elif defined ALLEGRO_WATCOM
#include "obj/watcom/asmdef.inc"
+#elif defined ALLEGRO_HAIKU
+ #include "obj/beos/asmdef.inc"
#elif defined ALLEGRO_BEOS
#include "obj/beos/asmdef.inc"
#elif defined ALLEGRO_QNX
diff -urN allegro-4.3.10/src/midi.c allegro-4.3.10-haiku/src/midi.c
--- allegro-4.3.10/src/midi.c 2007-04-12 16:19:54.000000000 +0000
+++ allegro-4.3.10-haiku/src/midi.c 2008-09-13 20:11:47.000000000 +0000
@@ -1122,7 +1122,7 @@
running_status = 0;
while (p < end) { /* work through data stream */
-#ifdef ALLEGRO_BEOS
+#if defined ALLEGRO_BEOS || defined ALLEGRO_HAIKU
/* Is there a bug in this routine, or in gcc under BeOS/x86? --PW */
{ int i; for (i=1; i; i--); }
#endif
diff -urN allegro-4.3.10/tools/dat2c.c allegro-4.3.10-haiku/tools/dat2c.c
--- allegro-4.3.10/tools/dat2c.c 2005-04-28 09:53:38.000000000 +0000
+++ allegro-4.3.10-haiku/tools/dat2c.c 2008-09-13 20:11:47.000000000 +0000
@@ -342,7 +342,7 @@
}
if (dat2c->lformat == lineformat_default)
-#if (defined ALLEGRO_UNIX || defined ALLEGRO_QNX || defined ALLEGRO_BEOS || defined ALLEGRO_MACOSX)
+#if (defined ALLEGRO_UNIX || defined ALLEGRO_QNX || defined ALLEGRO_BEOS || defined ALLEGRO_HAIKU || defined ALLEGRO_MACOSX)
dat2c->lformat = lineformat_unix;
#elif (defined ALLEGRO_WINDOWS || defined ALLEGRO_DOS)
dat2c->lformat = lineformat_dos;
diff -urN allegro-4.3.10/tools/datedit.c allegro-4.3.10-haiku/tools/datedit.c
--- allegro-4.3.10/tools/datedit.c 2007-10-08 16:23:36.000000000 +0000
+++ allegro-4.3.10-haiku/tools/datedit.c 2008-09-13 20:11:47.000000000 +0000
@@ -121,6 +121,8 @@
#include "obj/dmc/plugins.h"
#elif defined ALLEGRO_BEOS
#include "obj/beos/plugins.h"
+ #elif defined ALLEGRO_HAIKU
+ #include "obj/beos/plugins.h"
#elif defined ALLEGRO_BCC32
#include "obj/bcc32/plugins.h"
#elif defined ALLEGRO_MPW
diff -urN allegro-4.3.10/tools/grabber.c allegro-4.3.10-haiku/tools/grabber.c
--- allegro-4.3.10/tools/grabber.c 2006-07-24 13:09:26.000000000 +0000
+++ allegro-4.3.10-haiku/tools/grabber.c 2008-09-13 20:11:48.000000000 +0000
@@ -3132,6 +3132,7 @@
case OSTYPE_QNX: s = "QNX"; break;
case OSTYPE_UNIX: s = "Unix"; break;
case OSTYPE_BEOS: s = "BeOS"; break;
+ case OSTYPE_HAIKU: s = "Haiku"; break;
case OSTYPE_MACOS: s = "MacOS"; break;
case OSTYPE_MACOSX: s = "MacOS X"; break;
default: s = "Unknown"; break;

View File

@@ -1,792 +0,0 @@
diff -urN allegro-4.3.10/addons/allegrogl/fix.sh allegro-4.3.10-haiku/addons/allegrogl/fix.sh
--- allegro-4.3.10/addons/allegrogl/fix.sh 2008-10-04 20:41:29.000000000 +0000
+++ allegro-4.3.10-haiku/addons/allegrogl/fix.sh 2008-10-04 21:07:34.000000000 +0000
@@ -26,7 +26,7 @@
echo "Compilation target adjustment."
echo " Usage: fix <platform> [--dtou|--utod|--quick]"
echo ""
- echo " <platform> is one of: djgpp, mingw32, unix, macosx,"
+ echo " <platform> is one of: djgpp, haiku, mingw32, unix, macosx,"
echo " macosx-universal"
echo ""
echo " --dtou converts from DOS/Win32 format to Unix"
@@ -81,6 +81,7 @@
case "$1" in
djgpp ) proc_fix "DJGPP" "makefile.dj";;
+ haiku ) proc_fix "Haiku" "makefile.gen";;
mingw ) proc_fix "Mingw32" "makefile.mgw";;
mingw32 ) proc_fix "Mingw32" "makefile.mgw";;
# used only by allegro's zipup.sh in packaging process
diff -urN allegro-4.3.10/addons/jpgalleg/fix.sh allegro-4.3.10-haiku/addons/jpgalleg/fix.sh
--- allegro-4.3.10/addons/jpgalleg/fix.sh 2008-10-04 20:41:12.000000000 +0000
+++ allegro-4.3.10-haiku/addons/jpgalleg/fix.sh 2008-10-04 21:01:19.000000000 +0000
@@ -85,6 +85,7 @@
"mingw" ) proc_fix "MinGW32" "makefile.mgw";;
"msvc" ) proc_fix "MSVC" "makefile.vc";;
"beos" ) proc_fix "BeOS" "makefile.be";;
+ "haiku" ) proc_fix "Haiku" "makefile.be";;
"unix" ) proc_fix "Unix" "makefile.uni";;
"macosx" ) proc_fix "MacOS X" "makefile.osx";;
"macosx-universal" ) proc_fix_osx_ub ;;
diff -urN allegro-4.3.10/addons/loadpng/fix.sh allegro-4.3.10-haiku/addons/loadpng/fix.sh
--- allegro-4.3.10/addons/loadpng/fix.sh 2008-10-04 20:41:10.000000000 +0000
+++ allegro-4.3.10-haiku/addons/loadpng/fix.sh 2008-10-04 21:08:47.000000000 +0000
@@ -8,7 +8,7 @@
echo
echo "Usage: $0 <platform> [--quick|--dtou|--utod]"
echo
- echo "Where platform is one of: djgpp, mingw32, unix, macosx, macosx-universal"
+ echo "Where platform is one of: djgpp, haiku, mingw32, unix, macosx, macosx-universal"
echo "The --quick parameter turns off text file conversion, --dtou converts from"
echo "DOS/Win32 format to Unix, --utod converts from Unix to DOS/Win32 format."
echo "If no parameter is specified --quick is assumed."
@@ -88,7 +88,9 @@
fi
case "$1" in
+ "beos" ) proc_fix "BeOS" "Makefile.be";;
"djgpp" ) proc_fix "DOS (djgpp)" "Makefile.dj";;
+ "haiku" ) proc_fix "Haiku" "Makefile.be";;
"mingw" ) proc_fix "Windows (MinGW)" "Makefile.mgw";;
"mingw32" ) proc_fix "Windows (MinGW)" "Makefile.mgw";;
"unix" ) proc_fix "Unix" "Makefile.unx";;
diff -urN allegro-4.3.10/addons/logg/fix.sh allegro-4.3.10-haiku/addons/logg/fix.sh
--- allegro-4.3.10/addons/logg/fix.sh 2008-10-04 20:41:29.000000000 +0000
+++ allegro-4.3.10-haiku/addons/logg/fix.sh 2008-10-04 21:12:47.000000000 +0000
@@ -8,7 +8,7 @@
echo
echo "Usage: $0 <platform> [--quick|--dtou|--utod]"
echo
- echo "Where platform is one of: mingw32, unix, macosx, macosx-universal"
+ echo "Where platform is one of: beos, haiku, mingw32, unix, macosx, macosx-universal"
echo "The --quick parameter turns off text file conversion, --dtou converts from"
echo "DOS/Win32 format to Unix, --utod converts from Unix to DOS/Win32 format."
echo "If no parameter is specified --quick is assumed."
@@ -80,6 +80,8 @@
fi
case "$1" in
+ "beos" ) proc_fix "BeOS" "Makefile.be";;
+ "haiku" ) proc_fix "Haiku" "Makefile.be";;
"mingw" ) proc_fix "Windows (MinGW)" "Makefile.migw";;
"mingw32" ) proc_fix "Windows (MinGW)" "Makefile.migw";;
"unix" ) proc_fix "Unix" "Makefile.unix";;
diff -urN allegro-4.3.10/fix.sh allegro-4.3.10-haiku/fix.sh
--- allegro-4.3.10/fix.sh 2008-10-04 20:41:32.000000000 +0000
+++ allegro-4.3.10-haiku/fix.sh 2008-10-04 21:01:20.000000000 +0000
@@ -9,7 +9,7 @@
echo
echo "Usage: $0 <platform> [--quick|--dtou|--utod]"
echo
- echo "Where platform is one of: bcc32, beos, djgpp, mingw, qnx, unix"
+ echo "Where platform is one of: bcc32, beos, djgpp, haiku, mingw, qnx, unix"
echo "mac, macosx, macosx-universal and watcom."
echo "The --quick parameter turns off text file conversion, --dtou converts from"
echo "DOS/Win32 format to Unix, --utod converts from Unix to DOS/Win32 format."
@@ -90,6 +90,7 @@
"bcc32" ) proc_fix "Windows (BCC32)" "makefile.bcc" "ALLEGRO_BCC32";;
"beos" ) proc_fix "BeOS" "makefile.be" "ALLEGRO_BEOS";;
"djgpp" ) proc_fix "DOS (djgpp)" "makefile.dj" "ALLEGRO_DJGPP";;
+ "haiku" ) proc_fix "Haiku" "makefile.be" "ALLEGRO_HAIKU";;
"mingw" ) proc_fix "Windows (MinGW)" "makefile.mgw" "ALLEGRO_MINGW32";;
"mingw32" ) proc_fix "Windows (MinGW)" "makefile.mgw" "ALLEGRO_MINGW32";;
# The 'msvc' target is undocumented in the help message, but is used
diff -urN allegro-4.3.10/include/allegro/internal/aintern.h allegro-4.3.10-haiku/include/allegro/internal/aintern.h
--- allegro-4.3.10/include/allegro/internal/aintern.h 2008-10-04 20:41:30.000000000 +0000
+++ allegro-4.3.10-haiku/include/allegro/internal/aintern.h 2008-10-04 21:01:20.000000000 +0000
@@ -190,7 +190,7 @@
#if (defined ALLEGRO_DOS) || (defined ALLEGRO_DJGPP) || (defined ALLEGRO_WATCOM) || \
- (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS)
+ (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS) || (defined ALLEGRO_HAIKU)
AL_ARRAY(char *, _pckeys_names);
diff -urN allegro-4.3.10/include/allegro/internal/alconfig.h allegro-4.3.10-haiku/include/allegro/internal/alconfig.h
--- allegro-4.3.10/include/allegro/internal/alconfig.h 2008-10-04 20:41:30.000000000 +0000
+++ allegro-4.3.10-haiku/include/allegro/internal/alconfig.h 2008-10-04 21:01:20.000000000 +0000
@@ -48,6 +48,8 @@
#include "allegro/platform/albcc32.h"
#elif defined ALLEGRO_MSVC
#include "allegro/platform/almsvc.h"
+ #elif defined ALLEGRO_HAIKU
+ #include "allegro/platform/albecfg.h"
#elif defined ALLEGRO_BEOS
#include "allegro/platform/albecfg.h"
#elif defined ALLEGRO_MPW
diff -urN allegro-4.3.10/include/allegro/platform/albecfg.h allegro-4.3.10-haiku/include/allegro/platform/albecfg.h
--- allegro-4.3.10/include/allegro/platform/albecfg.h 2008-10-04 20:41:30.000000000 +0000
+++ allegro-4.3.10-haiku/include/allegro/platform/albecfg.h 2008-10-04 21:01:20.000000000 +0000
@@ -31,7 +31,13 @@
#define ALLEGRO_HAVE_SYS_TIME_H 1
/* describe this platform */
-#define ALLEGRO_PLATFORM_STR "BeOS"
+#if defined __BEOS__ && !defined __HAIKU__
+ #define ALLEGRO_PLATFORM_STR "BeOS"
+#endif
+#if defined __HAIKU__
+ #define ALLEGRO_PLATFORM_STR "Haiku"
+ #define ALLEGRO_HAVE_LIBPTHREAD 1
+#endif
#define ALLEGRO_LITTLE_ENDIAN
#define ALLEGRO_CONSOLE_OK
#define ALLEGRO_USE_CONSTRUCTOR
diff -urN allegro-4.3.10/include/allegro/platform/albeos.h allegro-4.3.10-haiku/include/allegro/platform/albeos.h
--- allegro-4.3.10/include/allegro/platform/albeos.h 2008-10-04 20:41:30.000000000 +0000
+++ allegro-4.3.10-haiku/include/allegro/platform/albeos.h 2008-10-04 21:01:20.000000000 +0000
@@ -74,3 +74,7 @@
#define JOYSTICK_DRIVER_BEOS \
{ JOYSTICK_BEOS, &joystick_beos, TRUE },
+#if defined __HAIKU__
+#define TIMERDRV_UNIX_PTHREADS AL_ID('P','T','H','R')
+#endif
+
diff -urN allegro-4.3.10/include/allegro/platform/alunixac.hin allegro-4.3.10-haiku/include/allegro/platform/alunixac.hin
--- allegro-4.3.10/include/allegro/platform/alunixac.hin 2008-10-04 20:41:30.000000000 +0000
+++ allegro-4.3.10-haiku/include/allegro/platform/alunixac.hin 2008-10-04 21:01:20.000000000 +0000
@@ -68,7 +68,7 @@
#undef ALLEGRO_DARWIN
/* Define if you have the pthread library. */
-#undef ALLEGRO_HAVE_LIBPTHREAD
+/* #undef ALLEGRO_HAVE_LIBPTHREAD */
/* Define if constructor attribute is supported. */
#undef ALLEGRO_USE_CONSTRUCTOR
@@ -159,7 +159,7 @@
/* Define as the return type of signal handlers (`int' or `void'). */
/* TODO: rename this */
-#undef RETSIGTYPE
+/* #undef RETSIGTYPE */
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
diff -urN allegro-4.3.10/include/allegro/system.h allegro-4.3.10-haiku/include/allegro/system.h
--- allegro-4.3.10/include/allegro/system.h 2008-10-04 20:41:30.000000000 +0000
+++ allegro-4.3.10-haiku/include/allegro/system.h 2008-10-04 21:01:20.000000000 +0000
@@ -61,6 +61,7 @@
#define OSTYPE_QNX AL_ID('Q','N','X',' ')
#define OSTYPE_UNIX AL_ID('U','N','I','X')
#define OSTYPE_BEOS AL_ID('B','E','O','S')
+#define OSTYPE_HAIKU AL_ID('H','A','I','K')
#define OSTYPE_MACOS AL_ID('M','A','C',' ')
#define OSTYPE_MACOSX AL_ID('M','A','C','X')
diff -urN allegro-4.3.10/makefile.all allegro-4.3.10-haiku/makefile.all
--- allegro-4.3.10/makefile.all 2008-10-04 20:41:32.000000000 +0000
+++ allegro-4.3.10-haiku/makefile.all 2008-10-04 21:01:20.000000000 +0000
@@ -8,7 +8,7 @@
# DEBUGMODE=2 selects a build intended to debug Allegro itself.
# PROFILEMODE=1 selects a profiling build.
# WARNMODE=1 selects strict compiler warnings.
-# STATICLINK=1 use static linking (MinGW32, MSVC, BeOS).
+# STATICLINK=1 use static linking (MinGW32, MSVC, BeOS, Haiku).
# STATICRUNTIME=1 link to a static C runtime library (/MT) (MSVC)
# TARGET_ARCH_COMPAT optimize for the given processor while preserving backwards
# compatibility with older processors (GCC-based platforms).
@@ -132,7 +132,7 @@
# XXX this is duplicated in makefile.in
DOCBASEFILES = ahack changes faq mistakes help thanks allegro const abi api packfile \
readme makedoc datafile grabber dat dat2c dat2s license addons targets
-DOCBUILDFILES = bcc32 beos darwin djgpp dmc linux macosx mingw32 msvc qnx unix watcom
+DOCBUILDFILES = bcc32 beos darwin djgpp dmc haiku linux macosx mingw32 msvc qnx unix watcom
DOCTXTBUILDFILES = $(addprefix docs/build/,$(addsuffix .txt,$(DOCBUILDFILES)))
DOCS = $(addprefix docs/txt/,$(addsuffix .txt,$(filter-out changes thanks readme, $(DOCBASEFILES))))
diff -urN allegro-4.3.10/makefile.be allegro-4.3.10-haiku/makefile.be
--- allegro-4.3.10/makefile.be 2008-10-04 20:41:32.000000000 +0000
+++ allegro-4.3.10-haiku/makefile.be 2008-10-04 21:01:20.000000000 +0000
@@ -10,7 +10,15 @@
# -------- define some variables that the primary makefile will use --------
+
+ifeq ($(OS),BeOS)
PLATFORM = BeOS
+endif
+
+ifeq ($(OS),Haiku)
+PLATFORM = Haiku
+endif
+
CC = gcc
EXE =
OBJ = .o
@@ -123,7 +131,13 @@
OBJECT_LIST = $(COMMON_OBJECTS) $(MY_OBJECTS) $(basename $(notdir $(ALLEGRO_SRC_BEOS_FILES)))
+ifeq ($(OS),BeOS)
LIBRARIES = -lbe -lgame -ldevice -lmidi -lmedia -lnet
+endif
+
+ifeq ($(OS),Haiku)
+LIBRARIES = -lbe -lgame -ldevice -lmidi -lmedia -lnetwork
+endif
PROGRAMS = bfixicon
@@ -167,7 +181,14 @@
sed -e "s/@LIBS@/$(LIBRARIES)/" temp2 > temp
sed -e "s/include/headers/" temp >temp2
sed -e "s/ -l\$${lib_type}_unsharable//" temp2 >temp
+
+ifeq ($(OS),BeOS)
sed -e "s/libdirs=-L\$${exec_prefix}\/lib/libdirs=\"-L\$${exec_prefix}\/lib\/x86 -L\/boot\/home\/config\/lib\"/" temp >/bin/allegro-config
+endif
+ifeq ($(OS),Haiku)
+ sed -e "s/libdirs=-L\$${exec_prefix}\/lib/libdirs=\"-L\$${exec_prefix}\/lib\/x86 -L\/boot\/common\/lib\"/" temp >/bin/allegro-config
+endif
+
rm -f temp temp2
chmod a+x /bin/allegro-config
diff -urN allegro-4.3.10/misc/mkunixdists.sh allegro-4.3.10-haiku/misc/mkunixdists.sh
--- allegro-4.3.10/misc/mkunixdists.sh 2008-10-04 20:41:30.000000000 +0000
+++ allegro-4.3.10-haiku/misc/mkunixdists.sh 2008-10-04 21:01:20.000000000 +0000
@@ -73,9 +73,9 @@
# Hack'n'slash
echo "Stripping to form end-user distribution"
(cd $dir/$basename && {
- (cd src && rm -rf beos qnx dos mac ppc win)
- (cd obj && rm -rf bcc32 beos qnx djgpp mingw32 msvc watcom)
- (cd lib && rm -rf bcc32 beos qnx djgpp mingw32 msvc watcom)
+ (cd src && rm -rf beos haiku qnx dos mac ppc win)
+ (cd obj && rm -rf bcc32 beos haiku qnx djgpp mingw32 msvc watcom)
+ (cd lib && rm -rf bcc32 beos haiku qnx djgpp mingw32 msvc watcom)
(cd include && rm -f bealleg.h qnxalleg.h macalleg.h winalleg.h)
(cd misc && rm -f cmplog.pl dllsyms.lst findtext.sh fixpatch.sh fixver.sh)
(cd misc && rm -f allegro-config-qnx.sh zipup.sh zipwin.sh *.bat *.c)
@@ -94,8 +94,8 @@
(cd addons/jpgalleg && rm -f makefile.be makefile.mgw makefile.dj)
(cd addons/jpgalleg && rm -f makefile.osx makefile.vc fix.bat readme.txt)
(cd addons/jpgalleg/misc && rm -f fixver.sh runner.c)
- (cd addons/jpgalleg/lib && rm -rf beos djgpp macosx mingw32 msvc)
- (cd addons/jpgalleg/obj && rm -rf beos djgpp macosx mingw32 msvc)
+ (cd addons/jpgalleg/lib && rm -rf beos djgpp haiku macosx mingw32 msvc)
+ (cd addons/jpgalleg/obj && rm -rf beos djgpp haiku macosx mingw32 msvc)
# logg addon
(cd addons/logg && rm -f Makefile.mingw play_ogg.c stream_ogg.c fix.bat)
diff -urN allegro-4.3.10/misc/zipup.sh allegro-4.3.10-haiku/misc/zipup.sh
--- allegro-4.3.10/misc/zipup.sh 2008-10-04 20:41:30.000000000 +0000
+++ allegro-4.3.10-haiku/misc/zipup.sh 2008-10-04 21:01:20.000000000 +0000
@@ -125,6 +125,12 @@
make depend UNIX_TOOLS=1 CC=gcc
+# generate dependencies for Haiku
+echo "Generating Haiku dependencies..."
+
+./fix.sh haiku --quick
+
+make depend UNIX_TOOLS=1 CC=gcc
# generate dependencies for QNX
echo "Generating QNX dependencies..."
@@ -164,7 +170,7 @@
for base in abi ahack allegro const faq help mistakes; do
./_makedoc.exe -ascii docs/txt/$base.txt docs/src/$base._tx
done
-for base in bcc32 beos darwin djgpp linux macosx mingw32 msvc qnx unix watcom; do
+for base in bcc32 beos darwin djgpp haiku linux macosx mingw32 msvc qnx unix watcom; do
./_makedoc.exe -ascii docs/build/$base.txt docs/src/build/$base._tx
done
diff -urN allegro-4.3.10/setup/keyconf.c allegro-4.3.10-haiku/setup/keyconf.c
--- allegro-4.3.10/setup/keyconf.c 2008-10-04 20:41:31.000000000 +0000
+++ allegro-4.3.10-haiku/setup/keyconf.c 2008-10-04 21:01:20.000000000 +0000
@@ -25,8 +25,8 @@
/* The code can't link on platforms that don't use src/misc/pckeys.c (everything
- * but DOS, QNX, BEOS). */
-#if (defined ALLEGRO_DOS) || (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS)
+ * but DOS, QNX, BEOS, HAIKU). */
+#if (defined ALLEGRO_DOS) || (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS) || (defined ALLEGRO_HAIKU)
char *ascii_name[32] =
diff -urN allegro-4.3.10/src/beos/baccel.cpp allegro-4.3.10-haiku/src/beos/baccel.cpp
--- allegro-4.3.10/src/beos/baccel.cpp 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/baccel.cpp 2008-10-04 21:01:20.000000000 +0000
@@ -20,7 +20,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bdispsw.cpp allegro-4.3.10-haiku/src/beos/bdispsw.cpp
--- allegro-4.3.10/src/beos/bdispsw.cpp 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bdispsw.cpp 2008-10-04 21:01:20.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bdwindow.cpp allegro-4.3.10-haiku/src/beos/bdwindow.cpp
--- allegro-4.3.10/src/beos/bdwindow.cpp 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bdwindow.cpp 2008-10-04 21:01:20.000000000 +0000
@@ -21,7 +21,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bgfx.c allegro-4.3.10-haiku/src/beos/bgfx.c
--- allegro-4.3.10/src/beos/bgfx.c 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bgfx.c 2008-10-04 21:01:20.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
diff -urN allegro-4.3.10/src/beos/bgfxapi.cpp allegro-4.3.10-haiku/src/beos/bgfxapi.cpp
--- allegro-4.3.10/src/beos/bgfxapi.cpp 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bgfxapi.cpp 2008-10-04 21:01:20.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bgfxdrv.c allegro-4.3.10-haiku/src/beos/bgfxdrv.c
--- allegro-4.3.10/src/beos/bgfxdrv.c 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bgfxdrv.c 2008-10-04 21:01:20.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BEGIN_GFX_DRIVER_LIST
GFX_DRIVER_BEOS
diff -urN allegro-4.3.10/src/beos/bjoy.c allegro-4.3.10-haiku/src/beos/bjoy.c
--- allegro-4.3.10/src/beos/bjoy.c 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bjoy.c 2008-10-04 21:01:20.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bjoyapi.cpp allegro-4.3.10-haiku/src/beos/bjoyapi.cpp
--- allegro-4.3.10/src/beos/bjoyapi.cpp 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bjoyapi.cpp 2008-10-04 21:01:20.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
static BJoystick *be_joy = NULL;
static int32 num_devices, num_axes, num_hats, num_buttons;
diff -urN allegro-4.3.10/src/beos/bjoydrv.c allegro-4.3.10-haiku/src/beos/bjoydrv.c
--- allegro-4.3.10/src/beos/bjoydrv.c 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bjoydrv.c 2008-10-04 21:01:20.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BEGIN_JOYSTICK_DRIVER_LIST
JOYSTICK_DRIVER_BEOS
diff -urN allegro-4.3.10/src/beos/bkey.c allegro-4.3.10-haiku/src/beos/bkey.c
--- allegro-4.3.10/src/beos/bkey.c 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bkey.c 2008-10-04 21:01:20.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
diff -urN allegro-4.3.10/src/beos/bkeyapi.cpp allegro-4.3.10-haiku/src/beos/bkeyapi.cpp
--- allegro-4.3.10/src/beos/bkeyapi.cpp 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bkeyapi.cpp 2008-10-04 21:01:20.000000000 +0000
@@ -22,9 +22,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
#define KEY_ID_PC101 0 // the docs say it should be 0x83ab, but they lie
diff -urN allegro-4.3.10/src/beos/bkeydrv.c allegro-4.3.10-haiku/src/beos/bkeydrv.c
--- allegro-4.3.10/src/beos/bkeydrv.c 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bkeydrv.c 2008-10-04 21:01:20.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
_DRIVER_INFO _keyboard_driver_list[] =
{
diff -urN allegro-4.3.10/src/beos/bmidi.c allegro-4.3.10-haiku/src/beos/bmidi.c
--- allegro-4.3.10/src/beos/bmidi.c 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bmidi.c 2008-10-04 21:01:20.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
MIDI_DRIVER midi_beos =
{
diff -urN allegro-4.3.10/src/beos/bmidiapi.cpp allegro-4.3.10-haiku/src/beos/bmidiapi.cpp
--- allegro-4.3.10/src/beos/bmidiapi.cpp 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bmidiapi.cpp 2008-10-04 21:01:20.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BMidiSynth *_be_midisynth = NULL;
diff -urN allegro-4.3.10/src/beos/bmididrv.c allegro-4.3.10-haiku/src/beos/bmididrv.c
--- allegro-4.3.10/src/beos/bmididrv.c 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bmididrv.c 2008-10-04 21:01:20.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BEGIN_MIDI_DRIVER_LIST
MIDI_DRIVER_BEOS
diff -urN allegro-4.3.10/src/beos/bmousapi.cpp allegro-4.3.10-haiku/src/beos/bmousapi.cpp
--- allegro-4.3.10/src/beos/bmousapi.cpp 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bmousapi.cpp 2008-10-04 21:01:20.000000000 +0000
@@ -23,9 +23,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
#define MOUSE_THREAD_NAME "mouse driver"
#define MOUSE_THREAD_PRIORITY 60
diff -urN allegro-4.3.10/src/beos/bmousdrv.c allegro-4.3.10-haiku/src/beos/bmousdrv.c
--- allegro-4.3.10/src/beos/bmousdrv.c 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bmousdrv.c 2008-10-04 21:01:20.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
diff -urN allegro-4.3.10/src/beos/bmouse.c allegro-4.3.10-haiku/src/beos/bmouse.c
--- allegro-4.3.10/src/beos/bmouse.c 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bmouse.c 2008-10-04 21:01:20.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
diff -urN allegro-4.3.10/src/beos/boverlay.cpp allegro-4.3.10-haiku/src/beos/boverlay.cpp
--- allegro-4.3.10/src/beos/boverlay.cpp 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/boverlay.cpp 2008-10-04 21:01:20.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bsnd.c allegro-4.3.10-haiku/src/beos/bsnd.c
--- allegro-4.3.10/src/beos/bsnd.c 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bsnd.c 2008-10-04 21:01:21.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
DIGI_DRIVER digi_beos =
{
diff -urN allegro-4.3.10/src/beos/bsndapi.cpp allegro-4.3.10-haiku/src/beos/bsndapi.cpp
--- allegro-4.3.10/src/beos/bsndapi.cpp 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bsndapi.cpp 2008-10-04 21:01:21.000000000 +0000
@@ -20,7 +20,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bsnddrv.c allegro-4.3.10-haiku/src/beos/bsnddrv.c
--- allegro-4.3.10/src/beos/bsnddrv.c 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bsnddrv.c 2008-10-04 21:01:21.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BEGIN_DIGI_DRIVER_LIST
DIGI_DRIVER_BEOS
diff -urN allegro-4.3.10/src/beos/bsysapi.cpp allegro-4.3.10-haiku/src/beos/bsysapi.cpp
--- allegro-4.3.10/src/beos/bsysapi.cpp 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bsysapi.cpp 2008-10-04 21:01:21.000000000 +0000
@@ -27,9 +27,9 @@
#include <sys/utsname.h>
#endif
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
#define SYS_THREAD_PRIORITY B_NORMAL_PRIORITY
#define SYS_THREAD_NAME "system driver"
diff -urN allegro-4.3.10/src/beos/bsysdrv.c allegro-4.3.10-haiku/src/beos/bsysdrv.c
--- allegro-4.3.10/src/beos/bsysdrv.c 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bsysdrv.c 2008-10-04 21:01:21.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
_DRIVER_INFO _system_driver_list[] =
{
diff -urN allegro-4.3.10/src/beos/bsystem.c allegro-4.3.10-haiku/src/beos/bsystem.c
--- allegro-4.3.10/src/beos/bsystem.c 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bsystem.c 2008-10-04 21:01:21.000000000 +0000
@@ -19,11 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
-
-
+#endif
SYSTEM_DRIVER system_beos = {
SYSTEM_BEOS,
diff -urN allegro-4.3.10/src/beos/btimeapi.cpp allegro-4.3.10-haiku/src/beos/btimeapi.cpp
--- allegro-4.3.10/src/beos/btimeapi.cpp 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/btimeapi.cpp 2008-10-04 21:01:21.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/btimedrv.c allegro-4.3.10-haiku/src/beos/btimedrv.c
--- allegro-4.3.10/src/beos/btimedrv.c 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/btimedrv.c 2008-10-04 21:01:21.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
_DRIVER_INFO _timer_driver_list[] = {
{TIMER_BEOS, &timer_beos, TRUE},
diff -urN allegro-4.3.10/src/beos/btimer.c allegro-4.3.10-haiku/src/beos/btimer.c
--- allegro-4.3.10/src/beos/btimer.c 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/btimer.c 2008-10-04 21:01:21.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bwindow.cpp allegro-4.3.10-haiku/src/beos/bwindow.cpp
--- allegro-4.3.10/src/beos/bwindow.cpp 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bwindow.cpp 2008-10-04 21:01:21.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/beos/bwscreen.cpp allegro-4.3.10-haiku/src/beos/bwscreen.cpp
--- allegro-4.3.10/src/beos/bwscreen.cpp 2008-10-04 20:40:55.000000000 +0000
+++ allegro-4.3.10-haiku/src/beos/bwscreen.cpp 2008-10-04 21:01:21.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10/src/i386/asmdefs.inc allegro-4.3.10-haiku/src/i386/asmdefs.inc
--- allegro-4.3.10/src/i386/asmdefs.inc 2008-10-04 20:40:57.000000000 +0000
+++ allegro-4.3.10-haiku/src/i386/asmdefs.inc 2008-10-04 21:01:21.000000000 +0000
@@ -31,6 +31,8 @@
#include "obj/msvc/asmdef.inc"
#elif defined ALLEGRO_WATCOM
#include "obj/watcom/asmdef.inc"
+#elif defined ALLEGRO_HAIKU
+ #include "obj/beos/asmdef.inc"
#elif defined ALLEGRO_BEOS
#include "obj/beos/asmdef.inc"
#elif defined ALLEGRO_QNX
diff -urN allegro-4.3.10/src/midi.c allegro-4.3.10-haiku/src/midi.c
--- allegro-4.3.10/src/midi.c 2008-10-04 20:41:01.000000000 +0000
+++ allegro-4.3.10-haiku/src/midi.c 2008-10-04 21:01:21.000000000 +0000
@@ -1122,7 +1122,7 @@
running_status = 0;
while (p < end) { /* work through data stream */
-#ifdef ALLEGRO_BEOS
+#if defined ALLEGRO_BEOS || defined ALLEGRO_HAIKU
/* Is there a bug in this routine, or in gcc under BeOS/x86? --PW */
{ int i; for (i=1; i; i--); }
#endif
diff -urN allegro-4.3.10/tools/dat2c.c allegro-4.3.10-haiku/tools/dat2c.c
--- allegro-4.3.10/tools/dat2c.c 2008-10-04 20:41:07.000000000 +0000
+++ allegro-4.3.10-haiku/tools/dat2c.c 2008-10-04 21:01:21.000000000 +0000
@@ -342,7 +342,7 @@
}
if (dat2c->lformat == lineformat_default)
-#if (defined ALLEGRO_UNIX || defined ALLEGRO_QNX || defined ALLEGRO_BEOS || defined ALLEGRO_MACOSX)
+#if (defined ALLEGRO_UNIX || defined ALLEGRO_QNX || defined ALLEGRO_BEOS || defined ALLEGRO_HAIKU || defined ALLEGRO_MACOSX)
dat2c->lformat = lineformat_unix;
#elif (defined ALLEGRO_WINDOWS || defined ALLEGRO_DOS)
dat2c->lformat = lineformat_dos;
diff -urN allegro-4.3.10/tools/datedit.c allegro-4.3.10-haiku/tools/datedit.c
--- allegro-4.3.10/tools/datedit.c 2008-10-04 20:41:07.000000000 +0000
+++ allegro-4.3.10-haiku/tools/datedit.c 2008-10-04 21:01:21.000000000 +0000
@@ -121,6 +121,8 @@
#include "obj/dmc/plugins.h"
#elif defined ALLEGRO_BEOS
#include "obj/beos/plugins.h"
+ #elif defined ALLEGRO_HAIKU
+ #include "obj/beos/plugins.h"
#elif defined ALLEGRO_BCC32
#include "obj/bcc32/plugins.h"
#elif defined ALLEGRO_MPW
diff -urN allegro-4.3.10/tools/grabber.c allegro-4.3.10-haiku/tools/grabber.c
--- allegro-4.3.10/tools/grabber.c 2008-10-04 20:41:07.000000000 +0000
+++ allegro-4.3.10-haiku/tools/grabber.c 2008-10-04 21:01:21.000000000 +0000
@@ -3132,6 +3132,7 @@
case OSTYPE_QNX: s = "QNX"; break;
case OSTYPE_UNIX: s = "Unix"; break;
case OSTYPE_BEOS: s = "BeOS"; break;
+ case OSTYPE_HAIKU: s = "Haiku"; break;
case OSTYPE_MACOS: s = "MacOS"; break;
case OSTYPE_MACOSX: s = "MacOS X"; break;
default: s = "Unknown"; break;

View File

@@ -1,190 +0,0 @@
diff -urN allegro-4.3.10/addons/allegrogl/configure allegro-4.3.10-haiku/addons/allegrogl/configure
--- allegro-4.3.10/addons/allegrogl/configure 2008-01-19 23:57:16.000000000 +0000
+++ allegro-4.3.10-haiku/addons/allegrogl/configure 2008-09-13 19:57:44.000000000 +0000
@@ -3624,6 +3624,70 @@
LIBS="-lpthread $LIBS"
fi
+{ echo "$as_me:$LINENO: checking for cos in -lm" >&5
+echo $ECHO_N "checking for cos in -lm... $ECHO_C" >&6; }
+if test "${ac_cv_lib_m_cos+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char cos ();
+int
+main ()
+{
+return cos ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_m_cos=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_m_cos=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_cos" >&5
+echo "${ECHO_T}$ac_cv_lib_m_cos" >&6; }
+if test $ac_cv_lib_m_cos = yes; then
+ LIBS="-lm $LIBS"
+fi
if test -n "$agl_build_generic"; then
@@ -4247,7 +4311,7 @@
if test -n "$x_libraries"; then
LDFLAGS="-L$x_libraries $LDFLAGS"
fi
- LIBS="-lXext -lX11 -lm $LIBS"
+ LIBS="-lXext -lX11 $LIBS"
if test -n "$agl_enable_xf86vidmode"; then
diff -urN allegro-4.3.10/addons/allegrogl/configure.in allegro-4.3.10-haiku/addons/allegrogl/configure.in
--- allegro-4.3.10/addons/allegrogl/configure.in 2008-01-01 11:20:16.000000000 +0000
+++ allegro-4.3.10-haiku/addons/allegrogl/configure.in 2008-09-13 19:56:10.000000000 +0000
@@ -54,7 +54,7 @@
dnl Check for pthread support, which GL libs may require (e.g. FreeBSD)
AC_CHECK_HEADER(pthread.h, , dontcare=y)
AC_CHECK_LIB(pthread, pthread_create, LIBS="-lpthread $LIBS")
-
+AC_CHECK_LIB(m, cos, LIBS="-lm $LIBS")
dnl Build Mesa generic driver
if test -n "$agl_build_generic"; then
@@ -76,7 +76,7 @@
if test -n "$x_libraries"; then
LDFLAGS="-L$x_libraries $LDFLAGS"
fi
- LIBS="-lXext -lX11 -lm $LIBS"
+ LIBS="-lXext -lX11 $LIBS"
dnl Test for VidMode extension
diff -urN allegro-4.3.10/addons/jpgalleg/makefile.be allegro-4.3.10-haiku/addons/jpgalleg/makefile.be
--- allegro-4.3.10/addons/jpgalleg/makefile.be 2008-01-01 21:59:18.000000000 +0000
+++ allegro-4.3.10-haiku/addons/jpgalleg/makefile.be 2008-09-13 20:09:02.000000000 +0000
@@ -38,7 +38,7 @@
endif
endif
-LIBS = -lm `../../allegro-config --libs --addon`
+LIBS = `../../allegro-config --libs --addon`
LDFLAGS = -L../../lib/$(PLATFORM_PATH)
INSTALL_LIB_PATH = /boot/develop/lib/x86
INSTALL_HEADER_PATH = /boot/develop/headers
diff -urN allegro-4.3.10/configure allegro-4.3.10-haiku/configure
--- allegro-4.3.10/configure 2008-01-19 23:57:12.000000000 +0000
+++ allegro-4.3.10-haiku/configure 2008-09-13 19:53:14.000000000 +0000
@@ -5436,6 +5436,14 @@
allegro_build_normal_library=yes
_programs="release"
fi
+
+M_LIBS="-lm"
+case "$host_os" in
+ beos* | haiku*)
+ M_LIBS=""
+ ;;
+esac
+
if test "X$allegro_build_static_programs" = "Xyes"; then
LIBALLEG=lib/unix/lib$LIB_TO_LINK.a
LINK_LIBALLEG="$LIBALLEG \$(LIBS)"
@@ -5444,7 +5452,7 @@
_programs="statically linked $_programs"
else
LIBALLEG="lib/unix/lib${LIB_TO_LINK}-\$(shared_version).so lib/unix/lib${LIB_TO_LINK}_unsharable.a"
- LINK_LIBALLEG="-Llib/unix -l${LIB_TO_LINK}-\$(shared_version) -l${LIB_TO_LINK}_unsharable -lm"
+ LINK_LIBALLEG="-Llib/unix -l${LIB_TO_LINK}-\$(shared_version) -l${LIB_TO_LINK}_unsharable $(M_LIBS)"
LINK_WITH_STATIC_LIBS=no
allegro_shared_libraries=yes
_programs="dynamically linked $_programs"
@@ -11167,7 +11175,7 @@
#-----------------------------------------------------------------------------#
-LIBS="-lm $LIBS"
+LIBS="$(M_LIBS) $LIBS"
case "$allegro_system" in
diff -urN allegro-4.3.10/configure.in allegro-4.3.10-haiku/configure.in
--- allegro-4.3.10/configure.in 2008-01-03 20:47:10.000000000 +0000
+++ allegro-4.3.10-haiku/configure.in 2008-09-13 19:52:03.000000000 +0000
@@ -298,6 +298,15 @@
allegro_build_normal_library=yes
_programs="release"
fi
+
+M_LIBS="-lm"
+case "$host_os" in
+ beos* | haiku*)
+ M_LIBS=""
+ ;;
+esac
+
+
if test "X$allegro_build_static_programs" = "Xyes"; then
LIBALLEG=lib/unix/lib$LIB_TO_LINK.a
LINK_LIBALLEG="$LIBALLEG \$(LIBS)"
@@ -306,7 +315,7 @@
_programs="statically linked $_programs"
else
LIBALLEG="lib/unix/lib${LIB_TO_LINK}-\$(shared_version).so lib/unix/lib${LIB_TO_LINK}_unsharable.a"
- LINK_LIBALLEG="-Llib/unix -l${LIB_TO_LINK}-\$(shared_version) -l${LIB_TO_LINK}_unsharable -lm"
+ LINK_LIBALLEG="-Llib/unix -l${LIB_TO_LINK}-\$(shared_version) -l${LIB_TO_LINK}_unsharable $(M_LIBS)"
LINK_WITH_STATIC_LIBS=no
allegro_shared_libraries=yes
_programs="dynamically linked $_programs"
@@ -873,7 +882,7 @@
#-----------------------------------------------------------------------------#
dnl Additional libraries.
-LIBS="-lm $LIBS"
+LIBS="$(M_LIBS) $LIBS"
case "$allegro_system" in

View File

@@ -1,922 +0,0 @@
diff -urN allegro-4.3.10plus/addons/allegrogl/fix.sh allegro-4.3.10plus-haiku/addons/allegrogl/fix.sh
--- allegro-4.3.10plus/addons/allegrogl/fix.sh 2008-10-15 14:42:13.000000000 +0000
+++ allegro-4.3.10plus-haiku/addons/allegrogl/fix.sh 2008-10-15 15:04:09.000000000 +0000
@@ -27,7 +27,7 @@
echo " Usage: fix <platform> [--dtou|--utod|--quick]"
echo ""
echo " <platform> is one of: djgpp, mingw32, unix, macosx,"
- echo " macosx-universal"
+ echo " macosx-universal, beos, haiku"
echo ""
echo " --dtou converts from DOS/Win32 format to Unix"
echo " --utod converts from Unix format to DOS/Win32"
@@ -81,6 +81,7 @@
case "$1" in
djgpp ) proc_fix "DJGPP" "makefile.dj";;
+ haiku ) proc_fix "Haiku" "makefile.gen";;
mingw ) proc_fix "Mingw32" "makefile.mgw";;
mingw32 ) proc_fix "Mingw32" "makefile.mgw";;
# used only by allegro's zipup.sh in packaging process
diff -urN allegro-4.3.10plus/addons/jpgalleg/fix.sh allegro-4.3.10plus-haiku/addons/jpgalleg/fix.sh
--- allegro-4.3.10plus/addons/jpgalleg/fix.sh 2008-10-15 14:40:17.000000000 +0000
+++ allegro-4.3.10plus-haiku/addons/jpgalleg/fix.sh 2008-10-15 15:01:00.000000000 +0000
@@ -85,6 +85,7 @@
"mingw" ) proc_fix "MinGW32" "makefile.mgw";;
"msvc" ) proc_fix "MSVC" "makefile.vc";;
"beos" ) proc_fix "BeOS" "makefile.be";;
+ "haiku" ) proc_fix "Haiku" "makefile.be";;
"unix" ) proc_fix "Unix" "makefile.uni";;
"macosx" ) proc_fix "MacOS X" "makefile.osx";;
"macosx-universal" ) proc_fix_osx_ub ;;
diff -urN allegro-4.3.10plus/addons/loadpng/fix.sh allegro-4.3.10plus-haiku/addons/loadpng/fix.sh
--- allegro-4.3.10plus/addons/loadpng/fix.sh 2008-10-15 14:39:18.000000000 +0000
+++ allegro-4.3.10plus-haiku/addons/loadpng/fix.sh 2008-10-15 15:04:58.000000000 +0000
@@ -8,7 +8,7 @@
echo
echo "Usage: $0 <platform> [--quick|--dtou|--utod]"
echo
- echo "Where platform is one of: djgpp, mingw32, unix, macosx, macosx-universal"
+ echo "Where platform is one of: djgpp, mingw32, unix, macosx, macosx-universal, beos, haiku"
echo "The --quick parameter turns off text file conversion, --dtou converts from"
echo "DOS/Win32 format to Unix, --utod converts from Unix to DOS/Win32 format."
echo "If no parameter is specified --quick is assumed."
@@ -88,7 +88,9 @@
fi
case "$1" in
+ "beos" ) proc_fix "BeOS" "Makefile.be";;
"djgpp" ) proc_fix "DOS (djgpp)" "Makefile.dj";;
+ "haiku" ) proc_fix "Haiku" "Makefile.be";;
"mingw" ) proc_fix "Windows (MinGW)" "Makefile.mgw";;
"mingw32" ) proc_fix "Windows (MinGW)" "Makefile.mgw";;
"unix" ) proc_fix "Unix" "Makefile.unx";;
diff -urN allegro-4.3.10plus/addons/logg/fix.sh allegro-4.3.10plus-haiku/addons/logg/fix.sh
--- allegro-4.3.10plus/addons/logg/fix.sh 2008-10-15 14:42:14.000000000 +0000
+++ allegro-4.3.10plus-haiku/addons/logg/fix.sh 2008-10-15 15:07:15.000000000 +0000
@@ -8,7 +8,8 @@
echo
echo "Usage: $0 <platform> [--quick|--dtou|--utod]"
echo
- echo "Where platform is one of: mingw32, unix, macosx, macosx-universal"
+ echo "Where platform is one of: mingw32, unix, macosx, macosx-universal,"
+ echo " beos, haiku"
echo "The --quick parameter turns off text file conversion, --dtou converts from"
echo "DOS/Win32 format to Unix, --utod converts from Unix to DOS/Win32 format."
echo "If no parameter is specified --quick is assumed."
@@ -80,6 +81,8 @@
fi
case "$1" in
+ "beos" ) proc_fix "BeOS" "Makefile.be";;
+ "haiku" ) proc_fix "Haiku" "Makefile.be";;
"mingw" ) proc_fix "Windows (MinGW)" "Makefile.migw";;
"mingw32" ) proc_fix "Windows (MinGW)" "Makefile.migw";;
"unix" ) proc_fix "Unix" "Makefile.unix";;
diff -urN allegro-4.3.10plus/fix.sh allegro-4.3.10plus-haiku/fix.sh
--- allegro-4.3.10plus/fix.sh 2008-10-15 14:44:47.000000000 +0000
+++ allegro-4.3.10plus-haiku/fix.sh 2008-10-15 15:01:00.000000000 +0000
@@ -9,7 +9,7 @@
echo
echo "Usage: $0 <platform> [--quick|--dtou|--utod]"
echo
- echo "Where platform is one of: bcc32, beos, djgpp, mingw, qnx, unix"
+ echo "Where platform is one of: bcc32, beos, djgpp, haiku, mingw, qnx, unix"
echo "mac, macosx, macosx-universal and watcom."
echo "The --quick parameter turns off text file conversion, --dtou converts from"
echo "DOS/Win32 format to Unix, --utod converts from Unix to DOS/Win32 format."
@@ -90,6 +90,7 @@
"bcc32" ) proc_fix "Windows (BCC32)" "makefile.bcc" "ALLEGRO_BCC32";;
"beos" ) proc_fix "BeOS" "makefile.be" "ALLEGRO_BEOS";;
"djgpp" ) proc_fix "DOS (djgpp)" "makefile.dj" "ALLEGRO_DJGPP";;
+ "haiku" ) proc_fix "Haiku" "makefile.be" "ALLEGRO_HAIKU";;
"mingw" ) proc_fix "Windows (MinGW)" "makefile.mgw" "ALLEGRO_MINGW32";;
"mingw32" ) proc_fix "Windows (MinGW)" "makefile.mgw" "ALLEGRO_MINGW32";;
# The 'msvc' target is undocumented in the help message, but is used
diff -urN allegro-4.3.10plus/include/allegro/internal/aintern.h allegro-4.3.10plus-haiku/include/allegro/internal/aintern.h
--- allegro-4.3.10plus/include/allegro/internal/aintern.h 2008-10-15 14:42:48.000000000 +0000
+++ allegro-4.3.10plus-haiku/include/allegro/internal/aintern.h 2008-10-15 15:01:00.000000000 +0000
@@ -190,7 +190,7 @@
#if (defined ALLEGRO_DOS) || (defined ALLEGRO_DJGPP) || (defined ALLEGRO_WATCOM) || \
- (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS)
+ (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS) || (defined ALLEGRO_HAIKU)
AL_ARRAY(char *, _pckeys_names);
diff -urN allegro-4.3.10plus/include/allegro/internal/alconfig.h allegro-4.3.10plus-haiku/include/allegro/internal/alconfig.h
--- allegro-4.3.10plus/include/allegro/internal/alconfig.h 2008-10-15 14:42:48.000000000 +0000
+++ allegro-4.3.10plus-haiku/include/allegro/internal/alconfig.h 2008-10-15 15:01:00.000000000 +0000
@@ -48,6 +48,8 @@
#include "allegro/platform/albcc32.h"
#elif defined ALLEGRO_MSVC
#include "allegro/platform/almsvc.h"
+ #elif defined ALLEGRO_HAIKU
+ #include "allegro/platform/albecfg.h"
#elif defined ALLEGRO_BEOS
#include "allegro/platform/albecfg.h"
#elif defined ALLEGRO_MPW
diff -urN allegro-4.3.10plus/include/allegro/platform/albecfg.h allegro-4.3.10plus-haiku/include/allegro/platform/albecfg.h
--- allegro-4.3.10plus/include/allegro/platform/albecfg.h 2008-10-15 14:42:46.000000000 +0000
+++ allegro-4.3.10plus-haiku/include/allegro/platform/albecfg.h 2008-10-15 15:01:00.000000000 +0000
@@ -31,7 +31,13 @@
#define ALLEGRO_HAVE_SYS_TIME_H 1
/* describe this platform */
-#define ALLEGRO_PLATFORM_STR "BeOS"
+#if defined __BEOS__ && !defined __HAIKU__
+ #define ALLEGRO_PLATFORM_STR "BeOS"
+#endif
+#if defined __HAIKU__
+ #define ALLEGRO_PLATFORM_STR "Haiku"
+ #define ALLEGRO_HAVE_LIBPTHREAD 1
+#endif
#define ALLEGRO_LITTLE_ENDIAN
#define ALLEGRO_CONSOLE_OK
#define ALLEGRO_USE_CONSTRUCTOR
diff -urN allegro-4.3.10plus/include/allegro/platform/albeos.h allegro-4.3.10plus-haiku/include/allegro/platform/albeos.h
--- allegro-4.3.10plus/include/allegro/platform/albeos.h 2008-10-15 14:42:46.000000000 +0000
+++ allegro-4.3.10plus-haiku/include/allegro/platform/albeos.h 2008-10-15 15:01:00.000000000 +0000
@@ -74,3 +74,7 @@
#define JOYSTICK_DRIVER_BEOS \
{ JOYSTICK_BEOS, &joystick_beos, TRUE },
+#if defined __HAIKU__
+#define TIMERDRV_UNIX_PTHREADS AL_ID('P','T','H','R')
+#endif
+
diff -urN allegro-4.3.10plus/include/allegro/platform/alunixac.hin allegro-4.3.10plus-haiku/include/allegro/platform/alunixac.hin
--- allegro-4.3.10plus/include/allegro/platform/alunixac.hin 2008-10-15 14:42:46.000000000 +0000
+++ allegro-4.3.10plus-haiku/include/allegro/platform/alunixac.hin 2008-10-15 15:01:00.000000000 +0000
@@ -68,7 +68,7 @@
#undef ALLEGRO_DARWIN
/* Define if you have the pthread library. */
-#undef ALLEGRO_HAVE_LIBPTHREAD
+/* #undef ALLEGRO_HAVE_LIBPTHREAD */
/* Define if constructor attribute is supported. */
#undef ALLEGRO_USE_CONSTRUCTOR
@@ -159,7 +159,7 @@
/* Define as the return type of signal handlers (`int' or `void'). */
/* TODO: rename this */
-#undef RETSIGTYPE
+/* #undef RETSIGTYPE */
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
diff -urN allegro-4.3.10plus/include/allegro/system.h allegro-4.3.10plus-haiku/include/allegro/system.h
--- allegro-4.3.10plus/include/allegro/system.h 2008-10-15 14:42:57.000000000 +0000
+++ allegro-4.3.10plus-haiku/include/allegro/system.h 2008-10-15 15:01:00.000000000 +0000
@@ -61,6 +61,7 @@
#define OSTYPE_QNX AL_ID('Q','N','X',' ')
#define OSTYPE_UNIX AL_ID('U','N','I','X')
#define OSTYPE_BEOS AL_ID('B','E','O','S')
+#define OSTYPE_HAIKU AL_ID('H','A','I','K')
#define OSTYPE_MACOS AL_ID('M','A','C',' ')
#define OSTYPE_MACOSX AL_ID('M','A','C','X')
diff -urN allegro-4.3.10plus/makefile.all allegro-4.3.10plus-haiku/makefile.all
--- allegro-4.3.10plus/makefile.all 2008-10-15 14:44:47.000000000 +0000
+++ allegro-4.3.10plus-haiku/makefile.all 2008-10-15 15:01:00.000000000 +0000
@@ -8,7 +8,7 @@
# DEBUGMODE=2 selects a build intended to debug Allegro itself.
# PROFILEMODE=1 selects a profiling build.
# WARNMODE=1 selects strict compiler warnings.
-# STATICLINK=1 use static linking (MinGW32, MSVC, BeOS).
+# STATICLINK=1 use static linking (MinGW32, MSVC, BeOS, Haiku).
# STATICRUNTIME=1 link to a static C runtime library (/MT) (MSVC)
# TARGET_ARCH_COMPAT optimize for the given processor while preserving backwards
# compatibility with older processors (GCC-based platforms).
@@ -132,7 +132,7 @@
# XXX this is duplicated in makefile.in
DOCBASEFILES = ahack changes faq mistakes help thanks allegro const abi api packfile \
readme makedoc datafile grabber dat dat2c dat2s license addons targets
-DOCBUILDFILES = bcc32 beos darwin djgpp dmc linux macosx mingw32 msvc qnx unix watcom
+DOCBUILDFILES = bcc32 beos darwin djgpp dmc haiku linux macosx mingw32 msvc qnx unix watcom
DOCTXTBUILDFILES = $(addprefix docs/build/,$(addsuffix .txt,$(DOCBUILDFILES)))
DOCS = $(addprefix docs/txt/,$(addsuffix .txt,$(filter-out changes thanks readme, $(DOCBASEFILES))))
diff -urN allegro-4.3.10plus/makefile.be allegro-4.3.10plus-haiku/makefile.be
--- allegro-4.3.10plus/makefile.be 2008-10-15 14:44:47.000000000 +0000
+++ allegro-4.3.10plus-haiku/makefile.be 2008-10-15 15:01:00.000000000 +0000
@@ -10,11 +10,20 @@
# -------- define some variables that the primary makefile will use --------
+OS=$(shell uname -s)
+
+ifeq ($(OS),BeOS)
PLATFORM = BeOS
+endif
+
+ifeq ($(OS),Haiku)
+PLATFORM = Haiku
+endif
+
CC = gcc
EXE =
OBJ = .o
-HTML = html
+#HTML = html
PLATFORM_DIR = obj/beos
@@ -109,7 +118,7 @@
# ------ build a C-only version ------
VPATH += src/c
-MY_OBJECTS = $(C_OBJECTS) cmiscs
+MY_OBJECTS = $(C_OBJECTS)
CFLAGS += -DALLEGRO_NO_ASM
else
@@ -123,7 +132,13 @@
OBJECT_LIST = $(COMMON_OBJECTS) $(MY_OBJECTS) $(basename $(notdir $(ALLEGRO_SRC_BEOS_FILES)))
+ifeq ($(OS),BeOS)
LIBRARIES = -lbe -lgame -ldevice -lmidi -lmedia -lnet
+endif
+
+ifeq ($(OS),Haiku)
+LIBRARIES = -lbe -lgame -ldevice -lmidi -lmedia -lnetwork
+endif
PROGRAMS = bfixicon
@@ -135,11 +150,21 @@
# -------- rules for installing and removing the library files --------
+ifeq ($(OS),BeOS)
INSTALLDIR = /boot/develop
LIBDIR = lib/x86
INCDIR = headers
SHARED_LIBDIR = /boot/home/config/lib
+endif
+
+ifeq ($(OS),Haiku)
+INSTALLDIR = /boot/common
+LIBDIR = lib
+INCDIR = include
+
+SHARED_LIBDIR = /boot/common/lib
+endif
ifdef STATICLINK
@@ -167,7 +192,14 @@
sed -e "s/@LIBS@/$(LIBRARIES)/" temp2 > temp
sed -e "s/include/headers/" temp >temp2
sed -e "s/ -l\$${lib_type}_unsharable//" temp2 >temp
+
+ifeq ($(OS),BeOS)
sed -e "s/libdirs=-L\$${exec_prefix}\/lib/libdirs=\"-L\$${exec_prefix}\/lib\/x86 -L\/boot\/home\/config\/lib\"/" temp >/bin/allegro-config
+endif
+ifeq ($(OS),Haiku)
+ sed -e "s/libdirs=-L\$${exec_prefix}\/lib/libdirs=\"-L\$${exec_prefix}\/lib\/x86 -L\/boot\/common\/lib\"/" temp >/bin/allegro-config
+endif
+
rm -f temp temp2
chmod a+x /bin/allegro-config
diff -urN allegro-4.3.10plus/misc/mkunixdists.sh allegro-4.3.10plus-haiku/misc/mkunixdists.sh
--- allegro-4.3.10plus/misc/mkunixdists.sh 2008-10-15 14:43:09.000000000 +0000
+++ allegro-4.3.10plus-haiku/misc/mkunixdists.sh 2008-10-15 15:01:00.000000000 +0000
@@ -73,9 +73,9 @@
# Hack'n'slash
echo "Stripping to form end-user distribution"
(cd $dir/$basename && {
- (cd src && rm -rf beos qnx dos mac ppc win)
- (cd obj && rm -rf bcc32 beos qnx djgpp mingw32 msvc watcom)
- (cd lib && rm -rf bcc32 beos qnx djgpp mingw32 msvc watcom)
+ (cd src && rm -rf beos haiku qnx dos mac ppc win)
+ (cd obj && rm -rf bcc32 beos haiku qnx djgpp mingw32 msvc watcom)
+ (cd lib && rm -rf bcc32 beos haiku qnx djgpp mingw32 msvc watcom)
(cd include && rm -f bealleg.h qnxalleg.h macalleg.h winalleg.h)
(cd misc && rm -f cmplog.pl dllsyms.lst findtext.sh fixpatch.sh fixver.sh)
(cd misc && rm -f allegro-config-qnx.sh zipup.sh zipwin.sh *.bat *.c)
@@ -94,8 +94,8 @@
(cd addons/jpgalleg && rm -f makefile.be makefile.mgw makefile.dj)
(cd addons/jpgalleg && rm -f makefile.osx makefile.vc fix.bat readme.txt)
(cd addons/jpgalleg/misc && rm -f fixver.sh runner.c)
- (cd addons/jpgalleg/lib && rm -rf beos djgpp macosx mingw32 msvc)
- (cd addons/jpgalleg/obj && rm -rf beos djgpp macosx mingw32 msvc)
+ (cd addons/jpgalleg/lib && rm -rf beos djgpp haiku macosx mingw32 msvc)
+ (cd addons/jpgalleg/obj && rm -rf beos djgpp haiku macosx mingw32 msvc)
# logg addon
(cd addons/logg && rm -f Makefile.mingw play_ogg.c stream_ogg.c fix.bat)
diff -urN allegro-4.3.10plus/misc/zipup.sh allegro-4.3.10plus-haiku/misc/zipup.sh
--- allegro-4.3.10plus/misc/zipup.sh 2008-10-15 14:43:09.000000000 +0000
+++ allegro-4.3.10plus-haiku/misc/zipup.sh 2008-10-15 15:01:00.000000000 +0000
@@ -125,6 +125,12 @@
make depend UNIX_TOOLS=1 CC=gcc
+# generate dependencies for Haiku
+echo "Generating Haiku dependencies..."
+
+./fix.sh haiku --quick
+
+make depend UNIX_TOOLS=1 CC=gcc
# generate dependencies for QNX
echo "Generating QNX dependencies..."
@@ -164,7 +170,7 @@
for base in abi ahack allegro const faq help mistakes; do
./_makedoc.exe -ascii docs/txt/$base.txt docs/src/$base._tx
done
-for base in bcc32 beos darwin djgpp linux macosx mingw32 msvc qnx unix watcom; do
+for base in bcc32 beos darwin djgpp haiku linux macosx mingw32 msvc qnx unix watcom; do
./_makedoc.exe -ascii docs/build/$base.txt docs/src/build/$base._tx
done
diff -urN allegro-4.3.10plus/setup/keyconf.c allegro-4.3.10plus-haiku/setup/keyconf.c
--- allegro-4.3.10plus/setup/keyconf.c 2008-10-15 14:43:30.000000000 +0000
+++ allegro-4.3.10plus-haiku/setup/keyconf.c 2008-10-15 15:01:00.000000000 +0000
@@ -25,8 +25,8 @@
/* The code can't link on platforms that don't use src/misc/pckeys.c (everything
- * but DOS, QNX, BEOS). */
-#if (defined ALLEGRO_DOS) || (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS)
+ * but DOS, QNX, BEOS, HAIKU). */
+#if (defined ALLEGRO_DOS) || (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS) || (defined ALLEGRO_HAIKU)
char *ascii_name[32] =
diff -urN allegro-4.3.10plus/src/beos/baccel.cpp allegro-4.3.10plus-haiku/src/beos/baccel.cpp
--- allegro-4.3.10plus/src/beos/baccel.cpp 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/baccel.cpp 2008-10-15 15:01:00.000000000 +0000
@@ -20,7 +20,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10plus/src/beos/bdispsw.cpp allegro-4.3.10plus-haiku/src/beos/bdispsw.cpp
--- allegro-4.3.10plus/src/beos/bdispsw.cpp 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bdispsw.cpp 2008-10-15 15:01:00.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10plus/src/beos/bdwindow.cpp allegro-4.3.10plus-haiku/src/beos/bdwindow.cpp
--- allegro-4.3.10plus/src/beos/bdwindow.cpp 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bdwindow.cpp 2008-10-15 15:01:00.000000000 +0000
@@ -21,7 +21,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
@@ -260,8 +260,10 @@
cmap[i] = BScreen().IndexForColor(((i >> 4) & 0xF0) | (i >> 8), (i & 0xF0) | ((i >> 4) & 0xF), (i & 0xF) | ((i & 0xF) << 4));
}
}
+#if 0
TRACE(PREFIX_I "Color conversion mode set: %d->%d\n",
(int)screen_depth, (int)display_depth);
+#endif
}
if (rects) {
diff -urN allegro-4.3.10plus/src/beos/bgfx.c allegro-4.3.10plus-haiku/src/beos/bgfx.c
--- allegro-4.3.10plus/src/beos/bgfx.c 2008-10-15 14:29:36.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bgfx.c 2008-10-15 15:01:00.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
diff -urN allegro-4.3.10plus/src/beos/bgfxapi.cpp allegro-4.3.10plus-haiku/src/beos/bgfxapi.cpp
--- allegro-4.3.10plus/src/beos/bgfxapi.cpp 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bgfxapi.cpp 2008-10-15 15:01:00.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10plus/src/beos/bgfxdrv.c allegro-4.3.10plus-haiku/src/beos/bgfxdrv.c
--- allegro-4.3.10plus/src/beos/bgfxdrv.c 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bgfxdrv.c 2008-10-15 15:01:00.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BEGIN_GFX_DRIVER_LIST
GFX_DRIVER_BEOS
diff -urN allegro-4.3.10plus/src/beos/bjoy.c allegro-4.3.10plus-haiku/src/beos/bjoy.c
--- allegro-4.3.10plus/src/beos/bjoy.c 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bjoy.c 2008-10-15 15:01:00.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10plus/src/beos/bjoyapi.cpp allegro-4.3.10plus-haiku/src/beos/bjoyapi.cpp
--- allegro-4.3.10plus/src/beos/bjoyapi.cpp 2008-10-15 14:29:36.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bjoyapi.cpp 2008-10-15 15:01:00.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
static BJoystick *be_joy = NULL;
static int32 num_devices, num_axes, num_hats, num_buttons;
@@ -64,12 +64,12 @@
device_config = get_config_string("joystick", "joystick_device", "");
/* Let's try to open selected device */
- if ((device_config[0] == '\0') || (be_joy->Open(device_config) < 0)) {
+ if ((device_config[0] == '\0') || (be_joy->Open(device_config, true) < 0)) {
/* ok, let's try to open first available device */
if (be_joy->GetDeviceName(0, device_name) != B_OK) {
goto cleanup;
}
- if (be_joy->Open(device_name) == B_ERROR) {
+ if (be_joy->Open(device_name, true) == B_ERROR) {
goto cleanup;
}
}
diff -urN allegro-4.3.10plus/src/beos/bjoydrv.c allegro-4.3.10plus-haiku/src/beos/bjoydrv.c
--- allegro-4.3.10plus/src/beos/bjoydrv.c 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bjoydrv.c 2008-10-15 15:01:00.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BEGIN_JOYSTICK_DRIVER_LIST
JOYSTICK_DRIVER_BEOS
diff -urN allegro-4.3.10plus/src/beos/bkey.c allegro-4.3.10plus-haiku/src/beos/bkey.c
--- allegro-4.3.10plus/src/beos/bkey.c 2008-10-15 14:29:36.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bkey.c 2008-10-15 15:01:00.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
diff -urN allegro-4.3.10plus/src/beos/bkeyapi.cpp allegro-4.3.10plus-haiku/src/beos/bkeyapi.cpp
--- allegro-4.3.10plus/src/beos/bkeyapi.cpp 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bkeyapi.cpp 2008-10-15 15:01:00.000000000 +0000
@@ -22,9 +22,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
#define KEY_ID_PC101 0 // the docs say it should be 0x83ab, but they lie
@@ -260,7 +260,9 @@
key_info_old = key_info_new;
}
+#if 0
TRACE(PREFIX_I "keyboard thread exited\n");
+#endif
return 0;
}
diff -urN allegro-4.3.10plus/src/beos/bkeydrv.c allegro-4.3.10plus-haiku/src/beos/bkeydrv.c
--- allegro-4.3.10plus/src/beos/bkeydrv.c 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bkeydrv.c 2008-10-15 15:01:01.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
_DRIVER_INFO _keyboard_driver_list[] =
{
diff -urN allegro-4.3.10plus/src/beos/bmidi.c allegro-4.3.10plus-haiku/src/beos/bmidi.c
--- allegro-4.3.10plus/src/beos/bmidi.c 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bmidi.c 2008-10-15 15:01:01.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
MIDI_DRIVER midi_beos =
{
diff -urN allegro-4.3.10plus/src/beos/bmidiapi.cpp allegro-4.3.10plus-haiku/src/beos/bmidiapi.cpp
--- allegro-4.3.10plus/src/beos/bmidiapi.cpp 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bmidiapi.cpp 2008-10-15 15:01:01.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BMidiSynth *_be_midisynth = NULL;
diff -urN allegro-4.3.10plus/src/beos/bmididrv.c allegro-4.3.10plus-haiku/src/beos/bmididrv.c
--- allegro-4.3.10plus/src/beos/bmididrv.c 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bmididrv.c 2008-10-15 15:01:01.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BEGIN_MIDI_DRIVER_LIST
MIDI_DRIVER_BEOS
diff -urN allegro-4.3.10plus/src/beos/bmousapi.cpp allegro-4.3.10plus-haiku/src/beos/bmousapi.cpp
--- allegro-4.3.10plus/src/beos/bmousapi.cpp 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bmousapi.cpp 2008-10-15 15:01:01.000000000 +0000
@@ -23,9 +23,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
#define MOUSE_THREAD_NAME "mouse driver"
#define MOUSE_THREAD_PRIORITY 60
@@ -78,7 +78,9 @@
if (mouse_thread_running == false) {
release_sem(_be_mouse_view_attached);
+#if 0
TRACE(PREFIX_I "mouse thread exited\n");
+#endif
return 0;
}
diff -urN allegro-4.3.10plus/src/beos/bmousdrv.c allegro-4.3.10plus-haiku/src/beos/bmousdrv.c
--- allegro-4.3.10plus/src/beos/bmousdrv.c 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bmousdrv.c 2008-10-15 15:01:01.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
diff -urN allegro-4.3.10plus/src/beos/bmouse.c allegro-4.3.10plus-haiku/src/beos/bmouse.c
--- allegro-4.3.10plus/src/beos/bmouse.c 2008-10-15 14:29:36.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bmouse.c 2008-10-15 15:01:01.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
diff -urN allegro-4.3.10plus/src/beos/boverlay.cpp allegro-4.3.10plus-haiku/src/beos/boverlay.cpp
--- allegro-4.3.10plus/src/beos/boverlay.cpp 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/boverlay.cpp 2008-10-15 15:01:01.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10plus/src/beos/bsnd.c allegro-4.3.10plus-haiku/src/beos/bsnd.c
--- allegro-4.3.10plus/src/beos/bsnd.c 2008-10-15 14:29:36.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bsnd.c 2008-10-15 15:01:01.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
DIGI_DRIVER digi_beos =
{
diff -urN allegro-4.3.10plus/src/beos/bsndapi.cpp allegro-4.3.10plus-haiku/src/beos/bsndapi.cpp
--- allegro-4.3.10plus/src/beos/bsndapi.cpp 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bsndapi.cpp 2008-10-15 15:01:01.000000000 +0000
@@ -20,7 +20,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10plus/src/beos/bsnddrv.c allegro-4.3.10plus-haiku/src/beos/bsnddrv.c
--- allegro-4.3.10plus/src/beos/bsnddrv.c 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bsnddrv.c 2008-10-15 15:01:01.000000000 +0000
@@ -19,9 +19,9 @@
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
BEGIN_DIGI_DRIVER_LIST
DIGI_DRIVER_BEOS
diff -urN allegro-4.3.10plus/src/beos/bsysapi.cpp allegro-4.3.10plus-haiku/src/beos/bsysapi.cpp
--- allegro-4.3.10plus/src/beos/bsysapi.cpp 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bsysapi.cpp 2008-10-15 15:01:01.000000000 +0000
@@ -27,9 +27,9 @@
#include <sys/utsname.h>
#endif
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
#define SYS_THREAD_PRIORITY B_NORMAL_PRIORITY
#define SYS_THREAD_NAME "system driver"
@@ -144,7 +144,9 @@
_be_allegro_app->Run();
+#if 0
TRACE(PREFIX_I "system thread exited\n");
+#endif
return 0;
}
@@ -201,8 +203,6 @@
uname(&os_name);
os_type = OSTYPE_BEOS;
os_multitasking = TRUE;
- os_version = atoi(strtok(os_name.release, "."));
- os_revision = atoi(strtok(NULL, "."));
chdir(app_path);
diff -urN allegro-4.3.10plus/src/beos/bsysdrv.c allegro-4.3.10plus-haiku/src/beos/bsysdrv.c
--- allegro-4.3.10plus/src/beos/bsysdrv.c 2008-10-15 14:29:36.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bsysdrv.c 2008-10-15 15:01:01.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
_DRIVER_INFO _system_driver_list[] =
{
diff -urN allegro-4.3.10plus/src/beos/bsystem.c allegro-4.3.10plus-haiku/src/beos/bsystem.c
--- allegro-4.3.10plus/src/beos/bsystem.c 2008-10-15 14:29:36.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bsystem.c 2008-10-15 15:01:01.000000000 +0000
@@ -19,11 +19,9 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
-
-
+#endif
SYSTEM_DRIVER system_beos = {
SYSTEM_BEOS,
diff -urN allegro-4.3.10plus/src/beos/btimeapi.cpp allegro-4.3.10plus-haiku/src/beos/btimeapi.cpp
--- allegro-4.3.10plus/src/beos/btimeapi.cpp 2008-10-15 14:29:36.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/btimeapi.cpp 2008-10-15 15:01:01.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10plus/src/beos/btimedrv.c allegro-4.3.10plus-haiku/src/beos/btimedrv.c
--- allegro-4.3.10plus/src/beos/btimedrv.c 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/btimedrv.c 2008-10-15 15:01:01.000000000 +0000
@@ -18,9 +18,9 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
-#endif
+#endif
_DRIVER_INFO _timer_driver_list[] = {
{TIMER_BEOS, &timer_beos, TRUE},
diff -urN allegro-4.3.10plus/src/beos/btimer.c allegro-4.3.10plus-haiku/src/beos/btimer.c
--- allegro-4.3.10plus/src/beos/btimer.c 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/btimer.c 2008-10-15 15:01:01.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
diff -urN allegro-4.3.10plus/src/beos/bwindow.cpp allegro-4.3.10plus-haiku/src/beos/bwindow.cpp
--- allegro-4.3.10plus/src/beos/bwindow.cpp 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bwindow.cpp 2008-10-15 15:01:01.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
@@ -117,7 +117,7 @@
/* _be_gfx_bwindow_read_write_bank:
* Returns new line and marks it as dirty.
*/
-extern "C" unsigned long _be_gfx_bwindow_read_write_bank(BITMAP *bmp, int line)
+extern "C" uintptr_t _be_gfx_bwindow_read_write_bank(BITMAP *bmp, int line)
{
if (!bmp->id & BMP_ID_LOCKED) {
bmp->id |= (BMP_ID_LOCKED | BMP_ID_AUTOLOCK);
diff -urN allegro-4.3.10plus/src/beos/bwscreen.cpp allegro-4.3.10plus-haiku/src/beos/bwscreen.cpp
--- allegro-4.3.10plus/src/beos/bwscreen.cpp 2008-10-15 14:29:35.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/beos/bwscreen.cpp 2008-10-15 15:01:01.000000000 +0000
@@ -19,7 +19,7 @@
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintbeos.h"
-#ifndef ALLEGRO_BEOS
+#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU
#error something is wrong with the makefile
#endif
@@ -474,7 +474,7 @@
/* be_gfx_bwindowscreen_read_write_bank:
* Returns new line and synchronizes framebuffer if needed.
*/
-extern "C" unsigned long be_gfx_bwindowscreen_read_write_bank(BITMAP *bmp, int line)
+extern "C" uintptr_t be_gfx_bwindowscreen_read_write_bank(BITMAP *bmp, int line)
{
if (!(bmp->id & BMP_ID_LOCKED)) {
_be_sync_func();
@@ -490,7 +490,7 @@
*/
extern "C" void be_gfx_bwindowscreen_unwrite_bank(BITMAP *bmp)
{
- if (bmp->id & BMP_AUTOLOCK) {
+ if (bmp->id & BMP_ID_AUTOLOCK) {
bmp->id &= ~(BMP_ID_LOCKED | BMP_ID_AUTOLOCK);
}
}
diff -urN allegro-4.3.10plus/src/i386/asmdefs.inc allegro-4.3.10plus-haiku/src/i386/asmdefs.inc
--- allegro-4.3.10plus/src/i386/asmdefs.inc 2008-10-15 14:31:06.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/i386/asmdefs.inc 2008-10-15 15:01:01.000000000 +0000
@@ -31,6 +31,8 @@
#include "obj/msvc/asmdef.inc"
#elif defined ALLEGRO_WATCOM
#include "obj/watcom/asmdef.inc"
+#elif defined ALLEGRO_HAIKU
+ #include "obj/beos/asmdef.inc"
#elif defined ALLEGRO_BEOS
#include "obj/beos/asmdef.inc"
#elif defined ALLEGRO_QNX
diff -urN allegro-4.3.10plus/src/midi.c allegro-4.3.10plus-haiku/src/midi.c
--- allegro-4.3.10plus/src/midi.c 2008-10-15 14:33:58.000000000 +0000
+++ allegro-4.3.10plus-haiku/src/midi.c 2008-10-15 15:01:01.000000000 +0000
@@ -1122,7 +1122,7 @@
running_status = 0;
while (p < end) { /* work through data stream */
-#ifdef ALLEGRO_BEOS
+#if defined ALLEGRO_BEOS || defined ALLEGRO_HAIKU
/* Is there a bug in this routine, or in gcc under BeOS/x86? --PW */
{ int i; for (i=1; i; i--); }
#endif
diff -urN allegro-4.3.10plus/tools/dat2c.c allegro-4.3.10plus-haiku/tools/dat2c.c
--- allegro-4.3.10plus/tools/dat2c.c 2008-10-15 14:36:09.000000000 +0000
+++ allegro-4.3.10plus-haiku/tools/dat2c.c 2008-10-15 15:01:01.000000000 +0000
@@ -342,7 +342,7 @@
}
if (dat2c->lformat == lineformat_default)
-#if (defined ALLEGRO_UNIX || defined ALLEGRO_QNX || defined ALLEGRO_BEOS || defined ALLEGRO_MACOSX)
+#if (defined ALLEGRO_UNIX || defined ALLEGRO_QNX || defined ALLEGRO_BEOS || defined ALLEGRO_HAIKU || defined ALLEGRO_MACOSX)
dat2c->lformat = lineformat_unix;
#elif (defined ALLEGRO_WINDOWS || defined ALLEGRO_DOS)
dat2c->lformat = lineformat_dos;
diff -urN allegro-4.3.10plus/tools/datedit.c allegro-4.3.10plus-haiku/tools/datedit.c
--- allegro-4.3.10plus/tools/datedit.c 2008-10-15 14:36:09.000000000 +0000
+++ allegro-4.3.10plus-haiku/tools/datedit.c 2008-10-15 15:01:01.000000000 +0000
@@ -121,6 +121,8 @@
#include "obj/dmc/plugins.h"
#elif defined ALLEGRO_BEOS
#include "obj/beos/plugins.h"
+ #elif defined ALLEGRO_HAIKU
+ #include "obj/beos/plugins.h"
#elif defined ALLEGRO_BCC32
#include "obj/bcc32/plugins.h"
#elif defined ALLEGRO_MPW
diff -urN allegro-4.3.10plus/tools/grabber.c allegro-4.3.10plus-haiku/tools/grabber.c
--- allegro-4.3.10plus/tools/grabber.c 2008-10-15 14:36:09.000000000 +0000
+++ allegro-4.3.10plus-haiku/tools/grabber.c 2008-10-15 15:01:01.000000000 +0000
@@ -3132,6 +3132,7 @@
case OSTYPE_QNX: s = "QNX"; break;
case OSTYPE_UNIX: s = "Unix"; break;
case OSTYPE_BEOS: s = "BeOS"; break;
+ case OSTYPE_HAIKU: s = "Haiku"; break;
case OSTYPE_MACOS: s = "MacOS"; break;
case OSTYPE_MACOSX: s = "MacOS X"; break;
default: s = "Unknown"; break;

View File

@@ -1,27 +0,0 @@
DESCRIPTION="FTGL is a free cross-platform Open Source C++ library that uses Freetype2 to simplify rendering fonts in OpenGL applications"
HOMEPAGE="http://sourceforge.net/projects/ftgl"
SRC_URI="svn+https://ftgl.svn.sourceforge.net/svnroot/ftgl/trunk"
#CHECKSUM_MD5=""
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="pkgconfig >= 0.23"
BUILD()
{
cd ftgl-2.1-svn
libtoolize --copy --force --install
aclocal --install -I m4
./autogen.sh
./configure --prefix=`finddir B_COMMON_DIRECTORY`
make
}
INSTALL()
{
cd ftgl-2.1-svn
make install DESTDIR=${DESTDIR}
}
LICENSE="MIT"
COPYRIGHT="2001-2004 Unicode, Inc.
2001-2010 Henry Maddocks"

View File

@@ -1,21 +0,0 @@
DESCRIPTION="Libnsbmp is a decoding library for BMP and ICO image file formats"
HOMEPAGE="http://www.netsurf-browser.org/projects/libnsbmp/"
SRC_URI="git://git.netsurf-browser.org/libnsbmp.git"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="dev-util/buildsystem >= 0"
BUILD()
{
cd libnsbmp-0.0.3-HEAD
make PREFIX=/boot/common
}
INSTALL()
{
cd libnsbmp-0.0.3-HEAD
make install PREFIX=/boot/common
}
LICENSE="MIT"
COPYRIGHT="2003 - 2012 The NetSurf Developers"

View File

@@ -1,25 +0,0 @@
DESCRIPTION="OpenAL - A software implementation of the OpenAL 3D audio API"
HOMEPAGE="http://kcat.strangesoft.net/openal.html"
SRC_URI="git+git://repo.or.cz/openal-soft.git"
#CHECKSUM_MD5=""
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="dev-util/cmake >= 2.8.0"
BUILD()
{
cd openal-1.12-git
cmake .
make
}
INSTALL()
{
cd openal-1.12-git
make install
}
LICENSE="GNU LGPL v2.1"
COPYRIGHT="1999-2000 Loki Software
2005-2010 OpenAL Soft team"

View File

@@ -1,5 +0,0 @@
Package: sdl-image
Version: 1.2.10
Copyright: 1997-2009 Sam Lantinga and Mattias Engdegård
License: GNU LGPL v2.1
URL: http://www.libsdl.org/projects/SDL_image/

View File

@@ -1,35 +0,0 @@
DESCRIPTION="Speex"
HOMEPAGE="http://www.speex.org"
SRC_URI="git+http://git.xiph.org/speex.git"
#CHECKSUM_MD5="c4438b22c08e5811ff10e2b06ee9b9ae"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="libogg >= 1.2.0"
BUILD()
{
cd speex-1.2-git
libtoolize --copy --force --install
echo 'AC_CONFIG_MACRO_DIR([m4])' >> configure.ac
autogen.sh --prefix=`finddir B_COMMON_DIRECTORY`
sed -i 's/$(datadir)\/aclocal/`finddir B_COMMON_DATA_DIRECTORY`\/aclocal/g' M*
COMMON_DOCS=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
--datarootdir=$COMMON_DOCS \
--libdir=`finddir B_COMMON_LIB_DIRECTORY` \
--mandir=$COMMON_DIR/man
make
}
INSTALL()
{
cd speex-1.2-git
make install
}
LICENSE="Speex"
COPYRIGHT="2002-2009 Xiph.org Foundation
2002-2008 Jean-Marc Valin
2005-2007 Analog Devices Inc.
2005-2008 Commonwealth Scientific and Industrial Research Organisation (CSIRO)
1993, 2002, 2006 David Rowe
2003 EpicGames
1992-1994 Jutta Degener, Carsten Bormann"