summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2009-09-16 13:31:16 +0000
committerBernard Cafarelli <voyageur@gentoo.org>2009-09-16 13:31:16 +0000
commit15d96cdb225bc0c7c34415a776b9f44e3287e7a4 (patch)
treea37c47d00628fc4a6d79d2e5c68a4e2ee4eb37e2 /www-client
parentUnmask policykit useflag on pulseaudio. Per irc request. Since the reason for... (diff)
downloadgentoo-2-15d96cdb225bc0c7c34415a776b9f44e3287e7a4.tar.gz
gentoo-2-15d96cdb225bc0c7c34415a776b9f44e3287e7a4.tar.bz2
gentoo-2-15d96cdb225bc0c7c34415a776b9f44e3287e7a4.zip
Initial commit, ebuild py Pawel Hajdan Jr <phajdan.jr@chromium.org> and me, bug #278975. Tarball hosted on gentoo mirrors until upstream makes official ones available
(Portage version: 2.2_rc40/cvs/Linux x86_64)
Diffstat (limited to 'www-client')
-rw-r--r--www-client/chromium/ChangeLog13
-rw-r--r--www-client/chromium/chromium-4.0.210.0_p26329.ebuild127
-rw-r--r--www-client/chromium/files/chromium-launcher.sh25
-rw-r--r--www-client/chromium/metadata.xml10
4 files changed, 175 insertions, 0 deletions
diff --git a/www-client/chromium/ChangeLog b/www-client/chromium/ChangeLog
new file mode 100644
index 000000000000..d23e80422d83
--- /dev/null
+++ b/www-client/chromium/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for www-client/chromium
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.1 2009/09/16 13:31:16 voyageur Exp $
+
+*chromium-4.0.210.0_p26329 (16 Sep 2009)
+
+ 16 Sep 2009; Bernard Cafarelli <voyageur@gentoo.org>
+ +chromium-4.0.210.0_p26329.ebuild, +files/chromium-launcher.sh,
+ +metadata.xml:
+ Initial commit, ebuild py Pawel Hajdan Jr <phajdan.jr@chromium.org> and
+ me, bug #278975. Tarball hosted on gentoo mirrors until upstream makes
+ official ones available
+
diff --git a/www-client/chromium/chromium-4.0.210.0_p26329.ebuild b/www-client/chromium/chromium-4.0.210.0_p26329.ebuild
new file mode 100644
index 000000000000..82df5887582f
--- /dev/null
+++ b/www-client/chromium/chromium-4.0.210.0_p26329.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-4.0.210.0_p26329.ebuild,v 1.1 2009/09/16 13:31:16 voyageur Exp $
+
+EAPI="2"
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="Open-source version of Google Chrome web browser"
+HOMEPAGE="http://chromium.org/"
+#SRC_URI="http://build.chromium.org/buildbot/archives/${P}.tar.bz2"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="app-arch/bzip2
+ dev-libs/libxml2
+ dev-libs/libxslt
+ >=dev-libs/nss-3.12.2
+ >=gnome-base/gconf-2.24.0
+ media-fonts/corefonts
+ >=media-libs/alsa-lib-1.0.19
+ media-libs/jpeg
+ media-libs/libpng
+ >=media-video/ffmpeg-0.5_p19787
+ sys-libs/zlib
+ >=x11-libs/gtk+-2.14.7"
+# dev-db/sqlite:3
+DEPEND="${RDEPEND}
+ >=dev-util/gperf-3.0.3
+ >=dev-util/pkgconfig-0.23"
+
+export CHROMIUM_HOME=/usr/$(get_libdir)/chromium-browser
+
+src_prepare() {
+ # Needed until we add back "rootdir=.", see below
+ for i in app webkit third_party/ffmpeg build/util base chrome v8/tools/gyp
+ do
+ ln -s "${S}"/out ${i}/out
+ done
+
+ # Changing this in ~/include.gypi does not work
+ sed -i "s/'-Werror'/''/" build/common.gypi || die "Werror sed failed"
+
+ # Temporarly use this gyp_chromium instead of tools/gyp/ one
+ chmod +x build/gyp_chromium
+}
+
+src_configure() {
+ # CFLAGS/LDFLAGS
+ mkdir -p "${S}"/.gyp
+ cat << EOF > "${S}"/.gyp/include.gypi
+{
+ 'target_defaults': {
+ 'cflags': [ '${CFLAGS// /','}' ],
+ 'ldflags': [ '${LDFLAGS// /','}' ],
+ },
+}
+EOF
+ export HOME="${S}"
+
+ # Configuration options (system libraries)
+ local myconf="-Duse_system_bzip2=1 -Duse_system_zlib=1 -Duse_system_libjpeg=1 -Duse_system_libpng=1 -Duse_system_libxml=1 -Duse_system_libxslt=1 -Duse_system_ffmpeg=1 -Dlinux_use_tcmalloc=1"
+ # -Duse_system_sqlite=1 : chromium added initUnixFile() and fillInUnixFile() functions
+ # Others still bundled: icu (not possible?), hunspell, libevent
+
+ # Sandbox paths
+ myconf="${myconf} -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome"
+
+ if use amd64; then
+ myconf="${myconf} -Dtarget_arch=x64"
+ fi
+ if [[ "$(gcc-major-version)$(gcc-minor-version)" == "44" ]]; then
+ myconf="${myconf} -Dno_strict_aliasing=1 -Dgcc_version=44"
+ fi
+
+ #tools/gyp/gyp_chromium -f make build/all.gyp ${myconf} --depth=. || die "gyp failed"
+ build/gyp_chromium -f make build/all.gyp ${myconf} --depth=. || die "gyp failed"
+}
+
+src_compile() {
+ # Broken for "Argument list too long":
+ # http://code.google.com/p/chromium/issues/detail?id=19854
+ # http://code.google.com/p/gyp/issues/detail?id=71
+ # When this is fixed, remove the src_prepare
+ # and add back "rootdir=${S}"
+ emake -r V=1 chrome chrome_sandbox BUILDTYPE=Release \
+ CC=$(tc-getCC) \
+ CXX=$(tc-getCXX) \
+ AR=$(tc-getAR) \
+ RANLIB=$(tc-getRANLIB) \
+ || die "compilation failed"
+}
+
+src_install() {
+ # Chromium does not have "install" target in the build system.
+
+ dodir ${CHROMIUM_HOME}
+
+ exeinto ${CHROMIUM_HOME}
+ doexe out/Release/chrome
+ doexe out/Release/chrome_sandbox
+ fperms 4755 ${CHROMIUM_HOME}/chrome_sandbox
+ doexe out/Release/xdg-settings
+ doexe "${FILESDIR}"/chromium-launcher.sh
+
+ insinto ${CHROMIUM_HOME}
+ doins out/Release/chrome.pak
+
+ doins -r out/Release/locales
+ doins -r out/Release/resources
+ doins -r out/Release/themes
+
+ # Chromium looks for these in its folder
+ dosym /usr/$(get_libdir)/libavcodec.so.52 ${CHROMIUM_HOME}
+ dosym /usr/$(get_libdir)/libavformat.so.52 ${CHROMIUM_HOME}
+ dosym /usr/$(get_libdir)/libavutil.so.50 ${CHROMIUM_HOME}
+
+ # Plugins symlink
+ dosym /usr/$(get_libdir)/nsbrowser/plugins ${CHROMIUM_HOME}/plugins
+
+ newicon out/Release/product_logo_48.png ${PN}-browser.png
+ dosym ${CHROMIUM_HOME}/chromium-launcher.sh /usr/bin/chromium
+ make_desktop_entry chromium "Chromium" ${PN}-browser.png "Network;WebBrowser"
+}
diff --git a/www-client/chromium/files/chromium-launcher.sh b/www-client/chromium/files/chromium-launcher.sh
new file mode 100644
index 000000000000..6db715a1feb4
--- /dev/null
+++ b/www-client/chromium/files/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
+
+# Always use our versions of ffmpeg libs.
+export LD_LIBRARY_PATH="$PROGDIR/lib:$LD_LIBRARY_PATH"
+
+exec "$PROGDIR/chrome" "$@"
diff --git a/www-client/chromium/metadata.xml b/www-client/chromium/metadata.xml
new file mode 100644
index 000000000000..3f951712e4cc
--- /dev/null
+++ b/www-client/chromium/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+ <longdescription>Chromium is the open-source web browser project behind Google Chrome</longdescription>
+</pkgmetadata>