summaryrefslogtreecommitdiffstats
path: root/contrib/x265_10bit
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/x265_10bit')
-rw-r--r--contrib/x265_10bit/P00-mingw-lib.patch11
-rw-r--r--contrib/x265_10bit/module.defs51
-rw-r--r--contrib/x265_10bit/module.rules2
3 files changed, 64 insertions, 0 deletions
diff --git a/contrib/x265_10bit/P00-mingw-lib.patch b/contrib/x265_10bit/P00-mingw-lib.patch
new file mode 100644
index 000000000..5c822be0a
--- /dev/null
+++ b/contrib/x265_10bit/P00-mingw-lib.patch
@@ -0,0 +1,11 @@
+--- x265_2.5/source/x265-extras.h.orig 2017-07-13 07:20:07.000000000 -0400
++++ x265_2.5/source/x265-extras.h 2017-07-31 13:20:23.000000000 -0400
+@@ -33,7 +33,7 @@
+ extern "C" {
+ #endif
+
+-#if _WIN32
++#ifdef X265_API_IMPORTS
+ #define LIBAPI __declspec(dllexport)
+ #else
+ #define LIBAPI
diff --git a/contrib/x265_10bit/module.defs b/contrib/x265_10bit/module.defs
new file mode 100644
index 000000000..906f0de0f
--- /dev/null
+++ b/contrib/x265_10bit/module.defs
@@ -0,0 +1,51 @@
+__deps__ := YASM CMAKE X265_8
+$(eval $(call import.MODULE.defs,X265_10,x265_10,$(__deps__),x265))
+$(eval $(call import.CONTRIB.defs,X265_10))
+
+X265_10.FETCH.url = https://download.handbrake.fr/contrib/x265_2.5.tar.gz
+X265_10.FETCH.url += https://bitbucket.org/multicoreware/x265/downloads/x265_2.5.tar.gz
+X265_10.FETCH.url += https://download.videolan.org/pub/videolan/x265/x265_2.5.tar.gz
+X265_10.FETCH.sha256 = 2e53259b504a7edb9b21b9800163b1ff4c90e60c74e23e7001d423c69c5d3d17
+
+# Silence "warning: overriding recipe for target" messages
+X265_10.FETCH.target =
+
+X265_10.build_dir = 10bit
+X265_10.CONFIGURE.exe = cmake
+X265_10.CONFIGURE.args.prefix = -DCMAKE_INSTALL_PREFIX="$(X265_10.CONFIGURE.prefix)"
+X265_10.CONFIGURE.deps =
+X265_10.CONFIGURE.static =
+X265_10.CONFIGURE.shared = -DENABLE_SHARED=OFF
+X265_10.CONFIGURE.extra = -DENABLE_CLI=OFF -DHIGH_BIT_DEPTH=ON -DENABLE_LIBNUMA=OFF -DEXPORT_C_API=OFF
+
+ifneq (none,$(X265_10.GCC.g))
+ X265_10.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=Debug
+endif
+
+ifeq (1,$(BUILD.cross))
+ ifeq (mingw,$(BUILD.system))
+ X265_10.CONFIGURE.extra += -DWIN32=ON
+ endif
+ X265_10.CONFIGURE.args.host = -DCMAKE_SYSTEM_NAME="$(X265_10.CONFIGURE.host)"
+ X265_10.CONFIGURE.args.build = -DCMAKE_HOST_SYSTEM="$(X265_10.CONFIGURE.build)"
+else
+ X265_10.CONFIGURE.args.host = -DCMAKE_HOST_SYSTEM="$(X265_10.CONFIGURE.host)"
+ ifeq (1,$(FEATURE.local_yasm))
+ X265_10.CONFIGURE.env.LOCAL_PATH = PATH="$(call fn.ABSOLUTE,$(CONTRIB.build/)bin):$(PATH)"
+ X265_10.BUILD.env = PATH="$(call fn.ABSOLUTE,$(CONTRIB.build/)bin):$(PATH)"
+ endif
+endif
+
+## find CMakeLists.txt
+X265_10.CONFIGURE.extra += "$(call fn.ABSOLUTE,$(X265_10.EXTRACT.dir/)source/)"
+
+X265_10.INSTALL.make = $(MV.exe)
+X265_10.INSTALL.args.dir = cd $(1);
+X265_10.INSTALL.extra = libx265.a libx265_main10.a
+X265_10.INSTALL.args = @dir !make !extra
+
+# Override operations that are not needed
+X265_10.FETCH =
+X265_10.EXTRACT = $(TOUCH.exe) $@
+X265_10.PATCH = $(TOUCH.exe) $@
+X265.XCLEAN =
diff --git a/contrib/x265_10bit/module.rules b/contrib/x265_10bit/module.rules
new file mode 100644
index 000000000..b5ca70ae2
--- /dev/null
+++ b/contrib/x265_10bit/module.rules
@@ -0,0 +1,2 @@
+$(eval $(call import.MODULE.rules,X265_10))
+$(eval $(call import.CONTRIB.rules,X265_10))