MOZILLA= firefox3 # allow coexisting with firefox2
COMMENT= Lightweight gecko-based web browser
+USE_DESTDIR = full # FIXME: remove this after
+
PKG_DESTDIR_SUPPORT= user-destdir
MOZILLA_USE_GTK2= # yes
$NetBSD: patch-ab,v 1.2 2008/09/16 11:24:58 tnn Exp $
---- configure.in.orig 2008-06-25 00:51:17.000000000 +0200
+--- configure.in.orig 2008-11-22 04:37:59.000000000 +0900
+++ configure.in
-@@ -1682,7 +1682,7 @@ case "$target" in
+@@ -1521,10 +1521,9 @@ case "$host" in
+ ;;
+
+ *-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}"
+- MOZ_FIX_LINK_PATHS='-Wl,-executable_path,$(LIBXUL_DIST)/bin'
+ LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL -lobjc'
+ ;;
+
+@@ -1670,10 +1669,10 @@ case "$target" in
+ MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
+ MOZ_OPTIMIZE_FLAGS="-O2"
+ _PEDANTIC=
+- CFLAGS="$CFLAGS -fpascal-strings -fno-common"
+- CXXFLAGS="$CXXFLAGS -fpascal-strings -fno-common"
++ CFLAGS="$CFLAGS -fno-common"
++ CXXFLAGS="$CXXFLAGS -fno-common"
+ DLL_SUFFIX=".dylib"
+- DSO_LDOPTS=''
++ DSO_LDOPTS='-framework CoreFoundation'
+ STRIP="$STRIP -x -S"
+ _PLATFORM_DEFAULT_TOOLKIT='cairo-cocoa'
+ MOZ_ENABLE_POSTSCRIPT=
+@@ -1700,7 +1699,7 @@ case "$target" in
LDFLAGS=$_SAVE_LDFLAGS
;;
if test `test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` != "elf"; then
DLL_SUFFIX=".so.1.0"
DSO_LDOPTS="-shared"
-@@ -1696,6 +1696,9 @@ case "$target" in
+@@ -1714,6 +1713,9 @@ case "$target" in
# MKSHLIB_FORCE_ALL='-Wl,-Bforcearchive'
# MKSHLIB_UNFORCE_ALL=''
# fi
;;
*-hpux*)
-@@ -2212,8 +2215,15 @@ case "$target" in
+@@ -2230,8 +2232,15 @@ case "$target" in
if test "$LIBRUNPATH"; then
DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS"
fi
*-openvms*)
AC_DEFINE(NO_PW_GECOS)
AC_DEFINE(NO_UDSOCK)
-@@ -6116,7 +6126,7 @@ dnl ====================================
+@@ -6142,7 +6151,7 @@ dnl ====================================
dnl = Enable code optimization. ON by default.
dnl ========================================================
if test -z "$MOZ_OPTIMIZE_FLAGS"; then
--- /dev/null
+$NetBSD$
+
+--- nsprpub/pr/include/md/_darwin.h.orig 2009-02-03 23:16:39.000000000 +0900
++++ nsprpub/pr/include/md/_darwin.h
+@@ -62,7 +62,7 @@
+
+ #undef HAVE_STACK_GROWING_UP
+ #define HAVE_DLL
+-#define USE_MACH_DYLD
++#define USE_DLFCN
+ #define _PR_HAVE_SOCKADDR_LEN
+ #define _PR_STAT_HAS_ST_ATIMESPEC
+ #define _PR_HAVE_LARGE_OFF_T
--- /dev/null
+$NetBSD$
+
+--- nsprpub/pr/src/Makefile.in.orig 2009-02-03 23:17:52.000000000 +0900
++++ nsprpub/pr/src/Makefile.in
+@@ -210,10 +210,6 @@ OS_LIBS = advapi32.lib wsock32.lib winm
+ endif
+ endif
+
+-ifeq ($(OS_TARGET),MacOSX)
+-OS_LIBS = -framework CoreServices -framework CoreFoundation
+-endif
+-
+ ifdef GC_LEAK_DETECTOR
+ EXTRA_LIBS = -L$(dist_libdir) -lboehm
+ endif
--- /dev/null
+$NetBSD$
+
+--- nsprpub/pr/src/linking/prlink.c.orig 2009-02-03 23:19:38.000000000 +0900
++++ nsprpub/pr/src/linking/prlink.c
+@@ -155,7 +155,7 @@ struct _imcb *IAC$GL_IMAGE_LIST = NULL;
+ /*
+ * On these platforms, symbols have a leading '_'.
+ */
+-#if defined(SUNOS4) || defined(DARWIN) || defined(NEXTSTEP) \
++#if defined(SUNOS4) || defined(NEXTSTEP) \
+ || defined(WIN16) || defined(XP_OS2) \
+ || ((defined(OPENBSD) || defined(NETBSD)) && !defined(__ELF__))
+ #define NEED_LEADING_UNDERSCORE
--- /dev/null
+$NetBSD$
+
+--- nsprpub/pr/include/md/_darwin.h.orig 2009-02-03 23:16:39.000000000 +0900
++++ nsprpub/pr/include/md/_darwin.h
+@@ -62,7 +62,7 @@
+
+ #undef HAVE_STACK_GROWING_UP
+ #define HAVE_DLL
+-#define USE_MACH_DYLD
++#define USE_DLFCN
+ #define _PR_HAVE_SOCKADDR_LEN
+ #define _PR_STAT_HAS_ST_ATIMESPEC
+ #define _PR_HAVE_LARGE_OFF_T
--- /dev/null
+$NetBSD$
+
+--- nsprpub/pr/src/Makefile.in.orig 2009-02-03 23:17:52.000000000 +0900
++++ nsprpub/pr/src/Makefile.in
+@@ -210,10 +210,6 @@ OS_LIBS = advapi32.lib wsock32.lib winm
+ endif
+ endif
+
+-ifeq ($(OS_TARGET),MacOSX)
+-OS_LIBS = -framework CoreServices -framework CoreFoundation
+-endif
+-
+ ifdef GC_LEAK_DETECTOR
+ EXTRA_LIBS = -L$(dist_libdir) -lboehm
+ endif
--- /dev/null
+$NetBSD$
+
+--- nsprpub/pr/src/linking/prlink.c.orig 2009-02-03 23:19:38.000000000 +0900
++++ nsprpub/pr/src/linking/prlink.c
+@@ -155,7 +155,7 @@ struct _imcb *IAC$GL_IMAGE_LIST = NULL;
+ /*
+ * On these platforms, symbols have a leading '_'.
+ */
+-#if defined(SUNOS4) || defined(DARWIN) || defined(NEXTSTEP) \
++#if defined(SUNOS4) || defined(NEXTSTEP) \
+ || defined(WIN16) || defined(XP_OS2) \
+ || ((defined(OPENBSD) || defined(NETBSD)) && !defined(__ELF__))
+ #define NEED_LEADING_UNDERSCORE
--- /dev/null
+$NetBSD$
+
+--- nsprpub/pr/include/md/_darwin.h.orig 2009-02-03 23:16:39.000000000 +0900
++++ nsprpub/pr/include/md/_darwin.h
+@@ -62,7 +62,7 @@
+
+ #undef HAVE_STACK_GROWING_UP
+ #define HAVE_DLL
+-#define USE_MACH_DYLD
++#define USE_DLFCN
+ #define _PR_HAVE_SOCKADDR_LEN
+ #define _PR_STAT_HAS_ST_ATIMESPEC
+ #define _PR_HAVE_LARGE_OFF_T
--- /dev/null
+$NetBSD$
+
+--- nsprpub/pr/src/Makefile.in.orig 2009-02-03 23:17:52.000000000 +0900
++++ nsprpub/pr/src/Makefile.in
+@@ -210,10 +210,6 @@ OS_LIBS = advapi32.lib wsock32.lib winm
+ endif
+ endif
+
+-ifeq ($(OS_TARGET),MacOSX)
+-OS_LIBS = -framework CoreServices -framework CoreFoundation
+-endif
+-
+ ifdef GC_LEAK_DETECTOR
+ EXTRA_LIBS = -L$(dist_libdir) -lboehm
+ endif
--- /dev/null
+$NetBSD$
+
+--- nsprpub/pr/src/linking/prlink.c.orig 2009-02-03 23:19:38.000000000 +0900
++++ nsprpub/pr/src/linking/prlink.c
+@@ -155,7 +155,7 @@ struct _imcb *IAC$GL_IMAGE_LIST = NULL;
+ /*
+ * On these platforms, symbols have a leading '_'.
+ */
+-#if defined(SUNOS4) || defined(DARWIN) || defined(NEXTSTEP) \
++#if defined(SUNOS4) || defined(NEXTSTEP) \
+ || defined(WIN16) || defined(XP_OS2) \
+ || ((defined(OPENBSD) || defined(NETBSD)) && !defined(__ELF__))
+ #define NEED_LEADING_UNDERSCORE
--- /dev/null
+$NetBSD$
+
+--- security/coreconf/Darwin.mk.orig 2009-02-03 23:53:52.000000000 +0900
++++ security/coreconf/Darwin.mk
+@@ -115,7 +115,7 @@ ARCH = darwin
+
+ DSO_CFLAGS = -fPIC
+ # May override this with -bundle to create a loadable module.
+-DSO_LDOPTS = -dynamiclib -compatibility_version 1 -current_version 1 -install_name @executable_path/$(notdir $@) -headerpad_max_install_names
++DSO_LDOPTS = -dynamiclib -compatibility_version 1 -current_version 1 -install_name $(libdir)/$(MOZILLA_PKG_NAME)/$(notdir $@)
+
+ MKSHLIB = $(CC) $(DSO_LDOPTS) $(DARWIN_SDK_SHLIBFLAGS)
+ DLL_SUFFIX = dylib
--- /dev/null
+$NetBSD$
+
+--- security/nss/lib/freebl/config.mk.orig 2009-02-03 23:57:34.000000000 +0900
++++ security/nss/lib/freebl/config.mk
+@@ -111,7 +111,7 @@ EXTRA_SHARED_LIBS += \
+ endif
+
+ ifeq ($(OS_ARCH), Darwin)
+-EXTRA_SHARED_LIBS += -dylib_file @executable_path/libplc4.dylib:$(DIST)/lib/libplc4.dylib -dylib_file @executable_path/libplds4.dylib:$(DIST)/lib/libplds4.dylib
++EXTRA_SHARED_LIBS += -dylib_file $(libdir)/$(MOZILLA_PKG_NAME)/libplc4.dylib:$(DIST)/lib/libplc4.dylib -dylib_file $(libdir)/$(MOZILLA_PKG_NAME)/libplds4.dylib:$(DIST)/lib/libplds4.dylib
+ endif
+
+ endif
$NetBSD: patch-bo,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
diff -ruN ../Orig/mozilla/nsprpub/configure.in ./nsprpub/configure.in
---- ../Orig/mozilla/nsprpub/configure.in 2005-09-16 07:37:52.000000000 +0900
-+++ ./nsprpub/configure.in 2005-12-04 19:17:56.000000000 +0900
-@@ -57,7 +57,7 @@
+--- nsprpub/configure.in.orig 2008-04-29 08:21:11.000000000 +0900
++++ nsprpub/configure.in
+@@ -62,7 +62,7 @@ USE_CPLUS=
USE_IPV6=
USE_MDUPDATE=
_MACOSX_DEPLOYMENT_TARGET=
_DEBUG_FLAGS=-g
MOZ_DEBUG=1
MOZ_OPTIMIZE=
-@@ -1045,6 +1045,34 @@
+@@ -1010,7 +1010,7 @@ case "$target" in
+ ;;
+ esac
+ DSO_CFLAGS=-fPIC
+- DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
++ DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name $(libdir)/$(MOZILLA_PKG_NAME)/$@'
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ STRIP="$STRIP -x -S"
+ DLL_SUFFIX=dylib
+@@ -1020,7 +1020,6 @@ case "$target" in
+
+ # Add Mac OS X support for loading CFM & CFBundle plugins
+ if test -f /System/Library/Frameworks/Carbon.framework/Carbon; then
+- AC_DEFINE(XP_MACOSX)
+ OS_TARGET=MacOSX
+
+ if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
+@@ -1177,6 +1176,34 @@ tools are selected during the Xcode/Deve
DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
MDCPUCFG_H=_freebsd.cfg
PR_MD_CSRCS=freebsd.c
;;
*-hpux*)
-@@ -1544,6 +1572,7 @@
+@@ -1726,6 +1753,7 @@ mips-nec-sysv*)
AC_DEFINE(XP_UNIX)
AC_DEFINE(NETBSD)
AC_DEFINE(HAVE_BSD_FLOCK)
USE_NSPR_THREADS=1
MDCPUCFG_H=_netbsd.cfg
PR_MD_CSRCS=netbsd.c
-@@ -2307,7 +2336,7 @@
+@@ -2248,8 +2276,6 @@ dnl since it's not used and not part of
+ dnl The same goes for BeOS.
+
+ case $target in
+-*-darwin*|*-beos*)
+- ;;
+ *)
+ AC_CHECK_LIB(dl, dlopen,
+ AC_CHECK_HEADER(dlfcn.h,
+@@ -2490,7 +2516,7 @@ if test -n "$USE_PTHREADS"; then
if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
ac_cv_have_dash_pthread=yes
case "$target_os" in
# Freebsd doesn't use -pthread for compiles, it uses them for linking
;;
*)
-@@ -2345,7 +2374,7 @@
+@@ -2528,7 +2554,7 @@ if test -n "$USE_PTHREADS"; then
_PTHREAD_LDFLAGS=
fi
;;
AC_DEFINE(_REENTRANT)
AC_DEFINE(_THREAD_SAFE)
dnl -pthread links in -lc_r, so don't specify it explicitly.
-@@ -2426,7 +2455,7 @@
+@@ -2609,7 +2635,7 @@ case "$target" in
AC_DEFINE(_PR_NEED_PTHREAD_INIT)
fi
;;
$NetBSD: patch-dr,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
diff -ruN ../Orig/mozilla/config/config.mk ./config/config.mk
---- ../Orig/mozilla/config/config.mk 2005-07-29 04:48:11.000000000 +0900
-+++ ./config/config.mk 2005-12-04 19:45:20.000000000 +0900
-@@ -121,7 +121,7 @@
+--- config/config.mk.orig 2008-08-14 19:00:34.000000000 +0900
++++ config/config.mk
+@@ -131,7 +131,7 @@ endif
# but save the version to allow multiple versions of the same base
# platform to be built in the same tree.
#
OS_RELEASE := $(basename $(OS_RELEASE))
# Allow the user to ignore the OS_VERSION, which is usually irrelevant.
+@@ -675,7 +675,7 @@ endif
+ 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 # USE_PREBINDING
+ ifdef NEXT_ROOT
+ export NEXT_ROOT
+@@ -752,7 +752,7 @@ MOZ_COMPONENTLIB_EXTRA_DSO_LIBS = mozcom
+ # Tell the linker where NSS is, if we're building crypto
+ ifeq ($(OS_ARCH),Darwin)
+ ifeq (,$(findstring crypto,$(MOZ_META_COMPONENTS)))
+-MOZ_COMPONENTLIB_EXTRA_LIBS = $(foreach library, $(patsubst -l%, $(LIB_PREFIX)%$(DLL_SUFFIX), $(filter -l%, $(NSS_LIBS))), -dylib_file @executable_path/$(library):$(DIST)/bin/$(library))
++MOZ_COMPONENTLIB_EXTRA_LIBS = $(foreach library, $(patsubst -l%, $(LIB_PREFIX)%$(DLL_SUFFIX), $(filter -l%, $(NSS_LIBS))), -dylib_file $(libdir)/$(MOZILLA_PKG_NAME)/$(library):$(DIST)/bin/$(library))
+ endif
+ endif
+ endif
$NetBSD: patch-du,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
diff -ruN ../Orig/mozilla/config/rules.mk ./config/rules.mk
---- ../Orig/mozilla/config/rules.mk 2005-10-11 08:16:39.000000000 +0900
-+++ ./config/rules.mk 2005-12-04 19:45:31.000000000 +0900
-@@ -447,6 +447,12 @@
+--- config/rules.mk.orig 2008-06-25 08:29:46.000000000 +0900
++++ config/rules.mk
+@@ -450,7 +450,7 @@ ifdef SHARED_LIBRARY
+ ifdef IS_COMPONENT
+ EXTRA_DSO_LDOPTS += -bundle
+ else
+-EXTRA_DSO_LDOPTS += -dynamiclib -install_name @executable_path/$(SHARED_LIBRARY) -compatibility_version 1 -current_version 1 -single_module
++EXTRA_DSO_LDOPTS += -dynamiclib -install_name $(installdir)/$(SHARED_LIBRARY) -compatibility_version 1 -current_version 1 -single_module
+ endif
+ endif
+ endif
+@@ -473,6 +473,12 @@ EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
endif
endif