summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsL1pKn072018-04-01 16:50:19 +0200
committersL1pKn072018-04-01 16:50:19 +0200
commit84e8d7a1e461bb5f0f59bb946d289e4169bbfee8 (patch)
tree59554ba9495dcbf7bd782a3c34c1403d81177c61
parent8187a86bacbd811358ae51c689ae564aeceecfee (diff)
downloadaur-84e8d7a1e461bb5f0f59bb946d289e4169bbfee8.tar.gz
try to fix compiler problems
-rw-r--r--.SRCINFO4
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD60
-rw-r--r--chromium-ffmpeg-clang.patch15
4 files changed, 57 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8dafe0b0cae9..b6da8b847664 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Sat Mar 31 17:06:02 UTC 2018
+# Sun Apr 1 14:49:51 UTC 2018
pkgbase = chromium-dev
pkgdesc = The open-source project behind Google Chrome (Dev Channel)
pkgver = 67.0.3381.0
@@ -50,6 +50,7 @@ pkgbase = chromium-dev
source = https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-webrtc-r0.patch
source = https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-clang-r2.patch
source = https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-ffmpeg-r1.patch
+ source = chromium-ffmpeg-clang.patch
source = chromium-intel-vaapi_r17.diff.base64::https://chromium-review.googlesource.com/changes/532294/revisions/17/patch?download
source = chromium-widevine-r1.patch
source = fix_gn.diff.base64::https://chromium-review.googlesource.com/changes/982250/revisions/2/patch?download
@@ -62,6 +63,7 @@ pkgbase = chromium-dev
sha256sums = bcb2f4588cf5dcf75cde855c7431e94fdcc34bdd68b876a90f65ab9938594562
sha256sums = 4495e8b29dae242c79ffe4beefc5171eb3c7aacb7e9aebfd2d4d69b9d8c958d3
sha256sums = aa885330bc4180b78d915f9dfdfc3210038a0acab7b16735ea9828ab6a633bde
+ sha256sums = 16741344288d200fadf74546855e00aa204122e744b4811a36155efd5537bd95
sha256sums = 0db6db88f49e01a42b0defc9b152b90d628ff6a0c09268fe7b0c02c569acf60e
sha256sums = 0d537830944814fe0854f834b5dc41dc5fc2428f77b2ad61d4a5e76b0fe99880
sha256sums = 1965356bb6e7ca5fb4be30b3034325b4eb8d91bcbc07d7c8c0c6e2591f05fbe9
diff --git a/.gitignore b/.gitignore
index 441539d1399a..33cfb33b0c60 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
!chromium-dev.install
!chromium-dev.svg
!chromium-widevine-r1.patch
+!chromium-ffmpeg-clang.patch
diff --git a/PKGBUILD b/PKGBUILD
index 2b597bdb06e5..5847973d2846 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -82,7 +82,9 @@ source=( #"https://gsdview.appspot.com/chromium-browser-official/chromium-${pkgv
'https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-webrtc-r0.patch'
'https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-clang-r2.patch'
'https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-ffmpeg-r1.patch'
+
# Misc Patches
+ 'chromium-ffmpeg-clang.patch'
'chromium-intel-vaapi_r17.diff.base64::https://chromium-review.googlesource.com/changes/532294/revisions/17/patch?download'
# Patch from crbug (chromium bugtracker) or Arch chromium package
'chromium-widevine-r1.patch'
@@ -100,6 +102,7 @@ sha256sums=( #"$(curl -sL https://gsdview.appspot.com/chromium-browser-official/
'4495e8b29dae242c79ffe4beefc5171eb3c7aacb7e9aebfd2d4d69b9d8c958d3'
'aa885330bc4180b78d915f9dfdfc3210038a0acab7b16735ea9828ab6a633bde'
# Misc Patches
+ '16741344288d200fadf74546855e00aa204122e744b4811a36155efd5537bd95'
'0db6db88f49e01a42b0defc9b152b90d628ff6a0c09268fe7b0c02c569acf60e'
# Patch from crbug (chromium bugtracker) or Arch chromium package
'0d537830944814fe0854f834b5dc41dc5fc2428f77b2ad61d4a5e76b0fe99880'
@@ -353,7 +356,9 @@ CPPFLAGS+=' -D__DATE__= -D__TIME__= -D__TIMESTAMP__='
# Conditionals.
if check_option strip y; then
- _flags+=('symbol_level=0')
+ _flags+=(
+ 'symbol_level=0'
+ )
# Mimic exclude_unwind_tables=true
CFLAGS+=' -fno-unwind-tables -fno-asynchronous-unwind-tables'
CXXFLAGS+=' -fno-unwind-tables -fno-asynchronous-unwind-tables'
@@ -366,9 +371,35 @@ if check_buildoption ccache y; then
export CCACHE_SLOPPINESS=time_macros
fi
+if [ "${_use_bundled_clang}" = "0" ]; then
+ _flags+=(
+ 'clang_use_chrome_plugins=false'
+ )
+ makedepends+=(
+ 'clang'
+ )
+elif [ "${_use_bundled_clang}" = "1" ]; then
+ _flags+=(
+ 'clang_use_chrome_plugins=true'
+ )
+fi
+
################################################
prepare() {
+ msg2 "Setup compiler environment"
+ if [ "${_use_bundled_clang}" = "1" ]; then
+ _clang_path="${srcdir}/chromium-${pkgver}/third_party/llvm-build/Release+Asserts/bin/"
+ # Bundled clang not like this
+ CXXFLAGS="${CXXFLAGS//-fno-plt/}"
+ CFLAGS="${CFLAGS//-fno-plt/}"
+ fi
+
+ export CC="${_clang_path}clang"
+ export CXX="${_clang_path}clang++"
+ export AR=ar
+ export NM=nm
+
cd "${srcdir}/chromium-${pkgver}"
# Use chromium-dev as branch name.
@@ -390,6 +421,12 @@ prepare() {
patch -p1 -i "${srcdir}/chromium-clang-r2.patch"
patch -p1 -i "${srcdir}/chromium-ffmpeg-r1.patch"
+ # Misc patches
+ # set the correct compiler if use bundled clang
+ if [ "${_use_bundled_clang}" = "1" ]; then
+ cat "${srcdir}/chromium-ffmpeg-clang.patch" | sed "s|__CLANG_PATH__|${_clang_path}|g" | patch -p1 -i -
+ fi
+
# Pats to chromium dev's about why always they forget add/remove missing build rules
base64 -d "${srcdir}/fix_gn.diff.base64" | patch -p1 -i -
@@ -464,27 +501,6 @@ build() {
cd "chromium-${pkgver}"
- msg2 "Setup compiler"
-
- if [ "${_use_bundled_clang}" = "0" ]; then
- _flags+=(
- 'clang_use_chrome_plugins=false'
- )
- elif [ "${_use_bundled_clang}" = "1" ]; then
- _flags+=(
- 'clang_use_chrome_plugins=true'
- )
- _clang_path="${srcdir}/chromium-${pkgver}/third_party/llvm-build/Release+Asserts/bin/"
- # Bundled clang not like this
- export CXXFLAGS="${CXXFLAGS//-fno-plt/}"
- export CFLAGS="${CFLAGS//-fno-plt/}"
- fi
-
- export CC="${_clang_path}clang"
- export CXX="${_clang_path}clang++"
- export AR=ar
- export NM=nm
-
#echo ${_flags[@]}
msg2 "Configure bundled ffmpeg"
diff --git a/chromium-ffmpeg-clang.patch b/chromium-ffmpeg-clang.patch
new file mode 100644
index 000000000000..4caf3ecf54b3
--- /dev/null
+++ b/chromium-ffmpeg-clang.patch
@@ -0,0 +1,15 @@
+--- a/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py
++++ b/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py
+@@ -640,9 +640,9 @@
+ if 'win' not in target_os:
+ configure_flags['Common'].extend([
+ '--enable-pic',
+- '--cc=clang',
+- '--cxx=clang++',
+- '--ld=clang',
++ '--cc=__CLANG_PATH__clang',
++ '--cxx=__CLANG_PATH__clang++',
++ '--ld=__CLANG_PATH__clang',
+ ])
+
+ # Clang Linux will use the first 'ld' it finds on the path, which will