Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Feb 2005 23:00:44 GMT
From:      Jose M Rodriguez <josemi@freebsd.jazztel.es>
To:        gnome@FreeBSD.org
Subject:   Re: ports/75836: [PATCH] www/mozilla: latest changes against fresh ports
Message-ID:  <200502232300.j1NN0iBU084618@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/75836; it has been noted by GNATS.

From: Jose M Rodriguez <josemi@freebsd.jazztel.es>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: ports/75836: [PATCH] www/mozilla: latest changes against fresh ports
Date: Wed, 23 Feb 2005 23:55:56 +0100 (CET)

 Sorry, missfiled
 
 ----- patch-mozilla
 diff -Nru /usr/HEAD/ports/www/mozilla/Makefile www/mozilla/Makefile
 --- /usr/HEAD/ports/www/mozilla/Makefile	Sun Feb 13 14:50:23 2005
 +++ www/mozilla/Makefile	Wed Feb 23 13:42:12 2005
 @@ -7,7 +7,7 @@
  
  PORTNAME?=	mozilla
  PORTVERSION=	1.7.5
 -PORTREVISION?=	1
 +PORTREVISION?=	2
  PORTEPOCH?=	2
  CATEGORIES?=	www
  MASTER_SITES=	${MASTER_SITE_MOZILLA} \
 @@ -27,8 +27,7 @@
  LIB_DEPENDS=	jpeg.9:${PORTSDIR}/graphics/jpeg \
  		png.5:${PORTSDIR}/graphics/png \
  		mng.1:${PORTSDIR}/graphics/libmng \
 -		freetype.9:${PORTSDIR}/print/freetype2 \
 -		nspr4.1:${PORTSDIR}/devel/nspr
 +		freetype.9:${PORTSDIR}/print/freetype2
  
  WRKSRC=		${WRKDIR}/${PORTNAME}
  
 @@ -52,6 +51,7 @@
  WANT_GNOME=	yes
  USE_REINPLACE=	yes
  HAS_CONFIGURE=	yes
 +#FIXME, move to mozconfig like firefox/thunderbird
  CONFIGURE_ARGS=					\
  		--disable-auto-deps		\
  		--enable-chrome-format=jar	\
 @@ -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,9 @@
  	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 \
 +	IDN "Enable International Domain Names" off \
 +	ARTSDSP "Add support for KDE arts (artsdsp)" on
  
  .include <bsd.port.pre.mk>
  
 @@ -127,6 +130,7 @@
  CONFIGURE_ENV+=		MOZ_INTERNAL_LIBART_LGPL=1
  .endif
  
 +# FIXME, take out WITHOUT_XFT knob in a gtk2 world
  .if !defined(WITHOUT_XFT)
  LIB_DEPENDS+=	Xft.2:${PORTSDIR}/x11-fonts/libXft
  CONFIGURE_ARGS+=--enable-xft
 @@ -190,6 +194,9 @@
  		MOZ_INTERNAL_LIBART_LGPL=1
  ALL_TARGET=	default
  FAKEDIR=	${WRKDIR}/fake
 +SCRIPTS_DIR=	${FAKEDIR}/lib/${MOZILLA}
 +MOZ_PIS_DIR=	${SCRIPTS_DIR}/init.d
 +CHROME_REPO=	${SCRIPTS_DIR}/chrome.d
  
  #.if ${ARCH} == "i386"
  #CONFIGURE_ARGS+=	--enable-reorder
 @@ -206,14 +213,22 @@
  .endif
  
  .if defined(WITH_OPTIMIZED_CFLAGS)
 -CFLAGS+=		-O2
 +CFLAGS:=		-O2 -fno-strict-aliasing ${CFLAGS:N-O*}
 +#FIXME, add -fno-strict-aliasing to --enable-optimize
  CONFIGURE_ARGS+=	--enable-optimize=-O2
 +.else
 +# May need this for 'official builds'
 +# CFLAGS:=		-O ${CFLAGS:N-O*:N-m*}
  .endif
  
  .if defined(WITH_MENU_ENTRY)
  USE_GNOME+=	gnomehier
  .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
 @@ -230,6 +245,13 @@
  	@${ECHO_MSG} "http://mozilla.org/projects/calendar/"
  	@${ECHO_MSG} ""
  .endif
 +.if defined(WITH_IDN)
 +	@${ECHO_MSG} ""
 +	@${ECHO_MSG} "Building with IDN enabled."
 +	@${ECHO_MSG} "This makes homograph spoofing attacks possible."
 +	@${ECHO_MSG} "Use at your own risk."
 +	@${ECHO_MSG} ""
 +.endif
  
  post-patch:
  	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
 @@ -265,14 +287,32 @@
  			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 > \
  		${WRKDIR}/mozilla.desktop
 +.for ii in ${MOZ_PIS_SCRIPTS}
 +	@${SED} -e 's|%%MOZILLA%%|${FIREFOX}|g ; \
 +		s|%%PREFIX%%|${PREFIX}|g ; \
 +		s|%%X11BASE%%|${X11BASE}|g' \
 +		< ${FILESDIR}/moz_pis_${ii} > ${WRKDIR}/moz_pis_${ii}
 +.endfor
 +	@${SED} -e 's|%%MOZILLA%%|${FIREFOX}|g ; \
 +		s|%%PREFIX%%|${PREFIX}|g ; \
 +		s|%%X11BASE%%|${X11BASE}|g' \
 +		< ${FILESDIR}/register.sh > ${WRKDIR}/register.sh
 +.if defined(WITH_IDN)
 +	@${REINPLACE_CMD} -e '/network.enableIDN/s/false/true/' \
 +		${WRKSRC}/modules/libpref/src/init/all.js
 +.endif
  
  pre-configure:
  	@if [ -n "`${PKG_INFO} -xI '^bind[0-9]*-base-[0-9]'`" ]; then \
 @@ -280,36 +320,26 @@
  		${FALSE}; \
  	fi
  
 -post-build:
 -	${SED} -e "s|%%PREFIX%%|${PREFIX}|g" -e "s|%%MOZILLA%%|${MOZILLA}|g" \
 -		${FILESDIR}/mozilla.sh >${WRKSRC}/${MOZILLA}
 -
  pre-install:
  	${RM} -rf ${FAKEDIR} ${PLIST}
  	${TOUCH} -f ${PLIST}
  	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
  		Makefile ${MAKE_ARGS} install
 +	${MKDIR} ${SCRIPTS_DIR}
 +	${MKDIR} ${MOZ_PIS_DIR}
 +	${MKDIR} ${CHROME_REPO}
  	${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}/${MOZILLA}
 +	${INSTALL_SCRIPT} ${FAKEDIR}/bin/mozilla ${SCRIPTS_DIR}
 +	${INSTALL_SCRIPT} ${FAKEDIR}/bin/mozilla-config ${SCRIPTS_DIR}
 +	${INSTALL_SCRIPT} ${WRKDIR}/register.sh ${SCRIPTS_DIR}
 +.for ii in ${MOZ_PIS_SCRIPTS}
 +	${INSTALL_SCRIPT} ${WRKDIR}/moz_pis_${ii} ${MOZ_PIS_DIR}/${ii}
 +.endfor
 +	${MV} ${SCRIPTS_DIR}/chrome/installed-chrome.txt \
 +		${CHROME_REPO}/dist.chrome
  .if !defined(WITHOUT_MAILNEWS)
  	@${CP} -RL ${WRKSRC}/dist/bin/defaults/isp ${FAKEDIR}/lib/${MOZILLA}/defaults
  .endif
 @@ -333,27 +363,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 -Nru /usr/HEAD/ports/www/mozilla/files/moz_pis_S90dsp.sh www/mozilla/files/moz_pis_S90dsp.sh
 --- /usr/HEAD/ports/www/mozilla/files/moz_pis_S90dsp.sh	Thu Jan  1 01:00:00 1970
 +++ www/mozilla/files/moz_pis_S90dsp.sh	Sun Feb 20 22:38:25 2005
 @@ -0,0 +1,32 @@
 +#!/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 artsdsp
 +
 +if [ ${MOZ_PIS_API} -eq 2 -a "X$1" = "Xstart" -a -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}"
 +    if [ -n "${debuggin}" ]; then
 +	echo "dsp: ${run_moz}"
 +    fi
 +fi
 diff -Nru /usr/HEAD/ports/www/mozilla/files/mozilla.desktop.in www/mozilla/files/mozilla.desktop.in
 --- /usr/HEAD/ports/www/mozilla/files/mozilla.desktop.in	Thu Dec 23 02:53:11 2004
 +++ www/mozilla/files/mozilla.desktop.in	Mon Feb 21 00:39: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 -Nru /usr/HEAD/ports/www/mozilla/files/patch-modules_libpref_src_init_all.js www/mozilla/files/patch-modules_libpref_src_init_all.js
 --- /usr/HEAD/ports/www/mozilla/files/patch-modules_libpref_src_init_all.js	Thu Jan  1 01:00:00 1970
 +++ www/mozilla/files/patch-modules_libpref_src_init_all.js	Sun Feb 20 22:40:54 2005
 @@ -0,0 +1,13 @@
 +--- modules/libpref/src/init/all.js.orig	Fri Feb 18 21:27:17 2005
 ++++ modules/libpref/src/init/all.js	Fri Feb 18 21:30:27 2005
 +@@ -552,7 +552,9 @@
 + 
 + // This preference controls whether or not internationalized domain names (IDN)
 + // are handled.  IDN requires a nsIIDNService implementation.
 +-pref("network.enableIDN", true);
 ++// Due to registar problems to protect against homograph spoofing attacks,
 ++// This is disable by default.  Enable at your own risk.
 ++pref("network.enableIDN", false);
 + 
 + // This preference specifies a list of domains for which DNS lookups will be
 + // IPv4 only. Works around broken DNS servers which can't handle IPv6 lookups
 diff -Nru /usr/HEAD/ports/www/mozilla/files/patch-xpfe_bootstrap_mozilla.in 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
 +++ www/mozilla/files/patch-xpfe_bootstrap_mozilla.in	Wed Feb 23 11:10:55 2005
 @@ -0,0 +1,427 @@
 +--- xpfe/bootstrap/mozilla.in.orig	Fri Feb 20 19:13:46 2004
 ++++ xpfe/bootstrap/mozilla.in	Wed Feb 23 11:09:56 2005
 +@@ -29,139 +29,316 @@
 + ## 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
 + #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_BIN}" ]; then
 ++    MOZILLA_BIN="${dist_bin}/${progbase}-bin"
 ++else
 ++    echo "$0: Cannot find mozilla binary executable. Exiting." 1>&2
 ++    exit 1
 ++fi
 ++if [ -x "${dist_bin}/mozilla-xremote-client" ]; then
 ++    MOZ_CLIENT_PROGRAM="${dist_bin}/mozilla-xremote-client -a ${progbase}"
 ++else
 ++    MOZ_CLIENT_PROGRAM="${MOZILLA_BIN} -remote -a ${progbase}"
 ++fi
 ++		    
 ++# guest a default remote command
 ++_remote_cmd="xfeDoCommand(openBrowser)"
 ++
 ++# test for a running copy of mozilla
 ++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 "${uilocale}" ]; then
 ++    if [ -n "${uiregion}" ]; then
 ++	moreargs="-UIRegion ${uiregion} ${more_args}"
 ++    fi
 ++    moreargs="-UILocale ${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 -Nru /usr/HEAD/ports/www/mozilla/files/register.sh www/mozilla/files/register.sh
 --- /usr/HEAD/ports/www/mozilla/files/register.sh	Thu Jan  1 01:00:00 1970
 +++ www/mozilla/files/register.sh	Mon Feb 21 09:11:42 2005
 @@ -0,0 +1,31 @@
 +#!/bin/sh
 +#
 +
 +# register.sh
 +# basic register procedure for mozilla
 +# must be invoked from MOZILLA_FIVE_HOME
 +
 +MOZDIR=`pwd`
 +run_moz="./run-mozilla.sh"
 +REGXPCOM="${MOZDIR}/regxpcom"
 +REGCHROME="${MOZDIR}/regchrome"
 +INST_CHROME="${MOZDIR}/chrome/installed-chrome.txt"
 +CHROME_REPO="${MOZDIR}/chrome.d/"
 +
 +echo "===> Building Chrome's registry..."
 +rm -rf ${MOZDIR}/chrome/overlayinfo
 +rm -f ${MOZDIR}/chrome/*.rdf
 +mkdir -p ${MOZDIR}/chrome/overlayinfo
 +rm -f ${MOZDIR}/component.reg
 +
 +if [ -d "${CHROME_REPO}" ]; then
 +    echo -n > ${INST_CHROME}
 +    for i in ${CHROME_REPO}/*.chrome; do
 +	if [ -r "$i" ]; then
 +	    cat $i >> ${INST_CHROME}
 +	fi
 +    done
 +fi
 +
 +${run_moz} ${REGXPCOM} || true
 +${run_moz} ${REGCHROME} || true
 diff -Nru /usr/HEAD/ports/www/mozilla/pkg-deinstall.in www/mozilla/pkg-deinstall.in
 --- /usr/HEAD/ports/www/mozilla/pkg-deinstall.in	Sun Nov  7 23:24:21 2004
 +++ www/mozilla/pkg-deinstall.in	Sun Feb 20 23:48:10 2005
 @@ -9,14 +9,62 @@
  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)
 +# FIXME: go for a www/browser-hier port
 +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
 +# this makes ${KEEPFILE} usable by moz_pis to age tests
 +#
 +# PLUGINDIR="%%X11BASE%%/lib/browser_plugins"
 +# KEEPFILE="${PLUGINDIR}/.keepme"
 +# if [ -r "${KEEPFILE}" ]; then
 +#     if grep -hqv "${MOZDIR}" "${KEEPFILE}" > "${KEEPFILE}-%%MOZILLA%%"; then
 +# 	mv "${KEEPFILE}-%%MOZILLA%%" "${KEEPFILE}"
 +#     else
 +# 	rm -rf "${PLUGINDIR}"
 +#     fi
 +# fi
  
  exit 0
 diff -Nru /usr/HEAD/ports/www/mozilla/pkg-install.in www/mozilla/pkg-install.in
 --- /usr/HEAD/ports/www/mozilla/pkg-install.in	Sat Dec  4 10:47:25 2004
 +++ www/mozilla/pkg-install.in	Mon Feb 21 09:13:04 2005
 @@ -9,25 +9,78 @@
  umask 022
  PATH=/bin:/usr/bin
  
 +prefix="${PKG_PERFIX:-%%PREFIX%%}"
 +
  [ "x$1" = "x" ] && exit 1
  [ "x$2" != "xPOST-INSTALL" ] && exit 0
  
 -MOZDIR=%%MOZDIR%%
 -REGXPCOM=${MOZDIR}/regxpcom
 -REGCHROME=${MOZDIR}/regchrome
 -
 -echo "===> Building Chrome's registry..."
 -rm -rf ${MOZDIR}/chrome/overlayinfo
 -rm -f ${MOZDIR}/chrome/*.rdf
 -mkdir -p ${MOZDIR}/chrome/overlayinfo
 -rm -f ${MOZDIR}/component.reg
 -
 -cd ${MOZDIR} || exit 1
 -./run-mozilla.sh ${REGXPCOM} || true
 -./run-mozilla.sh ${REGCHROME} || true
 +MOZDIR="${prefix}/lib/%%MOZILLA%%"
 +REGXPCOM="${MOZDIR}/regxpcom"
 +REGCHROME="${MOZDIR}/regchrome"
 +
 +# 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"
 +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
 +
 +# do the register procedure, with safe defaults
 +if [ -x "${MOZDIR}/register.sh" ]; then
 +    # do registration via register.sh, shareable with extensions
 +    cd ${MOZDIR} || exit 1
 +    ./register.sh
 +else
 +    # default fallback
 +    echo "===> Building Chrome's registry..."
 +    rm -rf ${MOZDIR}/chrome/overlayinfo
 +    rm -f ${MOZDIR}/chrome/*.rdf
 +    mkdir -p ${MOZDIR}/chrome/overlayinfo
 +    rm -f ${MOZDIR}/component.reg
  
 -if [ ! -d %%PREFIX%%/lib/browser_plugins ]; then
 -    mkdir -p %%PREFIX%%/lib/browser_plugins
 +    cd ${MOZDIR} || exit 1
 +
 +    if [ -d chrome.d ]; then
 +	echo -n > chrome/installed-chrome.txt
 +	for i in chrome.d/*.chrome; do
 +	    if [ -r "$i" ]; then
 +		cat $i >> chrome/installed-chrome.txt
 +	    fi
 +	done
 +    fi
 +    ./run-mozilla.sh ${REGXPCOM} || true
 +    ./run-mozilla.sh ${REGCHROME} || true
  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
 ----- patch-mozilla



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502232300.j1NN0iBU084618>