Skip to content

Commit

Permalink
chromium: enable gui (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
licy183 committed Dec 6, 2022
1 parent b7e8ae0 commit 4bdea30
Show file tree
Hide file tree
Showing 23 changed files with 921 additions and 70 deletions.
70 changes: 69 additions & 1 deletion .github/workflows/package_continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,77 @@ jobs:
name: build-status-${{ matrix.target_arch }}-${{ github.sha }}
path: ./build-status

finished-build:
build-4:
runs-on: ubuntu-22.04
needs: build-3
env:
ANDROID_HOME: "/opt/termux/android-sdk"
NDK: "/opt/termux/android-ndk"
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
TUR_CONTINUOUS_FLAG: true
strategy:
matrix:
target_arch: [aarch64, arm, i686, x86_64]
fail-fast: false
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
fetch-depth: 1000
submodules: true
- name: Merge repos
run: ./setup-environment.sh
- name: Free additional disk space
run: |
sudo apt purge -yq $(dpkg -l | grep '^ii' | awk '{ print $2 }' | grep -P '(cabal-|dotnet-|ghc-|libmono|php|aspnetcore)') \
mono-runtime-common monodoc-manual ruby
sudo apt autoremove -yq
sudo rm -rf /opt/hostedtoolcache /usr/local /usr/share/dotnet /usr/share/swift
- name: Download build deps
uses: actions/download-artifact@v3
with:
name: build-deps-${{ matrix.target_arch }}-${{ github.sha }}
path: ./build-deps
- name: Download build status
uses: actions/download-artifact@v3
with:
name: build-status-${{ matrix.target_arch }}-${{ github.sha }}
path: ./build-status
- name: Extract build status
run: |
tar xf build-status/${{ matrix.target_arch }}-${{ github.sha }}.tar
rm -f build-status/${{ matrix.target_arch }}-${{ github.sha }}.tar
- name: Build packages
run: |
if [ "$(cat ./build-status/tur-continuous-finished-flag)" = "true" ]; then
exit 0
fi
declare -a packages
for repo_path in $(jq --raw-output 'keys | .[]' repo.json); do
repo=$(jq --raw-output '.["'${repo_path}'"].name' repo.json)
if [ -f ./built_${repo}_packages.txt ]; then
packages="$packages $(cat ./built_${repo}_packages.txt)"
fi
done
if [ ! -z "$packages" ]; then
./continuous-build-wrapper.sh ./build-package.sh -I -a ${{ matrix.target_arch }} $packages
fi
- name: Waiting for debugger
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
- name: Generate build status
run: |
tar cf build-status/${{ matrix.target_arch }}-${{ github.sha }}.tar ./*.txt ./debs ./artifacts ./output
- name: Upload build status
uses: actions/upload-artifact@v3
with:
name: build-status-${{ matrix.target_arch }}-${{ github.sha }}
path: ./build-status


finished-build:
runs-on: ubuntu-22.04
needs: build-4
env:
ANDROID_HOME: "/opt/termux/android-sdk"
NDK: "/opt/termux/android-ndk"
Expand Down
24 changes: 11 additions & 13 deletions tur-continuous/chromium/0023-chromium-dummy-certs-provider.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
--- a/net/cert/cert_verifier.cc
+++ b/net/cert/cert_verifier.cc
@@ -78,7 +78,7 @@
std::unique_ptr<CertVerifier> CertVerifier::CreateDefaultWithoutCaching(
scoped_refptr<CertNetFetcher> cert_net_fetcher) {
scoped_refptr<CertVerifyProc> verify_proc;
-#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || defined(__TERMUX__)
verify_proc =
CertVerifyProc::CreateBuiltinVerifyProc(std::move(cert_net_fetcher));
#elif BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED)
--- a/net/cert/cert_verify_proc.cc
+++ b/net/cert/cert_verify_proc.cc
@@ -52,7 +52,7 @@
Expand Down Expand Up @@ -29,19 +40,6 @@
// Creates and returns a CertVerifyProcBuiltin using the SSL SystemTrustStore.
static scoped_refptr<CertVerifyProc> CreateBuiltinVerifyProc(
scoped_refptr<CertNetFetcher> cert_net_fetcher);
--- a/net/cert/test_root_certs.cc
+++ b/net/cert/test_root_certs.cc
@@ -12,6 +12,10 @@
#include "net/cert/x509_util.h"
#include "third_party/boringssl/src/include/openssl/pool.h"

+#ifdef __TERMUX__
+#include "./test_root_certs_builtin.cc"
+#endif
+
namespace net {

namespace {
--- a/net/cert/internal/system_trust_store.cc
+++ b/net/cert/internal/system_trust_store.cc
@@ -44,7 +44,7 @@
Expand Down
11 changes: 11 additions & 0 deletions tur-continuous/chromium/0029-angle-no-android-jni.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/third_party/angle/src/common/platform.h
+++ b/third_party/angle/src/common/platform.h
@@ -17,7 +17,7 @@
#elif defined(__APPLE__)
# define ANGLE_PLATFORM_APPLE 1
# define ANGLE_PLATFORM_POSIX 1
-#elif defined(ANDROID)
+#elif (defined(ANDROID) && !defined(__TERMUX__))
# define ANGLE_PLATFORM_ANDROID 1
# define ANGLE_PLATFORM_POSIX 1
#elif defined(__ggp__)
14 changes: 14 additions & 0 deletions tur-continuous/chromium/0030-unrar-no-lutimes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Origin: https://github.com/termux/termux-packages/blob/b6a1362cec0f5432629b433b389a70357059f79b/packages/unrar/os.hpp.patch

diff -u -r ../unrar/os.hpp ./os.hpp
--- a/third_party/unrar/src/os.hpp 2017-06-10 13:59:52.000000000 +0000
+++ b/third_party/unrar/src/os.hpp 2017-06-12 00:11:04.591100580 +0000
@@ -154,7 +154,7 @@
#define SAVE_LINKS
#endif

-#if defined(__linux) || defined(__FreeBSD__)
+#if (defined(__linux) && !defined(__ANDROID__)) || defined(__FreeBSD__)
#include <sys/time.h>
#define USE_LUTIMES
#endif
41 changes: 41 additions & 0 deletions tur-continuous/chromium/0031-angle-wayland.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Origin: https://sources.debian.org/src/chromium/107.0.5304.110-2/debian/patches/fixes/angle-wayland.patch/
description: this is just wayland-client-core.h diffed against /usr/include/wayland-client-core.h in sid
author: Andres Salomon <dilinger@debian.org>

ANGLE upstream broke wayland inclusion stuff when building against system
libwayland. It's fine in bullseye (where libwayland is older), but breaks
in sid. This brings the header in chromium/angle with what's in sid.

Drop this once ANGLE gets updated.


--- a/third_party/wayland/src/src/wayland-client-core.h
+++ b/third_party/wayland/src/src/wayland-client-core.h
@@ -119,9 +119,27 @@ struct wl_display;
*/
struct wl_event_queue;

+/** Destroy proxy after marshalling
+ * @ingroup wl_proxy
+ */
+#define WL_MARSHAL_FLAG_DESTROY (1 << 0)
+
void
wl_event_queue_destroy(struct wl_event_queue *queue);

+struct wl_proxy *
+wl_proxy_marshal_flags(struct wl_proxy *proxy, uint32_t opcode,
+ const struct wl_interface *interface,
+ uint32_t version,
+ uint32_t flags, ...);
+
+struct wl_proxy *
+wl_proxy_marshal_array_flags(struct wl_proxy *proxy, uint32_t opcode,
+ const struct wl_interface *interface,
+ uint32_t version,
+ uint32_t flags,
+ union wl_argument *args);
+
void
wl_proxy_marshal(struct wl_proxy *p, uint32_t opcode, ...);

0 comments on commit 4bdea30

Please sign in to comment.