no longer need ffmpeg patch0 which was for Termux
[goodguy/cinelerra.git] / cinelerra-5.1 / thirdparty / compile_multibit_X265.txt
1 From 9bda08470b306aa5d2e4915f76ddd6fd8b009577 Mon Sep 17 00:00:00 2001
2 From: Andrew Randrianasulu <randrianasulu@gmail.com>
3 Date: Wed, 20 Dec 2023 15:16:40 +0300
4 Subject: [PATCH 13/14] Multibit x265 patches updated for x265-17122023
5
6 ---
7  cinelerra-5.1/thirdparty/Makefile             |  5 +-
8  .../thirdparty/src/x265_3.517122023.patch1       |  4 ++
9  .../thirdparty/src/x265_3.517122023.patch2       |  7 +++
10  .../thirdparty/src/x265_3.517122023.patch3       | 57 +++++++++++++++++++
11  4 files changed, 71 insertions(+), 2 deletions(-)
12  create mode 100644 cinelerra-5.1/thirdparty/src/x265_3.517122023.patch1
13  create mode 100644 cinelerra-5.1/thirdparty/src/x265_3.517122023.patch2
14  create mode 100644 cinelerra-5.1/thirdparty/src/x265_3.517122023.patch3
15
16 --- a/cinelerra-5.1/thirdparty/Makefile
17 +++ b/cinelerra-5.1/thirdparty/Makefile
18 @@ -265,8 +265,9 @@
19   $(call if_npkg,libwebp,--disable-webp)
20  twolame.cfg_params?=--enable-shared=no
21  x264.cfg_params?= --enable-static --enable-pic
22 -x265.cfg_vars?=$(call cmake_config,source)
23 -x265.cfg_params?= -DENABLE_SHARED=no -DENABLE_CLI=no
24 +x265.cfg_vars?=chmod +x ./configure; chmod +x ./multilib.sh;
25 +#x265.cfg_vars?=$(call cmake_config,source)
26 +#x265.cfg_params?= -DENABLE_SHARED=no -DENABLE_CLI=no
27  libvpx.cfg_params?= --enable-pic --disable-avx512 --enable-vp9-highbitdepth --disable-examples --disable-unit_tests
28  libdpx.cfg_vars?= libtoolize; aclocal; autoconf; automake -a;
29  
30 diff --git a/cinelerra-5.1/thirdparty/src/x265_3.517122023.patch1 b/cinelerra-5.1/thirdparty/src/x265_3.517122023.patch1
31 new file mode 100644
32 index 00000000..23d7e84f
33 --- /dev/null
34 +++ b/cinelerra-5.1/thirdparty/src/x265_3.517122023.patch1
35 @@ -0,0 +1,4 @@
36 +--- /dev/null  2020-03-14 06:02:18.586124011 +0300
37 ++++ ./configure        2020-03-18 00:04:59.360807192 +0300
38 +@@ -0,0 +1 @@
39 ++/bin/true
40 diff --git a/cinelerra-5.1/thirdparty/src/x265_3.517122023.patch2 b/cinelerra-5.1/thirdparty/src/x265_3.517122023.patch2
41 new file mode 100644
42 index 00000000..72459e66
43 --- /dev/null
44 +++ b/cinelerra-5.1/thirdparty/src/x265_3.517122023.patch2
45 @@ -0,0 +1,7 @@
46 +--- /dev/null  2020-03-14 06:02:18.586124011 +0300
47 ++++ ./Makefile 2020-03-18 00:04:59.388807329 +0300
48 +@@ -0,0 +1,4 @@
49 ++#$(shell cd build/linux ; ./multilib.sh)
50 ++.NOTPARALLEL:
51 ++all:
52 ++      $(shell ./multilib.sh ; cp 8bit/libx265.a . ; cp 8bit/x265.pc . ; cp 8bit/x265_config.h .)
53 diff --git a/cinelerra-5.1/thirdparty/src/x265_3.517122023.patch3 b/cinelerra-5.1/thirdparty/src/x265_3.517122023.patch3
54 new file mode 100644
55 index 00000000..26fa121b
56 --- /dev/null
57 +++ b/cinelerra-5.1/thirdparty/src/x265_3.517122023.patch3
58 @@ -0,0 +1,57 @@
59 +--- /dev/null  2020-07-19 09:07:01.788494015 +0300
60 ++++ ./multilib.sh      2020-08-02 02:34:58.444933214 +0300
61 +@@ -0,0 +1,54 @@
62 ++#!/bin/sh
63 ++
64 ++mkdir -p 8bit 10bit 12bit
65 ++
66 ++
67 ++cd 12bit
68 ++if [ $(uname -m) == 'x86_64' ]; then
69 ++  # 64-bit stuff here
70 ++cmake ../source -DHIGH_BIT_DEPTH=ON -DENABLE_ASSEMBLY=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
71 ++else
72 ++  # 32-bit stuff here
73 ++cmake ../source -DHIGH_BIT_DEPTH=ON -DENABLE_ASSEMBLY=OFF -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
74 ++fi
75 ++make
76 ++
77 ++cd ../10bit
78 ++if [ $(uname -m) == 'x86_64' ]; then
79 ++  # 64-bit stuff here
80 ++cmake ../source -DHIGH_BIT_DEPTH=ON -DENABLE_ASSEMBLY=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
81 ++else
82 ++  # 32-bit stuff here
83 ++cmake ../source -DHIGH_BIT_DEPTH=ON -DENABLE_ASSEMBLY=OFF -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
84 ++fi
85 ++make
86 ++
87 ++cd ../8bit
88 ++ln -sf ../10bit/libx265.a libx265_main10.a
89 ++ln -sf ../12bit/libx265.a libx265_main12.a
90 ++cmake ../source -DEXTRA_LIB="x265_main10.a;x265_main12.a" -DENABLE_SHARED=OFF -DEXTRA_LINK_FLAGS=-L. -DLINKED_10BIT=ON -DLINKED_12BIT=ON -DENABLE_CLI=OFF
91 ++make
92 ++
93 ++# rename the 8bit library, then combine all three into libx265.a
94 ++mv libx265.a libx265_main.a
95 ++
96 ++uname=`uname`
97 ++if [ "$uname" = "Linux" ]
98 ++then
99 ++
100 ++# On Linux, we use GNU ar to combine the static libraries together
101 ++ar -M <<EOF
102 ++CREATE libx265.a
103 ++ADDLIB libx265_main.a
104 ++ADDLIB libx265_main10.a
105 ++ADDLIB libx265_main12.a
106 ++SAVE
107 ++END
108 ++EOF
109 ++
110 ++else
111 ++
112 ++# Mac/BSD libtool
113 ++libtool -static -o libx265.a libx265_main.a libx265_main10.a libx265_main12.a 2>/dev/null
114 ++
115 ++fi
116 -- 
117 2.43.0
118