summarylogtreecommitdiffstats
path: root/mingw.patch
diff options
context:
space:
mode:
authorkfg2015-06-09 22:52:08 +0200
committerkfg2015-06-09 22:52:26 +0200
commitce7dda6110afc0e81a1344ec1cd47e6cda72064f (patch)
treec9b4d44728d826eba73096ca79e7b853a1439c4b /mingw.patch
downloadaur-ce7dda6110afc0e81a1344ec1cd47e6cda72064f.tar.gz
Initial import
Diffstat (limited to 'mingw.patch')
-rw-r--r--mingw.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/mingw.patch b/mingw.patch
new file mode 100644
index 000000000000..459220768efb
--- /dev/null
+++ b/mingw.patch
@@ -0,0 +1,48 @@
+diff -ru multicoreware-x265-d6257335c537/source/CMakeLists.txt patched/source/CMakeLists.txt
+--- multicoreware-x265-d6257335c537/source/CMakeLists.txt 2014-07-09 10:25:15.000000000 +0200
++++ patched/source/CMakeLists.txt 2014-07-11 02:30:52.574683624 +0200
+@@ -283,6 +283,7 @@
+ # shared library is not installed if a tag is not found
+ set_target_properties(x265-shared PROPERTIES VERSION ${X265_LATEST_TAG} SOVERSION ${X265_BUILD})
+ install(TARGETS x265-shared
++ RUNTIME DESTINATION ${BIN_INSTALL_DIR}
+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
+ endif()
+diff -ru multicoreware-x265-d6257335c537/source/common/CMakeLists.txt patched/source/common/CMakeLists.txt
+--- multicoreware-x265-d6257335c537/source/common/CMakeLists.txt 2014-07-09 10:25:15.000000000 +0200
++++ patched/source/common/CMakeLists.txt 2014-07-11 02:32:59.046579781 +0200
+@@ -117,10 +117,16 @@
+ source_group(Assembly FILES ${ASM_PRIMITIVES})
+ endif(ENABLE_ASSEMBLY)
+
+-check_symbol_exists(strtok_r "string.h" HAVE_STRTOK_R)
+-if(HAVE_STRTOK_R)
+- set_source_files_properties(param.cpp PROPERTIES COMPILE_FLAGS -DHAVE_STRTOK_R=1)
+-endif()
++if(MINGW)
++ set_source_files_properties(param.cpp PROPERTIES COMPILE_FLAGS -DHAVE_STRTOK_R="1")
++else(MINGW)
++ #FIXME Mingw-w64 defines strtok_r in pthread.h (this needs to be fixed in Mingw-w64)
++ #check_symbol_exists(strtok_r "string.h" HAVE_STRTOK_R)
++ check_symbol_exists(strtok_r "pthread.h" HAVE_STRTOK_R)
++ if(HAVE_STRTOK_R)
++ set_source_files_properties(param.cpp PROPERTIES COMPILE_FLAGS -DHAVE_STRTOK_R=1)
++ endif()
++endif(MINGW)
+
+ if(GCC AND CC_HAS_NO_NARROWING)
+ set_source_files_properties(cpu.cpp PROPERTIES COMPILE_FLAGS -Wno-narrowing)
+diff -ru multicoreware-x265-d6257335c537/source/common/param.cpp patched/source/common/param.cpp
+--- multicoreware-x265-d6257335c537/source/common/param.cpp 2014-07-09 10:25:15.000000000 +0200
++++ patched/source/common/param.cpp 2014-07-11 02:36:54.809974684 +0200
+@@ -28,6 +28,9 @@
+ #include "x265.h"
+ #include "TLibCommon/TComSlice.h"
+
++//FIXME For strtok_r in Mingw-w64 (see CMakeLists.txt)
++#include <pthread.h>
++
+ #if _MSC_VER
+ #pragma warning(disable: 4996) // POSIX functions are just fine, thanks
+ #pragma warning(disable: 4706) // assignment within conditional