diff options
author | Beat Gaetzi <beat@FreeBSD.org> | 2012-09-10 19:19:32 +0000 |
---|---|---|
committer | Beat Gaetzi <beat@FreeBSD.org> | 2012-09-10 19:19:32 +0000 |
commit | 734349b51e45b3b7ca3962ef3081939860edc649 (patch) | |
tree | ee00a96c55d6989c6d1c276075efa6edf489ad90 /www/libxul19 | |
parent | e6d638b4ac3b463304cc25a4335ed6b5ad5d57e6 (diff) |
Notes
Diffstat (limited to 'www/libxul19')
27 files changed, 797 insertions, 0 deletions
diff --git a/www/libxul19/Makefile b/www/libxul19/Makefile new file mode 100644 index 000000000000..5a95502167a0 --- /dev/null +++ b/www/libxul19/Makefile @@ -0,0 +1,98 @@ +# New ports collection makefile for: xulrunner +# Date created: 2006-02-20 +# Whom: Michael Johnson <ahze@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= libxul +DISTVERSION= 1.9.2.28 +PORTREVISION= 1 +CATEGORIES?= www devel +MASTER_SITES= ${MASTER_SITE_MOZILLA} +MASTER_SITE_SUBDIR= firefox/releases/3.6.28/source +DISTNAME= firefox-3.6.28.source + +MAINTAINER?= gecko@FreeBSD.org +COMMENT?= Mozilla runtime package that can be used to bootstrap XUL+XPCOM apps + +WRKSRC= ${WRKDIR}/mozilla-1.9.2 +CONFLICTS= mozilla-[0-9]* libxul-[0-9][0-9].* +GECKO_PLIST_PRE_DIRS= lib/${MOZILLA}/bin lib/${MOZILLA}/idl \ + lib/${MOZILLA}/include lib/${MOZILLA}/lib + +LATEST_LINK= libxul19 +USE_AUTOTOOLS= autoconf213:env +WANT_GNOME= yes +WANT_PERL= yes +ALL_TARGET= default +GNU_CONFIGURE= yes +USE_BZIP2= yes +USE_GMAKE= yes +MAKE_JOBS_SAFE= yes +MAKE_ENV= SKIP_GRE_REGISTRATION=1 mozappdir=${PREFIX}/lib/${MOZILLA} +LDFLAGS+= -Wl,-rpath,${PREFIX}/lib/${MOZ_RPATH} +USE_LDCONFIG= ${PREFIX}/lib/${MOZILLA} + +MOZ_OPTIONS?= --enable-application=xulrunner \ + --disable-ipc +MOZ_EXTENSIONS= default,cookie,permissions +USE_GECKO= gecko +MOZILLA_EXEC_NAME=xulrunner +USE_MOZILLA= -event -ffi -vpx +MOZ_CHROME= jar +MOZILLA_PLIST_DIRS= bin include lib share/idl +PLIST_DIRSTRY= share/idl +MOZ_PKGCONFIG_FILES= libxul-embedding libxul mozilla-gtkmozembed-embedding \ + mozilla-gtkmozembed mozilla-js mozilla-plugin + +OPTIONS_DEFINE= JAVA +JAVA_DESC?= JAVA xpcom + +.include "${.CURDIR}/../../www/firefox/Makefile.options" + +OPTIONS_DEFINE:=${OPTIONS_DEFINE:NLIBPROXY} +OPTIONS_SINGLE:=${OPTIONS_SINGLE:NTOOLKIT} + +.include <bsd.port.pre.mk> + +.if ${USE_MOZILLA:M-nss} +MOZ_PKGCONFIG_FILES+= mozilla-nss +.endif + +.if ${ARCH} == amd64 +CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL} +.elif ${ARCH} == powerpc64 +.if ${OSVERSION} < 900033 +BROKEN= Needs binutils 2.17.50 to build +.else +MOZ_EXPORT+= UNAME_m="powerpc64" +CFLAGS+= -mminimal-toc +.endif +.endif + +.if ${PORT_OPTIONS:MJAVA} +USE_JAVA= yes +JAVA_VERSION+= 1.5+ +JAVA_OS+= native +MOZ_EXPORT+= JAVA_HOME="${JAVA_HOME}" +MOZ_OPTIONS+= --enable-javaxpcom +.else +MOZ_OPTIONS+= --disable-javaxpcom +.endif + +post-patch: + ${REINPLACE_CMD} -e 's|/usr/local/include|${LOCALBASE}/include|' \ + ${WRKSRC}/js/src/config/mkdepend/Makefile.in + +pre-configure: + (cd ${WRKSRC} && ${AUTOCONF}) + (cd ${WRKSRC}/js/src/ && ${AUTOCONF}) + +post-build: + @${REINPLACE_CMD} -e "s|\(Libs:.*\)\($$\)|\1 -Wl,-rpath,${PREFIX}/lib/${MOZ_RPATH}\2| ; \ + s|%sdkdir%|%sdkdir%/sdk|g ; \ + s|%%MOZ_LIBDIR%%|${PREFIX}/lib/${MOZILLA}|g" \ + ${WRKSRC}/xulrunner/installer/*.pc.in || ${TRUE} + +.include <bsd.port.post.mk> diff --git a/www/libxul19/distinfo b/www/libxul19/distinfo new file mode 100644 index 000000000000..83cfbc26e75c --- /dev/null +++ b/www/libxul19/distinfo @@ -0,0 +1,2 @@ +SHA256 (firefox-3.6.28.source.tar.bz2) = a6c4bc52095194428cf3b17341b68ac473b7654984000c45d1be3eae55d78260 +SIZE (firefox-3.6.28.source.tar.bz2) = 51698958 diff --git a/www/libxul19/files/patch-alsapulse b/www/libxul19/files/patch-alsapulse new file mode 100644 index 000000000000..f3e0ffb31f6d --- /dev/null +++ b/www/libxul19/files/patch-alsapulse @@ -0,0 +1,122 @@ +--- config/autoconf.mk.in~ ++++ config/autoconf.mk.in +@@ -555,6 +555,14 @@ MOZ_LIBNOTIFY_CFLAGS = @MOZ_LIBNOTIFY_CF + MOZ_LIBNOTIFY_LIBS = @MOZ_LIBNOTIFY_LIBS@ + MOZ_ENABLE_LIBNOTIFY = @MOZ_ENABLE_LIBNOTIFY@ + ++MOZ_ALSA = @MOZ_ALSA@ ++MOZ_ALSA_LIBS = @MOZ_ALSA_LIBS@ ++MOZ_ALSA_CFLAGS = @MOZ_ALSA_CFLAGS@ ++ ++MOZ_PULSEAUDIO = @MOZ_PULSEAUDIO@ ++MOZ_PULSEAUDIO_LIBS = @MOZ_PULSEAUDIO_LIBS@ ++MOZ_PULSEAUDIO_CFLAGS = @MOZ_PULSEAUDIO_CFLAGS@ ++ + GLIB_CFLAGS = @GLIB_CFLAGS@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_GMODULE_LIBS = @GLIB_GMODULE_LIBS@ +--- configure.in~ ++++ configure.in +@@ -5660,15 +5660,49 @@ dnl ==================================== + + dnl If using sydneyaudio with Linux, ensure that the alsa library is available + if test "$COMPILE_ENVIRONMENT"; then +-if test -n "$MOZ_SYDNEYAUDIO"; then ++MOZ_ARG_ENABLE_BOOL(alsa, ++[ --enable-alsa Enable Alsa support], ++MOZ_ALSA=1, ++MOZ_ALSA= MOZ_ALSA_FORCE=$enableval) ++ ++if test -n "$MOZ_SYDNEYAUDIO" -a "$MOZ_ALSA_FORCE" != "no"; then + case "$target_os" in + linux*) +- AC_CHECK_LIB(asound, snd_pcm_open,,AC_MSG_ERROR([Ogg support on Linux requires the alsa library])) ++ MOZ_ALSA=1 + ;; + esac + fi ++ ++if test -n "$MOZ_ALSA"; then ++ PKG_CHECK_MODULES(MOZ_ALSA, alsa, , ++ [echo "$MOZ_ALSA_PKG_ERRORS" ++ AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])]) ++fi + fi + ++AC_SUBST(MOZ_ALSA_CFLAGS) ++AC_SUBST(MOZ_ALSA_LIBS) ++AC_SUBST(MOZ_ALSA) ++ ++dnl ======================================================== ++dnl = Enable PulseAudio ++dnl ======================================================== ++ ++MOZ_ARG_ENABLE_BOOL(pulseaudio, ++[ --enable-pulseaudio Enable PulseAudio support], ++MOZ_PULSEAUDIO=1, ++MOZ_PULSEAUDIO=) ++ ++if test -n "$MOZ_PULSEAUDIO"; then ++ PKG_CHECK_MODULES(MOZ_PULSEAUDIO, libpulse, , ++ [echo "$MOZ_PULSEAUDIO_PKG_ERRORS" ++ AC_MSG_ERROR([pulseaudio audio backend requires libpulse package])]) ++fi ++ ++AC_SUBST(MOZ_PULSEAUDIO_CFLAGS) ++AC_SUBST(MOZ_PULSEAUDIO_LIBS) ++AC_SUBST(MOZ_PULSEAUDIO) ++ + dnl ======================================================== + dnl Splashscreen + dnl ======================================================== +--- media/libsydneyaudio/src/Makefile.in~ ++++ media/libsydneyaudio/src/Makefile.in +@@ -45,12 +45,6 @@ MODULE = sydneyaudio + LIBRARY_NAME = sydneyaudio + FORCE_STATIC_LIB= 1 + +-ifeq ($(OS_ARCH),Linux) +-CSRCS = \ +- sydney_audio_alsa.c \ +- $(NULL) +-endif +- + ifneq (,$(filter WINNT WINCE,$(OS_ARCH))) + CSRCS = \ + sydney_audio_waveapi.c \ +@@ -83,6 +83,18 @@ CSRCS = \ + $(NULL) + endif + ++ifdef MOZ_ALSA ++CSRCS = \ ++ sydney_audio_alsa.c \ ++ $(NULL) ++endif ++ ++ifdef MOZ_PULSEAUDIO ++CSRCS = \ ++ sydney_audio_pulseaudio.c \ ++ $(NULL) ++endif ++ + ifeq ($(OS_ARCH),WINNT) + OS_LIBS += winmm.lib + endif +--- toolkit/library/libxul-config.mk~ ++++ toolkit/library/libxul-config.mk +@@ -90,6 +90,14 @@ endif + LOCAL_INCLUDES += -I$(topsrcdir)/widget/src/os2 + endif + ++ifdef MOZ_ALSA ++EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS) ++endif ++ ++ifdef MOZ_PULSEAUDIO ++EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS) ++endif ++ + # dependent libraries + ifdef MOZ_IPC + STATIC_LIBS += \ diff --git a/www/libxul19/files/patch-bug351181 b/www/libxul19/files/patch-bug351181 new file mode 100644 index 000000000000..c997f4c6b8ba --- /dev/null +++ b/www/libxul19/files/patch-bug351181 @@ -0,0 +1,31 @@ +--- js/src/jsnum.cpp.orig 2010-01-05 22:35:17.000000000 -0500 ++++ js/src/jsnum.cpp 2010-01-11 05:10:19.000000000 -0500 +@@ -43,6 +43,9 @@ + /* + * JS number type and wrapper class. + */ ++#if defined(__FreeBSD__) ++#include <sys/param.h> ++#endif + #ifdef XP_OS2 + #define _PC_53 PC_53 + #define _MCW_EM MCW_EM +@@ -691,8 +694,18 @@ + + #else + ++#if defined(__FreeBSD__) && __FreeBSD_version >= 601000 ++#if __BSD_VISIBLE == 0 ++#error __BSD_VISIBLE is zero, so fedisableexcept is not defined ++#endif ++#include <fenv.h> ++#define FIX_FPU() ((void)fedisableexcept(FE_ALL_EXCEPT)) ++#else ++ + #define FIX_FPU() ((void)0) + ++#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */ ++ + #endif + + JSBool diff --git a/www/libxul19/files/patch-bug653551 b/www/libxul19/files/patch-bug653551 new file mode 100644 index 000000000000..733da79a9fd8 --- /dev/null +++ b/www/libxul19/files/patch-bug653551 @@ -0,0 +1,24 @@ +commit 47ea30f +Author: Landry Breuil <landry@openbsd.org> +Date: Thu Feb 2 15:31:56 2012 +0900 + + Bug 653551 - Jaegermonkey Sparc back-end broken on sparc64. r=leon.sha +--- + js/src/configure.in | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git js/src/configure.in js/src/configure.in +index 84390cf..d663c46 100644 +--- js/src/configure.in ++++ js/src/configure.in +@@ -2471,8 +2471,10 @@ arm*-*) + NANOJIT_ARCH=ARM + ;; + sparc*-*) ++ if test ! "$HAVE_64BIT_OS" ; then + ENABLE_JIT=1 + NANOJIT_ARCH=Sparc ++ fi + ;; + esac + diff --git a/www/libxul19/files/patch-bug685258 b/www/libxul19/files/patch-bug685258 new file mode 100644 index 000000000000..598a6ea5f3d5 --- /dev/null +++ b/www/libxul19/files/patch-bug685258 @@ -0,0 +1,17 @@ +# HG changeset patch +# User Oleg Romashin <romaxa@gmail.com> +# Parent a2291c212856ad27622416e83c8311b6a33b52f1 +Bug 685258 - Pulse audio backend does not check provided playback and crashes r=derf + +diff --git a/content/media/nsAudioStream.cpp b/content/media/nsAudioStream.cpp +--- content/media/nsAudioStream.cpp ++++ content/media/nsAudioStream.cpp +@@ -83,7 +83,7 @@ void nsAudioStream::Init(PRInt32 aNumCha + mChannels = aNumChannels; + mFormat = aFormat; + if (sa_stream_create_pcm(reinterpret_cast<sa_stream_t**>(&mAudioHandle), +- NULL, ++ "Mozilla", + SA_MODE_WRONLY, + SA_PCM_FORMAT_S16_NE, + aRate, diff --git a/www/libxul19/files/patch-bug761077 b/www/libxul19/files/patch-bug761077 new file mode 100644 index 000000000000..fb12c5b15021 --- /dev/null +++ b/www/libxul19/files/patch-bug761077 @@ -0,0 +1,110 @@ +diff --git xpcom/reflect/xptcall/public/genstubs.pl xpcom/reflect/xptcall/public/genstubs.pl +index b8a87a5..918c4cf 100644 +--- xpcom/reflect/xptcall/public/genstubs.pl ++++ xpcom/reflect/xptcall/public/genstubs.pl +@@ -44,7 +44,7 @@ print OUTFILE "* 0 is QueryInterface\n"; + print OUTFILE "* 1 is AddRef\n"; + print OUTFILE "* 2 is Release\n"; + print OUTFILE "*/\n"; +-print OUTFILE "#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__))\n"; ++print OUTFILE "#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))\n"; + for($i = 0; $i < $entry_count; $i++) { + print OUTFILE "NS_IMETHOD Stub",$i+3,"();\n"; + } +diff --git xpcom/reflect/xptcall/public/xptcstubsdecl.inc xpcom/reflect/xptcall/public/xptcstubsdecl.inc +index eb66761..807db26 100644 +--- xpcom/reflect/xptcall/public/xptcstubsdecl.inc ++++ xpcom/reflect/xptcall/public/xptcstubsdecl.inc +@@ -8,7 +8,7 @@ + * 1 is AddRef + * 2 is Release + */ +-#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__)) ++#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__)) + NS_IMETHOD Stub3(); + NS_IMETHOD Stub4(); + NS_IMETHOD Stub5(); +diff --git xpcom/reflect/xptcall/src/md/unix/Makefile.in xpcom/reflect/xptcall/src/md/unix/Makefile.in +index ae6ed66..2783957 100644 +--- xpcom/reflect/xptcall/src/md/unix/Makefile.in ++++ xpcom/reflect/xptcall/src/md/unix/Makefile.in +@@ -85,7 +85,7 @@ + # New code for Linux, et. al., with gcc + # Migrate other platforms here after testing + # +-ifneq (,$(filter Linux GNU_%,$(OS_ARCH))) ++ifneq (,$(filter Linux FreeBSD GNU_%,$(OS_ARCH))) + # Linux/x86-64 + ifeq (x86_64,$(OS_TEST)) + CPPSRCS := xptcinvoke_x86_64_unix.cpp xptcstubs_x86_64_linux.cpp +@@ -70,7 +70,7 @@ endif + endif + endif + # IA64 Linux +-ifneq (,$(filter Linux,$(OS_ARCH))) ++ifneq (,$(filter Linux FreeBSD,$(OS_ARCH))) + ifneq (,$(findstring ia64,$(OS_TEST))) + CPPSRCS := xptcinvoke_ipf64.cpp xptcstubs_ipf64.cpp + ASFILES := xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s +@@ -109,12 +109,6 @@ ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDx86_64 + CPPSRCS := xptcinvoke_amd64_openbsd.cpp xptcstubs_amd64_openbsd.cpp + endif + # +-# FreeBSD/amd64 +-# +-ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDx86_64) +-CPPSRCS := xptcinvoke_amd64_linux.cpp xptcstubs_amd64_linux.cpp +-endif +-# + # BeOS/Intel (uses the same unixish_x86 code) + # + ifeq ($(OS_ARCH)$(OS_TEST),BeOSBePC) +@@ -341,7 +356,7 @@ + # + # Linux/PPC + # +-ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc) ++ifneq (,$(filter Linuxpowerpc FreeBSDpowerpc,$(OS_ARCH)$(OS_TEST))) + 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 +@@ -350,7 +365,7 @@ + # + # Linux/PPC64 + # +-ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64) ++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 +@@ -350,7 +350,7 @@ endif + # + # OpenBSD/SPARC64 + # +-ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDsparc64) ++ifneq (,$(filter OpenBSDsparc64 FreeBSDsparc64,$(OS_ARCH)$(OS_TEST))) + CPPSRCS := xptcinvoke_sparc64_openbsd.cpp xptcstubs_sparc64_openbsd.cpp + ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.s + endif +diff --git xpcom/reflect/xptcall/src/xptcprivate.h xpcom/reflect/xptcall/src/xptcprivate.h +index d903ced..e4ec832 100644 +--- xpcom/reflect/xptcall/src/xptcprivate.h ++++ xpcom/reflect/xptcall/src/xptcprivate.h +@@ -14,7 +14,7 @@ + + class xptiInterfaceEntry; + +-#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__)) ++#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__)) + #define STUB_ENTRY(n) NS_IMETHOD Stub##n() = 0; + #else + #define STUB_ENTRY(n) NS_IMETHOD Stub##n(PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64) = 0; +@@ -31,7 +31,7 @@ public: + #undef STUB_ENTRY + #undef SENTINEL_ENTRY + +-#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__)) ++#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__)) + #define STUB_ENTRY(n) NS_IMETHOD Stub##n(); + #else + #define STUB_ENTRY(n) NS_IMETHOD Stub##n(PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64); diff --git a/www/libxul19/files/patch-bug778078 b/www/libxul19/files/patch-bug778078 new file mode 100644 index 000000000000..c3d42c391a98 --- /dev/null +++ b/www/libxul19/files/patch-bug778078 @@ -0,0 +1,11 @@ +--- toolkit/xre/nsAppRunner.cpp~ ++++ toolkit/xre/nsAppRunner.cpp +@@ -3046,7 +3046,7 @@ XRE_main(int argc, char* argv[], const n + QApplication app(gArgc, gArgv); + #endif + #if defined(MOZ_WIDGET_GTK2) +-#ifdef MOZ_MEMORY ++#if defined(MOZ_MEMORY) || defined(__FreeBSD__) || defined(__NetBSD__) + // Disable the slice allocator, since jemalloc already uses similar layout + // algorithms, and using a sub-allocator tends to increase fragmentation. + // This must be done before g_thread_init() is called. diff --git a/www/libxul19/files/patch-bug781457 b/www/libxul19/files/patch-bug781457 new file mode 100644 index 000000000000..8a790ccf84a9 --- /dev/null +++ b/www/libxul19/files/patch-bug781457 @@ -0,0 +1,10 @@ +--- xpcom/base/nsStackWalk.cpp.orig 2012-05-29 00:57:31.000000000 +0200 ++++ xpcom/base/nsStackWalk.cpp 2012-06-03 12:33:40.000000000 +0200 +@@ -1123,6 +1123,7 @@ NS_StackWalk(NS_WalkStackCallback aCallb + + #elif defined(HAVE__UNWIND_BACKTRACE) + ++#define _GNU_SOURCE + // libgcc_s.so symbols _Unwind_Backtrace@@GCC_3.3 and _Unwind_GetIP@@GCC_3.0 + #include <unwind.h> + diff --git a/www/libxul19/files/patch-config_autoconf.mk.in b/www/libxul19/files/patch-config_autoconf.mk.in new file mode 100644 index 000000000000..b39d9bacf0d7 --- /dev/null +++ b/www/libxul19/files/patch-config_autoconf.mk.in @@ -0,0 +1,21 @@ +--- config/autoconf.mk.in.orig 2007-08-28 12:02:43.000000000 -0400 ++++ config/autoconf.mk.in 2007-09-26 14:21:51.000000000 -0400 +@@ -58,14 +58,14 @@ + prefix = @prefix@ + exec_prefix = @exec_prefix@ + bindir = @bindir@ +-includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++includedir = @includedir@/%%MOZILLA%% + libdir = @libdir@ + datadir = @datadir@ + mandir = @mandir@ +-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++idldir = $(datadir)/idl/%%MOZILLA%% + +-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) ++installdir = $(libdir)/%%MOZILLA%% ++sdkdir = $(libdir)/%%MOZILLA%% + + DIST = $(DEPTH)/dist + LIBXUL_SDK = @LIBXUL_SDK@ diff --git a/www/libxul19/files/patch-content-xslt-public-txDouble.h b/www/libxul19/files/patch-content-xslt-public-txDouble.h new file mode 100644 index 000000000000..cd4acfc534bf --- /dev/null +++ b/www/libxul19/files/patch-content-xslt-public-txDouble.h @@ -0,0 +1,11 @@ +--- content/xslt/public/txDouble.h.orig 2009-08-16 21:46:27.000000000 +0200 ++++ content/xslt/public/txDouble.h 2009-08-16 21:49:53.000000000 +0200 +@@ -43,7 +43,7 @@ + //A trick to handle IEEE floating point exceptions on FreeBSD - E.D. + #ifdef __FreeBSD__ + #include <ieeefp.h> +-#ifdef __alpha__ ++#if !defined(__amd64__) && !defined(__i386__) + static fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP; + #else + static fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP|FP_X_DNML; diff --git a/www/libxul19/files/patch-embedding_base_nsEmbedAPI.cpp b/www/libxul19/files/patch-embedding_base_nsEmbedAPI.cpp new file mode 100644 index 000000000000..2cc9823fed1c --- /dev/null +++ b/www/libxul19/files/patch-embedding_base_nsEmbedAPI.cpp @@ -0,0 +1,16 @@ +--- embedding/base/nsEmbedAPI.cpp.orig 2007-10-09 20:00:30.000000000 -0400 ++++ embedding/base/nsEmbedAPI.cpp 2007-10-09 20:01:45.000000000 -0400 +@@ -53,7 +53,12 @@ static PRBool sRegistryIniti + static PRUint32 sInitCounter = 0; + + #define HACK_AROUND_THREADING_ISSUES +-//#define HACK_AROUND_NONREENTRANT_INITXPCOM ++#ifdef __FreeBSD__ ++#include <sys/param.h> ++#if __FreeBSD_version < 700042 ++#define HACK_AROUND_NONREENTRANT_INITXPCOM ++#endif ++#endif + + #ifdef HACK_AROUND_NONREENTRANT_INITXPCOM + // XXX hack class to clean up XPCOM when this module is unloaded diff --git a/www/libxul19/files/patch-gfx-ots-src-os2.cc b/www/libxul19/files/patch-gfx-ots-src-os2.cc new file mode 100644 index 000000000000..231508b06a6d --- /dev/null +++ b/www/libxul19/files/patch-gfx-ots-src-os2.cc @@ -0,0 +1,11 @@ +--- gfx/ots/src/os2.cc.orig 2012-02-01 23:05:19.933087647 +0200 ++++ gfx/ots/src/os2.cc 2012-02-01 23:09:48.507582408 +0200 +@@ -2,6 +2,8 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + ++#include <stddef.h> ++ + #include "os2.h" + + #include "head.h" diff --git a/www/libxul19/files/patch-js-ctypes-libffi-configure b/www/libxul19/files/patch-js-ctypes-libffi-configure new file mode 100644 index 000000000000..3f6b66e1d628 --- /dev/null +++ b/www/libxul19/files/patch-js-ctypes-libffi-configure @@ -0,0 +1,12 @@ +--- 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/libxul19/files/patch-js-src-jslock.cpp b/www/libxul19/files/patch-js-src-jslock.cpp new file mode 100644 index 000000000000..7aea14d0ebaf --- /dev/null +++ b/www/libxul19/files/patch-js-src-jslock.cpp @@ -0,0 +1,18 @@ +--- 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/libxul19/files/patch-media-liboggz-include-oggz-oggz_off_t_generated.h b/www/libxul19/files/patch-media-liboggz-include-oggz-oggz_off_t_generated.h new file mode 100644 index 000000000000..60d8988b9f17 --- /dev/null +++ b/www/libxul19/files/patch-media-liboggz-include-oggz-oggz_off_t_generated.h @@ -0,0 +1,11 @@ +--- 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/libxul19/files/patch-media-libsydneyaudio-src-Makefile.in b/www/libxul19/files/patch-media-libsydneyaudio-src-Makefile.in new file mode 100644 index 000000000000..0812d1af8d4d --- /dev/null +++ b/www/libxul19/files/patch-media-libsydneyaudio-src-Makefile.in @@ -0,0 +1,15 @@ +--- media/libsydneyaudio/src/Makefile.in.orig 2009-08-17 14:21:06.000000000 +0200 ++++ media/libsydneyaudio/src/Makefile.in 2009-08-17 14:21:53.000000000 +0200 +@@ -45,6 +45,12 @@ + LIBRARY_NAME = sydneyaudio + FORCE_STATIC_LIB= 1 + ++ifeq ($(OS_ARCH),FreeBSD) ++CSRCS = \ ++ sydney_audio_oss.c \ ++ $(NULL) ++endif ++ + ifneq (,$(filter WINNT WINCE,$(OS_ARCH))) + CSRCS = \ + sydney_audio_waveapi.c \ diff --git a/www/libxul19/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c b/www/libxul19/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c new file mode 100644 index 000000000000..a7fd5f1ffd09 --- /dev/null +++ b/www/libxul19/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c @@ -0,0 +1,13 @@ +--- media/libsydneyaudio/src/sydney_audio_oss.c~ ++++ media/libsydneyaudio/src/sydney_audio_oss.c +@@ -446,6 +446,10 @@ static void audio_callback(void* data) + printf("!"); /* not enough audio data */ + #endif + bytes = bytes-bytes_to_copy; ++ struct timespec ts = {0, 1000000}; ++ pthread_mutex_unlock(&s->mutex); ++ nanosleep(&ts, NULL); ++ pthread_mutex_lock(&s->mutex); + break; + } + free(s->bl_head); diff --git a/www/libxul19/files/patch-modules-libpr0n-encoders-png-nsPNGDecoder.cpp b/www/libxul19/files/patch-modules-libpr0n-encoders-png-nsPNGDecoder.cpp new file mode 100644 index 000000000000..c3c6dd3a2a57 --- /dev/null +++ b/www/libxul19/files/patch-modules-libpr0n-encoders-png-nsPNGDecoder.cpp @@ -0,0 +1,74 @@ +--- modules/libpr0n/decoders/png/nsPNGDecoder.cpp.orig 2009-05-02 18:39:49.000000000 +0200 ++++ modules/libpr0n/decoders/png/nsPNGDecoder.cpp 2012-05-09 13:14:57.000000000 +0200 +@@ -116,7 +116,7 @@ void nsPNGDecoder::CreateFrame(png_uint_ + nsresult rv = mImage->AppendFrame(x_offset, y_offset, width, height, format, + &mImageData, &imageDataLength); + if (NS_FAILED(rv)) +- longjmp(mPNG->jmpbuf, 5); // NS_ERROR_OUT_OF_MEMORY ++ longjmp(png_jmpbuf(mPNG), 5); // NS_ERROR_OUT_OF_MEMORY + + mFrameRect.x = x_offset; + mFrameRect.y = y_offset; +@@ -376,7 +376,7 @@ static NS_METHOD ReadDataOut(nsIInputStr + } + + // we need to do the setjmp here otherwise bad things will happen +- if (setjmp(decoder->mPNG->jmpbuf)) { ++ if (setjmp(png_jmpbuf(decoder->mPNG))) { + png_destroy_read_struct(&decoder->mPNG, &decoder->mInfo, NULL); + + decoder->mError = PR_TRUE; +@@ -443,7 +443,8 @@ PNGGetColorProfile(png_structp png_ptr, + // First try to see if iCCP chunk is present + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_iCCP)) { + png_uint_32 profileLen; +- char *profileData, *profileName; ++ unsigned char *profileData; ++ char *profileName; + int compression; + + png_get_iCCP(png_ptr, info_ptr, &profileName, &compression, +@@ -551,7 +552,7 @@ info_callback(png_structp png_ptr, png_i + /* limit image dimensions (bug #251381) */ + #define MOZ_PNG_MAX_DIMENSION 1000000L + if (width > MOZ_PNG_MAX_DIMENSION || height > MOZ_PNG_MAX_DIMENSION) +- longjmp(decoder->mPNG->jmpbuf, 1); ++ longjmp(png_jmpbuf(decoder->mPNG), 1); + #undef MOZ_PNG_MAX_DIMENSION + + if (color_type == PNG_COLOR_TYPE_PALETTE) +@@ -667,7 +668,7 @@ info_callback(png_structp png_ptr, png_i + // the image hasn't been inited yet + decoder->mImage->Init(width, height, decoder->mObserver); + } else if (containerWidth != PRInt32(width) || containerHeight != PRInt32(height)) { +- longjmp(decoder->mPNG->jmpbuf, 5); // NS_ERROR_UNEXPECTED ++ longjmp(png_jmpbuf(decoder->mPNG), 5); // NS_ERROR_UNEXPECTED + } + + if (decoder->mObserver) +@@ -693,14 +694,14 @@ info_callback(png_structp png_ptr, png_i + decoder->mCMSLine = + (PRUint8 *)nsMemory::Alloc(bpp[channels] * width); + if (!decoder->mCMSLine) +- longjmp(decoder->mPNG->jmpbuf, 5); // NS_ERROR_OUT_OF_MEMORY ++ longjmp(png_jmpbuf(decoder->mPNG), 5); // NS_ERROR_OUT_OF_MEMORY + } + + if (interlace_type == PNG_INTERLACE_ADAM7) { + if (height < PR_INT32_MAX / (width * channels)) + decoder->interlacebuf = (PRUint8 *)nsMemory::Alloc(channels * width * height); + if (!decoder->interlacebuf) { +- longjmp(decoder->mPNG->jmpbuf, 5); // NS_ERROR_OUT_OF_MEMORY ++ longjmp(png_jmpbuf(decoder->mPNG), 5); // NS_ERROR_OUT_OF_MEMORY + } + } + +@@ -920,7 +921,7 @@ void + error_callback(png_structp png_ptr, png_const_charp error_msg) + { + PR_LOG(gPNGLog, PR_LOG_ERROR, ("libpng error: %s\n", error_msg)); +- longjmp(png_ptr->jmpbuf, 1); ++ longjmp(png_jmpbuf(png_ptr), 1); + } + + diff --git a/www/libxul19/files/patch-modules-libpr0n-encoders-png-nsPNGEncoder.cpp b/www/libxul19/files/patch-modules-libpr0n-encoders-png-nsPNGEncoder.cpp new file mode 100644 index 000000000000..9e474153007d --- /dev/null +++ b/www/libxul19/files/patch-modules-libpr0n-encoders-png-nsPNGEncoder.cpp @@ -0,0 +1,11 @@ +--- modules/libpr0n/encoders/png/nsPNGEncoder.cpp 2010-03-28 13:48:53.000000000 +0200 ++++ modules/libpr0n/encoders/png/nsPNGEncoder.cpp.orig 2010-03-28 13:46:50.000000000 +0200 +@@ -135,7 +135,7 @@ NS_IMETHODIMP nsPNGEncoder::StartImageEn + + // initialize + mPNG = png_create_write_struct(PNG_LIBPNG_VER_STRING, +- png_voidp_NULL, ++ NULL, + ErrorCallback, + ErrorCallback); + if (! mPNG) diff --git a/www/libxul19/files/patch-modules-libpref-src-prefapi.cpp b/www/libxul19/files/patch-modules-libpref-src-prefapi.cpp new file mode 100644 index 000000000000..159f0d4340ab --- /dev/null +++ b/www/libxul19/files/patch-modules-libpref-src-prefapi.cpp @@ -0,0 +1,102 @@ + +This bug is due to the fact, applications are restarted before extension +defaults are loaded. + +To reproduce, choose any preference and set the values like: +system default: + pref("prefkey",systemvalue); +extension default: + pref("prefkey", extensiondefault); +user pref: + user_pref("prefkey", systemvalue); + +Next, trigger application behaviour similar to upgrade by removing compreg.dat +from profile and start the application. + +Result: +User sees extensiondefault after upgrade, because the user_pref has been +eliminated ... which is definitly not what the user expects because he explicitly +had *systemvalue* set before the upgrade. + +Evaluation: +The bug happens because restart is performed *before* extension defaults have been +loaded and the prefapi.cpp always eliminate user preference if the user preference +is equal to the actual default (which happens to be extensiondefault normally - so +no reset, but is systemvalue during restart). + +Fix: +1. savePrefs should not try to be smart ... this patch removes the heuristic that guesses +whether a setting can be eliminated or not; it should be sufficient to only eliminate +prefs in hashPrefs. + +2. This patch prevents hashPrefs from eliminating the user pref in case we are in +*startup* ... unfortunately no such state info exists, which lets us guess that +we are in startup for the previously not dealt case: !set_default && +!pref_ValueChanged(pref->defaultPref, value, type) && !PREF_HAS_USER_VALUE(pref). + +If is the case we explicitly remember that this setting is a user-pref ... +even though it might be temporarily equal to the default pref. + +--- + modules/libpref/src/prefapi.cpp | 20 ++++++++++++++------ + 1 file changed, 14 insertions(+), 6 deletions(-) + +Index: modules/libpref/src/prefapi.cpp +=================================================================== +--- modules/libpref/src/prefapi.cpp ++++ modules/libpref/src/prefapi.cpp +@@ -324,23 +324,20 @@ + if (!pref) + return PL_DHASH_NEXT; + + nsCAutoString prefValue; + + // where we're getting our pref from + PrefValue* sourcePref; + +- if (PREF_HAS_USER_VALUE(pref) && +- pref_ValueChanged(pref->defaultPref, +- pref->userPref, +- (PrefType) PREF_TYPE(pref))) +- sourcePref = &pref->userPref; +- else if (PREF_IS_LOCKED(pref)) ++ if (PREF_IS_LOCKED(pref)) + sourcePref = &pref->defaultPref; ++ else if (PREF_HAS_USER_VALUE(pref)) ++ sourcePref = &pref->userPref; + else + // do not save default prefs that haven't changed + return PL_DHASH_NEXT; + + // strings are in quotes! + if (pref->flags & PREF_STRING) { + prefValue = '\"'; + str_escape(sourcePref->stringVal, prefValue); +@@ -742,16 +739,27 @@ + Otherwise, set the user value only if it has changed */ + if ( !pref_ValueChanged(pref->defaultPref, value, type) ) + { + if (PREF_HAS_USER_VALUE(pref)) + { + pref->flags &= ~PREF_USERSET; + if (!PREF_IS_LOCKED(pref)) + valueChanged = PR_TRUE; ++ } else { ++ // this is tricky: we have !set_default ... ++ // thus we are setting a user pref; however the user ++ // pref set is same as *current default*; this normally ++ // means to un-set ... however since we have ++ // !PREF_HAS_USER_VALUE(pref) this can only be during ++ // startup ++ pref_SetValue(&pref->userPref, value, type); ++ pref->flags |= PREF_USERSET; ++ if (!PREF_IS_LOCKED(pref)) ++ valueChanged = PR_TRUE; + } + } + else if ( !PREF_HAS_USER_VALUE(pref) || + pref_ValueChanged(pref->userPref, value, type) ) + { + pref_SetValue(&pref->userPref, value, type); + pref->flags |= PREF_USERSET; + if (!PREF_IS_LOCKED(pref)) diff --git a/www/libxul19/files/patch-security_manager_ssl_src_nsNSSComponent.cpp b/www/libxul19/files/patch-security_manager_ssl_src_nsNSSComponent.cpp new file mode 100644 index 000000000000..f30d12229ccd --- /dev/null +++ b/www/libxul19/files/patch-security_manager_ssl_src_nsNSSComponent.cpp @@ -0,0 +1,10 @@ +--- security/manager/ssl/src/nsNSSComponent.cpp.orig Mon May 29 23:10:54 2006 ++++ security/manager/ssl/src/nsNSSComponent.cpp Mon May 29 23:12:22 2006 +@@ -110,6 +110,7 @@ + #include "nss.h" + #include "pk11func.h" + #include "ssl.h" ++#define NSS_ENABLE_ECC 1 + #include "sslproto.h" + #include "secmod.h" + #include "sechash.h" diff --git a/www/libxul19/files/patch-toolkit_library_Makefile.in b/www/libxul19/files/patch-toolkit_library_Makefile.in new file mode 100644 index 000000000000..d905acd5bf67 --- /dev/null +++ b/www/libxul19/files/patch-toolkit_library_Makefile.in @@ -0,0 +1,11 @@ +--- toolkit/library/Makefile.in.orig 2010-01-11 12:13:08.000000000 -0500 ++++ toolkit/library/Makefile.in 2010-01-11 12:15:05.000000000 -0500 +@@ -181,7 +181,7 @@ + export:: $(RDF_UTIL_SRC_CPPSRCS) $(INTL_UNICHARUTIL_UTIL_CPPSRCS) + $(INSTALL) $^ . + +-EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) ++EXTRA_DSO_LDOPTS += -Wl,--warn-unresolved-symbols -Wl,--as-needed $(LIBS_DIR) $(EXTRA_DSO_LIBS) + + ifdef MOZ_ENABLE_LIBXUL + include $(srcdir)/libxul-rules.mk diff --git a/www/libxul19/files/patch-xpcom_base_nsStackWalk.cpp b/www/libxul19/files/patch-xpcom_base_nsStackWalk.cpp new file mode 100644 index 000000000000..3485b1509ad1 --- /dev/null +++ b/www/libxul19/files/patch-xpcom_base_nsStackWalk.cpp @@ -0,0 +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 @@ + #define __USE_GNU + #endif + +-#if defined(HAVE_LIBDL) || defined(XP_MACOSX) ++#if defined(HAVE_LIBDL) || defined(XP_MACOSX) || defined(__FreeBSD__) + #include <dlfcn.h> + #endif + diff --git a/www/libxul19/files/patch-xulrunner_installer_libxul-embedding.pc.in b/www/libxul19/files/patch-xulrunner_installer_libxul-embedding.pc.in new file mode 100644 index 000000000000..e7ffbd5d1a9d --- /dev/null +++ b/www/libxul19/files/patch-xulrunner_installer_libxul-embedding.pc.in @@ -0,0 +1,9 @@ +--- xulrunner/installer/libxul-embedding.pc.in~ ++++ xulrunner/installer/libxul-embedding.pc.in +@@ -6,5 +6,5 @@ idldir=%idldir% + Name: libxul-embedding + Description: Static library for version-independent embedding of the Mozilla runtime + Version: %MOZILLA_VERSION% +-Libs: -L${sdkdir}/lib -lxpcomglue -ldl ++Libs: -L${sdkdir}/lib -L%%MOZ_LIBDIR%% -lxpcomglue + Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% diff --git a/www/libxul19/files/patch-xulrunner_installer_libxul.pc.in b/www/libxul19/files/patch-xulrunner_installer_libxul.pc.in new file mode 100644 index 000000000000..279e6cd2f614 --- /dev/null +++ b/www/libxul19/files/patch-xulrunner_installer_libxul.pc.in @@ -0,0 +1,9 @@ +--- xulrunner/installer/libxul.pc.in.orig 2010-01-21 04:31:27.000000000 +0100 ++++ xulrunner/installer/libxul.pc.in 2010-06-21 19:39:57.000000000 +0200 +@@ -7,5 +7,5 @@ + Description: The Mozilla Runtime and Embedding Engine + Version: %MOZILLA_VERSION% + Requires: %NSPR_NAME% >= %NSPR_VERSION% +-Libs: -L${sdkdir}/lib -lxpcomglue_s -lxul -lxpcom ++Libs: -L${sdkdir}/lib -L%%MOZ_LIBDIR%% -lxpcomglue_s -lxul -lxpcom + Cflags: -I${includedir} %WCHAR_CFLAGS% diff --git a/www/libxul19/pkg-descr b/www/libxul19/pkg-descr new file mode 100644 index 000000000000..a4c33d7dfb77 --- /dev/null +++ b/www/libxul19/pkg-descr @@ -0,0 +1,7 @@ +Mozilla runtime package that can be used to bootstrap XUL+XPCOM applications +that are as rich as Firefox and Thunderbird. It will provide mechanisms for +installing, upgrading, and uninstalling these applications. XULRunner will +also provide libxul, a solution which allows the embedding of Mozilla +technologies in other projects and products. + +WWW: http://developer.mozilla.org/en/docs/XULRunner |