From fa309f5b24ab57eda5ba99a4d8c92fffc563ae76 Mon Sep 17 00:00:00 2001 From: Aron Griffis Date: Tue, 28 Jun 2005 19:07:33 +0000 Subject: Add function install_mozilla_launcher_stub --- eclass/mozilla-launcher.eclass | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'eclass') diff --git a/eclass/mozilla-launcher.eclass b/eclass/mozilla-launcher.eclass index 6904780e83ab..c23d32d019f3 100644 --- a/eclass/mozilla-launcher.eclass +++ b/eclass/mozilla-launcher.eclass @@ -1,12 +1,13 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/mozilla-launcher.eclass,v 1.4 2005/03/21 19:15:46 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/mozilla-launcher.eclass,v 1.5 2005/06/28 19:07:33 agriffis Exp $ ECLASS=mozilla-launcher INHERITED="$INHERITED $ECLASS" -# This eclass serves a single function: Create or remove the following -# symlinks in /usr/bin: +# update_mozilla_launcher_symlinks +# -------------------------------- +# Create or remove the following symlinks in /usr/bin: # # firefox -> firefox-bin # thunderbird -> thunderbird-bin @@ -29,7 +30,7 @@ INHERITED="$INHERITED $ECLASS" # when a -bin package is installed and the corresponding from-source # package is not installed. The usual stubs are actually installed in # src_install so they are included in the package inventory. - +# update_mozilla_launcher_symlinks() { local f browsers="mozilla firefox thunderbird sunbird" cd ${ROOT}/usr/bin @@ -52,3 +53,25 @@ update_mozilla_launcher_symlinks() { fi done } + +# install_mozilla_launcher_stub name +# ---------------------------------- +# Install a stub called /usr/bin/$name that executes mozilla-launcher +# +install_mozilla_launcher_stub() { + [[ -n $1 ]] || die "install_launcher_stub requires an argument" + declare name=$1 + + dodir /usr/bin + cat <${D}/usr/bin/${name} +#!/bin/sh +# +# Stub script to run mozilla-launcher. We used to use a symlink here +# but OOo brokenness makes it necessary to use a stub instead: +# http://bugs.gentoo.org/show_bug.cgi?id=78890 + +export MOZILLA_LAUNCHER=${name} +exec /usr/libexec/mozilla-launcher "\$@" +EOF + chmod 0755 ${D}/usr/bin/${name} +} -- cgit v1.2.3-65-gdbad