From e55cbd3bcfea31f35bd50a3f2939b5303b12d146 Mon Sep 17 00:00:00 2001 From: Daniel Wolf Date: Tue, 12 Jan 2016 22:13:42 +0100 Subject: [PATCH] Saving my changes to Sphinx as patch files --- CMakeLists.txt | 4 ++-- .../include/pocketsphinx_export.h | 10 +-------- .../include/pocketsphinx_export.h | 7 ------- lib/pocketsphinx.patch | 21 +++++++++++++++++++ .../include/sphinxbase/sphinxbase_export.h | 10 +-------- .../include/sphinxbase/sphinxbase_export.h | 7 ------- lib/sphinxbase.patch | 21 +++++++++++++++++++ 7 files changed, 46 insertions(+), 34 deletions(-) delete mode 100644 lib/pocketsphinx-redefine/include/pocketsphinx_export.h create mode 100644 lib/pocketsphinx.patch delete mode 100644 lib/sphinxbase-redefine/include/sphinxbase/sphinxbase_export.h create mode 100644 lib/sphinxbase.patch diff --git a/CMakeLists.txt b/CMakeLists.txt index e0ecdd1..caffeab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,14 +57,14 @@ target_compile_options(cppFormat PRIVATE ${disableWarningsFlags}) set_target_properties(cppFormat PROPERTIES FOLDER lib) # ... sphinxbase -include_directories(SYSTEM "lib/sphinxbase-redefine/include" "lib/sphinxbase-5prealpha-2015-08-05/include") +include_directories(SYSTEM "lib/sphinxbase-5prealpha-2015-08-05/include") FILE(GLOB_RECURSE sphinxbaseFiles "lib/sphinxbase-5prealpha-2015-08-05/src/libsphinxbase/*.c") add_library(sphinxbase ${sphinxbaseFiles}) target_compile_options(sphinxbase PRIVATE ${disableWarningsFlags}) set_target_properties(sphinxbase PROPERTIES FOLDER lib) # ... PocketSphinx -include_directories(SYSTEM "lib/pocketsphinx-redefine/include" "lib/pocketsphinx-5prealpha-2015-08-05/include") +include_directories(SYSTEM "lib/pocketsphinx-5prealpha-2015-08-05/include") FILE(GLOB pocketSphinxFiles "lib/pocketsphinx-5prealpha-2015-08-05/src/libpocketsphinx/*.c") add_library(pocketSphinx ${pocketSphinxFiles}) target_link_libraries(pocketSphinx sphinxbase) diff --git a/lib/pocketsphinx-5prealpha-2015-08-05/include/pocketsphinx_export.h b/lib/pocketsphinx-5prealpha-2015-08-05/include/pocketsphinx_export.h index 4e76f62..a82acd6 100644 --- a/lib/pocketsphinx-5prealpha-2015-08-05/include/pocketsphinx_export.h +++ b/lib/pocketsphinx-5prealpha-2015-08-05/include/pocketsphinx_export.h @@ -1,15 +1,7 @@ #ifndef __POCKETSPHINX_EXPORT_H__ #define __POCKETSPHINX_EXPORT_H__ -/* Win32/WinCE DLL gunk */ -#if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(_WIN32_WP) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__WINSCW__) && !defined(__SYMBIAN32__) -#ifdef POCKETSPHINX_EXPORTS /* Visual Studio */ -#define POCKETSPHINX_EXPORT __declspec(dllexport) -#else -#define POCKETSPHINX_EXPORT __declspec(dllimport) -#endif -#else /* !_WIN32 */ +// We're creating a static library. No __declspec! #define POCKETSPHINX_EXPORT -#endif #endif /* __POCKETSPHINX_EXPORT_H__ */ diff --git a/lib/pocketsphinx-redefine/include/pocketsphinx_export.h b/lib/pocketsphinx-redefine/include/pocketsphinx_export.h deleted file mode 100644 index a82acd6..0000000 --- a/lib/pocketsphinx-redefine/include/pocketsphinx_export.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef __POCKETSPHINX_EXPORT_H__ -#define __POCKETSPHINX_EXPORT_H__ - -// We're creating a static library. No __declspec! -#define POCKETSPHINX_EXPORT - -#endif /* __POCKETSPHINX_EXPORT_H__ */ diff --git a/lib/pocketsphinx.patch b/lib/pocketsphinx.patch new file mode 100644 index 0000000..cde1968 --- /dev/null +++ b/lib/pocketsphinx.patch @@ -0,0 +1,21 @@ +diff --git a/lib/pocketsphinx-5prealpha-2015-08-05/include/pocketsphinx_export.h b/lib/pocketsphinx-5prealpha-2015-08-05/include/pocketsphinx_export.h +index 4e76f62..a82acd6 100644 +--- a/lib/pocketsphinx-5prealpha-2015-08-05/include/pocketsphinx_export.h ++++ b/lib/pocketsphinx-5prealpha-2015-08-05/include/pocketsphinx_export.h +@@ -1,15 +1,7 @@ + #ifndef __POCKETSPHINX_EXPORT_H__ + #define __POCKETSPHINX_EXPORT_H__ + +-/* Win32/WinCE DLL gunk */ +-#if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(_WIN32_WP) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__WINSCW__) && !defined(__SYMBIAN32__) +-#ifdef POCKETSPHINX_EXPORTS /* Visual Studio */ +-#define POCKETSPHINX_EXPORT __declspec(dllexport) +-#else +-#define POCKETSPHINX_EXPORT __declspec(dllimport) +-#endif +-#else /* !_WIN32 */ ++// We're creating a static library. No __declspec! + #define POCKETSPHINX_EXPORT +-#endif + + #endif /* __POCKETSPHINX_EXPORT_H__ */ diff --git a/lib/sphinxbase-5prealpha-2015-08-05/include/sphinxbase/sphinxbase_export.h b/lib/sphinxbase-5prealpha-2015-08-05/include/sphinxbase/sphinxbase_export.h index 535d460..da4d633 100644 --- a/lib/sphinxbase-5prealpha-2015-08-05/include/sphinxbase/sphinxbase_export.h +++ b/lib/sphinxbase-5prealpha-2015-08-05/include/sphinxbase/sphinxbase_export.h @@ -1,15 +1,7 @@ #ifndef __SPHINXBASE_EXPORT_H__ #define __SPHINXBASE_EXPORT_H__ -/* Win32/WinCE DLL gunk */ -#if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(_WIN32_WP) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__WINSCW__) && !defined(__SYMBIAN32__) -#if defined(SPHINXBASE_EXPORTS) /* Visual Studio */ -#define SPHINXBASE_EXPORT __declspec(dllexport) -#else -#define SPHINXBASE_EXPORT __declspec(dllimport) -#endif -#else /* !_WIN32 */ +// We're creating a static library. No __declspec! #define SPHINXBASE_EXPORT -#endif #endif /* __SPHINXBASE_EXPORT_H__ */ diff --git a/lib/sphinxbase-redefine/include/sphinxbase/sphinxbase_export.h b/lib/sphinxbase-redefine/include/sphinxbase/sphinxbase_export.h deleted file mode 100644 index da4d633..0000000 --- a/lib/sphinxbase-redefine/include/sphinxbase/sphinxbase_export.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef __SPHINXBASE_EXPORT_H__ -#define __SPHINXBASE_EXPORT_H__ - -// We're creating a static library. No __declspec! -#define SPHINXBASE_EXPORT - -#endif /* __SPHINXBASE_EXPORT_H__ */ diff --git a/lib/sphinxbase.patch b/lib/sphinxbase.patch new file mode 100644 index 0000000..122c8d8 --- /dev/null +++ b/lib/sphinxbase.patch @@ -0,0 +1,21 @@ +diff --git a/lib/sphinxbase-5prealpha-2015-08-05/include/sphinxbase/sphinxbase_export.h b/lib/sphinxbase-5prealpha-2015-08-05/include/sphinxbase/sphinxbase_export.h +index 535d460..da4d633 100644 +--- a/lib/sphinxbase-5prealpha-2015-08-05/include/sphinxbase/sphinxbase_export.h ++++ b/lib/sphinxbase-5prealpha-2015-08-05/include/sphinxbase/sphinxbase_export.h +@@ -1,15 +1,7 @@ + #ifndef __SPHINXBASE_EXPORT_H__ + #define __SPHINXBASE_EXPORT_H__ + +-/* Win32/WinCE DLL gunk */ +-#if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(_WIN32_WP) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__WINSCW__) && !defined(__SYMBIAN32__) +-#if defined(SPHINXBASE_EXPORTS) /* Visual Studio */ +-#define SPHINXBASE_EXPORT __declspec(dllexport) +-#else +-#define SPHINXBASE_EXPORT __declspec(dllimport) +-#endif +-#else /* !_WIN32 */ ++// We're creating a static library. No __declspec! + #define SPHINXBASE_EXPORT +-#endif + + #endif /* __SPHINXBASE_EXPORT_H__ */