From 9612cfcd716d5924547e90229bd6e3cb51c950e9 Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Wed, 21 Aug 2013 12:02:33 +0200
Subject: add support for Haiku


diff --git a/Makefile.in b/Makefile.in
index 781d359..9cd43eb 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -2,7 +2,7 @@
 #	cd qtools ; $(MAKE)
 #	cd src ; $(MAKE)
 
-DESTDIR = 
+#DESTDIR = 
 
 clean: FORCE
 	cd examples ; $(MAKE) clean
diff --git a/PLATFORMS b/PLATFORMS
index c358a1d..18c4ed5 100644
--- a/PLATFORMS
+++ b/PLATFORMS
@@ -4,6 +4,7 @@ beos-g++
 dgux-g++
 freebsd-g++
 gnu-g++
+haiku-g++
 hpux-acc
 hpux-cc
 hpux-g++
diff --git a/configure b/configure
index c0db1c6..d631e47 100755
--- a/configure
+++ b/configure
@@ -180,6 +180,9 @@ if test -z "$f_platform"; then
         f_insttool=/usr/bin/install
       fi
       ;;
+    Haiku:*)
+      f_platform=haiku-g++
+      ;;
     HP-UX:*)
       f_platform=hpux-g++
       if test "$f_insttool" = NO; then
diff --git a/qtools/qglobal.h b/qtools/qglobal.h
index 700cb80..259446d 100644
--- a/qtools/qglobal.h
+++ b/qtools/qglobal.h
@@ -150,6 +150,8 @@
 #define _OS_CYGWIN_
 #elif defined(__BEOS__)
 #define _OS_BEOS_
+#elif defined(__HAIKU__)
+#define _OS_HAIKU_
 #elif defined(__MINT__)
 #define _OS_MINT_
 #else
diff --git a/src/doxygen.pro.in b/src/doxygen.pro.in
index cc93820..c8a8d50 100644
--- a/src/doxygen.pro.in
+++ b/src/doxygen.pro.in
@@ -19,6 +19,7 @@ CONFIG       =	console warn_on $extraopts
 HEADERS      =	doxygen.h 
 SOURCES      =	main.cpp 
 unix:LIBS                  += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 
+haiku-g++:LIBS             += -L/boot/common/lib -liconv
 win32:INCLUDEPATH          += .
 win32-mingw:LIBS           += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 
 win32-msvc:LIBS            += qtools.lib md5.lib doxygen.lib doxycfg.lib shell32.lib iconv.lib
diff --git a/tmake/lib/haiku-g++/app.t b/tmake/lib/haiku-g++/app.t
new file mode 100644
index 0000000..867725e
--- /dev/null
+++ b/tmake/lib/haiku-g++/app.t
@@ -0,0 +1,2 @@
+#! Use the common Unix template
+#$ IncludeTemplate("../unix/app.t");
diff --git a/tmake/lib/haiku-g++/lib.t b/tmake/lib/haiku-g++/lib.t
new file mode 100644
index 0000000..2523b2f
--- /dev/null
+++ b/tmake/lib/haiku-g++/lib.t
@@ -0,0 +1,2 @@
+#! Use the common Unix template
+#$ IncludeTemplate("../unix/lib.t");
diff --git a/tmake/lib/haiku-g++/subdirs.t b/tmake/lib/haiku-g++/subdirs.t
new file mode 100644
index 0000000..5e888af
--- /dev/null
+++ b/tmake/lib/haiku-g++/subdirs.t
@@ -0,0 +1,2 @@
+#! Use the common Unix template
+#$ IncludeTemplate("../unix/subdirs.t");
diff --git a/tmake/lib/haiku-g++/tmake.conf b/tmake/lib/haiku-g++/tmake.conf
new file mode 100644
index 0000000..23a2738
--- /dev/null
+++ b/tmake/lib/haiku-g++/tmake.conf
@@ -0,0 +1,51 @@
+#
+# 
+#
+# tmake configuration for haiku-g++
+#
+
+TEMPLATE		= app
+CONFIG			= qt warn_on release
+
+TMAKE_CC		= gcc
+TMAKE_CFLAGS		=
+TMAKE_CFLAGS_WARN_ON	= -Wall -W
+TMAKE_CFLAGS_WARN_OFF	=
+TMAKE_CFLAGS_RELEASE	=
+TMAKE_CFLAGS_DEBUG	= -g
+TMAKE_CFLAGS_SHLIB	= -fPIC
+TMAKE_CFLAGS_YACC	= -Wno-unused -Wno-parentheses
+
+TMAKE_CXX		= g++
+TMAKE_CXXFLAGS		= $$TMAKE_CFLAGS
+TMAKE_CXXFLAGS_WARN_ON	= $$TMAKE_CFLAGS_WARN_ON
+TMAKE_CXXFLAGS_WARN_OFF	= $$TMAKE_CFLAGS_WARN_OFF
+TMAKE_CXXFLAGS_RELEASE	= $$TMAKE_CFLAGS_RELEASE
+TMAKE_CXXFLAGS_DEBUG	= $$TMAKE_CFLAGS_DEBUG
+TMAKE_CXXFLAGS_SHLIB	= $$TMAKE_CFLAGS_SHLIB
+TMAKE_CXXFLAGS_YACC	= $$TMAKE_CFLAGS_YACC
+
+TMAKE_INCDIR		=
+TMAKE_LIBDIR		=
+TMAKE_INCDIR_QT		= $(QTDIR)/include
+TMAKE_LIBDIR_QT		= $(QTDIR)/lib
+
+TMAKE_LINK		= g++
+TMAKE_LINK_SHLIB	= g++
+TMAKE_LFLAGS		= -Wl,-rpath=/lib:$(QTDIR)/lib
+TMAKE_LFLAGS_RELEASE	=
+TMAKE_LFLAGS_DEBUG	=
+TMAKE_LFLAGS_SHLIB	= -shared
+TMAKE_LFLAGS_SONAME	= -Wl,-soname,
+
+TMAKE_LIBS		=
+TMAKE_LIBS_QT		= -lqt
+TMAKE_LIBS_QT_MT	= -lqt-mt
+
+TMAKE_MOC		= moc
+
+TMAKE_AR		= ar cqs
+TMAKE_RANLIB		=
+
+TMAKE_TAR		= tar -cf
+TMAKE_GZIP		= gzip -9f
-- 
1.8.3.4


From 2e7199416501ace72e5ab2a548cc07ab25ef910e Mon Sep 17 00:00:00 2001
From: Ingo Weinhold <ingo_weinhold@gmx.de>
Date: Wed, 21 Aug 2013 12:21:09 +0200
Subject: qvaluestack.h: fix gcc 4 build


diff --git a/qtools/qvaluestack.h b/qtools/qvaluestack.h
index 3fb61fd..7438fcb 100644
--- a/qtools/qvaluestack.h
+++ b/qtools/qvaluestack.h
@@ -49,7 +49,7 @@ class Q_EXPORT QValueStack : public QValueList<T>
 public:
     QValueStack() {}
    ~QValueStack() {}
-    void  push( const T& d ) { append(d); }
+    void  push( const T& d ) { this->append(d); }
     T pop()
     {
 	T elem( this->last() );
-- 
1.8.3.4

