summaryrefslogtreecommitdiff
path: root/network/chromium/chromium.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/chromium/chromium.SlackBuild')
-rw-r--r--network/chromium/chromium.SlackBuild19
1 files changed, 16 insertions, 3 deletions
diff --git a/network/chromium/chromium.SlackBuild b/network/chromium/chromium.SlackBuild
index 6121cb5cbb..665a5e3c94 100644
--- a/network/chromium/chromium.SlackBuild
+++ b/network/chromium/chromium.SlackBuild
@@ -41,6 +41,7 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+USE_CLANG=${USE_CLANG:-NO}
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
# Here we following the same way of Arch Linux and Gentoo.
@@ -87,11 +88,21 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-SLKCFLAGS="${SLKCFLAGS} -Wno-unused-local-typedefs"
+if [ "$USE_CLANG" = "YES" ]; then
+ CLANG_OPT="-Dclang=1 -Dclang_use_chrome_plugins=0"
+ sed -e '/-Wno-absolute-value/d' -i build/common.gypi
+
+ export CC="clang"
+ export CXX="clang++"
+ SLKCFLAGS="${SLKCFLAGS} -Wno-unknown-warning-option"
+else
+ CLANG_OPT="-Dclang=0"
+ SLKCFLAGS="${SLKCFLAGS} -Wno-unused-local-typedefs"
+fi
export -n LDFLAGS="$SLKLDFLAGS" CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS"
_conf=(
- -Dclang=0
+ $CLANG_OPT
-Ddisable_glibc=1
-Dffmpeg_branding=Chrome
-Dffmpeg_component=shared_library
@@ -168,7 +179,9 @@ cp -a third_party/icu/source/data/in/icudtl.dat $PKG/usr/lib${LIBDIRSUFFIX}/chro
mkdir -p $PKG/usr/man/man1
install -m 0644 -D out/Release/chrome.1 $PKG/usr/man/man1/chromium.1
-install -D -m0755 $CWD/chromium.sh $PKG/usr/bin/chromium
+mkdir -p $PKG/usr/bin
+cat $CWD/chromium.sh | sed s/@LIBDIRSUFFIX@/$LIBDIRSUFFIX/ > $PKG/usr/bin/chromium
+chmod 0755 $PKG/usr/bin/chromium
ln -s ../lib${LIBDIRSUFFIX}/chromium/chromedriver $PKG/usr/bin/chromedriver
for size in 16 32; do