diff options
author | beat <beat@FreeBSD.org> | 2011-03-22 23:24:49 +0800 |
---|---|---|
committer | beat <beat@FreeBSD.org> | 2011-03-22 23:24:49 +0800 |
commit | 883f88c6e37fa5007eb3f203e12c164d53db6290 (patch) | |
tree | 2728737074c90915696d839c8ecd76b5fac8817f /www | |
parent | 3957111d77b585bc1375d9c716b11b72db46a43c (diff) | |
download | freebsd-ports-gnome-883f88c6e37fa5007eb3f203e12c164d53db6290.tar.gz freebsd-ports-gnome-883f88c6e37fa5007eb3f203e12c164d53db6290.tar.zst freebsd-ports-gnome-883f88c6e37fa5007eb3f203e12c164d53db6290.zip |
- Update to 4.0
- Add PGO option to enable Profile-Guided Optimization [1].
PR: ports/132231 [1] (based on)
Submitted by: lioux@ [1]
Thanks to: andreast@, Anonymous <swell.k AT gmail.com>, decke@, jsa@,
swills@ and all the testers for their feedback!
Diffstat (limited to 'www')
52 files changed, 778 insertions, 486 deletions
diff --git a/www/firefox-esr/Makefile b/www/firefox-esr/Makefile index 785f030f2ca9..05e2e5b11a52 100644 --- a/www/firefox-esr/Makefile +++ b/www/firefox-esr/Makefile @@ -6,7 +6,7 @@ # PORTNAME= firefox -DISTVERSION= 3.6.15 +DISTVERSION= 4.0 PORTEPOCH= 1 CATEGORIES= www ipv6 MASTER_SITES= ${MASTER_SITE_MOZILLA} @@ -16,15 +16,12 @@ DISTNAME= ${PORTNAME}-${DISTVERSION}.source MAINTAINER= gecko@FreeBSD.org COMMENT= Web browser based on the browser portion of Mozilla -BUILD_DEPENDS= nspr>=4.8.6:${PORTSDIR}/devel/nspr +BUILD_DEPENDS= nspr>=4.8.7:${PORTSDIR}/devel/nspr USE_AUTOTOOLS= autoconf213 USE_GECKO= gecko MOZ_PKGCONFIG_FILES= # empty -USE_MOZILLA= -png -nss -dbm -jpeg -xft -cairo -MOZILLA_NAME= Firefox${MOZILLA_SUFX} -MOZILLA_SUFX= 3 -MOZILLA= ${PORTNAME}${MOZILLA_SUFX} +USE_MOZILLA= -png -nss -dbm -jpeg -xft MOZ_TOOLKIT= cairo-gtk2 GECKO_PLIST_PRE_DIRS= lib/${MOZILLA}/bin lib/${MOZILLA}/idl \ lib/${MOZILLA}/include lib/${MOZILLA}/lib @@ -37,9 +34,9 @@ EXTRA_CFLAGS= -O2 HAS_CONFIGURE= yes USE_BZIP2= yes USE_GMAKE= yes +USE_GL= gl MAKE_JOBS_SAFE= yes NO_MOZPKGINSTALL=yes -CONFLICTS_INSTALL= firefox-3.5.* FIREFOX_ICON= ${MOZILLA}.png FIREFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default48.png @@ -52,27 +49,12 @@ MOZ_OPTIONS= --program-transform-name='s/firefox/${MOZILLA}/' \ --disable-ipc OPTIONS= DBUS "Enable D-BUS support" on \ + PGO "Enable Profile-Guided Optimization" off \ SMB "Enable smb:// URI support using gnomevfs" off .include <bsd.port.pre.mk> -.if ${OSVERSION} < 700000 -LIB_DEPENDS+= pulse.0:${PORTSDIR}/audio/pulseaudio -EXTRA_PATCHES= ${FILESDIR}/releng6_pulseaudio -.else -EXTRA_PATCHES= ${FILESDIR}/libsydney_oss -.endif - -.if ${ARCH} == powerpc64 -.if ${OSVERSION} < 900033 -BROKEN= Needs binutils 2.17.50 to build -.else -CONFIGURE_ENV+= UNAME_m="powerpc64" -CFLAGS+= -mminimal-toc -.endif -.endif - -WRKSRC:= ${WRKSRC}-1.9.2 +WRKSRC:= ${WRKSRC}-2.0 GECKO_PTHREAD_LIBS!=${CC} -dumpspecs | ${GREP} -m 1 '%{\!pg: %{pthread:' | ${SED} -e 's|^.*%{\!pg: %{pthread:|| ; s|}.*$$||' || ${TRUE} @@ -90,6 +72,34 @@ LIB_DEPENDS+= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib \ notify.1:${PORTSDIR}/devel/libnotify .endif +.if defined(WITH_PGO) +BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3 +USE_PYTHON_BUILD= yes +USE_DISPLAY= yes +.include "${PORTSDIR}/Mk/bsd.python.mk" + +MAKEFILE= client.mk +ALL_TARGET= profiledbuild +.endif + +.if ${ARCH} == amd64 || ${ARCH} == i386 +BUILD_DEPENDS+= yasm:${PORTSDIR}/devel/yasm +.endif + +pre-extract: +.if defined(WITH_PGO) + @${ECHO} "*****************************************************************" + @${ECHO} "**************************** attention **************************" + @${ECHO} "*****************************************************************" + @${ECHO} "To build Firefox with PGO support you need a running X server and" + @${ECHO} " build this port with an user who could access the X server! " + @${ECHO} "" + @${ECHO} "During the build a Firefox instance will start and run some test." + @${ECHO} " Do not interrupt or close Firefox during this tests! " + @${ECHO} "*****************************************************************" + @sleep 10 +.endif + post-extract:: @${SED} -e 's|@FIREFOX_ICON@|${FIREFOX_ICON}|' -e 's|@MOZILLA@|${MOZILLA}|' \ -e 's|@MOZILLA_NAME@|${MOZILLA_NAME}|' \ @@ -98,6 +108,7 @@ post-extract:: post-patch: ${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS:C/-pthread/${GECKO_PTHREAD_LIBS}/}|' \ ${WRKSRC}/storage/build/Makefile.in \ + ${WRKSRC}/toolkit/library/Makefile.in \ ${WRKSRC}/db/sqlite3/src/Makefile.in @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ ${WRKSRC}/security/manager/ssl/src/Makefile.in \ @@ -113,8 +124,15 @@ pre-configure: (cd ${WRKSRC} && ${AUTOCONF}) (cd ${WRKSRC}/js/src/ && ${AUTOCONF}) +post-configure: +.if defined(WITH_PGO) + @${SED} -e 's|@PYTHON@|${PYTHON_CMD}|' \ + <${FILESDIR}/mozconfig-profile_guided_optimization.in \ + >> ${BUILD_WRKSRC}/.mozconfig + (cd ${WRKSRC} && ${GMAKE} distclean) +.endif + port-pre-install: -# ${SED} -e 's|1.9a7|0|' ${WRKSRC}/dist/bin/application.ini ${FAKEDIR}/lib ${ECHO_CMD} 'share/applications/${MOZILLA}.desktop' >> ${PLISTF} ${ECHO_CMD} "@dirrmtry share/applications" >> ${PLISTD} ${ECHO_CMD} 'share/pixmaps/${FIREFOX_ICON}' >> ${PLISTF} diff --git a/www/firefox-esr/distinfo b/www/firefox-esr/distinfo index 7c33c67f6708..ba6a9a53f31d 100644 --- a/www/firefox-esr/distinfo +++ b/www/firefox-esr/distinfo @@ -1,2 +1,2 @@ -SHA256 (firefox-3.6.15.source.tar.bz2) = 405aa411a8ddb456017564522cbb486850e34fe14485b1c31fa93fc5c750870f -SIZE (firefox-3.6.15.source.tar.bz2) = 51552828 +SHA256 (firefox-4.0.source.tar.bz2) = 78b1e0a66be3604af49b81193e557c27ffaee16b8c26fead052455dd42c9150f +SIZE (firefox-4.0.source.tar.bz2) = 66024327 diff --git a/www/firefox-esr/files/libsydney_oss b/www/firefox-esr/files/libsydney_oss deleted file mode 100644 index dcef3abdab96..000000000000 --- a/www/firefox-esr/files/libsydney_oss +++ /dev/null @@ -1,15 +0,0 @@ ---- media/libsydneyaudio/src/Makefile.in.orig 2009-08-11 16:28:21.000000000 +0200 -+++ media/libsydneyaudio/src/Makefile.in 2009-08-11 16:29:08.000000000 +0200 -@@ -45,6 +45,12 @@ - LIBRARY_NAME = sydneyaudio - FORCE_STATIC_LIB= 1 - -+ifeq ($(OS_ARCH),FreeBSD) -+CSRCS = \ -+ sydney_audio_oss.c \ -+ $(NULL) -+endif -+ - ifeq ($(OS_ARCH),Linux) - CSRCS = \ - sydney_audio_alsa.c \ diff --git a/www/firefox-esr/files/mozconfig-profile_guided_optimization.in b/www/firefox-esr/files/mozconfig-profile_guided_optimization.in new file mode 100644 index 000000000000..5caba0f4196d --- /dev/null +++ b/www/firefox-esr/files/mozconfig-profile_guided_optimization.in @@ -0,0 +1 @@ +mk_add_options PROFILE_GEN_SCRIPT='@PYTHON@ $(OBJDIR)/_profile/pgo/profileserver.py' diff --git a/www/firefox-esr/files/patch-build-pgo-profileserver.py b/www/firefox-esr/files/patch-build-pgo-profileserver.py new file mode 100644 index 000000000000..0571eb19903d --- /dev/null +++ b/www/firefox-esr/files/patch-build-pgo-profileserver.py @@ -0,0 +1,18 @@ +--- build/pgo/profileserver.py.orig 2011-02-24 21:49:47.000000000 +0100 ++++ build/pgo/profileserver.py 2011-02-24 21:50:30.000000000 +0100 +@@ -77,13 +77,13 @@ + t.setDaemon(True) # don't hang on exit + t.start() + +- automation.setServerInfo("localhost", PORT) ++ automation.setServerInfo("127.0.0.1", PORT) + automation.initializeProfile(PROFILE_DIRECTORY) + browserEnv = automation.environment() + browserEnv["XPCOM_DEBUG_BREAK"] = "warn" + browserEnv["MOZ_JAR_LOG_DIR"] = MOZ_JAR_LOG_DIR + +- url = "http://localhost:%d/index.html" % PORT ++ url = "http://127.0.0.1:%d/index.html" % PORT + appPath = os.path.join(SCRIPT_DIR, automation.DEFAULT_APP) + status = automation.runApp(url, browserEnv, appPath, PROFILE_DIRECTORY, {}, + debuggerInfo=debuggerInfo, diff --git a/www/firefox-esr/files/patch-configure.in b/www/firefox-esr/files/patch-configure.in index 5ba21ea8bc53..d36a535358ab 100644 --- a/www/firefox-esr/files/patch-configure.in +++ b/www/firefox-esr/files/patch-configure.in @@ -1,6 +1,6 @@ ---- configure.in.orig 2009-10-03 20:24:11.000000000 +0200 -+++ configure.in 2009-10-03 20:24:43.000000000 +0200 -@@ -1352,7 +1352,7 @@ +--- configure.in.orig 2010-11-04 21:05:18.000000000 +0100 ++++ configure.in 2010-11-09 12:59:28.000000000 +0100 +@@ -1549,7 +1549,7 @@ CPU_ARCH=sparc ;; @@ -9,3 +9,63 @@ CPU_ARCH="$OS_TEST" ;; +@@ -1567,7 +1567,7 @@ dnl Set INTEL_ARCHITECTURE if we're comp + dnl =============================================================== + INTEL_ARCHITECTURE= + case "$OS_TEST" in +- x86_64|i?86) ++ amd64|x86_64|i?86) + INTEL_ARCHITECTURE=1 + esac + +@@ -3803,19 +3803,21 @@ + AC_CHECK_FUNCS(localtime_r strtok_r) + + dnl check for clock_gettime(), the CLOCK_MONOTONIC clock, and -lrt +-_SAVE_LDFLAGS=$LDFLAGS +-LDFLAGS="$LDFLAGS -lrt" +-AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC) and -lrt, ++_SAVE_LIBS=$LIBS ++AC_SEARCH_LIBS(clock_gettime, rt) ++AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC), + ac_cv_have_clock_monotonic, + [AC_TRY_LINK([#include <time.h>], + [ struct timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); ], + ac_cv_have_clock_monotonic=yes, + ac_cv_have_clock_monotonic=no)]) +-LDFLAGS=$_SAVE_LDFLAGS ++LIBS=$_SAVE_LIBS + if test "$ac_cv_have_clock_monotonic" = "yes"; then + HAVE_CLOCK_MONOTONIC=1 +- REALTIME_LIBS=-lrt ++ if test "$ac_cv_search_clock_gettime" != "none required"; then ++ REALTIME_LIBS=$ac_cv_search_clock_gettime ++ fi + AC_DEFINE(HAVE_CLOCK_MONOTONIC) + AC_SUBST(HAVE_CLOCK_MONOTONIC) + AC_SUBST(REALTIME_LIBS) +@@ -4808,7 +4810,7 @@ CFLAGS=$_SAVE_CFLAGS + LDFLAGS=$_SAVE_LDFLAGS + LIBS=$_SAVE_LIBS + +-if test "${ZLIB_DIR}" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then ++if test "${ZLIB_DIR}" -a "${ZLIB_DIR}" != "/usr" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then + ZLIB_CFLAGS="-I${ZLIB_DIR}/include" + ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_LIBS}" + fi +@@ -6022,6 +6024,14 @@ + VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC" + VPX_X86_ASM=1 + ;; ++ FreeBSD:i386) ++ VPX_ASFLAGS="-f elf32 -rnasm -pnasm" ++ VPX_X86_ASM=1 ++ ;; ++ FreeBSD:amd64) ++ VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC" ++ VPX_X86_ASM=1 ++ ;; + SunOS:x86) + VPX_ASFLAGS="-f elf32 -rnasm -pnasm" + VPX_X86_ASM=1 diff --git a/www/firefox-esr/files/patch-gfx-qcms-Makefile.in b/www/firefox-esr/files/patch-gfx-qcms-Makefile.in new file mode 100644 index 000000000000..cc7414a33fe7 --- /dev/null +++ b/www/firefox-esr/files/patch-gfx-qcms-Makefile.in @@ -0,0 +1,11 @@ +--- gfx/qcms/Makefile.in.orig 2011-01-22 01:25:38.000000000 +0100 ++++ gfx/qcms/Makefile.in 2011-01-27 18:16:39.000000000 +0100 +@@ -15,7 +15,7 @@ + + CSRCS = iccread.c transform.c + +-ifeq (86,$(findstring 86,$(OS_TEST))) ++ifneq (,$(INTEL_ARCHITECTURE)) + CSRCS += transform-sse2.c + ifdef _MSC_VER + ifneq ($(OS_ARCH)_$(OS_TEST),WINNT_x86_64) diff --git a/www/firefox-esr/files/patch-gfx-qcms-qcmstypes.h b/www/firefox-esr/files/patch-gfx-qcms-qcmstypes.h new file mode 100644 index 000000000000..33d9e3356b77 --- /dev/null +++ b/www/firefox-esr/files/patch-gfx-qcms-qcmstypes.h @@ -0,0 +1,11 @@ +--- gfx/qcms/qcmstypes.h.orig 2010-11-22 12:01:36.000000000 +0100 ++++ gfx/qcms/qcmstypes.h 2010-11-22 12:02:42.000000000 +0100 +@@ -25,7 +25,7 @@ + #ifdef __OS2__ + /* OS/2's stdlib typdefs uintptr_t. So we'll just include that so we don't collide */ + #include <stdlib.h> +-#elif !defined(__intptr_t_defined) && !defined(_UINTPTR_T_DEFINED) ++#elif !defined(__intptr_t_defined) && !defined(_INTPTR_T_DECLARED) + typedef PRUptrdiff uintptr_t; + #endif + #endif diff --git a/www/firefox-esr/files/patch-js-ctypes-libffi-configure b/www/firefox-esr/files/patch-js-ctypes-libffi-configure deleted file mode 100644 index 3f6b66e1d628..000000000000 --- a/www/firefox-esr/files/patch-js-ctypes-libffi-configure +++ /dev/null @@ -1,12 +0,0 @@ ---- js/ctypes/libffi/configure.orig 2010-07-22 23:54:58.000000000 +0200 -+++ js/ctypes/libffi/configure 2010-08-05 07:34:44.000000000 +0200 -@@ -21033,6 +21033,9 @@ - powerpc-*-aix* | rs6000-*-aix*) - TARGET=POWERPC_AIX; TARGETDIR=powerpc - ;; -+ powerpc64-*-freebsd*) -+ TARGET=POWERPC; TARGETDIR=powerpc -+ ;; - powerpc-*-freebsd*) - TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc - ;; diff --git a/www/firefox-esr/files/patch-js-src-Makefile.in b/www/firefox-esr/files/patch-js-src-Makefile.in index 751596240adf..1657c655d8c9 100644 --- a/www/firefox-esr/files/patch-js-src-Makefile.in +++ b/www/firefox-esr/files/patch-js-src-Makefile.in @@ -1,10 +1,20 @@ ---- js/src/Makefile.in.orig 2009-05-11 15:21:19.000000000 +0200 -+++ js/src/Makefile.in 2009-05-11 15:21:34.000000000 +0200 -@@ -427,7 +427,7 @@ +--- js/src/Makefile.in.orig 2011-03-17 18:51:39.000000000 +0100 ++++ js/src/Makefile.in 2011-03-18 19:41:09.000000000 +0100 +@@ -612,7 +612,7 @@ + # to reliably get limit macros defined, we'd always have to define the + # one below before including any header, but that's obscure and + # fragile, so we do it here. +-DEFINES += -D__STDC_LIMIT_MACROS ++DEFINES += -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS + + INCLUDES += -I$(srcdir) + +@@ -666,7 +666,8 @@ endif # WINNT ifeq ($(OS_ARCH),FreeBSD) -EXTRA_LIBS += -pthread ++DEFINES += -DFREEBSD +EXTRA_LIBS += -pthread -lc endif ifeq ($(OS_ARCH),IRIX) diff --git a/www/firefox-esr/files/patch-js-src-configure.in b/www/firefox-esr/files/patch-js-src-configure.in index 75f017bc4d68..e8c09d3f82ff 100644 --- a/www/firefox-esr/files/patch-js-src-configure.in +++ b/www/firefox-esr/files/patch-js-src-configure.in @@ -1,13 +1,32 @@ ---- js/src/configure.in.orig 2009-09-21 00:26:58.000000000 +0200 -+++ js/src/configure.in 2009-10-08 07:00:27.000000000 +0200 -@@ -2456,10 +2456,6 @@ - ENABLE_JIT=1 - NANOJIT_ARCH=ARM +--- js/src/configure.in.orig 2010-11-04 21:05:48.000000000 +0100 ++++ js/src/configure.in 2010-11-22 21:30:24.000000000 +0100 +@@ -2621,7 +2621,7 @@ + AC_DEFINE(JS_CPU_X86) + AC_DEFINE(JS_NUNBOX32) + ;; +-x86_64*-*) ++x86_64*-*|amd64*-*) + ENABLE_TRACEJIT=1 + NANOJIT_ARCH=X64 + ENABLE_METHODJIT=1 +@@ -2638,11 +2638,6 @@ + AC_DEFINE(JS_CPU_ARM) + AC_DEFINE(JS_NUNBOX32) ;; -sparc*-*) -- ENABLE_JIT=1 +- ENABLE_TRACEJIT=1 - NANOJIT_ARCH=Sparc +- AC_DEFINE(JS_CPU_SPARC) - ;; esac - MOZ_ARG_DISABLE_BOOL(jit, + MOZ_ARG_DISABLE_BOOL(methodjit, +@@ -2693,7 +2688,7 @@ + i?86-*) + AC_DEFINE(AVMPLUS_IA32) + ;; +-x86_64*-*) ++x86_64*-*|amd64*-*) + AC_DEFINE(AVMPLUS_AMD64) + AC_DEFINE(AVMPLUS_64BIT) + ;; diff --git a/www/firefox-esr/files/patch-js-src-jslock.cpp b/www/firefox-esr/files/patch-js-src-jslock.cpp deleted file mode 100644 index 7aea14d0ebaf..000000000000 --- a/www/firefox-esr/files/patch-js-src-jslock.cpp +++ /dev/null @@ -1,18 +0,0 @@ ---- js/src/jslock.cpp.orig 2009-10-07 20:15:38.000000000 +0200 -+++ js/src/jslock.cpp 2009-10-07 21:36:14.000000000 +0200 -@@ -160,8 +160,13 @@ - unsigned int res; - - __asm__ __volatile__ ( -- "stbar\n" -- "cas [%1],%2,%3\n" -+ "membar #StoreLoad | #LoadLoad\n" -+# if defined (__sparc64__) -+ "casx [%1],%2,%3\n" -+# else -+ "cas [%1],%2,%3\n" /* 32-bit version */ -+# endif -+ "membar #StoreLoad | #LoadLoad\n" - "cmp %2,%3\n" - "be,a 1f\n" - "mov 1,%0\n" diff --git a/www/firefox-esr/files/patch-js-src-jsnativestack.cpp b/www/firefox-esr/files/patch-js-src-jsnativestack.cpp new file mode 100644 index 000000000000..2a461af616a4 --- /dev/null +++ b/www/firefox-esr/files/patch-js-src-jsnativestack.cpp @@ -0,0 +1,12 @@ +--- js/src/jsnativestack.cpp~ ++++ js/src/jsnativestack.cpp +@@ -50,7 +50,8 @@ + #elif defined(XP_MACOSX) || defined(DARWIN) || defined(XP_UNIX) + # include <pthread.h> + +-# if defined(__FreeBSD__) ++# if defined(FREEBSD) ++# include <cstddef> + # include <pthread_np.h> + # endif + diff --git a/www/firefox-esr/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c b/www/firefox-esr/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c deleted file mode 100644 index 66ce3efd66d3..000000000000 --- a/www/firefox-esr/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c +++ /dev/null @@ -1,33 +0,0 @@ ---- media/libsydneyaudio/src/sydney_audio_oss.c.orig 2010-10-12 21:45:53.000000000 +0400 -+++ media/libsydneyaudio/src/sydney_audio_oss.c 2010-10-25 23:33:08.919096567 +0400 -@@ -258,6 +258,7 @@ - int - sa_stream_destroy(sa_stream_t *s) { - int result = SA_SUCCESS; -+ pthread_t thread_id; - - if (s == NULL) { - return SA_SUCCESS; -@@ -265,8 +266,10 @@ - - pthread_mutex_lock(&s->mutex); - -+ thread_id = s->thread_id; -+ - /* -- * This causes the thread sending data to ALSA to stop -+ * This causes the thread sending data to OSS to stop - */ - s->thread_id = 0; - -@@ -281,6 +284,8 @@ - - pthread_mutex_unlock(&s->mutex); - -+ pthread_join(thread_id, NULL); -+ - /* - * Release resources. - */ - - diff --git a/www/firefox-esr/files/patch-media-libvpx-vpx_config.c b/www/firefox-esr/files/patch-media-libvpx-vpx_config.c new file mode 100644 index 000000000000..1cc3dab5b8bb --- /dev/null +++ b/www/firefox-esr/files/patch-media-libvpx-vpx_config.c @@ -0,0 +1,16 @@ +--- media/libvpx/vpx_config_c.c~ ++++ media/libvpx/vpx_config_c.c +@@ -12,11 +12,11 @@ + /* 32 bit MacOS. */ + #include "vpx_config_x86-darwin9-gcc.c" + +-#elif defined(__linux__) && defined(__i386__) ++#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(__i386__) + /* 32 bit Linux. */ + #include "vpx_config_x86-linux-gcc.c" + +-#elif defined(__linux__) && defined(__x86_64__) ++#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(__x86_64__) + /* 64 bit Linux. */ + #include "vpx_config_x86_64-linux-gcc.c" + diff --git a/www/firefox-esr/files/patch-media-libvpx-vpx_config.h b/www/firefox-esr/files/patch-media-libvpx-vpx_config.h new file mode 100644 index 000000000000..d813ca8c608b --- /dev/null +++ b/www/firefox-esr/files/patch-media-libvpx-vpx_config.h @@ -0,0 +1,16 @@ +--- media/libvpx/vpx_config.h~ ++++ media/libvpx/vpx_config.h +@@ -12,11 +12,11 @@ + /* 32 bit MacOS. */ + #include "vpx_config_x86-darwin9-gcc.h" + +-#elif defined(__linux__) && defined(__i386__) ++#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(__i386__) + /* 32 bit Linux. */ + #include "vpx_config_x86-linux-gcc.h" + +-#elif defined(__linux__) && defined(__x86_64__) ++#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(__x86_64__) + /* 64 bit Linux. */ + #include "vpx_config_x86_64-linux-gcc.h" + diff --git a/www/firefox-esr/files/patch-media_liboggz_include_oggz_oggz_off_t_generated.h b/www/firefox-esr/files/patch-media_liboggz_include_oggz_oggz_off_t_generated.h deleted file mode 100644 index 60d8988b9f17..000000000000 --- a/www/firefox-esr/files/patch-media_liboggz_include_oggz_oggz_off_t_generated.h +++ /dev/null @@ -1,11 +0,0 @@ ---- media/liboggz/include/oggz/oggz_off_t_generated.h.orig 2010-09-06 11:33:54.000000000 +0200 -+++ media/liboggz/include/oggz/oggz_off_t_generated.h 2010-09-06 11:34:16.000000000 +0200 -@@ -59,7 +59,7 @@ - - #include <sys/types.h> - --#if defined(__APPLE__) || defined(SOLARIS) || defined(OS2) || defined (_AIX) -+#if defined(__APPLE__) || defined(SOLARIS) || defined(OS2) || defined (_AIX) || defined (__FreeBSD__) - typedef off_t oggz_off_t; - #else - typedef loff_t oggz_off_t; diff --git a/www/firefox-esr/files/patch-nsprpub-pr-include-md_freebsd.cfg b/www/firefox-esr/files/patch-nsprpub-pr-include-md_freebsd.cfg new file mode 100644 index 000000000000..2236b6f5788c --- /dev/null +++ b/www/firefox-esr/files/patch-nsprpub-pr-include-md_freebsd.cfg @@ -0,0 +1,100 @@ +--- nsprpub/pr/include/md/_freebsd.cfg.orig 2010-12-23 17:34:06.000000000 +0100 ++++ nsprpub/pr/include/md/_freebsd.cfg 2010-12-23 17:34:44.000000000 +0100 +@@ -283,6 +283,97 @@ + #define PR_ALIGN_OF_POINTER 8 + #define PR_ALIGN_OF_WORD 8 + ++#elif defined(__powerpc64__) ++ ++#undef IS_LITTLE_ENDIAN ++#define IS_BIG_ENDIAN 1 ++#define IS_64 ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 8 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 8 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 64 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 64 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 6 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 6 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 8 ++#define PR_ALIGN_OF_INT64 8 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 8 ++#define PR_ALIGN_OF_POINTER 8 ++#define PR_ALIGN_OF_WORD 8 ++ ++#define PR_BYTES_PER_WORD_LOG2 3 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#elif defined(__powerpc__) ++ ++#undef IS_LITTLE_ENDIAN ++#define IS_BIG_ENDIAN 1 ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 4 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 4 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 32 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 32 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 5 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 5 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 4 ++#define PR_ALIGN_OF_INT64 8 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 8 ++#define PR_ALIGN_OF_POINTER 4 ++#define PR_ALIGN_OF_WORD 4 ++ ++#define PR_BYTES_PER_WORD_LOG2 2 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ + #else + + #error "Unknown CPU architecture" diff --git a/www/firefox-esr/files/patch-nsprpub-pr-include-md_freebsd.h b/www/firefox-esr/files/patch-nsprpub-pr-include-md_freebsd.h new file mode 100644 index 000000000000..1f1f04bdf81c --- /dev/null +++ b/www/firefox-esr/files/patch-nsprpub-pr-include-md_freebsd.h @@ -0,0 +1,30 @@ +--- nsprpub/pr/include/md/_freebsd.h.orig 2010-12-23 17:34:13.000000000 +0100 ++++ nsprpub/pr/include/md/_freebsd.h 2010-12-23 17:34:46.000000000 +0100 +@@ -57,6 +57,10 @@ + #define _PR_SI_ARCHITECTURE "ia64" + #elif defined(__amd64__) + #define _PR_SI_ARCHITECTURE "amd64" ++#elif defined(__powerpc64__) ++#define _PR_SI_ARCHITECTURE "powerpc64" ++#elif defined(__powerpc__) ++#define _PR_SI_ARCHITECTURE "powerpc" + #else + #error "Unknown CPU architecture" + #endif +@@ -106,6 +110,16 @@ + #define _PR_IPV6_V6ONLY_PROBE + #endif + ++#if (__FreeBSD_version >= 700016) || (__FreeBSD_version < 700000 && __FreeBSD_version >= 601103) ++#if defined(_PR_PTHREADS) ++#define _PR_HAVE_GETPROTO_R ++#define _PR_HAVE_5_ARG_GETPROTO_R ++#define _PR_HAVE_GETHOST_R ++#define _PR_HAVE_GETHOST_R_INT ++#define _PR_HAVE_THREADSAFE_GETHOST ++#endif ++#endif ++ + #define USE_SETJMP + + #ifndef _PR_PTHREADS diff --git a/www/firefox-esr/files/patch-security-coreconf-FreeBSD.mk b/www/firefox-esr/files/patch-security-coreconf-FreeBSD.mk index e5340ae55f5c..279110fa0321 100644 --- a/www/firefox-esr/files/patch-security-coreconf-FreeBSD.mk +++ b/www/firefox-esr/files/patch-security-coreconf-FreeBSD.mk @@ -1,5 +1,5 @@ ---- security/coreconf/FreeBSD.mk.orig 2010-03-16 09:57:06.000000000 +0000 -+++ security/coreconf/FreeBSD.mk 2010-03-20 17:40:12.000000000 +0000 +--- security/coreconf/FreeBSD.mk.orig 2010-02-28 23:30:04.000000000 +0000 ++++ security/coreconf/FreeBSD.mk 2010-03-03 02:05:22.000000000 +0000 @@ -49,8 +49,20 @@ ifeq ($(CPU_ARCH),pc98) CPU_ARCH = x86 diff --git a/www/firefox-esr/files/patch-security_nss_lib_freebl_mpi_mpcpucache.c b/www/firefox-esr/files/patch-security_nss_lib_freebl_mpi_mpcpucache.c deleted file mode 100644 index b579fc5b4995..000000000000 --- a/www/firefox-esr/files/patch-security_nss_lib_freebl_mpi_mpcpucache.c +++ /dev/null @@ -1,44 +0,0 @@ ---- security/nss/lib/freebl/mpi/mpcpucache.c.orig 2011-02-26 18:44:42.000000000 +0100 -+++ security/nss/lib/freebl/mpi/mpcpucache.c 2011-02-26 18:46:41.000000000 +0100 -@@ -733,6 +733,33 @@ - #endif - - #if defined(__ppc64__) -+#if defined(__FreeBSD__) -+#include <sys/stddef.h> -+#include <sys/sysctl.h> -+ -+#include <machine/cpu.h> -+#include <machine/md_var.h> -+ -+unsigned long -+s_mpi_getProcessorLineSize() -+{ -+ static int cacheline_size = 0; -+ static int cachemib[] = { CTL_MACHDEP, CPU_CACHELINE }; -+ int clen; -+ -+ if (cacheline_size > 0) -+ return cacheline_size; -+ -+ clen = sizeof(cacheline_size); -+ if (sysctl(cachemib, sizeof(cachemib) / sizeof(cachemib[0]), -+ &cacheline_size, &clen, NULL, 0) < 0 || !cacheline_size) -+ return 128; /* guess */ -+ -+ return cacheline_size; -+} -+#else /* __FreeBSD__ */ -+ -+ - /* - * Sigh, The PPC has some really nice features to help us determine cache - * size, since it had lots of direct control functions to do so. The POWER -@@ -786,6 +813,7 @@ - return 0; - } - -+#endif /* __FreeBSD__ */ - #define MPI_GET_PROCESSOR_LINE_SIZE_DEFINED 1 - #endif - diff --git a/www/firefox-esr/files/patch-toolkit_library_Makefile.in b/www/firefox-esr/files/patch-toolkit_library_Makefile.in index d905acd5bf67..35e1cd0e7f58 100644 --- a/www/firefox-esr/files/patch-toolkit_library_Makefile.in +++ b/www/firefox-esr/files/patch-toolkit_library_Makefile.in @@ -5,7 +5,7 @@ $(INSTALL) $^ . -EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -+EXTRA_DSO_LDOPTS += -Wl,--warn-unresolved-symbols -Wl,--as-needed $(LIBS_DIR) $(EXTRA_DSO_LIBS) ++EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) %%PTHREAD_LIBS%% ifdef MOZ_ENABLE_LIBXUL include $(srcdir)/libxul-rules.mk diff --git a/www/firefox-esr/files/patch-xpcom_base_nsStackWalk.cpp b/www/firefox-esr/files/patch-xpcom_base_nsStackWalk.cpp index 3485b1509ad1..d9956b6852c3 100644 --- a/www/firefox-esr/files/patch-xpcom_base_nsStackWalk.cpp +++ b/www/firefox-esr/files/patch-xpcom_base_nsStackWalk.cpp @@ -1,11 +1,11 @@ ---- xpcom/base/nsStackWalk.cpp.orig 2010-01-11 02:11:49.000000000 -0500 -+++ xpcom/base/nsStackWalk.cpp 2010-01-11 02:13:26.000000000 -0500 -@@ -1132,7 +1132,7 @@ +--- xpcom/base/nsStackWalk.cpp.orig 2010-12-15 02:03:41.000000000 +0100 ++++ xpcom/base/nsStackWalk.cpp 2010-12-15 11:28:20.000000000 +0100 +@@ -1137,7 +1137,7 @@ #define __USE_GNU #endif --#if defined(HAVE_LIBDL) || defined(XP_MACOSX) -+#if defined(HAVE_LIBDL) || defined(XP_MACOSX) || defined(__FreeBSD__) +-#if defined(HAVE_DLOPEN) || defined(XP_MACOSX) ++#if defined(HAVE_DLOPEN) || defined(XP_MACOSX) || defined(__FreeBSD__) #include <dlfcn.h> #endif diff --git a/www/firefox-esr/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in b/www/firefox-esr/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in index 124e86202838..f514e6784489 100644 --- a/www/firefox-esr/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in +++ b/www/firefox-esr/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in @@ -1,6 +1,6 @@ ---- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2010-04-02 16:03:13.000000000 +0000 -+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in 2010-06-06 19:19:44.000000000 +0000 -@@ -73,6 +73,9 @@ +--- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2010-02-08 15:42:25.000000000 +0100 ++++ xpcom/reflect/xptcall/src/md/unix/Makefile.in 2010-02-09 18:31:15.000000000 +0100 +@@ -72,6 +72,9 @@ DEFINES += -DKEEP_STACK_16_BYTE_ALIGNED CPPSRCS := xptcinvoke_unixish_x86.cpp xptcstubs_unixish_x86.cpp endif @@ -10,7 +10,7 @@ endif endif -@@ -96,7 +99,7 @@ +@@ -95,7 +98,7 @@ endif endif # IA64 Linux @@ -19,18 +19,20 @@ ifneq (,$(findstring ia64,$(OS_TEST))) CPPSRCS := xptcinvoke_ipf64.cpp xptcstubs_ipf64.cpp ASFILES := xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s -@@ -111,8 +114,8 @@ - # - # FreeBSD/amd64 - # --ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDx86_64) --CPPSRCS := xptcinvoke_amd64_linux.cpp xptcstubs_amd64_linux.cpp -+ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDamd64) -+CPPSRCS := xptcinvoke_amd64_openbsd.cpp xptcstubs_amd64_openbsd.cpp +@@ -108,6 +111,12 @@ + CPPSRCS := xptcinvoke_amd64_openbsd.cpp xptcstubs_amd64_openbsd.cpp endif # ++# FreeBSD/amd64 ++# ++ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDamd64) ++CPPSRCS := xptcinvoke_amd64_openbsd.cpp xptcstubs_amd64_openbsd.cpp ++endif ++# # BeOS/Intel (uses the same unixish_x86 code) -@@ -165,9 +168,15 @@ + # + ifeq ($(OS_ARCH)$(OS_TEST),BeOSBePC) +@@ -158,9 +167,15 @@ ASFILES := xptcinvoke_asm_osf1_alpha.s xptcstubs_asm_osf1_alpha.s endif # @@ -47,7 +49,7 @@ CPPSRCS := xptcinvoke_linux_alpha.cpp xptcstubs_linux_alpha.cpp endif # -@@ -322,7 +331,7 @@ +@@ -315,7 +330,7 @@ # # Linux/PPC # @@ -56,20 +58,7 @@ CPPSRCS := xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s AS := $(CC) -c -x assembler-with-cpp -@@ -331,9 +340,9 @@ - # - # Linux/PPC64 - # --ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64) --CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp --ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s -+ifneq (,$(filter Linuxpowerpc64 FreeBSDpowerpc64,$(OS_ARCH)$(OS_TEST))) -+CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp -+ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s - AS := $(CC) -c -x assembler-with-cpp - endif - -@@ -400,6 +409,15 @@ +@@ -393,6 +408,15 @@ ASFILES := xptcinvoke_asm_sparc_netbsd.s xptcstubs_asm_sparc_netbsd.s endif # diff --git a/www/firefox-esr/files/releng6_pulseaudio b/www/firefox-esr/files/releng6_pulseaudio deleted file mode 100644 index 2d83f3c1c441..000000000000 --- a/www/firefox-esr/files/releng6_pulseaudio +++ /dev/null @@ -1,32 +0,0 @@ ---- media/libsydneyaudio/src/Makefile.in.orig 2009-08-11 17:22:08.000000000 +0200 -+++ media/libsydneyaudio/src/Makefile.in 2009-08-11 17:22:36.000000000 +0200 -@@ -45,6 +45,12 @@ - LIBRARY_NAME = sydneyaudio - FORCE_STATIC_LIB= 1 - -+ifeq ($(OS_ARCH),FreeBSD) -+CSRCS = \ -+ sydney_audio_pulseaudio.c \ -+ $(NULL) -+endif -+ - ifeq ($(OS_ARCH),Linux) - CSRCS = \ - sydney_audio_alsa.c \ ---- toolkit/library/Makefile.in.orig 2009-08-11 17:22:45.000000000 +0200 -+++ toolkit/library/Makefile.in 2009-08-11 17:23:22.000000000 +0200 -@@ -231,12 +231,12 @@ - endif - - ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT)) --EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) $(MOZ_PANGO_LIBS) $(MOZ_GTK2_LIBS) $(XT_LIBS) -lgthread-2.0 -+EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) $(MOZ_PANGO_LIBS) $(MOZ_GTK2_LIBS) $(XT_LIBS) -lgthread-2.0 -lpulse -lpthread - EXTRA_DSO_LDOPTS += $(FT2_LIBS) - endif - - ifeq (qt,$(MOZ_WIDGET_TOOLKIT)) --EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XT_LIBS) $(MOZ_QT_LIBS) -lgthread-2.0 -+EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XT_LIBS) $(MOZ_QT_LIBS) -lgthread-2.0 -lpulse -lpthread - EXTRA_DSO_LDOPTS += $(FT2_LIBS) - endif - diff --git a/www/firefox-esr/pkg-message b/www/firefox-esr/pkg-message index 3706851229e5..0bb19f605909 100644 --- a/www/firefox-esr/pkg-message +++ b/www/firefox-esr/pkg-message @@ -14,7 +14,7 @@ The SSH server on remote_host must allow pub key authentication. ====================================================================== -Firefox 3.6 and HTML5 +Firefox 4.0 and HTML5 Certain functions used to display HTML5 elements need the sem module. @@ -37,7 +37,7 @@ bug reports to any other addresses. Please include the following information with any bug report: * Output from 'uname -a'. -* Date/time stamp from www/firefox/Makefile. +* Output from 'ident /usr/ports/www/firefox/Makefile' * Where/when did the problem occur: configuring, building, or running firefox * How can you reproduce the problem? diff --git a/www/firefox/Makefile b/www/firefox/Makefile index 785f030f2ca9..05e2e5b11a52 100644 --- a/www/firefox/Makefile +++ b/www/firefox/Makefile @@ -6,7 +6,7 @@ # PORTNAME= firefox -DISTVERSION= 3.6.15 +DISTVERSION= 4.0 PORTEPOCH= 1 CATEGORIES= www ipv6 MASTER_SITES= ${MASTER_SITE_MOZILLA} @@ -16,15 +16,12 @@ DISTNAME= ${PORTNAME}-${DISTVERSION}.source MAINTAINER= gecko@FreeBSD.org COMMENT= Web browser based on the browser portion of Mozilla -BUILD_DEPENDS= nspr>=4.8.6:${PORTSDIR}/devel/nspr +BUILD_DEPENDS= nspr>=4.8.7:${PORTSDIR}/devel/nspr USE_AUTOTOOLS= autoconf213 USE_GECKO= gecko MOZ_PKGCONFIG_FILES= # empty -USE_MOZILLA= -png -nss -dbm -jpeg -xft -cairo -MOZILLA_NAME= Firefox${MOZILLA_SUFX} -MOZILLA_SUFX= 3 -MOZILLA= ${PORTNAME}${MOZILLA_SUFX} +USE_MOZILLA= -png -nss -dbm -jpeg -xft MOZ_TOOLKIT= cairo-gtk2 GECKO_PLIST_PRE_DIRS= lib/${MOZILLA}/bin lib/${MOZILLA}/idl \ lib/${MOZILLA}/include lib/${MOZILLA}/lib @@ -37,9 +34,9 @@ EXTRA_CFLAGS= -O2 HAS_CONFIGURE= yes USE_BZIP2= yes USE_GMAKE= yes +USE_GL= gl MAKE_JOBS_SAFE= yes NO_MOZPKGINSTALL=yes -CONFLICTS_INSTALL= firefox-3.5.* FIREFOX_ICON= ${MOZILLA}.png FIREFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default48.png @@ -52,27 +49,12 @@ MOZ_OPTIONS= --program-transform-name='s/firefox/${MOZILLA}/' \ --disable-ipc OPTIONS= DBUS "Enable D-BUS support" on \ + PGO "Enable Profile-Guided Optimization" off \ SMB "Enable smb:// URI support using gnomevfs" off .include <bsd.port.pre.mk> -.if ${OSVERSION} < 700000 -LIB_DEPENDS+= pulse.0:${PORTSDIR}/audio/pulseaudio -EXTRA_PATCHES= ${FILESDIR}/releng6_pulseaudio -.else -EXTRA_PATCHES= ${FILESDIR}/libsydney_oss -.endif - -.if ${ARCH} == powerpc64 -.if ${OSVERSION} < 900033 -BROKEN= Needs binutils 2.17.50 to build -.else -CONFIGURE_ENV+= UNAME_m="powerpc64" -CFLAGS+= -mminimal-toc -.endif -.endif - -WRKSRC:= ${WRKSRC}-1.9.2 +WRKSRC:= ${WRKSRC}-2.0 GECKO_PTHREAD_LIBS!=${CC} -dumpspecs | ${GREP} -m 1 '%{\!pg: %{pthread:' | ${SED} -e 's|^.*%{\!pg: %{pthread:|| ; s|}.*$$||' || ${TRUE} @@ -90,6 +72,34 @@ LIB_DEPENDS+= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib \ notify.1:${PORTSDIR}/devel/libnotify .endif +.if defined(WITH_PGO) +BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3 +USE_PYTHON_BUILD= yes +USE_DISPLAY= yes +.include "${PORTSDIR}/Mk/bsd.python.mk" + +MAKEFILE= client.mk +ALL_TARGET= profiledbuild +.endif + +.if ${ARCH} == amd64 || ${ARCH} == i386 +BUILD_DEPENDS+= yasm:${PORTSDIR}/devel/yasm +.endif + +pre-extract: +.if defined(WITH_PGO) + @${ECHO} "*****************************************************************" + @${ECHO} "**************************** attention **************************" + @${ECHO} "*****************************************************************" + @${ECHO} "To build Firefox with PGO support you need a running X server and" + @${ECHO} " build this port with an user who could access the X server! " + @${ECHO} "" + @${ECHO} "During the build a Firefox instance will start and run some test." + @${ECHO} " Do not interrupt or close Firefox during this tests! " + @${ECHO} "*****************************************************************" + @sleep 10 +.endif + post-extract:: @${SED} -e 's|@FIREFOX_ICON@|${FIREFOX_ICON}|' -e 's|@MOZILLA@|${MOZILLA}|' \ -e 's|@MOZILLA_NAME@|${MOZILLA_NAME}|' \ @@ -98,6 +108,7 @@ post-extract:: post-patch: ${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS:C/-pthread/${GECKO_PTHREAD_LIBS}/}|' \ ${WRKSRC}/storage/build/Makefile.in \ + ${WRKSRC}/toolkit/library/Makefile.in \ ${WRKSRC}/db/sqlite3/src/Makefile.in @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ ${WRKSRC}/security/manager/ssl/src/Makefile.in \ @@ -113,8 +124,15 @@ pre-configure: (cd ${WRKSRC} && ${AUTOCONF}) (cd ${WRKSRC}/js/src/ && ${AUTOCONF}) +post-configure: +.if defined(WITH_PGO) + @${SED} -e 's|@PYTHON@|${PYTHON_CMD}|' \ + <${FILESDIR}/mozconfig-profile_guided_optimization.in \ + >> ${BUILD_WRKSRC}/.mozconfig + (cd ${WRKSRC} && ${GMAKE} distclean) +.endif + port-pre-install: -# ${SED} -e 's|1.9a7|0|' ${WRKSRC}/dist/bin/application.ini ${FAKEDIR}/lib ${ECHO_CMD} 'share/applications/${MOZILLA}.desktop' >> ${PLISTF} ${ECHO_CMD} "@dirrmtry share/applications" >> ${PLISTD} ${ECHO_CMD} 'share/pixmaps/${FIREFOX_ICON}' >> ${PLISTF} diff --git a/www/firefox/distinfo b/www/firefox/distinfo index 7c33c67f6708..ba6a9a53f31d 100644 --- a/www/firefox/distinfo +++ b/www/firefox/distinfo @@ -1,2 +1,2 @@ -SHA256 (firefox-3.6.15.source.tar.bz2) = 405aa411a8ddb456017564522cbb486850e34fe14485b1c31fa93fc5c750870f -SIZE (firefox-3.6.15.source.tar.bz2) = 51552828 +SHA256 (firefox-4.0.source.tar.bz2) = 78b1e0a66be3604af49b81193e557c27ffaee16b8c26fead052455dd42c9150f +SIZE (firefox-4.0.source.tar.bz2) = 66024327 diff --git a/www/firefox/files/libsydney_oss b/www/firefox/files/libsydney_oss deleted file mode 100644 index dcef3abdab96..000000000000 --- a/www/firefox/files/libsydney_oss +++ /dev/null @@ -1,15 +0,0 @@ ---- media/libsydneyaudio/src/Makefile.in.orig 2009-08-11 16:28:21.000000000 +0200 -+++ media/libsydneyaudio/src/Makefile.in 2009-08-11 16:29:08.000000000 +0200 -@@ -45,6 +45,12 @@ - LIBRARY_NAME = sydneyaudio - FORCE_STATIC_LIB= 1 - -+ifeq ($(OS_ARCH),FreeBSD) -+CSRCS = \ -+ sydney_audio_oss.c \ -+ $(NULL) -+endif -+ - ifeq ($(OS_ARCH),Linux) - CSRCS = \ - sydney_audio_alsa.c \ diff --git a/www/firefox/files/mozconfig-profile_guided_optimization.in b/www/firefox/files/mozconfig-profile_guided_optimization.in new file mode 100644 index 000000000000..5caba0f4196d --- /dev/null +++ b/www/firefox/files/mozconfig-profile_guided_optimization.in @@ -0,0 +1 @@ +mk_add_options PROFILE_GEN_SCRIPT='@PYTHON@ $(OBJDIR)/_profile/pgo/profileserver.py' diff --git a/www/firefox/files/patch-build-pgo-profileserver.py b/www/firefox/files/patch-build-pgo-profileserver.py new file mode 100644 index 000000000000..0571eb19903d --- /dev/null +++ b/www/firefox/files/patch-build-pgo-profileserver.py @@ -0,0 +1,18 @@ +--- build/pgo/profileserver.py.orig 2011-02-24 21:49:47.000000000 +0100 ++++ build/pgo/profileserver.py 2011-02-24 21:50:30.000000000 +0100 +@@ -77,13 +77,13 @@ + t.setDaemon(True) # don't hang on exit + t.start() + +- automation.setServerInfo("localhost", PORT) ++ automation.setServerInfo("127.0.0.1", PORT) + automation.initializeProfile(PROFILE_DIRECTORY) + browserEnv = automation.environment() + browserEnv["XPCOM_DEBUG_BREAK"] = "warn" + browserEnv["MOZ_JAR_LOG_DIR"] = MOZ_JAR_LOG_DIR + +- url = "http://localhost:%d/index.html" % PORT ++ url = "http://127.0.0.1:%d/index.html" % PORT + appPath = os.path.join(SCRIPT_DIR, automation.DEFAULT_APP) + status = automation.runApp(url, browserEnv, appPath, PROFILE_DIRECTORY, {}, + debuggerInfo=debuggerInfo, diff --git a/www/firefox/files/patch-configure.in b/www/firefox/files/patch-configure.in index 5ba21ea8bc53..d36a535358ab 100644 --- a/www/firefox/files/patch-configure.in +++ b/www/firefox/files/patch-configure.in @@ -1,6 +1,6 @@ ---- configure.in.orig 2009-10-03 20:24:11.000000000 +0200 -+++ configure.in 2009-10-03 20:24:43.000000000 +0200 -@@ -1352,7 +1352,7 @@ +--- configure.in.orig 2010-11-04 21:05:18.000000000 +0100 ++++ configure.in 2010-11-09 12:59:28.000000000 +0100 +@@ -1549,7 +1549,7 @@ CPU_ARCH=sparc ;; @@ -9,3 +9,63 @@ CPU_ARCH="$OS_TEST" ;; +@@ -1567,7 +1567,7 @@ dnl Set INTEL_ARCHITECTURE if we're comp + dnl =============================================================== + INTEL_ARCHITECTURE= + case "$OS_TEST" in +- x86_64|i?86) ++ amd64|x86_64|i?86) + INTEL_ARCHITECTURE=1 + esac + +@@ -3803,19 +3803,21 @@ + AC_CHECK_FUNCS(localtime_r strtok_r) + + dnl check for clock_gettime(), the CLOCK_MONOTONIC clock, and -lrt +-_SAVE_LDFLAGS=$LDFLAGS +-LDFLAGS="$LDFLAGS -lrt" +-AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC) and -lrt, ++_SAVE_LIBS=$LIBS ++AC_SEARCH_LIBS(clock_gettime, rt) ++AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC), + ac_cv_have_clock_monotonic, + [AC_TRY_LINK([#include <time.h>], + [ struct timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); ], + ac_cv_have_clock_monotonic=yes, + ac_cv_have_clock_monotonic=no)]) +-LDFLAGS=$_SAVE_LDFLAGS ++LIBS=$_SAVE_LIBS + if test "$ac_cv_have_clock_monotonic" = "yes"; then + HAVE_CLOCK_MONOTONIC=1 +- REALTIME_LIBS=-lrt ++ if test "$ac_cv_search_clock_gettime" != "none required"; then ++ REALTIME_LIBS=$ac_cv_search_clock_gettime ++ fi + AC_DEFINE(HAVE_CLOCK_MONOTONIC) + AC_SUBST(HAVE_CLOCK_MONOTONIC) + AC_SUBST(REALTIME_LIBS) +@@ -4808,7 +4810,7 @@ CFLAGS=$_SAVE_CFLAGS + LDFLAGS=$_SAVE_LDFLAGS + LIBS=$_SAVE_LIBS + +-if test "${ZLIB_DIR}" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then ++if test "${ZLIB_DIR}" -a "${ZLIB_DIR}" != "/usr" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then + ZLIB_CFLAGS="-I${ZLIB_DIR}/include" + ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_LIBS}" + fi +@@ -6022,6 +6024,14 @@ + VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC" + VPX_X86_ASM=1 + ;; ++ FreeBSD:i386) ++ VPX_ASFLAGS="-f elf32 -rnasm -pnasm" ++ VPX_X86_ASM=1 ++ ;; ++ FreeBSD:amd64) ++ VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC" ++ VPX_X86_ASM=1 ++ ;; + SunOS:x86) + VPX_ASFLAGS="-f elf32 -rnasm -pnasm" + VPX_X86_ASM=1 diff --git a/www/firefox/files/patch-gfx-qcms-Makefile.in b/www/firefox/files/patch-gfx-qcms-Makefile.in new file mode 100644 index 000000000000..cc7414a33fe7 --- /dev/null +++ b/www/firefox/files/patch-gfx-qcms-Makefile.in @@ -0,0 +1,11 @@ +--- gfx/qcms/Makefile.in.orig 2011-01-22 01:25:38.000000000 +0100 ++++ gfx/qcms/Makefile.in 2011-01-27 18:16:39.000000000 +0100 +@@ -15,7 +15,7 @@ + + CSRCS = iccread.c transform.c + +-ifeq (86,$(findstring 86,$(OS_TEST))) ++ifneq (,$(INTEL_ARCHITECTURE)) + CSRCS += transform-sse2.c + ifdef _MSC_VER + ifneq ($(OS_ARCH)_$(OS_TEST),WINNT_x86_64) diff --git a/www/firefox/files/patch-gfx-qcms-qcmstypes.h b/www/firefox/files/patch-gfx-qcms-qcmstypes.h new file mode 100644 index 000000000000..33d9e3356b77 --- /dev/null +++ b/www/firefox/files/patch-gfx-qcms-qcmstypes.h @@ -0,0 +1,11 @@ +--- gfx/qcms/qcmstypes.h.orig 2010-11-22 12:01:36.000000000 +0100 ++++ gfx/qcms/qcmstypes.h 2010-11-22 12:02:42.000000000 +0100 +@@ -25,7 +25,7 @@ + #ifdef __OS2__ + /* OS/2's stdlib typdefs uintptr_t. So we'll just include that so we don't collide */ + #include <stdlib.h> +-#elif !defined(__intptr_t_defined) && !defined(_UINTPTR_T_DEFINED) ++#elif !defined(__intptr_t_defined) && !defined(_INTPTR_T_DECLARED) + typedef PRUptrdiff uintptr_t; + #endif + #endif diff --git a/www/firefox/files/patch-js-ctypes-libffi-configure b/www/firefox/files/patch-js-ctypes-libffi-configure deleted file mode 100644 index 3f6b66e1d628..000000000000 --- a/www/firefox/files/patch-js-ctypes-libffi-configure +++ /dev/null @@ -1,12 +0,0 @@ ---- js/ctypes/libffi/configure.orig 2010-07-22 23:54:58.000000000 +0200 -+++ js/ctypes/libffi/configure 2010-08-05 07:34:44.000000000 +0200 -@@ -21033,6 +21033,9 @@ - powerpc-*-aix* | rs6000-*-aix*) - TARGET=POWERPC_AIX; TARGETDIR=powerpc - ;; -+ powerpc64-*-freebsd*) -+ TARGET=POWERPC; TARGETDIR=powerpc -+ ;; - powerpc-*-freebsd*) - TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc - ;; diff --git a/www/firefox/files/patch-js-src-Makefile.in b/www/firefox/files/patch-js-src-Makefile.in index 751596240adf..1657c655d8c9 100644 --- a/www/firefox/files/patch-js-src-Makefile.in +++ b/www/firefox/files/patch-js-src-Makefile.in @@ -1,10 +1,20 @@ ---- js/src/Makefile.in.orig 2009-05-11 15:21:19.000000000 +0200 -+++ js/src/Makefile.in 2009-05-11 15:21:34.000000000 +0200 -@@ -427,7 +427,7 @@ +--- js/src/Makefile.in.orig 2011-03-17 18:51:39.000000000 +0100 ++++ js/src/Makefile.in 2011-03-18 19:41:09.000000000 +0100 +@@ -612,7 +612,7 @@ + # to reliably get limit macros defined, we'd always have to define the + # one below before including any header, but that's obscure and + # fragile, so we do it here. +-DEFINES += -D__STDC_LIMIT_MACROS ++DEFINES += -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS + + INCLUDES += -I$(srcdir) + +@@ -666,7 +666,8 @@ endif # WINNT ifeq ($(OS_ARCH),FreeBSD) -EXTRA_LIBS += -pthread ++DEFINES += -DFREEBSD +EXTRA_LIBS += -pthread -lc endif ifeq ($(OS_ARCH),IRIX) diff --git a/www/firefox/files/patch-js-src-configure.in b/www/firefox/files/patch-js-src-configure.in index 75f017bc4d68..e8c09d3f82ff 100644 --- a/www/firefox/files/patch-js-src-configure.in +++ b/www/firefox/files/patch-js-src-configure.in @@ -1,13 +1,32 @@ ---- js/src/configure.in.orig 2009-09-21 00:26:58.000000000 +0200 -+++ js/src/configure.in 2009-10-08 07:00:27.000000000 +0200 -@@ -2456,10 +2456,6 @@ - ENABLE_JIT=1 - NANOJIT_ARCH=ARM +--- js/src/configure.in.orig 2010-11-04 21:05:48.000000000 +0100 ++++ js/src/configure.in 2010-11-22 21:30:24.000000000 +0100 +@@ -2621,7 +2621,7 @@ + AC_DEFINE(JS_CPU_X86) + AC_DEFINE(JS_NUNBOX32) + ;; +-x86_64*-*) ++x86_64*-*|amd64*-*) + ENABLE_TRACEJIT=1 + NANOJIT_ARCH=X64 + ENABLE_METHODJIT=1 +@@ -2638,11 +2638,6 @@ + AC_DEFINE(JS_CPU_ARM) + AC_DEFINE(JS_NUNBOX32) ;; -sparc*-*) -- ENABLE_JIT=1 +- ENABLE_TRACEJIT=1 - NANOJIT_ARCH=Sparc +- AC_DEFINE(JS_CPU_SPARC) - ;; esac - MOZ_ARG_DISABLE_BOOL(jit, + MOZ_ARG_DISABLE_BOOL(methodjit, +@@ -2693,7 +2688,7 @@ + i?86-*) + AC_DEFINE(AVMPLUS_IA32) + ;; +-x86_64*-*) ++x86_64*-*|amd64*-*) + AC_DEFINE(AVMPLUS_AMD64) + AC_DEFINE(AVMPLUS_64BIT) + ;; diff --git a/www/firefox/files/patch-js-src-jslock.cpp b/www/firefox/files/patch-js-src-jslock.cpp deleted file mode 100644 index 7aea14d0ebaf..000000000000 --- a/www/firefox/files/patch-js-src-jslock.cpp +++ /dev/null @@ -1,18 +0,0 @@ ---- js/src/jslock.cpp.orig 2009-10-07 20:15:38.000000000 +0200 -+++ js/src/jslock.cpp 2009-10-07 21:36:14.000000000 +0200 -@@ -160,8 +160,13 @@ - unsigned int res; - - __asm__ __volatile__ ( -- "stbar\n" -- "cas [%1],%2,%3\n" -+ "membar #StoreLoad | #LoadLoad\n" -+# if defined (__sparc64__) -+ "casx [%1],%2,%3\n" -+# else -+ "cas [%1],%2,%3\n" /* 32-bit version */ -+# endif -+ "membar #StoreLoad | #LoadLoad\n" - "cmp %2,%3\n" - "be,a 1f\n" - "mov 1,%0\n" diff --git a/www/firefox/files/patch-js-src-jsnativestack.cpp b/www/firefox/files/patch-js-src-jsnativestack.cpp new file mode 100644 index 000000000000..2a461af616a4 --- /dev/null +++ b/www/firefox/files/patch-js-src-jsnativestack.cpp @@ -0,0 +1,12 @@ +--- js/src/jsnativestack.cpp~ ++++ js/src/jsnativestack.cpp +@@ -50,7 +50,8 @@ + #elif defined(XP_MACOSX) || defined(DARWIN) || defined(XP_UNIX) + # include <pthread.h> + +-# if defined(__FreeBSD__) ++# if defined(FREEBSD) ++# include <cstddef> + # include <pthread_np.h> + # endif + diff --git a/www/firefox/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c b/www/firefox/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c deleted file mode 100644 index 66ce3efd66d3..000000000000 --- a/www/firefox/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c +++ /dev/null @@ -1,33 +0,0 @@ ---- media/libsydneyaudio/src/sydney_audio_oss.c.orig 2010-10-12 21:45:53.000000000 +0400 -+++ media/libsydneyaudio/src/sydney_audio_oss.c 2010-10-25 23:33:08.919096567 +0400 -@@ -258,6 +258,7 @@ - int - sa_stream_destroy(sa_stream_t *s) { - int result = SA_SUCCESS; -+ pthread_t thread_id; - - if (s == NULL) { - return SA_SUCCESS; -@@ -265,8 +266,10 @@ - - pthread_mutex_lock(&s->mutex); - -+ thread_id = s->thread_id; -+ - /* -- * This causes the thread sending data to ALSA to stop -+ * This causes the thread sending data to OSS to stop - */ - s->thread_id = 0; - -@@ -281,6 +284,8 @@ - - pthread_mutex_unlock(&s->mutex); - -+ pthread_join(thread_id, NULL); -+ - /* - * Release resources. - */ - - diff --git a/www/firefox/files/patch-media-libvpx-vpx_config.c b/www/firefox/files/patch-media-libvpx-vpx_config.c new file mode 100644 index 000000000000..1cc3dab5b8bb --- /dev/null +++ b/www/firefox/files/patch-media-libvpx-vpx_config.c @@ -0,0 +1,16 @@ +--- media/libvpx/vpx_config_c.c~ ++++ media/libvpx/vpx_config_c.c +@@ -12,11 +12,11 @@ + /* 32 bit MacOS. */ + #include "vpx_config_x86-darwin9-gcc.c" + +-#elif defined(__linux__) && defined(__i386__) ++#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(__i386__) + /* 32 bit Linux. */ + #include "vpx_config_x86-linux-gcc.c" + +-#elif defined(__linux__) && defined(__x86_64__) ++#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(__x86_64__) + /* 64 bit Linux. */ + #include "vpx_config_x86_64-linux-gcc.c" + diff --git a/www/firefox/files/patch-media-libvpx-vpx_config.h b/www/firefox/files/patch-media-libvpx-vpx_config.h new file mode 100644 index 000000000000..d813ca8c608b --- /dev/null +++ b/www/firefox/files/patch-media-libvpx-vpx_config.h @@ -0,0 +1,16 @@ +--- media/libvpx/vpx_config.h~ ++++ media/libvpx/vpx_config.h +@@ -12,11 +12,11 @@ + /* 32 bit MacOS. */ + #include "vpx_config_x86-darwin9-gcc.h" + +-#elif defined(__linux__) && defined(__i386__) ++#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(__i386__) + /* 32 bit Linux. */ + #include "vpx_config_x86-linux-gcc.h" + +-#elif defined(__linux__) && defined(__x86_64__) ++#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(__x86_64__) + /* 64 bit Linux. */ + #include "vpx_config_x86_64-linux-gcc.h" + diff --git a/www/firefox/files/patch-media_liboggz_include_oggz_oggz_off_t_generated.h b/www/firefox/files/patch-media_liboggz_include_oggz_oggz_off_t_generated.h deleted file mode 100644 index 60d8988b9f17..000000000000 --- a/www/firefox/files/patch-media_liboggz_include_oggz_oggz_off_t_generated.h +++ /dev/null @@ -1,11 +0,0 @@ ---- media/liboggz/include/oggz/oggz_off_t_generated.h.orig 2010-09-06 11:33:54.000000000 +0200 -+++ media/liboggz/include/oggz/oggz_off_t_generated.h 2010-09-06 11:34:16.000000000 +0200 -@@ -59,7 +59,7 @@ - - #include <sys/types.h> - --#if defined(__APPLE__) || defined(SOLARIS) || defined(OS2) || defined (_AIX) -+#if defined(__APPLE__) || defined(SOLARIS) || defined(OS2) || defined (_AIX) || defined (__FreeBSD__) - typedef off_t oggz_off_t; - #else - typedef loff_t oggz_off_t; diff --git a/www/firefox/files/patch-nsprpub-pr-include-md_freebsd.cfg b/www/firefox/files/patch-nsprpub-pr-include-md_freebsd.cfg new file mode 100644 index 000000000000..2236b6f5788c --- /dev/null +++ b/www/firefox/files/patch-nsprpub-pr-include-md_freebsd.cfg @@ -0,0 +1,100 @@ +--- nsprpub/pr/include/md/_freebsd.cfg.orig 2010-12-23 17:34:06.000000000 +0100 ++++ nsprpub/pr/include/md/_freebsd.cfg 2010-12-23 17:34:44.000000000 +0100 +@@ -283,6 +283,97 @@ + #define PR_ALIGN_OF_POINTER 8 + #define PR_ALIGN_OF_WORD 8 + ++#elif defined(__powerpc64__) ++ ++#undef IS_LITTLE_ENDIAN ++#define IS_BIG_ENDIAN 1 ++#define IS_64 ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 8 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 8 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 64 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 64 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 6 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 6 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 8 ++#define PR_ALIGN_OF_INT64 8 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 8 ++#define PR_ALIGN_OF_POINTER 8 ++#define PR_ALIGN_OF_WORD 8 ++ ++#define PR_BYTES_PER_WORD_LOG2 3 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#elif defined(__powerpc__) ++ ++#undef IS_LITTLE_ENDIAN ++#define IS_BIG_ENDIAN 1 ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 4 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 4 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 32 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 32 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 5 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 5 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 4 ++#define PR_ALIGN_OF_INT64 8 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 8 ++#define PR_ALIGN_OF_POINTER 4 ++#define PR_ALIGN_OF_WORD 4 ++ ++#define PR_BYTES_PER_WORD_LOG2 2 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ + #else + + #error "Unknown CPU architecture" diff --git a/www/firefox/files/patch-nsprpub-pr-include-md_freebsd.h b/www/firefox/files/patch-nsprpub-pr-include-md_freebsd.h new file mode 100644 index 000000000000..1f1f04bdf81c --- /dev/null +++ b/www/firefox/files/patch-nsprpub-pr-include-md_freebsd.h @@ -0,0 +1,30 @@ +--- nsprpub/pr/include/md/_freebsd.h.orig 2010-12-23 17:34:13.000000000 +0100 ++++ nsprpub/pr/include/md/_freebsd.h 2010-12-23 17:34:46.000000000 +0100 +@@ -57,6 +57,10 @@ + #define _PR_SI_ARCHITECTURE "ia64" + #elif defined(__amd64__) + #define _PR_SI_ARCHITECTURE "amd64" ++#elif defined(__powerpc64__) ++#define _PR_SI_ARCHITECTURE "powerpc64" ++#elif defined(__powerpc__) ++#define _PR_SI_ARCHITECTURE "powerpc" + #else + #error "Unknown CPU architecture" + #endif +@@ -106,6 +110,16 @@ + #define _PR_IPV6_V6ONLY_PROBE + #endif + ++#if (__FreeBSD_version >= 700016) || (__FreeBSD_version < 700000 && __FreeBSD_version >= 601103) ++#if defined(_PR_PTHREADS) ++#define _PR_HAVE_GETPROTO_R ++#define _PR_HAVE_5_ARG_GETPROTO_R ++#define _PR_HAVE_GETHOST_R ++#define _PR_HAVE_GETHOST_R_INT ++#define _PR_HAVE_THREADSAFE_GETHOST ++#endif ++#endif ++ + #define USE_SETJMP + + #ifndef _PR_PTHREADS diff --git a/www/firefox/files/patch-security-coreconf-FreeBSD.mk b/www/firefox/files/patch-security-coreconf-FreeBSD.mk index e5340ae55f5c..279110fa0321 100644 --- a/www/firefox/files/patch-security-coreconf-FreeBSD.mk +++ b/www/firefox/files/patch-security-coreconf-FreeBSD.mk @@ -1,5 +1,5 @@ ---- security/coreconf/FreeBSD.mk.orig 2010-03-16 09:57:06.000000000 +0000 -+++ security/coreconf/FreeBSD.mk 2010-03-20 17:40:12.000000000 +0000 +--- security/coreconf/FreeBSD.mk.orig 2010-02-28 23:30:04.000000000 +0000 ++++ security/coreconf/FreeBSD.mk 2010-03-03 02:05:22.000000000 +0000 @@ -49,8 +49,20 @@ ifeq ($(CPU_ARCH),pc98) CPU_ARCH = x86 diff --git a/www/firefox/files/patch-security_nss_lib_freebl_mpi_mpcpucache.c b/www/firefox/files/patch-security_nss_lib_freebl_mpi_mpcpucache.c deleted file mode 100644 index b579fc5b4995..000000000000 --- a/www/firefox/files/patch-security_nss_lib_freebl_mpi_mpcpucache.c +++ /dev/null @@ -1,44 +0,0 @@ ---- security/nss/lib/freebl/mpi/mpcpucache.c.orig 2011-02-26 18:44:42.000000000 +0100 -+++ security/nss/lib/freebl/mpi/mpcpucache.c 2011-02-26 18:46:41.000000000 +0100 -@@ -733,6 +733,33 @@ - #endif - - #if defined(__ppc64__) -+#if defined(__FreeBSD__) -+#include <sys/stddef.h> -+#include <sys/sysctl.h> -+ -+#include <machine/cpu.h> -+#include <machine/md_var.h> -+ -+unsigned long -+s_mpi_getProcessorLineSize() -+{ -+ static int cacheline_size = 0; -+ static int cachemib[] = { CTL_MACHDEP, CPU_CACHELINE }; -+ int clen; -+ -+ if (cacheline_size > 0) -+ return cacheline_size; -+ -+ clen = sizeof(cacheline_size); -+ if (sysctl(cachemib, sizeof(cachemib) / sizeof(cachemib[0]), -+ &cacheline_size, &clen, NULL, 0) < 0 || !cacheline_size) -+ return 128; /* guess */ -+ -+ return cacheline_size; -+} -+#else /* __FreeBSD__ */ -+ -+ - /* - * Sigh, The PPC has some really nice features to help us determine cache - * size, since it had lots of direct control functions to do so. The POWER -@@ -786,6 +813,7 @@ - return 0; - } - -+#endif /* __FreeBSD__ */ - #define MPI_GET_PROCESSOR_LINE_SIZE_DEFINED 1 - #endif - diff --git a/www/firefox/files/patch-toolkit_library_Makefile.in b/www/firefox/files/patch-toolkit_library_Makefile.in index d905acd5bf67..35e1cd0e7f58 100644 --- a/www/firefox/files/patch-toolkit_library_Makefile.in +++ b/www/firefox/files/patch-toolkit_library_Makefile.in @@ -5,7 +5,7 @@ $(INSTALL) $^ . -EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -+EXTRA_DSO_LDOPTS += -Wl,--warn-unresolved-symbols -Wl,--as-needed $(LIBS_DIR) $(EXTRA_DSO_LIBS) ++EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) %%PTHREAD_LIBS%% ifdef MOZ_ENABLE_LIBXUL include $(srcdir)/libxul-rules.mk diff --git a/www/firefox/files/patch-xpcom_base_nsStackWalk.cpp b/www/firefox/files/patch-xpcom_base_nsStackWalk.cpp index 3485b1509ad1..d9956b6852c3 100644 --- a/www/firefox/files/patch-xpcom_base_nsStackWalk.cpp +++ b/www/firefox/files/patch-xpcom_base_nsStackWalk.cpp @@ -1,11 +1,11 @@ ---- xpcom/base/nsStackWalk.cpp.orig 2010-01-11 02:11:49.000000000 -0500 -+++ xpcom/base/nsStackWalk.cpp 2010-01-11 02:13:26.000000000 -0500 -@@ -1132,7 +1132,7 @@ +--- xpcom/base/nsStackWalk.cpp.orig 2010-12-15 02:03:41.000000000 +0100 ++++ xpcom/base/nsStackWalk.cpp 2010-12-15 11:28:20.000000000 +0100 +@@ -1137,7 +1137,7 @@ #define __USE_GNU #endif --#if defined(HAVE_LIBDL) || defined(XP_MACOSX) -+#if defined(HAVE_LIBDL) || defined(XP_MACOSX) || defined(__FreeBSD__) +-#if defined(HAVE_DLOPEN) || defined(XP_MACOSX) ++#if defined(HAVE_DLOPEN) || defined(XP_MACOSX) || defined(__FreeBSD__) #include <dlfcn.h> #endif diff --git a/www/firefox/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in b/www/firefox/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in index 124e86202838..f514e6784489 100644 --- a/www/firefox/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in +++ b/www/firefox/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in @@ -1,6 +1,6 @@ ---- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2010-04-02 16:03:13.000000000 +0000 -+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in 2010-06-06 19:19:44.000000000 +0000 -@@ -73,6 +73,9 @@ +--- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2010-02-08 15:42:25.000000000 +0100 ++++ xpcom/reflect/xptcall/src/md/unix/Makefile.in 2010-02-09 18:31:15.000000000 +0100 +@@ -72,6 +72,9 @@ DEFINES += -DKEEP_STACK_16_BYTE_ALIGNED CPPSRCS := xptcinvoke_unixish_x86.cpp xptcstubs_unixish_x86.cpp endif @@ -10,7 +10,7 @@ endif endif -@@ -96,7 +99,7 @@ +@@ -95,7 +98,7 @@ endif endif # IA64 Linux @@ -19,18 +19,20 @@ ifneq (,$(findstring ia64,$(OS_TEST))) CPPSRCS := xptcinvoke_ipf64.cpp xptcstubs_ipf64.cpp ASFILES := xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s -@@ -111,8 +114,8 @@ - # - # FreeBSD/amd64 - # --ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDx86_64) --CPPSRCS := xptcinvoke_amd64_linux.cpp xptcstubs_amd64_linux.cpp -+ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDamd64) -+CPPSRCS := xptcinvoke_amd64_openbsd.cpp xptcstubs_amd64_openbsd.cpp +@@ -108,6 +111,12 @@ + CPPSRCS := xptcinvoke_amd64_openbsd.cpp xptcstubs_amd64_openbsd.cpp endif # ++# FreeBSD/amd64 ++# ++ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDamd64) ++CPPSRCS := xptcinvoke_amd64_openbsd.cpp xptcstubs_amd64_openbsd.cpp ++endif ++# # BeOS/Intel (uses the same unixish_x86 code) -@@ -165,9 +168,15 @@ + # + ifeq ($(OS_ARCH)$(OS_TEST),BeOSBePC) +@@ -158,9 +167,15 @@ ASFILES := xptcinvoke_asm_osf1_alpha.s xptcstubs_asm_osf1_alpha.s endif # @@ -47,7 +49,7 @@ CPPSRCS := xptcinvoke_linux_alpha.cpp xptcstubs_linux_alpha.cpp endif # -@@ -322,7 +331,7 @@ +@@ -315,7 +330,7 @@ # # Linux/PPC # @@ -56,20 +58,7 @@ CPPSRCS := xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s AS := $(CC) -c -x assembler-with-cpp -@@ -331,9 +340,9 @@ - # - # Linux/PPC64 - # --ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64) --CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp --ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s -+ifneq (,$(filter Linuxpowerpc64 FreeBSDpowerpc64,$(OS_ARCH)$(OS_TEST))) -+CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp -+ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s - AS := $(CC) -c -x assembler-with-cpp - endif - -@@ -400,6 +409,15 @@ +@@ -393,6 +408,15 @@ ASFILES := xptcinvoke_asm_sparc_netbsd.s xptcstubs_asm_sparc_netbsd.s endif # diff --git a/www/firefox/files/releng6_pulseaudio b/www/firefox/files/releng6_pulseaudio deleted file mode 100644 index 2d83f3c1c441..000000000000 --- a/www/firefox/files/releng6_pulseaudio +++ /dev/null @@ -1,32 +0,0 @@ ---- media/libsydneyaudio/src/Makefile.in.orig 2009-08-11 17:22:08.000000000 +0200 -+++ media/libsydneyaudio/src/Makefile.in 2009-08-11 17:22:36.000000000 +0200 -@@ -45,6 +45,12 @@ - LIBRARY_NAME = sydneyaudio - FORCE_STATIC_LIB= 1 - -+ifeq ($(OS_ARCH),FreeBSD) -+CSRCS = \ -+ sydney_audio_pulseaudio.c \ -+ $(NULL) -+endif -+ - ifeq ($(OS_ARCH),Linux) - CSRCS = \ - sydney_audio_alsa.c \ ---- toolkit/library/Makefile.in.orig 2009-08-11 17:22:45.000000000 +0200 -+++ toolkit/library/Makefile.in 2009-08-11 17:23:22.000000000 +0200 -@@ -231,12 +231,12 @@ - endif - - ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT)) --EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) $(MOZ_PANGO_LIBS) $(MOZ_GTK2_LIBS) $(XT_LIBS) -lgthread-2.0 -+EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) $(MOZ_PANGO_LIBS) $(MOZ_GTK2_LIBS) $(XT_LIBS) -lgthread-2.0 -lpulse -lpthread - EXTRA_DSO_LDOPTS += $(FT2_LIBS) - endif - - ifeq (qt,$(MOZ_WIDGET_TOOLKIT)) --EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XT_LIBS) $(MOZ_QT_LIBS) -lgthread-2.0 -+EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XT_LIBS) $(MOZ_QT_LIBS) -lgthread-2.0 -lpulse -lpthread - EXTRA_DSO_LDOPTS += $(FT2_LIBS) - endif - diff --git a/www/firefox/pkg-message b/www/firefox/pkg-message index 3706851229e5..0bb19f605909 100644 --- a/www/firefox/pkg-message +++ b/www/firefox/pkg-message @@ -14,7 +14,7 @@ The SSH server on remote_host must allow pub key authentication. ====================================================================== -Firefox 3.6 and HTML5 +Firefox 4.0 and HTML5 Certain functions used to display HTML5 elements need the sem module. @@ -37,7 +37,7 @@ bug reports to any other addresses. Please include the following information with any bug report: * Output from 'uname -a'. -* Date/time stamp from www/firefox/Makefile. +* Output from 'ident /usr/ports/www/firefox/Makefile' * Where/when did the problem occur: configuring, building, or running firefox * How can you reproduce the problem? |