ports/75836: [PATCH] www/mozilla: latest changes against frresh ports

Jose M Rodriguez (freebsd) josemi at freebsd.jazztel.es
Wed Jan 5 02:30:30 UTC 2005


>Number:         75836
>Category:       ports
>Synopsis:       [PATCH] www/mozilla: latest changes against frresh ports
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 05 02:30:28 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Jose M Rodriguez (freebsd)
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
Redes JM
>Environment:
System: FreeBSD orion.redesjm.local 5.3-STABLE FreeBSD 5.3-STABLE #0: Tue Jan  4 07:32:56 CET
>Description:
	- desktop entry: no StartupNotify

	- new mozilla.sh

	- artsdsp

	...

Added file(s):
- files/moz_pis_S90dsp.sh
- files/patch-xpfe_bootstrap_mozilla.in

Port maintainer (gnome at FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- mozilla-1.7.5_2,2.patch begins here ---
diff -ruN --exclude=CVS /usr/HEAD/ports/www/mozilla/Makefile /junk/wk/www/mozilla/Makefile
--- /usr/HEAD/ports/www/mozilla/Makefile	Fri Dec 24 19:25:44 2004
+++ /junk/wk/www/mozilla/Makefile	Wed Jan  5 00:12:11 2005
@@ -7,7 +7,7 @@
 
 PORTNAME?=	mozilla
 PORTVERSION=	1.7.5
-PORTREVISION?=	1
+PORTREVISION?=	2
 PORTEPOCH?=	2
 CATEGORIES?=	www
 MASTER_SITES=	${MASTER_SITE_MOZILLA} \
@@ -99,6 +99,7 @@
 	${LOCALBASE}/jdk1.4.1/jre/plugin/${ARCH}/ns610/libjavaplugin_oji.so \
 	${LOCALBASE}/diablo-jdk1.3.1/jre/plugin/${ARCH}/ns600/libjavaplugin_oji.so \
 	${LOCALBASE}/jdk1.3.1/jre/plugin/${ARCH}/ns600/libjavaplugin_oji.so
+MOZ_PIS_SCRIPTS=	# no default scripts
 
 OPTIONS=XFT "Enable Xft font anti-aliasing" on \
 	CALENDAR "Enable the Calendar module" off \
@@ -111,7 +112,8 @@
 	JAVASCRIPT_DEBUGGER "Enable the DTD and JavaScript debuggers" off \
 	OPTIMIZED_CFLAGS "Enable -O2 optimizations" off \
 	SMB "Enable smb:// URI support using gnomevfs" off \
-	MENU_ENTRY "Add mozilla to the GNOME menu" on
+	MENU_ENTRY "Add mozilla to the GNOME menu" on \
+	ARTSDSP "Add support for KDE arts (artsdsp)" on
 
 .include <bsd.port.pre.mk>
 
@@ -190,6 +192,8 @@
 		MOZ_INTERNAL_LIBART_LGPL=1
 ALL_TARGET=	default
 FAKEDIR=	${WRKDIR}/fake
+SCRIPTS_DIR=	${FAKEDIR}/lib/${MOZILLA}
+MOZ_PIS_DIR=	${SCRIPTS_DIR}/init.d
 
 #.if ${ARCH} == "i386"
 #CONFIGURE_ARGS+=	--enable-reorder
@@ -210,6 +214,10 @@
 CONFIGURE_ARGS+=	--enable-optimize=-O2
 .endif
 
+.if !defined(WITHOUT_ARTSDSP)
+MOZ_PIS_SCRIPTS+=	S90dsp.sh
+.endif
+
 .if ${ARCH} == "alpha" && ${OSVERSION} < 500035
 IGNORE=	"core dumps on alpha during post-build"
 .endif
@@ -261,10 +269,14 @@
 			s|mozilla-nspr|mozilla-nspr${MOZ_SUFX}${PKGNAMESUFFIX}|g' \
 			${WRKSRC}/build/unix/$${pcfile}.pc.in; \
 	done
-	@${SED} -e 's|%%MOZDIR%%|${PREFIX}/lib/${MOZILLA}|g ; \
+	@${SED} -e 's|%%MOZILLA%%|${MOZILLA}|g ; \
+		s|%%JPI_LIST%%|${JPI_LIST}|g ; \
+		s|%%X11BASE%%|${X11BASE}|g ; \
 		s|%%PREFIX%%|${PREFIX}|g' \
 		< ${MASTERDIR}/pkg-install.in > ${PKGINSTALL}
-	@${SED} -e 's|%%MOZDIR%%|${PREFIX}/lib/${MOZILLA}|g' \
+	@${SED} -e 's|%%MOZILLA%%|${MOZILLA}|g ; \
+		s|%%X11BASE%%|${X11BASE}|g ; \
+		s|%%PREFIX%%|${PREFIX}|g' \
 		< ${MASTERDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
 	@${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \
 		< ${FILESDIR}/mozilla.desktop.in > \
@@ -285,27 +297,16 @@
 	${TOUCH} -f ${PLIST}
 	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
 		Makefile ${MAKE_ARGS} install
+	${MKDIR} ${SCRIPTS_DIR}
+	${MKDIR} ${MOZ_PIS_DIR}
 	${REINPLACE_CMD} -e 's|${FAKEDIR}|${PREFIX}|g' \
 		${FAKEDIR}/bin/mozilla \
 		${FAKEDIR}/bin/mozilla-config
-	if [ ! -x ${PREFIX}/bin/mozilla -a ! -L ${PREFIX}/bin/mozilla ]; then \
-		${ECHO_CMD} bin/mozilla >> ${PLIST} ; \
-	fi
-	if [ "${MOZILLA}" != "mozilla" ]; then \
-		${ECHO_CMD} bin/${MOZILLA} >> ${PLIST} ; \
-	fi
-	if [ ! -L ${PREFIX}/lib/browser_plugins/libjavaplugin_oji.so ]; then \
-		for jpi in ${JPI_LIST}; do \
-			if [ -f $${jpi} ]; then \
-				${ECHO_CMD} lib/browser_plugins/libjavaplugin_oji.so >> ${PLIST} ; \
-				break; \
-			fi; \
-		done; \
-	fi
-	${ECHO_CMD} lib/browser_plugins/.${PORTNAME}.keep >> ${PLIST}
-	${ECHO_CMD} "@unexec ${RMDIR} %D/lib/browser_plugins 2>/dev/null || ${TRUE}" >> ${PLIST}
-	${ECHO_CMD} lib/${MOZILLA}/mozilla >> ${PLIST}
-	${ECHO_CMD} lib/${MOZILLA}/mozilla-config >> ${PLIST}
+	${INSTALL_SCRIPT} ${FAKEDIR}/bin/mozilla ${SCRIPTS_DIR}
+	${INSTALL_SCRIPT} ${FAKEDIR}/bin/mozilla-config ${SCRIPTS_DIR}
+.for ii in ${MOZ_PIS_SCRIPTS}
+	${INSTALL_SCRIPT} ${FILESDIR}/moz_pis_${ii} ${MOZ_PIS_DIR}/${ii}
+.endfor
 .if !defined(WITHOUT_MAILNEWS)
 	@${CP} -RL ${WRKSRC}/dist/bin/defaults/isp ${FAKEDIR}/lib/${MOZILLA}/defaults
 .endif
@@ -329,27 +330,8 @@
 do-install:
 	${MKDIR} ${PREFIX}/lib/${MOZILLA}
 	${CHMOD} 755 ${PREFIX}/lib/${MOZILLA}
-	${INSTALL_SCRIPT} ${FAKEDIR}/bin/mozilla ${PREFIX}/lib/${MOZILLA}
-	${INSTALL_SCRIPT} ${FAKEDIR}/bin/mozilla-config ${PREFIX}/lib/${MOZILLA}
 	cd ${FAKEDIR}/lib/${MOZILLA} && ${FIND} . | \
 		${CPIO} -pdm -L -R ${LIBOWN}:${LIBGRP} ${PREFIX}/lib/${MOZILLA}
-	${INSTALL_SCRIPT} ${WRKSRC}/${MOZILLA} ${PREFIX}/bin
-	if [ ! -x ${PREFIX}/bin/mozilla -a ! -L ${PREFIX}/bin/mozilla ]; then \
-		${LN} -sf ${PREFIX}/bin/${MOZILLA} ${PREFIX}/bin/mozilla ; \
-	fi
-	if [ ! -d ${PREFIX}/lib/browser_plugins ]; then \
-		${MKDIR} ${PREFIX}/lib/browser_plugins ; \
-	fi
-	${TOUCH} -f ${PREFIX}/lib/browser_plugins/.${PORTNAME}.keep
-	if [ ! -L ${PREFIX}/lib/browser_plugins/libjavaplugin_oji.so ]; then \
-		for jpi in ${JPI_LIST}; do \
-			if [ -f $${jpi} ]; then \
-		    		${LN} -sf $${jpi} \
-			    		${PREFIX}/lib/browser_plugins/libjavaplugin_oji.so ; \
-				break; \
-			fi; \
-		done; \
-	fi
 	for pcfile in ${PKGCONFIG_FILES}; do \
 		${REINPLACE_CMD} -e 's|${FAKEDIR}|${PREFIX}|g' \
 			${WRKSRC}/build/unix/$${pcfile}.pc; \
diff -ruN --exclude=CVS /usr/HEAD/ports/www/mozilla/files/moz_pis_S90dsp.sh /junk/wk/www/mozilla/files/moz_pis_S90dsp.sh
--- /usr/HEAD/ports/www/mozilla/files/moz_pis_S90dsp.sh	Thu Jan  1 01:00:00 1970
+++ /junk/wk/www/mozilla/files/moz_pis_S90dsp.sh	Tue Jan  4 23:29:06 2005
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+
+# S90dsp.sh
+# dsp aids for mozilla
+# WARN, this is sourced in the main mozilla.sh script.  Be carefull
+
+# esd support seems to be built-in in mozilla now
+# support only arts
+
+if [ -x "${run_moz}" ]; then
+    case "${MOZILLA_DSP}" in
+	[Aa][Rr][Tt][Ss] | artsdsp)
+	    MOZILLA_DSP="artsdsp"
+	    ;;
+	[Nn][Oo][Nn][Ee])
+	    MOZILLA_DSP=""
+	    ;;
+	*) # auto
+	    if [ -n "${KDE_FULL_SESSION}" ]; then
+		MOZILLA_DSP="artsdsp"
+	    else
+		MOZILLA_DSP=""
+	    fi
+	    ;;
+    esac
+    [ -n "${MOZILLA_DSP}" ] && MOZILLA_DSP=`which "${MOZILLA_DSP}"` &&
+    run_moz="${MOZILLA_DSP} ${run_moz}"
+fi
+
+if [ -n "${debuggin}" ]; then
+    echo "dsp: ${run_moz}"
+fi
diff -ruN --exclude=CVS /usr/HEAD/ports/www/mozilla/files/mozilla.desktop.in /junk/wk/www/mozilla/files/mozilla.desktop.in
--- /usr/HEAD/ports/www/mozilla/files/mozilla.desktop.in	Thu Dec 23 02:53:11 2004
+++ /junk/wk/www/mozilla/files/mozilla.desktop.in	Wed Jan  5 02:25:40 2005
@@ -161,7 +161,7 @@
 Comment[zh_CN]=浏览 Web
 Comment[zh_TW]=瀏覽網頁
 Exec=mozilla %U
-StartupNotify=true
+StartupNotify=false
 Terminal=false
 Type=Application
 Icon=%%PREFIX%%/lib/mozilla/chrome/icons/default/default.xpm
diff -ruN --exclude=CVS /usr/HEAD/ports/www/mozilla/files/patch-xpfe_bootstrap_mozilla.in /junk/wk/www/mozilla/files/patch-xpfe_bootstrap_mozilla.in
--- /usr/HEAD/ports/www/mozilla/files/patch-xpfe_bootstrap_mozilla.in	Thu Jan  1 01:00:00 1970
+++ /junk/wk/www/mozilla/files/patch-xpfe_bootstrap_mozilla.in	Wed Jan  5 01:10:43 2005
@@ -0,0 +1,452 @@
+--- xpfe/bootstrap/mozilla.in.orig	Fri Feb 20 19:13:46 2004
++++ xpfe/bootstrap/mozilla.in	Wed Jan  5 01:09:40 2005
+@@ -16,152 +16,328 @@
+ # Reserved.
+ #
+ 
+-## $Id: mozilla.in,v 1.6 2004/02/20 18:13:46 pkw%us.ibm.com Exp $
+-## 
+-## Usage:
+-##
+-## $ mozilla [args]
+-##
+-## This script is meant to run the mozilla-bin binary from either 
+-## mozilla/xpfe/bootstrap or mozilla/dist/bin.
+-##
+-## The script will setup all the environment voodoo needed to make
+-## the mozilla-bin binary to work.
+-##
++# $from: mozilla.in,v 1.3.4.9 2004/10/26 09:26:11 bryner%brianryner.com Exp $
++# Usage:
++#
++# $ mozilla [args]
++#
++# The script will setup all the environment voodoo needed to make
++# the mozilla-bin binary to work.
++#
+ 
++#
++# MOZ_PIS, "Mozilla Plugable Init Scripts"
++# MOZ_PIS_ is the name space used
++# These variables and there meaning are specified in
++# mozilla/xpfe/bootstrap/init.d/README
+ moz_pis_startstop_scripts()
+ {
+-  MOZ_USER_DIR="%MOZ_USER_DIR%"
+-  # MOZ_PIS_ is the name space for "Mozilla Plugable Init Scripts"
+-  # These variables and there meaning are specified in
+-  # mozilla/xpfe/bootstrap/init.d/README
+-  MOZ_PIS_API=2
+-  MOZ_PIS_MOZBINDIR="${dist_bin}"
+-  MOZ_PIS_SESSION_PID="$$"
+-  MOZ_PIS_USER_DIR="${MOZ_USER_DIR}"
+-  export MOZ_PIS_API MOZ_PIS_MOZBINDIR MOZ_PIS_SESSION_PID MOZ_PIS_USER_DIR
+-  
+-  case "${1}" in
+-    "start")
+-      for curr_pis in "${dist_bin}/init.d"/S* "${HOME}/${MOZ_USER_DIR}/init.d"/S* ; do
+-        if [ -x "${curr_pis}" ] ; then
+-          case "${curr_pis}" in
+-            *.sh) .  "${curr_pis}"         ;;
+-            *)       "${curr_pis}" "start" ;;
+-          esac
+-        fi
+-      done
+-      ;;
+-    "stop")
+-      for curr_pis in "${HOME}/${MOZ_USER_DIR}/init.d"/K* "${dist_bin}/init.d"/K* ; do
+-        if [ -x "${curr_pis}" ] ; then
+-          case "${curr_pis}" in
+-            *.sh) . "${curr_pis}"        ;;
+-            *)      "${curr_pis}" "stop" ;;
+-          esac
+-        fi
+-      done
+-      ;;
+-    *)
+-      echo 1>&2 "$0: Internal error in moz_pis_startstop_scripts."
+-      exit 1
+-      ;;
+-  esac
++    MOZ_PIS_API=2
++    MOZ_PIS_MOZBINDIR="${dist_bin}"
++    MOZ_PIS_SESSION_PID="$$"
++    MOZ_PIS_USER_DIR="${MOZ_USER_DIR}"
++    export MOZ_PIS_API MOZ_PIS_MOZBINDIR MOZ_PIS_SESSION_PID MOZ_PIS_USER_DIR
++
++    case "${1}" in
++	"start")
++	    for curr_pis in "${MOZ_PIS_MOZBINDIR}/init.d"/S* \
++			    "${HOME}/${MOZ_PIS_USER_DIR}/init.d"/S*; do
++		if [ -x "${curr_pis}" ]; then
++		    case "${curr_pis}" in
++			*.sh)
++			    . "${curr_pis}"
++			    ;;
++			*)
++			    ${curr_pis} "start"
++			    ;;
++		    esac
++		fi
++	    done
++	    ;;
++	"stop")
++	    for curr_pis in "${MOZ_PIS_MOZBINDIR}/init.d"/K* \
++			    "${HOME}/${MOZ_PIS_USER_DIR}/init.d"/K*; do
++		if [ -x "${curr_pis}" ]; then
++		    case "${curr_pis}" in
++			*.sh)
++			    . "${curr_pis}"
++			    ;;
++			*)
++			    ${curr_pis} "stop"
++			    ;;
++		    esac
++		fi
++	    done
++	    ;;
++	*)
++	    echo "$0: Internal error in moz_pis_startstop_scripts." 1>&2
++	    exit 1
++	    ;;
++    esac
+ }
+ 
+-#uncomment for debugging
++# uncomment for debugging
+ #set -x
+ 
+-moz_libdir=%MOZAPPDIR%
+-MRE_HOME=%MREDIR%
++#
++# variables
++#
++location="new-tab"
++#MOZILLA_UILOCALE="en-US"
++#MOZILLA_UIREGION="US"
+ 
+-# honor MOZILLA_FIVE_HOME if it's there
+-if [ -n "$MOZILLA_FIVE_HOME" ] ; then
+-  dist_bin="$MOZILLA_FIVE_HOME"
+-else
+-  # Use run-mozilla.sh in the current dir if it exists
+-  # If not, then start resolving symlinks until we find run-mozilla.sh
+-  found=0
+-  progname=$0
+-  curdir=`dirname "$progname"`
+-  run_moz="$curdir/run-mozilla.sh"
+-  if test -x "$run_moz"; then
+-    dist_bin=$curdir
++#
++# working definitions
++#
++MOZ_USER_DIR="%MOZ_USER_DIR%"
++moz_libdir="%MOZAPPDIR%"
++MRE_HOME="%MREDIR%"
++
++debugging=		# set the debugging level
++use_openFile="yes"	# use openFile() for file/dir
++here=`pwd`
++
++if [ ! -d "${MRE_HOME}" ]; then
++    # use moz_libdir as MRE_HOME
++    MRE_HOME="${moz_libdir}"
++fi
++export	MRE_HOME
++
++# Use run-mozilla.sh in the current dir if it exists
++# If not, then start resolving symlinks until we find run-mozilla.sh
++found=0
++progname="$0"
++curdir=`dirname "$progname"`
++progbase=`basename "$progname"`
++run_moz="$curdir/run-mozilla.sh"
++# mozilla must obey MOZILLA_FIVE_HOME
++if [ -n "$MOZILLA_FIVE_HOME" -a -d "$MOZILLA_FIVE_HOME" -a \
++     -x "$MOZILLA_FIVE_HOME/run-mozilla.sh" ]; then
++    curdir="$MOZILLA_FIVE_HOME"
++    run_moz="$curdir/run-mozilla.sh"
++    dist_bin="$curdir"
++    found=1
++elif [ -x "$run_moz" ]; then
++    dist_bin="$curdir"
+     found=1
+-  else
+-    here=`/bin/pwd`
+-    while [ -h "$progname" ]; do
+-      bn=`basename "$progname"`
+-      cd `dirname "$progname"`
+-      progname=`/bin/ls -l "$bn" |sed -e 's/^.* -> //' `
+-      if [ ! -x "$progname" ]; then
+-        break
+-      fi
+-      curdir=`dirname "$progname"`
+-      run_moz="$curdir/run-mozilla.sh"
+-      if [ -x "$run_moz" ]; then
+-        cd "$curdir"
+-        dist_bin=`pwd`
+-        found=1
+-        break
+-      fi
++else
++    while [ -h "${progname}" ]; do
++	bn=`basename "${progname}"`
++	cd `dirname "${progname}"`
++	progname=`ls -l "${bn}" | sed -e 's/^.* -> //'`
++	if [ ! -x "$progname" ]; then
++	    break
++	fi
++    	curdir=`dirname "${progname}"`
++    	run_moz="${curdir}/run-mozilla.sh"
++    	if [ -x "${run_moz}" ]; then
++	    cd "$curdir"
++	    dist_bin=`pwd`
++	    run_moz="${dist_bin}/run-mozilla.sh"
++	    found=1
++	    break
++	fi
+     done
+-    cd "$here"
+-  fi
+-  if [ $found = 0 ]; then
++    cd "${here}"
++fi
++if [ $found = 0 ]; then
+     # Check default compile-time libdir
+-    if [ -x "$moz_libdir/run-mozilla.sh" ]; then
+-      dist_bin=$moz_libdir
+-    else 
+-      echo "Cannot find mozilla runtime directory. Exiting."
+-      exit 1
+-    fi
+-  fi
++    if [ -x "${moz_libdir}/run-mozilla.sh" ]; then
++	dist_bin="$moz_libdir"
++	run_moz="${dist_bin}/run-mozilla.sh"
++    else
++	echo "$0: Cannot find mozilla runtime directory. Exiting." 1>&2
++	exit 1
++    fi
+ fi
+-
+-script_args=""
+-moreargs=""
+-debugging=0
+-MOZILLA_BIN="%MOZILLA-BIN%"
++MOZILLA_BIN="${progbase}-bin"
+ 
+ if [ "$OSTYPE" = "beos" ]; then
+-  mimeset -F $MOZILLA_BIN
++    mimeset -F "$MOZILLA_BIN"
+ fi
+ 
++# test for binary apps in ${dist_bin}
++if [ -x "${dist_bin}/mozilla-xremote-client" ]; then
++    MOZ_CLIENT_PROGRAM="${dist_bin}/mozilla-xremote-client -a ${progbase}"
++elif [ -x "${dist_bin}/${progbase}-bin" ]; then
++    MOZ_CLIENT_PROGRAM="${MOZILLA_BIN} -remote -a ${progbase}"
++else
++    echo "$0: Cannot find mozilla binary executable. Exiting." 1>&2
++    exit 1
++fi
++if [ -x "${dist_bin}/${MOZILLA_BIN}" ]; then
++    MOZILLA_BIN="${dist_bin}/${progbase}-bin"
++else
++    echo "$0: Cannot find mozilla binary executable. Exiting." 1>&2
++    exit 1
++fi
++
++# guest a default remote command
++_remote_cmd="xfeDoCommand(openBrowser)"
++
++# test for a running copy of firefox
++ALREADY_RUNNING=	# null
++if [ -n "${DISPLAY}" ]; then
++    if [ -n "${debugging}" ]; then
++	echo "${run_moz} ${MOZ_CLIENT_PROGRAM} ping()"
++	${run_moz} ${MOZ_CLIENT_PROGRAM} 'ping()' && ALREADY_RUNNING="yes"
++    else
++	${run_moz} ${MOZ_CLIENT_PROGRAM} 'ping()' >/dev/null 2>&1 &&
++		ALREADY_RUNNING="yes"
++    fi
++elif [ -n "${debugging}" ]; then
++    echo "$0: WARN, no DISPLAY environment" 1>&2
++fi
++
++#parse options
++script_args=	# null
++moreargs=	# null
++target=		# null
+ while [ $# -gt 0 ]
+ do
+-  case "$1" in
+-    -p | -pure)
+-      MOZILLA_BIN="%MOZILLA-BIN%.pure"
+-      shift
+-      ;;
+-    -g | --debug)
+-      script_args="$script_args -g"
+-      debugging=1
+-      shift
+-      ;;
+-    -d | --debugger)
+-      script_args="$script_args -d $2"
+-      shift 2
+-      ;;
+-    *)
+-      moreargs="$moreargs \"$1\""
+-      shift 1
+-      ;;
+-  esac
++    if [ -n "${target}" ]; then
++	# well, this can't be the target if not last
++	moreargs="${moreargs} ${target}"
++	target=	# null
++    fi
++    case "$1" in
++	-p | --pure | -pure)
++	    MOZILLA_BIN="${MOZILLA_BIN}.pure"
++	    shift
++	    ;;
++	-g | --debug)
++	    script_args="${script_args} -g"
++	    debugging=1
++	    shift
++	    ;;
++	-d | --debugger)
++	    if [ -n "$2" ]; then
++		script_args="${script_args} -d $2"
++		shift 2
++	    else
++		"$0: ERROR, -d needs an argument. Exiting" 1>&2
++		exit 1
++	    fi
++	    ;;
++	-UILocale)
++	    if [ -n "$2" ]; then
++		uilocale="$2"
++		shift 2
++	    else
++		echo "$0: ERROR, -UILocale needs an argument. Exiting" 1>&2
++		exit 1
++	    fi
++	    ;;
++	-UIRegion)
++	    if [ -n "$2" ]; then
++		uiregion="$2"
++		shift 2
++	    else
++		echo "$0: ERROR, -UIRegion needs an argument. Exiting" 1>&2
++		exit 1
++	    fi
++	    ;;
++	-browser)
++	    _remote_cmd="xfeDoCommand(openBrowser)"
++	    moreargs="${moreargs} $1"
++	    shift
++	    ;;
++	-mail)
++	    _remote_cmd="xfeDoCommand(openInbox)"
++	    moreargs="${moreargs} $1"
++	    shift
++	    ;;
++	-compose)
++	    _remote_cmd="xfeDoCommand(composeMessage)"
++	    moreargs="${moreargs} $1"
++	    shift
++	    ;;
++	-chat | -edit | -webcal)
++	    # don't use remote for this
++	    ALREADY_RUNNING=	# null
++	    moreargs="${moreargs} $1"
++	    shift
++	    ;;
++	-*)
++	    moreargs="${moreargs} $1"
++	    shift
++	    ;;
++	*)
++	    target="$1"
++	    shift
++	    ;;
++    esac
+ done
+ 
+-export MRE_HOME
+-eval "set -- $moreargs"
++# process target
++if [ -n "${target}" ]; then
++    if [ `expr "${target}" : '.*:.*'` -eq 0 ]; then
++	if [ `expr "${target}" : '/.*'` -eq 0 ]; then
++	    target="${here}/${target}"
++	fi
++	if [ -r "${target}" -o -d "${target}" ]; then
++	    [ -n "${use_openFile}" ] || target="file://${target}"
++	else
++	    echo "$0: WARN, target: ${target} not an URI/file/dir" 1>&2
++	    ALREADY_RUNNING=	# null
++	fi
++    else
++	# an former URI, don't use openFile
++	use_openFile=	# null
++    fi
++fi
++
++# try remote protocol if running
++if [ -n "${ALREADY_RUNNING}" ]; then
++    if [ -n "${target}" ]; then
++	if [ -n "${use_openFile}" ]; then
++	    _remote_cmd="openFile(${target})"
++	elif [ -n "${location}" ]; then
++	    _remote_cmd="openURL(${target},${location})"
++	else
++	    _remote_cmd="openURL(${target})"
++	fi
++    fi
++    # FIXME problems with freedesktop StartupNotify
++    if [ -n "${debugging}" ]; then
++	echo "${run_moz} ${script_args} ${MOZ_CLIENT_PROGRAM} ${_remote_cmd}"
++    fi
++    ${run_moz} ${script_args} ${MOZ_CLIENT_PROGRAM} ${_remote_cmd} && exit 0
++fi
++
++# fallback to direct invocation
++
++# UILocale, UIRegion
++if [ -z "${uilocale}" -a -n "${MOZILLA_UILOCALE}" ]; then
++    uilocale="${MOZILLA_UILOCALE}"
++fi
++if [ -z "${uiregion}" -a -n "${MOZILLA_UIREGION}" ]; then
++    uiregion="${MOZILLA_UIREGION}"
++fi
++if [ -n "${uiregion}" -a -z "${uilocale}" ]; then
++    uilocale="en-US"
++fi
++if [ -n "${moz_uilocale}" ]; then
++    if [ -n "${moz_uiregion}" ]; then
++	moreargs="-UIRegion ${moz_uiregion} ${more_args}"
++    fi
++    moreargs="-UILocale ${moz_uilocale} ${more_args}"
++fi
++
++# real invocation
++if [ -n "${target}" ]; then
++    eval "set -- ${moreargs} \"${target}\""
++else
++    eval "set -- ${moreargs}"
++fi
+ 
+ ## Start addon scripts
+ moz_pis_startstop_scripts "start"
+ 
+-if [ $debugging = 1 ]
+-then
+-  echo $dist_bin/run-mozilla.sh $script_args $dist_bin/$MOZILLA_BIN "$@"
++if [ -n "${debugging}" ]; then
++    echo "${run_moz} ${script_args} ${MOZILLA_BIN} $@"
+ fi
+-"$dist_bin/run-mozilla.sh" $script_args "$dist_bin/$MOZILLA_BIN" "$@"
++${run_moz} ${script_args} ${MOZILLA_BIN} "$@"
+ exitcode=$?
+ 
+ ## Stop addon scripts
diff -ruN --exclude=CVS /usr/HEAD/ports/www/mozilla/pkg-deinstall.in /junk/wk/www/mozilla/pkg-deinstall.in
--- /usr/HEAD/ports/www/mozilla/pkg-deinstall.in	Sun Nov  7 23:24:21 2004
+++ /junk/wk/www/mozilla/pkg-deinstall.in	Tue Jan  4 23:50:11 2005
@@ -9,14 +9,57 @@
 umask 022
 PATH=/bin:/usr/bin
 
+prefix="${PKG_PREFIX:-%%PREFIX%%}"
+
 [ "x$1" = "x" ] && exit 1
 [ "x$2" != "xDEINSTALL" ] && exit 0
 
-MOZDIR=%%MOZDIR%%
+MOZDIR="${prefix}/lib/%%MOZILLA%%"
 
 rm -rf ${MOZDIR}/chrome/overlayinfo
 rm -f ${MOZDIR}/chrome/*.rdf
 rm -f ${MOZDIR}/component.reg
 rm -f ${MOZDIR}/components/*.dat
+
+# support for outer scripts
+for script in %%MOZILLA%% mozilla mozilla-config; do
+    rm -f "${prefix}/bin/${script}"
+done
+for mozdir in ${prefix}/lib/mozilla* %%X11BASE%%/lib/mozilla*; do
+    if [ -d "${mozdir}" -a "${mozdir}" != "${MOZDIR}" -a \
+	 -x "${mozdir}/run-mozilla.sh" -a -x "${mozdir}/mozilla" ]; then
+	for prog in %%MOZILLA%% mozilla-config; do
+	    if [ -x "${mozdir}/${prog}" ]; then
+		install -m 555 ${mozdir}/${prog} ${prefix}/bin
+	    fi
+	done
+	install -m 555 ${mozdir}/mozilla ${prefix}/bin
+    fi
+done
+
+# support for shared browser-plugins directory (X11BASE)
+PLUGINDIR="%%X11BASE%%/lib/browser-plugins"
+# this is what we do now
+# But may be better use MOZLIB after tr / _
+KEEPFILE="${PLUGINDIR}/.%%MOZILLA%%.keep"
+# sure someone can work a clever way to do this
+rm -f "${KEEPFILE}"
+for file in ${PLUGINDIR}/.*.keep; do
+    if [ -f "${file}" ]; then
+	break
+    fi
+    rm -rf "${PLUGINDIR}"
+    break
+done
+
+# alternate way to register browser-plugins
+# PLUGINDIR="%%X11BASE%%/lib/browser-plugins"
+# if [ -r "${PLUGINDIR}/.keepme" ]; then
+#     if grep -hqv "${MOZDIR}" "${KEEPFILE}" > "${KEEPFILE}-%%MOZILLA%%"; then
+# 	mv "${KEEPFILE}-%%MOZILLA%%" "${KEEPFILE}"
+#     else
+# 	rm -rf "${PLUGINDIR}"
+#     fi
+# fi
 
 exit 0
diff -ruN --exclude=CVS /usr/HEAD/ports/www/mozilla/pkg-install.in /junk/wk/www/mozilla/pkg-install.in
--- /usr/HEAD/ports/www/mozilla/pkg-install.in	Sat Dec  4 10:47:25 2004
+++ /junk/wk/www/mozilla/pkg-install.in	Tue Jan  4 23:41:14 2005
@@ -9,10 +9,12 @@
 umask 022
 PATH=/bin:/usr/bin
 
+prefix="${PKG_PERFIX:-%%PREFIX%%}"
+
 [ "x$1" = "x" ] && exit 1
 [ "x$2" != "xPOST-INSTALL" ] && exit 0
 
-MOZDIR=%%MOZDIR%%
+MOZDIR="${prefix}/lib/%%MOZILLA%%"
 REGXPCOM=${MOZDIR}/regxpcom
 REGCHROME=${MOZDIR}/regchrome
 
@@ -26,8 +28,43 @@
 ./run-mozilla.sh ${REGXPCOM} || true
 ./run-mozilla.sh ${REGCHROME} || true
 
-if [ ! -d %%PREFIX%%/lib/browser_plugins ]; then
-    mkdir -p %%PREFIX%%/lib/browser_plugins
+
+upport for shared browser-plugins directory (X11BASE)
+PLUGINDIR="%%X11BASE%%/lib/browser-plugins"
+# this is what we do now
+# But may be better use MOZLIB after tr / _
+KEEPFILE="${PLUGINDIR}/.%%MOZILLA%%.keep"
+mkdir -p "${PLUGINDIR}"
+touch "${KEEPFILE}"
+
+# an alternate way to register browser-plugins
+# PLUGINDIR="%%X11BASE%%/lib/browser-plugins"
+# KEEPFILE="${PLUGINDIR}/.keepme"
+# mkdir -p "${PLUGINDIR}"
+# touch "${KEEPFILE}"
+# grep -hqv "${MOZDIR}" "${KEEPFILE}" > "${KEEPFILE}-%%MOZILLA%%"
+# echo "${MOZDIR}" >> "${KEEPFILE}-%%MOZILLA%%"
+# mv "${KEEPFILE}-%%MOZILLA%%" "${KEEPFILE}"
+
+# java plugin
+# FIXME, this must be done from plugins pkg_install
+jpidst="${PLUGINDIR}/libjavaplugin_oji.so"
+if [ ! -L "${jpidst}" ]; then
+    rm -f "${jpidst}"
+    jpilist="%%JPI_LIST%%"
+    for jpi in ${jpilist}; do
+	if [ -r "${jpi}" ]; then
+	    ln -s "${jpi}" "${jpidst}"
+	    break
+	fi
+    done
 fi
+
+# install outer scripts
+for script in %%MOZILLA%% mozilla mozilla-config; do
+    if [ -x "${MOZDIR}/${script}" ]; then
+	install -m 555 ${MOZDIR}/${script} ${prefix}/bin
+    fi
+done
 
 exit 0
--- mozilla-1.7.5_2,2.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list