-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfedora43-patches.diff
More file actions
199 lines (184 loc) · 9.43 KB
/
Copy pathfedora43-patches.diff
File metadata and controls
199 lines (184 loc) · 9.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
--- a/download_tarballs.sh
+++ b/download_tarballs.sh
@@ -6,7 +6,7 @@
# The point, we need robust re-tries, as sometimes the download fails, and we need to be able to re-try.
# and verify that the download was successful.
-manifestJsonFile="/tmp/workdir/generated_build_manifest.json"
+manifestJsonFile="${WORKDIR:-$PWD}/generated_build_manifest.json"
report_on_failed_downloads() {
local librariesRaw="$(jq -r '.[] | .library_name' "$manifestJsonFile")"
@@ -122,14 +122,14 @@
download_tarballs_called_number=0
num_completed=$(actual_number_of_downloads_completed)
num_to_download=$(number_of_tarballs_to_download)
-echo "Starting to download ${num_to_download} tarball images"
+echo "Starting to download ${num_to_download} tarballs"
while [ $num_completed -lt $num_to_download ] && [ $number_of_times_to_retry -gt $download_tarballs_called_number ]; do
((download_tarballs_called_number++))
download_tarballs
sleep 5
num_completed=$(actual_number_of_downloads_completed)
num_to_download=$(number_of_tarballs_to_download)
- echo "Downloaded ${num_completed} of ${num_to_download} tarball images on pass ${download_tarballs_called_number}"
+ echo "Downloaded ${num_completed} of ${num_to_download} tarballs on pass ${download_tarballs_called_number}"
done
if [ $num_completed -lt $num_to_download ]; then
@@ -137,5 +137,5 @@
report_on_failed_downloads
exit 1
fi
-echo "Successfully Downloaded the ${num_completed} tarball images after $download_tarballs_called_number attempts"
+echo "Successfully Downloaded the ${num_completed} tarballs after $download_tarballs_called_number attempts"
exit 0
--- a/build_source.sh
+++ b/build_source.sh
@@ -5,8 +5,8 @@
# which is useful for debugging
set -e
-manifestJsonFile="/tmp/workdir/generated_build_manifest.json"
-manifestJsonVersionsFile="/tmp/workdir/generated_build_versions_manifest.json"
+manifestJsonFile="${WORKDIR:-$PWD}/generated_build_manifest.json"
+manifestJsonVersionsFile="${WORKDIR:-$PWD}/generated_build_versions_manifest.json"
OS_NAME=$(uname -s)
is_ubuntu=false
@@ -186,7 +186,7 @@
build_libsvtav1() {
cd Build && \
- cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DCMAKE_BUILD_TYPE=Release -DBUILD_DEC=OFF -DBUILD_SHARED_LIBS=OFF .. \
+ cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DCMAKE_BUILD_TYPE=Release -DBUILD_DEC=OFF -DBUILD_SHARED_LIBS=OFF .. &&
make && \
make install
}
@@ -333,7 +333,6 @@
./configure --disable-debug \
--disable-doc \
--disable-ffplay \
- --enable-fontconfig \
--enable-gpl \
--enable-libaom \
--enable-libaribb24 \
@@ -450,7 +449,7 @@
echo "-------------------- Running callback: build_${lib_name} --------------------"
build_${callback_lib_name} ${build_dir}
echo "Finished building $lib_name removing build directory [${build_dir}]"
- cd /tmp/workdir
+ cd "$(dirname "$manifestJsonFile")"
rm -rf $build_dir
done
}
--- a/install_ffmpeg.sh
+++ b/install_ffmpeg.sh
@@ -65,6 +65,7 @@
if $is_fedora; then
copy_linked_libs_by_path "/usr/lib64" /usr/local/lib64
+ copy_linked_libs_by_path "/lib64" /usr/local/lib64
fi
copy_linked_libs_by_path "${PREFIX}/lib64" /usr/local/lib64
copy_linked_libs_by_path "${PREFIX}/lib" /usr/local/lib
@@ -86,7 +87,7 @@
# Copy ffmpeg binaries and share directory to /usr/local
cp -r ${PREFIX}/bin/* /usr/local/bin/
- cp -r ${PREFIX}/share/ffmpeg /usr/local/share/
+ if [ -d "${PREFIX}/share/ffmpeg" ]; then cp -r ${PREFIX}/share/ffmpeg /usr/local/share/; fi
if [ ! -d /usr/local/include ]; then
mkdir -p /usr/local/include
@@ -134,7 +135,7 @@
ldd ${PREFIX}/bin/ffmpeg | cut -d ' ' -f 3 | strings | xargs -I R cp R /tmp/fakeroot/lib/
for lib in /tmp/fakeroot/lib/*; do strip --strip-all $lib; done
cp -r ${PREFIX}/bin /tmp/fakeroot/bin/
- cp -r ${PREFIX}/share/ffmpeg /tmp/fakeroot/share/
+ if [ -d "${PREFIX}/share/ffmpeg" ]; then cp -r ${PREFIX}/share/ffmpeg /tmp/fakeroot/share/; fi
LD_LIBRARY_PATH=/tmp/fakeroot/lib /tmp/fakeroot/bin/ffmpeg -buildconf
}
@@ -143,7 +144,7 @@
mkdir -p /tmp/fakeroot/lib
ldd ${PREFIX}/bin/ffmpeg | cut -d ' ' -f 3 | strings | xargs -I R cp R /tmp/fakeroot/lib/
cp -r ${PREFIX}/bin /tmp/fakeroot/bin/
- cp -r ${PREFIX}/share/ffmpeg /tmp/fakeroot/share/
+ if [ -d "${PREFIX}/share/ffmpeg" ]; then cp -r ${PREFIX}/share/ffmpeg /tmp/fakeroot/share/; fi
LD_LIBRARY_PATH=/tmp/fakeroot/lib /tmp/fakeroot/bin/ffmpeg -buildconf
}
--- a/generate-source-of-truth-ffmpeg-versions.py
+++ b/generate-source-of-truth-ffmpeg-versions.py
@@ -119,7 +119,7 @@
"version": X264["version"],
"version_link": "https://download.videolan.org/pub/videolan/x264/snapshots/",
"release_date": X264["release_date"],
- "license_name": "GNU General Public License (GPL) version 2",
+ "license_name": "FTL or GPLv2",
"license_link": "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html",
"build_info": {
"download_link": f"https://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-{X264['version']}.tar.bz2",
@@ -136,7 +136,7 @@
# "https://www.x265.org/downloads/",
"version_link": "http://ftp.videolan.org/pub/videolan/x265/",
"release_date": X265["release_date"],
- "license_name": "GNU General Public License (GPL) version 2",
+ "license_name": "FTL or GPLv2",
"license_link": "https://bitbucket.org/multicoreware/x265/raw/f8ae7afc1f61ed0db3b2f23f5d581706fe6ed677/COPYING",
"build_info": {
"download_link": f"http://ftp.videolan.org/pub/videolan/x265/x265_{X265['version']}.tar.gz",
@@ -305,7 +305,7 @@
"version": FREETYPE["version"],
"version_link": "http://download.savannah.gnu.org/releases/freetype/",
"release_date": FREETYPE["release_date"],
- "license_name": "GNU General Public License (GPL) version 2",
+ "license_name": "FTL or GPLv2",
"license_link": "https://www.freetype.org/license.html",
"build_info": {
"download_link": f"http://download.savannah.gnu.org/releases/freetype/freetype-{FREETYPE['version']}.tar.gz",
@@ -321,7 +321,7 @@
"version": LIBVIDSTAB["version"],
"version_link": "https://github.com/georgmartius/vid.stab/tags",
"release_date": LIBVIDSTAB["release_date"],
- "license_name": "GNU General Public License (GPL) version 2",
+ "license_name": "FTL or GPLv2",
"license_link": "https://github.com/georgmartius/vid.stab/blob/master/LICENSE",
"build_info": {
"download_link": f"https://github.com/georgmartius/vid.stab/archive/v{LIBVIDSTAB['version']}.tar.gz",
@@ -337,7 +337,7 @@
"version": FRIBIDI["version"],
"version_link": "https://github.com/fribidi/fribidi/releases",
"release_date": FRIBIDI["release_date"],
- "license_name": "GNU General Public License (GPL) version 2",
+ "license_name": "FTL or GPLv2",
"license_link": "https://cgit.freedesktop.org/fribidi/fribidi/plain/COPYING",
"build_info": {
"download_link": f"https://github.com/fribidi/fribidi/archive/refs/tags/v{FRIBIDI['version']}.tar.gz",
@@ -523,7 +523,7 @@
"build_info": {
"download_link": f"https://gitlab.gnome.org/GNOME/libxml2/-/archive/v{LIBXML2['version']}/libxml2-v{LIBXML2['version']}.tar.gz",
"build_dir": "/tmp/libxml2",
- "tarball_name": f"libxml2-{LIBXML2['version']}.tar.gz",
+ "tarball_name": f"libxml2-v{LIBXML2['version']}.tar.gz",
"using_source_build": False,
},
},
@@ -535,7 +535,7 @@
"version": LIBBLURAY["version"],
"version_link": "https://download.videolan.org/pub/videolan/libbluray/",
"release_date": LIBBLURAY["release_date"],
- "license_name": "GNU General Public License (GPL) version 2",
+ "license_name": "FTL or GPLv2",
"license_link": "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html",
"build_info": {
"download_link": f"https://download.videolan.org/pub/videolan/libbluray/{LIBBLURAY['version']}/libbluray-{LIBBLURAY['version']}.tar.bz2",
@@ -608,7 +608,7 @@
"build_info": {
"download_link": f"https://github.com/sekrit-twc/zimg/archive/refs/tags/release-{ZIMG['version']}.tar.gz",
"build_dir": "/tmp/zimg",
- "tarball_name": f"zimg-{ZIMG['version']}.tar.gz",
+ "tarball_name": f"zimg-release-{ZIMG['version']}.tar.gz",
},
},
),
--- a/TOOLBOX.md
+++ b/TOOLBOX.md
@@ -25,6 +25,7 @@
3. Run the existing helper scripts from this repository inside the toolbox:
```bash
export PREFIX=/opt/ffmpeg
+ export WORKDIR=$PWD # scripts read manifests from $WORKDIR
./generate-source-of-truth-ffmpeg-versions.py --library-list kvazaar,libvmaf,whisper
./download_tarballs.sh
./build_source.sh