]> git.sesse.net Git - vlc/commitdiff
contrib: x265 0.9
authorRafaël Carré <funman@videolan.org>
Sat, 5 Apr 2014 09:37:25 +0000 (11:37 +0200)
committerRafaël Carré <funman@videolan.org>
Sat, 5 Apr 2014 09:52:51 +0000 (11:52 +0200)
contrib/src/x265/0001-strtok_r-fix-detection-on-Windows.patch [new file with mode: 0644]
contrib/src/x265/SHA512SUMS
contrib/src/x265/rules.mak

diff --git a/contrib/src/x265/0001-strtok_r-fix-detection-on-Windows.patch b/contrib/src/x265/0001-strtok_r-fix-detection-on-Windows.patch
new file mode 100644 (file)
index 0000000..135afa3
--- /dev/null
@@ -0,0 +1,52 @@
+From 37d507b3bb485589343f5d2408441fadc6e964e4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= <funman@videolan.org>
+Date: Sat, 5 Apr 2014 11:24:55 +0200
+Subject: [PATCH] strtok_r: fix detection on Windows
+
+Make sure HAVE_STRTOK_R is always defined, to 0 if absent
+Fix typo in #if
+mingw-w64's pthread.h #defines strtok_r, make sure to undef it
+before we use our own definition.
+---
+ source/common/CMakeLists.txt | 3 +++
+ source/common/param.cpp      | 3 ++-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/source/common/CMakeLists.txt b/source/common/CMakeLists.txt
+index 09029ba..63cdf09 100644
+--- a/source/common/CMakeLists.txt
++++ b/source/common/CMakeLists.txt
+@@ -130,6 +130,9 @@ if(ENABLE_ASSEMBLY)
+ endif(ENABLE_ASSEMBLY)
+ check_symbol_exists(strtok_r "string.h" HAVE_STRTOK_R)
++if(HAVE_STRTOK_R STREQUAL "")
++    set(HAVE_STRTOK_R "0")
++endif()
+ set_source_files_properties(param.cpp PROPERTIES COMPILE_FLAGS -DHAVE_STRTOK_R=${HAVE_STRTOK_R})
+ if(GCC AND GCC_HAS_NO_NARROWING)
+diff --git a/source/common/param.cpp b/source/common/param.cpp
+index 57e3388..ac19c7e 100644
+--- a/source/common/param.cpp
++++ b/source/common/param.cpp
+@@ -37,7 +37,7 @@
+ #define strcasecmp _stricmp 
+ #endif
+-#if !HAVE_STROTOK_R
++#if !HAVE_STRTOK_R
+ /* 
+  * adapted from public domain strtok_r() by Charlie Gordon
+  *
+@@ -49,6 +49,7 @@
+  *      http://groups.google.com/group/comp.lang.c/msg/7c7b39328fefab9c
+  */
++#undef strtok_r
+ char* strtok_r(
+     char *str, 
+     const char *delim, 
+-- 
+1.9.1
+
index 34a4fb3cd5b46b57ecaba22432306c978e428534..c9ebc9db359a499740bceed2072e16871cdaa50e 100644 (file)
@@ -1 +1 @@
-78f7cd0aa6482d6ae921bf7cabc580cd9784a75920eb211a9cbe17fce2168fefe466e6ce1b21b8e7f4fd3ab51d80f33388bf6ec68e0203714294591d0c08b43c  x265-0.8.tar.bz2
+18096e0fd826758f0a36209816deb950f7de9c2bdfe3c871bac3e262149d8bc55fdd82831d6bfc71b0e8d02e868a66f32bffc42fb5f18c7fba6a1296c455c8a5  x265-0.9.tar.bz2
index d43e77b86d0c40ea7ef744bb09014b812f4cfa1b..4f42eb40c8a48f4135087d88ae9443e679d5a727 100644 (file)
@@ -1,7 +1,7 @@
 # x265
 
 #X265_GITURL := https://github.com/videolan/x265
-X265_VERSION := 0.8
+X265_VERSION := 0.9
 X265_SNAPURL := https://bitbucket.org/multicoreware/x265/get/$(X265_VERSION).tar.bz2
 
 ifdef BUILD_ENCODERS
@@ -27,6 +27,7 @@ x265: x265-$(X265_VERSION).tar.bz2 .sum-x265
        mkdir -p $@-$(X265_VERSION)
        $(BZCAT) "$<" | (cd $@-$(X265_VERSION) && tar xv --strip-components=1)
        $(call pkg_static,"source/x265.pc.in")
+       $(APPLY) $(SRC)/x265/0001-strtok_r-fix-detection-on-Windows.patch
        $(MOVE)
 
 .x265: x265 toolchain.cmake