[Lunar-commits] <moonbase> chromium: Initial attempt to get google chrome into moonbase. Lots of hacks, but hey it works for me.
Terry Chan
tchan at lunar-linux.org
Tue Jan 5 01:01:56 CET 2010
commit 809bf30be9063ddec38c999e9a021383f7494a2b
Author: Terry Chan <tchan at lunar-linux.org>
Date: Mon Jan 4 18:01:56 2010 -0600
chromium: Initial attempt to get google chrome into moonbase. Lots of hacks, but hey it works for me.
---
web/chromium/BUILD | 65 +++++++++++++++++++++++++++++++++++++
web/chromium/DEPENDS | 15 ++++++++
web/chromium/DETAILS | 17 ++++++++++
web/chromium/POST_INSTALL | 7 ++++
web/chromium/chromium-launcher.sh | 25 ++++++++++++++
5 files changed, 129 insertions(+), 0 deletions(-)
diff --git a/web/chromium/BUILD b/web/chromium/BUILD
new file mode 100644
index 0000000..55b366b
--- /dev/null
+++ b/web/chromium/BUILD
@@ -0,0 +1,65 @@
+(
+
+ sedit "s/'-Werror'/''/" build/common.gypi &&
+ patch_it $SOURCE_CACHE/$SOURCE2 1 &&
+# sedit '/mozzconf.h/d' third_party/WebKit/WebCore/platform/image-decoders/zlib/zconf.h &&
+
+ export CHROMIUM_HOME=/usr/lib/$MODULE
+
+ mkdir -p "${SOURCE_DIRECTORY}"/.gyp &&
+ cat << EOF > "${SOURCE_DIRECTORY}"/.gyp/include.gypi
+{
+ 'target_defaults': {
+ 'cflags': [ '${CFLAGS// /','}' ],
+ 'ldflags': [ '${LDFLAGS// /','}' ],
+ },
+}
+EOF
+
+ OPTS="$OPTS -Duse_system_bzip2=1 -Duse_system_libevent=1 -Duse_system_libjpeg=1 -Duse_system_libpng=1 -Duse_system_libxml=1 -Duse_system_libxslt=1"
+
+ OPTS="$OPTS -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome"
+
+ # set the target arch here
+ if [ "`arch`" == "x86_64" ]; then
+ OPTS="$OPTS -Dtarget_arch=x64"
+ else
+ OPTS="$OPTS -Dtarget_arch=ia32"
+ fi
+
+ gcc_ver=`installed_version gcc | cut -d. -f1,2`
+ if [[ $gcc_ver == "4.4" ]]; then
+ OPTS="$OPTS -Dno_strict_aliasing=1 -Dgcc_version=44"
+ fi
+
+ # This is the configure step
+ build/gyp_chromium -f make build/all.gyp $OPTS --depth=. &&
+
+ # This is the make step
+ make V=1 chrome chrome_sandbox BUILDTYPE=Release &&
+
+ prepare_install &&
+
+ mkdir -p ${CHROMIUM_HOME} &&
+ cp -a out/Release/chrome ${CHROMIUM_HOME} &&
+ cp -a out/Release/chrome_sandbox ${CHROMIUM_HOME} &&
+ chmod 4755 ${CHROMIUM_HOME}/chrome_sandbox &&
+ cp -a out/Release/xdg-settings ${CHROMIUM_HOME} &&
+ install -m 755 $SCRIPT_DIRECTORY/chromium-launcher.sh ${CHROMIUM_HOME} &&
+ cp -a out/Release/chrome.pak ${CHROMIUM_HOME} &&
+ cp -a out/Release/locales ${CHROMIUM_HOME} &&
+ cp -a out/Release/resources ${CHROMIUM_HOME} &&
+ install -m 644 out/Release/chrome.1 /usr/share/man/man1/ &&
+ install -m 644 out/Release/chrome.1 /usr/share/man/man1/chromium.1 &&
+ if module_installed ffmpeg; then
+ ln -sf /usr/lib/libavcodec.so.52 ${CHROMIUM_HOME}/libavcodec.so.52
+ ln -sf /usr/lib/libavformat.so.52 ${CHROMIUM_HOME}/libavformat.so.52
+ ln -sf /usr/lib/libavutil.so.49 ${CHROMIUM_HOME}/libavutil.so.49
+ fi &&
+
+ # symlink to lunar location for browser plugins, should be /opt/lunar/plugins
+ ln -sf /opt/lunar/plugins ${CHROMIUM_HOME}/plugins &&
+
+ ln -sf ${CHROMIUM_HOME}/chromium-launcher.sh /usr/bin/chromium
+
+) > $C_FIFO 2>&1
diff --git a/web/chromium/DEPENDS b/web/chromium/DEPENDS
new file mode 100644
index 0000000..884a6f6
--- /dev/null
+++ b/web/chromium/DEPENDS
@@ -0,0 +1,15 @@
+depends bzip2
+depends libxml2
+depends libxslt
+depends gtk+-2
+depends nss
+depends GConf
+depends jpeg
+depends libpng
+depends zlib
+depends gperf
+depends Python
+
+optional_depends "ffmpeg" "-Duse_system_Ffmpeg" "" \
+ "To enable system ffmpeg"
+
diff --git a/web/chromium/DETAILS b/web/chromium/DETAILS
new file mode 100644
index 0000000..aa13a5d
--- /dev/null
+++ b/web/chromium/DETAILS
@@ -0,0 +1,17 @@
+ MODULE=chromium
+ VERSION=4.0.249.43
+ SOURCE=${MODULE}-${VERSION}.tar.bz2
+ SOURCE2=${MODULE}-drop_sse2.patch
+ SOURCE_URL=http://download.lunar-linux.org/lunar/mirrors
+ SOURCE2_URL=$PATCH_URL
+ SOURCE_VFY=sha1:d98cb7787433446946601ed4ff4577d0b1e5f46b
+ SOURCE2_VFY=sha1:1aa9701b329d970db00726ba883d7dd5448ba372
+ WEB_SITE=http://www.chromium.org/Home
+ ENTERED=20100104
+ UPDATED=20100104
+ PSAFE=no
+ SHORT="Open-source version of Google Chrome web browser"
+cat << EOF
+Chromium is an open-source browser project that aims to build a safer, faster,
+and more stable way for all users to experience the web.
+EOF
diff --git a/web/chromium/POST_INSTALL b/web/chromium/POST_INSTALL
new file mode 100644
index 0000000..4327c8b
--- /dev/null
+++ b/web/chromium/POST_INSTALL
@@ -0,0 +1,7 @@
+message ""
+message "Chromium MUST have permission to access /dev/shm!!!!!!!"
+message ""
+message " The easiest way to do this while as root is:"
+message ""
+message "chmod 777 /dev/shm"
+message ""
diff --git a/web/chromium/chromium-launcher.sh b/web/chromium/chromium-launcher.sh
new file mode 100644
index 0000000..3c7f89c
--- /dev/null
+++ b/web/chromium/chromium-launcher.sh
@@ -0,0 +1,25 @@
+#!/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.
+
+# Let the wrapped binary know that it has been run through the wrapper
+export CHROME_WRAPPER="`readlink -f "$0"`"
+
+PROGDIR="`dirname "$CHROME_WRAPPER"`"
+
+case ":$PATH:" in
+ *:$PROGDIR:*)
+ # $PATH already contains $PROGDIR
+ ;;
+ *)
+ # Append $PROGDIR to $PATH
+ export PATH="$PATH:$PROGDIR"
+ ;;
+esac
+
+# Set the .desktop file name
+export CHROME_DESKTOP="chromium-chromium.desktop"
+
+exec "$PROGDIR/chrome" "$@"
More information about the Lunar-commits
mailing list