From 4521b6da9145747ff9d7bc7c2abcc03789ce9045 Mon Sep 17 00:00:00 2001
From: Theodore Kokkoris <t.kokkoris@gmail.com>
Date: Sat, 17 Jan 2015 17:23:20 +0200
Subject: Add secondary arch suffix to library path


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)
-- 
2.26.0


From aac5f1f920de3bd17558ea346861980230973194 Mon Sep 17 00:00:00 2001
From: Theodore Kokkoris <t.kokkoris@gmail.com>
Date: Sat, 17 Jan 2015 17:25:04 +0200
Subject: Change header installation directory on Haiku


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)
-- 
2.26.0


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

Doesn't work with gcc2 (std::boolalpha)

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
-- 
2.26.0


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


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)
-- 
2.26.0


From 34a0c58d2ce17eb49ad10ca9a6a6b33055e0d468 Mon Sep 17 00:00:00 2001
From: Markus Himmel <markus@himmel-villmar.de>
Date: Sun, 17 Jan 2016 10:47:49 +0100
Subject: Fix includes of local files in public headers

Usually, when including a header, gcc's "working directory" changes to the
directory that header is in. When this header includes another header in the
same directory, the correct thing happens because the compiler's current working
directory is always a search path for local includes. However, if the -I- option
is given to the compiler, this is no longer the case. All directories that should
be in the search path have to be given in -I directives.

The Makefile Engine on gcc2 sets -I- unconditionally, so the files included
without musicbrainz5/ cannot not be found (gcc4 uses the preferred -iquote option
instead of -I-, so there are  no problems with gcc4). One workaround would be to
add the musicbrainz5/ directory as an include path, but this library has files
such as List.h and Message.h, so there will be chaos.

This commit just fixes the two includes which caused the problem.

diff --git a/include/musicbrainz5/Query.h b/include/musicbrainz5/Query.h
index f6e15e3..1e5e013 100644
--- a/include/musicbrainz5/Query.h
+++ b/include/musicbrainz5/Query.h
@@ -26,9 +26,9 @@
 #ifndef _MUSICBRAINZ5_QUERY_H
 #define _MUSICBRAINZ5_QUERY_H
 
-#include "defines.h"
+#include "musicbrainz5/defines.h"
 
-#include "Entity.h"
+#include "musicbrainz5/Entity.h"
 
 #include "musicbrainz5/ReleaseList.h"
 #include "musicbrainz5/Metadata.h"
-- 
2.26.0


From deb206a5480558df6321129417bafa50e719540c Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 18 Apr 2020 10:40:38 +0000
Subject: Don't use -Werror


diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 160d5c0..a3a2611 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -67,7 +67,7 @@ ENDIF(WIN32)
 IF(CMAKE_COMPILER_IS_GNUCXX)
 		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")
+			SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
 		ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git)
 		#set_source_files_properties(mb5_c.cc PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations")
 ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-- 
2.26.0

