Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Feb 2005 09: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:  <200502210900.j1L90iJZ018034@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, josemi@freebsd.jazztel.es
Cc:  
Subject: Re: ports/75836: [PATCH] www/mozilla: latest changes against fresh ports
Date: Mon, 21 Feb 2005 09:56:42 +0100

 --Boundary-00=_MJaGCAWmJOB3b06
 Content-Type: text/plain;
   charset="us-ascii"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 I merge latest pull-up from PR ports/77744 (mozilla-devel)
 
 --
   josemi
 
 --Boundary-00=_MJaGCAWmJOB3b06
 Content-Type: text/x-diff;
   charset="us-ascii";
   name="patch-mozilla"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment;
 	filename="patch-mozilla"
 
 diff -Nru /usr/HEAD/ports/www/mozilla/Makefile www/mozilla/Makefile
 =2D-- /usr/HEAD/ports/www/mozilla/Makefile	Sun Feb 13 14:50:23 2005
 +++ www/mozilla/Makefile	Mon Feb 21 00:43:24 2005
 @@ -7,7 +7,7 @@
 =20
  PORTNAME?=3D	mozilla
  PORTVERSION=3D	1.7.5
 =2DPORTREVISION?=3D	1
 +PORTREVISION?=3D	2
  PORTEPOCH?=3D	2
  CATEGORIES?=3D	www
  MASTER_SITES=3D	${MASTER_SITE_MOZILLA} \
 @@ -27,8 +27,7 @@
  LIB_DEPENDS=3D	jpeg.9:${PORTSDIR}/graphics/jpeg \
  		png.5:${PORTSDIR}/graphics/png \
  		mng.1:${PORTSDIR}/graphics/libmng \
 =2D		freetype.9:${PORTSDIR}/print/freetype2 \
 =2D		nspr4.1:${PORTSDIR}/devel/nspr
 +		freetype.9:${PORTSDIR}/print/freetype2
 =20
  WRKSRC=3D		${WRKDIR}/${PORTNAME}
 =20
 @@ -52,6 +51,7 @@
  WANT_GNOME=3D	yes
  USE_REINPLACE=3D	yes
  HAS_CONFIGURE=3D	yes
 +#FIXME, move to mozconfig like firefox/thunderbird
  CONFIGURE_ARGS=3D					\
  		--disable-auto-deps		\
  		--enable-chrome-format=3Djar	\
 @@ -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.s=
 o \
  	${LOCALBASE}/jdk1.3.1/jre/plugin/${ARCH}/ns600/libjavaplugin_oji.so
 +MOZ_PIS_SCRIPTS=3D	# no default scripts
 =20
  OPTIONS=3DXFT "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 \
 =2D	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
 =20
  .include <bsd.port.pre.mk>
 =20
 @@ -127,6 +130,7 @@
  CONFIGURE_ENV+=3D		MOZ_INTERNAL_LIBART_LGPL=3D1
  .endif
 =20
 +# FIXME, take out WITHOUT_XFT knob in a gtk2 world
  .if !defined(WITHOUT_XFT)
  LIB_DEPENDS+=3D	Xft.2:${PORTSDIR}/x11-fonts/libXft
  CONFIGURE_ARGS+=3D--enable-xft
 @@ -190,6 +194,9 @@
  		MOZ_INTERNAL_LIBART_LGPL=3D1
  ALL_TARGET=3D	default
  FAKEDIR=3D	${WRKDIR}/fake
 +SCRIPTS_DIR=3D	${FAKEDIR}/lib/${MOZILLA}
 +MOZ_PIS_DIR=3D	${SCRIPTS_DIR}/init.d
 +CHROME_REPO=3D	${SCRIPTS_DIR}/chrome.d
 =20
  #.if ${ARCH} =3D=3D "i386"
  #CONFIGURE_ARGS+=3D	--enable-reorder
 @@ -206,14 +213,22 @@
  .endif
 =20
  .if defined(WITH_OPTIMIZED_CFLAGS)
 =2DCFLAGS+=3D		-O2
 +CFLAGS:=3D		-O2 -fno-strict-aliasing ${CFLAGS:N-O*}
 +#FIXME, add -fno-strict-aliasing to --enable-optimize
  CONFIGURE_ARGS+=3D	--enable-optimize=3D-O2
 +.else
 +# May need this for 'official builds'
 +CFLAGS:=3D		-O ${CFLAGS:N-O*:N-march=3D*:N-mcpu=3D*:N-mtune=3D*}
  .endif
 =20
  .if defined(WITH_MENU_ENTRY)
  USE_GNOME+=3D	gnomehier
  .endif
 =20
 +.if !defined(WITHOUT_ARTSDSP)
 +MOZ_PIS_SCRIPTS+=3D	S90dsp.sh
 +.endif
 +
  .if ${ARCH} =3D=3D "alpha" && ${OSVERSION} < 500035
  IGNORE=3D	"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
 =20
  post-patch:
  	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
 @@ -265,14 +287,22 @@
  			s|mozilla-nspr|mozilla-nspr${MOZ_SUFX}${PKGNAMESUFFIX}|g' \
  			${WRKSRC}/build/unix/$${pcfile}.pc.in; \
  	done
 =2D	@${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}
 =2D	@${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
 +.if defined(WITH_IDN)
 +	@${REINPLACE_CMD} -e '/network.enableIDN/s/false/true/' \
 +		${WRKSRC}/modules/libpref/src/init/all.js
 +.endif
 =20
  pre-configure:
  	@if [ -n "`${PKG_INFO} -xI '^bind[0-9]*-base-[0-9]'`" ]; then \
 @@ -280,36 +310,26 @@
  		${FALSE}; \
  	fi
 =20
 =2Dpost-build:
 =2D	${SED} -e "s|%%PREFIX%%|${PREFIX}|g" -e "s|%%MOZILLA%%|${MOZILLA}|g" \
 =2D		${FILESDIR}/mozilla.sh >${WRKSRC}/${MOZILLA}
 =2D
  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
 =2D	if [ ! -x ${PREFIX}/bin/mozilla -a ! -L ${PREFIX}/bin/mozilla ]; then \
 =2D		${ECHO_CMD} bin/mozilla >> ${PLIST} ; \
 =2D	fi
 =2D	if [ "${MOZILLA}" !=3D "mozilla" ]; then \
 =2D		${ECHO_CMD} bin/${MOZILLA} >> ${PLIST} ; \
 =2D	fi
 =2D	if [ ! -L ${PREFIX}/lib/browser_plugins/libjavaplugin_oji.so ]; then \
 =2D		for jpi in ${JPI_LIST}; do \
 =2D			if [ -f $${jpi} ]; then \
 =2D				${ECHO_CMD} lib/browser_plugins/libjavaplugin_oji.so >> ${PLIST} ; \
 =2D				break; \
 =2D			fi; \
 =2D		done; \
 =2D	fi
 =2D	${ECHO_CMD} lib/browser_plugins/.${PORTNAME}.keep >> ${PLIST}
 =2D	${ECHO_CMD} "@unexec ${RMDIR} %D/lib/browser_plugins 2>/dev/null || ${T=
 RUE}" >> ${PLIST}
 =2D	${ECHO_CMD} lib/${MOZILLA}/mozilla >> ${PLIST}
 =2D	${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} ${FILESDIR}/register.sh ${SCRIPTS_DIR}
 +.for ii in ${MOZ_PIS_SCRIPTS}
 +	${INSTALL_SCRIPT} ${FILESDIR}/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}/defa=
 ults
  .endif
 @@ -333,27 +353,8 @@
  do-install:
  	${MKDIR} ${PREFIX}/lib/${MOZILLA}
  	${CHMOD} 755 ${PREFIX}/lib/${MOZILLA}
 =2D	${INSTALL_SCRIPT} ${FAKEDIR}/bin/mozilla ${PREFIX}/lib/${MOZILLA}
 =2D	${INSTALL_SCRIPT} ${FAKEDIR}/bin/mozilla-config ${PREFIX}/lib/${MOZILLA}
  	cd ${FAKEDIR}/lib/${MOZILLA} && ${FIND} . | \
  		${CPIO} -pdm -L -R ${LIBOWN}:${LIBGRP} ${PREFIX}/lib/${MOZILLA}
 =2D	${INSTALL_SCRIPT} ${WRKSRC}/${MOZILLA} ${PREFIX}/bin
 =2D	if [ ! -x ${PREFIX}/bin/mozilla -a ! -L ${PREFIX}/bin/mozilla ]; then \
 =2D		${LN} -sf ${PREFIX}/bin/${MOZILLA} ${PREFIX}/bin/mozilla ; \
 =2D	fi
 =2D	if [ ! -d ${PREFIX}/lib/browser_plugins ]; then \
 =2D		${MKDIR} ${PREFIX}/lib/browser_plugins ; \
 =2D	fi
 =2D	${TOUCH} -f ${PREFIX}/lib/browser_plugins/.${PORTNAME}.keep
 =2D	if [ ! -L ${PREFIX}/lib/browser_plugins/libjavaplugin_oji.so ]; then \
 =2D		for jpi in ${JPI_LIST}; do \
 =2D			if [ -f $${jpi} ]; then \
 =2D		    		${LN} -sf $${jpi} \
 =2D			    		${PREFIX}/lib/browser_plugins/libjavaplugin_oji.so ; \
 =2D				break; \
 =2D			fi; \
 =2D		done; \
 =2D	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/f=
 iles/moz_pis_S90dsp.sh
 =2D-- /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" =3D "Xstart" -a -x "${run_moz}" ]; then
 +    case "${MOZILLA_DSP}" in
 +	[Aa][Rr][Tt][Ss] | artsdsp)
 +	    MOZILLA_DSP=3D"artsdsp"
 +	    ;;
 +	[Nn][Oo][Nn][Ee])
 +	    MOZILLA_DSP=3D""
 +	    ;;
 +	*) # auto
 +	    if [ -n "${KDE_FULL_SESSION}" ]; then
 +		MOZILLA_DSP=3D"artsdsp"
 +	    else
 +		MOZILLA_DSP=3D""
 +	    fi
 +	    ;;
 +    esac
 +    [ -n "${MOZILLA_DSP}" ] && MOZILLA_DSP=3D`which "${MOZILLA_DSP}"` &&
 +    run_moz=3D"${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
 =2D-- /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]=3D=E6=B5=8F=E8=A7=88 Web
  Comment[zh_TW]=3D=E7=80=8F=E8=A6=BD=E7=B6=B2=E9=A0=81
  Exec=3Dmozilla %U
 =2DStartupNotify=3Dtrue
 +StartupNotify=3Dfalse
  Terminal=3Dfalse
  Type=3DApplication
  Icon=3D%%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
 =2D-- /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:4=
 0: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 @@
 +=20
 + // 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);
 +=20
 + // 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 loo=
 kups
 diff -Nru /usr/HEAD/ports/www/mozilla/files/patch-xpfe_bootstrap_mozilla.in=
  www/mozilla/files/patch-xpfe_bootstrap_mozilla.in
 =2D-- /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	Sun Feb 20 22:41:28 2=
 005
 @@ -0,0 +1,425 @@
 +--- xpfe/bootstrap/mozilla.in.orig	Sat Apr 17 18:51:11 2004
 ++++ xpfe/bootstrap/mozilla.in	Thu Feb 17 14:55:17 2005
 +@@ -49,139 +49,314 @@
 + ## the mozilla-bin binary to work.
 + ##
 +=20
 ++#
 ++# 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=3D"%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=3D2
 +-  MOZ_PIS_MOZBINDIR=3D"${dist_bin}"
 +-  MOZ_PIS_SESSION_PID=3D"$$"
 +-  MOZ_PIS_USER_DIR=3D"${MOZ_USER_DIR}"
 +-  export MOZ_PIS_API MOZ_PIS_MOZBINDIR MOZ_PIS_SESSION_PID MOZ_PIS_USER_D=
 IR
 +- =20
 +-  case "${1}" in
 +-    "start")
 +-      for curr_pis in "${dist_bin}/init.d"/S* "${HOME}/${MOZ_USER_DIR}/in=
 it.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}/in=
 it.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=3D2
 ++    MOZ_PIS_MOZBINDIR=3D"${dist_bin}"
 ++    MOZ_PIS_SESSION_PID=3D"$$"
 ++    MOZ_PIS_USER_DIR=3D"${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
 + }
 +=20
 + #uncomment for debugging
 + #set -x
 +=20
 +-moz_libdir=3D%MOZAPPDIR%
 +-MRE_HOME=3D%MREDIR%
 ++#
 ++# variables
 ++#
 ++location=3D"new-tab"
 ++#MOZILLA_UILOCALE=3D"en-US"
 ++#MOZILLA_UIREGION=3D"US"
 +=20
 +-# honor MOZILLA_FIVE_HOME if it's there
 +-if [ -n "$MOZILLA_FIVE_HOME" ] ; then
 +-  dist_bin=3D"$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=3D0
 +-  progname=3D$0
 +-  curdir=3D`dirname "$progname"`
 +-  run_moz=3D"$curdir/run-mozilla.sh"
 +-  if test -x "$run_moz"; then
 +-    dist_bin=3D$curdir
 ++#
 ++# working definitions
 ++#
 ++MOZ_USER_DIR=3D"%MOZ_USER_DIR%"
 ++moz_libdir=3D"%MOZAPPDIR%"
 ++MRE_HOME=3D"%MREDIR%"
 ++
 ++debugging=3D		# set the debugging level
 ++use_openFile=3D"yes"	# use openFile() for file/dir
 ++here=3D`pwd`
 ++
 ++if [ ! -d "${MRE_HOME}" ]; then
 ++    # use moz_libdir as MRE_HOME
 ++    MRE_HOME=3D"${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=3D0
 ++progname=3D"$0"
 ++curdir=3D`dirname "$progname"`
 ++progbase=3D`basename "$progname"`
 ++run_moz=3D"$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=3D"$MOZILLA_FIVE_HOME"
 ++    run_moz=3D"$curdir/run-mozilla.sh"
 ++    dist_bin=3D"$curdir"
 ++    found=3D1
 ++elif [ -x "$run_moz" ]; then
 ++    dist_bin=3D"$curdir"
 +     found=3D1
 +-  else
 +-    here=3D`/bin/pwd`
 +-    while [ -h "$progname" ]; do
 +-      bn=3D`basename "$progname"`
 +-      cd `dirname "$progname"`
 +-      progname=3D`/bin/ls -l "$bn" |sed -e 's/^.* -> //' `
 +-      if [ ! -x "$progname" ]; then
 +-        break
 +-      fi
 +-      curdir=3D`dirname "$progname"`
 +-      run_moz=3D"$curdir/run-mozilla.sh"
 +-      if [ -x "$run_moz" ]; then
 +-        cd "$curdir"
 +-        dist_bin=3D`pwd`
 +-        found=3D1
 +-        break
 +-      fi
 ++else
 ++    while [ -h "${progname}" ]; do
 ++	bn=3D`basename "${progname}"`
 ++	cd `dirname "${progname}"`
 ++	progname=3D`ls -l "${bn}" | sed -e 's/^.* -> //'`
 ++	if [ ! -x "$progname" ]; then
 ++	    break
 ++	fi
 ++	curdir=3D`dirname "${progname}"`
 ++	run_moz=3D"${curdir}/run-mozilla.sh"
 ++	if [ -x "${run_moz}" ]; then
 ++	    cd "$curdir"
 ++	    dist_bin=3D`pwd`
 ++	    run_moz=3D"${dist_bin}/run-mozilla.sh"
 ++	    found=3D1
 ++	    break
 ++	fi
 +     done
 +-    cd "$here"
 +-  fi
 +-  if [ $found =3D 0 ]; then
 ++    cd "${here}"
 ++fi
 ++if [ $found =3D 0 ]; then
 +     # Check default compile-time libdir
 +-    if [ -x "$moz_libdir/run-mozilla.sh" ]; then
 +-      dist_bin=3D$moz_libdir
 +-    else=20
 +-      echo "Cannot find mozilla runtime directory. Exiting."
 +-      exit 1
 +-    fi
 +-  fi
 ++    if [ -x "${moz_libdir}/run-mozilla.sh" ]; then
 ++	dist_bin=3D"$moz_libdir"
 ++	run_moz=3D"${dist_bin}/run-mozilla.sh"
 ++    else
 ++	echo "$0: Cannot find mozilla runtime directory. Exiting." 1>&2
 ++	exit 1
 ++    fi
 + fi
 +=20
 +-script_args=3D""
 +-moreargs=3D""
 +-debugging=3D0
 +-MOZILLA_BIN=3D"%MOZILLA-BIN%"
 +-
 ++MOZILLA_BIN=3D"${progbase}-bin"
 + if [ "$OSTYPE" =3D "beos" ]; then
 +-  mimeset -F $MOZILLA_BIN
 ++    mimeset -F "$MOZILLA_BIN"
 ++fi
 ++MOZILLA_BIN=3D"${dist_bin}/${progbase}-bin"
 ++
 ++# test for binary apps in ${dist_bin}
 ++if [ -x "${dist_bin}/mozilla-xremote-client" ]; then
 ++    MOZ_CLIENT_PROGRAM=3D"${dist_bin}/mozilla-xremote-client -a ${progbas=
 e}"
 ++elif [ -x "${MOZILLA_BIN}" ]; then
 ++    MOZ_CLIENT_PROGRAM=3D"${MOZILLA_BIN} -remote -a ${progbase}"
 ++else
 ++    echo "$0: Cannot find mozilla binary executable. Exiting." 1>&2
 ++    exit 1
 ++fi
 ++
 ++# guest a default remote command
 ++_remote_cmd=3D"xfeDoCommand(openBrowser)"
 ++
 ++# test for a running copy of mozilla
 ++ALREADY_RUNNING=3D	# null
 ++if [ -n "${DISPLAY}" ]; then
 ++    if [ -n "${debugging}" ]; then
 ++	echo "${run_moz} ${MOZ_CLIENT_PROGRAM} ping()"
 ++	${run_moz} ${MOZ_CLIENT_PROGRAM} 'ping()' && ALREADY_RUNNING=3D"yes"
 ++    else
 ++	${run_moz} ${MOZ_CLIENT_PROGRAM} 'ping()' >/dev/null 2>&1 &&
 ++		ALREADY_RUNNING=3D"yes"
 ++    fi
 ++elif [ -n "${debugging}" ]; then
 ++    echo "$0: WARN, no DISPLAY environment" 1>&2
 + fi
 +=20
 ++# parse options
 ++script_args=3D	# null
 ++moreargs=3D	# null
 ++target=3D		# null
 + while [ $# -gt 0 ]
 + do
 +-  case "$1" in
 +-    -p | -pure)
 +-      MOZILLA_BIN=3D"%MOZILLA-BIN%.pure"
 +-      shift
 +-      ;;
 +-    -g | --debug)
 +-      script_args=3D"$script_args -g"
 +-      debugging=3D1
 +-      shift
 +-      ;;
 +-    -d | --debugger)
 +-      script_args=3D"$script_args -d $2"
 +-      shift 2
 +-      ;;
 +-    *)
 +-      moreargs=3D"$moreargs \"$1\""
 +-      shift 1
 +-      ;;
 +-  esac
 ++    if [ -n "${target}" ]; then
 ++	# well, this can't be the target if not last
 ++	moreargs=3D"${moreargs} ${target}"
 ++	target=3D	# null
 ++    fi
 ++    case "$1" in
 ++	-p | --pure | -pure)
 ++	    MOZILLA_BIN=3D"${MOZILLA_BIN}.pure"
 ++	    shift
 ++	    ;;
 ++	-g | --debug)
 ++	    script_args=3D"${script_args} -g"
 ++	    debugging=3D1
 ++	    shift
 ++	    ;;
 ++	-d | --debugger)
 ++	    if [ -n "$2" ]; then
 ++		script_args=3D"${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=3D"$2"
 ++		shift 2
 ++	    else
 ++		echo "$0: ERROR, -UILocale needs an argument. Exiting" 1>&2
 ++		exit 1
 ++	    fi
 ++	    ;;
 ++	-UIRegion)
 ++	    if [ -n "$2" ]; then
 ++		uiregion=3D"$2"
 ++		shift 2
 ++	    else
 ++		echo "$0: ERROR, -UIRegion needs an argument. Exiting" 1>&2
 ++		exit 1
 ++	    fi
 ++	    ;;
 ++	-browser)
 ++	    _remote_cmd=3D"xfeDoCommand(openBrowser)"
 ++	    moreargs=3D"${moreargs} $1"
 ++	    shift
 ++	    ;;
 ++	-mail)
 ++	    _remote_cmd=3D"xfeDoCommand(openInbox)"
 ++	    moreargs=3D"${moreargs} $1"
 ++	    shift
 ++	    ;;
 ++	-compose)
 ++	    _remote_cmd=3D"xfeDoCommand(composeMessage)"
 ++	    moreargs=3D"${moreargs} $1"
 ++	    shift
 ++	    ;;
 ++	-chat | -edit | -webcal)
 ++	    # don't use remote for this
 ++	    ALREADY_RUNNING=3D    # null
 ++	    moreargs=3D"${moreargs} $1"
 ++	    shift
 ++	    ;;
 ++	-*)
 ++	    moreargs=3D"${moreargs} $1"
 ++	    shift
 ++	    ;;
 ++	*)
 ++	    target=3D"$1"
 ++	    shift
 ++	    ;;
 ++    esac
 + done
 +=20
 +-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=3D"${here}/${target}"
 ++	fi
 ++	if [ -r "${target}" -o -d "${target}" ]; then
 ++	    [ -n "${use_openFile}" ] || target=3D"file://${target}"
 ++	else
 ++	    echo "$0: WARN, target: ${target} not an URI/file/dir" 1>&2
 ++	    ALREADY_RUNNING=3D    # null
 ++	fi
 ++    else
 ++	# an former URI, don't use openFile
 ++	use_openFile=3D	# null
 ++    fi
 ++fi
 ++
 ++# try remote protocol if running
 ++if [ -n "${ALREADY_RUNNING}" ]; then
 ++    if [ -n "${target}" ]; then
 ++	if [ -n "${use_openFile}" ]; then
 ++	    _remote_cmd=3D"openFile(${target})"
 ++	elif [ -n "${location}" ]; then
 ++	    _remote_cmd=3D"openURL(${target},${location})"
 ++	else
 ++	    _remote_cmd=3D"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} && exi=
 t 0
 ++fi
 ++
 ++# fallback to direct invocation
 ++
 ++# UILocale, UIRegion
 ++if [ -z "${uilocale}" -a -n "${MOZILLA_UILOCALE}" ]; then
 ++    uilocale=3D"${MOZILLA_UILOCALE}"
 ++fi
 ++if [ -z "${uiregion}" -a -n "${MOZILLA_UIREGION}" ]; then
 ++    uiregion=3D"${MOZILLA_UIREGION}"
 ++fi
 ++if [ -n "${uiregion}" -a -z "${uilocale}" ]; then
 ++    uilocale=3D"en-US"
 ++fi
 ++if [ -n "${uilocale}" ]; then
 ++    if [ -n "${uiregion}" ]; then
 ++	moreargs=3D"-UIRegion ${uiregion} ${more_args}"
 ++    fi
 ++    moreargs=3D"-UILocale ${uilocale} ${more_args}"
 ++fi
 ++
 ++# real invocation
 ++if [ -n "${target}" ]; then
 ++    eval "set -- ${moreargs} \"${target}\""
 ++else
 ++    eval "set -- ${moreargs}"
 ++fi
 +=20
 + ## Start addon scripts
 + moz_pis_startstop_scripts "start"
 +=20
 +-if [ $debugging =3D 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=3D$?
 +=20
 + ## Stop addon scripts
 diff -Nru /usr/HEAD/ports/www/mozilla/files/register.sh www/mozilla/files/r=
 egister.sh
 =2D-- /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=3D`pwd`
 +run_moz=3D"./run-mozilla.sh"
 +REGXPCOM=3D"${MOZDIR}/regxpcom"
 +REGCHROME=3D"${MOZDIR}/regchrome"
 +INST_CHROME=3D"${MOZDIR}/chrome/installed-chrome.txt"
 +CHROME_REPO=3D"${MOZDIR}/chrome.d/"
 +
 +echo "=3D=3D=3D> 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-dein=
 stall.in
 =2D-- /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=3D/bin:/usr/bin
 =20
 +prefix=3D"${PKG_PREFIX:-%%PREFIX%%}"
 +
  [ "x$1" =3D "x" ] && exit 1
  [ "x$2" !=3D "xDEINSTALL" ] && exit 0
 =20
 =2DMOZDIR=3D%%MOZDIR%%
 +MOZDIR=3D"${prefix}/lib/%%MOZILLA%%"
 =20
  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}" !=3D "${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=3D"%%X11BASE%%/lib/browser_plugins"
 +# this is what we do now
 +# But may be better use MOZLIB after tr / _
 +KEEPFILE=3D"${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
 +=09
 +# alternate way to register browser_plugins
 +# this makes ${KEEPFILE} usable by moz_pis to age tests
 +#
 +# PLUGINDIR=3D"%%X11BASE%%/lib/browser_plugins"
 +# KEEPFILE=3D"${PLUGINDIR}/.keepme"
 +# if [ -r "${KEEPFILE}" ]; then
 +#     if grep -hqv "${MOZDIR}" "${KEEPFILE}" > "${KEEPFILE}-%%MOZILLA%%"; =
 then
 +# 	mv "${KEEPFILE}-%%MOZILLA%%" "${KEEPFILE}"
 +#     else
 +# 	rm -rf "${PLUGINDIR}"
 +#     fi
 +# fi
 =20
  exit 0
 diff -Nru /usr/HEAD/ports/www/mozilla/pkg-install.in www/mozilla/pkg-instal=
 l.in
 =2D-- /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=3D/bin:/usr/bin
 =20
 +prefix=3D"${PKG_PERFIX:-%%PREFIX%%}"
 +
  [ "x$1" =3D "x" ] && exit 1
  [ "x$2" !=3D "xPOST-INSTALL" ] && exit 0
 =20
 =2DMOZDIR=3D%%MOZDIR%%
 =2DREGXPCOM=3D${MOZDIR}/regxpcom
 =2DREGCHROME=3D${MOZDIR}/regchrome
 =2D
 =2Decho "=3D=3D=3D> Building Chrome's registry..."
 =2Drm -rf ${MOZDIR}/chrome/overlayinfo
 =2Drm -f ${MOZDIR}/chrome/*.rdf
 =2Dmkdir -p ${MOZDIR}/chrome/overlayinfo
 =2Drm -f ${MOZDIR}/component.reg
 =2D
 =2Dcd ${MOZDIR} || exit 1
 =2D./run-mozilla.sh ${REGXPCOM} || true
 =2D./run-mozilla.sh ${REGCHROME} || true
 +MOZDIR=3D"${prefix}/lib/%%MOZILLA%%"
 +REGXPCOM=3D"${MOZDIR}/regxpcom"
 +REGCHROME=3D"${MOZDIR}/regchrome"
 +
 +# support for shared browser_plugins directory (X11BASE)
 +PLUGINDIR=3D"%%X11BASE%%/lib/browser_plugins"
 +# this is what we do now
 +# But may be better use MOZLIB after tr / _
 +KEEPFILE=3D"${PLUGINDIR}/.%%MOZILLA%%.keep"
 +mkdir -p "${PLUGINDIR}"
 +touch "${KEEPFILE}"
 +
 +# an alternate way to register browser_plugins
 +# PLUGINDIR=3D"%%X11BASE%%/lib/browser_plugins"
 +# KEEPFILE=3D"${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=3D"${PLUGINDIR}/libjavaplugin_oji.so"
 +if [ ! -L "${jpidst}" ]; then
 +    rm -f "${jpidst}"
 +    jpilist=3D"%%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 "=3D=3D=3D> Building Chrome's registry..."
 +    rm -rf ${MOZDIR}/chrome/overlayinfo
 +    rm -f ${MOZDIR}/chrome/*.rdf
 +    mkdir -p ${MOZDIR}/chrome/overlayinfo
 +    rm -f ${MOZDIR}/component.reg
 =20
 =2Dif [ ! -d %%PREFIX%%/lib/browser_plugins ]; then
 =2D    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
 =20
  exit 0
 
 --Boundary-00=_MJaGCAWmJOB3b06--



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