summaryrefslogtreecommitdiffstats
path: root/contrib/x265_8bit/module.defs
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2017-11-06 07:57:01 -0800
committerGitHub <[email protected]>2017-11-06 07:57:01 -0800
commitef5e24d863a34ffff73ed9293635cdbfc1a98fe9 (patch)
treeb46da5c2d34838e9c63abc01d8d0abaceb376514 /contrib/x265_8bit/module.defs
parent5eb3abb1d962e0dddb05638497f43f6e7ef02e18 (diff)
x265: add support for 8/10/12 bit encoding in single static lib (#975)
Builds x265 three times, once for each bit depth. Then merges the static libs into one library that HandBrake can statically link against.
Diffstat (limited to 'contrib/x265_8bit/module.defs')
-rw-r--r--contrib/x265_8bit/module.defs45
1 files changed, 45 insertions, 0 deletions
diff --git a/contrib/x265_8bit/module.defs b/contrib/x265_8bit/module.defs
new file mode 100644
index 000000000..7b3cb8d80
--- /dev/null
+++ b/contrib/x265_8bit/module.defs
@@ -0,0 +1,45 @@
+__deps__ := YASM CMAKE
+$(eval $(call import.MODULE.defs,X265_8,x265_8,$(__deps__),x265))
+$(eval $(call import.CONTRIB.defs,X265_8))
+
+X265_8.FETCH.url = https://download.handbrake.fr/contrib/x265_2.5.tar.gz
+X265_8.FETCH.url += https://bitbucket.org/multicoreware/x265/downloads/x265_2.5.tar.gz
+X265_8.FETCH.url += https://download.videolan.org/pub/videolan/x265/x265_2.5.tar.gz
+X265_8.FETCH.sha256 = 2e53259b504a7edb9b21b9800163b1ff4c90e60c74e23e7001d423c69c5d3d17
+
+X265_8.build_dir = 8bit
+X265_8.CONFIGURE.exe = cmake
+X265_8.CONFIGURE.args.prefix = -DCMAKE_INSTALL_PREFIX="$(X265_8.CONFIGURE.prefix)"
+X265_8.CONFIGURE.deps =
+X265_8.CONFIGURE.static =
+X265_8.CONFIGURE.shared = -DENABLE_SHARED=OFF
+X265_8.CONFIGURE.extra = -DENABLE_CLI=OFF -DHIGH_BIT_DEPTH=OFF -DENABLE_LIBNUMA=OFF -DEXTRA_LIB="x265_main10.a;x265_main12.a" -DEXTRA_LINK_FLAGS=-L. -DLINKED_10BIT=ON -DLINKED_12BIT=ON
+
+ifneq (none,$(X265_8.GCC.g))
+ X265_8.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=Debug
+endif
+
+ifeq (1,$(BUILD.cross))
+ ifeq (mingw,$(BUILD.system))
+ X265_8.CONFIGURE.extra += -DWIN32=ON
+ endif
+ X265_8.CONFIGURE.args.host = -DCMAKE_SYSTEM_NAME="$(X265_8.CONFIGURE.host)"
+ X265_8.CONFIGURE.args.build = -DCMAKE_HOST_SYSTEM="$(X265_8.CONFIGURE.build)"
+else
+ X265_8.CONFIGURE.args.host = -DCMAKE_HOST_SYSTEM="$(X265_8.CONFIGURE.host)"
+ ifeq (1,$(FEATURE.local_yasm))
+ X265_8.CONFIGURE.env.LOCAL_PATH = PATH="$(call fn.ABSOLUTE,$(CONTRIB.build/)bin):$(PATH)"
+ X265_8.BUILD.env = PATH="$(call fn.ABSOLUTE,$(CONTRIB.build/)bin):$(PATH)"
+ endif
+endif
+
+## find CMakeLists.txt
+X265_8.CONFIGURE.extra += "$(call fn.ABSOLUTE,$(X265_8.EXTRACT.dir/)source/)"
+
+X265_8.INSTALL.make = $(MV.exe)
+X265_8.INSTALL.args.dir = cd $(1);
+X265_8.INSTALL.extra = libx265.a libx265_main.a
+X265_8.INSTALL.args = @dir !make !extra
+
+# Override operations that are not needed
+X265.XCLEAN =