From 526dba76a0c77ad0ee5a5b749f41345599991097 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 3 Sep 2014 16:22:32 +0000
Subject: Include <strings.h>


diff --git a/src/ppui/BasicTypes.h b/src/ppui/BasicTypes.h
index 20eba8b..63e0c1c 100644
--- a/src/ppui/BasicTypes.h
+++ b/src/ppui/BasicTypes.h
@@ -43,7 +43,7 @@ typedef signed int		pp_int32;
 	#include <stdio.h>
 	#include <stdlib.h>
 	#include <string.h>
-	#include <string.h>
+	#include <strings.h>
 	#include "VirtualKeys.h"
 	#include "PPSystemString_POSIX.h"
 #endif
-- 
2.30.2


From 6f2b4b90b2db90dc08527899d799632d20067b70 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 23 May 2017 23:34:15 +0200
Subject: Build update for 1.0.3.00


diff --git a/platforms/haiku/Add_Jamfiles.sh b/platforms/haiku/Add_Jamfiles.sh
index c4601e8..1bcd1b3 100644
--- a/platforms/haiku/Add_Jamfiles.sh
+++ b/platforms/haiku/Add_Jamfiles.sh
@@ -7,7 +7,6 @@ echo "Copying Jamfiles..."
 cp Jamfiles/Jamfile $MILKY_ROOT
 cp Jamfiles/Jamrules $MILKY_ROOT
 cp Jamfiles/src-compression-Jamfile $MILKY_ROOT/src/compression/Jamfile
-cp Jamfiles/src-compression-zzlib-generic-Jamfile $MILKY_ROOT/src/compression/zziplib/generic/Jamfile
 cp Jamfiles/src-fx-Jamfile $MILKY_ROOT/src/fx/Jamfile
 cp Jamfiles/src-midi-Jamfile $MILKY_ROOT/src/midi/Jamfile
 cp Jamfiles/src-milkyplay-Jamfile $MILKY_ROOT/src/milkyplay/Jamfile
diff --git a/platforms/haiku/Jamfiles/Jamfile b/platforms/haiku/Jamfiles/Jamfile
index a549511..8c3f7e5 100644
--- a/platforms/haiku/Jamfiles/Jamfile
+++ b/platforms/haiku/Jamfiles/Jamfile
@@ -1,7 +1,6 @@
 SubDir TOP ;
 
 SubInclude TOP src compression ;
-SubInclude TOP src compression zziplib generic ;
 SubInclude TOP src fx ;
 SubInclude TOP src midi ;
 SubInclude TOP src milkyplay ;
diff --git a/platforms/haiku/Jamfiles/Jamrules b/platforms/haiku/Jamfiles/Jamrules
index 7236a0f..dfce893 100644
--- a/platforms/haiku/Jamfiles/Jamrules
+++ b/platforms/haiku/Jamfiles/Jamrules
@@ -1,6 +1,6 @@
 C++ = g++ ;
 C++FLAGS = -O2 -DMILKYTRACKER -D__HAIKU__ ;
-LINKFLAGS = -Xlinker -soname=_APP_ ;
+LINKFLAGS = -Xlinker -soname=_APP_ -Xlinker --whole-archive ;
 
 # Paths to sources, used as include paths
 PathCompression = $(TOP)/src/compression ;
diff --git a/platforms/haiku/Jamfiles/src-compression-Jamfile b/platforms/haiku/Jamfiles/src-compression-Jamfile
index e2323fa..4329ffa 100644
--- a/platforms/haiku/Jamfiles/src-compression-Jamfile
+++ b/platforms/haiku/Jamfiles/src-compression-Jamfile
@@ -1,17 +1,14 @@
 SubDir TOP src compression ;
 
-SubDirHdrs $(PathCompression) lha ;
 SubDirHdrs $(PathMilkyPlay) ;
 SubDirHdrs $(PathOSInterface) posix ;
 SubDirHdrs $(PathPPUI) ;
 SubDirHdrs $(PathZZIP) ;
-SubDirHdrs - ;
-SubDirHdrs $(PathZZIP) generic ;
 
 Library libcompression :
 	Decompressor.cpp
 	DecompressorGZIP.cpp
-	DecompressorLHA.cpp
+	#DecompressorLHA.cpp
 	DecompressorLZX.cpp
 	DecompressorPP20.cpp
 	DecompressorUMX.cpp
@@ -19,6 +16,6 @@ Library libcompression :
 	PP20.cpp
 	unlzx.cpp
 	ZipExtractor.cpp
-	lha/unlha.cpp
+	#lha/unlha.cpp
 	zziplib/MyIO.cpp
 	;
diff --git a/platforms/haiku/Jamfiles/src-tracker-Jamfile b/platforms/haiku/Jamfiles/src-tracker-Jamfile
index 39e0412..68d2519 100644
--- a/platforms/haiku/Jamfiles/src-tracker-Jamfile
+++ b/platforms/haiku/Jamfiles/src-tracker-Jamfile
@@ -11,11 +11,10 @@ SubDirHdrs $(PathPPUI) haiku ;
 SubDirHdrs $(PathTracker) haiku ;
 SubDirHdrs - ;
 
-LINKLIBS on MilkyTracker = -lbe -lgame -lmedia -lmidi2 -ltextencoding -ltracker ;
+LINKLIBS on MilkyTracker = -Xlinker --no-whole-archive -lbe -lgame -lmedia -lmidi2 -ltextencoding -ltracker -lz -lzzip ;
 
 LinkLibraries MilkyTracker :
 	libcompression
-	libzzip
 	libfx
 	libmilkyplay
 	libppui
@@ -37,11 +36,11 @@ Main MilkyTracker :
 	DialogResample.cpp
 	DialogWithValues.cpp
 	DialogZap.cpp
+	EQConstants.cpp
 	EditorBase.cpp
 	EnvelopeContainer.cpp
 	EnvelopeEditor.cpp
 	EnvelopeEditorControl.cpp
-	EQConstants.cpp
 	Equalizer.cpp
 	FileExtProvider.cpp
 	FileIdentificator.cpp
diff --git a/platforms/haiku/Jamfiles/src-tracker-haiku-MilkySettings-Jamfile b/platforms/haiku/Jamfiles/src-tracker-haiku-MilkySettings-Jamfile
index 662ee18..3042b44 100644
--- a/platforms/haiku/Jamfiles/src-tracker-haiku-MilkySettings-Jamfile
+++ b/platforms/haiku/Jamfiles/src-tracker-haiku-MilkySettings-Jamfile
@@ -1,6 +1,6 @@
 SubDir TOP src tracker haiku MilkySettings ;
 
-LINKLIBS on MilkySettings = -lbe -lmidi2 ;
+LINKLIBS on MilkySettings = -Xlinker --no-whole-archive -lbe -lmidi2 ;
 
 Main MilkySettings :
 	MilkySettingsApplication.cpp
-- 
2.30.2


From 4c7a239af8a42f463d4cbb04d47b881a49869d09 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 3 Sep 2014 16:47:15 +0000
Subject: link against libstdc++


diff --git a/platforms/haiku/Jamfiles/src-tracker-Jamfile b/platforms/haiku/Jamfiles/src-tracker-Jamfile
index 68d2519..8cb0073 100644
--- a/platforms/haiku/Jamfiles/src-tracker-Jamfile
+++ b/platforms/haiku/Jamfiles/src-tracker-Jamfile
@@ -11,7 +11,7 @@ SubDirHdrs $(PathPPUI) haiku ;
 SubDirHdrs $(PathTracker) haiku ;
 SubDirHdrs - ;
 
-LINKLIBS on MilkyTracker = -Xlinker --no-whole-archive -lbe -lgame -lmedia -lmidi2 -ltextencoding -ltracker -lz -lzzip ;
+LINKLIBS on MilkyTracker = -Xlinker --no-whole-archive -lbe -lgame -lmedia -lmidi2 -ltextencoding -lstdc++ -ltracker -lz -lzzip ;
 
 LinkLibraries MilkyTracker :
 	libcompression
diff --git a/platforms/haiku/Jamfiles/src-tracker-haiku-MilkySettings-Jamfile b/platforms/haiku/Jamfiles/src-tracker-haiku-MilkySettings-Jamfile
index 3042b44..4ece810 100644
--- a/platforms/haiku/Jamfiles/src-tracker-haiku-MilkySettings-Jamfile
+++ b/platforms/haiku/Jamfiles/src-tracker-haiku-MilkySettings-Jamfile
@@ -1,6 +1,6 @@
 SubDir TOP src tracker haiku MilkySettings ;
 
-LINKLIBS on MilkySettings = -Xlinker --no-whole-archive -lbe -lmidi2 ;
+LINKLIBS on MilkySettings = -Xlinker --no-whole-archive -lbe -lmidi2 -lstdc++ ;
 
 Main MilkySettings :
 	MilkySettingsApplication.cpp
-- 
2.30.2

