mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 06:28:55 +02:00
326 lines
14 KiB
Diff
326 lines
14 KiB
Diff
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;
|