From 5b985f20b6ac7aafaaccba676aeda2770b0794ed Mon Sep 17 00:00:00 2001
From: Theodore Kokkoris <t.kokkoris@gmail.com>
Date: Sat, 17 Jan 2015 17:23:20 +0200
Subject: [PATCH 1/4] Add secondary arch suffix to library path

---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 384cb65..32770df 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,7 +22,7 @@ SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
 FIND_PACKAGE(Neon REQUIRED)
 FIND_PACKAGE(LibXml2 REQUIRED)
 
-SET(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
+SET(LIB_SUFFIX "${CMAKE_HAIKU_SECONDARY_ARCH_SUBDIR}" CACHE STRING "Define suffix of directory name (32/64)")
 SET(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Installation prefix for executables and object code libraries" FORCE)
 SET(BIN_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/bin CACHE PATH "Installation prefix for user executables" FORCE)
 SET(LIB_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX} CACHE PATH  "Installation prefix for object code libraries" FORCE)
-- 
1.8.3.4

From 43f6063c57e697082e7942248ee471677e157f50 Mon Sep 17 00:00:00 2001
From: Theodore Kokkoris <t.kokkoris@gmail.com>
Date: Sat, 17 Jan 2015 17:25:04 +0200
Subject: [PATCH 2/4] Change header installation directory on Haiku

---
 CMakeLists.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 32770df..a3550a1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,7 +26,11 @@ SET(LIB_SUFFIX "${CMAKE_HAIKU_SECONDARY_ARCH_SUBDIR}" CACHE STRING "Define suffi
 SET(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Installation prefix for executables and object code libraries" FORCE)
 SET(BIN_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/bin CACHE PATH "Installation prefix for user executables" FORCE)
 SET(LIB_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX} CACHE PATH  "Installation prefix for object code libraries" FORCE)
+if (HAIKU)
+SET(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/develop/headers CACHE PATH "Installation prefix for C header files" FORCE)
+else (HAIKU)
 SET(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include CACHE PATH "Installation prefix for C header files" FORCE)
+endif (HAIKU)
 
 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libmusicbrainz5.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libmusicbrainz5.pc)
 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile)
-- 
1.8.3.4

From bb1836b89190990cae7f4ef505824eae6baa61be Mon Sep 17 00:00:00 2001
From: Theodore Kokkoris <t.kokkoris@gmail.com>
Date: Sat, 17 Jan 2015 17:25:26 +0200
Subject: [PATCH 3/4] Remove tests and examples build

Doesn't work with gcc2 (std::boolalpha)
---
 CMakeLists.txt | 2 --
 1 file changed, 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a3550a1..4d5fa02 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,8 +41,6 @@ INSTALL(FILES ${headers} ${CMAKE_CURRENT_BINARY_DIR}/include/musicbrainz5/mb5_c.
 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmusicbrainz5.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
 
 ADD_SUBDIRECTORY(src)
-ADD_SUBDIRECTORY(tests)
-ADD_SUBDIRECTORY(examples)
 
 ADD_CUSTOM_TARGET(docs
 	doxygen
-- 
1.8.3.4

From f980c76455c341b6f97f728709a4e726447f0355 Mon Sep 17 00:00:00 2001
From: Theodore Kokkoris <t.kokkoris@gmail.com>
Date: Sat, 17 Jan 2015 17:25:56 +0200
Subject: [PATCH 4/4] Remove -Wextra (doesn't exist on gcc2)

---
 src/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c91a565..160d5c0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -65,7 +65,7 @@ IF(WIN32)
 ENDIF(WIN32)
 
 IF(CMAKE_COMPILER_IS_GNUCXX)
-		SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic-errors")
+		SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic-errors")
 		IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git)
 			SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
 		ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git)
-- 
1.8.3.4

