[Lunar-commits] <moonbase-other> Merge branch 'master' of github.com:lunar-linux/moonbase-other
Stefan Wold
ratler at lunar-linux.org
Sat Sep 20 17:46:50 CEST 2014
commit 22858f8668a828fbf1e76c8e6e621e5c1bfcaecc
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Sat, 20 Sep 2014 17:46:08 +0200
URL: https://github.com/lunar-linux/moonbase-other/commit/22858f8668a828fbf1e76c8e6e621e5c1bfcaecc
Merge branch 'master' of github.com:lunar-linux/moonbase-other
---
web/chromium/BUILD | +10/-1
web/chromium/PRE_BUILD | +3/-0
web/chromium/chromium-launcher.sh | +24/-9
zbeta/pepperflash/BUILD | +13/-1
4 files changed, 50 insertions(+), 11 deletions(-)
--- a/web/chromium/BUILD
+++ b/web/chromium/BUILD
@@ -30,6 +30,7 @@
fi &&
install -m 755 $SCRIPT_DIRECTORY/chromium-launcher.sh ${CHROMIUM_HOME} &&
+ ln -sf ${CHROMIUM_HOME}/chromium-launcher.sh /usr/bin/chromium-browser &&
ln -sf ${CHROMIUM_HOME}/chromium-launcher.sh /usr/bin/chromium &&
install -Dm644 LICENSE /usr/share/licenses/chromium/LICENSE &&
@@ -41,4 +42,12 @@
# theme installation
mkdir -p /usr/share/themes/Chromium &&
- cp -a $SOURCE_DIRECTORY/chrome/app/theme /usr/share/themes/Chromium/
+ cp -a $SOURCE_DIRECTORY/chrome/app/theme /usr/share/themes/Chromium/ &&
+
+ if [ ! -f /etc/$MODULE/chromium.default ] ; then
+ mkdir -p /etc/$MODULE &&
+ echo "# Default settings for chromium. This file is sourced by /bin/bash from" > /etc/$MODULE/chromium.default &&
+ echo "# the chromium launcher." >> /etc/$MODULE/chromium.default &&
+ echo "# Options to pass to chromium." >> /etc/$MODULE/chromium.default &&
+ echo "#CHROMIUM_FLAGS=\"\"" >> /etc/$MODULE/chromium.default
+ fi
--- a/web/chromium/PRE_BUILD
+++ b/web/chromium/PRE_BUILD
@@ -8,6 +8,9 @@
sedit "s:/bin/echo:/usr/bin/echo:g" build/common.gypi &&
sedit "s:-Wno-#pragma-messages::g" third_party/opus/opus.gyp &&
+# When using pepperflash gets rid of; ERROR:audio_manager_base.cc(422)] Not implemented reached
+ sedit "s:NOTIMPLEMENTED();::" media/audio/audio_manager_base.cc
+
cp -f $SCRIPT_DIRECTORY/nacl.gypi chrome/ &&
echo Fixing dumb CPU optimizations please wait in patience...
--- a/web/chromium/chromium-launcher.sh
+++ b/web/chromium/chromium-launcher.sh
@@ -1,13 +1,21 @@
-#!/bin/sh
-#
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
+#!/bin/bash
+
+# Allow the user to override command-line flags, bug #357629.
+# This is based on Debian's chromium-browser package, and is intended
+# to be consistent with Debian.
+# This file taken from gentoo and adapted for use in Lunar-Linux
+for f in /etc/chromium/*; do
+ [[ -f ${f} ]] && source "${f}"
+done
+
+# Prefer user defined CHROMIUM_USER_FLAGS (from env) over system
+# default CHROMIUM_FLAGS (from /etc/chromium/default).
+CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-"$CHROMIUM_FLAGS"}
# Let the wrapped binary know that it has been run through the wrapper
-export CHROME_WRAPPER="`readlink -f "$0"`"
+export CHROME_WRAPPER=$(readlink -f "$0")
-PROGDIR="`dirname "$CHROME_WRAPPER"`"
+PROGDIR=${CHROME_WRAPPER%/*}
case ":$PATH:" in
*:$PROGDIR:*)
@@ -19,7 +27,14 @@ case ":$PATH:" in
;;
esac
+if [[ ${EUID} == 0 && -O ${XDG_CONFIG_HOME:-${HOME}} ]]; then
+ # Running as root with HOME owned by root.
+ # Pass --user-data-dir to work around upstream failsafe.
+ CHROMIUM_FLAGS="--user-data-dir=${XDG_CONFIG_HOME:-${HOME}/.config}/chromium
+ ${CHROMIUM_FLAGS}"
+fi
+
# Set the .desktop file name
-export CHROME_DESKTOP="chromium-chromium.desktop"
+export CHROME_DESKTOP="chromium-browser-chromium.desktop"
-exec "$PROGDIR/chrome" "$@"
+exec -a "chromium-browser" "$PROGDIR/chrome" --extra-plugin-dir=/usr/lib/lunar/plugins ${CHROMIUM_FLAGS} "$@"
--- a/zbeta/pepperflash/BUILD
+++ b/zbeta/pepperflash/BUILD
@@ -1,4 +1,16 @@
mkdir -p /usr/lib/lunar/plugins &&
prepare_install &&
- install opt/google/chrome/PepperFlash/* /usr/lib/lunar/plugins
+
+ install opt/google/chrome/PepperFlash/* /usr/lib/lunar/plugins &&
+
+# So you don't need to fiddle with this yourself.
+ mkdir -p /etc/chromium &&
+ if [ ! -f /etc/chromium/pepper-flash ] ; then
+ PP_VER=$(sed -n 's/.*"version": "\(.*\)",.*/\1/p' opt/google/chrome/PepperFlash/manifest.json) &&
+ FLAPPER="/usr/lib/lunar/plugins/libpepflashplayer.so" &&
+ echo -n "CHROMIUM_FLAGS=\"\${CHROMIUM_FLAGS} " > pepper-flash &&
+ echo -n "--ppapi-flash-path=$FLAPPER " >> pepper-flash &&
+ echo "--ppapi-flash-version=$PP_VER\"" >> pepper-flash &&
+ install pepper-flash /etc/chromium/
+ fi
More information about the Lunar-commits
mailing list