diff -ruN mozilla-orig/.mozconfig mozilla/.mozconfig
--- mozilla-orig/.mozconfig	Wed Dec 31 19:00:00 1969
+++ mozilla/.mozconfig	Sat Jun 24 08:53:01 2006
@@ -0,0 +1,40 @@
+# sh
+# Build configuration script
+#
+# See http://www.mozilla.org/build/unix.html for build instructions.
+#
+
+. $topsrcdir/browser/config/mozconfig
+
+# Options for client.mk.
+# environment variables to set
+#mk_add_options MOZILLA_OFFICIAL=1
+#mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@
+
+# Options for 'configure' (same as command-line options).
+ac_add_options --enable-default-toolkit=gtk2
+ac_add_options --enable-xft
+#ac_add_options --disable-xft
+#ac_add_options --enable-freetype2
+ac_add_options --disable-freetype2
+ac_add_options --enable-xinerama
+ac_add_options --with-pthreads
+ac_add_options --disable-gnomevfs
+ac_add_options --enable-postscript
+
+#ac_add_options --enable-official-branding
+#ac_add_options --disable-shared
+#ac_add_options --enable-static
+#ac_add_options --enable-prebinding
+ac_add_options --disable-prebinding
+ac_add_options --disable-debug
+ac_add_options --disable-tests
+ac_add_options --enable-strip
+ac_add_options --enable-optimize='-O2'
+ac_add_options --enable-macos-target=10.3
+ac_add_options --with-default-mozilla-five-home=@PREFIX@/lib/firefox
+ac_add_options --with-system-jpeg=@PREFIX@
+ac_add_options --with-system-zlib=@PREFIX@
+ac_add_options --with-system-png=@PREFIX@
+#ac_add_options --with-ft-prefix=@PREFIX@/lib/freetype2
+#ac_add_options --with-ft-exec-prefix=@PREFIX@/lib/freetype2/bin
diff -ruN mozilla-orig/browser/app/mozilla.in mozilla/browser/app/mozilla.in
--- mozilla-orig/browser/app/mozilla.in	Tue Sep 20 17:10:28 2005
+++ mozilla/browser/app/mozilla.in	Sat Jun 24 08:53:01 2006
@@ -79,7 +79,9 @@
 # If not, then start resolving symlinks until we find run-mozilla.sh
 found=0
 progname="$0"
-curdir=`dirname "$progname"`
+#curdir=`dirname "$progname"`
+# falsely uses %p/bin, so force it to use %p/lib/firefox
+curdir="$moz_libdir"
 progbase=`basename "$progname"`
 run_moz="$curdir/run-mozilla.sh"
 if test -x "$run_moz"; then
diff -ruN mozilla-orig/browser/components/build/Makefile.in mozilla/browser/components/build/Makefile.in
--- mozilla-orig/browser/components/build/Makefile.in	Thu Jul 15 16:43:54 2004
+++ mozilla/browser/components/build/Makefile.in	Sat Jun 24 08:53:01 2006
@@ -75,6 +75,12 @@
 	$(MOZ_COMPONENT_LIBS) \
 	$(NULL)
 
+# fix for building on Mac/X11 (bug 257773)
+# dependencies for gkgfx
+ifeq ($(MOZ_WIDGET_TOOLKIT), gtk2)
+EXTRA_DSO_LDOPTS += $(MOZ_GTK2_LIBS)
+endif
+
 # Need to link to CoreFoundation for Mac Migrators (PList reading code)
 ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
 EXTRA_DSO_LDOPTS += \
diff -ruN mozilla-orig/browser/config/mozconfig mozilla/browser/config/mozconfig
--- mozilla-orig/browser/config/mozconfig	Wed Jul  7 04:31:10 2004
+++ mozilla/browser/config/mozconfig	Sat Jun 24 08:53:01 2006
@@ -8,7 +8,7 @@
 
 ac_add_options --disable-ldap
 ac_add_options --disable-mailnews
-ac_add_options --enable-extensions=cookie,xml-rpc,xmlextras,pref,transformiix,universalchardet,webservices,inspector,gnomevfs,negotiateauth
+ac_add_options --enable-extensions=cookie,xml-rpc,xmlextras,pref,transformiix,universalchardet,webservices,inspector,negotiateauth
 ac_add_options --enable-crypto
 ac_add_options --disable-composer
 ac_add_options --enable-single-profile
diff -ruN mozilla-orig/browser/locales/en-US/profile/bookmarks.html mozilla/browser/locales/en-US/profile/bookmarks.html
--- mozilla-orig/browser/locales/en-US/profile/bookmarks.html	Thu Feb  3 22:03:07 2005
+++ mozilla/browser/locales/en-US/profile/bookmarks.html	Sat Jun 24 08:53:01 2006
@@ -12,6 +12,7 @@
     <DL><p>
         <DT><A HREF="http://www.mozilla.org/products/firefox/central.html" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" LAST_CHARSET="ISO-8859-1" ID="rdf:#$GvPhC3">Getting Started</A>
         <DT><A HREF="http://fxfeeds.mozilla.org/" LAST_MODIFIED="1094668003" FEEDURL="http://fxfeeds.mozilla.org/rss20.xml" ID="rdf:#$HvPhC3">Latest Headlines</A>
+        <DT><A HREF="http://fink.sourceforge.net/" >Fink - Home</A>
     </DL><p>
     <HR>
     <DT><H3 ID="rdf:#$6wPhC3">Quick Searches</H3>
diff -ruN mozilla-orig/build/unix/mozilla-config.in mozilla/build/unix/mozilla-config.in
--- mozilla-orig/build/unix/mozilla-config.in	Fri Feb 10 03:18:15 2006
+++ mozilla/build/unix/mozilla-config.in	Sat Jun 24 08:55:19 2006
@@ -115,7 +115,7 @@
 fi
 
 _nspr_libs="%FULL_NSPR_LIBS%"
-_xpcom_libs="-lxpcom $_nspr_libs"
+_xpcom_libs="-lxpcom -lxpcom_core $_nspr_libs"
 _js_libs="-ljs"
 
 if test "$echo_libs" = "yes"; then
diff -ruN mozilla-orig/build/unix/mozilla-xpcom.pc.in mozilla/build/unix/mozilla-xpcom.pc.in
--- mozilla-orig/build/unix/mozilla-xpcom.pc.in	Thu Feb  9 14:07:30 2006
+++ mozilla/build/unix/mozilla-xpcom.pc.in	Sat Jun 24 08:55:38 2006
@@ -8,5 +8,5 @@
 Description: The Mozilla Cross Platform Component Library
 Version: %MOZILLA_VERSION%
 Requires: %MOZ_APP_NAME%-nspr = %MOZILLA_VERSION%
-Libs: -L${libdir} -lxpcom
+Libs: -L${libdir} -lxpcom -lxpcom_core
 Cflags: -I${includedir}/xpcom -I${includedir}/string
diff -ruN mozilla-orig/config/add-chrome.pl mozilla/config/add-chrome.pl
--- mozilla-orig/config/add-chrome.pl	Fri Feb 20 17:14:12 2004
+++ mozilla/config/add-chrome.pl	Sat Jun 24 08:53:01 2006
@@ -14,7 +14,7 @@
 my $jarFileName = $ARGV[4];
 
 my $win32 = ($^O =~ /((MS)?win32)|cygwin|os2/i) ? 1 : 0;
-my $macos = ($^O =~ /MacOS|darwin/i) ? 1 : 0;
+my $macos = 0;
 my $unix  = !($win32 || $macos) ? 1 : 0;
 
 sub foreignPlatformFile
diff -ruN mozilla-orig/config/autoconf.mk.in mozilla/config/autoconf.mk.in
--- mozilla-orig/config/autoconf.mk.in	Sun Oct 31 00:29:54 2004
+++ mozilla/config/autoconf.mk.in	Sat Jun 24 08:53:01 2006
@@ -32,14 +32,14 @@
 prefix		= @prefix@
 exec_prefix	= @exec_prefix@
 bindir		= @bindir@
-includedir	= @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+includedir	= @includedir@/$(MOZ_APP_NAME)
 libdir		= @libdir@
 datadir		= @datadir@
 mandir		= @mandir@
-idldir		= @datadir@/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+idldir		= @datadir@/idl/$(MOZ_APP_NAME)
 
-mozappdir	= $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-mredir		= $(libdir)/mre/mre-$(MOZ_APP_VERSION)
+mozappdir	= $(libdir)/$(MOZ_APP_NAME)
+mredir		= $(libdir)/mre/mre
 mrelibdir	= $(mredir)/lib
 
 DIST		= $(DEPTH)/dist
diff -ruN mozilla-orig/config/config.mk mozilla/config/config.mk
--- mozilla-orig/config/config.mk	Tue Oct 12 00:11:11 2004
+++ mozilla/config/config.mk	Sat Jun 24 08:53:01 2006
@@ -712,7 +712,7 @@
 ifeq ($(OS_ARCH),Darwin)
 ifdef USE_PREBINDING
 export LD_PREBIND=1
-export LD_SEG_ADDR_TABLE=$(shell cd $(topsrcdir); pwd)/config/prebind-address-table
+export LD_PREBIND_ALLOW_OVERLAP=1
 endif
 ifdef MACOS_SDK_DIR
 export NEXT_ROOT=$(MACOS_SDK_DIR)
diff -ruN mozilla-orig/configure mozilla/configure
--- mozilla-orig/configure	Sun Oct 31 02:17:58 2004
+++ mozilla/configure	Sat Jun 24 08:53:01 2006
@@ -4996,7 +4996,7 @@
     ;;
 
 *-darwin*)
-    HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11"
+    HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
     HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"'
     HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
     ;;
@@ -5227,8 +5227,8 @@
 
 *-darwin*) 
     _PEDANTIC=
-    CFLAGS="$CFLAGS -fpascal-strings -no-cpp-precomp -fno-common"
-    CXXFLAGS="$CXXFLAGS -fpascal-strings -no-cpp-precomp -fno-common"
+    CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
+    CXXFLAGS="$CXXFLAGS -no-cpp-precomp -fno-common"
     DLL_SUFFIX=".dylib"
     DSO_LDOPTS=''
     STRIP="$STRIP -x -S"
diff -ruN mozilla-orig/fink/applications/firefox.desktop mozilla/fink/applications/firefox.desktop
--- mozilla-orig/fink/applications/firefox.desktop	Wed Dec 31 19:00:00 1969
+++ mozilla/fink/applications/firefox.desktop	Sat Jun 24 08:53:01 2006
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Firefox Web Browser
+Comment=Browse the World Wide Web
+Exec=firefox
+Icon=firefox.xpm
+Terminal=false
+Type=Application
+Categories=Application;Network
+StartupNotify=true
diff -ruN mozilla-orig/fink/prefs.js mozilla/fink/prefs.js
--- mozilla-orig/fink/prefs.js	Wed Dec 31 19:00:00 1969
+++ mozilla/fink/prefs.js	Sat Jun 24 08:53:01 2006
@@ -0,0 +1,22 @@
+pref("general.useragent.vendorComment", "Fink Community Edition");
+
+// TrueType
+//pref("font.FreeType2.enable", true);
+//pref("font.freetype2.shared-library", "@PREFIX@/lib/libfreetype.6.dylib");
+//pref("font.freetype2.shared-library", "/usr/X11R6/lib/libfreetype.6.dylib");
+//pref("font.freetype2.autohinted", true);
+//pref("font.freetype2.unhinted", true);
+//pref("font.antialias.min", 10);
+//pref("font.embedded_bitmaps.max", 1000000);
+//pref("font.scale.tt_bitmap.dark_text.min", 64);
+//pref("font.scale.tt_bitmap.dark_text.gain", "0.0");
+//pref("font.directory.truetype.1", "/Library/Fonts");
+//pref("font.directory.truetype.2", "/Network/Library/Fonts");
+//pref("font.directory.truetype.3", "/System/Library/Fonts");
+//pref("font.directory.truetype.4", "/usr/X11R6/lib/X11/fonts/TTF");
+//pref("font.directory.truetype.5", "@PREFIX@/share/fonts/truetype");
+
+// AA with Bitmap scaling.
+//pref("font.scale.aa_bitmap.enable", true);
+//pref("font.scale.aa_bitmap.always", false);
+//pref("font.scale.aa_bitmap.min", 6);
diff -ruN mozilla-orig/gfx/src/gtk/nsScreenGtk.cpp mozilla/gfx/src/gtk/nsScreenGtk.cpp
--- mozilla-orig/gfx/src/gtk/nsScreenGtk.cpp	Tue Apr 20 13:35:51 2004
+++ mozilla/gfx/src/gtk/nsScreenGtk.cpp	Sat Jun 24 08:53:01 2006
@@ -140,10 +140,11 @@
 
   gdk_error_trap_push();
 
+  // gdk_property_get uses (length + 3) / 4, hence G_MAXLONG - 3 here.
   if (!gdk_property_get(root_window,
                         gdk_atom_intern ("_NET_WORKAREA", FALSE),
                         cardinal_atom,
-                        0, G_MAXLONG, FALSE,
+                        0, G_MAXLONG - 3, FALSE,
                         &type_returned,
                         &format_returned,
                         &length_returned,
diff -ruN mozilla-orig/modules/libpref/src/nsPrefService.cpp mozilla/modules/libpref/src/nsPrefService.cpp
--- mozilla-orig/modules/libpref/src/nsPrefService.cpp	Mon Jul 26 03:52:43 2004
+++ mozilla/modules/libpref/src/nsPrefService.cpp	Sat Jun 24 08:53:01 2006
@@ -747,6 +747,7 @@
 #elif defined(XP_BEOS)
       "beos.js"
 #endif
+      , "fink.js"
   };
 
   rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, NS_ARRAY_LENGTH(specialFiles));
diff -ruN mozilla-orig/nsprpub/config/nspr.m4 mozilla/nsprpub/config/nspr.m4
--- mozilla-orig/nsprpub/config/nspr.m4	Fri May 11 20:36:57 2001
+++ mozilla/nsprpub/config/nspr.m4	Sat Jun 24 08:54:19 2006
@@ -5,7 +5,7 @@
 
 dnl AM_PATH_NSPR([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
 dnl Test for NSPR, and define NSPR_CFLAGS and NSPR_LIBS
-AC_DEFUN(AM_PATH_NSPR,
+AC_DEFUN([AM_PATH_NSPR],
 [dnl
 
 AC_ARG_WITH(nspr-prefix,
diff -ruN mozilla-orig/nsprpub/configure mozilla/nsprpub/configure
--- mozilla-orig/nsprpub/configure	Tue Sep 14 17:10:26 2004
+++ mozilla/nsprpub/configure	Sat Jun 24 08:53:01 2006
@@ -3320,9 +3320,6 @@
 
     # Add Mac OS X support for loading CFM & CFBundle plugins
     if test -f /System/Library/Frameworks/Carbon.framework/Carbon; then
-        cat >> confdefs.h <<\EOF
-#define XP_MACOSX 1
-EOF
 
         OS_TARGET=MacOSX
 
@@ -4845,8 +4842,6 @@
 
 
 case $target in
-*-darwin*)
-    ;;
 *)
     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
 echo "configure:4853: checking for dlopen in -ldl" >&5
diff -ruN mozilla-orig/nsprpub/pr/include/md/_darwin.h mozilla/nsprpub/pr/include/md/_darwin.h
--- mozilla-orig/nsprpub/pr/include/md/_darwin.h	Wed Nov 26 20:30:44 2003
+++ mozilla/nsprpub/pr/include/md/_darwin.h	Sat Jun 24 08:53:01 2006
@@ -55,7 +55,8 @@
 
 #undef  HAVE_STACK_GROWING_UP
 #define HAVE_DLL
-#define USE_MACH_DYLD
+/* #define USE_MACH_DYLD */
+#define USE_DLFCN
 #define _PR_HAVE_SOCKADDR_LEN  
 #define _PR_STAT_HAS_ST_ATIMESPEC
 #define _PR_NO_LARGE_FILES
diff -ruN mozilla-orig/nsprpub/pr/src/Makefile.in mozilla/nsprpub/pr/src/Makefile.in
--- mozilla-orig/nsprpub/pr/src/Makefile.in	Mon Mar 22 19:40:17 2004
+++ mozilla/nsprpub/pr/src/Makefile.in	Sat Jun 24 08:53:01 2006
@@ -199,9 +199,9 @@
 endif
 endif
 
-ifeq ($(OS_TARGET),MacOSX)
-OS_LIBS		= -framework CoreServices -framework CoreFoundation
-endif
+#ifeq ($(OS_TARGET),MacOSX)
+#OS_LIBS		= -framework CoreServices -framework CoreFoundation
+#endif
 
 ifdef GC_LEAK_DETECTOR
 EXTRA_LIBS	= -L$(dist_libdir) -lboehm
diff -ruN mozilla-orig/nsprpub/pr/src/linking/prlink.c mozilla/nsprpub/pr/src/linking/prlink.c
--- mozilla-orig/nsprpub/pr/src/linking/prlink.c	Tue Jan 20 14:46:21 2004
+++ mozilla/nsprpub/pr/src/linking/prlink.c	Sat Jun 24 08:53:01 2006
@@ -164,7 +164,8 @@
 #if defined(SUNOS4) || defined(DARWIN) || defined(NEXTSTEP) \
     || defined(WIN16) || defined(XP_OS2) \
     || ((defined(OPENBSD) || defined(NETBSD)) && !defined(__ELF__))
-#define NEED_LEADING_UNDERSCORE
+/* On MacOSX 10.3, dlsym does not accept symbols with '_'. */
+/* #define NEED_LEADING_UNDERSCORE */
 #endif
 
 #ifdef XP_PC
diff -ruN mozilla-orig/security/nss/lib/pki1/oiddata.h mozilla/security/nss/lib/pki1/oiddata.h
--- mozilla-orig/security/nss/lib/pki1/oiddata.h	Wed Feb  1 19:25:18 2006
+++ mozilla/security/nss/lib/pki1/oiddata.h	Sat Jun 24 08:53:01 2006
@@ -39,6 +39,9 @@
 static const char OIDDATA_CVS_ID[] = "@(#) $RCSfile: oiddata.h,v $ $Revision: 1.1.156.1 $ $Date: 2006/02/02 00:25:18 $ $Name: FIREFOX_1_0_8_RELEASE $ ; @(#) $RCSfile: oiddata.h,v $ $Revision: 1.1.156.1 $ $Date: 2006/02/02 00:25:18 $ $Name: FIREFOX_1_0_8_RELEASE $";
 #endif /* DEBUG */
 
+/* added to fix building on Tiger/gcc4 (bug 284386) */
+/* fixed for 1.1, so remove this block from the patch for 1.1*/
+#include "pki1t.h"
 #ifndef NSSPKI1T_H
 #include "nsspki1t.h"
 #endif /* NSSPKI1T_H */
diff -ruN mozilla-orig/themes/Makefile.in mozilla/themes/Makefile.in
--- mozilla-orig/themes/Makefile.in	Sun May 16 14:16:49 2004
+++ mozilla/themes/Makefile.in	Sat Jun 24 08:53:01 2006
@@ -54,7 +54,9 @@
 
 # select classic as the default skin
 libs::
-	echo skin,install,select,classic/1.0 >> $(DIST)/bin/chrome/installed-chrome.txt
+# fix later
+#	echo skin,install,select,classic/1.0 >> $(DIST)/bin/chrome/installed-chrome.txt
 
 install::
-	echo skin,install,select,classic/1.0 >> $(DESTDIR)$(mozappdir)/chrome/installed-chrome.txt
+# fix later
+#	echo skin,install,select,classic/1.0 >> $(DESTDIR)$(mozappdir)/chrome/installed-chrome.txt
