[PC-BSD Commits] r3784 - in pbibuild/modules/firefox3: . overlay-dir
svn at pcbsd.org
svn at pcbsd.org
Mon Apr 13 08:03:41 PDT 2009
Author: kris
Date: 2009-04-13 08:03:39 -0700 (Mon, 13 Apr 2009)
New Revision: 3784
Modified:
pbibuild/modules/firefox3/copy-files
pbibuild/modules/firefox3/overlay-dir/PBI.SetupScript.sh
pbibuild/modules/firefox3/overlay-dir/makedefault.sh
pbibuild/modules/firefox3/pbi.conf
Log:
Updated FF3 module, fixes a few issues:
* Fixes font issues when printing certian web-pages
* Fixes possible race condition in makedefault.sh script
Modified: pbibuild/modules/firefox3/copy-files
===================================================================
--- pbibuild/modules/firefox3/copy-files 2009-04-10 15:55:45 UTC (rev 3783)
+++ pbibuild/modules/firefox3/copy-files 2009-04-13 15:03:39 UTC (rev 3784)
@@ -48,3 +48,5 @@
/usr/local/lib/libI* autolibs/
/usr/local/lib/libd* autolibs/
/usr/local/lib/libfont* autolibs/
+/usr/local/lib/X11 autolibs/
+/usr/local/etc/fonts etc/
Modified: pbibuild/modules/firefox3/overlay-dir/PBI.SetupScript.sh
===================================================================
--- pbibuild/modules/firefox3/overlay-dir/PBI.SetupScript.sh 2009-04-10 15:55:45 UTC (rev 3783)
+++ pbibuild/modules/firefox3/overlay-dir/PBI.SetupScript.sh 2009-04-13 15:03:39 UTC (rev 3784)
@@ -16,11 +16,11 @@
#########################################
# Check which font config we want to link to
-if [ -d "/PCBSD/local/etc/fonts" ]
+if [ -d "/PCBSD/local/lib/X11/fonts" ]
then
- ln -s /PCBSD/local/etc/fonts /Programs/${PROGDIR}/etc/fonts
+ ln -s /PCBSD/local/lib/X11/fonts/misc /Programs/${PROGDIR}/lib/X11/fonts/misc
else
- ln -s /usr/local/etc/fonts /Programs/${PROGDIR}/etc/fonts
+ ln -s /usr/local/lib/X11/fonts/misc /Programs/${PROGDIR}/lib/X11/fonts/misc
fi
echo "LAUNCHCLOSE: /Programs/bin/firefox3.sh"
Modified: pbibuild/modules/firefox3/overlay-dir/makedefault.sh
===================================================================
--- pbibuild/modules/firefox3/overlay-dir/makedefault.sh 2009-04-10 15:55:45 UTC (rev 3783)
+++ pbibuild/modules/firefox3/overlay-dir/makedefault.sh 2009-04-13 15:03:39 UTC (rev 3784)
@@ -1,51 +1,42 @@
#!/bin/sh
# Helper script to make FF the default browser for a user
+# Should work for KDE3 and KDE4.
##############################################################################
-# Get the users homedir
-USER="`whoami`"
-HOMEDIR="`cat /etc/passwd | grep ^${USER}: | cut -d ":" -f 6`"
+PROG="!/Programs/bin/firefox3"
+FILE="./share/config/kdeglobals"
-if [ -e "${HOMEDIR}/.kde4" ]
-then
- KDEDIR=".kde4"
-else
- KDEDIR=".kde"
-fi
+for D in "${HOME}/.kde" "${HOME}/.kde4"
+do
+ cd $D 2>/dev/null || break;
-if [ ! -e "${HOMEDIR}/${KDEDIR}/share/config/kdeglobals" ]
-then
- echo "ERROR: No kdeglobals file for $USER"
- exit 1
-fi
+ if [ ! -e "$FILE" ]
+ then
+ echo "ERROR: No kdeglobals file, unable to set $PROG as default"
+ exit 1
+ fi
-
-TMPKFILE="${HOMEDIR}/.kdeglobals.$$"
-TMPKFILE2="${HOMEDIR}/.kdeglobals2.$$"
-rm ${TMPKFILE} >/dev/null 2>/dev/null
-
-cat ${HOMEDIR}/${KDEDIR}/share/config/kdeglobals | grep -v '^BrowserApplication' > ${TMPKFILE}
-
-rm ${TMPKFILE2} >/dev/null 2>/dev/null
-touch ${TMPKFILE2}
-while read line
-do
- if [ "$line" = "[General]" ]
- then
- echo "$line" >> ${TMPKFILE2}
- if [ "${KDEDIR}" = ".kde4" ]
+ # Check if we already have the BrowserApplication line and modify, or add it
+ grep "^BrowserApplication" ${FILE} >/dev/null 2>/dev/null
+ if [ "$?" = "0" ]
then
- echo "BrowserApplication[$e]=!/Programs/bin/firefox3" >> ${TMPKFILE2}
+ ed -s "$FILE" <<EOF
+/\[General\]/
+/BrowserApplication.*=/
+s|=.*|=${PROG}|
+wq
+EOF
else
- echo "BrowserApplication=!/Programs/bin/firefox3" >> ${TMPKFILE2}
+ ULANG="`grep Language= ${FILE} | cut -d '=' -f 2`"
+ ed -s "$FILE" <<EOF
+/\[General\]/
+a
+BrowserApplication[${ULANG}]=${PROG}
+.
+wq
+EOF
fi
- else
- echo "$line" >> ${TMPKFILE2}
- fi
-done < ${TMPKFILE}
-# all finished, now move it back over kdeglobals
-rm ${TMPKFILE}
-mv ${TMPKFILE2} ${HOME}/${KDEDIR}/share/config/kdeglobals
+done
exit 0
Modified: pbibuild/modules/firefox3/pbi.conf
===================================================================
--- pbibuild/modules/firefox3/pbi.conf 2009-04-10 15:55:45 UTC (rev 3783)
+++ pbibuild/modules/firefox3/pbi.conf 2009-04-13 15:03:39 UTC (rev 3784)
@@ -26,6 +26,7 @@
# Other Ports we need built (One per line)
OTHERPORT="/usr/ports/audio/esound
+/usr/ports/x11-fonts/dejavu
/usr/ports/x11-themes/qtcurve-gtk2
/usr/ports/www/firefox3-i18n"
@@ -35,6 +36,6 @@
# Build Key - Change this to anything else to trigger a rebuild
# - The rebuild will take place even if port is still the same ver
-BUILDKEY="02"
+BUILDKEY="01"
export PBIPORT MAKEOPTS PROGNAME PROGWEB PROGAUTHOR OTHERPORT PROGICON PROGLIBS PBIUPDATE BUILDKEY
More information about the Commits
mailing list