Skip to content

Commit

Permalink
Force LF line endings for patch files
Browse files Browse the repository at this point in the history
  • Loading branch information
muemart committed May 5, 2017
1 parent 63c613f commit 1c70d26
Show file tree
Hide file tree
Showing 9 changed files with 213 additions and 212 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.patch text eol=lf
72 changes: 36 additions & 36 deletions ports/antlr4/crt_mt.patch
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
diff --git a/runtime/antlr4cpp-vs2015.vcxproj b/runtime/antlr4cpp-vs2015.vcxproj
index 85fa3da..540f031 100644
--- a/runtime/antlr4cpp-vs2015.vcxproj
+++ b/runtime/antlr4cpp-vs2015.vcxproj
@@ -201,6 +201,7 @@
<DisableSpecificWarnings>4251</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@@ -239,6 +240,7 @@
<DisableSpecificWarnings>4251</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@@ -281,6 +283,7 @@
</ForcedIncludeFiles>
<DisableSpecificWarnings>4251</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@@ -325,6 +328,7 @@
</ForcedIncludeFiles>
<DisableSpecificWarnings>4251</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
diff --git a/runtime/antlr4cpp-vs2015.vcxproj b/runtime/antlr4cpp-vs2015.vcxproj
index 85fa3da..540f031 100644
--- a/runtime/antlr4cpp-vs2015.vcxproj
+++ b/runtime/antlr4cpp-vs2015.vcxproj
@@ -201,6 +201,7 @@
<DisableSpecificWarnings>4251</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@@ -239,6 +240,7 @@
<DisableSpecificWarnings>4251</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@@ -281,6 +283,7 @@
</ForcedIncludeFiles>
<DisableSpecificWarnings>4251</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@@ -325,6 +328,7 @@
</ForcedIncludeFiles>
<DisableSpecificWarnings>4251</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
26 changes: 13 additions & 13 deletions ports/bzip2/auto-define-import-macro.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
diff --git a/bzlib.h b/bzlib.h
index e3ba1d6..d3bed44 100644
--- a/bzlib.h
+++ b/bzlib.h
@@ -26,6 +26,8 @@
extern "C" {
#endif

+#define BZ_IMPORT
+
#define BZ_RUN 0
#define BZ_FLUSH 1
#define BZ_FINISH 2
diff --git a/bzlib.h b/bzlib.h
index e3ba1d6..d3bed44 100644
--- a/bzlib.h
+++ b/bzlib.h
@@ -26,6 +26,8 @@
extern "C" {
#endif

+#define BZ_IMPORT
+
#define BZ_RUN 0
#define BZ_FLUSH 1
#define BZ_FINISH 2
80 changes: 40 additions & 40 deletions ports/bzip2/fix-import-export-macros.patch
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
diff --git a/bzlib.h b/bzlib.h
index 8277123..84fbd0a 100644
--- a/bzlib.h
+++ b/bzlib.h
@@ -65,29 +65,23 @@ typedef
}
bz_stream;

-
-#ifndef BZ_IMPORT
-#define BZ_EXPORT
-#endif
-
#ifndef BZ_NO_STDIO
/* Need a definitition for FILE */
#include <stdio.h>
#endif

#ifdef _WIN32
-# include <windows.h>
# ifdef small
/* windows.h define small to char */
# undef small
# endif
-# ifdef BZ_EXPORT
-# define BZ_API(func) WINAPI func
-# define BZ_EXTERN extern
+# define BZ_API(func) func
+# if defined(BZ_BUILD_DLL)
+# define BZ_EXTERN __declspec(dllexport)
+# elif defined(BZ_IMPORT)
+# define BZ_EXTERN __declspec(dllimport)
# else
- /* import windows dll dynamically */
-# define BZ_API(func) (WINAPI * func)
-# define BZ_EXTERN
+# define BZ_EXTERN
# endif
#else
# define BZ_API(func) func
diff --git a/bzlib.h b/bzlib.h
index 8277123..84fbd0a 100644
--- a/bzlib.h
+++ b/bzlib.h
@@ -65,29 +65,23 @@ typedef
}
bz_stream;

-
-#ifndef BZ_IMPORT
-#define BZ_EXPORT
-#endif
-
#ifndef BZ_NO_STDIO
/* Need a definitition for FILE */
#include <stdio.h>
#endif

#ifdef _WIN32
-# include <windows.h>
# ifdef small
/* windows.h define small to char */
# undef small
# endif
-# ifdef BZ_EXPORT
-# define BZ_API(func) WINAPI func
-# define BZ_EXTERN extern
+# define BZ_API(func) func
+# if defined(BZ_BUILD_DLL)
+# define BZ_EXTERN __declspec(dllexport)
+# elif defined(BZ_IMPORT)
+# define BZ_EXTERN __declspec(dllimport)
# else
- /* import windows dll dynamically */
-# define BZ_API(func) (WINAPI * func)
-# define BZ_EXTERN
+# define BZ_EXTERN
# endif
#else
# define BZ_API(func) func
28 changes: 14 additions & 14 deletions ports/liblzma/auto-define-lzma-api-static.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
diff --git a/lzma.h b/lzma.h
index ce675a7..ac0fc98 100644
--- a/lzma.h
+++ b/lzma.h
@@ -187,6 +187,9 @@
* need to worry about LZMA_API_STATIC. Also the calling convention is
* omitted on Cygwin but not on MinGW.
*/
+
+#define LZMA_API_STATIC
+
#ifndef LZMA_API_IMPORT
# if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__GNUC__)
# define LZMA_API_IMPORT __declspec(dllimport)
diff --git a/lzma.h b/lzma.h
index ce675a7..ac0fc98 100644
--- a/lzma.h
+++ b/lzma.h
@@ -187,6 +187,9 @@
* need to worry about LZMA_API_STATIC. Also the calling convention is
* omitted on Cygwin but not on MinGW.
*/
+
+#define LZMA_API_STATIC
+
#ifndef LZMA_API_IMPORT
# if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__GNUC__)
# define LZMA_API_IMPORT __declspec(dllimport)
26 changes: 13 additions & 13 deletions ports/libmodplug/automagically-define-modplug-static.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
diff --git a/libmodplug/modplug.h b/libmodplug/modplug.h
index 3ffbf9d..fd19ae5 100644
--- a/libmodplug/modplug.h
+++ b/libmodplug/modplug.h
@@ -11,6 +11,8 @@
extern "C" {
#endif

+#define MODPLUG_STATIC
+
#if defined(_WIN32) || defined(__CYGWIN__)
# if defined(MODPLUG_BUILD) && defined(DLL_EXPORT) /* building libmodplug as a dll for windows */
# define MODPLUG_EXPORT __declspec(dllexport)
diff --git a/libmodplug/modplug.h b/libmodplug/modplug.h
index 3ffbf9d..fd19ae5 100644
--- a/libmodplug/modplug.h
+++ b/libmodplug/modplug.h
@@ -11,6 +11,8 @@
extern "C" {
#endif

+#define MODPLUG_STATIC
+
#if defined(_WIN32) || defined(__CYGWIN__)
# if defined(MODPLUG_BUILD) && defined(DLL_EXPORT) /* building libmodplug as a dll for windows */
# define MODPLUG_EXPORT __declspec(dllexport)
56 changes: 28 additions & 28 deletions ports/lz4/auto-define-import-macro.patch
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
diff --git a/lz4.h b/lz4.h
index 7420ad8..c1c3e56 100644
--- a/lz4.h
+++ b/lz4.h
@@ -73,6 +73,9 @@ extern "C" {
* LZ4_DLL_EXPORT :
* Enable exporting of functions when building a Windows DLL
*/
+
+#define LZ4_DLL_IMPORT 1
+
#if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1)
# define LZ4LIB_API __declspec(dllexport)
#elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)
diff --git a/lz4frame.h b/lz4frame.h
index 3104d2e..4442461 100644
--- a/lz4frame.h
+++ b/lz4frame.h
@@ -55,6 +55,9 @@ extern "C" {
* LZ4_DLL_EXPORT :
* Enable exporting of functions when building a Windows DLL
*/
+
+#define LZ4_DLL_IMPORT 1
+
#if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1)
# define LZ4FLIB_API __declspec(dllexport)
#elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)
diff --git a/lz4.h b/lz4.h
index 7420ad8..c1c3e56 100644
--- a/lz4.h
+++ b/lz4.h
@@ -73,6 +73,9 @@ extern "C" {
* LZ4_DLL_EXPORT :
* Enable exporting of functions when building a Windows DLL
*/
+
+#define LZ4_DLL_IMPORT 1
+
#if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1)
# define LZ4LIB_API __declspec(dllexport)
#elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)
diff --git a/lz4frame.h b/lz4frame.h
index 3104d2e..4442461 100644
--- a/lz4frame.h
+++ b/lz4frame.h
@@ -55,6 +55,9 @@ extern "C" {
* LZ4_DLL_EXPORT :
* Enable exporting of functions when building a Windows DLL
*/
+
+#define LZ4_DLL_IMPORT 1
+
#if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1)
# define LZ4FLIB_API __declspec(dllexport)
#elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)
102 changes: 51 additions & 51 deletions ports/nana/fix-linking.patch
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5c9c9c9..ae35185 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,26 +149,20 @@ endif ()
# Find PNG
if(NANA_CMAKE_ENABLE_PNG)
add_definitions(-DNANA_ENABLE_PNG)
- set(NANA_LINKS "${NANA_LINKS} -lpng")
if(NANA_CMAKE_LIBPNG_FROM_OS)
- find_package(PNG)
- if (PNG_FOUND)
- include_directories( ${PNG_INCLUDE_DIRS})
- add_definitions(-DUSE_LIBPNG_FROM_OS)
- endif(PNG_FOUND)
+ find_package(PNG REQUIRED)
+ include_directories(${PNG_INCLUDE_DIRS})
+ add_definitions(-DUSE_LIBPNG_FROM_OS)
endif(NANA_CMAKE_LIBPNG_FROM_OS)
endif(NANA_CMAKE_ENABLE_PNG)

# Find JPEG
if(NANA_CMAKE_ENABLE_JPEG)
add_definitions(-DNANA_ENABLE_JPEG)
- set(NANA_LINKS "${NANA_LINKS} -ljpeg")
if(NANA_CMAKE_LIBJPEG_FROM_OS)
- find_package(JPEG)
- if (JPEG_FOUND)
- include_directories( ${JPEG_INCLUDE_DIRS})
- add_definitions(-DUSE_LIBJPEG_FROM_OS)
- endif(JPEG_FOUND)
+ find_package(JPEG REQUIRED)
+ include_directories(${JPEG_INCLUDE_DIRS})
+ add_definitions(-DUSE_LIBJPEG_FROM_OS)
endif(NANA_CMAKE_LIBJPEG_FROM_OS)
endif(NANA_CMAKE_ENABLE_JPEG)

@@ -253,7 +247,12 @@ endforeach(subdir ${NANA_SOURCE_SUBDIRS})

include_directories(${NANA_INCLUDE_DIR})
add_library(${PROJECT_NAME} ${sources} )
-target_link_libraries(${PROJECT_NAME} ${NANA_LINKS})
+if(NANA_CMAKE_ENABLE_JPEG AND NANA_CMAKE_LIBJPEG_FROM_OS)
+ target_link_libraries(${PROJECT_NAME} ${JPEG_LIBRARIES})
+endif()
+if(NANA_CMAKE_ENABLE_PNG AND NANA_CMAKE_LIBPNG_FROM_OS)
+ target_link_libraries(${PROJECT_NAME} ${PNG_LIBRARIES})
+endif()

# Headers: use INCLUDE_DIRECTORIES
# Libraries: use FIND_LIBRARY and link with the result of it (try to avoid LINK_DIRECTORIES)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5c9c9c9..ae35185 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,26 +149,20 @@ endif ()
# Find PNG
if(NANA_CMAKE_ENABLE_PNG)
add_definitions(-DNANA_ENABLE_PNG)
- set(NANA_LINKS "${NANA_LINKS} -lpng")
if(NANA_CMAKE_LIBPNG_FROM_OS)
- find_package(PNG)
- if (PNG_FOUND)
- include_directories( ${PNG_INCLUDE_DIRS})
- add_definitions(-DUSE_LIBPNG_FROM_OS)
- endif(PNG_FOUND)
+ find_package(PNG REQUIRED)
+ include_directories(${PNG_INCLUDE_DIRS})
+ add_definitions(-DUSE_LIBPNG_FROM_OS)
endif(NANA_CMAKE_LIBPNG_FROM_OS)
endif(NANA_CMAKE_ENABLE_PNG)

# Find JPEG
if(NANA_CMAKE_ENABLE_JPEG)
add_definitions(-DNANA_ENABLE_JPEG)
- set(NANA_LINKS "${NANA_LINKS} -ljpeg")
if(NANA_CMAKE_LIBJPEG_FROM_OS)
- find_package(JPEG)
- if (JPEG_FOUND)
- include_directories( ${JPEG_INCLUDE_DIRS})
- add_definitions(-DUSE_LIBJPEG_FROM_OS)
- endif(JPEG_FOUND)
+ find_package(JPEG REQUIRED)
+ include_directories(${JPEG_INCLUDE_DIRS})
+ add_definitions(-DUSE_LIBJPEG_FROM_OS)
endif(NANA_CMAKE_LIBJPEG_FROM_OS)
endif(NANA_CMAKE_ENABLE_JPEG)

@@ -253,7 +247,12 @@ endforeach(subdir ${NANA_SOURCE_SUBDIRS})

include_directories(${NANA_INCLUDE_DIR})
add_library(${PROJECT_NAME} ${sources} )
-target_link_libraries(${PROJECT_NAME} ${NANA_LINKS})
+if(NANA_CMAKE_ENABLE_JPEG AND NANA_CMAKE_LIBJPEG_FROM_OS)
+ target_link_libraries(${PROJECT_NAME} ${JPEG_LIBRARIES})
+endif()
+if(NANA_CMAKE_ENABLE_PNG AND NANA_CMAKE_LIBPNG_FROM_OS)
+ target_link_libraries(${PROJECT_NAME} ${PNG_LIBRARIES})
+endif()

# Headers: use INCLUDE_DIRECTORIES
# Libraries: use FIND_LIBRARY and link with the result of it (try to avoid LINK_DIRECTORIES)
Loading

0 comments on commit 1c70d26

Please sign in to comment.