Skip to content

Commit 048cbad

Browse files
chromium: enable ffmpeg (#178)
1 parent 0afde6f commit 048cbad

15 files changed

+408
-77
lines changed

tur-continuous/chromium/0011-chromium-impl-sysinfo.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
+
2222
+#include "base/logging.h"
2323
+
24-
+#if (__ANDROID_API__ >= 21 /* 5.0 - Lollipop */)
24+
+#if 0 // (__ANDROID_API__ >= 21 /* 5.0 - Lollipop */)
2525
+
2626
+namespace {
2727
+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
--- a/ui/base/x/x11_cursor_loader.cc
2+
+++ b/ui/base/x/x11_cursor_loader.cc
3+
@@ -139,7 +139,11 @@
4+
void operator()(void* ptr) const { dlclose(ptr); }
5+
};
6+
7+
+#ifdef __TERMUX__
8+
+ std::unique_ptr<void, DlCloser> lib(dlopen("libXcursor.so", RTLD_LAZY));
9+
+#else
10+
std::unique_ptr<void, DlCloser> lib(dlopen("libXcursor.so.1", RTLD_LAZY));
11+
+#endif
12+
if (!lib)
13+
return "";
14+
15+
--- a/ui/gfx/x/xlib_support.cc
16+
+++ b/ui/gfx/x/xlib_support.cc
17+
@@ -41,7 +41,11 @@
18+
CHECK(xlib_loader->Load("libX11.so.6"));
19+
20+
auto* xlib_xcb_loader = GetXlibXcbLoader();
21+
+#ifndef __TERMUX__
22+
CHECK(xlib_xcb_loader->Load("libX11-xcb.so.1"));
23+
+#else
24+
+ CHECK(xlib_xcb_loader->Load("libX11-xcb.so"));
25+
+#endif
26+
27+
CHECK(xlib_loader->XInitThreads());
28+

tur-continuous/chromium/0043-fix-dynamic-loaded-libraries.patch renamed to tur-continuous/chromium/0044-ozone-fix-dynamic-loaded-libraries.patch

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
--- a/ui/gfx/x/xlib_support.cc
2-
+++ b/ui/gfx/x/xlib_support.cc
3-
@@ -41,7 +41,11 @@
4-
CHECK(xlib_loader->Load("libX11.so.6"));
5-
6-
auto* xlib_xcb_loader = GetXlibXcbLoader();
7-
+#ifndef __TERMUX__
8-
CHECK(xlib_xcb_loader->Load("libX11-xcb.so.1"));
9-
+#else
10-
+ CHECK(xlib_xcb_loader->Load("libX11-xcb.so"));
11-
+#endif
12-
13-
CHECK(xlib_loader->XInitThreads());
14-
151
--- a/ui/ozone/platform/wayland/host/wayland_connection.cc
162
+++ b/ui/ozone/platform/wayland/host/wayland_connection.cc
173
@@ -139,14 +139,22 @@
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
--- a/ui/gtk/gtk_compat.cc
2+
+++ b/ui/gtk/gtk_compat.cc
3+
@@ -62,27 +62,47 @@
4+
}
5+
6+
void* GetLibGio() {
7+
+#ifdef __TERMUX__
8+
+ static void* libgio = DlOpen("libgio-2.0.so");
9+
+#else
10+
static void* libgio = DlOpen("libgio-2.0.so.0");
11+
+#endif
12+
return libgio;
13+
}
14+
15+
void* GetLibGdkPixbuf() {
16+
+#ifdef __TERMUX__
17+
+ static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so");
18+
+#else
19+
static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so.0");
20+
+#endif
21+
return libgdk_pixbuf;
22+
}
23+
24+
void* GetLibGdk3() {
25+
+#ifdef __TERMUX__
26+
+ static void* libgdk3 = DlOpen("libgdk-3.so");
27+
+#else
28+
static void* libgdk3 = DlOpen("libgdk-3.so.0");
29+
+#endif
30+
return libgdk3;
31+
}
32+
33+
void* GetLibGtk3(bool check = true) {
34+
+#ifdef __TERMUX__
35+
+ static void* libgtk3 = DlOpen("libgtk-3.so", check);
36+
+#else
37+
static void* libgtk3 = DlOpen("libgtk-3.so.0", check);
38+
+#endif
39+
return libgtk3;
40+
}
41+
42+
void* GetLibGtk4(bool check = true) {
43+
+#ifdef __TERMUX__
44+
+ static void* libgtk4 = DlOpen("libgtk-4.so", check);
45+
+#else
46+
static void* libgtk4 = DlOpen("libgtk-4.so.1", check);
47+
+#endif
48+
return libgtk4;
49+
}
50+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
--- a/media/audio/pulse/pulse_util.cc
2+
+++ b/media/audio/pulse/pulse_util.cc
3+
@@ -44,8 +44,12 @@
4+
5+
#if defined(DLOPEN_PULSEAUDIO)
6+
static const base::FilePath::CharType kPulseLib[] =
7+
+#ifdef __TERMUX__
8+
+ FILE_PATH_LITERAL("libpulse.so");
9+
+#else
10+
FILE_PATH_LITERAL("libpulse.so.0");
11+
#endif
12+
+#endif
13+
14+
void DestroyMainloop(pa_threaded_mainloop* mainloop) {
15+
pa_threaded_mainloop_stop(mainloop);
16+
--- a/third_party/webrtc/modules/audio_device/linux/pulseaudiosymboltable_linux.cc
17+
+++ b/third_party/webrtc/modules/audio_device/linux/pulseaudiosymboltable_linux.cc
18+
@@ -30,7 +30,11 @@
19+
namespace webrtc {
20+
namespace adm_linux_pulse {
21+
22+
+#ifdef __TERMUX__
23+
+LATE_BINDING_SYMBOL_TABLE_DEFINE_BEGIN(PulseAudioSymbolTable, "libpulse.so")
24+
+#else
25+
LATE_BINDING_SYMBOL_TABLE_DEFINE_BEGIN(PulseAudioSymbolTable, "libpulse.so.0")
26+
+#endif
27+
#define X(sym) \
28+
LATE_BINDING_SYMBOL_TABLE_DEFINE_ENTRY(PulseAudioSymbolTable, sym)
29+
PULSE_AUDIO_SYMBOLS_LIST
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
--- a/components/os_crypt/keyring_util_linux.cc
2+
+++ b/components/os_crypt/keyring_util_linux.cc
3+
@@ -68,7 +68,11 @@
4+
if (keyring_loaded)
5+
return true;
6+
7+
+#ifdef __TERMUX__
8+
+ void* handle = dlopen("libgnome-keyring.so", RTLD_NOW | RTLD_GLOBAL);
9+
+#else
10+
void* handle = dlopen("libgnome-keyring.so.0", RTLD_NOW | RTLD_GLOBAL);
11+
+#endif
12+
if (!handle) {
13+
// We wanted to use GNOME Keyring, but we couldn't load it. Warn, because
14+
// either the user asked for this, or we autodetected it incorrectly. (Or
15+
--- a/components/os_crypt/libsecret_util_linux.cc
16+
+++ b/components/os_crypt/libsecret_util_linux.cc
17+
@@ -102,7 +102,11 @@
18+
if (libsecret_loaded_)
19+
return true;
20+
21+
+#ifdef __TERMUX__
22+
+ static void* handle = dlopen("libsecret-1.so", RTLD_NOW | RTLD_GLOBAL);
23+
+#else
24+
static void* handle = dlopen("libsecret-1.so.0", RTLD_NOW | RTLD_GLOBAL);
25+
+#endif
26+
if (!handle) {
27+
// We wanted to use libsecret, but we couldn't load it. Warn, because
28+
// either the user asked for this, or we autodetected it incorrectly. (Or
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
--- a/third_party/swiftshader/src/WSI/libWaylandClient.cpp
2+
+++ b/third_party/swiftshader/src/WSI/libWaylandClient.cpp
3+
@@ -56,7 +56,11 @@
4+
}
5+
else
6+
{
7+
+#ifdef __TERMUX__
8+
+ libwl = loadLibrary("libwayland-client.so");
9+
+#else
10+
libwl = loadLibrary("libwayland-client.so.0");
11+
+#endif
12+
}
13+
14+
return LibWaylandClientExports(libwl);
15+
--- a/third_party/swiftshader/src/WSI/libXCB.cpp
16+
+++ b/third_party/swiftshader/src/WSI/libXCB.cpp
17+
@@ -55,7 +55,11 @@
18+
}
19+
else
20+
{
21+
+#ifdef __TERMUX__
22+
+ libxcb = loadLibrary("libxcb.so");
23+
+#else
24+
libxcb = loadLibrary("libxcb.so.1");
25+
+#endif
26+
}
27+
28+
if(getProcAddress(RTLD_DEFAULT, "xcb_shm_query_version")) // Search the global scope for pre-loaded XCB library.
29+
@@ -64,7 +68,11 @@
30+
}
31+
else
32+
{
33+
+#ifdef __TERMUX__
34+
+ libshm = loadLibrary("libxcb-shm.so");
35+
+#else
36+
libshm = loadLibrary("libxcb-shm.so.0");
37+
+#endif
38+
}
39+
40+
return LibXcbExports(libxcb, libshm);
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--- a/third_party/dawn/src/dawn/native/XlibXcbFunctions.cpp
2+
+++ b/third_party/dawn/src/dawn/native/XlibXcbFunctions.cpp
3+
@@ -17,7 +17,11 @@
4+
namespace dawn::native {
5+
6+
XlibXcbFunctions::XlibXcbFunctions() {
7+
+#ifdef __TERMUX__
8+
+ if (!mLib.Open("libX11-xcb.so") || !mLib.GetProc(&xGetXCBConnection, "XGetXCBConnection")) {
9+
+#else
10+
if (!mLib.Open("libX11-xcb.so.1") || !mLib.GetProc(&xGetXCBConnection, "XGetXCBConnection")) {
11+
+#endif
12+
mLib.Close();
13+
}
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--- a/third_party/weston/src/libweston/backend-drm/drm-gbm.c
2+
+++ b/third_party/weston/src/libweston/backend-drm/drm-gbm.c
3+
@@ -61,7 +61,11 @@
4+
* only the gl-renderer module links to it, the call above won't make
5+
* these symbols globally available, and loading the DRI driver fails.
6+
* Workaround this by dlopen()'ing libglapi with RTLD_GLOBAL. */
7+
+#ifdef __TERMUX__
8+
+ dlopen("libglapi.so", RTLD_LAZY | RTLD_GLOBAL);
9+
+#else
10+
dlopen("libglapi.so.0", RTLD_LAZY | RTLD_GLOBAL);
11+
+#endif
12+
13+
gbm = gbm_create_device(fd);
14+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/chrome/browser/download/download_status_updater_linux.cc
2+
+++ b/chrome/browser/download/download_status_updater_linux.cc
3+
@@ -77,6 +77,8 @@
4+
if (!unity_lib)
5+
unity_lib = dlopen("libunity.so.9", RTLD_LAZY);
6+
if (!unity_lib)
7+
+ unity_lib = dlopen("libunity.so", RTLD_LAZY);
8+
+ if (!unity_lib)
9+
return;
10+
11+
unity_inspector_get_default_func inspector_get_default =

0 commit comments

Comments
 (0)