[Midnightbsd-cvs] mports [20668] trunk: first pass at a modern firefox and libxul port
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Fri Nov 6 22:43:28 EST 2015
Revision: 20668
http://svnweb.midnightbsd.org/mports/?rev=20668
Author: laffer1
Date: 2015-11-06 22:43:27 -0500 (Fri, 06 Nov 2015)
Log Message:
-----------
first pass at a modern firefox and libxul port
Modified Paths:
--------------
trunk/Mk/extensions/gecko.mk
trunk/www/libxul/Makefile
trunk/www/libxul/distinfo
Added Paths:
-----------
trunk/Mk/extensions/gecko.pre.mk
trunk/www/browser/
trunk/www/browser/Makefile
trunk/www/browser/Makefile.options
trunk/www/browser/distinfo
trunk/www/browser/files/
trunk/www/browser/files/extra-patch-bug1125514
trunk/www/browser/files/firefox.desktop.in
trunk/www/browser/files/patch-browser-app-nsBrowserApp.cpp
trunk/www/browser/files/patch-bug1013882
trunk/www/browser/files/patch-bug1021761
trunk/www/browser/files/patch-bug1026499
trunk/www/browser/files/patch-bug1041268
trunk/www/browser/files/patch-bug1130155
trunk/www/browser/files/patch-bug702179
trunk/www/browser/files/patch-bug779713
trunk/www/browser/files/patch-bug826985
trunk/www/browser/files/patch-bug847568
trunk/www/browser/files/patch-bug981348
trunk/www/browser/files/patch-bug991253
trunk/www/browser/files/patch-build-pgo-profileserver.py
trunk/www/browser/files/patch-config-baseconfig.mk
trunk/www/browser/files/patch-ijg-libjpeg
trunk/www/browser/files/patch-media-libstagefright-foundation-AString.cpp
trunk/www/browser/files/patch-media-mtransport-third_party-nICEr-src-util-mbslen.c
trunk/www/browser/files/patch-memory-jemalloc-Makefile.in
trunk/www/browser/files/patch-modules-libpref-init-all.js
trunk/www/browser/files/patch-toolkit_mozapps_installer_packager_mk
trunk/www/browser/files/patch-z-bug517422
trunk/www/browser/files/pkg-deinstall.in
trunk/www/browser/files/pkg-install.in
trunk/www/browser/pkg-descr
trunk/www/browser/pkg-message
trunk/www/libxul/files/extra-patch-bug1125514
trunk/www/libxul/files/patch-bug1013882
trunk/www/libxul/files/patch-bug1021761
trunk/www/libxul/files/patch-bug1026499
trunk/www/libxul/files/patch-bug1041268
trunk/www/libxul/files/patch-bug1073117
trunk/www/libxul/files/patch-bug1130155
trunk/www/libxul/files/patch-bug1138845
trunk/www/libxul/files/patch-bug1143411
trunk/www/libxul/files/patch-bug1143686
trunk/www/libxul/files/patch-bug1144643
trunk/www/libxul/files/patch-bug702179
trunk/www/libxul/files/patch-bug779713
trunk/www/libxul/files/patch-bug826985
trunk/www/libxul/files/patch-bug847568
trunk/www/libxul/files/patch-bug981348
trunk/www/libxul/files/patch-bug991253
trunk/www/libxul/files/patch-build-pgo-profileserver.py
trunk/www/libxul/files/patch-build_unix_run-mozilla.sh
trunk/www/libxul/files/patch-config-baseconfig.mk
trunk/www/libxul/files/patch-ijg-libjpeg
trunk/www/libxul/files/patch-media-libstagefright-foundation-AString.cpp
trunk/www/libxul/files/patch-media-mtransport-third_party-nICEr-src-util-mbslen.c
trunk/www/libxul/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp
trunk/www/libxul/files/patch-memory-jemalloc-Makefile.in
trunk/www/libxul/files/patch-toolkit_mozapps_installer_packager_mk
trunk/www/libxul/files/patch-xulrunner-stub-nsXULStub.cpp
trunk/www/libxul/files/patch-xulrunner_installer_libxul-embedding.pc.in
trunk/www/libxul/files/patch-z-bug517422
Removed Paths:
-------------
trunk/www/libxul/files/patch-modules-libpref-src-prefapi.cpp
trunk/www/libxul/files/patch-security_coreconf_FreeBSD.mk
trunk/www/libxul/files/patch-security_coreconf_MidnightBSD.mk
trunk/www/libxul/files/patch-security_manager_ssl_src_nsNSSComponent.cpp
trunk/www/libxul/files/patch-storage_build_Makefile.in
trunk/www/libxul/files/patch-toolkit_library_Makefile.in
trunk/www/libxul/files/patch-xpcom_base_nsStackWalk.cpp
trunk/www/libxul/files/patch-xpcom_glue_standalone_Makefile.in
trunk/www/libxul/files/patch-xpcom_reflect_xptcall_public_xptcstubsdecl.inc
trunk/www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in
trunk/www/libxul/files/patch-xptcall-amd64
trunk/www/libxul/files/patch-xptcall-sparc64
Modified: trunk/Mk/extensions/gecko.mk
===================================================================
--- trunk/Mk/extensions/gecko.mk 2015-11-07 03:06:40 UTC (rev 20667)
+++ trunk/Mk/extensions/gecko.mk 2015-11-07 03:43:27 UTC (rev 20668)
@@ -13,6 +13,9 @@
# followed by a +
#
+# equivalent to bsd.gecko.mk in FreeBSD
+.include "${MPORTEXTENSIONS}/gecko.pre.mk"
+
.if !defined(_INCLUDE_USES_GECKO_MK)
_INCLUDE_USES_GECKO_MK= yes
@@ -29,21 +32,22 @@
XPIDL?= ${LOCALBASE}/lib/${GECKO}/xpidl
XPIDL_INCL?= `${GECKO_CONFIG} --idlflags`
-BUILD_DEPENDS+= libxul>=31:${PORTSDIR}/www/libxul
-RUN_DEPENDS+= libxul>=31:${PORTSDIR}/www/libxul
-
+.if ${PORTNAME} != "libxul"
+BUILD_DEPENDS+= libxul>=38:${PORTSDIR}/www/libxul
+RUN_DEPENDS+= libxul>=38:${PORTSDIR}/www/libxul
+.endif
.elif ${gecko_ARGS:Mfirefox}
-_GECKO_DEFAULT_VERSION= 31
-_GECKO_VERSIONS= 31 38
+_GECKO_DEFAULT_VERSION= 38
+_GECKO_VERSIONS= 38 40
_GECKO_TYPE= firefox
# Dependence lines for different Firefox versions
-31_DEPENDS= ${LOCALBASE}/lib/firefox/firefox:${PORTSDIR}/www/browser-esr
-38_DEPENDS= ${LOCALBASE}/lib/firefox/firefox:${PORTSDIR}/www/browser
+38_DEPENDS= ${LOCALBASE}/lib/browser/browser:${PORTSDIR}/www/browser-esr
+40_DEPENDS= ${LOCALBASE}/lib/browser/browser:${PORTSDIR}/www/browser
-.if exists(${LOCALBASE}/bin/firefox)
-_GECKO_INSTALLED_VER!= ${LOCALBASE}/bin/firefox --version 2>/dev/null
+.if exists(${LOCALBASE}/bin/browser)
+_GECKO_INSTALLED_VER!= ${LOCALBASE}/bin/browser --version 2>/dev/null
_GECKO_INSTALLED_VER:= ${_GECKO_INSTALLED_VER:M[0-9][0-9]*:C/([0-9][0-9]).*/\1/g}
.endif
@@ -63,8 +67,8 @@
.elif ${gecko_ARGS:Mthunderbird}
-_GECKO_DEFAULT_VERSION= 31
-_GECKO_VERSIONS= 31
+_GECKO_DEFAULT_VERSION= 38
+_GECKO_VERSIONS= 38
_GECKO_TYPE= thunderbird
.if exists(${LOCALBASE}/bin/thunderbird)
@@ -73,7 +77,7 @@
.endif
# Dependence lines for different Thunderbird versions
-31_DEPENDS= ${LOCALBASE}/lib/thunderbird/thunderbird:${PORTSDIR}/mail/thunderbird
+38_DEPENDS= ${LOCALBASE}/lib/thunderbird/thunderbird:${PORTSDIR}/mail/thunderbird
.else
IGNORE= Unknown type of gecko dependency you may specify either libxul, firefox, seamonkey or thunderbird
Added: trunk/Mk/extensions/gecko.pre.mk
===================================================================
--- trunk/Mk/extensions/gecko.pre.mk (rev 0)
+++ trunk/Mk/extensions/gecko.pre.mk 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,605 @@
+#-*- tab-width: 4; -*-
+# ex:ts=4
+#
+# Date created: 12 Nov 2005
+# Whom: Michael Johnson <ahze at FreeBSD.org>
+#
+# $MidnightBSD$
+# $FreeBSD: head/Mk/bsd.gecko.mk 395223 2015-08-25 08:06:48Z jbeich $
+#
+# 4 column tabs prevent hair loss and tooth decay!
+
+# bsd.gecko.mk abstracts the selection of gecko-based backends. It allows users
+# and porters to support any available gecko backend without needing to build
+# many conditional tests. ${USE_GECKO} is the list of backends that your port
+# can handle, and ${GECKO} is set by bsd.gecko.mk to be the chosen backend.
+# Users set ${WITH_GECKO} to the list of gecko backends they want on their
+# system.
+
+.if defined(USE_GECKO)
+.if !defined(_POSTMKINCLUDED) && !defined(Gecko_Pre_Include)
+Gecko_Pre_Include= bsd.gecko.mk
+
+# This file contains some reusable components for mozilla ports. It's of
+# use primarily to apps from the mozilla project itself (such as Firefox,
+# Thunderbird, etc.), and probably won't be of use for gecko-based ports
+# like epiphany, galeon, etc.
+#
+# You need to make sure to add USE_GECKO=gecko to for your port can uses
+# one of these options below.
+#
+# Ports can use the following:
+#
+# USE_MOZILLA By default, it enables every system dependency
+# listed in '_ALL_DEPENDS'. If your port doesn't
+# need one of those then you can use '-' like
+# 'USE_MOZILLA= -png -vpx' to subtract the
+# dependencies. Experimental deps use '+' like
+# 'USE_MOZILLA= +speex +theora'.
+#
+# MOZILLA_PLIST_DIRS List of directories to descend into when installing
+# and creating the plist
+#
+# MOZ_PIS_SCRIPTS List of scripts residing in ${FILESDIR} to be
+# filtered through MOZCONFIG_SED and installed along
+# with our Pluggable Init Scripts (PIS)
+#
+# MOZ_SED_ARGS sed(1) commands through which MOZ_PIS_SCRIPTS are
+# filtered. There is a default set defined here, so
+# you probably want to add to MOZ_SED_ARGS rather
+# than clobber it
+#
+# MOZ_OPTIONS configure arguments (added to .mozconfig). If
+# NOMOZCONFIG is defined, you probably want to set
+# CONFIGURE_ARGS+=${MOZ_OPTIONS}
+#
+# MOZ_MK_OPTIONS The make(1) arguments (added to .mozconfig). If
+# NOMOZCONFIG is defined, you probably want to set
+# MAKE_ARGS+=${MOZ_MK_OPTIONS}
+#
+# MOZ_EXPORT Environment variables for the build process (added
+# to .mozconfig). If NOMOZCONFIG is defined, you
+# probably want to set MAKE_ENV+=${MOZ_EXPORT}
+#
+# MOZ_CHROME A variable for the --enable-chrome-format= in
+# CONFIGURE_ARGS. The default is omni.
+#
+# MOZ_TOOLKIT A variable for the --enable-default-toolkit= in
+# CONFIGURE_ARGS. The default is cairo-gtk2.
+#
+# MOZ_EXTENSIONS A list of extensions to build
+#
+# MOZ_PROTOCOLS A list of protocols to build (http, ftp, etc.)
+#
+# PORT_MOZCONFIG Defaults to ${FILESDIR}/mozconfig.in, but can be
+# set to a generic mozconfig included with the port
+#
+# NOMOZCONFIG Don't drop a customized .mozconfig into the build
+# directory. Options will have to be specified in
+# CONFIGURE_ARGS instead
+#
+
+MAINTAINER?= ports at MidnightBSD.org
+
+MOZILLA?= ${PORTNAME}
+MOZILLA_VER?= ${PORTVERSION}
+MOZILLA_BIN?= ${PORTNAME}-bin
+MOZILLA_EXEC_NAME?=${MOZILLA}
+MOZ_RPATH?= ${MOZILLA}
+USES+= cpe compiler:c++11-lang gmake iconv perl5 pkgconfig \
+ python:2.7,build desktop-file-utils
+CPE_VENDOR?=mozilla
+USE_PERL5= build
+USE_XORG= xext xrender xt
+
+.if ${MOZILLA} != "libxul"
+BUNDLE_LIBS= yes
+.endif
+
+MOZILLA_SUFX?= none
+MOZSRC?= ${WRKSRC}
+WRKSRC?= ${WRKDIR}/mozilla
+PLISTF?= ${WRKDIR}/plist_files
+
+MOZ_OBJDIR?= ${WRKSRC}/obj-${CONFIGURE_TARGET}
+
+MOZ_PIS_DIR?= lib/${MOZILLA}/init.d
+
+PORT_MOZCONFIG?= ${FILESDIR}/mozconfig.in
+MOZCONFIG?= ${WRKSRC}/.mozconfig
+# XXX Not ?= because fmake uses MAKEFILE internally
+MAKEFILE= ${WRKSRC}/client.mk
+MOZILLA_PLIST_DIRS?= bin lib share/pixmaps share/applications
+PKGINSTALL?= ${WRKDIR}/pkg-install
+PKGDEINSTALL?= ${WRKDIR}/pkg-deinstall
+PKGINSTALL_INC?= ${.CURDIR}/../../www/browser/files/pkg-install.in
+PKGDEINSTALL_INC?= ${.CURDIR}/../../www/browser/files/pkg-deinstall.in
+
+MOZ_PKGCONFIG_FILES?= ${MOZILLA}-gtkmozembed ${MOZILLA}-js \
+ ${MOZILLA}-xpcom ${MOZILLA}-plugin
+
+ALL_TARGET?= build
+
+CONFIGURE_TARGET:=${ARCH:C/amd64/x86_64/}-portbld-freebsd9.1
+MOZ_EXPORT+= ${CONFIGURE_ENV} \
+ PERL="${PERL}"
+MOZ_OPTIONS+= ${CONFIGURE_TARGET} --prefix="${PREFIX}"
+MOZ_MK_OPTIONS+=MOZ_OBJDIR="${MOZ_OBJDIR}"
+
+CPPFLAGS+= -isystem${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib -Wl,-rpath,${PREFIX}/lib/${MOZILLA}
+
+# Standard depends
+_ALL_DEPENDS= cairo event ffi graphite harfbuzz hunspell icu jpeg nspr nss opus png pixman soundtouch sqlite vorbis vpx
+
+.if ! ${PORT_OPTIONS:MBUNDLED_CAIRO}
+cairo_LIB_DEPENDS= libcairo.so:${PORTSDIR}/graphics/cairo
+cairo_MOZ_OPTIONS= --enable-system-cairo
+.endif
+
+event_LIB_DEPENDS= libevent.so:${PORTSDIR}/devel/libevent2
+event_MOZ_OPTIONS= --with-system-libevent
+
+ffi_LIB_DEPENDS= libffi.so:${PORTSDIR}/devel/libffi
+ffi_MOZ_OPTIONS= --enable-system-ffi
+
+.if exists(${FILESDIR}/patch-bug847568)
+graphite_LIB_DEPENDS= libgraphite2.so:${PORTSDIR}/graphics/graphite2
+graphite_MOZ_OPTIONS= --with-system-graphite2
+
+harfbuzz_LIB_DEPENDS= libharfbuzz.so:${PORTSDIR}/print/harfbuzz
+harfbuzz_MOZ_OPTIONS= --with-system-harfbuzz
+.endif
+
+hunspell_LIB_DEPENDS= libhunspell-1.3.so:${PORTSDIR}/textproc/hunspell
+hunspell_MOZ_OPTIONS= --enable-system-hunspell
+
+icu_LIB_DEPENDS= libicui18n.so:${PORTSDIR}/devel/icu
+icu_MOZ_OPTIONS= --with-system-icu --with-intl-api
+
+-jpeg_BUILD_DEPENDS=yasm:${PORTSDIR}/devel/yasm
+# XXX JCS_EXTENSIONS API is currently disabled by r371283
+# XXX Remove files/patch-ijg-libjpeg once -turbo is default
+jpeg_USES= jpeg
+jpeg_MOZ_OPTIONS= --with-system-jpeg=${LOCALBASE}
+
+nspr_LIB_DEPENDS= libnspr4.so:${PORTSDIR}/devel/nspr
+nspr_MOZ_OPTIONS= --with-system-nspr
+
+nss_LIB_DEPENDS= libnss3.so:${PORTSDIR}/security/nss
+nss_MOZ_OPTIONS= --with-system-nss
+
+.if exists(${FILESDIR}/patch-z-bug517422)
+opus_LIB_DEPENDS= libopus.so:${PORTSDIR}/audio/opus
+opus_MOZ_OPTIONS= --with-system-opus
+.endif
+
+pixman_LIB_DEPENDS= libpixman-1.so:${PORTSDIR}/x11/pixman
+pixman_MOZ_OPTIONS= --enable-system-pixman
+
+png_LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png
+png_MOZ_OPTIONS= --with-system-png=${LOCALBASE}
+
+.if exists(${FILESDIR}/patch-z-bug517422)
+soundtouch_LIB_DEPENDS= libSoundTouch.so:${PORTSDIR}/audio/soundtouch
+soundtouch_MOZ_OPTIONS= --with-system-soundtouch
+
+# XXX disabled: bug 913854 not yet upstreamed
+speex_LIB_DEPENDS= libspeexdsp.so:${PORTSDIR}/audio/speex
+speex_MOZ_OPTIONS= --with-system-speex
+.endif
+
+sqlite_LIB_DEPENDS= libsqlite3.so:${PORTSDIR}/databases/sqlite3
+sqlite_MOZ_OPTIONS= --enable-system-sqlite
+
+.if exists(${FILESDIR}/patch-z-bug517422)
+# XXX disabled: update to 1.2.x or review backported fixes
+theora_LIB_DEPENDS= libtheora.so:${PORTSDIR}/multimedia/libtheora
+theora_MOZ_OPTIONS= --with-system-theora
+
+vorbis_LIB_DEPENDS= libvorbis.so:${PORTSDIR}/audio/libvorbis
+vorbis_MOZ_OPTIONS= --with-system-vorbis --with-system-ogg
+.endif
+
+-vpx_BUILD_DEPENDS= yasm:${PORTSDIR}/devel/yasm
+vpx_LIB_DEPENDS= libvpx.so:${PORTSDIR}/multimedia/libvpx
+vpx_MOZ_OPTIONS= --with-system-libvpx
+
+.for use in ${USE_MOZILLA}
+${use:S/-/_WITHOUT_/}= ${TRUE}
+.endfor
+
+.for dep in ${_ALL_DEPENDS} ${USE_MOZILLA:M+*:S/+//}
+.if !defined(_WITHOUT_${dep})
+BUILD_DEPENDS+= ${${dep}_BUILD_DEPENDS}
+LIB_DEPENDS+= ${${dep}_LIB_DEPENDS}
+RUN_DEPENDS+= ${${dep}_RUN_DEPENDS}
+USES+= ${${dep}_USES}
+MOZ_OPTIONS+= ${${dep}_MOZ_OPTIONS}
+.else
+BUILD_DEPENDS+= ${-${dep}_BUILD_DEPENDS}
+.endif
+.endfor
+
+# Standard options
+MOZ_CHROME?= omni
+MOZ_TOOLKIT?= cairo-gtk2
+MOZ_OPTIONS+= \
+ --enable-chrome-format=${MOZ_CHROME} \
+ --enable-default-toolkit=${MOZ_TOOLKIT} \
+ --with-pthreads
+# Configure options for install
+.if !defined(MOZ_EXTENSIONS)
+MOZ_OPTIONS+= --enable-extensions=default
+.else
+MOZ_OPTIONS+= --enable-extensions=${MOZ_EXTENSIONS}
+.endif
+.if !defined(MOZ_PROTOCOLS)
+MOZ_OPTIONS+= --enable-necko-protocols=default
+.else
+MOZ_OPTIONS+= --enable-necko-protocols=${MOZ_PROTOCOLS}
+.endif
+# others
+MOZ_OPTIONS+= --with-system-zlib \
+ --with-system-bz2 \
+ --enable-unified-compilation \
+ --disable-debug-symbols \
+ --disable-glibtest \
+ --disable-gtktest \
+ --disable-freetypetest \
+ --disable-installer \
+ --disable-updater \
+ --disable-pedantic
+
+# API keys from www/chromium
+# http://www.chromium.org/developers/how-tos/api-keys
+# Note: these are for FreeBSD use ONLY. For your own distribution,
+# please get your own set of keys.
+MOZ_EXPORT+= MOZ_GOOGLE_API_KEY=AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8 \
+ MOZ_GOOGLE_OAUTH_API_CLIENTID=996322985003.apps.googleusercontent.com \
+ MOZ_GOOGLE_OAUTH_API_KEY=IR1za9-1VK0zZ0f_O8MVFicn
+
+.if ${PORT_OPTIONS:MGTK3}
+MOZ_TOOLKIT= cairo-gtk3
+.endif
+
+.if ${MOZ_TOOLKIT:Mcairo-qt}
+# don't use - transparent backgrounds (bug 521582),
+USE_MOZILLA+= -cairo # ports/169343
+USE_DISPLAY=yes # install
+USE_GNOME+= pango
+USE_QT5+= qmake_build buildtools_build gui network quick printsupport
+MOZ_EXPORT+= HOST_QMAKE="${QMAKE}" HOST_MOC="${MOC}" HOST_RCC="${RCC}"
+.elif ${MOZ_TOOLKIT:Mcairo-gtk3}
+USE_GNOME+= gtk30
+. if ${MOZILLA_VER:R:R} >= 32
+USE_GNOME+= gtk20 # bug 624422
+. endif
+.else # gtk2, cairo-gtk2
+USE_GNOME+= gtk20
+.endif
+
+.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
+CFLAGS+= -O3
+MOZ_EXPORT+= MOZ_OPTIMIZE_FLAGS="${CFLAGS:M-O*}"
+MOZ_OPTIONS+= --enable-optimize
+.else
+MOZ_OPTIONS+= --disable-optimize
+.endif
+
+.if ${PORT_OPTIONS:MCANBERRA}
+RUN_DEPENDS+= libcanberra>0:${PORTSDIR}/audio/libcanberra
+.endif
+
+.if ${PORT_OPTIONS:MDBUS}
+BUILD_DEPENDS+= libnotify>0:${PORTSDIR}/devel/libnotify
+LIB_DEPENDS+= libdbus-glib-1.so:${PORTSDIR}/devel/dbus-glib \
+ libstartup-notification-1.so:${PORTSDIR}/x11/startup-notification
+MOZ_OPTIONS+= --enable-startup-notification
+.else
+MOZ_OPTIONS+= --disable-dbus --disable-libnotify
+.endif
+
+.if ${PORT_OPTIONS:MGSTREAMER}
+USE_GSTREAMER1?=good libav
+MOZ_OPTIONS+= --enable-gstreamer=1.0
+.else
+MOZ_OPTIONS+= --disable-gstreamer
+.endif
+
+.if ${PORT_OPTIONS:MGCONF}
+BUILD_DEPENDS+= ${gconf2_DETECT}:${gconf2_LIB_DEPENDS:C/.*://}
+USE_GNOME+= gconf2:build
+MOZ_OPTIONS+= --enable-gconf
+.else
+MOZ_OPTIONS+= --disable-gconf
+.endif
+
+.if ${PORT_OPTIONS:MGIO} && ! ${MOZ_TOOLKIT:Mcairo-qt}
+MOZ_OPTIONS+= --enable-gio
+.else
+MOZ_OPTIONS+= --disable-gio
+.endif
+
+.if ${PORT_OPTIONS:MGNOMEUI}
+BUILD_DEPENDS+= ${libgnomeui_DETECT}:${libgnomeui_LIB_DEPENDS:C/.*://}
+USE_GNOME+= libgnomeui:build
+MOZ_OPTIONS+= --enable-gnomeui
+.else
+MOZ_OPTIONS+= --disable-gnomeui
+.endif
+
+.if ${PORT_OPTIONS:MLIBPROXY}
+LIB_DEPENDS+= libproxy.so:${PORTSDIR}/net/libproxy
+MOZ_OPTIONS+= --enable-libproxy
+.else
+MOZ_OPTIONS+= --disable-libproxy
+.endif
+
+.if ${PORT_OPTIONS:MPGO}
+USES:= compiler:gcc-c++11-lib ${USES:Ncompiler*c++11*}
+USE_DISPLAY=yes
+
+ALL_TARGET= profiledbuild
+MOZ_EXPORT+=MOZ_OPTIMIZE_FLAGS="-Os" MOZ_PGO_OPTIMIZE_FLAGS="${CFLAGS:M-O*}"
+.endif
+
+.if ${PORT_OPTIONS:MALSA}
+LIB_DEPENDS+= libasound.so:${PORTSDIR}/audio/alsa-lib
+RUN_DEPENDS+= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins
+MOZ_OPTIONS+= --enable-alsa
+.endif
+
+.if ${PORT_OPTIONS:MPULSEAUDIO}
+. if ${PORT_OPTIONS:MALSA}
+BUILD_DEPENDS+= pulseaudio>0:${PORTSDIR}/audio/pulseaudio
+. else
+# pull pulse package if we cannot fallback to another backend
+LIB_DEPENDS+= libpulse.so:${PORTSDIR}/audio/pulseaudio
+. endif
+MOZ_OPTIONS+= --enable-pulseaudio
+.else
+MOZ_OPTIONS+= --disable-pulseaudio
+.endif
+
+.if ${PORT_OPTIONS:MDEBUG}
+MOZ_OPTIONS+= --enable-debug --disable-release
+STRIP= # ports/184285
+.else
+MOZ_OPTIONS+= --disable-debug --enable-release
+.endif
+
+.if ${PORT_OPTIONS:MDTRACE}
+MOZ_OPTIONS+= --enable-dtrace
+. if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100061
+LIBS+= -lelf
+. endif
+STRIP=
+.else
+MOZ_OPTIONS+= --disable-dtrace
+.endif
+
+.if ${MOZILLA_VER:R:R} < 40
+. if ${PORT_OPTIONS:MLOGGING} || ${PORT_OPTIONS:MDEBUG}
+MOZ_OPTIONS+= --enable-logging
+. else
+MOZ_OPTIONS+= --disable-logging
+. endif
+.endif
+
+.if ${PORT_OPTIONS:MPROFILE}
+MOZ_OPTIONS+= --enable-profiling
+STRIP=
+.else
+MOZ_OPTIONS+= --disable-profiling
+.endif
+
+.if ${PORT_OPTIONS:MTEST}
+USE_XORG+= xscrnsaver
+MOZ_OPTIONS+= --enable-tests
+.else
+MOZ_OPTIONS+= --disable-tests
+.endif
+
+.if !defined(STRIP) || ${STRIP} == ""
+MOZ_OPTIONS+= --disable-strip --disable-install-strip
+.else
+MOZ_OPTIONS+= --enable-strip --enable-install-strip
+.endif
+
+# _MAKE_JOBS is only available after bsd.port.post.mk, thus cannot be
+# used in .mozconfig. And client.mk automatically uses -jN where N
+# is what multiprocessing.cpu_count() returns.
+.if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE)
+MAKE_JOBS_NUMBER= 1
+.endif
+.if defined(MAKE_JOBS_NUMBER)
+MOZ_MAKE_FLAGS+=-j${MAKE_JOBS_NUMBER}
+.endif
+
+.if defined(MOZ_MAKE_FLAGS)
+MOZ_MK_OPTIONS+=MOZ_MAKE_FLAGS="${MOZ_MAKE_FLAGS}"
+.endif
+
+MOZ_SED_ARGS+= -e's|@CPPFLAGS@|${CPPFLAGS}|g' \
+ -e 's|@CFLAGS@|${CFLAGS}|g' \
+ -e 's|@LDFLAGS@|${LDFLAGS}|g' \
+ -e 's|@LIBS@|${LIBS}|g' \
+ -e 's|@LOCALBASE@|${LOCALBASE}|g' \
+ -e 's|@PERL@|${PERL5}|g' \
+ -e 's|@MOZDIR@|${PREFIX}/lib/${MOZILLA}|g' \
+ -e 's|%%PREFIX%%|${PREFIX}|g' \
+ -e 's|%%CFLAGS%%|${CFLAGS}|g' \
+ -e 's|%%LDFLAGS%%|${LDFLAGS}|g' \
+ -e 's|%%LIBS%%|${LIBS}|g' \
+ -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ -e 's|%%PERL%%|${PERL5}|g' \
+ -e 's|%%MOZILLA%%|${MOZILLA}|g' \
+ -e 's|%%MOZILLA_BIN%%|${MOZILLA_BIN}|g' \
+ -e 's|%%MOZDIR%%|${PREFIX}/lib/${MOZILLA}|g'
+MOZCONFIG_SED?= ${SED} ${MOZ_SED_ARGS}
+
+.if ${ARCH} == amd64
+. if ${USE_MOZILLA:M-nss}
+USE_BINUTILS= # intel-gcm.s
+CFLAGS+= -B${LOCALBASE}/bin
+LDFLAGS+= -B${LOCALBASE}/bin
+. if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000041 && \
+ exists(/usr/lib/libcxxrt.so) && ${CXXFLAGS:M-stdlib=libc++}
+LIBS+= -lcxxrt
+. endif
+. endif
+.elif ${ARCH:Mpowerpc*}
+USES:= compiler:gcc-c++11-lib ${USES:Ncompiler*c++11*}
+. if ${ARCH} == "powerpc64"
+MOZ_EXPORT+= UNAME_m="${ARCH}"
+CFLAGS+= -mminimal-toc
+. endif
+.elif ${ARCH} == "sparc64"
+# Work around miscompilation/mislinkage of the sCanonicalVTable hacks.
+MOZ_OPTIONS+= --disable-v1-string-abi
+.endif
+
+.else # bsd.port.post.mk
+
+pre-extract: gecko-pre-extract
+
+gecko-pre-extract:
+.if ${PORT_OPTIONS:MPGO}
+ @${ECHO} "*****************************************************************"
+ @${ECHO} "**************************** attention **************************"
+ @${ECHO} "*****************************************************************"
+ @${ECHO} "To build ${MOZILLA} 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 ${MOZILLA} instance will start and run some test."
+ @${ECHO} " Do not interrupt or close ${MOZILLA} during this tests! "
+ @${ECHO} "*****************************************************************"
+ @sleep 10
+.endif
+
+post-patch: gecko-post-patch gecko-moz-pis-patch
+
+gecko-post-patch:
+.if exists(${PKGINSTALL_INC})
+ @${MOZCONFIG_SED} < ${PKGINSTALL_INC} > ${PKGINSTALL}
+.endif
+.if exists(${PKGDEINSTALL_INC})
+ @${MOZCONFIG_SED} < ${PKGDEINSTALL_INC} > ${PKGDEINSTALL}
+.endif
+ @${RM} -f ${MOZCONFIG}
+.if !defined(NOMOZCONFIG)
+ @if [ -e ${PORT_MOZCONFIG} ] ; then \
+ ${MOZCONFIG_SED} < ${PORT_MOZCONFIG} >> ${MOZCONFIG} ; \
+ fi
+.for arg in ${MOZ_OPTIONS}
+ @${ECHO_CMD} ac_add_options ${arg:Q} >> ${MOZCONFIG}
+.endfor
+.for arg in ${MOZ_MK_OPTIONS}
+ @${ECHO_CMD} mk_add_options ${arg:Q} >> ${MOZCONFIG}
+.endfor
+.for var in ${MOZ_EXPORT}
+ @${ECHO_CMD} export ${var:Q} >> ${MOZCONFIG}
+.endfor
+.endif # .if !defined(NOMOZCONFIG)
+.if exists(${MOZSRC}/build/unix/mozilla-config.in)
+ @${REINPLACE_CMD} -e 's/%{idldir}/%idldir%/g ; \
+ s|"%FULL_NSPR_CFLAGS%"|`nspr-config --cflags`|g ; \
+ s|"%FULL_NSPR_LIBS%"|`nspr-config --libs`|g' \
+ ${MOZSRC}/build/unix/mozilla-config.in
+.endif
+.if ${USE_MOZILLA:M-nspr}
+ @${ECHO_MSG} "===> Applying NSPR patches"
+ @for i in ${.CURDIR}/../../devel/nspr/files/patch-*; do \
+ ${PATCH} ${PATCH_ARGS} -d ${MOZSRC}/nsprpub/build < $$i; \
+ done
+.endif
+.if ${USE_MOZILLA:M-nss}
+ @${ECHO_MSG} "===> Applying NSS patches"
+ @for i in ${.CURDIR}/../../security/nss/files/patch-*; do \
+ ${PATCH} ${PATCH_ARGS} -d ${MOZSRC}/security/nss < $$i; \
+ done
+.endif
+ @for f in \
+ ${WRKSRC}/directory/c-sdk/config/FreeBSD.mk \
+ ${WRKSRC}/directory/c-sdk/configure \
+ ${MOZSRC}/security/coreconf/FreeBSD.mk \
+ ${MOZSRC}/js/src/Makefile.in \
+ ${MOZSRC}/js/src/configure \
+ ${MOZSRC}/configure \
+ ${WRKSRC}/configure; do \
+ if [ -f $$f ] ; then \
+ ${REINPLACE_CMD} -Ee 's|-lc_r|-pthread|g ; \
+ s|-l?pthread|-pthread|g ; \
+ s|echo aout|echo elf|g ; \
+ s|/usr/X11R6|${LOCALBASE}|g' \
+ $$f; \
+ fi; \
+ done
+ @if [ -f ${WRKSRC}/config/baseconfig.mk ] ; then \
+ ${REINPLACE_CMD} -e 's|%%MOZILLA%%|${MOZILLA}|g' \
+ ${WRKSRC}/config/baseconfig.mk; \
+ fi
+ @${REINPLACE_CMD} -e 's|%%MOZILLA%%|${MOZILLA}|g' \
+ ${MOZSRC}/config/baseconfig.mk
+ @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g ; \
+ s|%%LOCALBASE%%|${LOCALBASE}|g' \
+ ${MOZSRC}/build/unix/run-mozilla.sh
+ @${REINPLACE_CMD} -e 's|/usr/local/netscape|${LOCALBASE}|g ; \
+ s|/usr/local/lib/netscape|${LOCALBASE}/lib|g' \
+ ${MOZSRC}/xpcom/io/SpecialSystemDirectory.cpp
+ @${REINPLACE_CMD} -e 's|/etc|${PREFIX}&|g' \
+ ${MOZSRC}/xpcom/build/nsXPCOMPrivate.h
+ @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
+ -e 's|mozilla/plugins|browser_plugins|g' \
+ -e 's|share/mozilla/extensions|lib/xpi|g' \
+ ${MOZSRC}/xpcom/io/nsAppFileLocationProvider.cpp \
+ ${MOZSRC}/toolkit/xre/nsXREDirProvider.cpp
+ @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ ${MOZSRC}/extensions/spellcheck/hunspell/src/mozHunspell.cpp
+
+# handles mozilla pis scripts.
+gecko-moz-pis-patch:
+.for moz in ${MOZ_PIS_SCRIPTS}
+ @${MOZCONFIG_SED} < ${FILESDIR}/${moz} > ${WRKDIR}/${moz}
+.endfor
+
+do-configure: gecko-do-configure
+
+gecko-do-configure:
+ @(if ! ${CONFIGURE_ENV} ${DO_MAKE_BUILD} configure; then \
+ ${ECHO_MSG} "===> Script \"${CONFIGURE_SCRIPT}\" failed unexpectedly."; \
+ (${ECHO_CMD} ${CONFIGURE_FAIL_MESSAGE}) | ${FMT} 75 79 ; \
+ ${FALSE}; \
+ fi)
+
+pre-install: gecko-moz-pis-pre-install
+post-install-script: gecko-create-plist
+
+gecko-create-plist: port-post-install
+
+.if !target(port-post-install)
+port-post-install:
+ @${DO_NADA}
+.endif
+
+gecko-create-plist:
+# Create the plist
+ ${RM} -f ${PLISTF}
+.for dir in ${MOZILLA_PLIST_DIRS}
+ @cd ${PREFIX}/${dir} && ${FIND} -H -s * ! -type d | \
+ ${SED} -e 's|^|${dir}/|' >> ${PLISTF}
+.endfor
+ ${CAT} ${PLISTF} | ${SORT} >> ${TMPPLIST}
+
+gecko-moz-pis-pre-install:
+.if defined(MOZ_PIS_SCRIPTS)
+ ${MKDIR} ${PREFIX}/${MOZ_PIS_DIR}
+.for moz in ${MOZ_PIS_SCRIPTS}
+ ${INSTALL_SCRIPT} ${WRKDIR}/${moz} ${PREFIX}/${MOZ_PIS_DIR}
+.endfor
+.endif
+
+.endif
+.endif
+# HERE THERE BE TACOS -- adamw
Property changes on: trunk/Mk/extensions/gecko.pre.mk
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/Makefile
===================================================================
--- trunk/www/browser/Makefile (rev 0)
+++ trunk/www/browser/Makefile 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,100 @@
+# $MidnightBSD$
+
+PORTNAME= firefox
+DISTVERSION= 40.0
+DISTVERSIONSUFFIX=.source
+PORTEPOCH= 1
+CATEGORIES= www ipv6
+MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
+ MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build5/source
+
+MAINTAINER= ports at MidnightBSD.org
+COMMENT= Web browser based on the browser portion of Mozilla
+
+LICENSE= mpl
+
+BUILD_DEPENDS= nspr>=4.10.8:${PORTSDIR}/devel/nspr \
+ nss>=3.19.2:${PORTSDIR}/security/nss \
+ libevent2>=2.0.21_2:${PORTSDIR}/devel/libevent2 \
+ soundtouch>=1.8.0:${PORTSDIR}/audio/soundtouch \
+ harfbuzz>=0.9.34:${PORTSDIR}/print/harfbuzz \
+ graphite2>=1.2.4:${PORTSDIR}/graphics/graphite2 \
+ libvorbis>=1.3.5:${PORTSDIR}/audio/libvorbis \
+ libvpx>=1.3.0:${PORTSDIR}/multimedia/libvpx \
+ sqlite3>=3.8.9:${PORTSDIR}/databases/sqlite3 \
+ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \
+ v4l_compat>0:${PORTSDIR}/multimedia/v4l_compat \
+ autoconf-2.13:${PORTSDIR}/devel/autoconf213 \
+ zip:${PORTSDIR}/archivers/zip \
+ unzip:${PORTSDIR}/archivers/unzip
+# opus>=1.1:${PORTSDIR}/audio/opus \
+
+LIB_DEPENDS= libv4l2.so:${PORTSDIR}/multimedia/libv4l
+
+USE_GECKO= gecko
+CONFLICTS_INSTALL= firefox-esr-31.* firefox-esr-24.* firefox-esr-17.*
+MOZ_PKGCONFIG_FILES= # empty
+USE_MOZILLA= -opus
+MOZILLA_NAME= Firefox
+
+USE_QT5= # empty
+QT_NONSTANDARD= yes
+USE_GL= gl
+USES= dos2unix tar:bzip2
+DOS2UNIX_FILES= media/webrtc/trunk/webrtc/system_wrappers/source/spreadsortlib/spreadsort.hpp
+
+FIREFOX_ICON= ${MOZILLA}.png
+FIREFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/browser/chrome/icons/default/default48.png
+MOZ_OPTIONS= --program-transform-name='s/firefox/${MOZILLA}/' \
+ --enable-application=browser \
+ --enable-official-branding
+MAKE_ENV+= __FreeBSD__=9 __FreeBSD__version=90004
+
+OPTIONS_EXCLUDE= LOGGING
+OPTIONS_DEFAULT= GTK2
+
+OPTIONS_SINGLE+= TOOLKIT
+OPTIONS_SINGLE_TOOLKIT= GTK2 GTK3
+
+.include "${.CURDIR}/../../www/browser/Makefile.options"
+.include <bsd.port.pre.mk>
+
+WRKSRC:= ${WRKDIR}/mozilla-release
+
+.if ${PORT_OPTIONS:MALSA}
+RUN_DEPENDS+= alsa-lib>=1.0.27.2_1:${PORTSDIR}/audio/alsa-lib
+.endif
+
+.if ! ${PORT_OPTIONS:MBUNDLED_CAIRO}
+BUILD_DEPENDS+= cairo>=1.12.16_1,2:${PORTSDIR}/graphics/cairo
+.endif
+
+.if ${PORT_OPTIONS:MGSTREAMER}
+RUN_DEPENDS+= gstreamer1-libav>=1.2.4_1:${PORTSDIR}/multimedia/gstreamer1-libav
+.endif
+
+.if ${PORT_OPTIONS:MGTK3}
+BUILD_DEPENDS+= gtk3>=3.14.6:${PORTSDIR}/x11-toolkits/gtk30
+.endif
+
+post-extract: dos2unix
+ @${SED} -e 's|@FIREFOX_ICON@|${FIREFOX_ICON}|' -e 's|@MOZILLA@|${MOZILLA}|' \
+ -e 's|@MOZILLA_NAME@|${MOZILLA_NAME}|' \
+ <${FILESDIR}/firefox.desktop.in >${WRKDIR}/${MOZILLA}.desktop
+
+post-patch:
+ @${REINPLACE_CMD} -e '/MOZPNG/s/=[0-9]*/=10511/' \
+ ${WRKSRC}/configure.in
+ @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ ${WRKSRC}/browser/app/nsBrowserApp.cpp
+
+pre-configure:
+ (cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf-2.13)
+ (cd ${WRKSRC}/js/src/ && ${LOCALBASE}/bin/autoconf-2.13)
+
+post-install:
+ ${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps
+ ${INSTALL_DATA} ${WRKDIR}/${MOZILLA}.desktop ${STAGEDIR}${PREFIX}/share/applications/
+ ${LN} -sf ${FIREFOX_ICON_SRC} ${STAGEDIR}${PREFIX}/share/pixmaps/${FIREFOX_ICON}
+
+.include <bsd.port.post.mk>
Property changes on: trunk/www/browser/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/Makefile.options
===================================================================
--- trunk/www/browser/Makefile.options (rev 0)
+++ trunk/www/browser/Makefile.options 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,18 @@
+# -*- makefile-bsdmake -*-
+
+OPTIONS_DEFINE+= BUNDLED_CAIRO CANBERRA DBUS DEBUG DTRACE GCONF GIO \
+ GNOMEUI GSTREAMER LIBPROXY LOGGING OPTIMIZED_CFLAGS \
+ PGO PROFILE TEST
+
+OPTIONS_DEFAULT+= ALSA DBUS GIO GSTREAMER LOGGING OPTIMIZED_CFLAGS
+
+OPTIONS_MULTI+= AUDIO
+OPTIONS_MULTI_AUDIO= ALSA PULSEAUDIO
+
+BUNDLED_CAIRO_DESC?= Use bundled fork of cairo-1.9.5
+CANBERRA_DESC?= Sound theme alerts
+ENIGMAIL_DESC?= Enigmail extension
+GNOMEUI_DESC?= libgnomeui support module
+LIBPROXY_DESC?= Proxy support via libproxy
+LIGHTNING_DESC?= Calendar extension
+LOGGING_DESC?= Additional log messages
Property changes on: trunk/www/browser/Makefile.options
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/distinfo
===================================================================
--- trunk/www/browser/distinfo (rev 0)
+++ trunk/www/browser/distinfo 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,2 @@
+SHA256 (firefox-40.0.source.tar.bz2) = e3a26164b3a7f1aefbe13a07f0fdcd322726e4bb8c7e9432d1671c8c9e37145a
+SIZE (firefox-40.0.source.tar.bz2) = 178288925
Property changes on: trunk/www/browser/distinfo
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/extra-patch-bug1125514
===================================================================
--- trunk/www/browser/files/extra-patch-bug1125514 (rev 0)
+++ trunk/www/browser/files/extra-patch-bug1125514 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,36 @@
+changeset: 258513:ffbd5f5f46f1
+user: Guilherme Goncalves <guilherme.p.gonc at gmail.com>
+date: Thu Aug 20 10:05:29 2015 +0900
+summary: Bug 1125514 - Use jemalloc's metadata statistics to compute bookkeeping. r=glandium
+
+--- memory/build/mozjemalloc_compat.c~
++++ memory/build/mozjemalloc_compat.c
+@@ -136,6 +136,7 @@ jemalloc_stats_impl(jemalloc_stats_t *st
+ {
+ unsigned narenas;
+ size_t active, allocated, mapped, page, pdirty;
++ size_t meta, ameta;
+ size_t lg_chunk;
+
+ // Refresh jemalloc's stats by updating its epoch, see ctl_refresh in
+@@ -149,17 +150,19 @@ jemalloc_stats_impl(jemalloc_stats_t *st
+ CTL_GET("stats.active", active);
+ CTL_GET("stats.allocated", allocated);
+ CTL_GET("stats.mapped", mapped);
++ CTL_GET("stats.metadata", meta);
+ CTL_GET("opt.lg_chunk", lg_chunk);
+- CTL_GET("stats.bookkeeping", stats->bookkeeping);
+
+ /* get the summation for all arenas, i == narenas */
+ CTL_I_GET("stats.arenas.0.pdirty", pdirty, narenas);
++ CTL_I_GET("stats.arenas.0.metadata.allocated", ameta, narenas);
+
+ stats->chunksize = (size_t) 1 << lg_chunk;
+ stats->mapped = mapped;
+ stats->allocated = allocated;
+ stats->waste = active - allocated;
+ stats->page_cache = pdirty * page;
++ stats->bookkeeping = meta - ameta;
+ stats->bin_unused = compute_bin_unused(narenas);
+ stats->waste -= stats->bin_unused;
+ }
Property changes on: trunk/www/browser/files/extra-patch-bug1125514
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/firefox.desktop.in
===================================================================
--- trunk/www/browser/files/firefox.desktop.in (rev 0)
+++ trunk/www/browser/files/firefox.desktop.in 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,191 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=@MOZILLA_NAME@ Web Browser
+Name[am]=
+Name[ar]=
+Name[az]=@MOZILLA_NAME@ Veb Səyyahı
+Name[be]=
+Name[bg]=Интернет браузър @MOZILLA_NAME@
+Name[bn]=
+Name[bs]=@MOZILLA_NAME@ web preglednik
+Name[ca]=Navegador web @MOZILLA_NAME@
+Name[cs]=Prohlížeč WWW @MOZILLA_NAME@
+Name[cy]=Y Porwr Gwe @MOZILLA_NAME@
+Name[da]=@MOZILLA_NAME@ - internetsurfning
+Name[de]=@MOZILLA_NAME@ Webbrowser
+Name[el]=Περιηγητής Διαδικτύου @MOZILLA_NAME@
+Name[en_CA]=@MOZILLA_NAME@ Web Browser
+Name[en_GB]=@MOZILLA_NAME@ Web Browser
+Name[es]=Navegador Web @MOZILLA_NAME@
+Name[et]=@MOZILLA_NAME@ veebibrauser
+Name[eu]=@MOZILLA_NAME@ web arakatzailea
+Name[fi]=@MOZILLA_NAME@, WWW-selain
+Name[fr]=Navigateur Web @MOZILLA_NAME@
+Name[ga]=Brabhsálaí Lín @MOZILLA_NAME@
+Name[gu]=એપીફની વૅબ બ્રાઉઝર
+Name[he]=דפדפן @MOZILLA_NAME@
+Name[hi]=
+Name[hr]=@MOZILLA_NAME@ Web preglednik
+Name[hu]=@MOZILLA_NAME@ webböngésző
+Name[id]=Web Browser @MOZILLA_NAME@
+Name[it]=Browser web @MOZILLA_NAME@
+Name[ja]=@MOZILLA_NAME@ ウェブ・ブラウザ
+Name[ko]=@MOZILLA_NAME@ 웹 브라우저
+Name[li]=@MOZILLA_NAME@ Web Browser
+Name[lt]=@MOZILLA_NAME@ web naršyklė
+Name[mk]=@MOZILLA_NAME@ веб прелистувач
+Name[ml]=എപ്പിഫാനി വെബ്ബ് ബ്രൌസര്
+Name[mn]=@MOZILLA_NAME@ веб хөтөч
+Name[ms]=Pelungsur Web @MOZILLA_NAME@
+Name[nb]=@MOZILLA_NAME@ nettleser
+Name[nl]=@MOZILLA_NAME@ Webbrowser
+Name[nn]=@MOZILLA_NAME@ nettlesar
+Name[no]=@MOZILLA_NAME@ nettleser
+Name[pa]=ਏਪੀਫਾਨੀ ਵੈੱਬ ਬਰਾਊਜ਼ਰ
+Name[pl]=Przeglądarka WWW @MOZILLA_NAME@
+Name[pt]=Navegador Web @MOZILLA_NAME@
+Name[pt_BR]=Navegador Web @MOZILLA_NAME@
+Name[ro]=Navigatorul @MOZILLA_NAME@
+Name[ru]=Веб-браузер @MOZILLA_NAME@
+Name[sk]=
+Name[sl]=Spletni brskalnik @MOZILLA_NAME@
+Name[sq]=@MOZILLA_NAME@ - Shfletuesi Web
+Name[sr]=
+Name[sr at Latn]=Veb čitač Spoznaja
+Name[sv]=Webbläsaren @MOZILLA_NAME@
+Name[ta]=எபிபனி வலை உலாவி
+Name[tk]=@MOZILLA_NAME@ Web Ahtarçisi
+Name[tr]=@MOZILLA_NAME@ Web Tarayıcı
+Name[uk]=Переглядач web @MOZILLA_NAME@
+Name[vi]=Trình Duyệt Web @MOZILLA_NAME@
+Name[wa]=Betchteu waibe epiphany
+Name[zh_CN]=@MOZILLA_NAME@ Web 浏览器
+Name[zh_TW]=@MOZILLA_NAME@ 網頁瀏覽器
+GenericName=Web Browser
+GenericName[ar]=متصفّح الانترنت
+GenericName[az]=Veb Səyyahı
+GenericName[be]=Вандроўнік па павуціньню
+GenericName[bg]=Браузър
+GenericName[bn]=ওয়েব ব্রাউজার
+GenericName[bs]=Web preglednik
+GenericName[ca]=Navegador web
+GenericName[cs]=Prohlížeč WWW
+GenericName[cy]=Porwr Gwe
+GenericName[da]=Internetsurfning
+GenericName[de]=Webbrowser
+GenericName[el]=Περιηγητής Ιστοσελίδων
+GenericName[en_CA]=Web Browser
+GenericName[en_GB]=Web Browser
+GenericName[es]=Navegador web
+GenericName[et]=Veebilehitseja
+GenericName[eu]=Web arakatzailea
+GenericName[fi]=WWW-selain
+GenericName[fr]=Navigateur Web @MOZILLA_NAME@
+GenericName[ga]=Brabhsálaí Lín
+GenericName[gu]=વેબ બ્રાઉઝર
+GenericName[he]=דפדפן אינטרנט
+GenericName[hi]=वेब ब्राउज़र
+GenericName[hr]=Web preglednik
+GenericName[hu]=Webböngésző
+GenericName[id]=Browser Web
+GenericName[it]=Browser web
+GenericName[ja]=GNOME ウェブ・ブラウザ
+GenericName[ko]=웹 브라우저
+GenericName[li]=Wèb Browser
+GenericName[lt]=Web naršyklė
+GenericName[mk]=Веб прелистувач
+GenericName[mn]=Веб хөтөч
+GenericName[ms]=Pelungsur Web
+GenericName[nb]=Nettleser
+GenericName[nl]=Web-browser
+GenericName[nn]=Nettlesar
+GenericName[no]=Nettleser
+GenericName[pa]=ਵੈਬ ਬਰਾਊਜ਼
+GenericName[pl]=Przeglądarka WWW
+GenericName[pt]=Navegador Web
+GenericName[pt_BR]=Navegador Web
+GenericName[ro]=Navigator Internet
+GenericName[ru]=Веб-браузер
+GenericName[sk]=WWW prehliadač
+GenericName[sl]=Spletni brskalnik
+GenericName[sq]=Shfletuesi Web
+GenericName[sr]=Веб читач
+GenericName[sr at Latn]=Veb čitač
+GenericName[sv]=Webbläsare
+GenericName[ta]=வலை உலாவி
+GenericName[th]=เว็บบราวเซอร์
+GenericName[tk]=Web Ahtarçysy
+GenericName[tr]=Web Tarayıcı
+GenericName[uk]=Переглядач web-сторінок
+GenericName[vi]=Trình duyệt Web
+GenericName[wa]=Betchteu waibe
+GenericName[zh_CN]=Web 浏览器
+GenericName[zh_TW]=網頁瀏覽器
+Comment=Browse the web
+Comment[ar]=تصفح الانترنت
+Comment[az]=Vebi gəzin
+Comment[be]=Вандраваць па павуціньню
+Comment[bg]=Сърфиране в интернет
+Comment[bn]=ওয়েব ব্রাউজ করুন
+Comment[bs]=Pregledaj na internetu
+Comment[ca]=Navegueu per la web
+Comment[cs]=Prohlížet WWW
+Comment[cy]=Pori'r we
+Comment[da]=Surf på internettet
+Comment[de]=Im Web surfen
+Comment[el]=Περιήγηση στον παγκόσμιο ιστό
+Comment[en_CA]=Browse the web
+Comment[en_GB]=Browse the web
+Comment[es]=Navegar por la web
+Comment[et]=Sirvi veebi
+Comment[eu]=Arakatu web-a
+Comment[fi]=Selaa WWW:tä
+Comment[fr]=Naviguer sur Internet
+Comment[ga]=Brabhsáil an Líon
+Comment[gu]=વેબમાં શોધો
+Comment[he]=גלוש ברשת
+Comment[hi]=वेब ब्राउज़ करें
+Comment[hr]=Pregledaj Web
+Comment[hu]=A világháló böngészése
+Comment[id]=Jelajah web
+Comment[it]=Esplora il web
+Comment[ja]=ウェブを閲覧します
+Comment[ko]=웹을 돌아 다닙니다
+Comment[li]=Blajere op internet
+Comment[lt]=Naršyti internete
+Comment[mk]=Прелистувајте на веб
+Comment[ml]=വലക്കെട്ട് തിരയുക
+Comment[mn]=Веб броузе хийх
+Comment[ms]=Layari web
+Comment[nb]=Surf på nettet
+Comment[nl]=Websurfen
+Comment[nn]=Surf på nettet
+Comment[no]=Surf på nettet
+Comment[pa]=ਵੈਬ ਬਰਾਊਜ਼
+Comment[pl]=Przeglądanie stron WWW
+Comment[pt]=Navegar na web
+Comment[pt_BR]=Navegar na web
+Comment[ro]=Navigare Internet
+Comment[ru]=Веб-браузер
+Comment[sk]=Prehliadať internet
+Comment[sl]=Brskaj po spletu
+Comment[sq]=Eksploro web-in
+Comment[sr]=Прегледај веб
+Comment[sr at Latn]=Pregledaj veb
+Comment[sv]=Surfa på nätet
+Comment[ta]=வலையில் உலாவு
+Comment[th]=ใช้งานเว็บบราวเซอร์ @MOZILLA_NAME@
+Comment[tk]=Webi Ahtar
+Comment[tr]=Web'e Gözat
+Comment[uk]=Програма перегляду web-сторінок
+Comment[vi]=Duyệt web
+Comment[wa]=Naivyî avå les waibes
+Comment[zh_CN]=浏览 Web
+Comment[zh_TW]=瀏覽網頁
+Exec=@MOZILLA@ %U
+Icon=@FIREFOX_ICON@
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=Network;WebBrowser;
+MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
Property changes on: trunk/www/browser/files/firefox.desktop.in
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-browser-app-nsBrowserApp.cpp
===================================================================
--- trunk/www/browser/files/patch-browser-app-nsBrowserApp.cpp (rev 0)
+++ trunk/www/browser/files/patch-browser-app-nsBrowserApp.cpp 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,11 @@
+--- browser/app/nsBrowserApp.cpp~
++++ browser/app/nsBrowserApp.cpp
+@@ -417,6 +417,8 @@ int main(int argc, char* argv[])
+ TriggerQuirks();
+ #endif
+
++ setenv("MOZ_GMP_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
++ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
+ int gotCounters;
+ #if defined(XP_UNIX)
+ struct rusage initialRUsage;
Property changes on: trunk/www/browser/files/patch-browser-app-nsBrowserApp.cpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-bug1013882
===================================================================
--- trunk/www/browser/files/patch-bug1013882 (rev 0)
+++ trunk/www/browser/files/patch-bug1013882 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,69 @@
+diff --git b2g/installer/Makefile.in b2g/installer/Makefile.in
+index 754312a..c69904c 100644
+--- b2g/installer/Makefile.in
++++ b2g/installer/Makefile.in
+@@ -63,6 +63,10 @@ ifneq (,$(filter rtsp,$(NECKO_PROTOCOLS)))
+ DEFINES += -DMOZ_RTSP
+ endif
+
++ifdef MOZ_DEBUG
++DEFINES += -DMOZ_DEBUG=1
++endif
++
+ ifdef GKMEDIAS_SHARED_LIBRARY
+ DEFINES += -DGKMEDIAS_SHARED_LIBRARY
+ endif
+diff --git b2g/installer/package-manifest.in b2g/installer/package-manifest.in
+index 17d433c..0416187 100644
+--- b2g/installer/package-manifest.in
++++ b2g/installer/package-manifest.in
+@@ -660,7 +660,7 @@
+ @RESPATH@/components/EngineeringModeAPI.js
+ @RESPATH@/components/EngineeringModeService.js
+
+-#ifdef MOZ_DEBUG
++#if defined(ENABLE_TESTS) && defined(MOZ_DEBUG)
+ @RESPATH@/components/TestInterfaceJS.js
+ @RESPATH@/components/TestInterfaceJS.manifest
+ #endif
+diff --git browser/installer/package-manifest.in browser/installer/package-manifest.in
+index b509fd4..195345c 100644
+--- browser/installer/package-manifest.in
++++ browser/installer/package-manifest.in
+@@ -608,7 +608,7 @@
+ @RESPATH@/components/MozKeyboard.js
+ @RESPATH@/components/InputMethod.manifest
+
+-#ifdef MOZ_DEBUG
++#if defined(ENABLE_TESTS) && defined(MOZ_DEBUG)
+ @RESPATH@/components/TestInterfaceJS.js
+ @RESPATH@/components/TestInterfaceJS.manifest
+ #endif
+diff --git mobile/android/installer/Makefile.in mobile/android/installer/Makefile.in
+index 96dceab..3528ad6 100644
+--- mobile/android/installer/Makefile.in
++++ mobile/android/installer/Makefile.in
+@@ -41,6 +41,10 @@ BINPATH = bin
+ endif
+ DEFINES += -DBINPATH=$(BINPATH)
+
++ifdef MOZ_DEBUG
++DEFINES += -DMOZ_DEBUG=1
++endif
++
+ ifdef ENABLE_MARIONETTE
+ DEFINES += -DENABLE_MARIONETTE=1
+ endif
+diff --git mobile/android/installer/package-manifest.in mobile/android/installer/package-manifest.in
+index 994580b..cf142df 100644
+--- mobile/android/installer/package-manifest.in
++++ mobile/android/installer/package-manifest.in
+@@ -440,7 +440,7 @@
+ @BINPATH@/components/dom_webspeechsynth.xpt
+ #endif
+
+-#ifdef MOZ_DEBUG
++#if defined(ENABLE_TESTS) && defined(MOZ_DEBUG)
+ @BINPATH@/components/TestInterfaceJS.js
+ @BINPATH@/components/TestInterfaceJS.manifest
+ #endif
Property changes on: trunk/www/browser/files/patch-bug1013882
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-bug1021761
===================================================================
--- trunk/www/browser/files/patch-bug1021761 (rev 0)
+++ trunk/www/browser/files/patch-bug1021761 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,1102 @@
+diff --git configure.in configure.in
+index 48e60c0..ec08417 100644
+--- configure.in
++++ configure.in
+@@ -5591,6 +5591,67 @@ fi
+ AC_SUBST(MOZ_WEBM_ENCODER)
+
+ dnl ==================================
++dnl = Check OSS availability
++dnl ==================================
++
++dnl If using Linux, Solaris or BSDs, ensure that OSS is available
++case "$OS_TARGET" in
++Linux|SunOS|DragonFly|FreeBSD|NetBSD|GNU/kFreeBSD)
++ MOZ_OSS=1
++ ;;
++esac
++
++MOZ_ARG_WITH_STRING(oss,
++[ --with-oss[=PFX] Enable OpenSoundSystem support [installed at prefix PFX]],
++ OSSPREFIX=$withval)
++
++if test -n "$OSSPREFIX"; then
++ if test "$OSSPREFIX" != "no"; then
++ MOZ_OSS=1
++ else
++ MOZ_OSS=
++ fi
++fi
++
++_SAVE_CFLAGS=$CFLAGS
++_SAVE_LIBS=$LIBS
++if test -n "$MOZ_OSS"; then
++ dnl Prefer 4Front implementation
++ AC_MSG_CHECKING([MOZ_OSS_CFLAGS])
++ if test "$OSSPREFIX" != "yes"; then
++ oss_conf=${OSSPREFIX%/usr}/etc/oss.conf
++ if test -f "$oss_conf"; then
++ . "$oss_conf"
++ else
++ OSSLIBDIR=$OSSPREFIX/lib/oss
++ fi
++ if test -d "$OSSLIBDIR"; then
++ MOZ_OSS_CFLAGS="$MOZ_OSS_CFLAGS -I$OSSLIBDIR/include"
++ fi
++ fi
++ AC_MSG_RESULT([$MOZ_OSS_CFLAGS])
++
++ CFLAGS="$CFLAGS $MOZ_OSS_CFLAGS"
++ MOZ_CHECK_HEADERS(sys/soundcard.h soundcard.h)
++
++ if test "$ac_cv_header_sys_soundcard_h" != "yes" -a \
++ "$ac_cv_header_soundcard_h" != "yes"; then
++ AC_MSG_ERROR([Need OSS for Ogg, Wave or WebM decoding on $OS_TARGET. Disable with --disable-ogg --disable-wave --disable-webm.])
++ fi
++
++ dnl Assume NetBSD implementation over SunAudio
++ AC_CHECK_LIB(ossaudio, _oss_ioctl,
++ [AC_DEFINE_UNQUOTED(CUBEB_OSS_DEFAULT_OUTPUT, "/dev/sound")
++ MOZ_OSS_LIBS="$MOZ_OSS_LIBS -lossaudio"])
++fi
++CFLAGS=$_SAVE_CFLAGS
++LIBS=$_SAVE_LIBS
++
++AC_SUBST(MOZ_OSS)
++AC_SUBST_LIST(MOZ_OSS_CFLAGS)
++AC_SUBST_LIST(MOZ_OSS_LIBS)
++
++dnl ==================================
+ dnl = Check alsa availability on Linux
+ dnl ==================================
+
+diff --git media/libcubeb/AUTHORS media/libcubeb/AUTHORS
+index b441e8a..950d9e5 100644
+--- media/libcubeb/AUTHORS
++++ media/libcubeb/AUTHORS
+@@ -4,3 +4,4 @@ Michael Wu <mwu at mozilla.com>
+ Paul Adenot <paul at paul.cx>
+ David Richards <drichards at mozilla.com>
+ Sebastien Alaiwan <sebastien.alaiwan at gmail.com>
++Evgeniy Vodolazskiy <waterlaz at gmail.com>
+diff --git media/libcubeb/src/cubeb.c media/libcubeb/src/cubeb.c
+index 9c3adcc..45d765b 100644
+--- media/libcubeb/src/cubeb.c
++++ media/libcubeb/src/cubeb.c
+@@ -54,6 +54,9 @@ int opensl_init(cubeb ** context, char const * context_name);
+ #if defined(USE_AUDIOTRACK)
+ int audiotrack_init(cubeb ** context, char const * context_name);
+ #endif
++#if defined(USE_OSS)
++int oss_init(cubeb ** context, char const * context_name);
++#endif
+
+ int
+ validate_stream_params(cubeb_stream_params stream_params)
+@@ -120,6 +123,9 @@ cubeb_init(cubeb ** context, char const * context_name)
+ #if defined(USE_AUDIOTRACK)
+ audiotrack_init,
+ #endif
++#if defined(USE_OSS)
++ oss_init,
++#endif
+ };
+ int i;
+
+diff --git media/libcubeb/src/cubeb_alsa.c media/libcubeb/src/cubeb_alsa.c
+index a962553..1f780f4 100644
+--- media/libcubeb/src/cubeb_alsa.c
++++ media/libcubeb/src/cubeb_alsa.c
+@@ -11,6 +11,7 @@
+ #include <sys/time.h>
+ #include <assert.h>
+ #include <limits.h>
++#include <dlfcn.h>
+ #include <poll.h>
+ #include <unistd.h>
+ #include <alsa/asoundlib.h>
+@@ -24,6 +25,50 @@
+
+ #define ALSA_PA_PLUGIN "ALSA <-> PulseAudio PCM I/O Plugin"
+
++#ifdef DISABLE_LIBASOUND_DLOPEN
++#define WRAP(x) x
++#else
++#define WRAP(x) cubeb_##x
++#define MAKE_TYPEDEF(x) static typeof(x) * cubeb_##x
++MAKE_TYPEDEF(snd_config);
++MAKE_TYPEDEF(snd_config_add);
++MAKE_TYPEDEF(snd_config_copy);
++MAKE_TYPEDEF(snd_config_delete);
++MAKE_TYPEDEF(snd_config_get_id);
++MAKE_TYPEDEF(snd_config_get_string);
++MAKE_TYPEDEF(snd_config_imake_integer);
++MAKE_TYPEDEF(snd_config_search);
++MAKE_TYPEDEF(snd_config_search_definition);
++MAKE_TYPEDEF(snd_lib_error_set_handler);
++MAKE_TYPEDEF(snd_pcm_avail_update);
++MAKE_TYPEDEF(snd_pcm_close);
++MAKE_TYPEDEF(snd_pcm_delay);
++MAKE_TYPEDEF(snd_pcm_drain);
++MAKE_TYPEDEF(snd_pcm_frames_to_bytes);
++MAKE_TYPEDEF(snd_pcm_get_params);
++/* snd_pcm_hw_params_alloca is actually a macro */
++/* MAKE_TYPEDEF(snd_pcm_hw_params_alloca); */
++MAKE_TYPEDEF(snd_pcm_hw_params_sizeof);
++#define snd_pcm_hw_params_sizeof cubeb_snd_pcm_hw_params_sizeof
++MAKE_TYPEDEF(snd_pcm_hw_params_any);
++MAKE_TYPEDEF(snd_pcm_hw_params_get_channels_max);
++MAKE_TYPEDEF(snd_pcm_hw_params_get_rate);
++MAKE_TYPEDEF(snd_pcm_hw_params_set_rate_near);
++MAKE_TYPEDEF(snd_pcm_nonblock);
++MAKE_TYPEDEF(snd_pcm_open);
++MAKE_TYPEDEF(snd_pcm_open_lconf);
++MAKE_TYPEDEF(snd_pcm_pause);
++MAKE_TYPEDEF(snd_pcm_poll_descriptors);
++MAKE_TYPEDEF(snd_pcm_poll_descriptors_count);
++MAKE_TYPEDEF(snd_pcm_poll_descriptors_revents);
++MAKE_TYPEDEF(snd_pcm_recover);
++MAKE_TYPEDEF(snd_pcm_set_params);
++MAKE_TYPEDEF(snd_pcm_state);
++MAKE_TYPEDEF(snd_pcm_writei);
++
++#undef MAKE_TYPEDEF
++#endif
++
+ /* ALSA is not thread-safe. snd_pcm_t instances are individually protected
+ by the owning cubeb_stream's mutex. snd_pcm_t creation and destruction
+ is not thread-safe until ALSA 1.0.24 (see alsa-lib.git commit 91c9c8f1),
+@@ -64,6 +109,8 @@ struct cubeb {
+ workaround is not required. */
+ snd_config_t * local_config;
+ int is_pa;
++
++ void * libasound;
+ };
+
+ enum stream_state {
+@@ -262,7 +309,7 @@ alsa_refill_stream(cubeb_stream * stm)
+
+ pthread_mutex_lock(&stm->mutex);
+
+- r = snd_pcm_poll_descriptors_revents(stm->pcm, stm->fds, stm->nfds, &revents);
++ r = WRAP(snd_pcm_poll_descriptors_revents)(stm->pcm, stm->fds, stm->nfds, &revents);
+ if (r < 0 || revents != POLLOUT) {
+ /* This should be a stream error; it makes no sense for poll(2) to wake
+ for this stream and then have the stream report that it's not ready.
+@@ -271,10 +318,10 @@ alsa_refill_stream(cubeb_stream * stm)
+ return RUNNING;
+ }
+
+- avail = snd_pcm_avail_update(stm->pcm);
++ avail = WRAP(snd_pcm_avail_update)(stm->pcm);
+ if (avail == -EPIPE) {
+- snd_pcm_recover(stm->pcm, avail, 1);
+- avail = snd_pcm_avail_update(stm->pcm);
++ WRAP(snd_pcm_recover)(stm->pcm, avail, 1);
++ avail = WRAP(snd_pcm_avail_update)(stm->pcm);
+ }
+
+ /* Failed to recover from an xrun, this stream must be broken. */
+@@ -293,8 +340,8 @@ alsa_refill_stream(cubeb_stream * stm)
+ available to write. If avail is still zero here, the stream must be in
+ a funky state, so recover and try again. */
+ if (avail == 0) {
+- snd_pcm_recover(stm->pcm, -EPIPE, 1);
+- avail = snd_pcm_avail_update(stm->pcm);
++ WRAP(snd_pcm_recover)(stm->pcm, -EPIPE, 1);
++ avail = WRAP(snd_pcm_avail_update)(stm->pcm);
+ if (avail <= 0) {
+ pthread_mutex_unlock(&stm->mutex);
+ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
+@@ -302,7 +349,7 @@ alsa_refill_stream(cubeb_stream * stm)
+ }
+ }
+
+- p = calloc(1, snd_pcm_frames_to_bytes(stm->pcm, avail));
++ p = calloc(1, WRAP(snd_pcm_frames_to_bytes)(stm->pcm, avail));
+ assert(p);
+
+ pthread_mutex_unlock(&stm->mutex);
+@@ -327,10 +374,10 @@ alsa_refill_stream(cubeb_stream * stm)
+ b[i] *= stm->volume;
+ }
+ }
+- wrote = snd_pcm_writei(stm->pcm, p, got);
++ wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got);
+ if (wrote == -EPIPE) {
+- snd_pcm_recover(stm->pcm, wrote, 1);
+- wrote = snd_pcm_writei(stm->pcm, p, got);
++ WRAP(snd_pcm_recover)(stm->pcm, wrote, 1);
++ wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got);
+ }
+ assert(wrote >= 0 && wrote == got);
+ stm->write_position += wrote;
+@@ -342,7 +389,7 @@ alsa_refill_stream(cubeb_stream * stm)
+
+ /* Fill the remaining buffer with silence to guarantee one full period
+ has been written. */
+- snd_pcm_writei(stm->pcm, (char *) p + got, avail - got);
++ WRAP(snd_pcm_writei)(stm->pcm, (char *) p + got, avail - got);
+
+ set_timeout(&stm->drain_timeout, buffer_time * 1000);
+
+@@ -453,26 +500,26 @@ get_slave_pcm_node(snd_config_t * lconf, snd_config_t * root_pcm)
+
+ slave_def = NULL;
+
+- r = snd_config_search(root_pcm, "slave", &slave_pcm);
++ r = WRAP(snd_config_search)(root_pcm, "slave", &slave_pcm);
+ if (r < 0) {
+ return NULL;
+ }
+
+- r = snd_config_get_string(slave_pcm, &string);
++ r = WRAP(snd_config_get_string)(slave_pcm, &string);
+ if (r >= 0) {
+- r = snd_config_search_definition(lconf, "pcm_slave", string, &slave_def);
++ r = WRAP(snd_config_search_definition)(lconf, "pcm_slave", string, &slave_def);
+ if (r < 0) {
+ return NULL;
+ }
+ }
+
+ do {
+- r = snd_config_search(slave_def ? slave_def : slave_pcm, "pcm", &pcm);
++ r = WRAP(snd_config_search)(slave_def ? slave_def : slave_pcm, "pcm", &pcm);
+ if (r < 0) {
+ break;
+ }
+
+- r = snd_config_get_string(slave_def ? slave_def : slave_pcm, &string);
++ r = WRAP(snd_config_get_string)(slave_def ? slave_def : slave_pcm, &string);
+ if (r < 0) {
+ break;
+ }
+@@ -481,7 +528,7 @@ get_slave_pcm_node(snd_config_t * lconf, snd_config_t * root_pcm)
+ if (r < 0 || r > (int) sizeof(node_name)) {
+ break;
+ }
+- r = snd_config_search(lconf, node_name, &pcm);
++ r = WRAP(snd_config_search)(lconf, node_name, &pcm);
+ if (r < 0) {
+ break;
+ }
+@@ -490,7 +537,7 @@ get_slave_pcm_node(snd_config_t * lconf, snd_config_t * root_pcm)
+ } while (0);
+
+ if (slave_def) {
+- snd_config_delete(slave_def);
++ WRAP(snd_config_delete)(slave_def);
+ }
+
+ return NULL;
+@@ -513,22 +560,22 @@ init_local_config_with_workaround(char const * pcm_name)
+
+ lconf = NULL;
+
+- if (snd_config == NULL) {
++ if (*WRAP(snd_config) == NULL) {
+ return NULL;
+ }
+
+- r = snd_config_copy(&lconf, snd_config);
++ r = WRAP(snd_config_copy)(&lconf, *WRAP(snd_config));
+ if (r < 0) {
+ return NULL;
+ }
+
+ do {
+- r = snd_config_search_definition(lconf, "pcm", pcm_name, &pcm_node);
++ r = WRAP(snd_config_search_definition)(lconf, "pcm", pcm_name, &pcm_node);
+ if (r < 0) {
+ break;
+ }
+
+- r = snd_config_get_id(pcm_node, &string);
++ r = WRAP(snd_config_get_id)(pcm_node, &string);
+ if (r < 0) {
+ break;
+ }
+@@ -537,7 +584,7 @@ init_local_config_with_workaround(char const * pcm_name)
+ if (r < 0 || r > (int) sizeof(node_name)) {
+ break;
+ }
+- r = snd_config_search(lconf, node_name, &pcm_node);
++ r = WRAP(snd_config_search)(lconf, node_name, &pcm_node);
+ if (r < 0) {
+ break;
+ }
+@@ -548,12 +595,12 @@ init_local_config_with_workaround(char const * pcm_name)
+ }
+
+ /* Fetch the PCM node's type, and bail out if it's not the PulseAudio plugin. */
+- r = snd_config_search(pcm_node, "type", &node);
++ r = WRAP(snd_config_search)(pcm_node, "type", &node);
+ if (r < 0) {
+ break;
+ }
+
+- r = snd_config_get_string(node, &string);
++ r = WRAP(snd_config_get_string)(node, &string);
+ if (r < 0) {
+ break;
+ }
+@@ -564,18 +611,18 @@ init_local_config_with_workaround(char const * pcm_name)
+
+ /* Don't clobber an explicit existing handle_underrun value, set it only
+ if it doesn't already exist. */
+- r = snd_config_search(pcm_node, "handle_underrun", &node);
++ r = WRAP(snd_config_search)(pcm_node, "handle_underrun", &node);
+ if (r != -ENOENT) {
+ break;
+ }
+
+ /* Disable pcm_pulse's asynchronous underrun handling. */
+- r = snd_config_imake_integer(&node, "handle_underrun", 0);
++ r = WRAP(snd_config_imake_integer)(&node, "handle_underrun", 0);
+ if (r < 0) {
+ break;
+ }
+
+- r = snd_config_add(pcm_node, node);
++ r = WRAP(snd_config_add)(pcm_node, node);
+ if (r < 0) {
+ break;
+ }
+@@ -583,7 +630,7 @@ init_local_config_with_workaround(char const * pcm_name)
+ return lconf;
+ } while (0);
+
+- snd_config_delete(lconf);
++ WRAP(snd_config_delete)(lconf);
+
+ return NULL;
+ }
+@@ -595,9 +642,9 @@ alsa_locked_pcm_open(snd_pcm_t ** pcm, snd_pcm_stream_t stream, snd_config_t * l
+
+ pthread_mutex_lock(&cubeb_alsa_mutex);
+ if (local_config) {
+- r = snd_pcm_open_lconf(pcm, CUBEB_ALSA_PCM_NAME, stream, SND_PCM_NONBLOCK, local_config);
++ r = WRAP(snd_pcm_open_lconf)(pcm, CUBEB_ALSA_PCM_NAME, stream, SND_PCM_NONBLOCK, local_config);
+ } else {
+- r = snd_pcm_open(pcm, CUBEB_ALSA_PCM_NAME, stream, SND_PCM_NONBLOCK);
++ r = WRAP(snd_pcm_open)(pcm, CUBEB_ALSA_PCM_NAME, stream, SND_PCM_NONBLOCK);
+ }
+ pthread_mutex_unlock(&cubeb_alsa_mutex);
+
+@@ -610,7 +657,7 @@ alsa_locked_pcm_close(snd_pcm_t * pcm)
+ int r;
+
+ pthread_mutex_lock(&cubeb_alsa_mutex);
+- r = snd_pcm_close(pcm);
++ r = WRAP(snd_pcm_close)(pcm);
+ pthread_mutex_unlock(&cubeb_alsa_mutex);
+
+ return r;
+@@ -667,12 +714,65 @@ alsa_init(cubeb ** context, char const * context_name)
+ pthread_attr_t attr;
+ snd_pcm_t * dummy;
+
++ void * libasound = NULL;
++
++#ifndef DISABLE_LIBASOUND_DLOPEN
++ libasound = dlopen("libasound.so", RTLD_LAZY);
++ if (!libasound) {
++ return CUBEB_ERROR;
++ }
++
++#define LOAD(x) do { \
++ cubeb_##x = dlsym(libasound, #x); \
++ if (!cubeb_##x) { \
++ dlclose(libasound); \
++ return CUBEB_ERROR; \
++ } \
++ } while(0)
++
++ LOAD(snd_config);
++ LOAD(snd_config_add);
++ LOAD(snd_config_copy);
++ LOAD(snd_config_delete);
++ LOAD(snd_config_get_id);
++ LOAD(snd_config_get_string);
++ LOAD(snd_config_imake_integer);
++ LOAD(snd_config_search);
++ LOAD(snd_config_search_definition);
++ LOAD(snd_lib_error_set_handler);
++ LOAD(snd_pcm_avail_update);
++ LOAD(snd_pcm_close);
++ LOAD(snd_pcm_delay);
++ LOAD(snd_pcm_drain);
++ LOAD(snd_pcm_frames_to_bytes);
++ LOAD(snd_pcm_get_params);
++ /* snd_pcm_hw_params_alloca is actually a macro */
++ /* LOAD(snd_pcm_hw_params_alloca); */
++ LOAD(snd_pcm_hw_params_sizeof);
++ LOAD(snd_pcm_hw_params_any);
++ LOAD(snd_pcm_hw_params_get_channels_max);
++ LOAD(snd_pcm_hw_params_get_rate);
++ LOAD(snd_pcm_hw_params_set_rate_near);
++ LOAD(snd_pcm_nonblock);
++ LOAD(snd_pcm_open);
++ LOAD(snd_pcm_open_lconf);
++ LOAD(snd_pcm_pause);
++ LOAD(snd_pcm_poll_descriptors);
++ LOAD(snd_pcm_poll_descriptors_count);
++ LOAD(snd_pcm_poll_descriptors_revents);
++ LOAD(snd_pcm_recover);
++ LOAD(snd_pcm_set_params);
++ LOAD(snd_pcm_state);
++ LOAD(snd_pcm_writei);
++
++#undef LOAD
++#endif
+ assert(context);
+ *context = NULL;
+
+ pthread_mutex_lock(&cubeb_alsa_mutex);
+ if (!cubeb_alsa_error_handler_set) {
+- snd_lib_error_set_handler(silent_error_handler);
++ WRAP(snd_lib_error_set_handler)(silent_error_handler);
+ cubeb_alsa_error_handler_set = 1;
+ }
+ pthread_mutex_unlock(&cubeb_alsa_mutex);
+@@ -680,6 +780,8 @@ alsa_init(cubeb ** context, char const * context_name)
+ ctx = calloc(1, sizeof(*ctx));
+ assert(ctx);
+
++ ctx->libasound = libasound;
++
+ ctx->ops = &alsa_ops;
+
+ r = pthread_mutex_init(&ctx->mutex, NULL);
+@@ -729,7 +831,7 @@ alsa_init(cubeb ** context, char const * context_name)
+ config fails with EINVAL, the PA PCM is too old for this workaround. */
+ if (r == -EINVAL) {
+ pthread_mutex_lock(&cubeb_alsa_mutex);
+- snd_config_delete(ctx->local_config);
++ WRAP(snd_config_delete)(ctx->local_config);
+ pthread_mutex_unlock(&cubeb_alsa_mutex);
+ ctx->local_config = NULL;
+ } else if (r >= 0) {
+@@ -768,9 +870,13 @@ alsa_destroy(cubeb * ctx)
+ pthread_mutex_destroy(&ctx->mutex);
+ free(ctx->fds);
+
++ if (ctx->libasound) {
++ dlclose(ctx->libasound);
++ }
++
+ if (ctx->local_config) {
+ pthread_mutex_lock(&cubeb_alsa_mutex);
+- snd_config_delete(ctx->local_config);
++ WRAP(snd_config_delete)(ctx->local_config);
+ pthread_mutex_unlock(&cubeb_alsa_mutex);
+ }
+
+@@ -838,7 +944,7 @@ alsa_stream_init(cubeb * ctx, cubeb_stream ** stream, char const * stream_name,
+ return CUBEB_ERROR;
+ }
+
+- r = snd_pcm_nonblock(stm->pcm, 1);
++ r = WRAP(snd_pcm_nonblock)(stm->pcm, 1);
+ assert(r == 0);
+
+ /* Ugly hack: the PA ALSA plugin allows buffer configurations that can't
+@@ -848,23 +954,23 @@ alsa_stream_init(cubeb * ctx, cubeb_stream ** stream, char const * stream_name,
+ latency = latency < 500 ? 500 : latency;
+ }
+
+- r = snd_pcm_set_params(stm->pcm, format, SND_PCM_ACCESS_RW_INTERLEAVED,
+- stm->params.channels, stm->params.rate, 1,
+- latency * 1000);
++ r = WRAP(snd_pcm_set_params)(stm->pcm, format, SND_PCM_ACCESS_RW_INTERLEAVED,
++ stm->params.channels, stm->params.rate, 1,
++ latency * 1000);
+ if (r < 0) {
+ alsa_stream_destroy(stm);
+ return CUBEB_ERROR_INVALID_FORMAT;
+ }
+
+- r = snd_pcm_get_params(stm->pcm, &stm->buffer_size, &stm->period_size);
++ r = WRAP(snd_pcm_get_params)(stm->pcm, &stm->buffer_size, &stm->period_size);
+ assert(r == 0);
+
+- stm->nfds = snd_pcm_poll_descriptors_count(stm->pcm);
++ stm->nfds = WRAP(snd_pcm_poll_descriptors_count)(stm->pcm);
+ assert(stm->nfds > 0);
+
+ stm->saved_fds = calloc(stm->nfds, sizeof(struct pollfd));
+ assert(stm->saved_fds);
+- r = snd_pcm_poll_descriptors(stm->pcm, stm->saved_fds, stm->nfds);
++ r = WRAP(snd_pcm_poll_descriptors)(stm->pcm, stm->saved_fds, stm->nfds);
+ assert((nfds_t) r == stm->nfds);
+
+ r = pthread_cond_init(&stm->cond, NULL);
+@@ -895,7 +1001,7 @@ alsa_stream_destroy(cubeb_stream * stm)
+ pthread_mutex_lock(&stm->mutex);
+ if (stm->pcm) {
+ if (stm->state == DRAINING) {
+- snd_pcm_drain(stm->pcm);
++ WRAP(snd_pcm_drain)(stm->pcm);
+ }
+ alsa_locked_pcm_close(stm->pcm);
+ stm->pcm = NULL;
+@@ -938,12 +1044,12 @@ alsa_get_max_channel_count(cubeb * ctx, uint32_t * max_channels)
+ return CUBEB_ERROR;
+ }
+
+- r = snd_pcm_hw_params_any(stm->pcm, hw_params);
++ r = WRAP(snd_pcm_hw_params_any)(stm->pcm, hw_params);
+ if (r < 0) {
+ return CUBEB_ERROR;
+ }
+
+- r = snd_pcm_hw_params_get_channels_max(hw_params, max_channels);
++ r = WRAP(snd_pcm_hw_params_get_channels_max)(hw_params, max_channels);
+ if (r < 0) {
+ return CUBEB_ERROR;
+ }
+@@ -963,34 +1069,34 @@ alsa_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate) {
+
+ /* get a pcm, disabling resampling, so we get a rate the
+ * hardware/dmix/pulse/etc. supports. */
+- r = snd_pcm_open(&pcm, "default", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0);
++ r = WRAP(snd_pcm_open)(&pcm, "default", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0);
+ if (r < 0) {
+ return CUBEB_ERROR;
+ }
+
+- r = snd_pcm_hw_params_any(pcm, hw_params);
++ r = WRAP(snd_pcm_hw_params_any)(pcm, hw_params);
+ if (r < 0) {
+- snd_pcm_close(pcm);
++ WRAP(snd_pcm_close)(pcm);
+ return CUBEB_ERROR;
+ }
+
+- r = snd_pcm_hw_params_get_rate(hw_params, rate, &dir);
++ r = WRAP(snd_pcm_hw_params_get_rate)(hw_params, rate, &dir);
+ if (r >= 0) {
+ /* There is a default rate: use it. */
+- snd_pcm_close(pcm);
++ WRAP(snd_pcm_close)(pcm);
+ return CUBEB_OK;
+ }
+
+ /* Use a common rate, alsa may adjust it based on hw/etc. capabilities. */
+ *rate = 44100;
+
+- r = snd_pcm_hw_params_set_rate_near(pcm, hw_params, rate, NULL);
++ r = WRAP(snd_pcm_hw_params_set_rate_near)(pcm, hw_params, rate, NULL);
+ if (r < 0) {
+- snd_pcm_close(pcm);
++ WRAP(snd_pcm_close)(pcm);
+ return CUBEB_ERROR;
+ }
+
+- snd_pcm_close(pcm);
++ WRAP(snd_pcm_close)(pcm);
+
+ return CUBEB_OK;
+ }
+@@ -1013,7 +1119,7 @@ alsa_stream_start(cubeb_stream * stm)
+ ctx = stm->context;
+
+ pthread_mutex_lock(&stm->mutex);
+- snd_pcm_pause(stm->pcm, 0);
++ WRAP(snd_pcm_pause)(stm->pcm, 0);
+ gettimeofday(&stm->last_activity, NULL);
+ pthread_mutex_unlock(&stm->mutex);
+
+@@ -1047,7 +1153,7 @@ alsa_stream_stop(cubeb_stream * stm)
+ pthread_mutex_unlock(&ctx->mutex);
+
+ pthread_mutex_lock(&stm->mutex);
+- snd_pcm_pause(stm->pcm, 1);
++ WRAP(snd_pcm_pause)(stm->pcm, 1);
+ pthread_mutex_unlock(&stm->mutex);
+
+ return CUBEB_OK;
+@@ -1063,8 +1169,8 @@ alsa_stream_get_position(cubeb_stream * stm, uint64_t * position)
+ pthread_mutex_lock(&stm->mutex);
+
+ delay = -1;
+- if (snd_pcm_state(stm->pcm) != SND_PCM_STATE_RUNNING ||
+- snd_pcm_delay(stm->pcm, &delay) != 0) {
++ if (WRAP(snd_pcm_state)(stm->pcm) != SND_PCM_STATE_RUNNING ||
++ WRAP(snd_pcm_delay)(stm->pcm, &delay) != 0) {
+ *position = stm->last_position;
+ pthread_mutex_unlock(&stm->mutex);
+ return CUBEB_OK;
+@@ -1089,7 +1195,7 @@ alsa_stream_get_latency(cubeb_stream * stm, uint32_t * latency)
+ snd_pcm_sframes_t delay;
+ /* This function returns the delay in frames until a frame written using
+ snd_pcm_writei is sent to the DAC. The DAC delay should be < 1ms anyways. */
+- if (snd_pcm_delay(stm->pcm, &delay)) {
++ if (WRAP(snd_pcm_delay)(stm->pcm, &delay)) {
+ return CUBEB_ERROR;
+ }
+
+diff --git media/libcubeb/src/cubeb_oss.c media/libcubeb/src/cubeb_oss.c
+new file mode 100644
+index 0000000..5e38e27
+--- /dev/null
++++ media/libcubeb/src/cubeb_oss.c
+@@ -0,0 +1,402 @@
++/*
++ * Copyright © 2014 Mozilla Foundation
++ *
++ * This program is made available under an ISC-style license. See the
++ * accompanying file LICENSE for details.
++ */
++#if defined(HAVE_SYS_SOUNDCARD_H)
++#include <sys/soundcard.h>
++#else
++#include <soundcard.h>
++#endif
++#include <unistd.h>
++#include <stdlib.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++#include <sys/ioctl.h>
++#include <errno.h>
++#include <pthread.h>
++#include <stdio.h>
++
++#include "cubeb/cubeb.h"
++#include "cubeb-internal.h"
++
++#ifndef CUBEB_OSS_DEFAULT_OUTPUT
++#define CUBEB_OSS_DEFAULT_OUTPUT "/dev/dsp"
++#endif
++
++#define OSS_BUFFER_SIZE 1024
++
++struct cubeb {
++ struct cubeb_ops const * ops;
++};
++
++struct cubeb_stream {
++ cubeb * context;
++
++ cubeb_data_callback data_callback;
++ cubeb_state_callback state_callback;
++ void * user_ptr;
++ float volume;
++ float panning;
++
++ pthread_mutex_t state_mutex;
++ pthread_cond_t state_cond;
++
++ int running;
++ int stopped;
++ int floating;
++
++ /* These two vars are needed to support old versions of OSS */
++ unsigned int position_bytes;
++ unsigned int last_position_bytes;
++
++ uint64_t written_frags; /* The number of fragments written to /dev/dsp */
++ uint64_t missed_frags; /* fragments output with stopped stream */
++
++ cubeb_stream_params params;
++ int fd;
++ pthread_t th;
++};
++
++static struct cubeb_ops const oss_ops;
++
++int oss_init(cubeb ** context, char const * context_name)
++{
++ cubeb* ctx = (cubeb*)malloc(sizeof(cubeb));
++ ctx->ops = &oss_ops;
++ *context = ctx;
++ return CUBEB_OK;
++}
++
++static void oss_destroy(cubeb *ctx)
++{
++ free(ctx);
++}
++
++static char const * oss_get_backend_id(cubeb * context)
++{
++ static char oss_name[] = "oss";
++ return oss_name;
++}
++
++static int oss_get_max_channel_count(cubeb * ctx, uint32_t * max_channels)
++{
++ *max_channels = 2; /* Let's support only stereo for now */
++ return CUBEB_OK;
++}
++
++static int oss_get_min_latency(cubeb * context, cubeb_stream_params params,
++ uint32_t * latency_ms)
++{
++ /* 40ms is a big enough number to work ok */
++ *latency_ms = 40;
++ return CUBEB_OK;
++}
++
++static int oss_get_preferred_sample_rate(cubeb *context, uint32_t * rate)
++{
++ /* 48000 seems a prefered choice for most audio devices
++ * and a good choice for OSS */
++ *rate = 48000;
++ return CUBEB_OK;
++}
++
++static void run_state_callback(cubeb_stream *stream, cubeb_state state)
++{
++ if (stream->state_callback) {
++ stream->state_callback(stream, stream->user_ptr, state);
++ }
++}
++
++static long run_data_callback(cubeb_stream *stream, void *buffer, long nframes)
++{
++ long got = 0;
++ pthread_mutex_lock(&stream->state_mutex);
++ if (stream->data_callback && stream->running && !stream->stopped) {
++ pthread_mutex_unlock(&stream->state_mutex);
++ got = stream->data_callback(stream, stream->user_ptr, buffer, nframes);
++ } else {
++ pthread_mutex_unlock(&stream->state_mutex);
++ }
++ return got;
++}
++
++static void apply_volume(int16_t* buffer, unsigned int n,
++ float volume, float panning)
++{
++ float left = volume;
++ float right = volume;
++ unsigned int i;
++ int pan[2];
++ if (panning<0) {
++ right *= (1+panning);
++ } else {
++ left *= (1-panning);
++ }
++ pan[0] = 128.0*left;
++ pan[1] = 128.0*right;
++ for(i=0; i<n; i++){
++ buffer[i] = ((int)buffer[i])*pan[i%2]/128;
++ }
++}
++
++static void *writer(void *stm)
++{
++ cubeb_stream* stream = (cubeb_stream*)stm;
++ int16_t buffer[OSS_BUFFER_SIZE];
++ float f_buffer[OSS_BUFFER_SIZE];
++ int got;
++ unsigned long i;
++ while (stream->running) {
++ pthread_mutex_lock(&stream->state_mutex);
++ if (stream->stopped) {
++ pthread_mutex_unlock(&stream->state_mutex);
++ run_state_callback(stream, CUBEB_STATE_STOPPED);
++ pthread_mutex_lock(&stream->state_mutex);
++ while (stream->stopped) {
++ pthread_cond_wait(&stream->state_cond, &stream->state_mutex);
++ }
++ pthread_mutex_unlock(&stream->state_mutex);
++ run_state_callback(stream, CUBEB_STATE_STARTED);
++ continue;
++ }
++ pthread_mutex_unlock(&stream->state_mutex);
++ if (stream->floating) {
++ got = run_data_callback(stream, f_buffer,
++ OSS_BUFFER_SIZE/stream->params.channels);
++ for (i=0; i<((unsigned long)got)*stream->params.channels; i++) {
++ buffer[i] = f_buffer[i]*32767.0;
++ }
++ } else {
++ got = run_data_callback(stream, buffer,
++ OSS_BUFFER_SIZE/stream->params.channels);
++ }
++ apply_volume(buffer, got*stream->params.channels,
++ stream->volume, stream->panning);
++ if (got<0) {
++ run_state_callback(stream, CUBEB_STATE_ERROR);
++ break;
++ }
++ if (!got) {
++ run_state_callback(stream, CUBEB_STATE_DRAINED);
++ }
++ if (got) {
++ size_t i = 0;
++ size_t s = got*stream->params.channels*sizeof(int16_t);
++ while (i < s) {
++ ssize_t n = write(stream->fd, ((char*)buffer) + i, s - i);
++ if (n<=0) {
++ run_state_callback(stream, CUBEB_STATE_ERROR);
++ break;
++ }
++ i+=n;
++ }
++ stream->written_frags+=got;
++ }
++ }
++ return NULL;
++}
++
++static void oss_try_set_latency(cubeb_stream* stream, unsigned int latency)
++{
++ unsigned int latency_bytes, n_frag;
++ int frag;
++ /* fragment size of 1024 is a good choice with good chances to be accepted */
++ unsigned int frag_size=1024;
++ unsigned int frag_log=10; /* 2^frag_log = frag_size */
++ latency_bytes =
++ latency*stream->params.rate*stream->params.channels*sizeof(uint16_t)/1000;
++ n_frag = latency_bytes>>frag_log;
++ frag = (n_frag<<16) | frag_log;
++ /* Even if this fails we wish to continue, not checking for errors */
++ ioctl(stream->fd, SNDCTL_DSP_SETFRAGMENT, &frag);
++}
++
++static int oss_stream_init(cubeb * context, cubeb_stream ** stm,
++ char const * stream_name,
++ cubeb_stream_params stream_params,
++ unsigned int latency,
++ cubeb_data_callback data_callback,
++ cubeb_state_callback state_callback, void * user_ptr)
++{
++ cubeb_stream* stream = (cubeb_stream*)malloc(sizeof(cubeb_stream));
++ stream->context = context;
++ stream->data_callback = data_callback;
++ stream->state_callback = state_callback;
++ stream->user_ptr = user_ptr;
++
++ if ((stream->fd = open(CUBEB_OSS_DEFAULT_OUTPUT, O_WRONLY)) == -1) {
++ free(stream);
++ return CUBEB_ERROR;
++ }
++#define SET(what, to) do { unsigned int i = to; \
++ int j = ioctl(stream->fd, what, &i); \
++ if (j == -1 || i != to) { \
++ close(stream->fd); \
++ free(stream); \
++ return CUBEB_ERROR_INVALID_FORMAT; } } while (0)
++
++ stream->params = stream_params;
++ stream->volume = 1.0;
++ stream->panning = 0.0;
++
++ oss_try_set_latency(stream, latency);
++
++ stream->floating = 0;
++ SET(SNDCTL_DSP_CHANNELS, stream_params.channels);
++ SET(SNDCTL_DSP_SPEED, stream_params.rate);
++ switch (stream_params.format) {
++ case CUBEB_SAMPLE_S16LE:
++ SET(SNDCTL_DSP_SETFMT, AFMT_S16_LE);
++ break;
++ case CUBEB_SAMPLE_S16BE:
++ SET(SNDCTL_DSP_SETFMT, AFMT_S16_BE);
++ break;
++ case CUBEB_SAMPLE_FLOAT32LE:
++ SET(SNDCTL_DSP_SETFMT, AFMT_S16_NE);
++ stream->floating = 1;
++ break;
++ default:
++ close(stream->fd);
++ free(stream);
++ return CUBEB_ERROR;
++ }
++
++
++ pthread_mutex_init(&stream->state_mutex, NULL);
++ pthread_cond_init(&stream->state_cond, NULL);
++
++ stream->running = 1;
++ stream->stopped = 1;
++ stream->position_bytes = 0;
++ stream->last_position_bytes = 0;
++ stream->written_frags = 0;
++ stream->missed_frags = 0;
++
++ pthread_create(&stream->th, NULL, writer, (void*)stream);
++
++ *stm = stream;
++
++ return CUBEB_OK;
++}
++
++static void oss_stream_destroy(cubeb_stream * stream)
++{
++ pthread_mutex_lock(&stream->state_mutex);
++
++ stream->running = 0;
++ stream->stopped = 0;
++ pthread_cond_signal(&stream->state_cond);
++
++ pthread_mutex_unlock(&stream->state_mutex);
++
++ pthread_join(stream->th, NULL);
++
++ pthread_mutex_destroy(&stream->state_mutex);
++ pthread_cond_destroy(&stream->state_cond);
++ close(stream->fd);
++ free(stream);
++}
++
++static int oss_stream_get_latency(cubeb_stream * stream, uint32_t * latency)
++{
++ if (ioctl(stream->fd, SNDCTL_DSP_GETODELAY, latency)==-1) {
++ return CUBEB_ERROR;
++ }
++ /* Convert latency from bytes to frames */
++ *latency /= stream->params.channels*sizeof(int16_t);
++ return CUBEB_OK;
++}
++
++
++static int oss_stream_current_optr(cubeb_stream * stream, uint64_t * position)
++{
++ count_info ci;
++ /* Unfortunately, this ioctl is only available in OSS 4.x */
++#ifdef SNDCTL_DSP_CURRENT_OPTR
++ oss_count_t count;
++ if (ioctl(stream->fd, SNDCTL_DSP_CURRENT_OPTR, &count) != -1) {
++ *position = count.samples;// + count.fifo_samples;
++ return CUBEB_OK;
++ }
++#endif
++ /* Fall back to this ioctl in case the previous one fails */
++ if (ioctl(stream->fd, SNDCTL_DSP_GETOPTR, &ci) == -1) {
++ return CUBEB_ERROR;
++ }
++ /* ci.bytes is only 32 bit and will start to wrap after arithmetic overflow */
++ stream->position_bytes += ci.bytes - stream->last_position_bytes;
++ stream->last_position_bytes = ci.bytes;
++ *position = stream->position_bytes/stream->params.channels/sizeof(int16_t);
++ return CUBEB_OK;
++}
++
++static int oss_stream_get_position(cubeb_stream * stream, uint64_t * position)
++{
++ if ( oss_stream_current_optr(stream, position) == CUBEB_OK ){
++ *position -= stream->missed_frags;
++ return CUBEB_OK;
++ }
++ /* If no correct method to get position works we resort to this */
++ *position = stream->written_frags;
++ return CUBEB_OK;
++}
++
++
++static int oss_stream_start(cubeb_stream * stream)
++{
++ pthread_mutex_lock(&stream->state_mutex);
++ if (stream->stopped) {
++ uint64_t ptr;
++ oss_stream_current_optr(stream, &ptr);
++ stream->missed_frags = ptr - stream->written_frags;
++ stream->stopped = 0;
++ pthread_cond_signal(&stream->state_cond);
++ }
++ pthread_mutex_unlock(&stream->state_mutex);
++ return CUBEB_OK;
++}
++
++static int oss_stream_stop(cubeb_stream * stream)
++{
++ pthread_mutex_lock(&stream->state_mutex);
++ stream->stopped = 1;
++ pthread_mutex_unlock(&stream->state_mutex);
++ return CUBEB_OK;
++}
++
++int oss_stream_set_panning(cubeb_stream * stream, float panning)
++{
++ if (stream->params.channels == 2) {
++ stream->panning=panning;
++ }
++ return CUBEB_OK;
++}
++
++int oss_stream_set_volume(cubeb_stream * stream, float volume)
++{
++ stream->volume=volume;
++ return CUBEB_OK;
++}
++
++static struct cubeb_ops const oss_ops = {
++ .init = oss_init,
++ .get_backend_id = oss_get_backend_id,
++ .get_max_channel_count = oss_get_max_channel_count,
++ .get_min_latency = oss_get_min_latency,
++ .get_preferred_sample_rate = oss_get_preferred_sample_rate,
++ .destroy = oss_destroy,
++ .stream_init = oss_stream_init,
++ .stream_destroy = oss_stream_destroy,
++ .stream_start = oss_stream_start,
++ .stream_stop = oss_stream_stop,
++ .stream_get_position = oss_stream_get_position,
++ .stream_get_latency = oss_stream_get_latency,
++ .stream_set_volume = oss_stream_set_volume,
++ .stream_set_panning = oss_stream_set_panning,
++ .stream_get_current_device = NULL,
++ .stream_device_destroy = NULL,
++ .stream_register_device_changed_callback = NULL
++};
+diff --git media/libcubeb/src/moz.build media/libcubeb/src/moz.build
+index 8b7a0dd..31212ce 100644
+--- media/libcubeb/src/moz.build
++++ media/libcubeb/src/moz.build
+@@ -17,6 +17,12 @@ if CONFIG['MOZ_ALSA']:
+ ]
+ DEFINES['USE_ALSA'] = True
+
++if CONFIG['MOZ_OSS']:
++ SOURCES += [
++ 'cubeb_oss.c',
++ ]
++ DEFINES['USE_OSS'] = True
++
+ if CONFIG['MOZ_PULSEAUDIO']:
+ SOURCES += [
+ 'cubeb_pulse.c',
+@@ -75,5 +81,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+
+ FAIL_ON_WARNINGS = True
+
++CFLAGS += CONFIG['MOZ_OSS_CFLAGS']
+ CFLAGS += CONFIG['MOZ_ALSA_CFLAGS']
+ CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS']
+diff --git media/webrtc/signaling/test/common.build media/webrtc/signaling/test/common.build
+index 991f03f..3d99eb5 100644
+--- media/webrtc/signaling/test/common.build
++++ media/webrtc/signaling/test/common.build
+@@ -102,8 +102,8 @@ USE_LIBS += ['mozglue']
+ OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS']
+ OS_LIBS += CONFIG['REALTIME_LIBS']
+
+-if CONFIG['MOZ_ALSA']:
+- OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
++if CONFIG['MOZ_OSS']:
++ OS_LIBS += CONFIG['MOZ_OSS_LIBS']
+
+ if CONFIG['MOZ_NATIVE_JPEG']:
+ OS_LIBS += CONFIG['MOZ_JPEG_LIBS']
+diff --git toolkit/library/moz.build toolkit/library/moz.build
+index e191f13..4fb268a 100644
+--- toolkit/library/moz.build
++++ toolkit/library/moz.build
+@@ -234,8 +234,8 @@ if CONFIG['MOZ_NATIVE_LIBVPX']:
+ if not CONFIG['MOZ_TREE_PIXMAN']:
+ OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']
+
+-if CONFIG['MOZ_ALSA']:
+- OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
++if CONFIG['MOZ_OSS']:
++ OS_LIBS += CONFIG['MOZ_OSS_LIBS']
+
+ if CONFIG['HAVE_CLOCK_MONOTONIC']:
+ OS_LIBS += CONFIG['REALTIME_LIBS']
Property changes on: trunk/www/browser/files/patch-bug1021761
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-bug1026499
===================================================================
--- trunk/www/browser/files/patch-bug1026499 (rev 0)
+++ trunk/www/browser/files/patch-bug1026499 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,68 @@
+commit 8d0efe4
+Author: Martin Husemann <martin at NetBSD.org>
+Date: Wed Jun 18 18:12:22 2014 +0200
+
+ Bug 1026499 - Use MOZ_ALIGNED_DECL to declare union members in ipdl value declarations. r=bsmedberg
+---
+ ipc/ipdl/ipdl/cxx/ast.py | 7 ++++---
+ ipc/ipdl/ipdl/cxx/cgen.py | 5 ++++-
+ ipc/ipdl/ipdl/lower.py | 2 +-
+ 4 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git ipc/ipdl/ipdl/cxx/ast.py ipc/ipdl/ipdl/cxx/ast.py
+index 3180a65..c2d945b 100644
+--- ipc/ipdl/ipdl/cxx/ast.py
++++ ipc/ipdl/ipdl/cxx/ast.py
+@@ -336,12 +336,13 @@ Type.VOID = Type('void')
+ Type.VOIDPTR = Type('void', ptr=1)
+
+ class TypeArray(Node):
+- def __init__(self, basetype, nmemb):
+- '''the type |basetype DECLNAME[nmemb]|. |nmemb| is an Expr'''
++ def __init__(self, basetype, nmemb, alignType):
++ '''the type |basetype DECLNAME[nmemb]|. |nmemb| is an Expr, |alignType| is a type'''
+ self.basetype = basetype
+ self.nmemb = nmemb
++ self.alignType = alignType
+ def __deepcopy__(self, memo):
+- return TypeArray(deepcopy(self.basetype, memo), nmemb)
++ return TypeArray(deepcopy(self.basetype, memo), nmemb, alignType)
+
+ class TypeEnum(Node):
+ def __init__(self, name=None):
+diff --git ipc/ipdl/ipdl/cxx/cgen.py ipc/ipdl/ipdl/cxx/cgen.py
+index 48b0988..bc914cf 100644
+--- ipc/ipdl/ipdl/cxx/cgen.py
++++ ipc/ipdl/ipdl/cxx/cgen.py
+@@ -101,6 +101,7 @@ class CxxCodeGen(CodePrinter, Visitor):
+ def visitDecl(self, d):
+ # C-syntax arrays make code generation much more annoying
+ if isinstance(d.type, TypeArray):
++ self.write('MOZ_ALIGNED_DECL(')
+ d.type.basetype.accept(self)
+ else:
+ d.type.accept(self)
+@@ -111,7 +112,9 @@ class CxxCodeGen(CodePrinter, Visitor):
+ if isinstance(d.type, TypeArray):
+ self.write('[')
+ d.type.nmemb.accept(self)
+- self.write(']')
++ self.write('], MOZ_ALIGNOF(')
++ d.type.alignType.accept(self)
++ self.write('))')
+
+ def visitParam(self, p):
+ self.visitDecl(p)
+diff --git ipc/ipdl/ipdl/lower.py ipc/ipdl/ipdl/lower.py
+index e97a34c..9360f3c 100644
+--- ipc/ipdl/ipdl/lower.py
++++ ipc/ipdl/ipdl/lower.py
+@@ -768,7 +768,7 @@ IPDL union type."""
+ if self.recursive:
+ return self.ptrToType()
+ else:
+- return TypeArray(Type('char'), ExprSizeof(self.internalType()))
++ return TypeArray(Type('char'), ExprSizeof(self.internalType()), self.internalType())
+
+ def unionValue(self):
+ # NB: knows that Union's storage C union is named |mValue|
Property changes on: trunk/www/browser/files/patch-bug1026499
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-bug1041268
===================================================================
--- trunk/www/browser/files/patch-bug1041268 (rev 0)
+++ trunk/www/browser/files/patch-bug1041268 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,26 @@
+diff --git media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.cc media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.cc
+index 97f69d3..77a50b3 100644
+--- media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.cc
++++ media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.cc
+@@ -18,7 +18,7 @@ ScreenCapturer* ScreenCapturer::Create() {
+ return Create(DesktopCaptureOptions::CreateDefault());
+ }
+
+-#if defined(WEBRTC_LINUX)
++#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
+ ScreenCapturer* ScreenCapturer::CreateWithXDamage(
+ bool use_update_notifications) {
+ DesktopCaptureOptions options;
+diff --git media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.h media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.h
+index a8d40a7..177a6c1 100644
+--- media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.h
++++ media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.h
+@@ -74,7 +74,7 @@ class ScreenCapturer : public DesktopCapturer {
+ static ScreenCapturer* Create(const DesktopCaptureOptions& options);
+ static ScreenCapturer* Create();
+
+-#if defined(WEBRTC_LINUX)
++#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
+ // Creates platform-specific capturer and instructs it whether it should use
+ // X DAMAGE support.
+ static ScreenCapturer* CreateWithXDamage(bool use_x_damage);
Property changes on: trunk/www/browser/files/patch-bug1041268
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-bug1130155
===================================================================
--- trunk/www/browser/files/patch-bug1130155 (rev 0)
+++ trunk/www/browser/files/patch-bug1130155 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,179 @@
+commit eab3e3a
+Author: Mikhail Teterin <mi at aldan.algebra.com>
+Date: Tue Dec 16 19:34:02 2014 -0800
+
+ Bug 1130155 - Avoid assert failures when consuming only part of buffer.
+---
+ media/libcubeb/src/cubeb_alsa.c | 112 ++++++++++++++++++++++++++++++----------
+ 1 file changed, 85 insertions(+), 27 deletions(-)
+
+diff --git media/libcubeb/src/cubeb_alsa.c media/libcubeb/src/cubeb_alsa.c
+index 9bbc129..e72944a 100644
+--- media/libcubeb/src/cubeb_alsa.c
++++ media/libcubeb/src/cubeb_alsa.c
+@@ -14,6 +14,8 @@
+ #include <limits.h>
+ #include <dlfcn.h>
+ #include <poll.h>
++#include <stdlib.h>
++#include <stdio.h>
+ #include <unistd.h>
+ #include <alsa/asoundlib.h>
+ #include "cubeb/cubeb.h"
+@@ -45,6 +47,7 @@ MAKE_TYPEDEF(snd_pcm_avail_update);
+ MAKE_TYPEDEF(snd_pcm_close);
+ MAKE_TYPEDEF(snd_pcm_delay);
+ MAKE_TYPEDEF(snd_pcm_drain);
++MAKE_TYPEDEF(snd_pcm_forward);
+ MAKE_TYPEDEF(snd_pcm_frames_to_bytes);
+ MAKE_TYPEDEF(snd_pcm_get_params);
+ /* snd_pcm_hw_params_alloca is actually a macro */
+@@ -305,32 +308,35 @@ alsa_refill_stream(cubeb_stream * stm)
+ long got;
+ void * p;
+ int draining;
++ unsigned pipefailures, againfailures;
+
+ draining = 0;
+
+ pthread_mutex_lock(&stm->mutex);
+
+- r = WRAP(snd_pcm_poll_descriptors_revents)(stm->pcm, stm->fds, stm->nfds, &revents);
+- if (r < 0 || revents != POLLOUT) {
+- /* This should be a stream error; it makes no sense for poll(2) to wake
+- for this stream and then have the stream report that it's not ready.
+- Unfortunately, this does happen, so just bail out and try again. */
+- pthread_mutex_unlock(&stm->mutex);
+- return RUNNING;
+- }
++ for (pipefailures = 0;;) {
++ r = WRAP(snd_pcm_poll_descriptors_revents)(stm->pcm, stm->fds, stm->nfds, &revents);
++ if (r < 0 || revents != POLLOUT ||
++ (avail = WRAP(snd_pcm_avail_update)(stm->pcm)) == 0) {
++ /* This should be a stream error; it makes no sense for poll(2) to wake
++ for this stream and then have the stream report that it's not ready.
++ Unfortunately, this does happen, so just bail out and try again. */
++ pthread_mutex_unlock(&stm->mutex);
++ return RUNNING;
++ }
+
+- avail = WRAP(snd_pcm_avail_update)(stm->pcm);
+- if (avail == -EPIPE) {
++ if (avail > 0)
++ break;
++ if (pipefailures++ > 11) {
++ fprintf(stderr, "%s: repeated failures from snd_pcm_avail_update, "
++ "giving up\n", __func__);
++ pthread_mutex_unlock(&stm->mutex);
++ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
++ return ERROR;
++ }
+ WRAP(snd_pcm_recover)(stm->pcm, avail, 1);
+- avail = WRAP(snd_pcm_avail_update)(stm->pcm);
+- }
+-
+- /* Failed to recover from an xrun, this stream must be broken. */
+- if (avail < 0) {
+- pthread_mutex_unlock(&stm->mutex);
+- stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
+- return ERROR;
+ }
++ pipefailures = againfailures = 0;
+
+ /* This should never happen. */
+ if ((unsigned int) avail > stm->buffer_size) {
+@@ -359,10 +365,11 @@ alsa_refill_stream(cubeb_stream * stm)
+ if (got < 0) {
+ pthread_mutex_unlock(&stm->mutex);
+ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
++ free(p);
+ return ERROR;
+ }
+ if (got > 0) {
+- snd_pcm_sframes_t wrote;
++ snd_pcm_sframes_t wrote, towrite = got;
+
+ if (stm->params.format == CUBEB_SAMPLE_FLOAT32NE) {
+ float * b = (float *) p;
+@@ -375,14 +382,62 @@ alsa_refill_stream(cubeb_stream * stm)
+ b[i] *= stm->volume;
+ }
+ }
+- wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got);
+- if (wrote == -EPIPE) {
+- WRAP(snd_pcm_recover)(stm->pcm, wrote, 1);
+- wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got);
++ for (;;) {
++ wrote = WRAP(snd_pcm_writei)(stm->pcm, p,
++ towrite > avail ? avail : towrite);
++ switch(wrote) {
++ case -EPIPE:
++ if (pipefailures++ > 3) {
++ fprintf(stderr, "%s: Too many underflows, giving up\n", __func__);
++ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
++ pthread_mutex_unlock(&stm->mutex);
++ free(p);
++ return ERROR;
++ }
++ WRAP(snd_pcm_recover)(stm->pcm, wrote, 1);
++ continue;
++ case -EAGAIN:
++ if (againfailures++ > 3) {
++ fprintf(stderr, "%s: Too many -EAGAIN errors from snd_pcm_writei, "
++ "giving up\n", __func__);
++ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
++ pthread_mutex_unlock(&stm->mutex);
++ free(p);
++ return ERROR;
++ }
++ continue;
++ case -EBADFD:
++ fprintf(stderr, "%s: snc_pcm_writei returned -%s, giving up\n",
++ __func__, "EBADFD");
++ free(p);
++ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
++ pthread_mutex_unlock(&stm->mutex);
++ return ERROR;
++ }
++ if (wrote < 0) {
++ fprintf(stderr, "%s: snc_pcm_writei returned unexpected error %lld, "
++ "giving up\n", __func__, (long long)wrote);
++ free(p);
++ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
++ pthread_mutex_unlock(&stm->mutex);
++ return ERROR;
++ }
++ pipefailures = againfailures = 0;
++ stm->write_position += wrote;
++ gettimeofday(&stm->last_activity, NULL);
++ if (wrote > towrite) {
++ fprintf(stderr, "%s: snc_pcm_writei wrote %lld frames, which was more "
++ "than we requested (%lld). This should not happen, giving up\n",
++ __func__, (long long)wrote, (long long)towrite);
++ free(p);
++ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
++ pthread_mutex_unlock(&stm->mutex);
++ return ERROR;
++ }
++ if (towrite == wrote)
++ break;
++ towrite -= wrote;
+ }
+- assert(wrote >= 0 && wrote == got);
+- stm->write_position += wrote;
+- gettimeofday(&stm->last_activity, NULL);
+ }
+ if (got != avail) {
+ long buffer_fill = stm->buffer_size - (avail - got);
+@@ -1177,7 +1232,10 @@ alsa_stream_get_position(cubeb_stream * stm, uint64_t * position)
+ return CUBEB_OK;
+ }
+
+- assert(delay >= 0);
++ if (delay < 0) {
++ WRAP(snd_pcm_forward)(stm->pcm, -delay);
++ delay = 0;
++ }
+
+ *position = 0;
+ if (stm->write_position >= (snd_pcm_uframes_t) delay) {
Property changes on: trunk/www/browser/files/patch-bug1130155
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-bug702179
===================================================================
--- trunk/www/browser/files/patch-bug702179 (rev 0)
+++ trunk/www/browser/files/patch-bug702179 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,24 @@
+commit 6ddaacd
+Author: Ginn Chen <ginn.chen at oracle.com>
+Date: Wed Nov 30 07:23:46 2011 +0800
+
+ Bug 702179 dtrace probes are not installed on Solaris with static js lib r=glandium
+---
+ js/src/Makefile.in | 3 ---
+ toolkit/library/moz.build | 5 -----
+ 2 files changed, 8 deletions(-)
+
+diff --git js/src/Makefile.in js/src/Makefile.in
+index 62bbfa0..90400cb 100644
+--- js/src/Makefile.in
++++ js/src/Makefile.in
+@@ -17,9 +17,6 @@ TOPLEVEL_BUILD := 1
+ run_for_side_effects := $(shell echo 'MAKE: $(MAKE)')
+ EXTRA_LIBS += $(NSPR_LIBS)
+
+-DIST_INSTALL = 1
+-NO_EXPAND_LIBS = 1
+-
+ ifdef JS_HAS_CTYPES
+ ifdef MOZ_NATIVE_FFI
+ LOCAL_INCLUDES = $(MOZ_FFI_CFLAGS)
Property changes on: trunk/www/browser/files/patch-bug702179
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-bug779713
===================================================================
--- trunk/www/browser/files/patch-bug779713 (rev 0)
+++ trunk/www/browser/files/patch-bug779713 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,75 @@
+diff --git mfbt/Alignment.h mfbt/Alignment.h
+index e0843ca..353ec36 100644
+--- mfbt/Alignment.h
++++ mfbt/Alignment.h
+@@ -9,11 +9,20 @@
+ #ifndef mozilla_Alignment_h
+ #define mozilla_Alignment_h
+
++#include "mozilla/Attributes.h"
++
+ #include <stddef.h>
+ #include <stdint.h>
+
+ namespace mozilla {
+
++#if defined(MOZ_HAVE_CXX11_ALIGNAS)
++#define MOZ_ALIGNOF(T) alignof(T)
++#elif defined(__GNUC__)
++#define MOZ_ALIGNOF(T) __alignof__(T)
++#elif defined(_MSC_VER)
++#define MOZ_ALIGNOF(T) __alignof(T)
++#else
+ /*
+ * This class, and the corresponding macro MOZ_ALIGNOF, figures out how many
+ * bytes of alignment a given type needs.
+@@ -32,6 +41,7 @@ public:
+ };
+
+ #define MOZ_ALIGNOF(T) mozilla::AlignmentFinder<T>::alignment
++#endif
+
+ /*
+ * Declare the MOZ_ALIGNED_DECL macro for declaring aligned types.
+@@ -43,7 +53,10 @@ public:
+ * will declare a two-character array |arr| aligned to 8 bytes.
+ */
+
+-#if defined(__GNUC__)
++#if defined(MOZ_HAVE_CXX11_ALIGNAS)
++# define MOZ_ALIGNED_DECL(_type, _align) \
++ alignas(_align) _type
++#elif defined(__GNUC__)
+ # define MOZ_ALIGNED_DECL(_type, _align) \
+ _type __attribute__((aligned(_align)))
+ #elif defined(_MSC_VER)
+diff --git mfbt/Attributes.h mfbt/Attributes.h
+index d317766..ddb13da 100644
+--- mfbt/Attributes.h
++++ mfbt/Attributes.h
+@@ -50,6 +50,7 @@
+ * don't indicate support for them here, due to
+ * http://stackoverflow.com/questions/20498142/visual-studio-2013-explicit-keyword-bug
+ */
++# define MOZ_HAVE_CXX11_ALIGNAS
+ # define MOZ_HAVE_NEVER_INLINE __declspec(noinline)
+ # define MOZ_HAVE_NORETURN __declspec(noreturn)
+ # ifdef __clang__
+@@ -70,6 +71,9 @@
+ # ifndef __has_extension
+ # define __has_extension __has_feature /* compatibility, for older versions of clang */
+ # endif
++# if __has_extension(cxx_alignas)
++# define MOZ_HAVE_CXX11_ALIGNAS
++# endif
+ # if __has_extension(cxx_constexpr)
+ # define MOZ_HAVE_CXX11_CONSTEXPR
+ # endif
+@@ -86,6 +90,7 @@
+ # if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
+ # define MOZ_HAVE_CXX11_CONSTEXPR
+ # if MOZ_GCC_VERSION_AT_LEAST(4, 8, 0)
++# define MOZ_HAVE_CXX11_ALIGNAS
+ # define MOZ_HAVE_CXX11_CONSTEXPR_IN_TEMPLATES
+ # endif
+ # define MOZ_HAVE_EXPLICIT_CONVERSION
Property changes on: trunk/www/browser/files/patch-bug779713
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-bug826985
===================================================================
--- trunk/www/browser/files/patch-bug826985 (rev 0)
+++ trunk/www/browser/files/patch-bug826985 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,179 @@
+commit 8024d93
+Author: Henrik Gulbrandsen <henrik at gulbra.net>
+Date: Fri Jan 4 13:49:22 2013 +0100
+
+ Bug 826985 - Support more video formats for WebRTC via libv4l2 on Linux.
+---
+ config/system-headers | 1 +
+ configure.in | 7 +++++++
+ media/webrtc/signaling/test/Makefile.in | 1 +
+ .../modules/video_capture/linux/device_info_linux.cc | 17 +++++++++++++++++
+ .../modules/video_capture/linux/video_capture_linux.cc | 16 +++++++++++++++-
+ .../webrtc/modules/video_capture/video_capture.gypi | 11 +++++++++++
+ toolkit/library/Makefile.in | 1 +
+ 6 files changed, 52 insertions(+), 1 deletion(-)
+
+diff --git config/system-headers config/system-headers
+index 55e4cd1..76567b3 100644
+--- config/system-headers
++++ config/system-headers
+@@ -627,6 +627,7 @@ libgnome/libgnome.h
+ libgnomeui/gnome-icon-lookup.h
+ libgnomeui/gnome-icon-theme.h
+ libgnomeui/gnome-ui-init.h
++libv4l2.h
+ lib$routines.h
+ limits
+ limits.h
+diff --git configure.in configure.in
+index 55e4cd1..76567b3 100644
+--- configure.in
++++ configure.in
+@@ -5309,6 +5309,9 @@ if test -n "$MOZ_WEBRTC"; then
+ MOZ_VP8_ENCODER=1
+ MOZ_VP8_ERROR_CONCEALMENT=1
+
++ dnl with libv4l2 we can support more cameras
++ PKG_CHECK_MODULES(MOZ_LIBV4L2, libv4l2)
++
+ dnl enable once Signaling lands
+ MOZ_WEBRTC_SIGNALING=1
+ AC_DEFINE(MOZ_WEBRTC_SIGNALING)
+diff --git build/gyp.mozbuild build/gyp.mozbuild
+index b483cd1..f1dd1f0 100644
+--- build/gyp.mozbuild
++++ build/gyp.mozbuild
+@@ -11,6 +11,7 @@ gyp_vars = {
+ 'have_ethtool_cmd_speed_hi': 1 if CONFIG['MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI'] else 0,
+ 'include_alsa_audio': 1 if CONFIG['MOZ_ALSA'] else 0,
+ 'include_pulse_audio': 1 if CONFIG['MOZ_PULSEAUDIO'] else 0,
++ 'use_libv4l2': 1 if CONFIG['MOZ_LIBV4L2_LIBS'] else 0,
+ # basic stuff for everything
+ 'include_internal_video_render': 0,
+ 'clang_use_chrome_plugins': 0,
+diff --git media/webrtc/signaling/test/common.build media/webrtc/signaling/test/common.build
+index b483cd1..f1dd1f0 100644
+--- media/webrtc/signaling/test/common.build
++++ media/webrtc/signaling/test/common.build
+@@ -99,6 +99,7 @@ if CONFIG['JS_SHARED_LIBRARY']:
+
+ USE_LIBS += ['mozglue']
+
++OS_LIBS += CONFIG['MOZ_LIBV4L2_LIBS']
+ OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS']
+ OS_LIBS += CONFIG['REALTIME_LIBS']
+
+diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
+index 239a292..bab496c 100644
+--- media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
++++ media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
+@@ -25,10 +25,21 @@
+ #else
+ #include <linux/videodev2.h>
+ #endif
++#ifdef HAVE_LIBV4L2
++#include <libv4l2.h>
++#endif
+
+ #include "webrtc/system_wrappers/interface/ref_count.h"
+ #include "webrtc/system_wrappers/interface/trace.h"
+
++#ifdef HAVE_LIBV4L2
++#define open v4l2_open
++#define close v4l2_close
++#define dup v4l2_dup
++#define ioctl v4l2_ioctl
++#define mmap v4l2_mmap
++#define munmap v4l2_munmap
++#endif
+
+ namespace webrtc
+ {
+@@ -130,6 +142,11 @@ WebRtc_Word32 DeviceInfoLinux::GetDeviceName(
+ memset(deviceNameUTF8, 0, deviceNameLength);
+ memcpy(cameraName, cap.card, sizeof(cap.card));
+
++ if (cameraName[0] == '\0')
++ {
++ sprintf(cameraName, "Camera at /dev/video%d", deviceNumber);
++ }
++
+ if (deviceNameLength >= strlen(cameraName))
+ {
+ memcpy(deviceNameUTF8, cameraName, strlen(cameraName));
+diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
+index 12df1b3..e9863ba 100644
+--- media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
++++ media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
+@@ -25,6 +25,9 @@
+ #else
+ #include <linux/videodev2.h>
+ #endif
++#ifdef HAVE_LIBV4L2
++#include <libv4l2.h>
++#endif
+
+ #include <new>
+
+@@ -26,6 +31,15 @@
+ #include "critical_section_wrapper.h"
+ #include "video_capture_linux.h"
+
++#ifdef HAVE_LIBV4L2
++#define open v4l2_open
++#define close v4l2_close
++#define dup v4l2_dup
++#define ioctl v4l2_ioctl
++#define mmap v4l2_mmap
++#define munmap v4l2_munmap
++#endif
++
+ namespace webrtc
+ {
+ namespace videocapturemodule
+diff --git media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
+index d46b5aa..e452223 100644
+--- media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
++++ media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
+@@ -7,6 +7,9 @@
+ # be found in the AUTHORS file in the root of the source tree.
+
+ {
++ 'variables': {
++ 'use_libv4l2%': 0,
++ },
+ 'targets': [
+ {
+ 'target_name': 'video_capture_module',
+@@ -69,6 +72,19 @@
+ 'linux/video_capture_linux.cc',
+ 'linux/video_capture_linux.h',
+ ],
++ 'conditions': [
++ ['use_libv4l2==1', {
++ 'defines': [
++ 'HAVE_LIBV4L2',
++ ],
++ 'cflags_mozilla': [
++ '$(MOZ_LIBV4L2_CFLAGS)',
++ ],
++ 'libraries': [
++ '-lv4l2',
++ ],
++ }],
++ ],
+ }], # linux
+ ['OS=="mac"', {
+ 'sources': [
+diff --git toolkit/library/moz.build toolkit/library/moz.build
+index 9c16ffa..1db3794 100644
+--- toolkit/library/moz.build
++++ toolkit/library/moz.build
+@@ -163,6 +163,7 @@ if CONFIG['OS_ARCH'] == 'Linux' and CONF
+ ]
+
+ OS_LIBS += CONFIG['MOZ_CAIRO_OSLIBS']
++OS_LIBS += CONFIG['MOZ_LIBV4L2_LIBS']
+ OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS']
+ OS_LIBS += CONFIG['MOZ_APP_EXTRA_LIBS']
+
Property changes on: trunk/www/browser/files/patch-bug826985
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-bug847568
===================================================================
--- trunk/www/browser/files/patch-bug847568 (rev 0)
+++ trunk/www/browser/files/patch-bug847568 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,249 @@
+# Allow building against system-wide graphite2/harfbuzz.
+
+diff --git config/Makefile.in config/Makefile.in
+index 14bfc0d..5383399 100644
+--- config/Makefile.in
++++ config/Makefile.in
+@@ -75,6 +75,8 @@ export:: $(export-preqs)
+ -DMOZ_NATIVE_LIBEVENT=$(MOZ_NATIVE_LIBEVENT) \
+ -DMOZ_NATIVE_LIBVPX=$(MOZ_NATIVE_LIBVPX) \
+ -DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \
++ -DMOZ_NATIVE_GRAPHITE2=$(MOZ_NATIVE_GRAPHITE2) \
++ -DMOZ_NATIVE_HARFBUZZ=$(MOZ_NATIVE_HARFBUZZ) \
+ $(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
+ $(INSTALL) system_wrappers $(DIST)
+
+diff --git config/system-headers config/system-headers
+index 18e8703..bdc5f82 100644
+--- config/system-headers
++++ config/system-headers
+@@ -1357,3 +1357,11 @@ unicode/utypes.h
+ #endif
+ libutil.h
+ unwind.h
++#if MOZ_NATIVE_GRAPHITE2==1
++graphite2/Font.h
++graphite2/Segment.h
++#endif
++#if MOZ_NATIVE_HARFBUZZ==1
++harfbuzz/hb-ot.h
++harfbuzz/hb.h
++#endif
+diff --git configure.in configure.in
+index ac38f40..87536b7 100644
+--- configure.in
++++ configure.in
+@@ -7986,6 +7986,49 @@ if test "$USE_FC_FREETYPE"; then
+ fi
+
+ dnl ========================================================
++dnl Check for harfbuzz
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-harfbuzz,
++[ --with-system-harfbuzz Use system harfbuzz (located with pkgconfig)],
++MOZ_NATIVE_HARFBUZZ=1,
++MOZ_NATIVE_HARFBUZZ=)
++
++if test -n "$MOZ_NATIVE_HARFBUZZ"; then
++ PKG_CHECK_MODULES(MOZ_HARFBUZZ, harfbuzz >= 0.9.34)
++fi
++
++AC_SUBST(MOZ_NATIVE_HARFBUZZ)
++
++dnl ========================================================
++dnl Check for graphite2
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-graphite2,
++[ --with-system-graphite2 Use system graphite2 (located with pkgconfig)],
++MOZ_NATIVE_GRAPHITE2=1,
++MOZ_NATIVE_GRAPHITE2=)
++
++if test -n "$MOZ_NATIVE_GRAPHITE2"; then
++ PKG_CHECK_MODULES(MOZ_GRAPHITE2, graphite2)
++
++ dnl graphite2.pc has bogus version, check manually
++ AC_TRY_COMPILE([ #include <graphite2/Font.h>
++ #define GR2_VERSION_REQUIRE(major,minor,bugfix) \
++ ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \
++ * 100 + GR2_VERSION_BUGFIX >= \
++ (major) * 10000 + (minor) * 100 + (bugfix) )
++ ], [
++ #if !GR2_VERSION_REQUIRE(1,2,4)
++ #error "Insufficient graphite2 version."
++ #endif
++ ], [],
++ [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])])
++fi
++
++AC_SUBST(MOZ_NATIVE_GRAPHITE2)
++
++dnl ========================================================
+ dnl Check for pixman and cairo
+ dnl ========================================================
+
+diff --git dom/base/moz.build dom/base/moz.build
+index a660ba4..6b2f602 100644
+--- dom/base/moz.build
++++ dom/base/moz.build
+@@ -375,6 +375,9 @@ if CONFIG['INTEL_ARCHITECTURE']:
+ SOURCES += ['nsTextFragmentSSE2.cpp']
+ SOURCES['nsTextFragmentSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
+
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ SOURCES['nsContentUtils.cpp'].flags += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ EXTRA_COMPONENTS += [
+ 'ConsoleAPI.manifest',
+ 'ConsoleAPIStorage.js',
+diff --git gfx/graphite2/moz-gr-update.sh gfx/graphite2/moz-gr-update.sh
+index f3d76ea..a9e7fb6 100644
+--- gfx/graphite2/moz-gr-update.sh
++++ gfx/graphite2/moz-gr-update.sh
+@@ -23,8 +23,14 @@ echo "\nSee" $0 "for update procedure.\n" >> gfx/graphite2/README.mozilla
+ find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
+ find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
+
++# closest tag/release to require for system version
++TAG=$(cd ../graphitedev/ && hg parents --template {latesttag})
++
++perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$TAG/ and tr/./,/ \
++ if /GR2_VERSION_REQUIRE/" configure.in
++
+ # summarize what's been touched
+-echo Updated to $CHANGESET.
++echo Updated to $CHANGESET \($TAG for --with-system-graphite2\)
+ echo Here is what changed in the gfx/graphite2 directory:
+ echo
+
+diff --git gfx/harfbuzz/README-mozilla gfx/harfbuzz/README-mozilla
+index ca57d16..1ce21fe 100644
+--- gfx/harfbuzz/README-mozilla
++++ gfx/harfbuzz/README-mozilla
+@@ -18,3 +18,8 @@ the mozilla tree.
+ In addition, the src/Makefile.in file here is NOT from upstream, nor is it
+ generated from src/Makefile.am (the original harfbuzz version); it is a mozilla-
+ specific makefile that is maintained by hand.
++
++The in-tree copy may be omitted during build by --with-system-harfbuzz.
++Make sure to keep pkg-config version check within configure.in in sync
++with checkout version or increment latest tag by one if it's not based
++on upstream release.
+diff --git gfx/moz.build gfx/moz.build
+index 519aa46..6929751 100644
+--- gfx/moz.build
++++ gfx/moz.build
+@@ -7,6 +7,12 @@
+ if CONFIG['MOZ_TREE_CAIRO']:
+ DIRS += ['cairo']
+
++if not CONFIG['MOZ_NATIVE_GRAPHITE2']:
++ DIRS += ['graphite2/src' ]
++
++if not CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ DIRS += ['harfbuzz/src']
++
+ DIRS += [
+ '2d',
+ 'ycbcr',
+@@ -15,8 +21,6 @@ DIRS += [
+ 'qcms',
+ 'gl',
+ 'layers',
+- 'graphite2/src',
+- 'harfbuzz/src',
+ 'ots/src',
+ 'thebes',
+ 'ipc',
+diff --git gfx/skia/generate_mozbuild.py gfx/skia/generate_mozbuild.py
+index 28fa6b5..240dced 100755
+--- gfx/skia/generate_mozbuild.py
++++ gfx/skia/generate_mozbuild.py
+@@ -142,6 +142,9 @@ if CONFIG['GNU_CXX']:
+ if CONFIG['CPU_ARCH'] == 'arm':
+ SOURCES['trunk/src/opts/SkBlitRow_opts_arm.cpp'].flags += ['-fomit-frame-pointer']
+
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk', 'qt'):
+ CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
+ CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
+diff --git gfx/skia/moz.build gfx/skia/moz.build
+index 1d0c2f9..adb8941 100644
+--- gfx/skia/moz.build
++++ gfx/skia/moz.build
+@@ -970,6 +970,9 @@ if CONFIG['GNU_CXX']:
+ if CONFIG['CPU_ARCH'] == 'arm':
+ SOURCES['trunk/src/opts/SkBlitRow_opts_arm.cpp'].flags += ['-fomit-frame-pointer']
+
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk', 'qt'):
+ CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
+ CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
+diff --git gfx/thebes/moz.build gfx/thebes/moz.build
+index d5852fa..aeeab25 100644
+--- gfx/thebes/moz.build
++++ gfx/thebes/moz.build
+@@ -294,7 +294,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'andr
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'qt'):
+ CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
+
+-DEFINES['GRAPHITE2_STATIC'] = True
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_GRAPHITE2']:
++ CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS']
++else:
++ DEFINES['GRAPHITE2_STATIC'] = True
+
+ if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
+ DEFINES['OTS_DLL'] = True
+diff --git intl/unicharutil/util/moz.build intl/unicharutil/util/moz.build
+index d736943..41a931f 100644
+--- intl/unicharutil/util/moz.build
++++ intl/unicharutil/util/moz.build
+@@ -42,6 +42,9 @@ if CONFIG['_MSC_VER']:
+ if CONFIG['ENABLE_INTL_API']:
+ CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
+
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ if CONFIG['GNU_CXX']:
+ FAIL_ON_WARNINGS = True
+
+diff --git netwerk/dns/moz.build netwerk/dns/moz.build
+index 0b0717a..2e665c9 100644
+--- netwerk/dns/moz.build
++++ netwerk/dns/moz.build
+@@ -66,5 +66,8 @@ LOCAL_INCLUDES += [
+ '/netwerk/base',
+ ]
+
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['ANDROID_VERSION'] > '19':
+ CXXFLAGS += ['-I%s/bionic/libc/dns/include' % CONFIG['ANDROID_SOURCE']]
+diff --git toolkit/library/moz.build toolkit/library/moz.build
+index 67f0db9..d42137a 100644
+--- toolkit/library/moz.build
++++ toolkit/library/moz.build
+@@ -187,6 +187,12 @@ if CONFIG['MOZ_NATIVE_LIBVPX']:
+ if not CONFIG['MOZ_TREE_PIXMAN']:
+ OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']
+
++if CONFIG['MOZ_NATIVE_GRAPHITE2']:
++ OS_LIBS += CONFIG['MOZ_GRAPHITE2_LIBS']
++
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS']
++
+ if CONFIG['MOZ_OSS']:
+ OS_LIBS += CONFIG['MOZ_OSS_LIBS']
+
Property changes on: trunk/www/browser/files/patch-bug847568
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-bug981348
===================================================================
--- trunk/www/browser/files/patch-bug981348 (rev 0)
+++ trunk/www/browser/files/patch-bug981348 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,41 @@
+diff --git dom/system/OSFileConstants.cpp dom/system/OSFileConstants.cpp
+index 4b21361..cb3be32 100644
+--- dom/system/OSFileConstants.cpp
++++ dom/system/OSFileConstants.cpp
+@@ -596,7 +596,7 @@ static const dom::ConstantSpec gLibcProperties[] =
+
+ { "OSFILE_SIZEOF_STATVFS", INT_TO_JSVAL(sizeof (struct statvfs)) },
+
+- { "OSFILE_OFFSETOF_STATVFS_F_BSIZE", INT_TO_JSVAL(offsetof (struct statvfs, f_bsize)) },
++ { "OSFILE_OFFSETOF_STATVFS_F_FRSIZE", INT_TO_JSVAL(offsetof (struct statvfs, f_frsize)) },
+ { "OSFILE_OFFSETOF_STATVFS_F_BAVAIL", INT_TO_JSVAL(offsetof (struct statvfs, f_bavail)) },
+
+ #endif // defined(XP_UNIX)
+diff --git toolkit/components/osfile/modules/osfile_unix_back.jsm toolkit/components/osfile/modules/osfile_unix_back.jsm
+index b59fca4..0cf220b 100644
+--- toolkit/components/osfile/modules/osfile_unix_back.jsm
++++ toolkit/components/osfile/modules/osfile_unix_back.jsm
+@@ -228,8 +228,8 @@
+ let statvfs = new SharedAll.HollowStructure("statvfs",
+ Const.OSFILE_SIZEOF_STATVFS);
+
+- statvfs.add_field_at(Const.OSFILE_OFFSETOF_STATVFS_F_BSIZE,
+- "f_bsize", Type.unsigned_long.implementation);
++ statvfs.add_field_at(Const.OSFILE_OFFSETOF_STATVFS_F_FRSIZE,
++ "f_frsize", Type.unsigned_long.implementation);
+ statvfs.add_field_at(Const.OSFILE_OFFSETOF_STATVFS_F_BAVAIL,
+ "f_bavail", Type.fsblkcnt_t.implementation);
+
+diff --git toolkit/components/osfile/modules/osfile_unix_front.jsm toolkit/components/osfile/modules/osfile_unix_front.jsm
+index 99e5e9b..de642c5 100644
+--- toolkit/components/osfile/modules/osfile_unix_front.jsm
++++ toolkit/components/osfile/modules/osfile_unix_front.jsm
+@@ -373,7 +373,7 @@
+ throw_on_negative("statvfs", UnixFile.statvfs(sourcePath, fileSystemInfoPtr));
+
+ let bytes = new Type.uint64_t.implementation(
+- fileSystemInfo.f_bsize * fileSystemInfo.f_bavail);
++ fileSystemInfo.f_frsize * fileSystemInfo.f_bavail);
+
+ return bytes.value;
+ };
Property changes on: trunk/www/browser/files/patch-bug981348
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-bug991253
===================================================================
--- trunk/www/browser/files/patch-bug991253 (rev 0)
+++ trunk/www/browser/files/patch-bug991253 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,17 @@
+--- extensions/spellcheck/hunspell/src/mozHunspell.cpp~
++++ extensions/spellcheck/hunspell/src/mozHunspell.cpp
+@@ -400,6 +400,14 @@ mozHunspell::LoadDictionaryList(bool aNo
+ }
+ }
+
++ // load system hunspell dictionaries
++ nsCOMPtr<nsIFile> hunDir;
++ NS_NewNativeLocalFile(NS_LITERAL_CSTRING("%%LOCALBASE%%/share/hunspell"),
++ true, getter_AddRefs(hunDir));
++ if (hunDir) {
++ LoadDictionariesFromDir(hunDir);
++ }
++
+ // find dictionaries from extensions requiring restart
+ nsCOMPtr<nsISimpleEnumerator> dictDirs;
+ rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY_LIST,
Property changes on: trunk/www/browser/files/patch-bug991253
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-build-pgo-profileserver.py
===================================================================
--- trunk/www/browser/files/patch-build-pgo-profileserver.py (rev 0)
+++ trunk/www/browser/files/patch-build-pgo-profileserver.py 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,11 @@
+--- 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
+@@ -59,7 +59,7 @@ if __name__ == '__main__':
+ env["MOZ_JAR_LOG_FILE"] = os.path.abspath(jarlog)
+ print "jarlog: %s" % env["MOZ_JAR_LOG_FILE"]
+
+- cmdargs = ["http://localhost:%d/index.html" % PORT]
++ cmdargs = ["http://127.0.0.1:%d/index.html" % PORT]
+ runner = FirefoxRunner(profile=profile,
+ binary=build.get_binary_path(where="staged-package"),
+ cmdargs=cmdargs,
Property changes on: trunk/www/browser/files/patch-build-pgo-profileserver.py
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-config-baseconfig.mk
===================================================================
--- trunk/www/browser/files/patch-config-baseconfig.mk (rev 0)
+++ trunk/www/browser/files/patch-config-baseconfig.mk 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,14 @@
+--- config/baseconfig.mk~
++++ config/baseconfig.mk
+@@ -1,7 +1,7 @@
+-includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
++includedir := $(includedir)/%%MOZILLA%%
++idldir = $(datadir)/idl/%%MOZILLA%%
++installdir = $(libdir)/%%MOZILLA%%
++sdkdir = $(libdir)/%%MOZILLA%%
+ ifndef TOP_DIST
+ TOP_DIST = dist
+ endif
Property changes on: trunk/www/browser/files/patch-config-baseconfig.mk
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-ijg-libjpeg
===================================================================
--- trunk/www/browser/files/patch-ijg-libjpeg (rev 0)
+++ trunk/www/browser/files/patch-ijg-libjpeg 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,383 @@
+# Partially revert bug 791305 to allow building with system IJG jpeg library
+
+diff --git configure.in configure.in
+index f0aeb5d..1c01010 100644
+--- configure.in
++++ configure.in
+@@ -4027,11 +4027,7 @@ if test "$MOZ_NATIVE_JPEG" = 1; then
+ #include <jpeglib.h> ],
+ [ #if JPEG_LIB_VERSION < $MOZJPEG
+ #error "Insufficient JPEG library version ($MOZJPEG required)."
+- #endif
+- #ifndef JCS_EXTENSIONS
+- #error "libjpeg-turbo JCS_EXTENSIONS required"
+- #endif
+- ],
++ #endif ],
+ MOZ_NATIVE_JPEG=1,
+ AC_MSG_ERROR([Insufficient JPEG library version for --with-system-jpeg]))
+ fi
+diff --git image/decoders/nsJPEGDecoder.cpp image/decoders/nsJPEGDecoder.cpp
+index 8fa8200..1d2a259 100644
+--- image/decoders/nsJPEGDecoder.cpp
++++ image/decoders/nsJPEGDecoder.cpp
+@@ -21,13 +21,28 @@
+
+ extern "C" {
+ #include "iccjpeg.h"
+-}
+
++#ifdef JCS_EXTENSIONS
+ #if MOZ_BIG_ENDIAN
+ #define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_XRGB
+ #else
+ #define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_BGRX
+ #endif
++#else
++/* Colorspace conversion (copied from jpegint.h) */
++struct jpeg_color_deconverter {
++ JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
++ JMETHOD(void, color_convert, (j_decompress_ptr cinfo,
++ JSAMPIMAGE input_buf, JDIMENSION input_row,
++ JSAMPARRAY output_buf, int num_rows));
++};
++
++METHODDEF(void)
++ycc_rgb_convert_argb (j_decompress_ptr cinfo,
++ JSAMPIMAGE input_buf, JDIMENSION input_row,
++ JSAMPARRAY output_buf, int num_rows);
++#endif
++}
+
+ static void cmyk_convert_rgb(JSAMPROW row, JDIMENSION width);
+
+@@ -367,6 +382,7 @@ nsJPEGDecoder::WriteInternal(const char*
+ case JCS_GRAYSCALE:
+ case JCS_RGB:
+ case JCS_YCbCr:
++#ifdef JCS_EXTENSIONS
+ // if we're not color managing we can decode directly to
+ // MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB
+ if (mCMSMode != eCMSMode_All) {
+@@ -375,6 +391,9 @@ nsJPEGDecoder::WriteInternal(const char*
+ } else {
+ mInfo.out_color_space = JCS_RGB;
+ }
++#else
++ mInfo.out_color_space = JCS_RGB;
++#endif
+ break;
+ case JCS_CMYK:
+ case JCS_YCCK:
+@@ -448,6 +467,16 @@ nsJPEGDecoder::WriteInternal(const char*
+ return; // I/O suspension
+ }
+
++#ifndef JCS_EXTENSIONS
++ /* Force to use our YCbCr to Packed RGB converter when possible */
++ if (!mTransform && (mCMSMode != eCMSMode_All) &&
++ mInfo.jpeg_color_space == JCS_YCbCr && mInfo.out_color_space == JCS_RGB) {
++ /* Special case for the most common case: transform from YCbCr direct into packed ARGB */
++ mInfo.out_color_components = 4; /* Packed ARGB pixels are always 4 bytes...*/
++ mInfo.cconvert->color_convert = ycc_rgb_convert_argb;
++ }
++#endif
++
+ // If this is a progressive JPEG ...
+ mState = mInfo.buffered_image ?
+ JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL;
+@@ -605,7 +633,11 @@ nsJPEGDecoder::OutputScanlines(bool* sus
+ uint32_t* imageRow = ((uint32_t*)mImageData) +
+ (mInfo.output_scanline * mInfo.output_width);
+
++#ifdef JCS_EXTENSIONS
+ if (mInfo.out_color_space == MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB) {
++#else
++ if (mInfo.cconvert->color_convert == ycc_rgb_convert_argb) {
++#endif
+ // Special case: scanline will be directly converted into packed ARGB
+ if (jpeg_read_scanlines(&mInfo, (JSAMPARRAY)&imageRow, 1) != 1) {
+ *suspend = true; // suspend
+@@ -920,6 +952,282 @@ term_source (j_decompress_ptr jd)
+ } // namespace mozilla
+
+
++#ifndef JCS_EXTENSIONS
++/**************** YCbCr -> Cairo's RGB24/ARGB32 conversion: most common case **************/
++
++/*
++ * YCbCr is defined per CCIR 601-1, except that Cb and Cr are
++ * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5.
++ * The conversion equations to be implemented are therefore
++ * R = Y + 1.40200 * Cr
++ * G = Y - 0.34414 * Cb - 0.71414 * Cr
++ * B = Y + 1.77200 * Cb
++ * where Cb and Cr represent the incoming values less CENTERJSAMPLE.
++ * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.)
++ *
++ * To avoid floating-point arithmetic, we represent the fractional constants
++ * as integers scaled up by 2^16 (about 4 digits precision); we have to divide
++ * the products by 2^16, with appropriate rounding, to get the correct answer.
++ * Notice that Y, being an integral input, does not contribute any fraction
++ * so it need not participate in the rounding.
++ *
++ * For even more speed, we avoid doing any multiplications in the inner loop
++ * by precalculating the constants times Cb and Cr for all possible values.
++ * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table);
++ * for 12-bit samples it is still acceptable. It's not very reasonable for
++ * 16-bit samples, but if you want lossless storage you shouldn't be changing
++ * colorspace anyway.
++ * The Cr=>R and Cb=>B values can be rounded to integers in advance; the
++ * values for the G calculation are left scaled up, since we must add them
++ * together before rounding.
++ */
++
++#define SCALEBITS 16 /* speediest right-shift on some machines */
++
++/* Use static tables for color processing. */
++/* Four tables, each 256 entries of 4 bytes totals 4K which is not bad... */
++
++const int Cr_r_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
++ -0xb3, -0xb2, -0xb1, -0xaf, -0xae, -0xac,
++ -0xab, -0xaa, -0xa8, -0xa7, -0xa5, -0xa4,
++ -0xa3, -0xa1, -0xa0, -0x9e, -0x9d, -0x9c,
++ -0x9a, -0x99, -0x97, -0x96, -0x95, -0x93,
++ -0x92, -0x90, -0x8f, -0x8e, -0x8c, -0x8b,
++ -0x89, -0x88, -0x87, -0x85, -0x84, -0x82,
++ -0x81, -0x80, -0x7e, -0x7d, -0x7b, -0x7a,
++ -0x79, -0x77, -0x76, -0x74, -0x73, -0x72,
++ -0x70, -0x6f, -0x6d, -0x6c, -0x6b, -0x69,
++ -0x68, -0x66, -0x65, -0x64, -0x62, -0x61,
++ -0x5f, -0x5e, -0x5d, -0x5b, -0x5a, -0x58,
++ -0x57, -0x56, -0x54, -0x53, -0x51, -0x50,
++ -0x4f, -0x4d, -0x4c, -0x4a, -0x49, -0x48,
++ -0x46, -0x45, -0x43, -0x42, -0x40, -0x3f,
++ -0x3e, -0x3c, -0x3b, -0x39, -0x38, -0x37,
++ -0x35, -0x34, -0x32, -0x31, -0x30, -0x2e,
++ -0x2d, -0x2b, -0x2a, -0x29, -0x27, -0x26,
++ -0x24, -0x23, -0x22, -0x20, -0x1f, -0x1d,
++ -0x1c, -0x1b, -0x19, -0x18, -0x16, -0x15,
++ -0x14, -0x12, -0x11, -0x0f, -0x0e, -0x0d,
++ -0x0b, -0x0a, -0x08, -0x07, -0x06, -0x04,
++ -0x03, -0x01, 0x00, 0x01, 0x03, 0x04,
++ 0x06, 0x07, 0x08, 0x0a, 0x0b, 0x0d,
++ 0x0e, 0x0f, 0x11, 0x12, 0x14, 0x15,
++ 0x16, 0x18, 0x19, 0x1b, 0x1c, 0x1d,
++ 0x1f, 0x20, 0x22, 0x23, 0x24, 0x26,
++ 0x27, 0x29, 0x2a, 0x2b, 0x2d, 0x2e,
++ 0x30, 0x31, 0x32, 0x34, 0x35, 0x37,
++ 0x38, 0x39, 0x3b, 0x3c, 0x3e, 0x3f,
++ 0x40, 0x42, 0x43, 0x45, 0x46, 0x48,
++ 0x49, 0x4a, 0x4c, 0x4d, 0x4f, 0x50,
++ 0x51, 0x53, 0x54, 0x56, 0x57, 0x58,
++ 0x5a, 0x5b, 0x5d, 0x5e, 0x5f, 0x61,
++ 0x62, 0x64, 0x65, 0x66, 0x68, 0x69,
++ 0x6b, 0x6c, 0x6d, 0x6f, 0x70, 0x72,
++ 0x73, 0x74, 0x76, 0x77, 0x79, 0x7a,
++ 0x7b, 0x7d, 0x7e, 0x80, 0x81, 0x82,
++ 0x84, 0x85, 0x87, 0x88, 0x89, 0x8b,
++ 0x8c, 0x8e, 0x8f, 0x90, 0x92, 0x93,
++ 0x95, 0x96, 0x97, 0x99, 0x9a, 0x9c,
++ 0x9d, 0x9e, 0xa0, 0xa1, 0xa3, 0xa4,
++ 0xa5, 0xa7, 0xa8, 0xaa, 0xab, 0xac,
++ 0xae, 0xaf, 0xb1, 0xb2,
++ };
++
++const int Cb_b_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
++ -0xe3, -0xe1, -0xdf, -0xde, -0xdc, -0xda,
++ -0xd8, -0xd6, -0xd5, -0xd3, -0xd1, -0xcf,
++ -0xce, -0xcc, -0xca, -0xc8, -0xc6, -0xc5,
++ -0xc3, -0xc1, -0xbf, -0xbe, -0xbc, -0xba,
++ -0xb8, -0xb7, -0xb5, -0xb3, -0xb1, -0xaf,
++ -0xae, -0xac, -0xaa, -0xa8, -0xa7, -0xa5,
++ -0xa3, -0xa1, -0x9f, -0x9e, -0x9c, -0x9a,
++ -0x98, -0x97, -0x95, -0x93, -0x91, -0x90,
++ -0x8e, -0x8c, -0x8a, -0x88, -0x87, -0x85,
++ -0x83, -0x81, -0x80, -0x7e, -0x7c, -0x7a,
++ -0x78, -0x77, -0x75, -0x73, -0x71, -0x70,
++ -0x6e, -0x6c, -0x6a, -0x69, -0x67, -0x65,
++ -0x63, -0x61, -0x60, -0x5e, -0x5c, -0x5a,
++ -0x59, -0x57, -0x55, -0x53, -0x52, -0x50,
++ -0x4e, -0x4c, -0x4a, -0x49, -0x47, -0x45,
++ -0x43, -0x42, -0x40, -0x3e, -0x3c, -0x3a,
++ -0x39, -0x37, -0x35, -0x33, -0x32, -0x30,
++ -0x2e, -0x2c, -0x2b, -0x29, -0x27, -0x25,
++ -0x23, -0x22, -0x20, -0x1e, -0x1c, -0x1b,
++ -0x19, -0x17, -0x15, -0x13, -0x12, -0x10,
++ -0x0e, -0x0c, -0x0b, -0x09, -0x07, -0x05,
++ -0x04, -0x02, 0x00, 0x02, 0x04, 0x05,
++ 0x07, 0x09, 0x0b, 0x0c, 0x0e, 0x10,
++ 0x12, 0x13, 0x15, 0x17, 0x19, 0x1b,
++ 0x1c, 0x1e, 0x20, 0x22, 0x23, 0x25,
++ 0x27, 0x29, 0x2b, 0x2c, 0x2e, 0x30,
++ 0x32, 0x33, 0x35, 0x37, 0x39, 0x3a,
++ 0x3c, 0x3e, 0x40, 0x42, 0x43, 0x45,
++ 0x47, 0x49, 0x4a, 0x4c, 0x4e, 0x50,
++ 0x52, 0x53, 0x55, 0x57, 0x59, 0x5a,
++ 0x5c, 0x5e, 0x60, 0x61, 0x63, 0x65,
++ 0x67, 0x69, 0x6a, 0x6c, 0x6e, 0x70,
++ 0x71, 0x73, 0x75, 0x77, 0x78, 0x7a,
++ 0x7c, 0x7e, 0x80, 0x81, 0x83, 0x85,
++ 0x87, 0x88, 0x8a, 0x8c, 0x8e, 0x90,
++ 0x91, 0x93, 0x95, 0x97, 0x98, 0x9a,
++ 0x9c, 0x9e, 0x9f, 0xa1, 0xa3, 0xa5,
++ 0xa7, 0xa8, 0xaa, 0xac, 0xae, 0xaf,
++ 0xb1, 0xb3, 0xb5, 0xb7, 0xb8, 0xba,
++ 0xbc, 0xbe, 0xbf, 0xc1, 0xc3, 0xc5,
++ 0xc6, 0xc8, 0xca, 0xcc, 0xce, 0xcf,
++ 0xd1, 0xd3, 0xd5, 0xd6, 0xd8, 0xda,
++ 0xdc, 0xde, 0xdf, 0xe1,
++ };
++
++const int Cr_g_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
++ 0x5b6900, 0x5ab22e, 0x59fb5c, 0x59448a, 0x588db8, 0x57d6e6,
++ 0x572014, 0x566942, 0x55b270, 0x54fb9e, 0x5444cc, 0x538dfa,
++ 0x52d728, 0x522056, 0x516984, 0x50b2b2, 0x4ffbe0, 0x4f450e,
++ 0x4e8e3c, 0x4dd76a, 0x4d2098, 0x4c69c6, 0x4bb2f4, 0x4afc22,
++ 0x4a4550, 0x498e7e, 0x48d7ac, 0x4820da, 0x476a08, 0x46b336,
++ 0x45fc64, 0x454592, 0x448ec0, 0x43d7ee, 0x43211c, 0x426a4a,
++ 0x41b378, 0x40fca6, 0x4045d4, 0x3f8f02, 0x3ed830, 0x3e215e,
++ 0x3d6a8c, 0x3cb3ba, 0x3bfce8, 0x3b4616, 0x3a8f44, 0x39d872,
++ 0x3921a0, 0x386ace, 0x37b3fc, 0x36fd2a, 0x364658, 0x358f86,
++ 0x34d8b4, 0x3421e2, 0x336b10, 0x32b43e, 0x31fd6c, 0x31469a,
++ 0x308fc8, 0x2fd8f6, 0x2f2224, 0x2e6b52, 0x2db480, 0x2cfdae,
++ 0x2c46dc, 0x2b900a, 0x2ad938, 0x2a2266, 0x296b94, 0x28b4c2,
++ 0x27fdf0, 0x27471e, 0x26904c, 0x25d97a, 0x2522a8, 0x246bd6,
++ 0x23b504, 0x22fe32, 0x224760, 0x21908e, 0x20d9bc, 0x2022ea,
++ 0x1f6c18, 0x1eb546, 0x1dfe74, 0x1d47a2, 0x1c90d0, 0x1bd9fe,
++ 0x1b232c, 0x1a6c5a, 0x19b588, 0x18feb6, 0x1847e4, 0x179112,
++ 0x16da40, 0x16236e, 0x156c9c, 0x14b5ca, 0x13fef8, 0x134826,
++ 0x129154, 0x11da82, 0x1123b0, 0x106cde, 0x0fb60c, 0x0eff3a,
++ 0x0e4868, 0x0d9196, 0x0cdac4, 0x0c23f2, 0x0b6d20, 0x0ab64e,
++ 0x09ff7c, 0x0948aa, 0x0891d8, 0x07db06, 0x072434, 0x066d62,
++ 0x05b690, 0x04ffbe, 0x0448ec, 0x03921a, 0x02db48, 0x022476,
++ 0x016da4, 0x00b6d2, 0x000000, -0x00b6d2, -0x016da4, -0x022476,
++ -0x02db48, -0x03921a, -0x0448ec, -0x04ffbe, -0x05b690, -0x066d62,
++ -0x072434, -0x07db06, -0x0891d8, -0x0948aa, -0x09ff7c, -0x0ab64e,
++ -0x0b6d20, -0x0c23f2, -0x0cdac4, -0x0d9196, -0x0e4868, -0x0eff3a,
++ -0x0fb60c, -0x106cde, -0x1123b0, -0x11da82, -0x129154, -0x134826,
++ -0x13fef8, -0x14b5ca, -0x156c9c, -0x16236e, -0x16da40, -0x179112,
++ -0x1847e4, -0x18feb6, -0x19b588, -0x1a6c5a, -0x1b232c, -0x1bd9fe,
++ -0x1c90d0, -0x1d47a2, -0x1dfe74, -0x1eb546, -0x1f6c18, -0x2022ea,
++ -0x20d9bc, -0x21908e, -0x224760, -0x22fe32, -0x23b504, -0x246bd6,
++ -0x2522a8, -0x25d97a, -0x26904c, -0x27471e, -0x27fdf0, -0x28b4c2,
++ -0x296b94, -0x2a2266, -0x2ad938, -0x2b900a, -0x2c46dc, -0x2cfdae,
++ -0x2db480, -0x2e6b52, -0x2f2224, -0x2fd8f6, -0x308fc8, -0x31469a,
++ -0x31fd6c, -0x32b43e, -0x336b10, -0x3421e2, -0x34d8b4, -0x358f86,
++ -0x364658, -0x36fd2a, -0x37b3fc, -0x386ace, -0x3921a0, -0x39d872,
++ -0x3a8f44, -0x3b4616, -0x3bfce8, -0x3cb3ba, -0x3d6a8c, -0x3e215e,
++ -0x3ed830, -0x3f8f02, -0x4045d4, -0x40fca6, -0x41b378, -0x426a4a,
++ -0x43211c, -0x43d7ee, -0x448ec0, -0x454592, -0x45fc64, -0x46b336,
++ -0x476a08, -0x4820da, -0x48d7ac, -0x498e7e, -0x4a4550, -0x4afc22,
++ -0x4bb2f4, -0x4c69c6, -0x4d2098, -0x4dd76a, -0x4e8e3c, -0x4f450e,
++ -0x4ffbe0, -0x50b2b2, -0x516984, -0x522056, -0x52d728, -0x538dfa,
++ -0x5444cc, -0x54fb9e, -0x55b270, -0x566942, -0x572014, -0x57d6e6,
++ -0x588db8, -0x59448a, -0x59fb5c, -0x5ab22e,
++ };
++
++const int Cb_g_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
++ 0x2c8d00, 0x2c34e6, 0x2bdccc, 0x2b84b2, 0x2b2c98, 0x2ad47e,
++ 0x2a7c64, 0x2a244a, 0x29cc30, 0x297416, 0x291bfc, 0x28c3e2,
++ 0x286bc8, 0x2813ae, 0x27bb94, 0x27637a, 0x270b60, 0x26b346,
++ 0x265b2c, 0x260312, 0x25aaf8, 0x2552de, 0x24fac4, 0x24a2aa,
++ 0x244a90, 0x23f276, 0x239a5c, 0x234242, 0x22ea28, 0x22920e,
++ 0x2239f4, 0x21e1da, 0x2189c0, 0x2131a6, 0x20d98c, 0x208172,
++ 0x202958, 0x1fd13e, 0x1f7924, 0x1f210a, 0x1ec8f0, 0x1e70d6,
++ 0x1e18bc, 0x1dc0a2, 0x1d6888, 0x1d106e, 0x1cb854, 0x1c603a,
++ 0x1c0820, 0x1bb006, 0x1b57ec, 0x1affd2, 0x1aa7b8, 0x1a4f9e,
++ 0x19f784, 0x199f6a, 0x194750, 0x18ef36, 0x18971c, 0x183f02,
++ 0x17e6e8, 0x178ece, 0x1736b4, 0x16de9a, 0x168680, 0x162e66,
++ 0x15d64c, 0x157e32, 0x152618, 0x14cdfe, 0x1475e4, 0x141dca,
++ 0x13c5b0, 0x136d96, 0x13157c, 0x12bd62, 0x126548, 0x120d2e,
++ 0x11b514, 0x115cfa, 0x1104e0, 0x10acc6, 0x1054ac, 0x0ffc92,
++ 0x0fa478, 0x0f4c5e, 0x0ef444, 0x0e9c2a, 0x0e4410, 0x0debf6,
++ 0x0d93dc, 0x0d3bc2, 0x0ce3a8, 0x0c8b8e, 0x0c3374, 0x0bdb5a,
++ 0x0b8340, 0x0b2b26, 0x0ad30c, 0x0a7af2, 0x0a22d8, 0x09cabe,
++ 0x0972a4, 0x091a8a, 0x08c270, 0x086a56, 0x08123c, 0x07ba22,
++ 0x076208, 0x0709ee, 0x06b1d4, 0x0659ba, 0x0601a0, 0x05a986,
++ 0x05516c, 0x04f952, 0x04a138, 0x04491e, 0x03f104, 0x0398ea,
++ 0x0340d0, 0x02e8b6, 0x02909c, 0x023882, 0x01e068, 0x01884e,
++ 0x013034, 0x00d81a, 0x008000, 0x0027e6, -0x003034, -0x00884e,
++ -0x00e068, -0x013882, -0x01909c, -0x01e8b6, -0x0240d0, -0x0298ea,
++ -0x02f104, -0x03491e, -0x03a138, -0x03f952, -0x04516c, -0x04a986,
++ -0x0501a0, -0x0559ba, -0x05b1d4, -0x0609ee, -0x066208, -0x06ba22,
++ -0x07123c, -0x076a56, -0x07c270, -0x081a8a, -0x0872a4, -0x08cabe,
++ -0x0922d8, -0x097af2, -0x09d30c, -0x0a2b26, -0x0a8340, -0x0adb5a,
++ -0x0b3374, -0x0b8b8e, -0x0be3a8, -0x0c3bc2, -0x0c93dc, -0x0cebf6,
++ -0x0d4410, -0x0d9c2a, -0x0df444, -0x0e4c5e, -0x0ea478, -0x0efc92,
++ -0x0f54ac, -0x0facc6, -0x1004e0, -0x105cfa, -0x10b514, -0x110d2e,
++ -0x116548, -0x11bd62, -0x12157c, -0x126d96, -0x12c5b0, -0x131dca,
++ -0x1375e4, -0x13cdfe, -0x142618, -0x147e32, -0x14d64c, -0x152e66,
++ -0x158680, -0x15de9a, -0x1636b4, -0x168ece, -0x16e6e8, -0x173f02,
++ -0x17971c, -0x17ef36, -0x184750, -0x189f6a, -0x18f784, -0x194f9e,
++ -0x19a7b8, -0x19ffd2, -0x1a57ec, -0x1ab006, -0x1b0820, -0x1b603a,
++ -0x1bb854, -0x1c106e, -0x1c6888, -0x1cc0a2, -0x1d18bc, -0x1d70d6,
++ -0x1dc8f0, -0x1e210a, -0x1e7924, -0x1ed13e, -0x1f2958, -0x1f8172,
++ -0x1fd98c, -0x2031a6, -0x2089c0, -0x20e1da, -0x2139f4, -0x21920e,
++ -0x21ea28, -0x224242, -0x229a5c, -0x22f276, -0x234a90, -0x23a2aa,
++ -0x23fac4, -0x2452de, -0x24aaf8, -0x250312, -0x255b2c, -0x25b346,
++ -0x260b60, -0x26637a, -0x26bb94, -0x2713ae, -0x276bc8, -0x27c3e2,
++ -0x281bfc, -0x287416, -0x28cc30, -0x29244a, -0x297c64, -0x29d47e,
++ -0x2a2c98, -0x2a84b2, -0x2adccc, -0x2b34e6,
++ };
++
++
++/* We assume that right shift corresponds to signed division by 2 with
++ * rounding towards minus infinity. This is correct for typical "arithmetic
++ * shift" instructions that shift in copies of the sign bit. But some
++ * C compilers implement >> with an unsigned shift. For these machines you
++ * must define RIGHT_SHIFT_IS_UNSIGNED.
++ * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity.
++ * It is only applied with constant shift counts. SHIFT_TEMPS must be
++ * included in the variables of any routine using RIGHT_SHIFT.
++ */
++
++#ifdef RIGHT_SHIFT_IS_UNSIGNED
++#define SHIFT_TEMPS INT32 shift_temp;
++#define RIGHT_SHIFT(x,shft) \
++ ((shift_temp = (x)) < 0 ? \
++ (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \
++ (shift_temp >> (shft)))
++#else
++#define SHIFT_TEMPS
++#define RIGHT_SHIFT(x,shft) ((x) >> (shft))
++#endif
++
++
++METHODDEF(void)
++ycc_rgb_convert_argb (j_decompress_ptr cinfo,
++ JSAMPIMAGE input_buf, JDIMENSION input_row,
++ JSAMPARRAY output_buf, int num_rows)
++{
++ JDIMENSION num_cols = cinfo->output_width;
++ JSAMPLE * range_limit = cinfo->sample_range_limit;
++
++ SHIFT_TEMPS
++
++ /* This is used if we don't have SSE2 */
++
++ while (--num_rows >= 0) {
++ JSAMPROW inptr0 = input_buf[0][input_row];
++ JSAMPROW inptr1 = input_buf[1][input_row];
++ JSAMPROW inptr2 = input_buf[2][input_row];
++ input_row++;
++ uint32_t *outptr = (uint32_t *) *output_buf++;
++ for (JDIMENSION col = 0; col < num_cols; col++) {
++ int y = GETJSAMPLE(inptr0[col]);
++ int cb = GETJSAMPLE(inptr1[col]);
++ int cr = GETJSAMPLE(inptr2[col]);
++ JSAMPLE * range_limit_y = range_limit + y;
++ /* Range-limiting is essential due to noise introduced by DCT losses. */
++ outptr[col] = 0xFF000000 |
++ ( range_limit_y[Cr_r_tab[cr]] << 16 ) |
++ ( range_limit_y[((int) RIGHT_SHIFT(Cb_g_tab[cb] + Cr_g_tab[cr], SCALEBITS))] << 8 ) |
++ ( range_limit_y[Cb_b_tab[cb]] );
++ }
++ }
++}
++#endif
++
++
+ ///*************** Inverted CMYK -> RGB conversion *************************
+ /// Input is (Inverted) CMYK stored as 4 bytes per pixel.
+ /// Output is RGB stored as 3 bytes per pixel.
Property changes on: trunk/www/browser/files/patch-ijg-libjpeg
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-media-libstagefright-foundation-AString.cpp
===================================================================
--- trunk/www/browser/files/patch-media-libstagefright-foundation-AString.cpp (rev 0)
+++ trunk/www/browser/files/patch-media-libstagefright-foundation-AString.cpp 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,16 @@
+--- media/libstagefright/frameworks/av/media/libstagefright/foundation/AString.cpp~
++++ media/libstagefright/frameworks/av/media/libstagefright/foundation/AString.cpp
+@@ -23,6 +23,13 @@
+ #include "ADebug.h"
+ #include "AString.h"
+
++#ifdef __FreeBSD__
++# include <osreldate.h>
++# if __FreeBSD_version < 900506
++# undef tolower
++# endif
++#endif
++
+ namespace stagefright {
+
+ // static
Property changes on: trunk/www/browser/files/patch-media-libstagefright-foundation-AString.cpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-media-mtransport-third_party-nICEr-src-util-mbslen.c
===================================================================
--- trunk/www/browser/files/patch-media-mtransport-third_party-nICEr-src-util-mbslen.c (rev 0)
+++ trunk/www/browser/files/patch-media-mtransport-third_party-nICEr-src-util-mbslen.c 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,16 @@
+--- media/mtransport/third_party/nICEr/src/util/mbslen.c~
++++ media/mtransport/third_party/nICEr/src/util/mbslen.c
+@@ -54,6 +54,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ # endif
+ #endif
+
++#ifdef __DragonFly__
++#include <osreldate.h>
++# if __DragonFly_version > 300502
++# define HAVE_XLOCALE
++# endif
++#endif
++
+ #ifdef HAVE_XLOCALE
+ #include <xlocale.h>
+ #endif /* HAVE_XLOCALE */
Property changes on: trunk/www/browser/files/patch-media-mtransport-third_party-nICEr-src-util-mbslen.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-memory-jemalloc-Makefile.in
===================================================================
--- trunk/www/browser/files/patch-memory-jemalloc-Makefile.in (rev 0)
+++ trunk/www/browser/files/patch-memory-jemalloc-Makefile.in 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,10 @@
+--- memory/jemalloc/Makefile.in~
++++ memory/jemalloc/Makefile.in
+@@ -12,3 +12,7 @@ include $(topsrcdir)/config/rules.mk
+ ifdef GNU_CC
+ CFLAGS += -std=gnu99
+ endif
++
++# XXX startup crash workaround for gcc47 on amd64
++jemalloc.$(OBJ_SUFFIX): OS_CFLAGS := $(filter-out -O3 -Ofast,$(OS_CFLAGS))
++jemalloc.$(OBJ_SUFFIX): MOZ_OPTIMIZE_FLAGS=
Property changes on: trunk/www/browser/files/patch-memory-jemalloc-Makefile.in
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-modules-libpref-init-all.js
===================================================================
--- trunk/www/browser/files/patch-modules-libpref-init-all.js (rev 0)
+++ trunk/www/browser/files/patch-modules-libpref-init-all.js 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,15 @@
+--- modules/libpref/init/all.js.orig 2015-08-06 22:39:34 UTC
++++ modules/libpref/init/all.js
+@@ -4052,7 +4052,12 @@ pref("layers.max-active", -1);
+ pref("layers.tiles.adjust", true);
+
+ // Set the default values, and then override per-platform as needed
++#ifdef MOZ_TREE_CAIRO
+ pref("layers.offmainthreadcomposition.enabled", true);
++#else
++// Disable for system cairo on suspicion of causing random crashes
++pref("layers.offmainthreadcomposition.enabled", false);
++#endif
+ // Compositor target frame rate. NOTE: If vsync is enabled the compositor
+ // frame rate will still be capped.
+ // -1 -> default (match layout.frame_rate or 60 FPS)
Property changes on: trunk/www/browser/files/patch-modules-libpref-init-all.js
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-toolkit_mozapps_installer_packager_mk
===================================================================
--- trunk/www/browser/files/patch-toolkit_mozapps_installer_packager_mk (rev 0)
+++ trunk/www/browser/files/patch-toolkit_mozapps_installer_packager_mk 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,13 @@
+$OpenBSD: patch-toolkit_mozapps_installer_packager_mk,v 1.11 2012/06/11 15:29:56 landry Exp $
+install headers/idl/sdk libs only if xulrunner
+--- toolkit/mozapps/installer/packager.mk.orig Fri Jun 1 14:04:20 2012
++++ toolkit/mozapps/installer/packager.mk Tue Jun 5 07:55:51 2012
+@@ -886,7 +886,7 @@ endif
+ $(NSINSTALL) -D $(DESTDIR)$(bindir)
+ $(RM) -f $(DESTDIR)$(bindir)/$(MOZ_APP_NAME)
+ ln -s $(installdir)/$(MOZ_APP_NAME) $(DESTDIR)$(bindir)
+-ifdef INSTALL_SDK # Here comes the hard part
++ifeq ($(MOZ_APP_NAME),xulrunner)
+ $(NSINSTALL) -D $(DESTDIR)$(includedir)
+ (cd $(DIST)/include && tar $(TAR_CREATE_FLAGS) - .) | \
+ (cd $(DESTDIR)$(includedir) && tar -xf -)
Property changes on: trunk/www/browser/files/patch-toolkit_mozapps_installer_packager_mk
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/patch-z-bug517422
===================================================================
--- trunk/www/browser/files/patch-z-bug517422 (rev 0)
+++ trunk/www/browser/files/patch-z-bug517422 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,586 @@
+# Allow more config/external/ libs built against system-wide version.
+
+diff --git config/Makefile.in config/Makefile.in
+index 5383399..0410004 100644
+--- config/Makefile.in
++++ config/Makefile.in
+@@ -77,6 +77,14 @@ export:: $(export-preqs)
+ -DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \
+ -DMOZ_NATIVE_GRAPHITE2=$(MOZ_NATIVE_GRAPHITE2) \
+ -DMOZ_NATIVE_HARFBUZZ=$(MOZ_NATIVE_HARFBUZZ) \
++ -DMOZ_NATIVE_OGG=$(MOZ_NATIVE_OGG) \
++ -DMOZ_NATIVE_THEORA=$(MOZ_NATIVE_THEORA) \
++ -DMOZ_NATIVE_VORBIS=$(MOZ_NATIVE_VORBIS) \
++ -DMOZ_NATIVE_TREMOR=$(MOZ_NATIVE_TREMOR) \
++ -DMOZ_NATIVE_CELT=$(MOZ_NATIVE_CELT) \
++ -DMOZ_NATIVE_OPUS=$(MOZ_NATIVE_OPUS) \
++ -DMOZ_NATIVE_SPEEX=$(MOZ_NATIVE_SPEEX) \
++ -DMOZ_NATIVE_SOUNDTOUCH=$(MOZ_NATIVE_SOUNDTOUCH) \
+ $(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
+ $(INSTALL) system_wrappers $(DIST)
+
+diff --git config/external/moz.build config/external/moz.build
+index f67c5c7..eb909ce 100644
+--- config/external/moz.build
++++ config/external/moz.build
+@@ -19,10 +19,19 @@ if CONFIG['MOZ_UPDATER']:
+ # There's no "native brotli" yet, but probably in the future...
+ external_dirs += ['modules/brotli']
+
+-if CONFIG['MOZ_VORBIS']:
++if not CONFIG['MOZ_NATIVE_OGG']:
++ external_dirs += ['media/libogg']
++
++if not CONFIG['MOZ_NATIVE_CELT'] or not CONFIG['MOZ_NATIVE_OPUS']:
++ external_dirs += ['media/libopus']
++
++if not CONFIG['MOZ_NATIVE_THEORA']:
++ external_dirs += ['media/libtheora']
++
++if CONFIG['MOZ_VORBIS'] and not CONFIG['MOZ_NATIVE_VORBIS']:
+ external_dirs += ['media/libvorbis']
+
+-if CONFIG['MOZ_TREMOR']:
++if CONFIG['MOZ_TREMOR'] and not CONFIG['MOZ_NATIVE_TREMOR']:
+ external_dirs += ['media/libtremor']
+
+ if CONFIG['MOZ_WEBM']:
+@@ -37,15 +46,16 @@ if CONFIG['MOZ_VPX'] and not CONFIG['MOZ
+ if not CONFIG['MOZ_NATIVE_PNG']:
+ external_dirs += ['media/libpng']
+
++if not CONFIG['MOZ_NATIVE_SPEEX']:
++ external_dirs += ['media/libspeex_resampler']
++
++if not CONFIG['MOZ_NATIVE_SOUNDTOUCH']:
++ external_dirs += ['media/libsoundtouch']
++
+ external_dirs += [
+ 'media/kiss_fft',
+ 'media/libcubeb',
+- 'media/libogg',
+- 'media/libopus',
+- 'media/libtheora',
+- 'media/libspeex_resampler',
+ 'media/libstagefright',
+- 'media/libsoundtouch',
+ ]
+
+ DIRS += ['../../' + i for i in external_dirs]
+diff --git config/system-headers config/system-headers
+index bef567c..9807c29 100644
+--- config/system-headers
++++ config/system-headers
+@@ -1263,7 +1263,6 @@ X11/Xlocale.h
+ X11/Xos.h
+ X11/Xutil.h
+ zmouse.h
+-soundtouch/SoundTouch.h
+ #if MOZ_NATIVE_PNG==1
+ png.h
+ #endif
+@@ -1325,6 +1324,7 @@ vorbis/codec.h
+ theora/theoradec.h
+ tremor/ivorbiscodec.h
+ speex/speex_resampler.h
++soundtouch/SoundTouch.h
+ ogg/ogg.h
+ ogg/os_types.h
+ nestegg/nestegg.h
+@@ -1365,3 +1365,35 @@ graphite2/Segment.h
+ harfbuzz/hb-ot.h
+ harfbuzz/hb.h
+ #endif
++#if MOZ_NATIVE_OGG==1
++ogg/ogg.h
++ogg/os_types.h
++#endif
++#if MOZ_NATIVE_THEORA==1
++theora/theoradec.h
++#endif
++#if MOZ_NATIVE_VORBIS==1
++vorbis/codec.h
++vorbis/vorbisenc.h
++#endif
++#if MOZ_NATIVE_TREMOR==1
++tremor/ivorbiscodec.h
++#endif
++#if MOZ_NATIVE_CELT==1
++celt.h
++celt_header.h
++celt/celt.h
++celt/celt_header.h
++#endif
++#if MOZ_NATIVE_OPUS==1
++opus.h
++opus_multistream.h
++opus/opus.h
++opus/opus_multistream.h
++#endif
++#if MOZ_NATIVE_SPEEX==1
++speex/speex_resampler.h
++#endif
++#if MOZ_NATIVE_SOUNDTOUCH==1
++soundtouch/SoundTouch.h
++#endif
+diff --git configure.in configure.in
+index 87db361..7947626 100644
+--- configure.in
++++ configure.in
+@@ -5223,6 +5223,157 @@ if test "${ac_cv_c_attribute_aligned}" !
+ fi
+
+ dnl ========================================================
++dnl Check for libogg
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-ogg,
++[ --with-system-ogg Use system libogg (located with pkgconfig)],
++MOZ_NATIVE_OGG=1,
++MOZ_NATIVE_OGG=)
++
++if test -n "$MOZ_NATIVE_OGG"; then
++ PKG_CHECK_MODULES(MOZ_OGG, ogg >= 1.2.1)
++
++ _SAVE_LIBS=$LIBS
++ LIBS="$LIBS $MOZ_OGG_LIBS"
++ AC_CHECK_FUNC(ogg_set_mem_functions, [],
++ [AC_DEFINE(MOZ_OGG_NO_MEM_REPORTING)])
++ LIBS=$_SAVE_LIBS
++fi
++
++AC_SUBST(MOZ_NATIVE_OGG)
++
++dnl ========================================================
++dnl Check for libvorbis
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-vorbis,
++[ --with-system-vorbis Use system libvorbis (located with pkgconfig)],
++MOZ_NATIVE_VORBIS=1,
++MOZ_NATIVE_VORBIS=)
++
++if test -n "$MOZ_NATIVE_VORBIS"; then
++ PKG_CHECK_MODULES(MOZ_VORBIS, vorbis vorbisenc >= 1.3.5)
++fi
++
++AC_SUBST(MOZ_NATIVE_VORBIS)
++
++dnl ========================================================
++dnl Check for integer-only libvorbis aka tremor
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-tremor,
++[ --with-system-tremor Use system libtremor (located with pkgconfig)],
++MOZ_NATIVE_TREMOR=1,
++MOZ_NATIVE_TREMOR=)
++
++if test -n "$MOZ_NATIVE_TREMOR"; then
++ PKG_CHECK_MODULES(MOZ_TREMOR, vorbisidec >= 1.2.1)
++fi
++
++AC_SUBST(MOZ_NATIVE_TREMOR)
++
++dnl ========================================================
++dnl Check for libcelt
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-celt,
++[ --with-system-celt Use system libcelt (located with pkgconfig)],
++MOZ_NATIVE_CELT=1,
++MOZ_NATIVE_CELT=)
++
++if test -n "$MOZ_NATIVE_CELT"; then
++ PKG_CHECK_MODULES(MOZ_CELT, celt)
++else
++ MOZ_CELT_CFLAGS='-I$(topsrcdir)/media/libopus'
++fi
++
++AC_SUBST(MOZ_NATIVE_CELT)
++
++dnl ========================================================
++dnl Check for libopus
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-opus,
++[ --with-system-opus Use system libopus (located with pkgconfig)],
++MOZ_NATIVE_OPUS=1,
++MOZ_NATIVE_OPUS=)
++
++if test -n "$MOZ_NATIVE_OPUS"; then
++ PKG_CHECK_MODULES(MOZ_OPUS, opus >= 1.1)
++else
++ MOZ_OPUS_CFLAGS='-I$(topsrcdir)/media/libopus/include'
++fi
++
++AC_SUBST(MOZ_NATIVE_OPUS)
++
++dnl ========================================================
++dnl Check for libtheora
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-theora,
++[ --with-system-theora Use system libtheora (located with pkgconfig)],
++MOZ_NATIVE_THEORA=1,
++MOZ_NATIVE_THEORA=)
++
++if test -n "$MOZ_NATIVE_THEORA"; then
++ PKG_CHECK_MODULES(MOZ_THEORA, theora >= 1.2)
++fi
++
++AC_SUBST(MOZ_NATIVE_THEORA)
++
++dnl ========================================================
++dnl Check for libspeex resampler
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-speex,
++[ --with-system-speex Use system libspeex (located with pkgconfig)],
++MOZ_NATIVE_SPEEX=1,
++MOZ_NATIVE_SPEEX=)
++
++if test -n "$MOZ_NATIVE_SPEEX"; then
++ PKG_CHECK_MODULES(MOZ_SPEEX, speexdsp >= 1.2)
++fi
++
++AC_SUBST(MOZ_NATIVE_SPEEX)
++
++dnl ========================================================
++dnl Check for libsoundtouch
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-soundtouch,
++[ --with-system-soundtouch Use system libsoundtouch (located with pkgconfig)],
++MOZ_NATIVE_SOUNDTOUCH=1,
++MOZ_NATIVE_SOUNDTOUCH=)
++
++if test -n "$MOZ_NATIVE_SOUNDTOUCH"; then
++ PKG_CHECK_MODULES(MOZ_SOUNDTOUCH, soundtouch >= 1.8.0)
++
++ AC_LANG_SAVE
++ AC_LANG_CPLUSPLUS
++ _SAVE_CXXFLAGS=$CXXFLAGS
++ CXXFLAGS="$CXXFLAGS $MOZ_SOUNDTOUCH_CFLAGS"
++ AC_CACHE_CHECK(for soundtouch sample type,
++ ac_cv_soundtouch_sample_type,
++ [AC_TRY_COMPILE([#include <SoundTouch.h>
++ #ifndef SOUNDTOUCH_INTEGER_SAMPLES
++ #error soundtouch expects float samples
++ #endif],
++ [],
++ [ac_cv_soundtouch_sample_type=short],
++ [ac_cv_soundtouch_sample_type=float])])
++ CXXFLAGS=$_SAVE_CXXFLAGS
++ AC_LANG_RESTORE
++
++ if test \( -n "$MOZ_SAMPLE_TYPE_S16" -a "$ac_cv_soundtouch_sample_type" != short \) \
++ -o \( -n "$MOZ_SAMPLE_TYPE_FLOAT32" -a "$ac_cv_soundtouch_sample_type" != float \) ; then
++ AC_MSG_ERROR([SoundTouch library is built with incompatible sample type. Either rebuild the library with/without --enable-integer-samples, chase default Mozilla sample type or remove --with-system-soundtouch.])
++ fi
++fi
++
++AC_SUBST(MOZ_NATIVE_SOUNDTOUCH)
++
++dnl ========================================================
+ dnl = Disable VP8 decoder support
+ dnl ========================================================
+ MOZ_ARG_DISABLE_BOOL(webm,
+diff --git dom/media/AudioStream.h dom/media/AudioStream.h
+index 085676d..00c54fb 100644
+--- dom/media/AudioStream.h
++++ dom/media/AudioStream.h
+@@ -17,7 +17,7 @@
+ #include "CubebUtils.h"
+
+ namespace soundtouch {
+-class SoundTouch;
++class MOZ_IMPORT_API SoundTouch;
+ }
+
+ namespace mozilla {
+diff --git dom/media/moz.build dom/media/moz.build
+index 7526cff..e0a0ca0 100644
+--- dom/media/moz.build
++++ dom/media/moz.build
+@@ -212,3 +212,24 @@ if CONFIG['ANDROID_VERSION'] > '15':
+
+ CFLAGS += CONFIG['GSTREAMER_CFLAGS']
+ CXXFLAGS += CONFIG['GSTREAMER_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_OGG']:
++ CXXFLAGS += CONFIG['MOZ_OGG_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_THEORA']:
++ CXXFLAGS += CONFIG['MOZ_THEORA_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_VORBIS']:
++ CXXFLAGS += CONFIG['MOZ_VORBIS_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_TREMOR']:
++ CXXFLAGS += CONFIG['MOZ_TREMOR_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_OPUS']:
++ CXXFLAGS += CONFIG['MOZ_OPUS_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_SPEEX']:
++ CXXFLAGS += CONFIG['MOZ_SPEEX_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_SOUNDTOUCH']:
++ CXXFLAGS += CONFIG['MOZ_SOUNDTOUCH_CFLAGS']
+diff --git media/libcubeb/src/moz.build media/libcubeb/src/moz.build
+index 944744d..9a7c8c0 100644
+--- media/libcubeb/src/moz.build
++++ media/libcubeb/src/moz.build
+@@ -65,6 +65,9 @@ if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
+
+ FINAL_LIBRARY = 'gkmedias'
+
++if CONFIG['MOZ_NATIVE_SPEEX']:
++ SOURCES['cubeb_resampler.cpp'].flags += CONFIG['MOZ_SPEEX_CFLAGS']
++
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+ CFLAGS += [
+ '-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
+diff --git media/libogg/README_MOZILLA media/libogg/README_MOZILLA
+index 0833e4d..7ece97b 100644
+--- media/libogg/README_MOZILLA
++++ media/libogg/README_MOZILLA
+@@ -6,3 +6,6 @@ The svn revision number used was r17287.
+ The int-types.patch address a bug that config_types.h generated from
+ Linux platform can't be used on OpenSolaris directly see Mozilla bug
+ 449754
++
++The in-tree copy may be omitted during build by --with-system-ogg.
++Keep version in configure.in in sync on updates.
+diff --git media/libopus/README_MOZILLA media/libopus/README_MOZILLA
+index 2d85c9f..d3fb9f8 100644
+--- media/libopus/README_MOZILLA
++++ media/libopus/README_MOZILLA
+@@ -9,3 +9,6 @@ files after the copy step.
+ The upstream repository is https://git.xiph.org/opus.git
+
+ The git tag/revision used was v1.1.
++
++The in-tree copy may be omitted during build by --with-system-opus.
++So, keep its pkg-config version check within configure.in in sync on updates.
+diff --git media/libsoundtouch/README_MOZILLA media/libsoundtouch/README_MOZILLA
+index bfd4b1a..15b158d 100644
+--- media/libsoundtouch/README_MOZILLA
++++ media/libsoundtouch/README_MOZILLA
+@@ -6,3 +6,5 @@ The whole library is not used, only the relevant files are imported in the tree,
+ using the script `update.sh`. Some changes have been made to the files, using
+ the patch `moz-libsoundtouch.patch`. We also use a custom soundtouch_config.h.
+
++The in-tree copy may be omitted during build by --with-system-soundtouch.
++Keep version in configure.in in sync on updates.
+diff --git media/libspeex_resampler/README_MOZILLA media/libspeex_resampler/README_MOZILLA
+index 7f6b1bb..e830300 100644
+--- media/libspeex_resampler/README_MOZILLA
++++ media/libspeex_resampler/README_MOZILLA
+@@ -3,3 +3,6 @@ This source is from the Speex DSP library
+
+ It consists in the audio resampling code (resampler.c) and its header files
+ dependancies, imported into the tree using the update.sh script.
++
++The in-tree copy may be omitted during build by --with-system-speex.
++Keep version in configure.in in sync on updates.
+diff --git media/libtheora/README_MOZILLA media/libtheora/README_MOZILLA
+index d48dbfa..f08a2ed 100644
+--- media/libtheora/README_MOZILLA
++++ media/libtheora/README_MOZILLA
+@@ -3,3 +3,6 @@ using the update.sh script. The changes made were those applied by update.sh,
+ the addition/update of Makefile.in files for the Mozilla build system.
+
+ The subversion revision used was r17578.
++
++The in-tree copy may be omitted during build by --with-system-theora.
++Keep version in configure.in in sync on updates.
+diff --git media/libtheora/moz.build media/libtheora/moz.build
+index 14265b1..3069e99 100644
+--- media/libtheora/moz.build
++++ media/libtheora/moz.build
+@@ -21,6 +21,9 @@ if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
+ # The encoder is currently not included.
+ DEFINES['THEORA_DISABLE_ENCODE'] = True
+
++if CONFIG['MOZ_NATIVE_OGG']:
++ CFLAGS += CONFIG['MOZ_OGG_CFLAGS']
++
+ # Suppress warnings in third-party code.
+ if CONFIG['GNU_CC']:
+ CFLAGS += ['-Wno-type-limits']
+diff --git media/libtremor/README_MOZILLA media/libtremor/README_MOZILLA
+index ee67b53..3f34a09 100644
+--- media/libtremor/README_MOZILLA
++++ media/libtremor/README_MOZILLA
+@@ -5,3 +5,6 @@ Makefile.in files for the Mozilla build system.
+
+ The upstream release used was http://svn.xiph.org/trunk/Tremor/
+ The subversion revision used was r17547.
++
++The in-tree copy may be omitted during build by --with-system-tremor.
++Keep version in configure.in in sync on updates.
+diff --git media/libtremor/moz.build media/libtremor/moz.build
+index 31831ba..a03d576 100644
+--- media/libtremor/moz.build
++++ media/libtremor/moz.build
+@@ -6,3 +6,5 @@
+
+ DIRS += ['include/tremor', 'lib']
+
++if CONFIG['MOZ_NATIVE_OGG']:
++ CFLAGS += CONFIG['MOZ_OGG_CFLAGS']
+diff --git media/libvorbis/README_MOZILLA media/libvorbis/README_MOZILLA
+index 7c7454c..55baedd 100644
+--- media/libvorbis/README_MOZILLA
++++ media/libvorbis/README_MOZILLA
+@@ -8,3 +8,6 @@ https://svn.xiph.org/tags/vorbis/libvorbis-1.3.4@19059
+
+ Some files are renamed during the copy to prevent clashes with object
+ file names with other Mozilla libraries.
++
++The in-tree copy may be omitted during build by --with-system-vorbis.
++Keep version in configure.in in sync on updates.
+diff --git media/libvorbis/moz.build media/libvorbis/moz.build
+index 919b99e..cc776f7 100644
+--- media/libvorbis/moz.build
++++ media/libvorbis/moz.build
+@@ -55,3 +55,6 @@ FINAL_LIBRARY = 'gkmedias'
+ # Suppress warnings in third-party code.
+ if CONFIG['GNU_CC']:
+ CFLAGS += ['-Wno-uninitialized']
++
++if CONFIG['MOZ_NATIVE_OGG']:
++ CFLAGS += CONFIG['MOZ_OGG_CFLAGS']
+diff --git media/webrtc/signaling/test/common.build media/webrtc/signaling/test/common.build
+index bbc971c..6ed7e41 100644
+--- media/webrtc/signaling/test/common.build
++++ media/webrtc/signaling/test/common.build
+@@ -108,6 +109,9 @@ if CONFIG['MOZ_OSS']:
+ if CONFIG['MOZ_NATIVE_JPEG']:
+ OS_LIBS += CONFIG['MOZ_JPEG_LIBS']
+
++if CONFIG['MOZ_NATIVE_OPUS']:
++ OS_LIBS += CONFIG['MOZ_OPUS_LIBS']
++
+ if CONFIG['MOZ_NATIVE_LIBVPX']:
+ OS_LIBS += CONFIG['MOZ_LIBVPX_LIBS']
+
+diff --git media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi
+index 00e77e7..55f48ab 100644
+--- media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi
++++ media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi
+@@ -17,18 +17,11 @@
+ 'conditions': [
+ ['build_with_mozilla==1', {
+ # Mozilla provides its own build of the opus library.
+- 'include_dirs': [
+- '/media/libopus/include',
+- '/media/libopus/src',
+- '/media/libopus/celt',
++ 'cflags_mozilla': [
++ '$(filter -I%, $(MOZ_CELT_CFLAGS))/celt',
++ '$(MOZ_OPUS_CFLAGS)',
++ '$(filter -I%, $(MOZ_OPUS_CFLAGS))/../src',
+ ],
+- 'direct_dependent_settings': {
+- 'include_dirs': [
+- '/media/libopus/include',
+- '/media/libopus/src',
+- '/media/libopus/celt',
+- ],
+- },
+ }, {
+ 'dependencies': [
+ '<(DEPTH)/third_party/opus/opus.gyp:opus'
+diff --git media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi
+index 00e77e7..55f48ab 100644
+--- media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi
++++ media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi
+@@ -84,19 +84,11 @@
+ ],
+ }],
+ ['build_with_mozilla==1', {
+- 'include_dirs': [
+- # Need Opus header files for the audio classifier.
+- '<(DEPTH)/../../../media/opus/celt',
+-# '<(DEPTH)/third_party/opus/src/src',
++ 'cflags_mozilla': [
++ '$(filter -I%, $(MOZ_CELT_CFLAGS))/celt',
++ '$(MOZ_OPUS_CFLAGS)',
++ '$(filter -I%, $(MOZ_OPUS_CFLAGS))/../src',
+ ],
+- 'direct_dependent_settings': {
+- 'include_dirs': [
+- '../../../../../../media/opus/celt',
+- # Need Opus header files for the audio classifier.
+- '<(DEPTH)/../../../media/opus/celt',
+-# '<(DEPTH)/third_party/opus/src/src',
+- ],
+- },
+ }],
+ ],
+ 'sources': [
+diff --git toolkit/library/moz.build toolkit/library/moz.build
+index d42137a..695e75a8 100644
+--- toolkit/library/moz.build
++++ toolkit/library/moz.build
+@@ -178,6 +178,30 @@ if CONFIG['MOZ_NATIVE_PNG']:
+ if CONFIG['MOZ_NATIVE_HUNSPELL']:
+ OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']
+
++if CONFIG['MOZ_NATIVE_OGG']:
++ OS_LIBS += CONFIG['MOZ_OGG_LIBS']
++
++if CONFIG['MOZ_NATIVE_THEORA']:
++ OS_LIBS += CONFIG['MOZ_THEORA_LIBS']
++
++if CONFIG['MOZ_NATIVE_VORBIS']:
++ OS_LIBS += CONFIG['MOZ_VORBIS_LIBS']
++
++if CONFIG['MOZ_NATIVE_TREMOR']:
++ OS_LIBS += CONFIG['MOZ_TREMOR_LIBS']
++
++if CONFIG['MOZ_NATIVE_CELT']:
++ OS_LIBS += CONFIG['MOZ_CELT_LIBS']
++
++if CONFIG['MOZ_NATIVE_OPUS']:
++ OS_LIBS += CONFIG['MOZ_OPUS_LIBS']
++
++if CONFIG['MOZ_NATIVE_SPEEX']:
++ OS_LIBS += CONFIG['MOZ_SPEEX_LIBS']
++
++if CONFIG['MOZ_NATIVE_SOUNDTOUCH']:
++ OS_LIBS += CONFIG['MOZ_SOUNDTOUCH_LIBS']
++
+ if CONFIG['MOZ_NATIVE_LIBEVENT']:
+ OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']
+
+diff --git xpcom/build/XPCOMInit.cpp xpcom/build/XPCOMInit.cpp
+index 2cf281e..6d7af0e 100644
+--- xpcom/build/XPCOMInit.cpp
++++ xpcom/build/XPCOMInit.cpp
+@@ -138,7 +138,9 @@ extern nsresult nsStringInputStreamConstructor(nsISupports*, REFNSIID, void**);
+ #include "mozilla/VisualEventTracer.h"
+ #endif
+
++#ifndef MOZ_OGG_NO_MEM_REPORTING
+ #include "ogg/ogg.h"
++#endif
+ #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
+ #include "vpx_mem/vpx_mem.h"
+ #endif
+@@ -651,11 +653,13 @@ NS_InitXPCOM2(nsIServiceManager** aResult,
+ // this oddness.
+ mozilla::SetICUMemoryFunctions();
+
++#ifndef MOZ_OGG_NO_MEM_REPORTING
+ // Do the same for libogg.
+ ogg_set_mem_functions(OggReporter::CountingMalloc,
+ OggReporter::CountingCalloc,
+ OggReporter::CountingRealloc,
+ OggReporter::CountingFree);
++#endif
+
+ #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
+ // And for VPX.
Property changes on: trunk/www/browser/files/patch-z-bug517422
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/pkg-deinstall.in
===================================================================
--- trunk/www/browser/files/pkg-deinstall.in (rev 0)
+++ trunk/www/browser/files/pkg-deinstall.in 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# $MCom: ports/www/mozilla/pkg-deinstall.in,v 1.25 2008/07/26 19:07:07 ahze Exp $
+#
+# Date created: Mon Nov 29, 2003
+# Whom: Thierry Thomas (<thierry at pompo.net>)
+# Fix the chrome registry.
+
+umask 022
+PATH=/bin:/usr/bin
+
+[ "x$1" = "x" ] && exit 1
+[ "x$2" != "xDEINSTALL" ] && exit 0
+
+MOZDIR=%%MOZDIR%%
+
+rm -rf ${MOZDIR}/chrome/overlayinfo
+rm -f ${MOZDIR}/chrome/*.rdf
+rm -f ${MOZDIR}/component.reg
+rm -f ${MOZDIR}/components/*.dat
+rm -f ${MOZDIR}/components.ini
+rm -f ${MOZDIR}/defaults.ini
+rm -f ${MOZDIR}/chrome/app-chrome.manifest
+rm -rf ${MOZDIR}/updates
+find %%MOZDIR%%/plugins/ -depth 1 -type l -delete > /dev/null 2>&1
+find %%MOZDIR%%/extensions/ -depth 1 -type l -delete > /dev/null 2>&1
+
+exit 0
Property changes on: trunk/www/browser/files/pkg-deinstall.in
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/files/pkg-install.in
===================================================================
--- trunk/www/browser/files/pkg-install.in (rev 0)
+++ trunk/www/browser/files/pkg-install.in 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# $MCom: ports/www/mozilla/pkg-install.in,v 1.26 2008/08/04 16:58:03 mezz Exp $
+#
+# Date created: Mon Nov 29, 2003
+# Whom: Thierry Thomas (<thierry at pompo.net>)
+# Fix the chrome registry.
+
+umask 022
+PATH=/bin:/usr/bin
+
+[ "x$1" = "x" ] && exit 1
+[ "x$2" != "xPOST-INSTALL" ] && exit 0
+
+MOZDIR=%%MOZDIR%%
+MOZBIN=${MOZDIR}/%%MOZILLA_BIN%%
+REGXPCOM=${MOZDIR}/regxpcom
+REGCHROME=${MOZDIR}/regchrome
+
+rm -rf ${MOZDIR}/chrome/overlayinfo
+rm -f ${MOZDIR}/chrome/*.rdf
+mkdir -p ${MOZDIR}/chrome/overlayinfo
+rm -f ${MOZDIR}/component.reg
+
+cd ${MOZDIR} || exit 1
+if [ -f ${REGXPCOM} ]; then
+ ./run-mozilla.sh ${REGXPCOM} || true
+fi
+if [ -f ${REGCHROME} ]; then
+ ./run-mozilla.sh ${REGCHROME} || true
+fi
+if [ -f ${MOZBIN} -a "${1%-*}" = "nvu" ]; then
+ ./run-mozilla.sh ${MOZBIN} -register > /dev/null 2>&1
+fi
+cp -R %%LOCALBASE%%/lib/xpi/symlinks/%%MOZILLA%%/ %%MOZDIR%%/extensions/ > /dev/null 2>&1
+
+exit 0
Property changes on: trunk/www/browser/files/pkg-install.in
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/pkg-descr
===================================================================
--- trunk/www/browser/pkg-descr (rev 0)
+++ trunk/www/browser/pkg-descr 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,13 @@
+Mozilla Firefox is a free and open source web browser descended from the
+Mozilla Application Suite. It is small, fast and easy to use, and offers
+many advanced features:
+
+ o Popup Blocking
+ o Tabbed Browsing
+ o Live Bookmarks (ie. RSS)
+ o Extensions
+ o Themes
+ o FastFind
+ o Improved Security
+
+WWW: http://www.mozilla.com/firefox
Property changes on: trunk/www/browser/pkg-descr
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/browser/pkg-message
===================================================================
--- trunk/www/browser/pkg-message (rev 0)
+++ trunk/www/browser/pkg-message 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,49 @@
+======================================================================
+
+smb:// issues (Gvfs/GIO option):
+Network group, machine, and share browsing does not work correctly.
+
+sftp:// (Gvfs/GIO option):
+Only sftp access using public key authentication works. To easily
+setup public key authentication to "remote_host":
+
+ssh-keygen -t dsa
+cat ~/.ssh/id_dsa.pub | ssh remote_host "cat >> .ssh/authorized_keys"
+
+The SSH server on remote_host must allow pub key authentication.
+
+======================================================================
+
+Firefox and HTML5
+
+Certain functions used to display HTML5 elements need the sem(4)
+module but only on 8.x releases (or before r201546).
+
+If your Firefox crashes with the following message while viewing a
+HTML5 page:
+"Bad system call (core dumped)"
+
+you need to load the sem module (kldload sem).
+
+To load sem on every boot put the following into your
+/boot/loader.conf:
+sem_load="YES"
+
+======================================================================
+
+Any bug reports should be addressed to the maintainers at:
+ gecko at FreeBSD.org
+You may also Cc: freebsd-ports at FreeBSD.org. Please do not send
+bug reports to any other addresses.
+
+Please include the following information with any bug report:
+* Output from 'uname -a'.
+* 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?
+
+Thank you for your help in testing and reporting bugs, and we hope you
+enjoy using Firefox.
+The Maintainers (gecko@)
+======================================================================
Property changes on: trunk/www/browser/pkg-message
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: trunk/www/libxul/Makefile
===================================================================
--- trunk/www/libxul/Makefile 2015-11-07 03:06:40 UTC (rev 20667)
+++ trunk/www/libxul/Makefile 2015-11-07 03:43:27 UTC (rev 20668)
@@ -1,13 +1,14 @@
+# Created by: Michael Johnson <ahze at FreeBSD.org>
+# $FreeBSD: head/www/libxul/Makefile 394871 2015-08-20 13:16:12Z jbeich $
# $MidnightBSD$
-# $FreeBSD: ports/www/libxul/Makefile,v 1.28 2011/04/29 15:44:33 flo Exp $
PORTNAME= libxul
-DISTVERSION= 1.9.2.24
-PORTREVISION= 1
+DISTVERSION= 38.2.0
+PORTREVISION= 0
CATEGORIES?= www devel
-MASTER_SITES= ${MASTER_SITE_MOZILLA}
-MASTER_SITE_SUBDIR= firefox/releases/3.6.24/source
-DISTNAME= firefox-3.6.24.source
+MASTER_SITES= MOZILLA/firefox/releases/${DISTVERSION}esr/source \
+ MOZILLA/firefox/candidates/${DISTVERSION}esr-candidates/build2/source
+DISTNAME= firefox-${DISTVERSION}esr.source
MAINTAINER?= ports at MidnightBSD.org
COMMENT?= Mozilla runtime package that can be used to bootstrap XUL+XPCOM apps
@@ -15,104 +16,104 @@
LICENSE= gpl2 mpl
LICENSE_COMB= dual
-WRKSRC= ${WRKDIR}/mozilla-1.9.2
-CONFLICTS= mozilla-[0-9]*
-GECKO_PLIST_PRE_DIRS= lib/${MOZILLA}/bin lib/${MOZILLA}/idl \
- lib/${MOZILLA}/include lib/${MOZILLA}/lib
+BUILD_DEPENDS= nspr>=4.10.8:${PORTSDIR}/devel/nspr \
+ nss>=3.19.2:${PORTSDIR}/security/nss \
+ libevent2>=2.0.21_2:${PORTSDIR}/devel/libevent2 \
+ soundtouch>=1.8.0:${PORTSDIR}/audio/soundtouch \
+ harfbuzz>=0.9.34:${PORTSDIR}/print/harfbuzz \
+ graphite2>=1.2.4:${PORTSDIR}/graphics/graphite2 \
+ libvorbis>=1.3.5:${PORTSDIR}/audio/libvorbis \
+ libvpx>=1.3.0:${PORTSDIR}/multimedia/libvpx \
+ sqlite3>=3.8.9:${PORTSDIR}/databases/sqlite3 \
+ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \
+ v4l_compat>0:${PORTSDIR}/multimedia/v4l_compat \
+ autoconf-2.13:${PORTSDIR}/devel/autoconf213 \
+ zip:${PORTSDIR}/archivers/zip \
+ unzip:${PORTSDIR}/archivers/unzip
+# opus>=1.1:${PORTSDIR}/audio/opus \
-USE_AUTOTOOLS= autoconf213
-WANT_GNOME= yes
-WANT_PERL= yes
-ALL_TARGET= default
-HAS_CONFIGURE= yes
-USES= gmake tar:bzip2
-MAKE_ENV= SKIP_GRE_REGISTRATION=1 mozappdir=${PREFIX}/lib/${MOZILLA}
+LIB_DEPENDS= libv4l2.so:${PORTSDIR}/multimedia/libv4l
+
+WRKSRC= ${WRKDIR}/mozilla-esr38
+CONFLICTS_INSTALL= libxul-1.9.*
+
+USE_QT5= # empty
+QT_NONSTANDARD= yes
+USE_GL= gl
+USE_DOS2UNIX= yes
+USES= dos2unix pathfix tar:bzip2
+DOS2UNIX_FILES= media/webrtc/trunk/webrtc/system_wrappers/source/spreadsortlib/spreadsort.hpp
+MAKE_ENV= SKIP_GRE_REGISTRATION=1 mozappdir=${PREFIX}/lib/${MOZILLA} \
+ __FreeBSD__=9 __FreeBSD__version=90004
LDFLAGS+= -Wl,-rpath,${PREFIX}/lib/${MOZ_RPATH}
USE_LDCONFIG= ${PREFIX}/lib/${MOZILLA}
-CONFIGURE_ARGS+= --build=i386-portbld-freebsd7.0 \
- --host=i386-portbld-freebsd7.0
-PORT_MOZCONFIG= ${WRKSRC}/xulrunner/config/mozconfig
-MOZ_OPTIONS?= --with-default-mozilla-five-home=${PREFIX}/lib/${MOZILLA} \
- --disable-javaxpcom --enable-canvas \
- --enable-system-cairo --disable-updater \
- --disable-necko-wifi --disable-ipc
-MOZ_EXTENSIONS= default,cookie,permissions
-OPTIONS= # Empty, used for generic gecko OPTIONS
-USE_GECKO_OPTIONS= java debug logging optimized_cflags
+MOZ_OPTIONS?= --enable-application=xulrunner
USE_GECKO= gecko
+CPE_PRODUCT= firefox_esr
MOZILLA_EXEC_NAME=xulrunner
-MOZ_TOOLKIT= cairo-gtk2
-USE_MOZILLA= -png -nss -dbm -jpeg
-MOZ_PKGCONFIG_FILES= libxul-embedding libxul mozilla-gtkmozembed-embedding \
- mozilla-gtkmozembed mozilla-js mozilla-nss mozilla-plugin
+USE_MOZILLA= -opus
+MOZILLA_PLIST_DIRS= bin include lib share/idl libdata
+MOZ_PKGCONFIG_FILES= libxul-embedding libxul mozilla-js \
+ mozilla-plugin
-OPTIONS= DBUS "Enable D-BUS support" on
+OPTIONS_DEFAULT= GTK2
+OPTIONS_SINGLE+= TOOLKIT
+OPTIONS_SINGLE_TOOLKIT= GTK2 GTK3
+
+.include "${.CURDIR}/../../www/browser/Makefile.options"
.include <bsd.port.pre.mk>
-GECKO_PTHREAD_LIBS!=${CC} -dumpspecs | ${GREP} -m 1 '%{\!pg: %{pthread:' | ${SED} -e 's|^.*%{\!pg: %{pthread:|| ; s|}.*$$||' || ${TRUE}
+.if ${USE_MOZILLA:M-nss}
+MOZ_PKGCONFIG_FILES+= mozilla-nss
+.endif
-.if ${OSVERSION} < 3000
-LIB_DEPENDS+= pulse.0:${PORTSDIR}/audio/pulseaudio
-EXTRA_PATCHES= ${FILESDIR}/releng6_pulseaudio
-.else
-EXTRA_PATCHES= ${FILESDIR}/libsydney_oss
+.if ${PORT_OPTIONS:MALSA}
+RUN_DEPENDS+= alsa-lib>=1.0.27.2_1:${PORTSDIR}/audio/alsa-lib
.endif
-.if defined(WITHOUT_DBUS)
-MOZ_OPTIONS+= --disable-dbus --disable-libnotify
-.else
-LIB_DEPENDS+= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib \
- notify.1:${PORTSDIR}/devel/libnotify
+.if ! ${PORT_OPTIONS:MBUNDLED_CAIRO}
+BUILD_DEPENDS+= cairo>=1.12.16_1,2:${PORTSDIR}/graphics/cairo
.endif
+.if ${PORT_OPTIONS:MGSTREAMER}
+RUN_DEPENDS+= gstreamer1-libav>=1.2.4_1:${PORTSDIR}/multimedia/gstreamer1-libav
+.endif
+
+.if ${PORT_OPTIONS:MGTK3}
+BUILD_DEPENDS+= gtk3>=3.14.6:${PORTSDIR}/x11-toolkits/gtk30
+.endif
+
+.if ${PORT_OPTIONS:MTEST}
+BROKEN= stage-package fails with ValueError: no path specified
+.endif
+
+pre-patch: dos2unix
+
post-patch:
- ${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS:C/-pthread/${GECKO_PTHREAD_LIBS}/}|' \
- ${WRKSRC}/storage/build/Makefile.in \
- ${WRKSRC}/db/sqlite3/src/Makefile.in
- ${REINPLACE_CMD} -e 's|/usr/local/include|${LOCALBASE}/include|' \
- ${WRKSRC}/js/src/config/mkdepend/Makefile.in
- @${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g ; \
- s|-lpthread|${PTHREAD_LIBS}|g ; \
- s|echo aout|echo elf|g ; \
- s|/usr/X11R6|${LOCALBASE}|g' \
- ${WRKSRC}/js/src/configure
-.if ${ARCH} == "sparc64"
- (cd ${WRKSRC}/xpcom/reflect/xptcall/src/md/unix && \
- ${LN} -s xptcstubs_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_midnightbsd.s && \
- ${LN} -s xptcstubs_sparc64_openbsd.cpp xptcstubs_sparc64_midnightbsd.cpp && \
- ${LN} -s xptcinvoke_sparc64_openbsd.cpp xptcinvoke_sparc64_midnightbsd.cpp && \
- ${LN} -s xptcinvoke_asm_sparc64_openbsd.s xptcinvoke_asm_sparc64_midnightbsd.s)
- (cd ${WRKSRC}/xpcom/reflect/xptcall/src/md/unix && \
- ${LN} -s xptcstubs_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_freebsd.s && \
- ${LN} -s xptcstubs_sparc64_openbsd.cpp xptcstubs_sparc64_freebsd.cpp && \
- ${LN} -s xptcinvoke_sparc64_openbsd.cpp xptcinvoke_sparc64_freebsd.cpp && \
- ${LN} -s xptcinvoke_asm_sparc64_openbsd.s xptcinvoke_asm_sparc64_freebsd.s)
-.else
- ( cd ${WRKSRC}/xpcom/reflect/xptcall/src/md/unix && \
+ ${REINPLACE_CMD} -e 's|GNU/kFreeBSD|MidnightBSD|g' \
+ ${WRKSRC}/build/gyp.mozbuild
+ @${REINPLACE_CMD} -e '/MOZPNG/s/=[0-9]*/=10511/' \
+ ${WRKSRC}/configure.in
+ @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ ${WRKSRC}/xulrunner/stub/nsXULStub.cpp
+ ( cd ${WRKSRC}/xpcom/reflect/xptcall/md/unix && \
${LN} -s xptcstubs_asm_amd64_openbsd.s xptcstubs_asm_amd64_midnightbsd.s && \
${LN} -s xptcstubs_amd64_openbsd.cpp xptcstubs_amd64_midnightbsd.cpp && \
${LN} -s xptcinvoke_amd64_openbsd.cpp xptcinvoke_amd64_midnightbsd.cpp && \
${LN} -s xptcinvoke_asm_amd64_openbsd.s xptcinvoke_asm_amd64_midnightbsd.s \
)
- ${REINPLACE_CMD} -e 's/NetBSD/MidnightBSD/g' ${WRKSRC}/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h
-.endif
- ${LN} -s ${WRKSRC}/security/coreconf/MidnightBSD.mk ${WRKSRC}/security/coreconf/MidnightBSD`${UNAME} -r`.mk
- ${LN} -s ${WRKSRC}/security/coreconf/MidnightBSD.mk ${WRKSRC}/security/coreconf/MidnightBSD${OSREL}.mk
+# ${LN} -s ${WRKSRC}/security/coreconf/MidnightBSD.mk ${WRKSRC}/security/coreconf/MidnightBSD${OSREL}.mk
pre-configure:
- (cd ${WRKSRC}/js/src/ && ${AUTOCONF})
+ (cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf-2.13)
+ (cd ${WRKSRC}/js/src/ && ${LOCALBASE}/bin/autoconf-2.13)
post-build:
- @${REINPLACE_CMD} -e "s|\(Libs:.*\)\($$\)|\1 -Wl,-rpath,${TRUE_PREFIX}/lib/${MOZ_RPATH}\2| ; \
- s|%sdkdir%|%sdkdir%/sdk|g ; \
- s|%%MOZ_LIBDIR%%|${TRUE_PREFIX}/lib/${MOZILLA}|g" \
- ${WRKSRC}/xulrunner/installer/*.pc.in || ${TRUE}
+ @${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}
-post-install:
- cd ${PREFIX}/libdata/pkgconfig/ && ${REINPLACE_CMD} -e 's|${FAKE_DESTDIR}||g' libxul-embedding.pc \
- mozilla-gtkmozembed-embedding.pc mozilla-js.pc mozilla-plugin.pc libxul.pc mozilla-nss.pc \
- mozilla-gtkmozembed.pc
-
.include <bsd.port.post.mk>
Modified: trunk/www/libxul/distinfo
===================================================================
--- trunk/www/libxul/distinfo 2015-11-07 03:06:40 UTC (rev 20667)
+++ trunk/www/libxul/distinfo 2015-11-07 03:43:27 UTC (rev 20668)
@@ -1,3 +1,2 @@
-SHA256 (firefox-3.6.24.source.tar.bz2) = 4e3606672ed54d977981d3331b8aaf1f5572eabc351d95eec25390fabcc72fee
-RMD160 (firefox-3.6.24.source.tar.bz2) = 61d00f2976353d13c119b922c2ee677b7f3e9dfd
-SIZE (firefox-3.6.24.source.tar.bz2) = 51684019
+SHA256 (firefox-38.2.0esr.source.tar.bz2) = 55867254f21cfc610aa63c8aa0d7156df6eb4c0cb37ebac30259e4890170aacb
+SIZE (firefox-38.2.0esr.source.tar.bz2) = 180722192
Added: trunk/www/libxul/files/extra-patch-bug1125514
===================================================================
--- trunk/www/libxul/files/extra-patch-bug1125514 (rev 0)
+++ trunk/www/libxul/files/extra-patch-bug1125514 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,36 @@
+changeset: 258513:ffbd5f5f46f1
+user: Guilherme Goncalves <guilherme.p.gonc at gmail.com>
+date: Thu Aug 20 10:05:29 2015 +0900
+summary: Bug 1125514 - Use jemalloc's metadata statistics to compute bookkeeping. r=glandium
+
+--- memory/build/mozjemalloc_compat.c~
++++ memory/build/mozjemalloc_compat.c
+@@ -136,6 +136,7 @@ jemalloc_stats_impl(jemalloc_stats_t *st
+ {
+ unsigned narenas;
+ size_t active, allocated, mapped, page, pdirty;
++ size_t meta, ameta;
+ size_t lg_chunk;
+
+ // Refresh jemalloc's stats by updating its epoch, see ctl_refresh in
+@@ -149,17 +150,19 @@ jemalloc_stats_impl(jemalloc_stats_t *st
+ CTL_GET("stats.active", active);
+ CTL_GET("stats.allocated", allocated);
+ CTL_GET("stats.mapped", mapped);
++ CTL_GET("stats.metadata", meta);
+ CTL_GET("opt.lg_chunk", lg_chunk);
+- CTL_GET("stats.bookkeeping", stats->bookkeeping);
+
+ /* get the summation for all arenas, i == narenas */
+ CTL_I_GET("stats.arenas.0.pdirty", pdirty, narenas);
++ CTL_I_GET("stats.arenas.0.metadata.allocated", ameta, narenas);
+
+ stats->chunksize = 1 << lg_chunk;
+ stats->mapped = mapped;
+ stats->allocated = allocated;
+ stats->waste = active - allocated;
+ stats->page_cache = pdirty * page;
++ stats->bookkeeping = meta - ameta;
+ stats->bin_unused = compute_bin_unused(narenas);
+ stats->waste -= stats->bin_unused;
+ }
Property changes on: trunk/www/libxul/files/extra-patch-bug1125514
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug1013882
===================================================================
--- trunk/www/libxul/files/patch-bug1013882 (rev 0)
+++ trunk/www/libxul/files/patch-bug1013882 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,69 @@
+diff --git b2g/installer/Makefile.in b2g/installer/Makefile.in
+index 754312a..c69904c 100644
+--- b2g/installer/Makefile.in
++++ b2g/installer/Makefile.in
+@@ -63,6 +63,10 @@ ifneq (,$(filter rtsp,$(NECKO_PROTOCOLS)))
+ DEFINES += -DMOZ_RTSP
+ endif
+
++ifdef MOZ_DEBUG
++DEFINES += -DMOZ_DEBUG=1
++endif
++
+ ifdef GKMEDIAS_SHARED_LIBRARY
+ DEFINES += -DGKMEDIAS_SHARED_LIBRARY
+ endif
+diff --git b2g/installer/package-manifest.in b2g/installer/package-manifest.in
+index 17d433c..0416187 100644
+--- b2g/installer/package-manifest.in
++++ b2g/installer/package-manifest.in
+@@ -576,7 +576,7 @@
+ @BINPATH@/components/MozKeyboard.js
+ @BINPATH@/components/InputMethod.manifest
+
+-#ifdef MOZ_DEBUG
++#if defined(ENABLE_TESTS) && defined(MOZ_DEBUG)
+ @BINPATH@/components/TestInterfaceJS.js
+ @BINPATH@/components/TestInterfaceJS.manifest
+ #endif
+diff --git browser/installer/package-manifest.in browser/installer/package-manifest.in
+index b509fd4..195345c 100644
+--- browser/installer/package-manifest.in
++++ browser/installer/package-manifest.in
+@@ -608,7 +608,7 @@
+ @RESPATH@/components/MozKeyboard.js
+ @RESPATH@/components/InputMethod.manifest
+
+-#ifdef MOZ_DEBUG
++#if defined(ENABLE_TESTS) && defined(MOZ_DEBUG)
+ @RESPATH@/components/TestInterfaceJS.js
+ @RESPATH@/components/TestInterfaceJS.manifest
+ #endif
+diff --git mobile/android/installer/Makefile.in mobile/android/installer/Makefile.in
+index 96dceab..3528ad6 100644
+--- mobile/android/installer/Makefile.in
++++ mobile/android/installer/Makefile.in
+@@ -41,6 +41,10 @@ BINPATH = bin
+ endif
+ DEFINES += -DBINPATH=$(BINPATH)
+
++ifdef MOZ_DEBUG
++DEFINES += -DMOZ_DEBUG=1
++endif
++
+ ifdef ENABLE_MARIONETTE
+ DEFINES += -DENABLE_MARIONETTE=1
+ endif
+diff --git mobile/android/installer/package-manifest.in mobile/android/installer/package-manifest.in
+index 994580b..cf142df 100644
+--- mobile/android/installer/package-manifest.in
++++ mobile/android/installer/package-manifest.in
+@@ -440,7 +440,7 @@
+ @BINPATH@/components/dom_webspeechsynth.xpt
+ #endif
+
+-#ifdef MOZ_DEBUG
++#if defined(ENABLE_TESTS) && defined(MOZ_DEBUG)
+ @BINPATH@/components/TestInterfaceJS.js
+ @BINPATH@/components/TestInterfaceJS.manifest
+ #endif
Property changes on: trunk/www/libxul/files/patch-bug1013882
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug1021761
===================================================================
--- trunk/www/libxul/files/patch-bug1021761 (rev 0)
+++ trunk/www/libxul/files/patch-bug1021761 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,1102 @@
+diff --git configure.in configure.in
+index 48e60c0..ec08417 100644
+--- configure.in
++++ configure.in
+@@ -5591,6 +5591,67 @@ fi
+ AC_SUBST(MOZ_WEBM_ENCODER)
+
+ dnl ==================================
++dnl = Check OSS availability
++dnl ==================================
++
++dnl If using Linux, Solaris or BSDs, ensure that OSS is available
++case "$OS_TARGET" in
++Linux|SunOS|DragonFly|FreeBSD|NetBSD|GNU/kFreeBSD)
++ MOZ_OSS=1
++ ;;
++esac
++
++MOZ_ARG_WITH_STRING(oss,
++[ --with-oss[=PFX] Enable OpenSoundSystem support [installed at prefix PFX]],
++ OSSPREFIX=$withval)
++
++if test -n "$OSSPREFIX"; then
++ if test "$OSSPREFIX" != "no"; then
++ MOZ_OSS=1
++ else
++ MOZ_OSS=
++ fi
++fi
++
++_SAVE_CFLAGS=$CFLAGS
++_SAVE_LIBS=$LIBS
++if test -n "$MOZ_OSS"; then
++ dnl Prefer 4Front implementation
++ AC_MSG_CHECKING([MOZ_OSS_CFLAGS])
++ if test "$OSSPREFIX" != "yes"; then
++ oss_conf=${OSSPREFIX%/usr}/etc/oss.conf
++ if test -f "$oss_conf"; then
++ . "$oss_conf"
++ else
++ OSSLIBDIR=$OSSPREFIX/lib/oss
++ fi
++ if test -d "$OSSLIBDIR"; then
++ MOZ_OSS_CFLAGS="$MOZ_OSS_CFLAGS -I$OSSLIBDIR/include"
++ fi
++ fi
++ AC_MSG_RESULT([$MOZ_OSS_CFLAGS])
++
++ CFLAGS="$CFLAGS $MOZ_OSS_CFLAGS"
++ MOZ_CHECK_HEADERS(sys/soundcard.h soundcard.h)
++
++ if test "$ac_cv_header_sys_soundcard_h" != "yes" -a \
++ "$ac_cv_header_soundcard_h" != "yes"; then
++ AC_MSG_ERROR([Need OSS for Ogg, Wave or WebM decoding on $OS_TARGET. Disable with --disable-ogg --disable-wave --disable-webm.])
++ fi
++
++ dnl Assume NetBSD implementation over SunAudio
++ AC_CHECK_LIB(ossaudio, _oss_ioctl,
++ [AC_DEFINE_UNQUOTED(CUBEB_OSS_DEFAULT_OUTPUT, "/dev/sound")
++ MOZ_OSS_LIBS="$MOZ_OSS_LIBS -lossaudio"])
++fi
++CFLAGS=$_SAVE_CFLAGS
++LIBS=$_SAVE_LIBS
++
++AC_SUBST(MOZ_OSS)
++AC_SUBST_LIST(MOZ_OSS_CFLAGS)
++AC_SUBST_LIST(MOZ_OSS_LIBS)
++
++dnl ==================================
+ dnl = Check alsa availability on Linux
+ dnl ==================================
+
+diff --git media/libcubeb/AUTHORS media/libcubeb/AUTHORS
+index b441e8a..950d9e5 100644
+--- media/libcubeb/AUTHORS
++++ media/libcubeb/AUTHORS
+@@ -4,3 +4,4 @@ Michael Wu <mwu at mozilla.com>
+ Paul Adenot <paul at paul.cx>
+ David Richards <drichards at mozilla.com>
+ Sebastien Alaiwan <sebastien.alaiwan at gmail.com>
++Evgeniy Vodolazskiy <waterlaz at gmail.com>
+diff --git media/libcubeb/src/cubeb.c media/libcubeb/src/cubeb.c
+index 9c3adcc..45d765b 100644
+--- media/libcubeb/src/cubeb.c
++++ media/libcubeb/src/cubeb.c
+@@ -54,6 +54,9 @@ int opensl_init(cubeb ** context, char const * context_name);
+ #if defined(USE_AUDIOTRACK)
+ int audiotrack_init(cubeb ** context, char const * context_name);
+ #endif
++#if defined(USE_OSS)
++int oss_init(cubeb ** context, char const * context_name);
++#endif
+
+ int
+ validate_stream_params(cubeb_stream_params stream_params)
+@@ -120,6 +123,9 @@ cubeb_init(cubeb ** context, char const * context_name)
+ #if defined(USE_AUDIOTRACK)
+ audiotrack_init,
+ #endif
++#if defined(USE_OSS)
++ oss_init,
++#endif
+ };
+ int i;
+
+diff --git media/libcubeb/src/cubeb_alsa.c media/libcubeb/src/cubeb_alsa.c
+index a962553..1f780f4 100644
+--- media/libcubeb/src/cubeb_alsa.c
++++ media/libcubeb/src/cubeb_alsa.c
+@@ -11,6 +11,7 @@
+ #include <sys/time.h>
+ #include <assert.h>
+ #include <limits.h>
++#include <dlfcn.h>
+ #include <poll.h>
+ #include <unistd.h>
+ #include <alsa/asoundlib.h>
+@@ -24,6 +25,50 @@
+
+ #define ALSA_PA_PLUGIN "ALSA <-> PulseAudio PCM I/O Plugin"
+
++#ifdef DISABLE_LIBASOUND_DLOPEN
++#define WRAP(x) x
++#else
++#define WRAP(x) cubeb_##x
++#define MAKE_TYPEDEF(x) static typeof(x) * cubeb_##x
++MAKE_TYPEDEF(snd_config);
++MAKE_TYPEDEF(snd_config_add);
++MAKE_TYPEDEF(snd_config_copy);
++MAKE_TYPEDEF(snd_config_delete);
++MAKE_TYPEDEF(snd_config_get_id);
++MAKE_TYPEDEF(snd_config_get_string);
++MAKE_TYPEDEF(snd_config_imake_integer);
++MAKE_TYPEDEF(snd_config_search);
++MAKE_TYPEDEF(snd_config_search_definition);
++MAKE_TYPEDEF(snd_lib_error_set_handler);
++MAKE_TYPEDEF(snd_pcm_avail_update);
++MAKE_TYPEDEF(snd_pcm_close);
++MAKE_TYPEDEF(snd_pcm_delay);
++MAKE_TYPEDEF(snd_pcm_drain);
++MAKE_TYPEDEF(snd_pcm_frames_to_bytes);
++MAKE_TYPEDEF(snd_pcm_get_params);
++/* snd_pcm_hw_params_alloca is actually a macro */
++/* MAKE_TYPEDEF(snd_pcm_hw_params_alloca); */
++MAKE_TYPEDEF(snd_pcm_hw_params_sizeof);
++#define snd_pcm_hw_params_sizeof cubeb_snd_pcm_hw_params_sizeof
++MAKE_TYPEDEF(snd_pcm_hw_params_any);
++MAKE_TYPEDEF(snd_pcm_hw_params_get_channels_max);
++MAKE_TYPEDEF(snd_pcm_hw_params_get_rate);
++MAKE_TYPEDEF(snd_pcm_hw_params_set_rate_near);
++MAKE_TYPEDEF(snd_pcm_nonblock);
++MAKE_TYPEDEF(snd_pcm_open);
++MAKE_TYPEDEF(snd_pcm_open_lconf);
++MAKE_TYPEDEF(snd_pcm_pause);
++MAKE_TYPEDEF(snd_pcm_poll_descriptors);
++MAKE_TYPEDEF(snd_pcm_poll_descriptors_count);
++MAKE_TYPEDEF(snd_pcm_poll_descriptors_revents);
++MAKE_TYPEDEF(snd_pcm_recover);
++MAKE_TYPEDEF(snd_pcm_set_params);
++MAKE_TYPEDEF(snd_pcm_state);
++MAKE_TYPEDEF(snd_pcm_writei);
++
++#undef MAKE_TYPEDEF
++#endif
++
+ /* ALSA is not thread-safe. snd_pcm_t instances are individually protected
+ by the owning cubeb_stream's mutex. snd_pcm_t creation and destruction
+ is not thread-safe until ALSA 1.0.24 (see alsa-lib.git commit 91c9c8f1),
+@@ -64,6 +109,8 @@ struct cubeb {
+ workaround is not required. */
+ snd_config_t * local_config;
+ int is_pa;
++
++ void * libasound;
+ };
+
+ enum stream_state {
+@@ -262,7 +309,7 @@ alsa_refill_stream(cubeb_stream * stm)
+
+ pthread_mutex_lock(&stm->mutex);
+
+- r = snd_pcm_poll_descriptors_revents(stm->pcm, stm->fds, stm->nfds, &revents);
++ r = WRAP(snd_pcm_poll_descriptors_revents)(stm->pcm, stm->fds, stm->nfds, &revents);
+ if (r < 0 || revents != POLLOUT) {
+ /* This should be a stream error; it makes no sense for poll(2) to wake
+ for this stream and then have the stream report that it's not ready.
+@@ -271,10 +318,10 @@ alsa_refill_stream(cubeb_stream * stm)
+ return RUNNING;
+ }
+
+- avail = snd_pcm_avail_update(stm->pcm);
++ avail = WRAP(snd_pcm_avail_update)(stm->pcm);
+ if (avail == -EPIPE) {
+- snd_pcm_recover(stm->pcm, avail, 1);
+- avail = snd_pcm_avail_update(stm->pcm);
++ WRAP(snd_pcm_recover)(stm->pcm, avail, 1);
++ avail = WRAP(snd_pcm_avail_update)(stm->pcm);
+ }
+
+ /* Failed to recover from an xrun, this stream must be broken. */
+@@ -293,8 +340,8 @@ alsa_refill_stream(cubeb_stream * stm)
+ available to write. If avail is still zero here, the stream must be in
+ a funky state, so recover and try again. */
+ if (avail == 0) {
+- snd_pcm_recover(stm->pcm, -EPIPE, 1);
+- avail = snd_pcm_avail_update(stm->pcm);
++ WRAP(snd_pcm_recover)(stm->pcm, -EPIPE, 1);
++ avail = WRAP(snd_pcm_avail_update)(stm->pcm);
+ if (avail <= 0) {
+ pthread_mutex_unlock(&stm->mutex);
+ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
+@@ -302,7 +349,7 @@ alsa_refill_stream(cubeb_stream * stm)
+ }
+ }
+
+- p = calloc(1, snd_pcm_frames_to_bytes(stm->pcm, avail));
++ p = calloc(1, WRAP(snd_pcm_frames_to_bytes)(stm->pcm, avail));
+ assert(p);
+
+ pthread_mutex_unlock(&stm->mutex);
+@@ -327,10 +374,10 @@ alsa_refill_stream(cubeb_stream * stm)
+ b[i] *= stm->volume;
+ }
+ }
+- wrote = snd_pcm_writei(stm->pcm, p, got);
++ wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got);
+ if (wrote == -EPIPE) {
+- snd_pcm_recover(stm->pcm, wrote, 1);
+- wrote = snd_pcm_writei(stm->pcm, p, got);
++ WRAP(snd_pcm_recover)(stm->pcm, wrote, 1);
++ wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got);
+ }
+ assert(wrote >= 0 && wrote == got);
+ stm->write_position += wrote;
+@@ -342,7 +389,7 @@ alsa_refill_stream(cubeb_stream * stm)
+
+ /* Fill the remaining buffer with silence to guarantee one full period
+ has been written. */
+- snd_pcm_writei(stm->pcm, (char *) p + got, avail - got);
++ WRAP(snd_pcm_writei)(stm->pcm, (char *) p + got, avail - got);
+
+ set_timeout(&stm->drain_timeout, buffer_time * 1000);
+
+@@ -453,26 +500,26 @@ get_slave_pcm_node(snd_config_t * lconf, snd_config_t * root_pcm)
+
+ slave_def = NULL;
+
+- r = snd_config_search(root_pcm, "slave", &slave_pcm);
++ r = WRAP(snd_config_search)(root_pcm, "slave", &slave_pcm);
+ if (r < 0) {
+ return NULL;
+ }
+
+- r = snd_config_get_string(slave_pcm, &string);
++ r = WRAP(snd_config_get_string)(slave_pcm, &string);
+ if (r >= 0) {
+- r = snd_config_search_definition(lconf, "pcm_slave", string, &slave_def);
++ r = WRAP(snd_config_search_definition)(lconf, "pcm_slave", string, &slave_def);
+ if (r < 0) {
+ return NULL;
+ }
+ }
+
+ do {
+- r = snd_config_search(slave_def ? slave_def : slave_pcm, "pcm", &pcm);
++ r = WRAP(snd_config_search)(slave_def ? slave_def : slave_pcm, "pcm", &pcm);
+ if (r < 0) {
+ break;
+ }
+
+- r = snd_config_get_string(slave_def ? slave_def : slave_pcm, &string);
++ r = WRAP(snd_config_get_string)(slave_def ? slave_def : slave_pcm, &string);
+ if (r < 0) {
+ break;
+ }
+@@ -481,7 +528,7 @@ get_slave_pcm_node(snd_config_t * lconf, snd_config_t * root_pcm)
+ if (r < 0 || r > (int) sizeof(node_name)) {
+ break;
+ }
+- r = snd_config_search(lconf, node_name, &pcm);
++ r = WRAP(snd_config_search)(lconf, node_name, &pcm);
+ if (r < 0) {
+ break;
+ }
+@@ -490,7 +537,7 @@ get_slave_pcm_node(snd_config_t * lconf, snd_config_t * root_pcm)
+ } while (0);
+
+ if (slave_def) {
+- snd_config_delete(slave_def);
++ WRAP(snd_config_delete)(slave_def);
+ }
+
+ return NULL;
+@@ -513,22 +560,22 @@ init_local_config_with_workaround(char const * pcm_name)
+
+ lconf = NULL;
+
+- if (snd_config == NULL) {
++ if (*WRAP(snd_config) == NULL) {
+ return NULL;
+ }
+
+- r = snd_config_copy(&lconf, snd_config);
++ r = WRAP(snd_config_copy)(&lconf, *WRAP(snd_config));
+ if (r < 0) {
+ return NULL;
+ }
+
+ do {
+- r = snd_config_search_definition(lconf, "pcm", pcm_name, &pcm_node);
++ r = WRAP(snd_config_search_definition)(lconf, "pcm", pcm_name, &pcm_node);
+ if (r < 0) {
+ break;
+ }
+
+- r = snd_config_get_id(pcm_node, &string);
++ r = WRAP(snd_config_get_id)(pcm_node, &string);
+ if (r < 0) {
+ break;
+ }
+@@ -537,7 +584,7 @@ init_local_config_with_workaround(char const * pcm_name)
+ if (r < 0 || r > (int) sizeof(node_name)) {
+ break;
+ }
+- r = snd_config_search(lconf, node_name, &pcm_node);
++ r = WRAP(snd_config_search)(lconf, node_name, &pcm_node);
+ if (r < 0) {
+ break;
+ }
+@@ -548,12 +595,12 @@ init_local_config_with_workaround(char const * pcm_name)
+ }
+
+ /* Fetch the PCM node's type, and bail out if it's not the PulseAudio plugin. */
+- r = snd_config_search(pcm_node, "type", &node);
++ r = WRAP(snd_config_search)(pcm_node, "type", &node);
+ if (r < 0) {
+ break;
+ }
+
+- r = snd_config_get_string(node, &string);
++ r = WRAP(snd_config_get_string)(node, &string);
+ if (r < 0) {
+ break;
+ }
+@@ -564,18 +611,18 @@ init_local_config_with_workaround(char const * pcm_name)
+
+ /* Don't clobber an explicit existing handle_underrun value, set it only
+ if it doesn't already exist. */
+- r = snd_config_search(pcm_node, "handle_underrun", &node);
++ r = WRAP(snd_config_search)(pcm_node, "handle_underrun", &node);
+ if (r != -ENOENT) {
+ break;
+ }
+
+ /* Disable pcm_pulse's asynchronous underrun handling. */
+- r = snd_config_imake_integer(&node, "handle_underrun", 0);
++ r = WRAP(snd_config_imake_integer)(&node, "handle_underrun", 0);
+ if (r < 0) {
+ break;
+ }
+
+- r = snd_config_add(pcm_node, node);
++ r = WRAP(snd_config_add)(pcm_node, node);
+ if (r < 0) {
+ break;
+ }
+@@ -583,7 +630,7 @@ init_local_config_with_workaround(char const * pcm_name)
+ return lconf;
+ } while (0);
+
+- snd_config_delete(lconf);
++ WRAP(snd_config_delete)(lconf);
+
+ return NULL;
+ }
+@@ -595,9 +642,9 @@ alsa_locked_pcm_open(snd_pcm_t ** pcm, snd_pcm_stream_t stream, snd_config_t * l
+
+ pthread_mutex_lock(&cubeb_alsa_mutex);
+ if (local_config) {
+- r = snd_pcm_open_lconf(pcm, CUBEB_ALSA_PCM_NAME, stream, SND_PCM_NONBLOCK, local_config);
++ r = WRAP(snd_pcm_open_lconf)(pcm, CUBEB_ALSA_PCM_NAME, stream, SND_PCM_NONBLOCK, local_config);
+ } else {
+- r = snd_pcm_open(pcm, CUBEB_ALSA_PCM_NAME, stream, SND_PCM_NONBLOCK);
++ r = WRAP(snd_pcm_open)(pcm, CUBEB_ALSA_PCM_NAME, stream, SND_PCM_NONBLOCK);
+ }
+ pthread_mutex_unlock(&cubeb_alsa_mutex);
+
+@@ -610,7 +657,7 @@ alsa_locked_pcm_close(snd_pcm_t * pcm)
+ int r;
+
+ pthread_mutex_lock(&cubeb_alsa_mutex);
+- r = snd_pcm_close(pcm);
++ r = WRAP(snd_pcm_close)(pcm);
+ pthread_mutex_unlock(&cubeb_alsa_mutex);
+
+ return r;
+@@ -667,12 +714,65 @@ alsa_init(cubeb ** context, char const * context_name)
+ pthread_attr_t attr;
+ snd_pcm_t * dummy;
+
++ void * libasound = NULL;
++
++#ifndef DISABLE_LIBASOUND_DLOPEN
++ libasound = dlopen("libasound.so", RTLD_LAZY);
++ if (!libasound) {
++ return CUBEB_ERROR;
++ }
++
++#define LOAD(x) do { \
++ cubeb_##x = dlsym(libasound, #x); \
++ if (!cubeb_##x) { \
++ dlclose(libasound); \
++ return CUBEB_ERROR; \
++ } \
++ } while(0)
++
++ LOAD(snd_config);
++ LOAD(snd_config_add);
++ LOAD(snd_config_copy);
++ LOAD(snd_config_delete);
++ LOAD(snd_config_get_id);
++ LOAD(snd_config_get_string);
++ LOAD(snd_config_imake_integer);
++ LOAD(snd_config_search);
++ LOAD(snd_config_search_definition);
++ LOAD(snd_lib_error_set_handler);
++ LOAD(snd_pcm_avail_update);
++ LOAD(snd_pcm_close);
++ LOAD(snd_pcm_delay);
++ LOAD(snd_pcm_drain);
++ LOAD(snd_pcm_frames_to_bytes);
++ LOAD(snd_pcm_get_params);
++ /* snd_pcm_hw_params_alloca is actually a macro */
++ /* LOAD(snd_pcm_hw_params_alloca); */
++ LOAD(snd_pcm_hw_params_sizeof);
++ LOAD(snd_pcm_hw_params_any);
++ LOAD(snd_pcm_hw_params_get_channels_max);
++ LOAD(snd_pcm_hw_params_get_rate);
++ LOAD(snd_pcm_hw_params_set_rate_near);
++ LOAD(snd_pcm_nonblock);
++ LOAD(snd_pcm_open);
++ LOAD(snd_pcm_open_lconf);
++ LOAD(snd_pcm_pause);
++ LOAD(snd_pcm_poll_descriptors);
++ LOAD(snd_pcm_poll_descriptors_count);
++ LOAD(snd_pcm_poll_descriptors_revents);
++ LOAD(snd_pcm_recover);
++ LOAD(snd_pcm_set_params);
++ LOAD(snd_pcm_state);
++ LOAD(snd_pcm_writei);
++
++#undef LOAD
++#endif
+ assert(context);
+ *context = NULL;
+
+ pthread_mutex_lock(&cubeb_alsa_mutex);
+ if (!cubeb_alsa_error_handler_set) {
+- snd_lib_error_set_handler(silent_error_handler);
++ WRAP(snd_lib_error_set_handler)(silent_error_handler);
+ cubeb_alsa_error_handler_set = 1;
+ }
+ pthread_mutex_unlock(&cubeb_alsa_mutex);
+@@ -680,6 +780,8 @@ alsa_init(cubeb ** context, char const * context_name)
+ ctx = calloc(1, sizeof(*ctx));
+ assert(ctx);
+
++ ctx->libasound = libasound;
++
+ ctx->ops = &alsa_ops;
+
+ r = pthread_mutex_init(&ctx->mutex, NULL);
+@@ -729,7 +831,7 @@ alsa_init(cubeb ** context, char const * context_name)
+ config fails with EINVAL, the PA PCM is too old for this workaround. */
+ if (r == -EINVAL) {
+ pthread_mutex_lock(&cubeb_alsa_mutex);
+- snd_config_delete(ctx->local_config);
++ WRAP(snd_config_delete)(ctx->local_config);
+ pthread_mutex_unlock(&cubeb_alsa_mutex);
+ ctx->local_config = NULL;
+ } else if (r >= 0) {
+@@ -768,9 +870,13 @@ alsa_destroy(cubeb * ctx)
+ pthread_mutex_destroy(&ctx->mutex);
+ free(ctx->fds);
+
++ if (ctx->libasound) {
++ dlclose(ctx->libasound);
++ }
++
+ if (ctx->local_config) {
+ pthread_mutex_lock(&cubeb_alsa_mutex);
+- snd_config_delete(ctx->local_config);
++ WRAP(snd_config_delete)(ctx->local_config);
+ pthread_mutex_unlock(&cubeb_alsa_mutex);
+ }
+
+@@ -838,7 +944,7 @@ alsa_stream_init(cubeb * ctx, cubeb_stream ** stream, char const * stream_name,
+ return CUBEB_ERROR;
+ }
+
+- r = snd_pcm_nonblock(stm->pcm, 1);
++ r = WRAP(snd_pcm_nonblock)(stm->pcm, 1);
+ assert(r == 0);
+
+ /* Ugly hack: the PA ALSA plugin allows buffer configurations that can't
+@@ -848,23 +954,23 @@ alsa_stream_init(cubeb * ctx, cubeb_stream ** stream, char const * stream_name,
+ latency = latency < 500 ? 500 : latency;
+ }
+
+- r = snd_pcm_set_params(stm->pcm, format, SND_PCM_ACCESS_RW_INTERLEAVED,
+- stm->params.channels, stm->params.rate, 1,
+- latency * 1000);
++ r = WRAP(snd_pcm_set_params)(stm->pcm, format, SND_PCM_ACCESS_RW_INTERLEAVED,
++ stm->params.channels, stm->params.rate, 1,
++ latency * 1000);
+ if (r < 0) {
+ alsa_stream_destroy(stm);
+ return CUBEB_ERROR_INVALID_FORMAT;
+ }
+
+- r = snd_pcm_get_params(stm->pcm, &stm->buffer_size, &stm->period_size);
++ r = WRAP(snd_pcm_get_params)(stm->pcm, &stm->buffer_size, &stm->period_size);
+ assert(r == 0);
+
+- stm->nfds = snd_pcm_poll_descriptors_count(stm->pcm);
++ stm->nfds = WRAP(snd_pcm_poll_descriptors_count)(stm->pcm);
+ assert(stm->nfds > 0);
+
+ stm->saved_fds = calloc(stm->nfds, sizeof(struct pollfd));
+ assert(stm->saved_fds);
+- r = snd_pcm_poll_descriptors(stm->pcm, stm->saved_fds, stm->nfds);
++ r = WRAP(snd_pcm_poll_descriptors)(stm->pcm, stm->saved_fds, stm->nfds);
+ assert((nfds_t) r == stm->nfds);
+
+ r = pthread_cond_init(&stm->cond, NULL);
+@@ -895,7 +1001,7 @@ alsa_stream_destroy(cubeb_stream * stm)
+ pthread_mutex_lock(&stm->mutex);
+ if (stm->pcm) {
+ if (stm->state == DRAINING) {
+- snd_pcm_drain(stm->pcm);
++ WRAP(snd_pcm_drain)(stm->pcm);
+ }
+ alsa_locked_pcm_close(stm->pcm);
+ stm->pcm = NULL;
+@@ -938,12 +1044,12 @@ alsa_get_max_channel_count(cubeb * ctx, uint32_t * max_channels)
+ return CUBEB_ERROR;
+ }
+
+- r = snd_pcm_hw_params_any(stm->pcm, hw_params);
++ r = WRAP(snd_pcm_hw_params_any)(stm->pcm, hw_params);
+ if (r < 0) {
+ return CUBEB_ERROR;
+ }
+
+- r = snd_pcm_hw_params_get_channels_max(hw_params, max_channels);
++ r = WRAP(snd_pcm_hw_params_get_channels_max)(hw_params, max_channels);
+ if (r < 0) {
+ return CUBEB_ERROR;
+ }
+@@ -963,34 +1069,34 @@ alsa_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate) {
+
+ /* get a pcm, disabling resampling, so we get a rate the
+ * hardware/dmix/pulse/etc. supports. */
+- r = snd_pcm_open(&pcm, "default", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0);
++ r = WRAP(snd_pcm_open)(&pcm, "default", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0);
+ if (r < 0) {
+ return CUBEB_ERROR;
+ }
+
+- r = snd_pcm_hw_params_any(pcm, hw_params);
++ r = WRAP(snd_pcm_hw_params_any)(pcm, hw_params);
+ if (r < 0) {
+- snd_pcm_close(pcm);
++ WRAP(snd_pcm_close)(pcm);
+ return CUBEB_ERROR;
+ }
+
+- r = snd_pcm_hw_params_get_rate(hw_params, rate, &dir);
++ r = WRAP(snd_pcm_hw_params_get_rate)(hw_params, rate, &dir);
+ if (r >= 0) {
+ /* There is a default rate: use it. */
+- snd_pcm_close(pcm);
++ WRAP(snd_pcm_close)(pcm);
+ return CUBEB_OK;
+ }
+
+ /* Use a common rate, alsa may adjust it based on hw/etc. capabilities. */
+ *rate = 44100;
+
+- r = snd_pcm_hw_params_set_rate_near(pcm, hw_params, rate, NULL);
++ r = WRAP(snd_pcm_hw_params_set_rate_near)(pcm, hw_params, rate, NULL);
+ if (r < 0) {
+- snd_pcm_close(pcm);
++ WRAP(snd_pcm_close)(pcm);
+ return CUBEB_ERROR;
+ }
+
+- snd_pcm_close(pcm);
++ WRAP(snd_pcm_close)(pcm);
+
+ return CUBEB_OK;
+ }
+@@ -1013,7 +1119,7 @@ alsa_stream_start(cubeb_stream * stm)
+ ctx = stm->context;
+
+ pthread_mutex_lock(&stm->mutex);
+- snd_pcm_pause(stm->pcm, 0);
++ WRAP(snd_pcm_pause)(stm->pcm, 0);
+ gettimeofday(&stm->last_activity, NULL);
+ pthread_mutex_unlock(&stm->mutex);
+
+@@ -1047,7 +1153,7 @@ alsa_stream_stop(cubeb_stream * stm)
+ pthread_mutex_unlock(&ctx->mutex);
+
+ pthread_mutex_lock(&stm->mutex);
+- snd_pcm_pause(stm->pcm, 1);
++ WRAP(snd_pcm_pause)(stm->pcm, 1);
+ pthread_mutex_unlock(&stm->mutex);
+
+ return CUBEB_OK;
+@@ -1063,8 +1169,8 @@ alsa_stream_get_position(cubeb_stream * stm, uint64_t * position)
+ pthread_mutex_lock(&stm->mutex);
+
+ delay = -1;
+- if (snd_pcm_state(stm->pcm) != SND_PCM_STATE_RUNNING ||
+- snd_pcm_delay(stm->pcm, &delay) != 0) {
++ if (WRAP(snd_pcm_state)(stm->pcm) != SND_PCM_STATE_RUNNING ||
++ WRAP(snd_pcm_delay)(stm->pcm, &delay) != 0) {
+ *position = stm->last_position;
+ pthread_mutex_unlock(&stm->mutex);
+ return CUBEB_OK;
+@@ -1089,7 +1195,7 @@ alsa_stream_get_latency(cubeb_stream * stm, uint32_t * latency)
+ snd_pcm_sframes_t delay;
+ /* This function returns the delay in frames until a frame written using
+ snd_pcm_writei is sent to the DAC. The DAC delay should be < 1ms anyways. */
+- if (snd_pcm_delay(stm->pcm, &delay)) {
++ if (WRAP(snd_pcm_delay)(stm->pcm, &delay)) {
+ return CUBEB_ERROR;
+ }
+
+diff --git media/libcubeb/src/cubeb_oss.c media/libcubeb/src/cubeb_oss.c
+new file mode 100644
+index 0000000..5e38e27
+--- /dev/null
++++ media/libcubeb/src/cubeb_oss.c
+@@ -0,0 +1,402 @@
++/*
++ * Copyright © 2014 Mozilla Foundation
++ *
++ * This program is made available under an ISC-style license. See the
++ * accompanying file LICENSE for details.
++ */
++#if defined(HAVE_SYS_SOUNDCARD_H)
++#include <sys/soundcard.h>
++#else
++#include <soundcard.h>
++#endif
++#include <unistd.h>
++#include <stdlib.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++#include <sys/ioctl.h>
++#include <errno.h>
++#include <pthread.h>
++#include <stdio.h>
++
++#include "cubeb/cubeb.h"
++#include "cubeb-internal.h"
++
++#ifndef CUBEB_OSS_DEFAULT_OUTPUT
++#define CUBEB_OSS_DEFAULT_OUTPUT "/dev/dsp"
++#endif
++
++#define OSS_BUFFER_SIZE 1024
++
++struct cubeb {
++ struct cubeb_ops const * ops;
++};
++
++struct cubeb_stream {
++ cubeb * context;
++
++ cubeb_data_callback data_callback;
++ cubeb_state_callback state_callback;
++ void * user_ptr;
++ float volume;
++ float panning;
++
++ pthread_mutex_t state_mutex;
++ pthread_cond_t state_cond;
++
++ int running;
++ int stopped;
++ int floating;
++
++ /* These two vars are needed to support old versions of OSS */
++ unsigned int position_bytes;
++ unsigned int last_position_bytes;
++
++ uint64_t written_frags; /* The number of fragments written to /dev/dsp */
++ uint64_t missed_frags; /* fragments output with stopped stream */
++
++ cubeb_stream_params params;
++ int fd;
++ pthread_t th;
++};
++
++static struct cubeb_ops const oss_ops;
++
++int oss_init(cubeb ** context, char const * context_name)
++{
++ cubeb* ctx = (cubeb*)malloc(sizeof(cubeb));
++ ctx->ops = &oss_ops;
++ *context = ctx;
++ return CUBEB_OK;
++}
++
++static void oss_destroy(cubeb *ctx)
++{
++ free(ctx);
++}
++
++static char const * oss_get_backend_id(cubeb * context)
++{
++ static char oss_name[] = "oss";
++ return oss_name;
++}
++
++static int oss_get_max_channel_count(cubeb * ctx, uint32_t * max_channels)
++{
++ *max_channels = 2; /* Let's support only stereo for now */
++ return CUBEB_OK;
++}
++
++static int oss_get_min_latency(cubeb * context, cubeb_stream_params params,
++ uint32_t * latency_ms)
++{
++ /* 40ms is a big enough number to work ok */
++ *latency_ms = 40;
++ return CUBEB_OK;
++}
++
++static int oss_get_preferred_sample_rate(cubeb *context, uint32_t * rate)
++{
++ /* 48000 seems a prefered choice for most audio devices
++ * and a good choice for OSS */
++ *rate = 48000;
++ return CUBEB_OK;
++}
++
++static void run_state_callback(cubeb_stream *stream, cubeb_state state)
++{
++ if (stream->state_callback) {
++ stream->state_callback(stream, stream->user_ptr, state);
++ }
++}
++
++static long run_data_callback(cubeb_stream *stream, void *buffer, long nframes)
++{
++ long got = 0;
++ pthread_mutex_lock(&stream->state_mutex);
++ if (stream->data_callback && stream->running && !stream->stopped) {
++ pthread_mutex_unlock(&stream->state_mutex);
++ got = stream->data_callback(stream, stream->user_ptr, buffer, nframes);
++ } else {
++ pthread_mutex_unlock(&stream->state_mutex);
++ }
++ return got;
++}
++
++static void apply_volume(int16_t* buffer, unsigned int n,
++ float volume, float panning)
++{
++ float left = volume;
++ float right = volume;
++ unsigned int i;
++ int pan[2];
++ if (panning<0) {
++ right *= (1+panning);
++ } else {
++ left *= (1-panning);
++ }
++ pan[0] = 128.0*left;
++ pan[1] = 128.0*right;
++ for(i=0; i<n; i++){
++ buffer[i] = ((int)buffer[i])*pan[i%2]/128;
++ }
++}
++
++static void *writer(void *stm)
++{
++ cubeb_stream* stream = (cubeb_stream*)stm;
++ int16_t buffer[OSS_BUFFER_SIZE];
++ float f_buffer[OSS_BUFFER_SIZE];
++ int got;
++ unsigned long i;
++ while (stream->running) {
++ pthread_mutex_lock(&stream->state_mutex);
++ if (stream->stopped) {
++ pthread_mutex_unlock(&stream->state_mutex);
++ run_state_callback(stream, CUBEB_STATE_STOPPED);
++ pthread_mutex_lock(&stream->state_mutex);
++ while (stream->stopped) {
++ pthread_cond_wait(&stream->state_cond, &stream->state_mutex);
++ }
++ pthread_mutex_unlock(&stream->state_mutex);
++ run_state_callback(stream, CUBEB_STATE_STARTED);
++ continue;
++ }
++ pthread_mutex_unlock(&stream->state_mutex);
++ if (stream->floating) {
++ got = run_data_callback(stream, f_buffer,
++ OSS_BUFFER_SIZE/stream->params.channels);
++ for (i=0; i<((unsigned long)got)*stream->params.channels; i++) {
++ buffer[i] = f_buffer[i]*32767.0;
++ }
++ } else {
++ got = run_data_callback(stream, buffer,
++ OSS_BUFFER_SIZE/stream->params.channels);
++ }
++ apply_volume(buffer, got*stream->params.channels,
++ stream->volume, stream->panning);
++ if (got<0) {
++ run_state_callback(stream, CUBEB_STATE_ERROR);
++ break;
++ }
++ if (!got) {
++ run_state_callback(stream, CUBEB_STATE_DRAINED);
++ }
++ if (got) {
++ size_t i = 0;
++ size_t s = got*stream->params.channels*sizeof(int16_t);
++ while (i < s) {
++ ssize_t n = write(stream->fd, ((char*)buffer) + i, s - i);
++ if (n<=0) {
++ run_state_callback(stream, CUBEB_STATE_ERROR);
++ break;
++ }
++ i+=n;
++ }
++ stream->written_frags+=got;
++ }
++ }
++ return NULL;
++}
++
++static void oss_try_set_latency(cubeb_stream* stream, unsigned int latency)
++{
++ unsigned int latency_bytes, n_frag;
++ int frag;
++ /* fragment size of 1024 is a good choice with good chances to be accepted */
++ unsigned int frag_size=1024;
++ unsigned int frag_log=10; /* 2^frag_log = frag_size */
++ latency_bytes =
++ latency*stream->params.rate*stream->params.channels*sizeof(uint16_t)/1000;
++ n_frag = latency_bytes>>frag_log;
++ frag = (n_frag<<16) | frag_log;
++ /* Even if this fails we wish to continue, not checking for errors */
++ ioctl(stream->fd, SNDCTL_DSP_SETFRAGMENT, &frag);
++}
++
++static int oss_stream_init(cubeb * context, cubeb_stream ** stm,
++ char const * stream_name,
++ cubeb_stream_params stream_params,
++ unsigned int latency,
++ cubeb_data_callback data_callback,
++ cubeb_state_callback state_callback, void * user_ptr)
++{
++ cubeb_stream* stream = (cubeb_stream*)malloc(sizeof(cubeb_stream));
++ stream->context = context;
++ stream->data_callback = data_callback;
++ stream->state_callback = state_callback;
++ stream->user_ptr = user_ptr;
++
++ if ((stream->fd = open(CUBEB_OSS_DEFAULT_OUTPUT, O_WRONLY)) == -1) {
++ free(stream);
++ return CUBEB_ERROR;
++ }
++#define SET(what, to) do { unsigned int i = to; \
++ int j = ioctl(stream->fd, what, &i); \
++ if (j == -1 || i != to) { \
++ close(stream->fd); \
++ free(stream); \
++ return CUBEB_ERROR_INVALID_FORMAT; } } while (0)
++
++ stream->params = stream_params;
++ stream->volume = 1.0;
++ stream->panning = 0.0;
++
++ oss_try_set_latency(stream, latency);
++
++ stream->floating = 0;
++ SET(SNDCTL_DSP_CHANNELS, stream_params.channels);
++ SET(SNDCTL_DSP_SPEED, stream_params.rate);
++ switch (stream_params.format) {
++ case CUBEB_SAMPLE_S16LE:
++ SET(SNDCTL_DSP_SETFMT, AFMT_S16_LE);
++ break;
++ case CUBEB_SAMPLE_S16BE:
++ SET(SNDCTL_DSP_SETFMT, AFMT_S16_BE);
++ break;
++ case CUBEB_SAMPLE_FLOAT32LE:
++ SET(SNDCTL_DSP_SETFMT, AFMT_S16_NE);
++ stream->floating = 1;
++ break;
++ default:
++ close(stream->fd);
++ free(stream);
++ return CUBEB_ERROR;
++ }
++
++
++ pthread_mutex_init(&stream->state_mutex, NULL);
++ pthread_cond_init(&stream->state_cond, NULL);
++
++ stream->running = 1;
++ stream->stopped = 1;
++ stream->position_bytes = 0;
++ stream->last_position_bytes = 0;
++ stream->written_frags = 0;
++ stream->missed_frags = 0;
++
++ pthread_create(&stream->th, NULL, writer, (void*)stream);
++
++ *stm = stream;
++
++ return CUBEB_OK;
++}
++
++static void oss_stream_destroy(cubeb_stream * stream)
++{
++ pthread_mutex_lock(&stream->state_mutex);
++
++ stream->running = 0;
++ stream->stopped = 0;
++ pthread_cond_signal(&stream->state_cond);
++
++ pthread_mutex_unlock(&stream->state_mutex);
++
++ pthread_join(stream->th, NULL);
++
++ pthread_mutex_destroy(&stream->state_mutex);
++ pthread_cond_destroy(&stream->state_cond);
++ close(stream->fd);
++ free(stream);
++}
++
++static int oss_stream_get_latency(cubeb_stream * stream, uint32_t * latency)
++{
++ if (ioctl(stream->fd, SNDCTL_DSP_GETODELAY, latency)==-1) {
++ return CUBEB_ERROR;
++ }
++ /* Convert latency from bytes to frames */
++ *latency /= stream->params.channels*sizeof(int16_t);
++ return CUBEB_OK;
++}
++
++
++static int oss_stream_current_optr(cubeb_stream * stream, uint64_t * position)
++{
++ count_info ci;
++ /* Unfortunately, this ioctl is only available in OSS 4.x */
++#ifdef SNDCTL_DSP_CURRENT_OPTR
++ oss_count_t count;
++ if (ioctl(stream->fd, SNDCTL_DSP_CURRENT_OPTR, &count) != -1) {
++ *position = count.samples;// + count.fifo_samples;
++ return CUBEB_OK;
++ }
++#endif
++ /* Fall back to this ioctl in case the previous one fails */
++ if (ioctl(stream->fd, SNDCTL_DSP_GETOPTR, &ci) == -1) {
++ return CUBEB_ERROR;
++ }
++ /* ci.bytes is only 32 bit and will start to wrap after arithmetic overflow */
++ stream->position_bytes += ci.bytes - stream->last_position_bytes;
++ stream->last_position_bytes = ci.bytes;
++ *position = stream->position_bytes/stream->params.channels/sizeof(int16_t);
++ return CUBEB_OK;
++}
++
++static int oss_stream_get_position(cubeb_stream * stream, uint64_t * position)
++{
++ if ( oss_stream_current_optr(stream, position) == CUBEB_OK ){
++ *position -= stream->missed_frags;
++ return CUBEB_OK;
++ }
++ /* If no correct method to get position works we resort to this */
++ *position = stream->written_frags;
++ return CUBEB_OK;
++}
++
++
++static int oss_stream_start(cubeb_stream * stream)
++{
++ pthread_mutex_lock(&stream->state_mutex);
++ if (stream->stopped) {
++ uint64_t ptr;
++ oss_stream_current_optr(stream, &ptr);
++ stream->missed_frags = ptr - stream->written_frags;
++ stream->stopped = 0;
++ pthread_cond_signal(&stream->state_cond);
++ }
++ pthread_mutex_unlock(&stream->state_mutex);
++ return CUBEB_OK;
++}
++
++static int oss_stream_stop(cubeb_stream * stream)
++{
++ pthread_mutex_lock(&stream->state_mutex);
++ stream->stopped = 1;
++ pthread_mutex_unlock(&stream->state_mutex);
++ return CUBEB_OK;
++}
++
++int oss_stream_set_panning(cubeb_stream * stream, float panning)
++{
++ if (stream->params.channels == 2) {
++ stream->panning=panning;
++ }
++ return CUBEB_OK;
++}
++
++int oss_stream_set_volume(cubeb_stream * stream, float volume)
++{
++ stream->volume=volume;
++ return CUBEB_OK;
++}
++
++static struct cubeb_ops const oss_ops = {
++ .init = oss_init,
++ .get_backend_id = oss_get_backend_id,
++ .get_max_channel_count = oss_get_max_channel_count,
++ .get_min_latency = oss_get_min_latency,
++ .get_preferred_sample_rate = oss_get_preferred_sample_rate,
++ .destroy = oss_destroy,
++ .stream_init = oss_stream_init,
++ .stream_destroy = oss_stream_destroy,
++ .stream_start = oss_stream_start,
++ .stream_stop = oss_stream_stop,
++ .stream_get_position = oss_stream_get_position,
++ .stream_get_latency = oss_stream_get_latency,
++ .stream_set_volume = oss_stream_set_volume,
++ .stream_set_panning = oss_stream_set_panning,
++ .stream_get_current_device = NULL,
++ .stream_device_destroy = NULL,
++ .stream_register_device_changed_callback = NULL
++};
+diff --git media/libcubeb/src/moz.build media/libcubeb/src/moz.build
+index 8b7a0dd..31212ce 100644
+--- media/libcubeb/src/moz.build
++++ media/libcubeb/src/moz.build
+@@ -17,6 +17,12 @@ if CONFIG['MOZ_ALSA']:
+ ]
+ DEFINES['USE_ALSA'] = True
+
++if CONFIG['MOZ_OSS']:
++ SOURCES += [
++ 'cubeb_oss.c',
++ ]
++ DEFINES['USE_OSS'] = True
++
+ if CONFIG['MOZ_PULSEAUDIO']:
+ SOURCES += [
+ 'cubeb_pulse.c',
+@@ -75,5 +81,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+
+ FAIL_ON_WARNINGS = True
+
++CFLAGS += CONFIG['MOZ_OSS_CFLAGS']
+ CFLAGS += CONFIG['MOZ_ALSA_CFLAGS']
+ CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS']
+diff --git media/webrtc/signaling/test/moz.build media/webrtc/signaling/test/moz.build
+index 991f03f..3d99eb5 100644
+--- media/webrtc/signaling/test/moz.build
++++ media/webrtc/signaling/test/moz.build
+@@ -112,8 +112,8 @@ if CONFIG['JS_SHARED_LIBRARY']:
+ OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS']
+ OS_LIBS += CONFIG['REALTIME_LIBS']
+
+-if CONFIG['MOZ_ALSA']:
+- OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
++if CONFIG['MOZ_OSS']:
++ OS_LIBS += CONFIG['MOZ_OSS_LIBS']
+
+ if CONFIG['MOZ_NATIVE_JPEG']:
+ OS_LIBS += CONFIG['MOZ_JPEG_LIBS']
+diff --git toolkit/library/moz.build toolkit/library/moz.build
+index e191f13..4fb268a 100644
+--- toolkit/library/moz.build
++++ toolkit/library/moz.build
+@@ -234,8 +234,8 @@ if CONFIG['MOZ_NATIVE_LIBVPX']:
+ if not CONFIG['MOZ_TREE_PIXMAN']:
+ OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']
+
+-if CONFIG['MOZ_ALSA']:
+- OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
++if CONFIG['MOZ_OSS']:
++ OS_LIBS += CONFIG['MOZ_OSS_LIBS']
+
+ if CONFIG['HAVE_CLOCK_MONOTONIC']:
+ OS_LIBS += CONFIG['REALTIME_LIBS']
Property changes on: trunk/www/libxul/files/patch-bug1021761
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug1026499
===================================================================
--- trunk/www/libxul/files/patch-bug1026499 (rev 0)
+++ trunk/www/libxul/files/patch-bug1026499 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,68 @@
+commit 8d0efe4
+Author: Martin Husemann <martin at NetBSD.org>
+Date: Wed Jun 18 18:12:22 2014 +0200
+
+ Bug 1026499 - Use MOZ_ALIGNED_DECL to declare union members in ipdl value declarations. r=bsmedberg
+---
+ ipc/ipdl/ipdl/cxx/ast.py | 7 ++++---
+ ipc/ipdl/ipdl/cxx/cgen.py | 5 ++++-
+ ipc/ipdl/ipdl/lower.py | 2 +-
+ 4 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git ipc/ipdl/ipdl/cxx/ast.py ipc/ipdl/ipdl/cxx/ast.py
+index 3180a65..c2d945b 100644
+--- ipc/ipdl/ipdl/cxx/ast.py
++++ ipc/ipdl/ipdl/cxx/ast.py
+@@ -336,12 +336,13 @@ Type.VOID = Type('void')
+ Type.VOIDPTR = Type('void', ptr=1)
+
+ class TypeArray(Node):
+- def __init__(self, basetype, nmemb):
+- '''the type |basetype DECLNAME[nmemb]|. |nmemb| is an Expr'''
++ def __init__(self, basetype, nmemb, alignType):
++ '''the type |basetype DECLNAME[nmemb]|. |nmemb| is an Expr, |alignType| is a type'''
+ self.basetype = basetype
+ self.nmemb = nmemb
++ self.alignType = alignType
+ def __deepcopy__(self, memo):
+- return TypeArray(deepcopy(self.basetype, memo), nmemb)
++ return TypeArray(deepcopy(self.basetype, memo), nmemb, alignType)
+
+ class TypeEnum(Node):
+ def __init__(self, name=None):
+diff --git ipc/ipdl/ipdl/cxx/cgen.py ipc/ipdl/ipdl/cxx/cgen.py
+index 48b0988..bc914cf 100644
+--- ipc/ipdl/ipdl/cxx/cgen.py
++++ ipc/ipdl/ipdl/cxx/cgen.py
+@@ -101,6 +101,7 @@ class CxxCodeGen(CodePrinter, Visitor):
+ def visitDecl(self, d):
+ # C-syntax arrays make code generation much more annoying
+ if isinstance(d.type, TypeArray):
++ self.write('MOZ_ALIGNED_DECL(')
+ d.type.basetype.accept(self)
+ else:
+ d.type.accept(self)
+@@ -111,7 +112,9 @@ class CxxCodeGen(CodePrinter, Visitor):
+ if isinstance(d.type, TypeArray):
+ self.write('[')
+ d.type.nmemb.accept(self)
+- self.write(']')
++ self.write('], MOZ_ALIGNOF(')
++ d.type.alignType.accept(self)
++ self.write('))')
+
+ def visitParam(self, p):
+ self.visitDecl(p)
+diff --git ipc/ipdl/ipdl/lower.py ipc/ipdl/ipdl/lower.py
+index e97a34c..9360f3c 100644
+--- ipc/ipdl/ipdl/lower.py
++++ ipc/ipdl/ipdl/lower.py
+@@ -768,7 +768,7 @@ IPDL union type."""
+ if self.recursive:
+ return self.ptrToType()
+ else:
+- return TypeArray(Type('char'), ExprSizeof(self.internalType()))
++ return TypeArray(Type('char'), ExprSizeof(self.internalType()), self.internalType())
+
+ def unionValue(self):
+ # NB: knows that Union's storage C union is named |mValue|
Property changes on: trunk/www/libxul/files/patch-bug1026499
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug1041268
===================================================================
--- trunk/www/libxul/files/patch-bug1041268 (rev 0)
+++ trunk/www/libxul/files/patch-bug1041268 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,26 @@
+diff --git media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.cc media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.cc
+index 97f69d3..77a50b3 100644
+--- media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.cc
++++ media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.cc
+@@ -18,7 +18,7 @@ ScreenCapturer* ScreenCapturer::Create() {
+ return Create(DesktopCaptureOptions::CreateDefault());
+ }
+
+-#if defined(WEBRTC_LINUX)
++#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
+ ScreenCapturer* ScreenCapturer::CreateWithXDamage(
+ bool use_update_notifications) {
+ DesktopCaptureOptions options;
+diff --git media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.h media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.h
+index a8d40a7..177a6c1 100644
+--- media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.h
++++ media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.h
+@@ -74,7 +74,7 @@ class ScreenCapturer : public DesktopCapturer {
+ static ScreenCapturer* Create(const DesktopCaptureOptions& options);
+ static ScreenCapturer* Create();
+
+-#if defined(WEBRTC_LINUX)
++#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
+ // Creates platform-specific capturer and instructs it whether it should use
+ // X DAMAGE support.
+ static ScreenCapturer* CreateWithXDamage(bool use_x_damage);
Property changes on: trunk/www/libxul/files/patch-bug1041268
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug1073117
===================================================================
--- trunk/www/libxul/files/patch-bug1073117 (rev 0)
+++ trunk/www/libxul/files/patch-bug1073117 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,877 @@
+diff --git widget/gtk/gtk2drawing.c widget/gtk/gtk2drawing.c
+index 34f22af..1b950ab 100644
+--- widget/gtk/gtk2drawing.c
++++ widget/gtk/gtk2drawing.c
+@@ -831,7 +831,7 @@ moz_gtk_get_focus_outline_size(gint* focus_h_width, gint* focus_v_width)
+ return MOZ_GTK_SUCCESS;
+ }
+
+-gint
++static gint
+ moz_gtk_widget_get_focus(GtkWidget* widget, gboolean* interior_focus,
+ gint* focus_width, gint* focus_pad)
+ {
+@@ -928,7 +928,7 @@ moz_gtk_splitter_get_metrics(gint orientation, gint* size)
+ return MOZ_GTK_SUCCESS;
+ }
+
+-gint
++static gint
+ moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border)
+ {
+ static const GtkBorder default_inner_border = { 1, 1, 1, 1 };
+diff --git widget/gtk/gtk3drawing.c widget/gtk/gtk3drawing.c
+index 08a58d6..7fef6fa 100644
+--- widget/gtk/gtk3drawing.c
++++ widget/gtk/gtk3drawing.c
+@@ -65,6 +65,7 @@ static GtkWidget* gScrolledWindowWidget;
+ static style_prop_t style_prop_func;
+ static gboolean have_arrow_scaling;
+ static gboolean checkbox_check_state;
++static gboolean notebook_has_tab_gap;
+ static gboolean is_initialized;
+
+ #define ARROW_UP 0
+@@ -725,6 +726,14 @@ moz_gtk_init()
+ else
+ checkbox_check_state = GTK_STATE_FLAG_ACTIVE;
+
++ if(!gtk_check_version(3, 12, 0)) {
++ ensure_tab_widget();
++ gtk_widget_style_get(gTabWidget, "has-tab-gap", ¬ebook_has_tab_gap, NULL);
++ }
++ else {
++ notebook_has_tab_gap = TRUE;
++ }
++
+ /* Add style property to GtkEntry.
+ * Adding the style property to the normal GtkEntry class means that it
+ * will work without issues inside GtkComboBox and for Spinbuttons. */
+@@ -762,37 +771,17 @@ moz_gtk_radio_get_metrics(gint* indicator_size, gint* indicator_spacing)
+ gint
+ moz_gtk_get_focus_outline_size(gint* focus_h_width, gint* focus_v_width)
+ {
+- gboolean interior_focus;
+- gint focus_width = 0;
++ GtkBorder border;
++ GtkBorder padding;
++ GtkStyleContext *style;
+
+ ensure_entry_widget();
+- gtk_widget_style_get(gEntryWidget,
+- "interior-focus", &interior_focus,
+- "focus-line-width", &focus_width,
+- NULL);
+- if (interior_focus) {
+- GtkBorder border;
+- GtkStyleContext *style = gtk_widget_get_style_context(gEntryWidget);
+- gtk_style_context_get_border(style, 0, &border);
+- *focus_h_width = border.left + focus_width;
+- *focus_v_width = border.top + focus_width;
+- } else {
+- *focus_h_width = focus_width;
+- *focus_v_width = focus_width;
+- }
+- return MOZ_GTK_SUCCESS;
+-}
+-
+-gint
+-moz_gtk_widget_get_focus(GtkWidget* widget, gboolean* interior_focus,
+- gint* focus_width, gint* focus_pad)
+-{
+- gtk_widget_style_get (widget,
+- "interior-focus", interior_focus,
+- "focus-line-width", focus_width,
+- "focus-padding", focus_pad,
+- NULL);
++ style = gtk_widget_get_style_context(gEntryWidget);
+
++ gtk_style_context_get_border(style, 0, &border);
++ gtk_style_context_get_padding(style, 0, &padding);
++ *focus_h_width = border.left + padding.left;
++ *focus_v_width = border.top + padding.top;
+ return MOZ_GTK_SUCCESS;
+ }
+
+@@ -880,24 +860,6 @@ moz_gtk_splitter_get_metrics(gint orientation, gint* size)
+ return MOZ_GTK_SUCCESS;
+ }
+
+-gint
+-moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border)
+-{
+- static const GtkBorder default_inner_border = { 1, 1, 1, 1 };
+- GtkBorder *tmp_border;
+-
+- gtk_widget_style_get (widget, "inner-border", &tmp_border, NULL);
+-
+- if (tmp_border) {
+- *inner_border = *tmp_border;
+- gtk_border_free(tmp_border);
+- }
+- else
+- *inner_border = default_inner_border;
+-
+- return MOZ_GTK_SUCCESS;
+-}
+-
+ static gint
+ moz_gtk_button_paint(cairo_t *cr, GdkRectangle* rect,
+ GtkWidgetState* state,
+@@ -908,19 +870,8 @@ moz_gtk_button_paint(cairo_t *cr, GdkRectangle* rect,
+ GtkStyleContext* style = gtk_widget_get_style_context(widget);
+ gint x = rect->x, y=rect->y, width=rect->width, height=rect->height;
+
+- gboolean interior_focus;
+- gint focus_width, focus_pad;
+-
+- moz_gtk_widget_get_focus(widget, &interior_focus, &focus_width, &focus_pad);
+ gtk_widget_set_direction(widget, direction);
+-
+- if (!interior_focus && state->focused) {
+- x += focus_width + focus_pad;
+- y += focus_width + focus_pad;
+- width -= 2 * (focus_width + focus_pad);
+- height -= 2 * (focus_width + focus_pad);
+- }
+-
++
+ gtk_style_context_save(style);
+ gtk_style_context_set_state(style, state_flags);
+
+@@ -953,20 +904,12 @@ moz_gtk_button_paint(cairo_t *cr, GdkRectangle* rect,
+ }
+
+ if (state->focused) {
+- if (interior_focus) {
+- GtkBorder border;
+- gtk_style_context_get_border(style, state_flags, &border);
+- x += border.left + focus_pad;
+- y += border.top + focus_pad;
+- width -= 2 * (border.left + focus_pad);
+- height -= 2 * (border.top + focus_pad);
+- } else {
+- x -= focus_width + focus_pad;
+- y -= focus_width + focus_pad;
+- width += 2 * (focus_width + focus_pad);
+- height += 2 * (focus_width + focus_pad);
+- }
+-
++ GtkBorder border;
++ gtk_style_context_get_border(style, state_flags, &border);
++ x += border.left;
++ y += border.top;
++ width -= (border.left + border.right);
++ height -= (border.top + border.bottom);
+ gtk_render_focus(style, cr, x, y, width, height);
+ }
+ gtk_style_context_restore(style);
+@@ -1056,33 +999,23 @@ calculate_button_inner_rect(GtkWidget* button, GdkRectangle* rect,
+ GtkTextDirection direction,
+ gboolean ignore_focus)
+ {
+- GtkBorder inner_border;
+- gboolean interior_focus;
+- gint focus_width, focus_pad;
+ GtkStyleContext* style;
+ GtkBorder border;
++ GtkBorder padding = {0, 0, 0, 0};
+
+ style = gtk_widget_get_style_context(button);
+
+ /* This mirrors gtkbutton's child positioning */
+- moz_gtk_button_get_inner_border(button, &inner_border);
+- moz_gtk_widget_get_focus(button, &interior_focus,
+- &focus_width, &focus_pad);
+-
+- if (ignore_focus)
+- focus_width = focus_pad = 0;
+-
+ gtk_style_context_get_border(style, 0, &border);
++ if (!ignore_focus)
++ gtk_style_context_get_padding(style, 0, &padding);
+
+- inner_rect->x = rect->x + border.left + focus_width + focus_pad;
+- inner_rect->x += direction == GTK_TEXT_DIR_LTR ?
+- inner_border.left : inner_border.right;
+- inner_rect->y = rect->y + inner_border.top + border.top +
+- focus_width + focus_pad;
+- inner_rect->width = MAX(1, rect->width - inner_border.left -
+- inner_border.right - (border.left + focus_pad + focus_width) * 2);
+- inner_rect->height = MAX(1, rect->height - inner_border.top -
+- inner_border.bottom - (border.top + focus_pad + focus_width) * 2);
++ inner_rect->x = rect->x + border.left + padding.left;
++ inner_rect->y = rect->y + padding.top + border.top;
++ inner_rect->width = MAX(1, rect->width - padding.left -
++ padding.right - border.left * 2);
++ inner_rect->height = MAX(1, rect->height - padding.top -
++ padding.bottom - border.top * 2);
+
+ return MOZ_GTK_SUCCESS;
+ }
+@@ -1457,19 +1390,12 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRectangle* rect,
+ {
+ gint x = rect->x, y = rect->y, width = rect->width, height = rect->height;
+ GtkStyleContext* style;
+- gboolean interior_focus;
+- gint focus_width;
+ int draw_focus_outline_only = state->depressed; // NS_THEME_FOCUS_OUTLINE
+
+ gtk_widget_set_direction(widget, direction);
+
+ style = gtk_widget_get_style_context(widget);
+
+- gtk_widget_style_get(widget,
+- "interior-focus", &interior_focus,
+- "focus-line-width", &focus_width,
+- NULL);
+-
+ if (draw_focus_outline_only) {
+ // Inflate the given 'rect' with the focus outline size.
+ gint h, v;
+@@ -1501,14 +1427,6 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRectangle* rect,
+ /* This will get us the lit borders that focused textboxes enjoy on
+ * some themes. */
+ gtk_style_context_set_state(style, GTK_STATE_FLAG_FOCUSED);
+- if (!interior_focus) {
+- /* Indent the border a little bit if we have exterior focus
+- (this is what GTK does to draw native entries) */
+- x += focus_width;
+- y += focus_width;
+- width -= 2 * focus_width;
+- height -= 2 * focus_width;
+- }
+ }
+
+ if (state->disabled) {
+@@ -1520,11 +1438,6 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRectangle* rect,
+ }
+ gtk_render_frame(style, cr, x, y, width, height);
+
+- if (state->focused && !state->disabled) {
+- if (!interior_focus) {
+- gtk_render_focus(style, cr, rect->x, rect->y, rect->width, rect->height);
+- }
+- }
+ gtk_style_context_restore(style);
+
+ return MOZ_GTK_SUCCESS;
+@@ -1829,8 +1742,6 @@ moz_gtk_container_paint(cairo_t *cr, GdkRectangle* rect,
+ GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state);
+ GtkStyleContext* style;
+ GtkWidget *widget;
+- gboolean interior_focus;
+- gint focus_width, focus_pad;
+
+ if (isradio) {
+ ensure_radiobutton_widget();
+@@ -1843,7 +1754,6 @@ moz_gtk_container_paint(cairo_t *cr, GdkRectangle* rect,
+
+ style = gtk_widget_get_style_context(widget);
+ gtk_style_context_save(style);
+- moz_gtk_widget_get_focus(widget, &interior_focus, &focus_width, &focus_pad);
+ gtk_style_context_set_state(style, state_flags);
+
+ /* this is for drawing a prelight box */
+@@ -1852,10 +1762,6 @@ moz_gtk_container_paint(cairo_t *cr, GdkRectangle* rect,
+ rect->x, rect->y, rect->width, rect->height);
+ }
+
+- if (state->focused && !interior_focus) {
+- gtk_render_focus(style, cr,
+- rect->x, rect->y, rect->width, rect->height);
+- }
+ gtk_style_context_restore(style);
+
+ return MOZ_GTK_SUCCESS;
+@@ -1868,7 +1774,6 @@ moz_gtk_toggle_label_paint(cairo_t *cr, GdkRectangle* rect,
+ {
+ GtkStyleContext *style;
+ GtkWidget *widget;
+- gboolean interior_focus;
+
+ if (!state->focused)
+ return MOZ_GTK_SUCCESS;
+@@ -1889,10 +1794,6 @@ moz_gtk_toggle_label_paint(cairo_t *cr, GdkRectangle* rect,
+ }
+ gtk_widget_set_direction(widget, direction);
+
+- gtk_widget_style_get(widget, "interior-focus", &interior_focus, NULL);
+- if (!interior_focus)
+- return MOZ_GTK_SUCCESS;
+-
+ gtk_style_context_set_state(style, GetStateFlagsFromGtkWidgetState(state));
+ gtk_render_focus(style, cr,
+ rect->x, rect->y, rect->width, rect->height);
+@@ -2105,6 +2015,9 @@ moz_gtk_get_tab_thickness(void)
+ GtkStyleContext * style;
+
+ ensure_tab_widget();
++ if (!notebook_has_tab_gap)
++ return 0; /* tabs do not overdraw the tabpanel border with "no gap" style */
++
+ style = gtk_widget_get_style_context(gTabWidget);
+ gtk_style_context_add_class(style, GTK_STYLE_CLASS_NOTEBOOK);
+ gtk_style_context_get_border(style, 0, &border);
+@@ -2150,7 +2063,7 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectangle* rect,
+ ensure_tab_widget();
+ gtk_widget_set_direction(gTabWidget, direction);
+
+- style = gtk_widget_get_style_context(gTabWidget);
++ style = gtk_widget_get_style_context(gTabWidget);
+ gtk_style_context_save(style);
+ moz_gtk_tab_prepare_style_context(style, flags);
+
+@@ -2167,143 +2080,155 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectangle* rect,
+
+ focusRect = backRect = tabRect;
+
+- if ((flags & MOZ_GTK_TAB_SELECTED) == 0) {
+- /* Only draw the tab */
+- gtk_render_extension(style, cr,
+- tabRect.x, tabRect.y, tabRect.width, tabRect.height,
+- (flags & MOZ_GTK_TAB_BOTTOM) ?
+- GTK_POS_TOP : GTK_POS_BOTTOM );
+- } else {
+- /* Draw the tab and the gap
+- * We want the gap to be positioned exactly on the tabpanel top
+- * border; since tabbox.css may set a negative margin so that the tab
+- * frame rect already overlaps the tabpanel frame rect, we need to take
+- * that into account when drawing. To that effect, nsNativeThemeGTK
+- * passes us this negative margin (bmargin in the graphic below) in the
+- * lowest bits of |flags|. We use it to set gap_voffset, the distance
+- * between the top of the gap and the bottom of the tab (resp. the
+- * bottom of the gap and the top of the tab when we draw a bottom tab),
+- * while ensuring that the gap always touches the border of the tab,
+- * i.e. 0 <= gap_voffset <= gap_height, to avoid surprinsing results
+- * with big negative or positive margins.
+- * Here is a graphical explanation in the case of top tabs:
+- * ___________________________
+- * / \
+- * | T A B |
+- * ----------|. . . . . . . . . . . . . . .|----- top of tabpanel
+- * : ^ bmargin : ^
+- * : | (-negative margin, : |
+- * bottom : v passed in flags) : | gap_height
+- * of -> :.............................: | (the size of the
+- * the tab . part of the gap . | tabpanel top border)
+- * . outside of the tab . v
+- * ----------------------------------------------
+- *
+- * To draw the gap, we use gtk_paint_box_gap(), see comment in
+- * moz_gtk_tabpanels_paint(). This box_gap is made 3 * gap_height tall,
+- * which should suffice to ensure that the only visible border is the
+- * pierced one. If the tab is in the middle, we make the box_gap begin
+- * a bit to the left of the tab and end a bit to the right, adjusting
+- * the gap position so it still is under the tab, because we want the
+- * rendering of a gap in the middle of a tabpanel. This is the role of
+- * the gints gap_{l,r}_offset. On the contrary, if the tab is the
+- * first, we align the start border of the box_gap with the start
+- * border of the tab (left if LTR, right if RTL), by setting the
+- * appropriate offset to 0.*/
+- gint gap_loffset, gap_roffset, gap_voffset, gap_height;
+-
+- /* Get height needed by the gap */
+- gap_height = moz_gtk_get_tab_thickness();
+-
+- /* Extract gap_voffset from the first bits of flags */
+- gap_voffset = flags & MOZ_GTK_TAB_MARGIN_MASK;
+- if (gap_voffset > gap_height)
+- gap_voffset = gap_height;
+-
+- /* Set gap_{l,r}_offset to appropriate values */
+- gap_loffset = gap_roffset = 20; /* should be enough */
+- if (flags & MOZ_GTK_TAB_FIRST) {
+- if (direction == GTK_TEXT_DIR_RTL)
+- gap_roffset = initial_gap;
+- else
+- gap_loffset = initial_gap;
+- }
+-
+- if (flags & MOZ_GTK_TAB_BOTTOM) {
+- /* Draw the tab on bottom */
+- focusRect.y += gap_voffset;
+- focusRect.height -= gap_voffset;
+-
++ if (notebook_has_tab_gap) {
++ if ((flags & MOZ_GTK_TAB_SELECTED) == 0) {
++ /* Only draw the tab */
+ gtk_render_extension(style, cr,
+- tabRect.x, tabRect.y + gap_voffset, tabRect.width,
+- tabRect.height - gap_voffset, GTK_POS_TOP);
+-
+- gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB);
+-
+- backRect.y += (gap_voffset - gap_height);
+- backRect.height = gap_height;
+-
+- /* Draw the gap; erase with background color before painting in
+- * case theme does not */
+- gtk_render_background(style, cr, backRect.x, backRect.y,
+- backRect.width, backRect.height);
+- cairo_save(cr);
+- cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height);
+- cairo_clip(cr);
+-
+- gtk_render_frame_gap(style, cr,
+- tabRect.x - gap_loffset,
+- tabRect.y + gap_voffset - 3 * gap_height,
+- tabRect.width + gap_loffset + gap_roffset,
+- 3 * gap_height, GTK_POS_BOTTOM,
+- gap_loffset, gap_loffset + tabRect.width);
+- cairo_restore(cr);
++ tabRect.x, tabRect.y, tabRect.width, tabRect.height,
++ (flags & MOZ_GTK_TAB_BOTTOM) ?
++ GTK_POS_TOP : GTK_POS_BOTTOM );
+ } else {
+- /* Draw the tab on top */
+- focusRect.height -= gap_voffset;
+- gtk_render_extension(style, cr,
+- tabRect.x, tabRect.y, tabRect.width,
+- tabRect.height - gap_voffset, GTK_POS_BOTTOM);
+-
+- gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB);
+-
+- backRect.y += (tabRect.height - gap_voffset);
+- backRect.height = gap_height;
+-
+- /* Draw the gap; erase with background color before painting in
+- * case theme does not */
+- gtk_render_background(style, cr, backRect.x, backRect.y,
+- backRect.width, backRect.height);
+-
+- cairo_save(cr);
+- cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height);
+- cairo_clip(cr);
+-
+- gtk_render_frame_gap(style, cr,
+- tabRect.x - gap_loffset,
+- tabRect.y + tabRect.height - gap_voffset,
+- tabRect.width + gap_loffset + gap_roffset,
+- 3 * gap_height, GTK_POS_TOP,
+- gap_loffset, gap_loffset + tabRect.width);
+- cairo_restore(cr);
++ /* Draw the tab and the gap
++ * We want the gap to be positioned exactly on the tabpanel top
++ * border; since tabbox.css may set a negative margin so that the tab
++ * frame rect already overlaps the tabpanel frame rect, we need to take
++ * that into account when drawing. To that effect, nsNativeThemeGTK
++ * passes us this negative margin (bmargin in the graphic below) in the
++ * lowest bits of |flags|. We use it to set gap_voffset, the distance
++ * between the top of the gap and the bottom of the tab (resp. the
++ * bottom of the gap and the top of the tab when we draw a bottom tab),
++ * while ensuring that the gap always touches the border of the tab,
++ * i.e. 0 <= gap_voffset <= gap_height, to avoid surprinsing results
++ * with big negative or positive margins.
++ * Here is a graphical explanation in the case of top tabs:
++ * ___________________________
++ * / \
++ * | T A B |
++ * ----------|. . . . . . . . . . . . . . .|----- top of tabpanel
++ * : ^ bmargin : ^
++ * : | (-negative margin, : |
++ * bottom : v passed in flags) : | gap_height
++ * of -> :.............................: | (the size of the
++ * the tab . part of the gap . | tabpanel top border)
++ * . outside of the tab . v
++ * ----------------------------------------------
++ *
++ * To draw the gap, we use gtk_paint_box_gap(), see comment in
++ * moz_gtk_tabpanels_paint(). This box_gap is made 3 * gap_height tall,
++ * which should suffice to ensure that the only visible border is the
++ * pierced one. If the tab is in the middle, we make the box_gap begin
++ * a bit to the left of the tab and end a bit to the right, adjusting
++ * the gap position so it still is under the tab, because we want the
++ * rendering of a gap in the middle of a tabpanel. This is the role of
++ * the gints gap_{l,r}_offset. On the contrary, if the tab is the
++ * first, we align the start border of the box_gap with the start
++ * border of the tab (left if LTR, right if RTL), by setting the
++ * appropriate offset to 0.*/
++ gint gap_loffset, gap_roffset, gap_voffset, gap_height;
++
++ /* Get height needed by the gap */
++ gap_height = moz_gtk_get_tab_thickness();
++
++ /* Extract gap_voffset from the first bits of flags */
++ gap_voffset = flags & MOZ_GTK_TAB_MARGIN_MASK;
++ if (gap_voffset > gap_height)
++ gap_voffset = gap_height;
++
++ /* Set gap_{l,r}_offset to appropriate values */
++ gap_loffset = gap_roffset = 20; /* should be enough */
++ if (flags & MOZ_GTK_TAB_FIRST) {
++ if (direction == GTK_TEXT_DIR_RTL)
++ gap_roffset = initial_gap;
++ else
++ gap_loffset = initial_gap;
++ }
++
++ if (flags & MOZ_GTK_TAB_BOTTOM) {
++ /* Draw the tab on bottom */
++ focusRect.y += gap_voffset;
++ focusRect.height -= gap_voffset;
++
++ gtk_render_extension(style, cr,
++ tabRect.x, tabRect.y + gap_voffset, tabRect.width,
++ tabRect.height - gap_voffset, GTK_POS_TOP);
++
++ gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB);
++
++ backRect.y += (gap_voffset - gap_height);
++ backRect.height = gap_height;
++
++ /* Draw the gap; erase with background color before painting in
++ * case theme does not */
++ gtk_render_background(style, cr, backRect.x, backRect.y,
++ backRect.width, backRect.height);
++ cairo_save(cr);
++ cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height);
++ cairo_clip(cr);
++
++ gtk_render_frame_gap(style, cr,
++ tabRect.x - gap_loffset,
++ tabRect.y + gap_voffset - 3 * gap_height,
++ tabRect.width + gap_loffset + gap_roffset,
++ 3 * gap_height, GTK_POS_BOTTOM,
++ gap_loffset, gap_loffset + tabRect.width);
++ cairo_restore(cr);
++ } else {
++ /* Draw the tab on top */
++ focusRect.height -= gap_voffset;
++ gtk_render_extension(style, cr,
++ tabRect.x, tabRect.y, tabRect.width,
++ tabRect.height - gap_voffset, GTK_POS_BOTTOM);
++
++ gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB);
++
++ backRect.y += (tabRect.height - gap_voffset);
++ backRect.height = gap_height;
++
++ /* Draw the gap; erase with background color before painting in
++ * case theme does not */
++ gtk_render_background(style, cr, backRect.x, backRect.y,
++ backRect.width, backRect.height);
++
++ cairo_save(cr);
++ cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height);
++ cairo_clip(cr);
++
++ gtk_render_frame_gap(style, cr,
++ tabRect.x - gap_loffset,
++ tabRect.y + tabRect.height - gap_voffset,
++ tabRect.width + gap_loffset + gap_roffset,
++ 3 * gap_height, GTK_POS_TOP,
++ gap_loffset, gap_loffset + tabRect.width);
++ cairo_restore(cr);
++ }
+ }
++ } else {
++ gtk_render_background(style, cr, tabRect.x, tabRect.y, tabRect.width, tabRect.height);
++ gtk_render_frame(style, cr, tabRect.x, tabRect.y, tabRect.width, tabRect.height);
+ }
+
++ gtk_style_context_restore(style);
++
+ if (state->focused) {
+ /* Paint the focus ring */
+- GtkBorder border;
+- gtk_style_context_get_border(style, GetStateFlagsFromGtkWidgetState(state), &border);
++ GtkBorder padding;
++
++ gtk_style_context_save(style);
++ moz_gtk_tab_prepare_style_context(style, flags);
+
+- focusRect.x += border.left;
+- focusRect.width -= (border.left + border.right);
+- focusRect.y += border.top;
+- focusRect.height -= (border.top + border.bottom);
++ gtk_style_context_get_padding(style, GetStateFlagsFromGtkWidgetState(state), &padding);
++
++ focusRect.x += padding.left;
++ focusRect.width -= (padding.left + padding.right);
++ focusRect.y += padding.top;
++ focusRect.height -= (padding.top + padding.bottom);
+
+ gtk_render_focus(style, cr,
+ focusRect.x, focusRect.y, focusRect.width, focusRect.height);
++
++ gtk_style_context_restore(style);
+ }
+
+- gtk_style_context_restore(style);
+
+ return MOZ_GTK_SUCCESS;
+ }
+@@ -2684,26 +2609,18 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
+ switch (widget) {
+ case MOZ_GTK_BUTTON:
+ {
+- GtkBorder inner_border;
+- gboolean interior_focus;
+- gint focus_width, focus_pad;
+-
+ ensure_button_widget();
++ style = gtk_widget_get_style_context(gButtonWidget);
++
+ *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(gButtonWidget));
+
+ /* Don't add this padding in HTML, otherwise the buttons will
+ become too big and stuff the layout. */
+ if (!inhtml) {
+- moz_gtk_widget_get_focus(gButtonWidget, &interior_focus, &focus_width, &focus_pad);
+- moz_gtk_button_get_inner_border(gButtonWidget, &inner_border);
+- *left += focus_width + focus_pad + inner_border.left;
+- *right += focus_width + focus_pad + inner_border.right;
+- *top += focus_width + focus_pad + inner_border.top;
+- *bottom += focus_width + focus_pad + inner_border.bottom;
++ moz_gtk_add_style_padding(style, left, top, right, bottom);
+ }
+
+- moz_gtk_add_style_border(gtk_widget_get_style_context(gButtonWidget),
+- left, top, right, bottom);
++ moz_gtk_add_style_border(style, left, top, right, bottom);
+ return MOZ_GTK_SUCCESS;
+ }
+ case MOZ_GTK_ENTRY:
+@@ -2717,7 +2610,13 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
+ ensure_entry_widget();
+ style = gtk_widget_get_style_context(gEntryWidget);
+ moz_gtk_add_style_border(style, left, top, right, bottom);
+- moz_gtk_add_style_padding(style, left, top, right, bottom);
++
++ /* Use the document padding in HTML
++ and GTK style padding in XUL. */
++ if (!inhtml) {
++ moz_gtk_add_style_padding(style, left, top, right, bottom);
++ }
++
+ return MOZ_GTK_SUCCESS;
+ }
+ case MOZ_GTK_TREEVIEW:
+@@ -2737,23 +2636,15 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
+ * assigned.
+ * That is why the following code is the same as for MOZ_GTK_BUTTON.
+ * */
+-
+- GtkBorder inner_border;
+- gboolean interior_focus;
+- gint focus_width, focus_pad;
++ GtkStyleContext *style;
+
+ ensure_tree_header_cell_widget();
+ *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(gTreeHeaderCellWidget));
+
+- moz_gtk_widget_get_focus(gTreeHeaderCellWidget, &interior_focus, &focus_width, &focus_pad);
+- moz_gtk_button_get_inner_border(gTreeHeaderCellWidget, &inner_border);
+- *left += focus_width + focus_pad + inner_border.left;
+- *right += focus_width + focus_pad + inner_border.right;
+- *top += focus_width + focus_pad + inner_border.top;
+- *bottom += focus_width + focus_pad + inner_border.bottom;
+-
+- moz_gtk_add_style_border(gtk_widget_get_style_context(gTreeHeaderCellWidget),
+- left, top, right, bottom);
++ style = gtk_widget_get_style_context(gTreeHeaderCellWidget);
++
++ moz_gtk_add_style_border(style, left, top, right, bottom);
++ moz_gtk_add_style_padding(style, left, top, right, bottom);
+ return MOZ_GTK_SUCCESS;
+ }
+ case MOZ_GTK_TREE_HEADER_SORTARROW:
+@@ -2773,29 +2664,23 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
+ /* We need to account for the arrow on the dropdown, so text
+ * doesn't come too close to the arrow, or in some cases spill
+ * into the arrow. */
+- gboolean ignored_interior_focus, wide_separators;
+- gint focus_width, focus_pad, separator_width;
++ gboolean wide_separators;
++ gint separator_width;
+ GtkRequisition arrow_req;
+ GtkBorder border;
+
+ ensure_combo_box_widgets();
+
+- *left = gtk_container_get_border_width(GTK_CONTAINER(gComboBoxButtonWidget));
++ *left = *top = *right = *bottom =
++ gtk_container_get_border_width(GTK_CONTAINER(gComboBoxButtonWidget));
++
++ style = gtk_widget_get_style_context(gComboBoxButtonWidget);
+
+ if (!inhtml) {
+- moz_gtk_widget_get_focus(gComboBoxButtonWidget,
+- &ignored_interior_focus,
+- &focus_width, &focus_pad);
+- *left += focus_width + focus_pad;
++ moz_gtk_add_style_padding(style, left, top, right, bottom);
+ }
+
+- style = gtk_widget_get_style_context(gComboBoxButtonWidget);
+- gtk_style_context_get_border(style, 0, &border);
+-
+- *top = *left + border.top;
+- *left += border.left;
+-
+- *right = *left; *bottom = *top;
++ moz_gtk_add_style_border(style, left, top, right, bottom);
+
+ /* If there is no separator, don't try to count its width. */
+ separator_width = 0;
+@@ -2847,60 +2732,23 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
+ ensure_frame_widget();
+ w = gFrameWidget;
+ break;
+- case MOZ_GTK_CHECKBUTTON_LABEL:
+- case MOZ_GTK_RADIOBUTTON_LABEL:
+- {
+- gboolean interior_focus;
+- gint focus_width, focus_pad;
+-
+- /* If the focus is interior, then the label has a border of
+- (focus_width + focus_pad). */
+- if (widget == MOZ_GTK_CHECKBUTTON_LABEL) {
+- ensure_checkbox_widget();
+- moz_gtk_widget_get_focus(gCheckboxWidget, &interior_focus,
+- &focus_width, &focus_pad);
+- }
+- else {
+- ensure_radiobutton_widget();
+- moz_gtk_widget_get_focus(gRadiobuttonWidget, &interior_focus,
+- &focus_width, &focus_pad);
+- }
+-
+- if (interior_focus)
+- *left = *top = *right = *bottom = (focus_width + focus_pad);
+-
+- return MOZ_GTK_SUCCESS;
+- }
+-
+ case MOZ_GTK_CHECKBUTTON_CONTAINER:
+ case MOZ_GTK_RADIOBUTTON_CONTAINER:
+ {
+- gboolean interior_focus;
+- gint focus_width, focus_pad;
+-
+- /* If the focus is _not_ interior, then the container has a border
+- of (focus_width + focus_pad). */
+ if (widget == MOZ_GTK_CHECKBUTTON_CONTAINER) {
+ ensure_checkbox_widget();
+- moz_gtk_widget_get_focus(gCheckboxWidget, &interior_focus,
+- &focus_width, &focus_pad);
+ w = gCheckboxWidget;
+ } else {
+ ensure_radiobutton_widget();
+- moz_gtk_widget_get_focus(gRadiobuttonWidget, &interior_focus,
+- &focus_width, &focus_pad);
+ w = gRadiobuttonWidget;
+ }
++ style = gtk_widget_get_style_context(w);
+
+ *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(w));
+-
+- if (!interior_focus) {
+- *left += (focus_width + focus_pad);
+- *right += (focus_width + focus_pad);
+- *top += (focus_width + focus_pad);
+- *bottom += (focus_width + focus_pad);
+- }
+-
++ moz_gtk_add_style_border(style,
++ left, top, right, bottom);
++ moz_gtk_add_style_padding(style,
++ left, top, right, bottom);
+ return MOZ_GTK_SUCCESS;
+ }
+ case MOZ_GTK_MENUPOPUP:
+@@ -2927,6 +2775,8 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
+ return MOZ_GTK_SUCCESS;
+ }
+ /* These widgets have no borders, since they are not containers. */
++ case MOZ_GTK_CHECKBUTTON_LABEL:
++ case MOZ_GTK_RADIOBUTTON_LABEL:
+ case MOZ_GTK_SPLITTER_HORIZONTAL:
+ case MOZ_GTK_SPLITTER_VERTICAL:
+ case MOZ_GTK_CHECKBUTTON:
+@@ -2975,11 +2849,7 @@ moz_gtk_get_tab_border(gint* left, gint* top, gint* right, gint* bottom,
+ gtk_style_context_save(style);
+ moz_gtk_tab_prepare_style_context(style, flags);
+
+- // TODO add_style_border() should be replaced
+- // with focus-line-width and focus-padding
+- // see Bug 877605
+ *left = *top = *right = *bottom = 0;
+- moz_gtk_add_style_border(style, left, top, right, bottom);
+ moz_gtk_add_style_padding(style, left, top, right, bottom);
+
+ gtk_widget_style_get (gTabWidget, "tab-curvature", &tab_curvature, NULL);
+@@ -2990,16 +2860,9 @@ moz_gtk_get_tab_border(gint* left, gint* top, gint* right, gint* bottom,
+ int initial_gap;
+ gtk_widget_style_get (gTabWidget, "initial-gap", &initial_gap, NULL);
+ if (direction == GTK_TEXT_DIR_RTL)
+- *right += initial_gap;
++ *right += initial_gap;
+ else
+- *left += initial_gap;
+- }
+-
+- // Top tabs have no bottom border, bottom tabs have no top border
+- if (flags & MOZ_GTK_TAB_BOTTOM) {
+- *top = 0;
+- } else {
+- *bottom = 0;
++ *left += initial_gap;
+ }
+
+ gtk_style_context_restore(style);
+diff --git widget/gtk/gtkdrawing.h widget/gtk/gtkdrawing.h
+index 1938e8f..5f71cfd 100644
+--- widget/gtk/gtkdrawing.h
++++ widget/gtk/gtkdrawing.h
+@@ -293,16 +293,6 @@ moz_gtk_checkbox_get_metrics(gint* indicator_size, gint* indicator_spacing);
+ gint
+ moz_gtk_radio_get_metrics(gint* indicator_size, gint* indicator_spacing);
+
+-/**
+- * Get the inner-border value for a GtkButton widget (button or tree header)
+- * widget: [IN] the widget to get the border value for
+- * inner_border: [OUT] the inner border
+- *
+- * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise
+- */
+-gint
+-moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border);
+-
+ /** Get the extra size for the focus ring for outline:auto.
+ * widget: [IN] the widget to get the focus metrics for
+ * focus_h_width: [OUT] the horizontal width
+@@ -313,19 +303,6 @@ moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border);
+ gint
+ moz_gtk_get_focus_outline_size(gint* focus_h_width, gint* focus_v_width);
+
+-/** Get the focus metrics for a treeheadercell, button, checkbox, or radio button.
+- * widget: [IN] the widget to get the focus metrics for
+- * interior_focus: [OUT] whether the focus is drawn around the
+- * label (TRUE) or around the whole container (FALSE)
+- * focus_width: [OUT] the width of the focus line
+- * focus_pad: [OUT] the padding between the focus line and children
+- *
+- * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise
+- */
+-gint
+-moz_gtk_widget_get_focus(GtkWidget* widget, gboolean* interior_focus,
+- gint* focus_width, gint* focus_pad);
+-
+ /** Get the horizontal padding for the menuitem widget or checkmenuitem widget.
+ * horizontal_padding: [OUT] The left and right padding of the menuitem or checkmenuitem
+ *
+diff --git widget/gtk/nsNativeThemeGTK.cpp widget/gtk/nsNativeThemeGTK.cpp
+index e5e1867..76d28e3 100644
+--- widget/gtk/nsNativeThemeGTK.cpp
++++ widget/gtk/nsNativeThemeGTK.cpp
+@@ -761,6 +761,8 @@ nsNativeThemeGTK::GetExtraSizeForWidget(nsIFrame* aFrame, uint8_t aWidgetType,
+ return false;
+
+ gint gap_height = moz_gtk_get_tab_thickness();
++ if (!gap_height)
++ return false;
+
+ int32_t extra = gap_height - GetTabMarginPixels(aFrame);
+ if (extra <= 0)
Property changes on: trunk/www/libxul/files/patch-bug1073117
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug1130155
===================================================================
--- trunk/www/libxul/files/patch-bug1130155 (rev 0)
+++ trunk/www/libxul/files/patch-bug1130155 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,179 @@
+commit eab3e3a
+Author: Mikhail Teterin <mi at aldan.algebra.com>
+Date: Tue Dec 16 19:34:02 2014 -0800
+
+ Bug 1130155 - Avoid assert failures when consuming only part of buffer.
+---
+ media/libcubeb/src/cubeb_alsa.c | 112 ++++++++++++++++++++++++++++++----------
+ 1 file changed, 85 insertions(+), 27 deletions(-)
+
+diff --git media/libcubeb/src/cubeb_alsa.c media/libcubeb/src/cubeb_alsa.c
+index 9bbc129..e72944a 100644
+--- media/libcubeb/src/cubeb_alsa.c
++++ media/libcubeb/src/cubeb_alsa.c
+@@ -14,6 +14,8 @@
+ #include <limits.h>
+ #include <dlfcn.h>
+ #include <poll.h>
++#include <stdlib.h>
++#include <stdio.h>
+ #include <unistd.h>
+ #include <alsa/asoundlib.h>
+ #include "cubeb/cubeb.h"
+@@ -45,6 +47,7 @@ MAKE_TYPEDEF(snd_pcm_avail_update);
+ MAKE_TYPEDEF(snd_pcm_close);
+ MAKE_TYPEDEF(snd_pcm_delay);
+ MAKE_TYPEDEF(snd_pcm_drain);
++MAKE_TYPEDEF(snd_pcm_forward);
+ MAKE_TYPEDEF(snd_pcm_frames_to_bytes);
+ MAKE_TYPEDEF(snd_pcm_get_params);
+ /* snd_pcm_hw_params_alloca is actually a macro */
+@@ -305,32 +308,35 @@ alsa_refill_stream(cubeb_stream * stm)
+ long got;
+ void * p;
+ int draining;
++ unsigned pipefailures, againfailures;
+
+ draining = 0;
+
+ pthread_mutex_lock(&stm->mutex);
+
+- r = WRAP(snd_pcm_poll_descriptors_revents)(stm->pcm, stm->fds, stm->nfds, &revents);
+- if (r < 0 || revents != POLLOUT) {
+- /* This should be a stream error; it makes no sense for poll(2) to wake
+- for this stream and then have the stream report that it's not ready.
+- Unfortunately, this does happen, so just bail out and try again. */
+- pthread_mutex_unlock(&stm->mutex);
+- return RUNNING;
+- }
++ for (pipefailures = 0;;) {
++ r = WRAP(snd_pcm_poll_descriptors_revents)(stm->pcm, stm->fds, stm->nfds, &revents);
++ if (r < 0 || revents != POLLOUT ||
++ (avail = WRAP(snd_pcm_avail_update)(stm->pcm)) == 0) {
++ /* This should be a stream error; it makes no sense for poll(2) to wake
++ for this stream and then have the stream report that it's not ready.
++ Unfortunately, this does happen, so just bail out and try again. */
++ pthread_mutex_unlock(&stm->mutex);
++ return RUNNING;
++ }
+
+- avail = WRAP(snd_pcm_avail_update)(stm->pcm);
+- if (avail == -EPIPE) {
++ if (avail > 0)
++ break;
++ if (pipefailures++ > 11) {
++ fprintf(stderr, "%s: repeated failures from snd_pcm_avail_update, "
++ "giving up\n", __func__);
++ pthread_mutex_unlock(&stm->mutex);
++ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
++ return ERROR;
++ }
+ WRAP(snd_pcm_recover)(stm->pcm, avail, 1);
+- avail = WRAP(snd_pcm_avail_update)(stm->pcm);
+- }
+-
+- /* Failed to recover from an xrun, this stream must be broken. */
+- if (avail < 0) {
+- pthread_mutex_unlock(&stm->mutex);
+- stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
+- return ERROR;
+ }
++ pipefailures = againfailures = 0;
+
+ /* This should never happen. */
+ if ((unsigned int) avail > stm->buffer_size) {
+@@ -359,10 +365,11 @@ alsa_refill_stream(cubeb_stream * stm)
+ if (got < 0) {
+ pthread_mutex_unlock(&stm->mutex);
+ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
++ free(p);
+ return ERROR;
+ }
+ if (got > 0) {
+- snd_pcm_sframes_t wrote;
++ snd_pcm_sframes_t wrote, towrite = got;
+
+ if (stm->params.format == CUBEB_SAMPLE_FLOAT32NE) {
+ float * b = (float *) p;
+@@ -375,14 +382,62 @@ alsa_refill_stream(cubeb_stream * stm)
+ b[i] *= stm->volume;
+ }
+ }
+- wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got);
+- if (wrote == -EPIPE) {
+- WRAP(snd_pcm_recover)(stm->pcm, wrote, 1);
+- wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got);
++ for (;;) {
++ wrote = WRAP(snd_pcm_writei)(stm->pcm, p,
++ towrite > avail ? avail : towrite);
++ switch(wrote) {
++ case -EPIPE:
++ if (pipefailures++ > 3) {
++ fprintf(stderr, "%s: Too many underflows, giving up\n", __func__);
++ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
++ pthread_mutex_unlock(&stm->mutex);
++ free(p);
++ return ERROR;
++ }
++ WRAP(snd_pcm_recover)(stm->pcm, wrote, 1);
++ continue;
++ case -EAGAIN:
++ if (againfailures++ > 3) {
++ fprintf(stderr, "%s: Too many -EAGAIN errors from snd_pcm_writei, "
++ "giving up\n", __func__);
++ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
++ pthread_mutex_unlock(&stm->mutex);
++ free(p);
++ return ERROR;
++ }
++ continue;
++ case -EBADFD:
++ fprintf(stderr, "%s: snc_pcm_writei returned -%s, giving up\n",
++ __func__, "EBADFD");
++ free(p);
++ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
++ pthread_mutex_unlock(&stm->mutex);
++ return ERROR;
++ }
++ if (wrote < 0) {
++ fprintf(stderr, "%s: snc_pcm_writei returned unexpected error %lld, "
++ "giving up\n", __func__, (long long)wrote);
++ free(p);
++ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
++ pthread_mutex_unlock(&stm->mutex);
++ return ERROR;
++ }
++ pipefailures = againfailures = 0;
++ stm->write_position += wrote;
++ gettimeofday(&stm->last_activity, NULL);
++ if (wrote > towrite) {
++ fprintf(stderr, "%s: snc_pcm_writei wrote %lld frames, which was more "
++ "than we requested (%lld). This should not happen, giving up\n",
++ __func__, (long long)wrote, (long long)towrite);
++ free(p);
++ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
++ pthread_mutex_unlock(&stm->mutex);
++ return ERROR;
++ }
++ if (towrite == wrote)
++ break;
++ towrite -= wrote;
+ }
+- assert(wrote >= 0 && wrote == got);
+- stm->write_position += wrote;
+- gettimeofday(&stm->last_activity, NULL);
+ }
+ if (got != avail) {
+ long buffer_fill = stm->buffer_size - (avail - got);
+@@ -1177,7 +1232,10 @@ alsa_stream_get_position(cubeb_stream * stm, uint64_t * position)
+ return CUBEB_OK;
+ }
+
+- assert(delay >= 0);
++ if (delay < 0) {
++ WRAP(snd_pcm_forward)(stm->pcm, -delay);
++ delay = 0;
++ }
+
+ *position = 0;
+ if (stm->write_position >= (snd_pcm_uframes_t) delay) {
Property changes on: trunk/www/libxul/files/patch-bug1130155
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug1138845
===================================================================
--- trunk/www/libxul/files/patch-bug1138845 (rev 0)
+++ trunk/www/libxul/files/patch-bug1138845 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,134 @@
+commit 4b5b332
+Author: Mike Hommey <mh+mozilla at glandium.org>
+Date: Tue Mar 3 18:41:13 2015 +0900
+
+ Bug 1138845 - Don't require atk-bridge for gtk+3 builds. r=tbsaunde
+---
+ accessible/atk/Platform.cpp | 29 +++++++++++++++++++----------
+ config/system-headers | 1 -
+ configure.in | 2 +-
+ 3 files changed, 20 insertions(+), 12 deletions(-)
+
+diff --git accessible/atk/Platform.cpp accessible/atk/Platform.cpp
+index a2afd96..2ed5e0b 100644
+--- accessible/atk/Platform.cpp
++++ accessible/atk/Platform.cpp
+@@ -18,8 +18,9 @@
+ #include <dbus/dbus.h>
+ #endif
+ #include <gtk/gtk.h>
++
+ #if (MOZ_WIDGET_GTK == 3)
+-#include <atk-bridge.h>
++extern "C" __attribute__((weak,visibility("default"))) int atk_bridge_adaptor_init(int*, char **[]);
+ #endif
+
+ using namespace mozilla;
+@@ -46,7 +47,6 @@ static gulong sToplevel_hide_hook = 0;
+
+ GType g_atk_hyperlink_impl_type = G_TYPE_INVALID;
+
+-#if (MOZ_WIDGET_GTK == 2)
+ struct GnomeAccessibilityModule
+ {
+ const char *libName;
+@@ -67,11 +67,13 @@ static GnomeAccessibilityModule sAtkBridge = {
+ "gnome_accessibility_module_shutdown", nullptr
+ };
+
++#if (MOZ_WIDGET_GTK == 2)
+ static GnomeAccessibilityModule sGail = {
+ "libgail.so", nullptr,
+ "gnome_accessibility_module_init", nullptr,
+ "gnome_accessibility_module_shutdown", nullptr
+ };
++#endif
+
+ static nsresult
+ LoadGtkModule(GnomeAccessibilityModule& aModule)
+@@ -98,7 +100,11 @@ LoadGtkModule(GnomeAccessibilityModule& aModule)
+ else
+ subLen = loc2 - loc1;
+ nsAutoCString sub(Substring(libPath, loc1, subLen));
++#if (MOZ_WIDGET_GTK == 2)
+ sub.AppendLiteral("/gtk-2.0/modules/");
++#else
++ sub.AppendLiteral("/gtk-3.0/modules/");
++#endif
+ sub.Append(aModule.libName);
+ aModule.lib = PR_LoadLibrary(sub.get());
+ if (aModule.lib)
+@@ -123,7 +129,6 @@ LoadGtkModule(GnomeAccessibilityModule& aModule)
+ }
+ return NS_OK;
+ }
+-#endif // (MOZ_WIDGET_GTK == 2)
+
+ void
+ a11y::PlatformInit()
+@@ -175,14 +180,17 @@ a11y::PlatformInit()
+
+ // Init atk-bridge now
+ PR_SetEnv("NO_AT_BRIDGE=0");
+-#if (MOZ_WIDGET_GTK == 2)
+- rv = LoadGtkModule(sAtkBridge);
+- if (NS_SUCCEEDED(rv)) {
+- (*sAtkBridge.init)();
+- }
+-#else
+- atk_bridge_adaptor_init(nullptr, nullptr);
++#if (MOZ_WIDGET_GTK == 3)
++ if (atk_bridge_adaptor_init) {
++ atk_bridge_adaptor_init(nullptr, nullptr);
++ } else
+ #endif
++ {
++ nsresult rv = LoadGtkModule(sAtkBridge);
++ if (NS_SUCCEEDED(rv)) {
++ (*sAtkBridge.init)();
++ }
++ }
+
+ if (!sToplevel_event_hook_added) {
+ sToplevel_event_hook_added = true;
+@@ -210,7 +218,6 @@ a11y::PlatformShutdown()
+ sToplevel_hide_hook);
+ }
+
+-#if (MOZ_WIDGET_GTK == 2)
+ if (sAtkBridge.lib) {
+ // Do not shutdown/unload atk-bridge,
+ // an exit function registered will take care of it
+@@ -221,6 +228,7 @@ a11y::PlatformShutdown()
+ sAtkBridge.init = nullptr;
+ sAtkBridge.shutdown = nullptr;
+ }
++#if (MOZ_WIDGET_GTK == 2)
+ if (sGail.lib) {
+ // Do not shutdown gail because
+ // 1) Maybe it's not init-ed by us. e.g. GtkEmbed
+diff --git config/system-headers config/system-headers
+index 2c94a7d..cf01775 100644
+--- config/system-headers
++++ config/system-headers
+@@ -189,7 +189,6 @@ asm/signal.h
+ ASRegistry.h
+ assert.h
+ atk/atk.h
+-atk-bridge.h
+ atlcom.h
+ atlconv.h
+ atlctl.cpp
+diff --git configure.in configure.in
+index 0bd1eb7..f3b3365 100644
+--- configure.in
++++ configure.in
+@@ -4408,7 +4408,7 @@ fi
+
+ if test "$COMPILE_ENVIRONMENT"; then
+ if test "$MOZ_ENABLE_GTK3"; then
+- PKG_CHECK_MODULES(MOZ_GTK3, gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 atk-bridge-2.0 $GDK_PACKAGES)
++ PKG_CHECK_MODULES(MOZ_GTK3, gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES)
+ MOZ_GTK3_CFLAGS="-I${_topsrcdir}/widget/gtk/compat-gtk3 $MOZ_GTK3_CFLAGS"
+ dnl Contrary to MOZ_GTK2_LIBS, MOZ_GTK3_LIBS needs to be literally added to TK_LIBS instead
+ dnl of a make reference because of how TK_LIBS is mangled in toolkit/library/moz.build
Property changes on: trunk/www/libxul/files/patch-bug1138845
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug1143411
===================================================================
--- trunk/www/libxul/files/patch-bug1143411 (rev 0)
+++ trunk/www/libxul/files/patch-bug1143411 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,27 @@
+https://bugzilla.mozilla.org/show_bug.cgi?id=1143411
+
+diff --git a/config/system-headers b/config/system-headers
+--- config/system-headers
++++ config/system-headers
+@@ -465,16 +465,17 @@ freetype/tttables.h
+ freetype/t1tables.h
+ freetype/ftlcdfil.h
+ freetype/ftsizes.h
+ freetype/ftadvanc.h
+ freetype/ftbitmap.h
+ freetype/ftxf86.h
+ freetype.h
+ ftcache.h
++ftfntfmt.h
+ ftglyph.h
+ ftsynth.h
+ ftoutln.h
+ ttnameid.h
+ tttables.h
+ t1tables.h
+ ftlcdfil.h
+ ftsizes.h
+
+
+
+
Property changes on: trunk/www/libxul/files/patch-bug1143411
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug1143686
===================================================================
--- trunk/www/libxul/files/patch-bug1143686 (rev 0)
+++ trunk/www/libxul/files/patch-bug1143686 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,46 @@
+commit e50e738
+Author: Martin Stransky <stransky at redhat.com>
+Date: Mon Mar 16 08:00:00 2015 -0400
+
+ Bug 1143686 - Gtk3 - Render scrollbar thumb with margin. r=karlt
+---
+ widget/gtk/gtk3drawing.c | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git widget/gtk/gtk3drawing.c widget/gtk/gtk3drawing.c
+index 17f46ab..08a58d6 100644
+--- widget/gtk/gtk3drawing.c
++++ widget/gtk/gtk3drawing.c
+@@ -1230,6 +1230,7 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWidgetType widget,
+ GtkStyleContext* style;
+ GtkScrollbar *scrollbar;
+ GtkAdjustment *adj;
++ GtkBorder margin;
+
+ ensure_scrollbar_widget();
+
+@@ -1239,15 +1240,20 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWidgetType widget,
+ scrollbar = GTK_SCROLLBAR(gVertScrollbarWidget);
+
+ gtk_widget_set_direction(GTK_WIDGET(scrollbar), direction);
+-
++
+ style = gtk_widget_get_style_context(GTK_WIDGET(scrollbar));
+ gtk_style_context_save(style);
+-
++
+ gtk_style_context_add_class(style, GTK_STYLE_CLASS_SLIDER);
+ gtk_style_context_set_state(style, state_flags);
+
+- gtk_render_slider(style, cr, rect->x, rect->y,
+- rect->width, rect->height,
++ gtk_style_context_get_margin (style, state_flags, &margin);
++
++ gtk_render_slider(style, cr,
++ rect->x + margin.left,
++ rect->y + margin.top,
++ rect->width - margin.left - margin.right,
++ rect->height - margin.top - margin.bottom,
+ (widget == MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL) ?
+ GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL);
+
Property changes on: trunk/www/libxul/files/patch-bug1143686
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug1144643
===================================================================
--- trunk/www/libxul/files/patch-bug1144643 (rev 0)
+++ trunk/www/libxul/files/patch-bug1144643 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,33 @@
+commit a0ccc19
+Author: Martin Stransky <stransky at redhat.com>
+Date: Wed Mar 18 07:14:00 2015 -0400
+
+ Bug 1144643 - Render tooltips as transparent on Gtk3. r=karlt
+
+ --HG--
+ extra : rebase_source : 23085532b27350ca71cbe18db071628388003f33
+---
+ widget/gtk/nsNativeThemeGTK.cpp | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git widget/gtk/nsNativeThemeGTK.cpp widget/gtk/nsNativeThemeGTK.cpp
+index e5e1867..26d13a5 100644
+--- widget/gtk/nsNativeThemeGTK.cpp
++++ widget/gtk/nsNativeThemeGTK.cpp
+@@ -1528,9 +1528,15 @@ nsNativeThemeGTK::GetWidgetTransparency(nsIFrame* aFrame, uint8_t aWidgetType)
+ case NS_THEME_MENUPOPUP:
+ case NS_THEME_WINDOW:
+ case NS_THEME_DIALOG:
+- // Tooltips use gtk_paint_flat_box().
++ return eOpaque;
++ // Tooltips use gtk_paint_flat_box() on Gtk2
++ // but are shaped on Gtk3
+ case NS_THEME_TOOLTIP:
++#if (MOZ_WIDGET_GTK == 2)
+ return eOpaque;
++#else
++ return eTransparent;
++#endif
+ }
+
+ return eUnknownTransparency;
Property changes on: trunk/www/libxul/files/patch-bug1144643
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug702179
===================================================================
--- trunk/www/libxul/files/patch-bug702179 (rev 0)
+++ trunk/www/libxul/files/patch-bug702179 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,24 @@
+commit 6ddaacd
+Author: Ginn Chen <ginn.chen at oracle.com>
+Date: Wed Nov 30 07:23:46 2011 +0800
+
+ Bug 702179 dtrace probes are not installed on Solaris with static js lib r=glandium
+---
+ js/src/Makefile.in | 3 ---
+ toolkit/library/moz.build | 5 -----
+ 2 files changed, 8 deletions(-)
+
+diff --git js/src/Makefile.in js/src/Makefile.in
+index 62bbfa0..90400cb 100644
+--- js/src/Makefile.in
++++ js/src/Makefile.in
+@@ -17,9 +17,6 @@ TOPLEVEL_BUILD := 1
+ run_for_side_effects := $(shell echo 'MAKE: $(MAKE)')
+ EXTRA_LIBS += $(NSPR_LIBS)
+
+-DIST_INSTALL = 1
+-NO_EXPAND_LIBS = 1
+-
+ ifdef JS_HAS_CTYPES
+ ifdef MOZ_NATIVE_FFI
+ LOCAL_INCLUDES = $(MOZ_FFI_CFLAGS)
Property changes on: trunk/www/libxul/files/patch-bug702179
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug779713
===================================================================
--- trunk/www/libxul/files/patch-bug779713 (rev 0)
+++ trunk/www/libxul/files/patch-bug779713 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,77 @@
+diff --git mfbt/Alignment.h mfbt/Alignment.h
+index e0843ca..353ec36 100644
+--- mfbt/Alignment.h
++++ mfbt/Alignment.h
+@@ -9,11 +9,20 @@
+ #ifndef mozilla_Alignment_h
+ #define mozilla_Alignment_h
+
++#include "mozilla/Attributes.h"
++
+ #include <stddef.h>
+ #include <stdint.h>
+
+ namespace mozilla {
+
++#if defined(MOZ_HAVE_CXX11_ALIGNAS)
++#define MOZ_ALIGNOF(T) alignof(T)
++#elif defined(__GNUC__)
++#define MOZ_ALIGNOF(T) __alignof__(T)
++#elif defined(_MSC_VER)
++#define MOZ_ALIGNOF(T) __alignof(T)
++#else
+ /*
+ * This class, and the corresponding macro MOZ_ALIGNOF, figures out how many
+ * bytes of alignment a given type needs.
+@@ -32,6 +41,7 @@ public:
+ };
+
+ #define MOZ_ALIGNOF(T) mozilla::AlignmentFinder<T>::alignment
++#endif
+
+ /*
+ * Declare the MOZ_ALIGNED_DECL macro for declaring aligned types.
+@@ -43,7 +53,10 @@ public:
+ * will declare a two-character array |arr| aligned to 8 bytes.
+ */
+
+-#if defined(__GNUC__)
++#if defined(MOZ_HAVE_CXX11_ALIGNAS)
++# define MOZ_ALIGNED_DECL(_type, _align) \
++ alignas(_align) _type
++#elif defined(__GNUC__)
+ # define MOZ_ALIGNED_DECL(_type, _align) \
+ _type __attribute__((aligned(_align)))
+ #elif defined(_MSC_VER)
+diff --git mfbt/Attributes.h mfbt/Attributes.h
+index d317766..ddb13da 100644
+--- mfbt/Attributes.h
++++ mfbt/Attributes.h
+@@ -50,6 +50,7 @@
+ * don't indicate support for them here, due to
+ * http://stackoverflow.com/questions/20498142/visual-studio-2013-explicit-keyword-bug
+ */
++# define MOZ_HAVE_CXX11_ALIGNAS
+ # define MOZ_HAVE_NEVER_INLINE __declspec(noinline)
+ # define MOZ_HAVE_NORETURN __declspec(noreturn)
+ # ifdef __clang__
+@@ -70,6 +71,9 @@
+ # ifndef __has_extension
+ # define __has_extension __has_feature /* compatibility, for older versions of clang */
+ # endif
++# if __has_extension(cxx_alignas)
++# define MOZ_HAVE_CXX11_ALIGNAS
++# endif
+ # if __has_extension(cxx_constexpr)
+ # define MOZ_HAVE_CXX11_CONSTEXPR
+ # endif
+@@ -84,6 +88,9 @@
+ # endif
+ #elif defined(__GNUC__)
+ # if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
++# if MOZ_GCC_VERSION_AT_LEAST(4, 8, 0)
++# define MOZ_HAVE_CXX11_ALIGNAS
++# endif
+ # define MOZ_HAVE_CXX11_CONSTEXPR
+ # define MOZ_HAVE_EXPLICIT_CONVERSION
+ # endif
Property changes on: trunk/www/libxul/files/patch-bug779713
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug826985
===================================================================
--- trunk/www/libxul/files/patch-bug826985 (rev 0)
+++ trunk/www/libxul/files/patch-bug826985 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,179 @@
+commit 8024d93
+Author: Henrik Gulbrandsen <henrik at gulbra.net>
+Date: Fri Jan 4 13:49:22 2013 +0100
+
+ Bug 826985 - Support more video formats for WebRTC via libv4l2 on Linux.
+---
+ config/system-headers | 1 +
+ configure.in | 7 +++++++
+ media/webrtc/signaling/test/Makefile.in | 1 +
+ .../modules/video_capture/linux/device_info_linux.cc | 17 +++++++++++++++++
+ .../modules/video_capture/linux/video_capture_linux.cc | 16 +++++++++++++++-
+ .../webrtc/modules/video_capture/video_capture.gypi | 11 +++++++++++
+ toolkit/library/Makefile.in | 1 +
+ 6 files changed, 52 insertions(+), 1 deletion(-)
+
+diff --git config/system-headers config/system-headers
+index 55e4cd1..76567b3 100644
+--- config/system-headers
++++ config/system-headers
+@@ -635,6 +635,7 @@ libgnomevfs/gnome-vfs-mime-handlers.h
+ libgnomevfs/gnome-vfs-mime-utils.h
+ libgnomevfs/gnome-vfs-ops.h
+ libgnomevfs/gnome-vfs-standard-callbacks.h
++libv4l2.h
+ lib$routines.h
+ limits
+ limits.h
+diff --git configure.in configure.in
+index 55e4cd1..76567b3 100644
+--- configure.in
++++ configure.in
+@@ -5309,6 +5309,9 @@ if test -n "$MOZ_WEBRTC"; then
+ MOZ_VP8_ENCODER=1
+ MOZ_VP8_ERROR_CONCEALMENT=1
+
++ dnl with libv4l2 we can support more cameras
++ PKG_CHECK_MODULES(MOZ_LIBV4L2, libv4l2)
++
+ dnl enable once Signaling lands
+ MOZ_WEBRTC_SIGNALING=1
+ AC_DEFINE(MOZ_WEBRTC_SIGNALING)
+diff --git build/gyp.mozbuild build/gyp.mozbuild
+index b483cd1..f1dd1f0 100644
+--- build/gyp.mozbuild
++++ build/gyp.mozbuild
+@@ -11,6 +11,7 @@ gyp_vars = {
+ 'have_ethtool_cmd_speed_hi': 1 if CONFIG['MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI'] else 0,
+ 'include_alsa_audio': 1 if CONFIG['MOZ_ALSA'] else 0,
+ 'include_pulse_audio': 1 if CONFIG['MOZ_PULSEAUDIO'] else 0,
++ 'use_libv4l2': 1 if CONFIG['MOZ_LIBV4L2_LIBS'] else 0,
+ # basic stuff for everything
+ 'include_internal_video_render': 0,
+ 'clang_use_chrome_plugins': 0,
+diff --git media/webrtc/signaling/test/moz.build media/webrtc/signaling/test/moz.build
+index b483cd1..f1dd1f0 100644
+--- media/webrtc/signaling/test/moz.build
++++ media/webrtc/signaling/test/moz.build
+@@ -122,6 +122,7 @@ if CONFIG['JS_SHARED_LIBRARY']:
+ 'js',
+ ]
+
++OS_LIBS += CONFIG['MOZ_LIBV4L2_LIBS']
+ OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS']
+ OS_LIBS += CONFIG['REALTIME_LIBS']
+
+diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
+index 239a292..bab496c 100644
+--- media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
++++ media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
+@@ -25,10 +25,21 @@
+ #else
+ #include <linux/videodev2.h>
+ #endif
++#ifdef HAVE_LIBV4L2
++#include <libv4l2.h>
++#endif
+
+ #include "webrtc/system_wrappers/interface/ref_count.h"
+ #include "webrtc/system_wrappers/interface/trace.h"
+
++#ifdef HAVE_LIBV4L2
++#define open v4l2_open
++#define close v4l2_close
++#define dup v4l2_dup
++#define ioctl v4l2_ioctl
++#define mmap v4l2_mmap
++#define munmap v4l2_munmap
++#endif
+
+ namespace webrtc
+ {
+@@ -130,6 +142,11 @@ WebRtc_Word32 DeviceInfoLinux::GetDeviceName(
+ memset(deviceNameUTF8, 0, deviceNameLength);
+ memcpy(cameraName, cap.card, sizeof(cap.card));
+
++ if (cameraName[0] == '\0')
++ {
++ sprintf(cameraName, "Camera at /dev/video%d", deviceNumber);
++ }
++
+ if (deviceNameLength >= strlen(cameraName))
+ {
+ memcpy(deviceNameUTF8, cameraName, strlen(cameraName));
+diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
+index 12df1b3..e9863ba 100644
+--- media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
++++ media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
+@@ -25,6 +25,9 @@
+ #else
+ #include <linux/videodev2.h>
+ #endif
++#ifdef HAVE_LIBV4L2
++#include <libv4l2.h>
++#endif
+
+ #include <new>
+
+@@ -26,6 +31,15 @@
+ #include "critical_section_wrapper.h"
+ #include "video_capture_linux.h"
+
++#ifdef HAVE_LIBV4L2
++#define open v4l2_open
++#define close v4l2_close
++#define dup v4l2_dup
++#define ioctl v4l2_ioctl
++#define mmap v4l2_mmap
++#define munmap v4l2_munmap
++#endif
++
+ namespace webrtc
+ {
+ namespace videocapturemodule
+diff --git media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
+index d46b5aa..e452223 100644
+--- media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
++++ media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
+@@ -7,6 +7,9 @@
+ # be found in the AUTHORS file in the root of the source tree.
+
+ {
++ 'variables': {
++ 'use_libv4l2%': 0,
++ },
+ 'targets': [
+ {
+ 'target_name': 'video_capture_module',
+@@ -69,6 +72,19 @@
+ 'linux/video_capture_linux.cc',
+ 'linux/video_capture_linux.h',
+ ],
++ 'conditions': [
++ ['use_libv4l2==1', {
++ 'defines': [
++ 'HAVE_LIBV4L2',
++ ],
++ 'cflags_mozilla': [
++ '$(MOZ_LIBV4L2_CFLAGS)',
++ ],
++ 'libraries': [
++ '-lv4l2',
++ ],
++ }],
++ ],
+ }], # linux
+ ['OS=="mac"', {
+ 'sources': [
+diff --git toolkit/library/moz.build toolkit/library/moz.build
+index 9c16ffa..1db3794 100644
+--- toolkit/library/moz.build
++++ toolkit/library/moz.build
+@@ -163,6 +163,7 @@ if CONFIG['OS_ARCH'] == 'Linux' and CONF
+ ]
+
+ OS_LIBS += CONFIG['MOZ_CAIRO_OSLIBS']
++OS_LIBS += CONFIG['MOZ_LIBV4L2_LIBS']
+ OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS']
+ OS_LIBS += CONFIG['MOZ_APP_EXTRA_LIBS']
+
Property changes on: trunk/www/libxul/files/patch-bug826985
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug847568
===================================================================
--- trunk/www/libxul/files/patch-bug847568 (rev 0)
+++ trunk/www/libxul/files/patch-bug847568 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,244 @@
+# Allow building against system-wide graphite2/harfbuzz.
+
+diff --git config/Makefile.in config/Makefile.in
+index 14bfc0d..5383399 100644
+--- config/Makefile.in
++++ config/Makefile.in
+@@ -75,6 +75,8 @@ export:: $(export-preqs)
+ -DMOZ_NATIVE_LIBEVENT=$(MOZ_NATIVE_LIBEVENT) \
+ -DMOZ_NATIVE_LIBVPX=$(MOZ_NATIVE_LIBVPX) \
+ -DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \
++ -DMOZ_NATIVE_GRAPHITE2=$(MOZ_NATIVE_GRAPHITE2) \
++ -DMOZ_NATIVE_HARFBUZZ=$(MOZ_NATIVE_HARFBUZZ) \
+ $(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
+ $(INSTALL) system_wrappers $(DIST)
+
+diff --git config/system-headers config/system-headers
+index 18e8703..bdc5f82 100644
+--- config/system-headers
++++ config/system-headers
+@@ -1357,3 +1357,11 @@ unicode/utypes.h
+ #endif
+ libutil.h
+ unwind.h
++#if MOZ_NATIVE_GRAPHITE2==1
++graphite2/Font.h
++graphite2/Segment.h
++#endif
++#if MOZ_NATIVE_HARFBUZZ==1
++harfbuzz/hb-ot.h
++harfbuzz/hb.h
++#endif
+diff --git configure.in configure.in
+index ac38f40..87536b7 100644
+--- configure.in
++++ configure.in
+@@ -7986,6 +7986,49 @@ if test "$USE_FC_FREETYPE"; then
+ fi
+
+ dnl ========================================================
++dnl Check for harfbuzz
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-harfbuzz,
++[ --with-system-harfbuzz Use system harfbuzz (located with pkgconfig)],
++MOZ_NATIVE_HARFBUZZ=1,
++MOZ_NATIVE_HARFBUZZ=)
++
++if test -n "$MOZ_NATIVE_HARFBUZZ"; then
++ PKG_CHECK_MODULES(MOZ_HARFBUZZ, harfbuzz >= 0.9.34)
++fi
++
++AC_SUBST(MOZ_NATIVE_HARFBUZZ)
++
++dnl ========================================================
++dnl Check for graphite2
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-graphite2,
++[ --with-system-graphite2 Use system graphite2 (located with pkgconfig)],
++MOZ_NATIVE_GRAPHITE2=1,
++MOZ_NATIVE_GRAPHITE2=)
++
++if test -n "$MOZ_NATIVE_GRAPHITE2"; then
++ PKG_CHECK_MODULES(MOZ_GRAPHITE2, graphite2)
++
++ dnl graphite2.pc has bogus version, check manually
++ AC_TRY_COMPILE([ #include <graphite2/Font.h>
++ #define GR2_VERSION_REQUIRE(major,minor,bugfix) \
++ ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \
++ * 100 + GR2_VERSION_BUGFIX >= \
++ (major) * 10000 + (minor) * 100 + (bugfix) )
++ ], [
++ #if !GR2_VERSION_REQUIRE(1,2,4)
++ #error "Insufficient graphite2 version."
++ #endif
++ ], [],
++ [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])])
++fi
++
++AC_SUBST(MOZ_NATIVE_GRAPHITE2)
++
++dnl ========================================================
+ dnl Check for pixman and cairo
+ dnl ========================================================
+
+diff --git dom/base/moz.build dom/base/moz.build
+index a660ba4..6b2f602 100644
+--- dom/base/moz.build
++++ dom/base/moz.build
+@@ -196,6 +196,9 @@ SOURCES += [
+ 'nsObjectLoadingContent.cpp',
+ ]
+
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ SOURCES['nsContentUtils.cpp'].flags += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ EXTRA_COMPONENTS += [
+ 'contentAreaDropListener.js',
+ 'contentAreaDropListener.manifest',
+diff --git gfx/graphite2/moz-gr-update.sh gfx/graphite2/moz-gr-update.sh
+index f3d76ea..a9e7fb6 100644
+--- gfx/graphite2/moz-gr-update.sh
++++ gfx/graphite2/moz-gr-update.sh
+@@ -23,8 +23,14 @@ echo "\nSee" $0 "for update procedure.\n" >> gfx/graphite2/README.mozilla
+ find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
+ find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
+
++# closest tag/release to require for system version
++TAG=$(cd ../graphitedev/ && hg parents --template {latesttag})
++
++perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$TAG/ and tr/./,/ \
++ if /GR2_VERSION_REQUIRE/" configure.in
++
+ # summarize what's been touched
+-echo Updated to $CHANGESET.
++echo Updated to $CHANGESET \($TAG for --with-system-graphite2\)
+ echo Here is what changed in the gfx/graphite2 directory:
+ echo
+
+diff --git gfx/harfbuzz/README-mozilla gfx/harfbuzz/README-mozilla
+index ca57d16..1ce21fe 100644
+--- gfx/harfbuzz/README-mozilla
++++ gfx/harfbuzz/README-mozilla
+@@ -21,3 +21,8 @@ In addition, the src/Makefile.in file here is NOT from upstream, nor is it
+ generated from src/Makefile.am (the original harfbuzz version); it is a mozilla-
+ specific makefile that is maintained by hand. It should only need updating when
+ new source files or exported headers are added in harfbuzz.
++
++The in-tree copy may be omitted during build by --with-system-harfbuzz.
++Make sure to keep pkg-config version check within configure.in in sync
++with checkout version or increment latest tag by one if it's not based
++on upstream release.
+diff --git gfx/moz.build gfx/moz.build
+index 519aa46..6929751 100644
+--- gfx/moz.build
++++ gfx/moz.build
+@@ -7,6 +7,12 @@
+ if CONFIG['MOZ_TREE_CAIRO']:
+ DIRS += ['cairo']
+
++if not CONFIG['MOZ_NATIVE_GRAPHITE2']:
++ DIRS += ['graphite2/src' ]
++
++if not CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ DIRS += ['harfbuzz/src']
++
+ DIRS += [
+ '2d',
+ 'ycbcr',
+@@ -15,8 +21,6 @@ DIRS += [
+ 'qcms',
+ 'gl',
+ 'layers',
+- 'graphite2/src',
+- 'harfbuzz/src',
+ 'ots/src',
+ 'thebes',
+ 'ipc',
+diff --git gfx/skia/generate_mozbuild.py gfx/skia/generate_mozbuild.py
+index 28fa6b5..240dced 100755
+--- gfx/skia/generate_mozbuild.py
++++ gfx/skia/generate_mozbuild.py
+@@ -140,6 +140,9 @@ if CONFIG['GNU_CXX']:
+ if not CONFIG['CLANG_CXX']:
+ CXXFLAGS += ['-Wno-logical-op']
+
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk', 'qt'):
+ CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
+ CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
+diff --git gfx/skia/moz.build gfx/skia/moz.build
+index 1d0c2f9..adb8941 100644
+--- gfx/skia/moz.build
++++ gfx/skia/moz.build
+@@ -968,6 +968,9 @@ if CONFIG['GNU_CXX']:
+ if not CONFIG['CLANG_CXX']:
+ CXXFLAGS += ['-Wno-logical-op']
+
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk', 'qt'):
+ CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
+ CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
+diff --git gfx/thebes/moz.build gfx/thebes/moz.build
+index d5852fa..aeeab25 100644
+--- gfx/thebes/moz.build
++++ gfx/thebes/moz.build
+@@ -294,7 +294,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'andr
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'qt'):
+ CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
+
+-DEFINES['GRAPHITE2_STATIC'] = True
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_GRAPHITE2']:
++ CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS']
++else:
++ DEFINES['GRAPHITE2_STATIC'] = True
+
+ if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
+ DEFINES['OTS_DLL'] = True
+diff --git intl/unicharutil/util/moz.build intl/unicharutil/util/moz.build
+index d736943..41a931f 100644
+--- intl/unicharutil/util/moz.build
++++ intl/unicharutil/util/moz.build
+@@ -37,3 +37,6 @@ if CONFIG['_MSC_VER']:
+
+ if CONFIG['ENABLE_INTL_API']:
+ CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+diff --git netwerk/dns/moz.build netwerk/dns/moz.build
+index 0b0717a..2e665c9 100644
+--- netwerk/dns/moz.build
++++ netwerk/dns/moz.build
+@@ -64,3 +64,6 @@ GENERATED_FILES = [
+ LOCAL_INCLUDES += [
+ '/netwerk/base',
+ ]
++
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+diff --git toolkit/library/moz.build toolkit/library/moz.build
+index 67f0db9..d42137a 100644
+--- toolkit/library/moz.build
++++ toolkit/library/moz.build
+@@ -187,6 +187,12 @@ if CONFIG['MOZ_NATIVE_LIBVPX']:
+ if not CONFIG['MOZ_TREE_PIXMAN']:
+ OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']
+
++if CONFIG['MOZ_NATIVE_GRAPHITE2']:
++ OS_LIBS += CONFIG['MOZ_GRAPHITE2_LIBS']
++
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS']
++
+ if CONFIG['MOZ_OSS']:
+ OS_LIBS += CONFIG['MOZ_OSS_LIBS']
+
Property changes on: trunk/www/libxul/files/patch-bug847568
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug981348
===================================================================
--- trunk/www/libxul/files/patch-bug981348 (rev 0)
+++ trunk/www/libxul/files/patch-bug981348 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,41 @@
+diff --git dom/system/OSFileConstants.cpp dom/system/OSFileConstants.cpp
+index 4b21361..cb3be32 100644
+--- dom/system/OSFileConstants.cpp
++++ dom/system/OSFileConstants.cpp
+@@ -596,7 +596,7 @@ static const dom::ConstantSpec gLibcProperties[] =
+
+ { "OSFILE_SIZEOF_STATVFS", INT_TO_JSVAL(sizeof (struct statvfs)) },
+
+- { "OSFILE_OFFSETOF_STATVFS_F_BSIZE", INT_TO_JSVAL(offsetof (struct statvfs, f_bsize)) },
++ { "OSFILE_OFFSETOF_STATVFS_F_FRSIZE", INT_TO_JSVAL(offsetof (struct statvfs, f_frsize)) },
+ { "OSFILE_OFFSETOF_STATVFS_F_BAVAIL", INT_TO_JSVAL(offsetof (struct statvfs, f_bavail)) },
+
+ #endif // defined(XP_UNIX)
+diff --git toolkit/components/osfile/modules/osfile_unix_back.jsm toolkit/components/osfile/modules/osfile_unix_back.jsm
+index b59fca4..0cf220b 100644
+--- toolkit/components/osfile/modules/osfile_unix_back.jsm
++++ toolkit/components/osfile/modules/osfile_unix_back.jsm
+@@ -228,8 +228,8 @@
+ let statvfs = new SharedAll.HollowStructure("statvfs",
+ Const.OSFILE_SIZEOF_STATVFS);
+
+- statvfs.add_field_at(Const.OSFILE_OFFSETOF_STATVFS_F_BSIZE,
+- "f_bsize", Type.unsigned_long.implementation);
++ statvfs.add_field_at(Const.OSFILE_OFFSETOF_STATVFS_F_FRSIZE,
++ "f_frsize", Type.unsigned_long.implementation);
+ statvfs.add_field_at(Const.OSFILE_OFFSETOF_STATVFS_F_BAVAIL,
+ "f_bavail", Type.fsblkcnt_t.implementation);
+
+diff --git toolkit/components/osfile/modules/osfile_unix_front.jsm toolkit/components/osfile/modules/osfile_unix_front.jsm
+index 99e5e9b..de642c5 100644
+--- toolkit/components/osfile/modules/osfile_unix_front.jsm
++++ toolkit/components/osfile/modules/osfile_unix_front.jsm
+@@ -373,7 +373,7 @@
+ throw_on_negative("statvfs", UnixFile.statvfs(sourcePath, fileSystemInfoPtr));
+
+ let bytes = new Type.uint64_t.implementation(
+- fileSystemInfo.f_bsize * fileSystemInfo.f_bavail);
++ fileSystemInfo.f_frsize * fileSystemInfo.f_bavail);
+
+ return bytes.value;
+ };
Property changes on: trunk/www/libxul/files/patch-bug981348
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug991253
===================================================================
--- trunk/www/libxul/files/patch-bug991253 (rev 0)
+++ trunk/www/libxul/files/patch-bug991253 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,17 @@
+--- extensions/spellcheck/hunspell/src/mozHunspell.cpp~
++++ extensions/spellcheck/hunspell/src/mozHunspell.cpp
+@@ -400,6 +400,14 @@ mozHunspell::LoadDictionaryList(bool aNo
+ }
+ }
+
++ // load system hunspell dictionaries
++ nsCOMPtr<nsIFile> hunDir;
++ NS_NewNativeLocalFile(NS_LITERAL_CSTRING("%%LOCALBASE%%/share/hunspell"),
++ true, getter_AddRefs(hunDir));
++ if (hunDir) {
++ LoadDictionariesFromDir(hunDir);
++ }
++
+ // find dictionaries from extensions requiring restart
+ nsCOMPtr<nsISimpleEnumerator> dictDirs;
+ rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY_LIST,
Property changes on: trunk/www/libxul/files/patch-bug991253
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-build-pgo-profileserver.py
===================================================================
--- trunk/www/libxul/files/patch-build-pgo-profileserver.py (rev 0)
+++ trunk/www/libxul/files/patch-build-pgo-profileserver.py 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,11 @@
+--- 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
+@@ -59,7 +59,7 @@ if __name__ == '__main__':
+ env["MOZ_JAR_LOG_FILE"] = os.path.abspath(jarlog)
+ print "jarlog: %s" % env["MOZ_JAR_LOG_FILE"]
+
+- cmdargs = ["http://localhost:%d/index.html" % PORT]
++ cmdargs = ["http://127.0.0.1:%d/index.html" % PORT]
+ runner = FirefoxRunner(profile=profile,
+ binary=build.get_binary_path(where="staged-package"),
+ cmdargs=cmdargs,
Property changes on: trunk/www/libxul/files/patch-build-pgo-profileserver.py
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-build_unix_run-mozilla.sh
===================================================================
--- trunk/www/libxul/files/patch-build_unix_run-mozilla.sh (rev 0)
+++ trunk/www/libxul/files/patch-build_unix_run-mozilla.sh 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,12 @@
+--- build/unix/run-mozilla.sh.orig Tue Feb 14 19:56:54 2006
++++ build/unix/run-mozilla.sh Fri Dec 8 15:49:48 2006
+@@ -443,6 +443,9 @@
+ export MOZILLA_FIVE_HOME LD_LIBRARY_PATH
+ export SHLIB_PATH LIBPATH LIBRARY_PATH ADDON_PATH DYLD_LIBRARY_PATH
+
++MOZ_PLUGIN_PATH=%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko:%%LOCALBASE%%/lib/browser_plugins/symlinks/firefox
++export MOZ_PLUGIN_PATH
++
+ if [ $moz_debug -eq 1 ]
+ then
+ moz_debug_program ${1+"$@"}
Property changes on: trunk/www/libxul/files/patch-build_unix_run-mozilla.sh
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-config-baseconfig.mk
===================================================================
--- trunk/www/libxul/files/patch-config-baseconfig.mk (rev 0)
+++ trunk/www/libxul/files/patch-config-baseconfig.mk 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,14 @@
+--- config/baseconfig.mk~
++++ config/baseconfig.mk
+@@ -1,7 +1,7 @@
+-includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
++includedir := $(includedir)/%%MOZILLA%%
++idldir = $(datadir)/idl/%%MOZILLA%%
++installdir = $(libdir)/%%MOZILLA%%
++sdkdir = $(libdir)/%%MOZILLA%%
+ ifndef TOP_DIST
+ TOP_DIST = dist
+ endif
Property changes on: trunk/www/libxul/files/patch-config-baseconfig.mk
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-ijg-libjpeg
===================================================================
--- trunk/www/libxul/files/patch-ijg-libjpeg (rev 0)
+++ trunk/www/libxul/files/patch-ijg-libjpeg 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,382 @@
+# Partially revert bug 791305 to allow building with system IJG jpeg library
+
+diff --git configure.in configure.in
+index f0aeb5d..1c01010 100644
+--- configure.in
++++ configure.in
+@@ -4027,11 +4027,7 @@ if test "$MOZ_NATIVE_JPEG" = 1; then
+ #include <jpeglib.h> ],
+ [ #if JPEG_LIB_VERSION < $MOZJPEG
+ #error "Insufficient JPEG library version ($MOZJPEG required)."
+- #endif
+- #ifndef JCS_EXTENSIONS
+- #error "libjpeg-turbo JCS_EXTENSIONS required"
+- #endif
+- ],
++ #endif ],
+ MOZ_NATIVE_JPEG=1,
+ AC_MSG_ERROR([Insufficient JPEG library version for --with-system-jpeg]))
+ fi
+diff --git image/decoders/nsJPEGDecoder.cpp image/decoders/nsJPEGDecoder.cpp
+index 8fa8200..1d2a259 100644
+--- image/decoders/nsJPEGDecoder.cpp
++++ image/decoders/nsJPEGDecoder.cpp
+@@ -21,13 +21,28 @@
+
+ extern "C" {
+ #include "iccjpeg.h"
+-}
+
++#ifdef JCS_EXTENSIONS
+ #if MOZ_BIG_ENDIAN
+ #define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_XRGB
+ #else
+ #define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_BGRX
+ #endif
++#else
++/* Colorspace conversion (copied from jpegint.h) */
++struct jpeg_color_deconverter {
++ JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
++ JMETHOD(void, color_convert, (j_decompress_ptr cinfo,
++ JSAMPIMAGE input_buf, JDIMENSION input_row,
++ JSAMPARRAY output_buf, int num_rows));
++};
++
++METHODDEF(void)
++ycc_rgb_convert_argb (j_decompress_ptr cinfo,
++ JSAMPIMAGE input_buf, JDIMENSION input_row,
++ JSAMPARRAY output_buf, int num_rows);
++#endif
++}
+
+ static void cmyk_convert_rgb(JSAMPROW row, JDIMENSION width);
+
+@@ -367,6 +382,7 @@ nsJPEGDecoder::WriteInternal(const char*
+ case JCS_GRAYSCALE:
+ case JCS_RGB:
+ case JCS_YCbCr:
++#ifdef JCS_EXTENSIONS
+ // if we're not color managing we can decode directly to
+ // MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB
+ if (mCMSMode != eCMSMode_All) {
+@@ -375,6 +391,9 @@ nsJPEGDecoder::WriteInternal(const char*
+ } else {
+ mInfo.out_color_space = JCS_RGB;
+ }
++#else
++ mInfo.out_color_space = JCS_RGB;
++#endif
+ break;
+ case JCS_CMYK:
+ case JCS_YCCK:
+@@ -433,6 +452,15 @@ nsJPEGDecoder::WriteInternal(const char*
+ return; // I/O suspension
+ }
+
++#ifndef JCS_EXTENSIONS
++ /* Force to use our YCbCr to Packed RGB converter when possible */
++ if (!mTransform && (mCMSMode != eCMSMode_All) &&
++ mInfo.jpeg_color_space == JCS_YCbCr && mInfo.out_color_space == JCS_RGB) {
++ /* Special case for the most common case: transform from YCbCr direct into packed ARGB */
++ mInfo.out_color_components = 4; /* Packed ARGB pixels are always 4 bytes...*/
++ mInfo.cconvert->color_convert = ycc_rgb_convert_argb;
++ }
++#endif
+
+ // If this is a progressive JPEG ...
+ mState = mInfo.buffered_image ?
+@@ -605,7 +633,11 @@ nsJPEGDecoder::OutputScanlines(bool* sus
+ uint32_t* imageRow = ((uint32_t*)mImageData) +
+ (mInfo.output_scanline * mInfo.output_width);
+
++#ifdef JCS_EXTENSIONS
+ if (mInfo.out_color_space == MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB) {
++#else
++ if (mInfo.cconvert->color_convert == ycc_rgb_convert_argb) {
++#endif
+ // Special case: scanline will be directly converted into packed ARGB
+ if (jpeg_read_scanlines(&mInfo, (JSAMPARRAY)&imageRow, 1) != 1) {
+ *suspend = true; // suspend
+@@ -920,6 +952,282 @@ term_source (j_decompress_ptr jd)
+ } // namespace mozilla
+
+
++#ifndef JCS_EXTENSIONS
++/**************** YCbCr -> Cairo's RGB24/ARGB32 conversion: most common case **************/
++
++/*
++ * YCbCr is defined per CCIR 601-1, except that Cb and Cr are
++ * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5.
++ * The conversion equations to be implemented are therefore
++ * R = Y + 1.40200 * Cr
++ * G = Y - 0.34414 * Cb - 0.71414 * Cr
++ * B = Y + 1.77200 * Cb
++ * where Cb and Cr represent the incoming values less CENTERJSAMPLE.
++ * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.)
++ *
++ * To avoid floating-point arithmetic, we represent the fractional constants
++ * as integers scaled up by 2^16 (about 4 digits precision); we have to divide
++ * the products by 2^16, with appropriate rounding, to get the correct answer.
++ * Notice that Y, being an integral input, does not contribute any fraction
++ * so it need not participate in the rounding.
++ *
++ * For even more speed, we avoid doing any multiplications in the inner loop
++ * by precalculating the constants times Cb and Cr for all possible values.
++ * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table);
++ * for 12-bit samples it is still acceptable. It's not very reasonable for
++ * 16-bit samples, but if you want lossless storage you shouldn't be changing
++ * colorspace anyway.
++ * The Cr=>R and Cb=>B values can be rounded to integers in advance; the
++ * values for the G calculation are left scaled up, since we must add them
++ * together before rounding.
++ */
++
++#define SCALEBITS 16 /* speediest right-shift on some machines */
++
++/* Use static tables for color processing. */
++/* Four tables, each 256 entries of 4 bytes totals 4K which is not bad... */
++
++const int Cr_r_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
++ -0xb3, -0xb2, -0xb1, -0xaf, -0xae, -0xac,
++ -0xab, -0xaa, -0xa8, -0xa7, -0xa5, -0xa4,
++ -0xa3, -0xa1, -0xa0, -0x9e, -0x9d, -0x9c,
++ -0x9a, -0x99, -0x97, -0x96, -0x95, -0x93,
++ -0x92, -0x90, -0x8f, -0x8e, -0x8c, -0x8b,
++ -0x89, -0x88, -0x87, -0x85, -0x84, -0x82,
++ -0x81, -0x80, -0x7e, -0x7d, -0x7b, -0x7a,
++ -0x79, -0x77, -0x76, -0x74, -0x73, -0x72,
++ -0x70, -0x6f, -0x6d, -0x6c, -0x6b, -0x69,
++ -0x68, -0x66, -0x65, -0x64, -0x62, -0x61,
++ -0x5f, -0x5e, -0x5d, -0x5b, -0x5a, -0x58,
++ -0x57, -0x56, -0x54, -0x53, -0x51, -0x50,
++ -0x4f, -0x4d, -0x4c, -0x4a, -0x49, -0x48,
++ -0x46, -0x45, -0x43, -0x42, -0x40, -0x3f,
++ -0x3e, -0x3c, -0x3b, -0x39, -0x38, -0x37,
++ -0x35, -0x34, -0x32, -0x31, -0x30, -0x2e,
++ -0x2d, -0x2b, -0x2a, -0x29, -0x27, -0x26,
++ -0x24, -0x23, -0x22, -0x20, -0x1f, -0x1d,
++ -0x1c, -0x1b, -0x19, -0x18, -0x16, -0x15,
++ -0x14, -0x12, -0x11, -0x0f, -0x0e, -0x0d,
++ -0x0b, -0x0a, -0x08, -0x07, -0x06, -0x04,
++ -0x03, -0x01, 0x00, 0x01, 0x03, 0x04,
++ 0x06, 0x07, 0x08, 0x0a, 0x0b, 0x0d,
++ 0x0e, 0x0f, 0x11, 0x12, 0x14, 0x15,
++ 0x16, 0x18, 0x19, 0x1b, 0x1c, 0x1d,
++ 0x1f, 0x20, 0x22, 0x23, 0x24, 0x26,
++ 0x27, 0x29, 0x2a, 0x2b, 0x2d, 0x2e,
++ 0x30, 0x31, 0x32, 0x34, 0x35, 0x37,
++ 0x38, 0x39, 0x3b, 0x3c, 0x3e, 0x3f,
++ 0x40, 0x42, 0x43, 0x45, 0x46, 0x48,
++ 0x49, 0x4a, 0x4c, 0x4d, 0x4f, 0x50,
++ 0x51, 0x53, 0x54, 0x56, 0x57, 0x58,
++ 0x5a, 0x5b, 0x5d, 0x5e, 0x5f, 0x61,
++ 0x62, 0x64, 0x65, 0x66, 0x68, 0x69,
++ 0x6b, 0x6c, 0x6d, 0x6f, 0x70, 0x72,
++ 0x73, 0x74, 0x76, 0x77, 0x79, 0x7a,
++ 0x7b, 0x7d, 0x7e, 0x80, 0x81, 0x82,
++ 0x84, 0x85, 0x87, 0x88, 0x89, 0x8b,
++ 0x8c, 0x8e, 0x8f, 0x90, 0x92, 0x93,
++ 0x95, 0x96, 0x97, 0x99, 0x9a, 0x9c,
++ 0x9d, 0x9e, 0xa0, 0xa1, 0xa3, 0xa4,
++ 0xa5, 0xa7, 0xa8, 0xaa, 0xab, 0xac,
++ 0xae, 0xaf, 0xb1, 0xb2,
++ };
++
++const int Cb_b_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
++ -0xe3, -0xe1, -0xdf, -0xde, -0xdc, -0xda,
++ -0xd8, -0xd6, -0xd5, -0xd3, -0xd1, -0xcf,
++ -0xce, -0xcc, -0xca, -0xc8, -0xc6, -0xc5,
++ -0xc3, -0xc1, -0xbf, -0xbe, -0xbc, -0xba,
++ -0xb8, -0xb7, -0xb5, -0xb3, -0xb1, -0xaf,
++ -0xae, -0xac, -0xaa, -0xa8, -0xa7, -0xa5,
++ -0xa3, -0xa1, -0x9f, -0x9e, -0x9c, -0x9a,
++ -0x98, -0x97, -0x95, -0x93, -0x91, -0x90,
++ -0x8e, -0x8c, -0x8a, -0x88, -0x87, -0x85,
++ -0x83, -0x81, -0x80, -0x7e, -0x7c, -0x7a,
++ -0x78, -0x77, -0x75, -0x73, -0x71, -0x70,
++ -0x6e, -0x6c, -0x6a, -0x69, -0x67, -0x65,
++ -0x63, -0x61, -0x60, -0x5e, -0x5c, -0x5a,
++ -0x59, -0x57, -0x55, -0x53, -0x52, -0x50,
++ -0x4e, -0x4c, -0x4a, -0x49, -0x47, -0x45,
++ -0x43, -0x42, -0x40, -0x3e, -0x3c, -0x3a,
++ -0x39, -0x37, -0x35, -0x33, -0x32, -0x30,
++ -0x2e, -0x2c, -0x2b, -0x29, -0x27, -0x25,
++ -0x23, -0x22, -0x20, -0x1e, -0x1c, -0x1b,
++ -0x19, -0x17, -0x15, -0x13, -0x12, -0x10,
++ -0x0e, -0x0c, -0x0b, -0x09, -0x07, -0x05,
++ -0x04, -0x02, 0x00, 0x02, 0x04, 0x05,
++ 0x07, 0x09, 0x0b, 0x0c, 0x0e, 0x10,
++ 0x12, 0x13, 0x15, 0x17, 0x19, 0x1b,
++ 0x1c, 0x1e, 0x20, 0x22, 0x23, 0x25,
++ 0x27, 0x29, 0x2b, 0x2c, 0x2e, 0x30,
++ 0x32, 0x33, 0x35, 0x37, 0x39, 0x3a,
++ 0x3c, 0x3e, 0x40, 0x42, 0x43, 0x45,
++ 0x47, 0x49, 0x4a, 0x4c, 0x4e, 0x50,
++ 0x52, 0x53, 0x55, 0x57, 0x59, 0x5a,
++ 0x5c, 0x5e, 0x60, 0x61, 0x63, 0x65,
++ 0x67, 0x69, 0x6a, 0x6c, 0x6e, 0x70,
++ 0x71, 0x73, 0x75, 0x77, 0x78, 0x7a,
++ 0x7c, 0x7e, 0x80, 0x81, 0x83, 0x85,
++ 0x87, 0x88, 0x8a, 0x8c, 0x8e, 0x90,
++ 0x91, 0x93, 0x95, 0x97, 0x98, 0x9a,
++ 0x9c, 0x9e, 0x9f, 0xa1, 0xa3, 0xa5,
++ 0xa7, 0xa8, 0xaa, 0xac, 0xae, 0xaf,
++ 0xb1, 0xb3, 0xb5, 0xb7, 0xb8, 0xba,
++ 0xbc, 0xbe, 0xbf, 0xc1, 0xc3, 0xc5,
++ 0xc6, 0xc8, 0xca, 0xcc, 0xce, 0xcf,
++ 0xd1, 0xd3, 0xd5, 0xd6, 0xd8, 0xda,
++ 0xdc, 0xde, 0xdf, 0xe1,
++ };
++
++const int Cr_g_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
++ 0x5b6900, 0x5ab22e, 0x59fb5c, 0x59448a, 0x588db8, 0x57d6e6,
++ 0x572014, 0x566942, 0x55b270, 0x54fb9e, 0x5444cc, 0x538dfa,
++ 0x52d728, 0x522056, 0x516984, 0x50b2b2, 0x4ffbe0, 0x4f450e,
++ 0x4e8e3c, 0x4dd76a, 0x4d2098, 0x4c69c6, 0x4bb2f4, 0x4afc22,
++ 0x4a4550, 0x498e7e, 0x48d7ac, 0x4820da, 0x476a08, 0x46b336,
++ 0x45fc64, 0x454592, 0x448ec0, 0x43d7ee, 0x43211c, 0x426a4a,
++ 0x41b378, 0x40fca6, 0x4045d4, 0x3f8f02, 0x3ed830, 0x3e215e,
++ 0x3d6a8c, 0x3cb3ba, 0x3bfce8, 0x3b4616, 0x3a8f44, 0x39d872,
++ 0x3921a0, 0x386ace, 0x37b3fc, 0x36fd2a, 0x364658, 0x358f86,
++ 0x34d8b4, 0x3421e2, 0x336b10, 0x32b43e, 0x31fd6c, 0x31469a,
++ 0x308fc8, 0x2fd8f6, 0x2f2224, 0x2e6b52, 0x2db480, 0x2cfdae,
++ 0x2c46dc, 0x2b900a, 0x2ad938, 0x2a2266, 0x296b94, 0x28b4c2,
++ 0x27fdf0, 0x27471e, 0x26904c, 0x25d97a, 0x2522a8, 0x246bd6,
++ 0x23b504, 0x22fe32, 0x224760, 0x21908e, 0x20d9bc, 0x2022ea,
++ 0x1f6c18, 0x1eb546, 0x1dfe74, 0x1d47a2, 0x1c90d0, 0x1bd9fe,
++ 0x1b232c, 0x1a6c5a, 0x19b588, 0x18feb6, 0x1847e4, 0x179112,
++ 0x16da40, 0x16236e, 0x156c9c, 0x14b5ca, 0x13fef8, 0x134826,
++ 0x129154, 0x11da82, 0x1123b0, 0x106cde, 0x0fb60c, 0x0eff3a,
++ 0x0e4868, 0x0d9196, 0x0cdac4, 0x0c23f2, 0x0b6d20, 0x0ab64e,
++ 0x09ff7c, 0x0948aa, 0x0891d8, 0x07db06, 0x072434, 0x066d62,
++ 0x05b690, 0x04ffbe, 0x0448ec, 0x03921a, 0x02db48, 0x022476,
++ 0x016da4, 0x00b6d2, 0x000000, -0x00b6d2, -0x016da4, -0x022476,
++ -0x02db48, -0x03921a, -0x0448ec, -0x04ffbe, -0x05b690, -0x066d62,
++ -0x072434, -0x07db06, -0x0891d8, -0x0948aa, -0x09ff7c, -0x0ab64e,
++ -0x0b6d20, -0x0c23f2, -0x0cdac4, -0x0d9196, -0x0e4868, -0x0eff3a,
++ -0x0fb60c, -0x106cde, -0x1123b0, -0x11da82, -0x129154, -0x134826,
++ -0x13fef8, -0x14b5ca, -0x156c9c, -0x16236e, -0x16da40, -0x179112,
++ -0x1847e4, -0x18feb6, -0x19b588, -0x1a6c5a, -0x1b232c, -0x1bd9fe,
++ -0x1c90d0, -0x1d47a2, -0x1dfe74, -0x1eb546, -0x1f6c18, -0x2022ea,
++ -0x20d9bc, -0x21908e, -0x224760, -0x22fe32, -0x23b504, -0x246bd6,
++ -0x2522a8, -0x25d97a, -0x26904c, -0x27471e, -0x27fdf0, -0x28b4c2,
++ -0x296b94, -0x2a2266, -0x2ad938, -0x2b900a, -0x2c46dc, -0x2cfdae,
++ -0x2db480, -0x2e6b52, -0x2f2224, -0x2fd8f6, -0x308fc8, -0x31469a,
++ -0x31fd6c, -0x32b43e, -0x336b10, -0x3421e2, -0x34d8b4, -0x358f86,
++ -0x364658, -0x36fd2a, -0x37b3fc, -0x386ace, -0x3921a0, -0x39d872,
++ -0x3a8f44, -0x3b4616, -0x3bfce8, -0x3cb3ba, -0x3d6a8c, -0x3e215e,
++ -0x3ed830, -0x3f8f02, -0x4045d4, -0x40fca6, -0x41b378, -0x426a4a,
++ -0x43211c, -0x43d7ee, -0x448ec0, -0x454592, -0x45fc64, -0x46b336,
++ -0x476a08, -0x4820da, -0x48d7ac, -0x498e7e, -0x4a4550, -0x4afc22,
++ -0x4bb2f4, -0x4c69c6, -0x4d2098, -0x4dd76a, -0x4e8e3c, -0x4f450e,
++ -0x4ffbe0, -0x50b2b2, -0x516984, -0x522056, -0x52d728, -0x538dfa,
++ -0x5444cc, -0x54fb9e, -0x55b270, -0x566942, -0x572014, -0x57d6e6,
++ -0x588db8, -0x59448a, -0x59fb5c, -0x5ab22e,
++ };
++
++const int Cb_g_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
++ 0x2c8d00, 0x2c34e6, 0x2bdccc, 0x2b84b2, 0x2b2c98, 0x2ad47e,
++ 0x2a7c64, 0x2a244a, 0x29cc30, 0x297416, 0x291bfc, 0x28c3e2,
++ 0x286bc8, 0x2813ae, 0x27bb94, 0x27637a, 0x270b60, 0x26b346,
++ 0x265b2c, 0x260312, 0x25aaf8, 0x2552de, 0x24fac4, 0x24a2aa,
++ 0x244a90, 0x23f276, 0x239a5c, 0x234242, 0x22ea28, 0x22920e,
++ 0x2239f4, 0x21e1da, 0x2189c0, 0x2131a6, 0x20d98c, 0x208172,
++ 0x202958, 0x1fd13e, 0x1f7924, 0x1f210a, 0x1ec8f0, 0x1e70d6,
++ 0x1e18bc, 0x1dc0a2, 0x1d6888, 0x1d106e, 0x1cb854, 0x1c603a,
++ 0x1c0820, 0x1bb006, 0x1b57ec, 0x1affd2, 0x1aa7b8, 0x1a4f9e,
++ 0x19f784, 0x199f6a, 0x194750, 0x18ef36, 0x18971c, 0x183f02,
++ 0x17e6e8, 0x178ece, 0x1736b4, 0x16de9a, 0x168680, 0x162e66,
++ 0x15d64c, 0x157e32, 0x152618, 0x14cdfe, 0x1475e4, 0x141dca,
++ 0x13c5b0, 0x136d96, 0x13157c, 0x12bd62, 0x126548, 0x120d2e,
++ 0x11b514, 0x115cfa, 0x1104e0, 0x10acc6, 0x1054ac, 0x0ffc92,
++ 0x0fa478, 0x0f4c5e, 0x0ef444, 0x0e9c2a, 0x0e4410, 0x0debf6,
++ 0x0d93dc, 0x0d3bc2, 0x0ce3a8, 0x0c8b8e, 0x0c3374, 0x0bdb5a,
++ 0x0b8340, 0x0b2b26, 0x0ad30c, 0x0a7af2, 0x0a22d8, 0x09cabe,
++ 0x0972a4, 0x091a8a, 0x08c270, 0x086a56, 0x08123c, 0x07ba22,
++ 0x076208, 0x0709ee, 0x06b1d4, 0x0659ba, 0x0601a0, 0x05a986,
++ 0x05516c, 0x04f952, 0x04a138, 0x04491e, 0x03f104, 0x0398ea,
++ 0x0340d0, 0x02e8b6, 0x02909c, 0x023882, 0x01e068, 0x01884e,
++ 0x013034, 0x00d81a, 0x008000, 0x0027e6, -0x003034, -0x00884e,
++ -0x00e068, -0x013882, -0x01909c, -0x01e8b6, -0x0240d0, -0x0298ea,
++ -0x02f104, -0x03491e, -0x03a138, -0x03f952, -0x04516c, -0x04a986,
++ -0x0501a0, -0x0559ba, -0x05b1d4, -0x0609ee, -0x066208, -0x06ba22,
++ -0x07123c, -0x076a56, -0x07c270, -0x081a8a, -0x0872a4, -0x08cabe,
++ -0x0922d8, -0x097af2, -0x09d30c, -0x0a2b26, -0x0a8340, -0x0adb5a,
++ -0x0b3374, -0x0b8b8e, -0x0be3a8, -0x0c3bc2, -0x0c93dc, -0x0cebf6,
++ -0x0d4410, -0x0d9c2a, -0x0df444, -0x0e4c5e, -0x0ea478, -0x0efc92,
++ -0x0f54ac, -0x0facc6, -0x1004e0, -0x105cfa, -0x10b514, -0x110d2e,
++ -0x116548, -0x11bd62, -0x12157c, -0x126d96, -0x12c5b0, -0x131dca,
++ -0x1375e4, -0x13cdfe, -0x142618, -0x147e32, -0x14d64c, -0x152e66,
++ -0x158680, -0x15de9a, -0x1636b4, -0x168ece, -0x16e6e8, -0x173f02,
++ -0x17971c, -0x17ef36, -0x184750, -0x189f6a, -0x18f784, -0x194f9e,
++ -0x19a7b8, -0x19ffd2, -0x1a57ec, -0x1ab006, -0x1b0820, -0x1b603a,
++ -0x1bb854, -0x1c106e, -0x1c6888, -0x1cc0a2, -0x1d18bc, -0x1d70d6,
++ -0x1dc8f0, -0x1e210a, -0x1e7924, -0x1ed13e, -0x1f2958, -0x1f8172,
++ -0x1fd98c, -0x2031a6, -0x2089c0, -0x20e1da, -0x2139f4, -0x21920e,
++ -0x21ea28, -0x224242, -0x229a5c, -0x22f276, -0x234a90, -0x23a2aa,
++ -0x23fac4, -0x2452de, -0x24aaf8, -0x250312, -0x255b2c, -0x25b346,
++ -0x260b60, -0x26637a, -0x26bb94, -0x2713ae, -0x276bc8, -0x27c3e2,
++ -0x281bfc, -0x287416, -0x28cc30, -0x29244a, -0x297c64, -0x29d47e,
++ -0x2a2c98, -0x2a84b2, -0x2adccc, -0x2b34e6,
++ };
++
++
++/* We assume that right shift corresponds to signed division by 2 with
++ * rounding towards minus infinity. This is correct for typical "arithmetic
++ * shift" instructions that shift in copies of the sign bit. But some
++ * C compilers implement >> with an unsigned shift. For these machines you
++ * must define RIGHT_SHIFT_IS_UNSIGNED.
++ * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity.
++ * It is only applied with constant shift counts. SHIFT_TEMPS must be
++ * included in the variables of any routine using RIGHT_SHIFT.
++ */
++
++#ifdef RIGHT_SHIFT_IS_UNSIGNED
++#define SHIFT_TEMPS INT32 shift_temp;
++#define RIGHT_SHIFT(x,shft) \
++ ((shift_temp = (x)) < 0 ? \
++ (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \
++ (shift_temp >> (shft)))
++#else
++#define SHIFT_TEMPS
++#define RIGHT_SHIFT(x,shft) ((x) >> (shft))
++#endif
++
++
++METHODDEF(void)
++ycc_rgb_convert_argb (j_decompress_ptr cinfo,
++ JSAMPIMAGE input_buf, JDIMENSION input_row,
++ JSAMPARRAY output_buf, int num_rows)
++{
++ JDIMENSION num_cols = cinfo->output_width;
++ JSAMPLE * range_limit = cinfo->sample_range_limit;
++
++ SHIFT_TEMPS
++
++ /* This is used if we don't have SSE2 */
++
++ while (--num_rows >= 0) {
++ JSAMPROW inptr0 = input_buf[0][input_row];
++ JSAMPROW inptr1 = input_buf[1][input_row];
++ JSAMPROW inptr2 = input_buf[2][input_row];
++ input_row++;
++ uint32_t *outptr = (uint32_t *) *output_buf++;
++ for (JDIMENSION col = 0; col < num_cols; col++) {
++ int y = GETJSAMPLE(inptr0[col]);
++ int cb = GETJSAMPLE(inptr1[col]);
++ int cr = GETJSAMPLE(inptr2[col]);
++ JSAMPLE * range_limit_y = range_limit + y;
++ /* Range-limiting is essential due to noise introduced by DCT losses. */
++ outptr[col] = 0xFF000000 |
++ ( range_limit_y[Cr_r_tab[cr]] << 16 ) |
++ ( range_limit_y[((int) RIGHT_SHIFT(Cb_g_tab[cb] + Cr_g_tab[cr], SCALEBITS))] << 8 ) |
++ ( range_limit_y[Cb_b_tab[cb]] );
++ }
++ }
++}
++#endif
++
++
+ ///*************** Inverted CMYK -> RGB conversion *************************
+ /// Input is (Inverted) CMYK stored as 4 bytes per pixel.
+ /// Output is RGB stored as 3 bytes per pixel.
Property changes on: trunk/www/libxul/files/patch-ijg-libjpeg
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-media-libstagefright-foundation-AString.cpp
===================================================================
--- trunk/www/libxul/files/patch-media-libstagefright-foundation-AString.cpp (rev 0)
+++ trunk/www/libxul/files/patch-media-libstagefright-foundation-AString.cpp 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,16 @@
+--- media/libstagefright/frameworks/av/media/libstagefright/foundation/AString.cpp~
++++ media/libstagefright/frameworks/av/media/libstagefright/foundation/AString.cpp
+@@ -23,6 +23,13 @@
+ #include "ADebug.h"
+ #include "AString.h"
+
++#ifdef __FreeBSD__
++# include <osreldate.h>
++# if __FreeBSD_version < 900506
++# undef tolower
++# endif
++#endif
++
+ namespace stagefright {
+
+ // static
Property changes on: trunk/www/libxul/files/patch-media-libstagefright-foundation-AString.cpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-media-mtransport-third_party-nICEr-src-util-mbslen.c
===================================================================
--- trunk/www/libxul/files/patch-media-mtransport-third_party-nICEr-src-util-mbslen.c (rev 0)
+++ trunk/www/libxul/files/patch-media-mtransport-third_party-nICEr-src-util-mbslen.c 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,16 @@
+--- media/mtransport/third_party/nICEr/src/util/mbslen.c~
++++ media/mtransport/third_party/nICEr/src/util/mbslen.c
+@@ -54,6 +54,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ # endif
+ #endif
+
++#ifdef __DragonFly__
++#include <osreldate.h>
++# if __DragonFly_version > 300502
++# define HAVE_XLOCALE
++# endif
++#endif
++
+ #ifdef HAVE_XLOCALE
+ #include <xlocale.h>
+ #endif /* HAVE_XLOCALE */
Property changes on: trunk/www/libxul/files/patch-media-mtransport-third_party-nICEr-src-util-mbslen.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp
===================================================================
--- trunk/www/libxul/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp (rev 0)
+++ trunk/www/libxul/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,16 @@
+--- media/webrtc/trunk/webrtc/system_wrappers/source/spreadsortlib/spreadsort.hpp~
++++ media/webrtc/trunk/webrtc/system_wrappers/source/spreadsortlib/spreadsort.hpp
+@@ -21,6 +21,13 @@ Scott McMurray
+ #include "constants.hpp"
+ #include <cstring>
+
++#ifdef __FreeBSD__
++# include <osreldate.h>
++# if __FreeBSD_version < 900506
++# define getchar boost_getchar
++# endif
++#endif
++
+ namespace boost {
+ namespace detail {
+ //This only works on unsigned data types
Property changes on: trunk/www/libxul/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-memory-jemalloc-Makefile.in
===================================================================
--- trunk/www/libxul/files/patch-memory-jemalloc-Makefile.in (rev 0)
+++ trunk/www/libxul/files/patch-memory-jemalloc-Makefile.in 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,10 @@
+--- memory/jemalloc/Makefile.in~
++++ memory/jemalloc/Makefile.in
+@@ -12,3 +12,7 @@ include $(topsrcdir)/config/rules.mk
+ ifdef GNU_CC
+ CFLAGS += -std=gnu99
+ endif
++
++# XXX startup crash workaround for gcc47 on amd64
++jemalloc.$(OBJ_SUFFIX): OS_CFLAGS := $(filter-out -O3 -Ofast,$(OS_CFLAGS))
++jemalloc.$(OBJ_SUFFIX): MOZ_OPTIMIZE_FLAGS=
Property changes on: trunk/www/libxul/files/patch-memory-jemalloc-Makefile.in
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Deleted: trunk/www/libxul/files/patch-modules-libpref-src-prefapi.cpp
===================================================================
--- trunk/www/libxul/files/patch-modules-libpref-src-prefapi.cpp 2015-11-07 03:06:40 UTC (rev 20667)
+++ trunk/www/libxul/files/patch-modules-libpref-src-prefapi.cpp 2015-11-07 03:43:27 UTC (rev 20668)
@@ -1,102 +0,0 @@
-
-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))
Deleted: trunk/www/libxul/files/patch-security_coreconf_FreeBSD.mk
===================================================================
--- trunk/www/libxul/files/patch-security_coreconf_FreeBSD.mk 2015-11-07 03:06:40 UTC (rev 20667)
+++ trunk/www/libxul/files/patch-security_coreconf_FreeBSD.mk 2015-11-07 03:43:27 UTC (rev 20668)
@@ -1,18 +0,0 @@
---- security/coreconf/FreeBSD.mk.orig 2010-06-26 07:29:06.000000000 +0200
-+++ security/coreconf/FreeBSD.mk 2010-07-18 13:25:06.000000000 +0200
-@@ -49,9 +49,6 @@
- ifeq ($(CPU_ARCH),pc98)
- CPU_ARCH = x86
- endif
--ifeq ($(CPU_ARCH),amd64)
--CPU_ARCH = x86_64
--endif
-
- OS_CFLAGS = $(DSO_CFLAGS) -ansi -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
-
-@@ -87,4 +84,4 @@
-
- G++INCLUDES = -I/usr/include/g++
-
--INCLUDES += -I/usr/X11R6/include
-+#INCLUDES += -I/usr/X11R6/include
Deleted: trunk/www/libxul/files/patch-security_coreconf_MidnightBSD.mk
===================================================================
--- trunk/www/libxul/files/patch-security_coreconf_MidnightBSD.mk 2015-11-07 03:06:40 UTC (rev 20667)
+++ trunk/www/libxul/files/patch-security_coreconf_MidnightBSD.mk 2015-11-07 03:43:27 UTC (rev 20668)
@@ -1,90 +0,0 @@
---- /dev/null 2011-07-09 08:11:00 -0400
-+++ security/coreconf/MidnightBSD.mk 2011-07-09 08:16:09 -0400
-@@ -0,0 +1,87 @@
-+#
-+# ***** BEGIN LICENSE BLOCK *****
-+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-+#
-+# The contents of this file are subject to the Mozilla Public License Version
-+# 1.1 (the "License"); you may not use this file except in compliance with
-+# the License. You may obtain a copy of the License at
-+# http://www.mozilla.org/MPL/
-+#
-+# Software distributed under the License is distributed on an "AS IS" basis,
-+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-+# for the specific language governing rights and limitations under the
-+# License.
-+#
-+# The Original Code is the Netscape security libraries.
-+#
-+# The Initial Developer of the Original Code is
-+# Netscape Communications Corporation.
-+# Portions created by the Initial Developer are Copyright (C) 1994-2000
-+# the Initial Developer. All Rights Reserved.
-+#
-+# Contributor(s):
-+#
-+# Alternatively, the contents of this file may be used under the terms of
-+# either the GNU General Public License Version 2 or later (the "GPL"), or
-+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-+# in which case the provisions of the GPL or the LGPL are applicable instead
-+# of those above. If you wish to allow use of your version of this file only
-+# under the terms of either the GPL or the LGPL, and not to allow others to
-+# use your version of this file under the terms of the MPL, indicate your
-+# decision by deleting the provisions above and replace them with the notice
-+# and other provisions required by the GPL or the LGPL. If you do not delete
-+# the provisions above, a recipient may use your version of this file under
-+# the terms of any one of the MPL, the GPL or the LGPL.
-+#
-+# ***** END LICENSE BLOCK *****
-+
-+include $(CORE_DEPTH)/coreconf/UNIX.mk
-+
-+DEFAULT_COMPILER = gcc
-+CC = gcc
-+CCC = g++
-+RANLIB = ranlib
-+
-+CPU_ARCH = $(OS_TEST)
-+ifeq ($(CPU_ARCH),i386)
-+CPU_ARCH = x86
-+endif
-+ifeq ($(CPU_ARCH),pc98)
-+CPU_ARCH = x86
-+endif
-+
-+OS_CFLAGS = $(DSO_CFLAGS) -ansi -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
-+
-+DSO_CFLAGS = -fPIC
-+DSO_LDOPTS = -shared -Wl,-soname -Wl,$(notdir $@)
-+
-+#
-+# The default implementation strategy for MidnightBSD is pthreads.
-+#
-+ifndef CLASSIC_NSPR
-+USE_PTHREADS = 1
-+DEFINES += -D_THREAD_SAFE -D_REENTRANT
-+OS_LIBS += -pthread
-+DSO_LDOPTS += -pthread
-+endif
-+
-+ARCH = midnightbsd
-+
-+MOZ_OBJFORMAT := $(shell test -x /usr/bin/objformat && /usr/bin/objformat || echo elf)
-+
-+ifeq ($(MOZ_OBJFORMAT),elf)
-+DLL_SUFFIX = so
-+else
-+DLL_SUFFIX = so.1.0
-+endif
-+
-+MKSHLIB = $(CC) $(DSO_LDOPTS)
-+ifdef MAPFILE
-+ MKSHLIB += -Wl,--version-script,$(MAPFILE)
-+endif
-+PROCESS_MAP_FILE = grep -v ';-' $< | \
-+ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
-+
-+G++INCLUDES = -I/usr/include/g++
-+
-+#INCLUDES += -I/usr/local/include
Deleted: trunk/www/libxul/files/patch-security_manager_ssl_src_nsNSSComponent.cpp
===================================================================
--- trunk/www/libxul/files/patch-security_manager_ssl_src_nsNSSComponent.cpp 2015-11-07 03:06:40 UTC (rev 20667)
+++ trunk/www/libxul/files/patch-security_manager_ssl_src_nsNSSComponent.cpp 2015-11-07 03:43:27 UTC (rev 20668)
@@ -1,10 +0,0 @@
---- 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"
Deleted: trunk/www/libxul/files/patch-storage_build_Makefile.in
===================================================================
--- trunk/www/libxul/files/patch-storage_build_Makefile.in 2015-11-07 03:06:40 UTC (rev 20667)
+++ trunk/www/libxul/files/patch-storage_build_Makefile.in 2015-11-07 03:43:27 UTC (rev 20668)
@@ -1,10 +0,0 @@
---- storage/build/Makefile.in.orig Tue Feb 21 11:18:56 2006
-+++ storage/build/Makefile.in Sun Nov 5 16:16:06 2006
-@@ -77,6 +77,7 @@
- $(EXTRA_DSO_LIBS) \
- $(MOZ_COMPONENT_LIBS) \
- $(MOZ_JS_LIBS) \
-+ %%PTHREAD_LIBS%% \
- $(NULL)
-
- include $(topsrcdir)/config/rules.mk
Deleted: trunk/www/libxul/files/patch-toolkit_library_Makefile.in
===================================================================
--- trunk/www/libxul/files/patch-toolkit_library_Makefile.in 2015-11-07 03:06:40 UTC (rev 20667)
+++ trunk/www/libxul/files/patch-toolkit_library_Makefile.in 2015-11-07 03:43:27 UTC (rev 20668)
@@ -1,11 +0,0 @@
---- 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
Added: trunk/www/libxul/files/patch-toolkit_mozapps_installer_packager_mk
===================================================================
--- trunk/www/libxul/files/patch-toolkit_mozapps_installer_packager_mk (rev 0)
+++ trunk/www/libxul/files/patch-toolkit_mozapps_installer_packager_mk 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,13 @@
+$OpenBSD: patch-toolkit_mozapps_installer_packager_mk,v 1.11 2012/06/11 15:29:56 landry Exp $
+install headers/idl/sdk libs only if xulrunner
+--- toolkit/mozapps/installer/packager.mk.orig Fri Jun 1 14:04:20 2012
++++ toolkit/mozapps/installer/packager.mk Tue Jun 5 07:55:51 2012
+@@ -886,7 +886,7 @@ endif
+ $(NSINSTALL) -D $(DESTDIR)$(bindir)
+ $(RM) -f $(DESTDIR)$(bindir)/$(MOZ_APP_NAME)
+ ln -s $(installdir)/$(MOZ_APP_NAME) $(DESTDIR)$(bindir)
+-ifdef INSTALL_SDK # Here comes the hard part
++ifeq ($(MOZ_APP_NAME),xulrunner)
+ $(NSINSTALL) -D $(DESTDIR)$(includedir)
+ (cd $(DIST)/include && tar $(TAR_CREATE_FLAGS) - .) | \
+ (cd $(DESTDIR)$(includedir) && tar -xf -)
Property changes on: trunk/www/libxul/files/patch-toolkit_mozapps_installer_packager_mk
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Deleted: trunk/www/libxul/files/patch-xpcom_base_nsStackWalk.cpp
===================================================================
--- trunk/www/libxul/files/patch-xpcom_base_nsStackWalk.cpp 2015-11-07 03:06:40 UTC (rev 20667)
+++ trunk/www/libxul/files/patch-xpcom_base_nsStackWalk.cpp 2015-11-07 03:43:27 UTC (rev 20668)
@@ -1,11 +0,0 @@
---- 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
-
Deleted: trunk/www/libxul/files/patch-xpcom_glue_standalone_Makefile.in
===================================================================
--- trunk/www/libxul/files/patch-xpcom_glue_standalone_Makefile.in 2015-11-07 03:06:40 UTC (rev 20667)
+++ trunk/www/libxul/files/patch-xpcom_glue_standalone_Makefile.in 2015-11-07 03:43:27 UTC (rev 20668)
@@ -1,11 +0,0 @@
---- xpcom/glue/standalone/Makefile.in.orig 2011-07-09 10:56:12 -0400
-+++ xpcom/glue/standalone/Makefile.in 2011-07-09 10:56:34 -0400
-@@ -62,7 +62,7 @@
- ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
- LINKSRC = nsGlueLinkingWin.cpp
- endif
--ifneq (,$(filter AIX DragonFly FreeBSD Linux NetBSD OpenBSD SunOS,$(OS_ARCH)))
-+ifneq (,$(filter AIX DragonFly MidnightBSD FreeBSD Linux NetBSD OpenBSD SunOS,$(OS_ARCH)))
- LINKSRC = nsGlueLinkingDlopen.cpp
- endif
- ifeq (OS2,$(OS_ARCH))
Deleted: trunk/www/libxul/files/patch-xpcom_reflect_xptcall_public_xptcstubsdecl.inc
===================================================================
--- trunk/www/libxul/files/patch-xpcom_reflect_xptcall_public_xptcstubsdecl.inc 2015-11-07 03:06:40 UTC (rev 20667)
+++ trunk/www/libxul/files/patch-xpcom_reflect_xptcall_public_xptcstubsdecl.inc 2015-11-07 03:43:27 UTC (rev 20668)
@@ -1,11 +0,0 @@
---- xpcom/reflect/xptcall/public/xptcstubsdecl.inc.orig Tue Mar 16 03:07:25 2004
-+++ xpcom/reflect/xptcall/public/xptcstubsdecl.inc Fri Mar 19 15:58:14 2004
-@@ -8,7 +8,7 @@
- * 1 is AddRef
- * 2 is Release
- */
--#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__))
-+#if !defined(__ia64)
- NS_IMETHOD Stub3();
- NS_IMETHOD Stub4();
- NS_IMETHOD Stub5();
Deleted: trunk/www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in
===================================================================
--- trunk/www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in 2015-11-07 03:06:40 UTC (rev 20667)
+++ trunk/www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in 2015-11-07 03:43:27 UTC (rev 20668)
@@ -1,92 +0,0 @@
---- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2011-04-20 17:17:01 -0400
-+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in 2011-07-09 00:48:23 -0400
-@@ -73,10 +73,13 @@
- DEFINES += -DKEEP_STACK_16_BYTE_ALIGNED
- CPPSRCS := xptcinvoke_unixish_x86.cpp xptcstubs_unixish_x86.cpp
- endif
-+ifeq (x86_64,$(OS_TEST))
-+CPPSRCS := xptcinvoke_x86_64_linux.cpp xptcstubs_x86_64_linux.cpp
-+endif
- endif
- endif
-
--ifneq (,$(filter FreeBSD NetBSD OpenBSD BSD_OS,$(OS_ARCH)))
-+ifneq (,$(filter FreeBSD NetBSD OpenBSD MidnightBSD BSD_OS,$(OS_ARCH)))
- ifeq (86,$(findstring 86,$(OS_TEST)))
- CPPSRCS := xptcinvoke_unixish_x86.cpp xptcstubs_unixish_x86.cpp
- endif
-@@ -96,7 +99,7 @@
- endif
- endif
- # IA64 Linux
--ifneq (,$(filter Linux,$(OS_ARCH)))
-+ifneq (,$(filter Linux MidnightBSD,$(OS_ARCH)))
- 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),MidnightBSDamd64)
-+CPPSRCS := xptcinvoke_amd64_openbsd.cpp xptcstubs_amd64_openbsd.cpp
- endif
- #
- # BeOS/Intel (uses the same unixish_x86 code)
-@@ -165,9 +168,15 @@
- ASFILES := xptcinvoke_asm_osf1_alpha.s xptcstubs_asm_osf1_alpha.s
- endif
- #
-+# FreeBSD/Alpha
-+#
-+ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDalpha)
-+CPPSRCS := xptcinvoke_freebsd_alpha.cpp xptcstubs_freebsd_alpha.cpp
-+endif
-+#
- # Linux/Alpha
- #
--ifneq (,$(filter Linuxalpha FreeBSDalpha NetBSDalpha,$(OS_ARCH)$(OS_TEST)))
-+ifneq (,$(filter Linuxalpha NetBSDalpha,$(OS_ARCH)$(OS_TEST)))
- CPPSRCS := xptcinvoke_linux_alpha.cpp xptcstubs_linux_alpha.cpp
- endif
- #
-@@ -322,7 +331,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
-@@ -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 @@
- ASFILES := xptcinvoke_asm_sparc_netbsd.s xptcstubs_asm_sparc_netbsd.s
- endif
- #
-+# FreeBSD/SPARC64
-+#
-+ifeq ($(OS_ARCH),MidnightBSD)
-+ifneq (,$(findstring sparc,$(OS_TEST)))
-+CPPSRCS := xptcinvoke_sparc64_openbsd.cpp xptcstubs_sparc64_openbsd.cpp
-+ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.s
-+endif
-+endif
-+#
- # OpenBSD/SPARC
- #
- ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDsparc)
Deleted: trunk/www/libxul/files/patch-xptcall-amd64
===================================================================
--- trunk/www/libxul/files/patch-xptcall-amd64 2015-11-07 03:06:40 UTC (rev 20667)
+++ trunk/www/libxul/files/patch-xptcall-amd64 2015-11-07 03:43:27 UTC (rev 20668)
@@ -1,380 +0,0 @@
---- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_amd64_freebsd.cpp.orig 2009-10-02 22:13:13.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_amd64_freebsd.cpp 2009-10-02 22:41:36.000000000 +0200
-@@ -0,0 +1,174 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-+// Platform specific code to invoke XPCOM methods on native objects
-+
-+#include "xptcprivate.h"
-+
-+// 6 integral parameters are passed in registers
-+const PRUint32 GPR_COUNT = 6;
-+
-+// 8 floating point parameters are passed in SSE registers
-+const PRUint32 FPR_COUNT = 8;
-+
-+// Remember that these 'words' are 64-bit long
-+static inline void
-+invoke_count_words(PRUint32 paramCount, nsXPTCVariant * s,
-+ PRUint32 & nr_gpr, PRUint32 & nr_fpr, PRUint32 & nr_stack)
-+{
-+ nr_gpr = 1; // skip one GP register for 'that'
-+ nr_fpr = 0;
-+ nr_stack = 0;
-+
-+ /* Compute number of eightbytes of class MEMORY. */
-+ for (uint32 i = 0; i < paramCount; i++, s++) {
-+ if (!s->IsPtrData()
-+ && (s->type == nsXPTType::T_FLOAT || s->type == nsXPTType::T_DOUBLE)) {
-+ if (nr_fpr < FPR_COUNT)
-+ nr_fpr++;
-+ else
-+ nr_stack++;
-+ }
-+ else {
-+ if (nr_gpr < GPR_COUNT)
-+ nr_gpr++;
-+ else
-+ nr_stack++;
-+ }
-+ }
-+}
-+
-+static void
-+invoke_copy_to_stack(PRUint64 * d, PRUint32 paramCount, nsXPTCVariant * s,
-+ PRUint64 * gpregs, double * fpregs)
-+{
-+ PRUint32 nr_gpr = 1; // skip one GP register for 'that'
-+ PRUint32 nr_fpr = 0;
-+ PRUint64 value;
-+
-+ for (uint32 i = 0; i < paramCount; i++, s++) {
-+ if (s->IsPtrData())
-+ value = (PRUint64) s->ptr;
-+ else {
-+ switch (s->type) {
-+ case nsXPTType::T_FLOAT: break;
-+ case nsXPTType::T_DOUBLE: break;
-+ case nsXPTType::T_I8: value = s->val.i8; break;
-+ case nsXPTType::T_I16: value = s->val.i16; break;
-+ case nsXPTType::T_I32: value = s->val.i32; break;
-+ case nsXPTType::T_I64: value = s->val.i64; break;
-+ case nsXPTType::T_U8: value = s->val.u8; break;
-+ case nsXPTType::T_U16: value = s->val.u16; break;
-+ case nsXPTType::T_U32: value = s->val.u32; break;
-+ case nsXPTType::T_U64: value = s->val.u64; break;
-+ case nsXPTType::T_BOOL: value = s->val.b; break;
-+ case nsXPTType::T_CHAR: value = s->val.c; break;
-+ case nsXPTType::T_WCHAR: value = s->val.wc; break;
-+ default: value = (PRUint64) s->val.p; break;
-+ }
-+ }
-+
-+ if (!s->IsPtrData() && s->type == nsXPTType::T_DOUBLE) {
-+ if (nr_fpr < FPR_COUNT)
-+ fpregs[nr_fpr++] = s->val.d;
-+ else {
-+ *((double *)d) = s->val.d;
-+ d++;
-+ }
-+ }
-+ else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
-+ if (nr_fpr < FPR_COUNT)
-+ // The value in %xmm register is already prepared to
-+ // be retrieved as a float. Therefore, we pass the
-+ // value verbatim, as a double without conversion.
-+ fpregs[nr_fpr++] = s->val.d;
-+ else {
-+ *((float *)d) = s->val.f;
-+ d++;
-+ }
-+ }
-+ else {
-+ if (nr_gpr < GPR_COUNT)
-+ gpregs[nr_gpr++] = value;
-+ else
-+ *d++ = value;
-+ }
-+ }
-+}
-+
-+extern "C"
-+EXPORT_XPCOM_API(nsresult)
-+NS_InvokeByIndex_P(nsISupports * that, PRUint32 methodIndex,
-+ PRUint32 paramCount, nsXPTCVariant * params)
-+{
-+ PRUint32 nr_gpr, nr_fpr, nr_stack;
-+ invoke_count_words(paramCount, params, nr_gpr, nr_fpr, nr_stack);
-+
-+ // Stack, if used, must be 16-bytes aligned
-+ if (nr_stack)
-+ nr_stack = (nr_stack + 1) & ~1;
-+
-+ // Load parameters to stack, if necessary
-+ PRUint64 *stack = (PRUint64 *) __builtin_alloca(nr_stack * 8);
-+ PRUint64 gpregs[GPR_COUNT];
-+ double fpregs[FPR_COUNT];
-+ invoke_copy_to_stack(stack, paramCount, params, gpregs, fpregs);
-+
-+ // Load FPR registers from fpregs[]
-+ register double d0 asm("xmm0");
-+ register double d1 asm("xmm1");
-+ register double d2 asm("xmm2");
-+ register double d3 asm("xmm3");
-+ register double d4 asm("xmm4");
-+ register double d5 asm("xmm5");
-+ register double d6 asm("xmm6");
-+ register double d7 asm("xmm7");
-+
-+ switch (nr_fpr) {
-+#define ARG_FPR(N) \
-+ case N+1: d##N = fpregs[N];
-+ ARG_FPR(7);
-+ ARG_FPR(6);
-+ ARG_FPR(5);
-+ ARG_FPR(4);
-+ ARG_FPR(3);
-+ ARG_FPR(2);
-+ ARG_FPR(1);
-+ ARG_FPR(0);
-+ case 0:;
-+#undef ARG_FPR
-+ }
-+
-+ // Load GPR registers from gpregs[]
-+ register PRUint64 a0 asm("rdi");
-+ register PRUint64 a1 asm("rsi");
-+ register PRUint64 a2 asm("rdx");
-+ register PRUint64 a3 asm("rcx");
-+ register PRUint64 a4 asm("r8");
-+ register PRUint64 a5 asm("r9");
-+
-+ switch (nr_gpr) {
-+#define ARG_GPR(N) \
-+ case N+1: a##N = gpregs[N];
-+ ARG_GPR(5);
-+ ARG_GPR(4);
-+ ARG_GPR(3);
-+ ARG_GPR(2);
-+ ARG_GPR(1);
-+ case 1: a0 = (PRUint64) that;
-+ case 0:;
-+#undef ARG_GPR
-+ }
-+
-+ // Ensure that assignments to SSE registers won't be optimized away
-+ asm("" ::
-+ "x" (d0), "x" (d1), "x" (d2), "x" (d3),
-+ "x" (d4), "x" (d5), "x" (d6), "x" (d7));
-+
-+ // Get pointer to method
-+ PRUint64 methodAddress = *((PRUint64 *)that);
-+ methodAddress += 8 * methodIndex;
-+ methodAddress = *((PRUint64 *)methodAddress);
-+
-+ typedef PRUint32 (*Method)(PRUint64, PRUint64, PRUint64, PRUint64, PRUint64, PRUint64);
-+ PRUint32 result = ((Method)methodAddress)(a0, a1, a2, a3, a4, a5);
-+ return result;
-+}
---- xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_freebsd.cpp.orig 2009-10-02 22:13:13.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_freebsd.cpp 2009-10-02 22:39:37.000000000 +0200
-@@ -0,0 +1,200 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-+
-+// Implement shared vtbl methods.
-+
-+#include "xptcprivate.h"
-+#include "xptiprivate.h"
-+
-+// The Linux/x86-64 ABI passes the first 6 integral parameters and the
-+// first 8 floating point parameters in registers (rdi, rsi, rdx, rcx,
-+// r8, r9 and xmm0-xmm7), no stack space is allocated for these by the
-+// caller. The rest of the parameters are passed in the callers stack
-+// area.
-+
-+const PRUint32 PARAM_BUFFER_COUNT = 16;
-+const PRUint32 GPR_COUNT = 6;
-+const PRUint32 FPR_COUNT = 8;
-+
-+// PrepareAndDispatch() is called by SharedStub() and calls the actual method.
-+//
-+// - 'args[]' contains the arguments passed on stack
-+// - 'gpregs[]' contains the arguments passed in integer registers
-+// - 'fpregs[]' contains the arguments passed in floating point registers
-+//
-+// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
-+// and then the method gets called.
-+
-+extern "C" nsresult
-+PrepareAndDispatch(nsXPTCStubBase * self, PRUint32 methodIndex,
-+ PRUint64 * args, PRUint64 * gpregs, double *fpregs)
-+{
-+ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-+ nsXPTCMiniVariant* dispatchParams = NULL;
-+ const nsXPTMethodInfo* info;
-+ PRUint32 paramCount;
-+ PRUint32 i;
-+ nsresult result = NS_ERROR_FAILURE;
-+
-+ NS_ASSERTION(self,"no self");
-+
-+ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
-+ NS_ASSERTION(info,"no method info");
-+ if (! info)
-+ return NS_ERROR_UNEXPECTED;
-+
-+ paramCount = info->GetParamCount();
-+
-+ // setup variant array pointer
-+ if(paramCount > PARAM_BUFFER_COUNT)
-+ dispatchParams = new nsXPTCMiniVariant[paramCount];
-+ else
-+ dispatchParams = paramBuffer;
-+
-+ NS_ASSERTION(dispatchParams,"no place for params");
-+ if (! dispatchParams)
-+ return NS_ERROR_OUT_OF_MEMORY;
-+
-+ PRUint64* ap = args;
-+ PRUint32 nr_gpr = 1; // skip one GPR register for 'that'
-+ PRUint32 nr_fpr = 0;
-+ PRUint64 value;
-+
-+ for(i = 0; i < paramCount; i++) {
-+ const nsXPTParamInfo& param = info->GetParam(i);
-+ const nsXPTType& type = param.GetType();
-+ nsXPTCMiniVariant* dp = &dispatchParams[i];
-+
-+ if (!param.IsOut() && type == nsXPTType::T_DOUBLE) {
-+ if (nr_fpr < FPR_COUNT)
-+ dp->val.d = fpregs[nr_fpr++];
-+ else
-+ dp->val.d = *(double*) ap++;
-+ continue;
-+ }
-+ else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
-+ if (nr_fpr < FPR_COUNT)
-+ // The value in %xmm register is already prepared to
-+ // be retrieved as a float. Therefore, we pass the
-+ // value verbatim, as a double without conversion.
-+ dp->val.d = *(double*) ap++;
-+ else
-+ dp->val.f = *(float*) ap++;
-+ continue;
-+ }
-+ else {
-+ if (nr_gpr < GPR_COUNT)
-+ value = gpregs[nr_gpr++];
-+ else
-+ value = *ap++;
-+ }
-+
-+ if (param.IsOut() || !type.IsArithmetic()) {
-+ dp->val.p = (void*) value;
-+ continue;
-+ }
-+
-+ switch (type) {
-+ case nsXPTType::T_I8: dp->val.i8 = (PRInt8) value; break;
-+ case nsXPTType::T_I16: dp->val.i16 = (PRInt16) value; break;
-+ case nsXPTType::T_I32: dp->val.i32 = (PRInt32) value; break;
-+ case nsXPTType::T_I64: dp->val.i64 = (PRInt64) value; break;
-+ case nsXPTType::T_U8: dp->val.u8 = (PRUint8) value; break;
-+ case nsXPTType::T_U16: dp->val.u16 = (PRUint16) value; break;
-+ case nsXPTType::T_U32: dp->val.u32 = (PRUint32) value; break;
-+ case nsXPTType::T_U64: dp->val.u64 = (PRUint64) value; break;
-+ case nsXPTType::T_BOOL: dp->val.b = (PRBool) value; break;
-+ case nsXPTType::T_CHAR: dp->val.c = (char) value; break;
-+ case nsXPTType::T_WCHAR: dp->val.wc = (wchar_t) value; break;
-+
-+ default:
-+ NS_ASSERTION(0, "bad type");
-+ break;
-+ }
-+ }
-+
-+ result = self->mOuter->CallMethod((PRUint16)methodIndex, info,
-+ dispatchParams);
-+
-+ if (dispatchParams != paramBuffer)
-+ delete [] dispatchParams;
-+
-+ return result;
-+}
-+
-+#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
-+// Linux/x86-64 uses gcc >= 3.1
-+#define STUB_ENTRY(n) \
-+asm(".section \".text\"\n\t" \
-+ ".align 2\n\t" \
-+ ".if " #n " < 10\n\t" \
-+ ".globl _ZN14nsXPTCStubBase5Stub" #n "Ev\n\t" \
-+ ".type _ZN14nsXPTCStubBase5Stub" #n "Ev, at function\n" \
-+ "_ZN14nsXPTCStubBase5Stub" #n "Ev:\n\t" \
-+ ".elseif " #n " < 100\n\t" \
-+ ".globl _ZN14nsXPTCStubBase6Stub" #n "Ev\n\t" \
-+ ".type _ZN14nsXPTCStubBase6Stub" #n "Ev, at function\n" \
-+ "_ZN14nsXPTCStubBase6Stub" #n "Ev:\n\t" \
-+ ".elseif " #n " < 1000\n\t" \
-+ ".globl _ZN14nsXPTCStubBase7Stub" #n "Ev\n\t" \
-+ ".type _ZN14nsXPTCStubBase7Stub" #n "Ev, at function\n" \
-+ "_ZN14nsXPTCStubBase7Stub" #n "Ev:\n\t" \
-+ ".else\n\t" \
-+ ".err \"stub number " #n " >= 1000 not yet supported\"\n\t" \
-+ ".endif\n\t" \
-+ "movl $" #n ", %eax\n\t" \
-+ "jmp SharedStub\n\t" \
-+ ".if " #n " < 10\n\t" \
-+ ".size _ZN14nsXPTCStubBase5Stub" #n "Ev,.-_ZN14nsXPTCStubBase5Stub" #n "Ev\n\t" \
-+ ".elseif " #n " < 100\n\t" \
-+ ".size _ZN14nsXPTCStubBase6Stub" #n "Ev,.-_ZN14nsXPTCStubBase6Stub" #n "Ev\n\t" \
-+ ".else\n\t" \
-+ ".size _ZN14nsXPTCStubBase7Stub" #n "Ev,.-_ZN14nsXPTCStubBase7Stub" #n "Ev\n\t" \
-+ ".endif");
-+
-+// static nsresult SharedStub(PRUint32 methodIndex)
-+asm(".section \".text\"\n\t"
-+ ".align 2\n\t"
-+ ".type SharedStub, at function\n\t"
-+ "SharedStub:\n\t"
-+ // make room for gpregs (48), fpregs (64)
-+ "pushq %rbp\n\t"
-+ "movq %rsp,%rbp\n\t"
-+ "subq $112,%rsp\n\t"
-+ // save GP registers
-+ "movq %rdi,-112(%rbp)\n\t"
-+ "movq %rsi,-104(%rbp)\n\t"
-+ "movq %rdx, -96(%rbp)\n\t"
-+ "movq %rcx, -88(%rbp)\n\t"
-+ "movq %r8 , -80(%rbp)\n\t"
-+ "movq %r9 , -72(%rbp)\n\t"
-+ "leaq -112(%rbp),%rcx\n\t"
-+ // save FP registers
-+ "movsd %xmm0,-64(%rbp)\n\t"
-+ "movsd %xmm1,-56(%rbp)\n\t"
-+ "movsd %xmm2,-48(%rbp)\n\t"
-+ "movsd %xmm3,-40(%rbp)\n\t"
-+ "movsd %xmm4,-32(%rbp)\n\t"
-+ "movsd %xmm5,-24(%rbp)\n\t"
-+ "movsd %xmm6,-16(%rbp)\n\t"
-+ "movsd %xmm7, -8(%rbp)\n\t"
-+ "leaq -64(%rbp),%r8\n\t"
-+ // rdi has the 'self' pointer already
-+ "movl %eax,%esi\n\t"
-+ "leaq 16(%rbp),%rdx\n\t"
-+ "call PrepareAndDispatch\n\t"
-+ "leave\n\t"
-+ "ret\n\t"
-+ ".size SharedStub,.-SharedStub");
-+
-+#define SENTINEL_ENTRY(n) \
-+nsresult nsXPTCStubBase::Sentinel##n() \
-+{ \
-+ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-+ return NS_ERROR_NOT_IMPLEMENTED; \
-+}
-+
-+#include "xptcstubsdef.inc"
-+
-+#else
-+#error "can't find a compiler to use"
-+#endif /* __GNUC__ */
Deleted: trunk/www/libxul/files/patch-xptcall-sparc64
===================================================================
--- trunk/www/libxul/files/patch-xptcall-sparc64 2015-11-07 03:06:40 UTC (rev 20667)
+++ trunk/www/libxul/files/patch-xptcall-sparc64 2015-11-07 03:43:27 UTC (rev 20668)
@@ -1,329 +0,0 @@
---- xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_freebsd.cpp.orig 2009-09-30 22:48:25.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_freebsd.cpp 2009-09-30 23:09:48.000000000 +0200
-@@ -0,0 +1,125 @@
-+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-+ *
-+ * The contents of this file are subject to the Mozilla Public
-+ * License Version 1.1 (the "License"); you may not use this file
-+ * except in compliance with the License. You may obtain a copy of
-+ * the License at http://www.mozilla.org/MPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS
-+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-+ * implied. See the License for the specific language governing
-+ * rights and limitations under the License.
-+ *
-+ * The Original Code is mozilla.org code.
-+ *
-+ * The Initial Developer of the Original Code is Netscape
-+ * Communications Corporation. Portions created by Netscape are
-+ * Copyright (C) 2001 Netscape Communications Corporation. All
-+ * Rights Reserved.
-+ *
-+ * Contributor(s):
-+ * Stuart Parmenter <pavlov at netscape.com>
-+ */
-+
-+/* Implement shared vtbl methods. */
-+
-+#include "xptcprivate.h"
-+#include "xptiprivate.h"
-+
-+#if defined(sparc) || defined(__sparc__)
-+
-+extern "C" nsresult
-+PrepareAndDispatch(nsXPTCStubBase* self, PRUint64 methodIndex, PRUint64* args)
-+{
-+
-+#define PARAM_BUFFER_COUNT 16
-+
-+ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-+ nsXPTCMiniVariant* dispatchParams = NULL;
-+ const nsXPTMethodInfo* info;
-+ PRUint8 paramCount;
-+ PRUint8 i;
-+ nsresult result = NS_ERROR_FAILURE;
-+
-+ NS_ASSERTION(self,"no self");
-+
-+ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
-+ NS_ASSERTION(info,"no method info");
-+ if (! info)
-+ return NS_ERROR_UNEXPECTED;
-+
-+ paramCount = info->GetParamCount();
-+
-+ // setup variant array pointer
-+ if(paramCount > PARAM_BUFFER_COUNT)
-+ dispatchParams = new nsXPTCMiniVariant[paramCount];
-+ else
-+ dispatchParams = paramBuffer;
-+
-+ NS_ASSERTION(dispatchParams,"no place for params");
-+
-+ if (! dispatchParams)
-+ return NS_ERROR_OUT_OF_MEMORY;
-+
-+ PRUint64* ap = args;
-+ for(i = 0; i < paramCount; i++, ap++)
-+ {
-+ const nsXPTParamInfo& param = info->GetParam(i);
-+ const nsXPTType& type = param.GetType();
-+ nsXPTCMiniVariant* dp = &dispatchParams[i];
-+
-+ if(param.IsOut() || !type.IsArithmetic())
-+ {
-+ dp->val.p = (void*) *ap;
-+ continue;
-+ }
-+ // else
-+ switch(type)
-+ {
-+ case nsXPTType::T_I8 : dp->val.i8 = *((PRInt64*) ap); break;
-+ case nsXPTType::T_I16 : dp->val.i16 = *((PRInt64*) ap); break;
-+ case nsXPTType::T_I32 : dp->val.i32 = *((PRInt64*) ap); break;
-+ case nsXPTType::T_DOUBLE : dp->val.d = *((double*) ap); break;
-+ case nsXPTType::T_U64 : dp->val.u64 = *((PRUint64*) ap); break;
-+ case nsXPTType::T_I64 : dp->val.i64 = *((PRInt64*) ap); break;
-+ case nsXPTType::T_U8 : dp->val.u8 = *((PRUint64*) ap); break;
-+ case nsXPTType::T_U16 : dp->val.u16 = *((PRUint64*)ap); break;
-+ case nsXPTType::T_U32 : dp->val.u32 = *((PRUint64*)ap); break;
-+ case nsXPTType::T_FLOAT : dp->val.f = ((float*) ap)[1]; break;
-+ case nsXPTType::T_BOOL : dp->val.b = *((PRInt64*) ap); break;
-+ case nsXPTType::T_CHAR : dp->val.c = *((PRUint64*) ap); break;
-+ case nsXPTType::T_WCHAR : dp->val.wc = *((PRInt64*) ap); break;
-+ default:
-+ NS_ASSERTION(0, "bad type");
-+ break;
-+ }
-+ }
-+
-+ result = self->mOuter->CallMethod((PRUint16)methodIndex, info,
-+ dispatchParams);
-+
-+ if(dispatchParams != paramBuffer)
-+ delete [] dispatchParams;
-+
-+ return result;
-+}
-+
-+extern "C" int SharedStub(int, int*);
-+
-+#define STUB_ENTRY(n) \
-+nsresult nsXPTCStubBase::Stub##n() \
-+{ \
-+ int dummy; /* defeat tail-call optimization */ \
-+ return SharedStub(n, &dummy); \
-+}
-+
-+#define SENTINEL_ENTRY(n) \
-+nsresult nsXPTCStubBase::Sentinel##n() \
-+{ \
-+ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-+ return NS_ERROR_NOT_IMPLEMENTED; \
-+}
-+
-+#include "xptcstubsdef.inc"
-+
-+#endif /* sparc || __sparc__ */
---- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc64_freebsd.s.orig 2009-09-30 22:48:25.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc64_freebsd.s 2009-09-30 22:48:25.000000000 +0200
-@@ -0,0 +1,104 @@
-+/* -*- Mode: asm; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-+ *
-+ * The contents of this file are subject to the Mozilla Public
-+ * License Version 1.1 (the "License"); you may not use this file
-+ * except in compliance with the License. You may obtain a copy of
-+ * the License at http://www.mozilla.org/MPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS
-+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-+ * implied. See the License for the specific language governing
-+ * rights and limitations under the License.
-+ *
-+ * The Original Code is mozilla.org code.
-+ *
-+ * The Initial Developer of the Original Code is Netscape
-+ * Communications Corporation. Portions created by Netscape are
-+ * Copyright (C) 2001 Netscape Communications Corporation. All
-+ * Rights Reserved.
-+ *
-+ * Contributor(s):
-+ * Stuart Parmenter <pavlov at netscape.com>
-+ * Chris Seawood <cls at seawood.org>
-+ */
-+
-+/*
-+ Platform specific code to invoke XPCOM methods on native objects
-+ for sparcv9 Solaris.
-+
-+ See the SPARC Compliance Definition (SCD) Chapter 3
-+ for more information about what is going on here, including
-+ the use of BIAS (0x7ff).
-+ The SCD is available from http://www.sparc.com/.
-+*/
-+
-+ .global NS_InvokeByIndex_P
-+ .type NS_InvokeByIndex_P, #function
-+
-+/*
-+ NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
-+ PRUint32 paramCount, nsXPTCVariant* params);
-+
-+*/
-+NS_InvokeByIndex_P:
-+ save %sp,-(128 + 64),%sp ! room for the register window and
-+ ! struct pointer, rounded up to 0 % 64
-+ sll %i2,4,%l0 ! assume the worst case
-+ ! paramCount * 2 * 8 bytes
-+ cmp %l0, 0 ! are there any args? If not,
-+ be .invoke ! no need to copy args to stack
-+ nop
-+
-+ sub %sp,%l0,%sp ! create the additional stack space
-+ add %sp,0x7ff+136,%o0 ! step past the register window, the
-+ ! struct result pointer and the 'this' slot
-+ mov %i2,%o1 ! paramCount
-+ call invoke_copy_to_stack
-+ mov %i3,%o2 ! params
-+
-+!
-+! load arguments from stack into the outgoing registers
-+! BIAS is 0x7ff (2047)
-+!
-+
-+! load the %o1..5 64bit (extended word) output registers registers
-+ ldx [%sp + 0x7ff + 136],%o1 ! %i1
-+ ldx [%sp + 0x7ff + 144],%o2 ! %i2
-+ ldx [%sp + 0x7ff + 152],%o3 ! %i3
-+ ldx [%sp + 0x7ff + 160],%o4 ! %i4
-+ ldx [%sp + 0x7ff + 168],%o5 ! %i5
-+
-+! load the even number double registers starting with %d2
-+ ldd [%sp + 0x7ff + 136],%f2
-+ ldd [%sp + 0x7ff + 144],%f4
-+ ldd [%sp + 0x7ff + 152],%f6
-+ ldd [%sp + 0x7ff + 160],%f8
-+ ldd [%sp + 0x7ff + 168],%f10
-+ ldd [%sp + 0x7ff + 176],%f12
-+ ldd [%sp + 0x7ff + 184],%f14
-+ ldd [%sp + 0x7ff + 192],%f16
-+ ldd [%sp + 0x7ff + 200],%f18
-+ ldd [%sp + 0x7ff + 208],%f20
-+ ldd [%sp + 0x7ff + 216],%f22
-+ ldd [%sp + 0x7ff + 224],%f24
-+ ldd [%sp + 0x7ff + 232],%f26
-+ ldd [%sp + 0x7ff + 240],%f28
-+ ldd [%sp + 0x7ff + 248],%f30
-+
-+!
-+! calculate the target address from the vtable
-+!
-+.invoke:
-+ sll %i1,3,%l0 ! index *= 8
-+! add %l0,16,%l0 ! there are 2 extra entries in the vTable (16bytes)
-+ ldx [%i0],%l1 ! *that --> address of vtable
-+ ldx [%l0 + %l1],%l0 ! that->vtable[index * 8 + 16] --> address
-+
-+ jmpl %l0,%o7 ! call the routine
-+ mov %i0,%o0 ! move 'this' pointer to out register
-+
-+ mov %o0,%i0 ! propagate return value
-+ ret
-+ restore
-+
-+ .size NS_InvokeByIndex_P, .-NS_InvokeByIndex_P
---- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_sparc64_freebsd.cpp.orig 2009-09-30 22:48:25.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_sparc64_freebsd.cpp 2009-09-30 22:48:25.000000000 +0200
-@@ -0,0 +1,91 @@
-+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-+ *
-+ * The contents of this file are subject to the Mozilla Public
-+ * License Version 1.1 (the "License"); you may not use this file
-+ * except in compliance with the License. You may obtain a copy of
-+ * the License at http://www.mozilla.org/MPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS
-+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-+ * implied. See the License for the specific language governing
-+ * rights and limitations under the License.
-+ *
-+ * The Original Code is mozilla.org code.
-+ *
-+ * The Initial Developer of the Original Code is Netscape
-+ * Communications Corporation. Portions created by Netscape are
-+ * Copyright (C) 2001 Netscape Communications Corporation. All
-+ * Rights Reserved.
-+ *
-+ * Contributor(s):
-+ * Stuart Parmenter <pavlov at netscape.com>
-+ * Chris Seawood <cls at seawood.org>
-+ */
-+
-+
-+/* Platform specific code to invoke XPCOM methods on native objects */
-+
-+#include "xptcprivate.h"
-+
-+#if !defined(__sparc) && !defined(__sparc__)
-+#error "This code is for Sparc only"
-+#endif
-+
-+/* Prototype specifies unmangled function name */
-+extern "C" PRUint64
-+invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s);
-+
-+extern "C" PRUint64
-+invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s)
-+{
-+ /*
-+ We need to copy the parameters for this function to locals and use them
-+ from there since the parameters occupy the same stack space as the stack
-+ we're trying to populate.
-+ */
-+ PRUint64 *l_d = d;
-+ nsXPTCVariant *l_s = s;
-+ PRUint64 l_paramCount = paramCount;
-+ PRUint64 regCount = 0; // return the number of registers to load from the stack
-+
-+ for(PRUint64 i = 0; i < l_paramCount; i++, l_d++, l_s++)
-+ {
-+ if (regCount < 5) regCount++;
-+
-+ if (l_s->IsPtrData())
-+ {
-+ *l_d = (PRUint64)l_s->ptr;
-+ continue;
-+ }
-+ switch (l_s->type)
-+ {
-+ case nsXPTType::T_I8 : *((PRInt64*)l_d) = l_s->val.i8; break;
-+ case nsXPTType::T_I16 : *((PRInt64*)l_d) = l_s->val.i16; break;
-+ case nsXPTType::T_I32 : *((PRInt64*)l_d) = l_s->val.i32; break;
-+ case nsXPTType::T_I64 : *((PRInt64*)l_d) = l_s->val.i64; break;
-+
-+ case nsXPTType::T_U8 : *((PRUint64*)l_d) = l_s->val.u8; break;
-+ case nsXPTType::T_U16 : *((PRUint64*)l_d) = l_s->val.u16; break;
-+ case nsXPTType::T_U32 : *((PRUint64*)l_d) = l_s->val.u32; break;
-+ case nsXPTType::T_U64 : *((PRUint64*)l_d) = l_s->val.u64; break;
-+
-+ /* in the case of floats, we want to put the bits in to the
-+ 64bit space right justified... floats in the paramter array on
-+ sparcv9 use odd numbered registers.. %f1, %f3, so we have to skip
-+ the space that would be occupied by %f0, %f2, etc.
-+ */
-+ case nsXPTType::T_FLOAT : *(((float*)l_d) + 1) = l_s->val.f; break;
-+ case nsXPTType::T_DOUBLE: *((double*)l_d) = l_s->val.d; break;
-+ case nsXPTType::T_BOOL : *((PRInt64*)l_d) = l_s->val.b; break;
-+ case nsXPTType::T_CHAR : *((PRUint64*)l_d) = l_s->val.c; break;
-+ case nsXPTType::T_WCHAR : *((PRInt64*)l_d) = l_s->val.wc; break;
-+
-+ default:
-+ // all the others are plain pointer types
-+ *((void**)l_d) = l_s->val.p;
-+ break;
-+ }
-+ }
-+
-+ return regCount;
-+}
Added: trunk/www/libxul/files/patch-xulrunner-stub-nsXULStub.cpp
===================================================================
--- trunk/www/libxul/files/patch-xulrunner-stub-nsXULStub.cpp (rev 0)
+++ trunk/www/libxul/files/patch-xulrunner-stub-nsXULStub.cpp 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,12 @@
+--- xulrunner/stub/nsXULStub.cpp~
++++ xulrunner/stub/nsXULStub.cpp
+@@ -160,6 +160,9 @@ main(int argc, char **argv)
+ char greDir[MAXPATHLEN];
+ bool greFound = false;
+
++ setenv("MOZ_GMP_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
++ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
++
+ #if defined(XP_MACOSX)
+ CFBundleRef appBundle = CFBundleGetMainBundle();
+ if (!appBundle)
Property changes on: trunk/www/libxul/files/patch-xulrunner-stub-nsXULStub.cpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-xulrunner_installer_libxul-embedding.pc.in
===================================================================
--- trunk/www/libxul/files/patch-xulrunner_installer_libxul-embedding.pc.in (rev 0)
+++ trunk/www/libxul/files/patch-xulrunner_installer_libxul-embedding.pc.in 2015-11-07 03:43:27 UTC (rev 20668)
@@ -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%
Property changes on: trunk/www/libxul/files/patch-xulrunner_installer_libxul-embedding.pc.in
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-z-bug517422
===================================================================
--- trunk/www/libxul/files/patch-z-bug517422 (rev 0)
+++ trunk/www/libxul/files/patch-z-bug517422 2015-11-07 03:43:27 UTC (rev 20668)
@@ -0,0 +1,582 @@
+# Allow more config/external/ libs built against system-wide version.
+
+diff --git config/Makefile.in config/Makefile.in
+index 5383399..0410004 100644
+--- config/Makefile.in
++++ config/Makefile.in
+@@ -77,6 +77,14 @@ export:: $(export-preqs)
+ -DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \
+ -DMOZ_NATIVE_GRAPHITE2=$(MOZ_NATIVE_GRAPHITE2) \
+ -DMOZ_NATIVE_HARFBUZZ=$(MOZ_NATIVE_HARFBUZZ) \
++ -DMOZ_NATIVE_OGG=$(MOZ_NATIVE_OGG) \
++ -DMOZ_NATIVE_THEORA=$(MOZ_NATIVE_THEORA) \
++ -DMOZ_NATIVE_VORBIS=$(MOZ_NATIVE_VORBIS) \
++ -DMOZ_NATIVE_TREMOR=$(MOZ_NATIVE_TREMOR) \
++ -DMOZ_NATIVE_CELT=$(MOZ_NATIVE_CELT) \
++ -DMOZ_NATIVE_OPUS=$(MOZ_NATIVE_OPUS) \
++ -DMOZ_NATIVE_SPEEX=$(MOZ_NATIVE_SPEEX) \
++ -DMOZ_NATIVE_SOUNDTOUCH=$(MOZ_NATIVE_SOUNDTOUCH) \
+ $(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
+ $(INSTALL) system_wrappers $(DIST)
+
+diff --git config/external/moz.build config/external/moz.build
+index f67c5c7..eb909ce 100644
+--- config/external/moz.build
++++ config/external/moz.build
+@@ -19,10 +19,19 @@ if CONFIG['MOZ_UPDATER']:
+ # There's no "native brotli" yet, but probably in the future...
+ external_dirs += ['modules/brotli']
+
+-if CONFIG['MOZ_VORBIS']:
++if not CONFIG['MOZ_NATIVE_OGG']:
++ external_dirs += ['media/libogg']
++
++if not CONFIG['MOZ_NATIVE_CELT'] or not CONFIG['MOZ_NATIVE_OPUS']:
++ external_dirs += ['media/libopus']
++
++if not CONFIG['MOZ_NATIVE_THEORA']:
++ external_dirs += ['media/libtheora']
++
++if CONFIG['MOZ_VORBIS'] and not CONFIG['MOZ_NATIVE_VORBIS']:
+ external_dirs += ['media/libvorbis']
+
+-if CONFIG['MOZ_TREMOR']:
++if CONFIG['MOZ_TREMOR'] and not CONFIG['MOZ_NATIVE_TREMOR']:
+ external_dirs += ['media/libtremor']
+
+ if CONFIG['MOZ_WEBM']:
+@@ -37,15 +46,16 @@ if CONFIG['MOZ_VPX'] and not CONFIG['MOZ
+ if not CONFIG['MOZ_NATIVE_PNG']:
+ external_dirs += ['media/libpng']
+
++if not CONFIG['MOZ_NATIVE_SPEEX']:
++ external_dirs += ['media/libspeex_resampler']
++
++if not CONFIG['MOZ_NATIVE_SOUNDTOUCH']:
++ external_dirs += ['media/libsoundtouch']
++
+ external_dirs += [
+ 'media/kiss_fft',
+ 'media/libcubeb',
+- 'media/libogg',
+- 'media/libopus',
+- 'media/libtheora',
+- 'media/libspeex_resampler',
+ 'media/libstagefright',
+- 'media/libsoundtouch',
+ ]
+
+ DIRS += ['../../' + i for i in external_dirs]
+diff --git config/system-headers config/system-headers
+index bef567c..9807c29 100644
+--- config/system-headers
++++ config/system-headers
+@@ -1263,7 +1263,6 @@ X11/Xlocale.h
+ X11/Xos.h
+ X11/Xutil.h
+ zmouse.h
+-soundtouch/SoundTouch.h
+ #if MOZ_NATIVE_PNG==1
+ png.h
+ #endif
+@@ -1325,6 +1324,7 @@ vorbis/codec.h
+ theora/theoradec.h
+ tremor/ivorbiscodec.h
+ speex/speex_resampler.h
++soundtouch/SoundTouch.h
+ ogg/ogg.h
+ ogg/os_types.h
+ nestegg/nestegg.h
+@@ -1365,3 +1365,35 @@ graphite2/Segment.h
+ harfbuzz/hb-ot.h
+ harfbuzz/hb.h
+ #endif
++#if MOZ_NATIVE_OGG==1
++ogg/ogg.h
++ogg/os_types.h
++#endif
++#if MOZ_NATIVE_THEORA==1
++theora/theoradec.h
++#endif
++#if MOZ_NATIVE_VORBIS==1
++vorbis/codec.h
++vorbis/vorbisenc.h
++#endif
++#if MOZ_NATIVE_TREMOR==1
++tremor/ivorbiscodec.h
++#endif
++#if MOZ_NATIVE_CELT==1
++celt.h
++celt_header.h
++celt/celt.h
++celt/celt_header.h
++#endif
++#if MOZ_NATIVE_OPUS==1
++opus.h
++opus_multistream.h
++opus/opus.h
++opus/opus_multistream.h
++#endif
++#if MOZ_NATIVE_SPEEX==1
++speex/speex_resampler.h
++#endif
++#if MOZ_NATIVE_SOUNDTOUCH==1
++soundtouch/SoundTouch.h
++#endif
+diff --git configure.in configure.in
+index 87db361..7947626 100644
+--- configure.in
++++ configure.in
+@@ -5223,6 +5223,157 @@ if test "${ac_cv_c_attribute_aligned}" !
+ fi
+
+ dnl ========================================================
++dnl Check for libogg
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-ogg,
++[ --with-system-ogg Use system libogg (located with pkgconfig)],
++MOZ_NATIVE_OGG=1,
++MOZ_NATIVE_OGG=)
++
++if test -n "$MOZ_NATIVE_OGG"; then
++ PKG_CHECK_MODULES(MOZ_OGG, ogg >= 1.2.1)
++
++ _SAVE_LIBS=$LIBS
++ LIBS="$LIBS $MOZ_OGG_LIBS"
++ AC_CHECK_FUNC(ogg_set_mem_functions, [],
++ [AC_DEFINE(MOZ_OGG_NO_MEM_REPORTING)])
++ LIBS=$_SAVE_LIBS
++fi
++
++AC_SUBST(MOZ_NATIVE_OGG)
++
++dnl ========================================================
++dnl Check for libvorbis
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-vorbis,
++[ --with-system-vorbis Use system libvorbis (located with pkgconfig)],
++MOZ_NATIVE_VORBIS=1,
++MOZ_NATIVE_VORBIS=)
++
++if test -n "$MOZ_NATIVE_VORBIS"; then
++ PKG_CHECK_MODULES(MOZ_VORBIS, vorbis vorbisenc >= 1.3.5)
++fi
++
++AC_SUBST(MOZ_NATIVE_VORBIS)
++
++dnl ========================================================
++dnl Check for integer-only libvorbis aka tremor
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-tremor,
++[ --with-system-tremor Use system libtremor (located with pkgconfig)],
++MOZ_NATIVE_TREMOR=1,
++MOZ_NATIVE_TREMOR=)
++
++if test -n "$MOZ_NATIVE_TREMOR"; then
++ PKG_CHECK_MODULES(MOZ_TREMOR, vorbisidec >= 1.2.1)
++fi
++
++AC_SUBST(MOZ_NATIVE_TREMOR)
++
++dnl ========================================================
++dnl Check for libcelt
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-celt,
++[ --with-system-celt Use system libcelt (located with pkgconfig)],
++MOZ_NATIVE_CELT=1,
++MOZ_NATIVE_CELT=)
++
++if test -n "$MOZ_NATIVE_CELT"; then
++ PKG_CHECK_MODULES(MOZ_CELT, celt)
++else
++ MOZ_CELT_CFLAGS='-I$(topsrcdir)/media/libopus'
++fi
++
++AC_SUBST(MOZ_NATIVE_CELT)
++
++dnl ========================================================
++dnl Check for libopus
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-opus,
++[ --with-system-opus Use system libopus (located with pkgconfig)],
++MOZ_NATIVE_OPUS=1,
++MOZ_NATIVE_OPUS=)
++
++if test -n "$MOZ_NATIVE_OPUS"; then
++ PKG_CHECK_MODULES(MOZ_OPUS, opus >= 1.1)
++else
++ MOZ_OPUS_CFLAGS='-I$(topsrcdir)/media/libopus/include'
++fi
++
++AC_SUBST(MOZ_NATIVE_OPUS)
++
++dnl ========================================================
++dnl Check for libtheora
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-theora,
++[ --with-system-theora Use system libtheora (located with pkgconfig)],
++MOZ_NATIVE_THEORA=1,
++MOZ_NATIVE_THEORA=)
++
++if test -n "$MOZ_NATIVE_THEORA"; then
++ PKG_CHECK_MODULES(MOZ_THEORA, theora >= 1.2)
++fi
++
++AC_SUBST(MOZ_NATIVE_THEORA)
++
++dnl ========================================================
++dnl Check for libspeex resampler
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-speex,
++[ --with-system-speex Use system libspeex (located with pkgconfig)],
++MOZ_NATIVE_SPEEX=1,
++MOZ_NATIVE_SPEEX=)
++
++if test -n "$MOZ_NATIVE_SPEEX"; then
++ PKG_CHECK_MODULES(MOZ_SPEEX, speexdsp >= 1.2)
++fi
++
++AC_SUBST(MOZ_NATIVE_SPEEX)
++
++dnl ========================================================
++dnl Check for libsoundtouch
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-soundtouch,
++[ --with-system-soundtouch Use system libsoundtouch (located with pkgconfig)],
++MOZ_NATIVE_SOUNDTOUCH=1,
++MOZ_NATIVE_SOUNDTOUCH=)
++
++if test -n "$MOZ_NATIVE_SOUNDTOUCH"; then
++ PKG_CHECK_MODULES(MOZ_SOUNDTOUCH, soundtouch >= 1.8.0)
++
++ AC_LANG_SAVE
++ AC_LANG_CPLUSPLUS
++ _SAVE_CXXFLAGS=$CXXFLAGS
++ CXXFLAGS="$CXXFLAGS $MOZ_SOUNDTOUCH_CFLAGS"
++ AC_CACHE_CHECK(for soundtouch sample type,
++ ac_cv_soundtouch_sample_type,
++ [AC_TRY_COMPILE([#include <SoundTouch.h>
++ #ifndef SOUNDTOUCH_INTEGER_SAMPLES
++ #error soundtouch expects float samples
++ #endif],
++ [],
++ [ac_cv_soundtouch_sample_type=short],
++ [ac_cv_soundtouch_sample_type=float])])
++ CXXFLAGS=$_SAVE_CXXFLAGS
++ AC_LANG_RESTORE
++
++ if test \( -n "$MOZ_SAMPLE_TYPE_S16" -a "$ac_cv_soundtouch_sample_type" != short \) \
++ -o \( -n "$MOZ_SAMPLE_TYPE_FLOAT32" -a "$ac_cv_soundtouch_sample_type" != float \) ; then
++ AC_MSG_ERROR([SoundTouch library is built with incompatible sample type. Either rebuild the library with/without --enable-integer-samples, chase default Mozilla sample type or remove --with-system-soundtouch.])
++ fi
++fi
++
++AC_SUBST(MOZ_NATIVE_SOUNDTOUCH)
++
++dnl ========================================================
+ dnl = Disable VP8 decoder support
+ dnl ========================================================
+ MOZ_ARG_DISABLE_BOOL(webm,
+diff --git dom/media/AudioStream.h dom/media/AudioStream.h
+index 085676d..00c54fb 100644
+--- dom/media/AudioStream.h
++++ dom/media/AudioStream.h
+@@ -17,7 +17,7 @@
+ #include "CubebUtils.h"
+
+ namespace soundtouch {
+-class SoundTouch;
++class MOZ_IMPORT_API SoundTouch;
+ }
+
+ namespace mozilla {
+diff --git dom/media/moz.build dom/media/moz.build
+index 7526cff..e0a0ca0 100644
+--- dom/media/moz.build
++++ dom/media/moz.build
+@@ -212,3 +212,24 @@ if CONFIG['ANDROID_VERSION'] > '15':
+
+ CFLAGS += CONFIG['GSTREAMER_CFLAGS']
+ CXXFLAGS += CONFIG['GSTREAMER_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_OGG']:
++ CXXFLAGS += CONFIG['MOZ_OGG_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_THEORA']:
++ CXXFLAGS += CONFIG['MOZ_THEORA_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_VORBIS']:
++ CXXFLAGS += CONFIG['MOZ_VORBIS_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_TREMOR']:
++ CXXFLAGS += CONFIG['MOZ_TREMOR_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_OPUS']:
++ CXXFLAGS += CONFIG['MOZ_OPUS_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_SPEEX']:
++ CXXFLAGS += CONFIG['MOZ_SPEEX_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_SOUNDTOUCH']:
++ CXXFLAGS += CONFIG['MOZ_SOUNDTOUCH_CFLAGS']
+diff --git media/libcubeb/src/moz.build media/libcubeb/src/moz.build
+index 944744d..9a7c8c0 100644
+--- media/libcubeb/src/moz.build
++++ media/libcubeb/src/moz.build
+@@ -65,6 +65,9 @@ if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
+
+ FINAL_LIBRARY = 'gkmedias'
+
++if CONFIG['MOZ_NATIVE_SPEEX']:
++ SOURCES['cubeb_resampler.cpp'].flags += CONFIG['MOZ_SPEEX_CFLAGS']
++
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+ CFLAGS += [
+ '-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
+diff --git media/libogg/README_MOZILLA media/libogg/README_MOZILLA
+index 0833e4d..7ece97b 100644
+--- media/libogg/README_MOZILLA
++++ media/libogg/README_MOZILLA
+@@ -6,3 +6,6 @@ The svn revision number used was r17287.
+ The int-types.patch address a bug that config_types.h generated from
+ Linux platform can't be used on OpenSolaris directly see Mozilla bug
+ 449754
++
++The in-tree copy may be omitted during build by --with-system-ogg.
++Keep version in configure.in in sync on updates.
+diff --git media/libopus/README_MOZILLA media/libopus/README_MOZILLA
+index 2d85c9f..d3fb9f8 100644
+--- media/libopus/README_MOZILLA
++++ media/libopus/README_MOZILLA
+@@ -9,3 +9,6 @@ files after the copy step.
+ The upstream repository is https://git.xiph.org/opus.git
+
+ The git tag/revision used was v1.1.
++
++The in-tree copy may be omitted during build by --with-system-opus.
++So, keep its pkg-config version check within configure.in in sync on updates.
+diff --git media/libsoundtouch/README_MOZILLA media/libsoundtouch/README_MOZILLA
+index bfd4b1a..15b158d 100644
+--- media/libsoundtouch/README_MOZILLA
++++ media/libsoundtouch/README_MOZILLA
+@@ -6,3 +6,5 @@ The whole library is not used, only the relevant files are imported in the tree,
+ using the script `update.sh`. Some changes have been made to the files, using
+ the patch `moz-libsoundtouch.patch`. We also use a custom soundtouch_config.h.
+
++The in-tree copy may be omitted during build by --with-system-soundtouch.
++Keep version in configure.in in sync on updates.
+diff --git media/libspeex_resampler/README_MOZILLA media/libspeex_resampler/README_MOZILLA
+index 7f6b1bb..e830300 100644
+--- media/libspeex_resampler/README_MOZILLA
++++ media/libspeex_resampler/README_MOZILLA
+@@ -3,3 +3,6 @@ This source is from the Speex DSP library
+
+ It consists in the audio resampling code (resampler.c) and its header files
+ dependancies, imported into the tree using the update.sh script.
++
++The in-tree copy may be omitted during build by --with-system-speex.
++Keep version in configure.in in sync on updates.
+diff --git media/libtheora/README_MOZILLA media/libtheora/README_MOZILLA
+index d48dbfa..f08a2ed 100644
+--- media/libtheora/README_MOZILLA
++++ media/libtheora/README_MOZILLA
+@@ -3,3 +3,6 @@ using the update.sh script. The changes made were those applied by update.sh,
+ the addition/update of Makefile.in files for the Mozilla build system.
+
+ The subversion revision used was r17578.
++
++The in-tree copy may be omitted during build by --with-system-theora.
++Keep version in configure.in in sync on updates.
+diff --git media/libtheora/moz.build media/libtheora/moz.build
+index 14265b1..3069e99 100644
+--- media/libtheora/moz.build
++++ media/libtheora/moz.build
+@@ -93,3 +93,5 @@ if CONFIG['GNU_AS']:
+ if CONFIG['OS_TARGET'] == 'Android':
+ DEFINES['__linux__'] = True
+
++if CONFIG['MOZ_NATIVE_OGG']:
++ CFLAGS += CONFIG['MOZ_OGG_CFLAGS']
+diff --git media/libtremor/README_MOZILLA media/libtremor/README_MOZILLA
+index ee67b53..3f34a09 100644
+--- media/libtremor/README_MOZILLA
++++ media/libtremor/README_MOZILLA
+@@ -5,3 +5,6 @@ Makefile.in files for the Mozilla build system.
+
+ The upstream release used was http://svn.xiph.org/trunk/Tremor/
+ The subversion revision used was r17547.
++
++The in-tree copy may be omitted during build by --with-system-tremor.
++Keep version in configure.in in sync on updates.
+diff --git media/libtremor/moz.build media/libtremor/moz.build
+index 31831ba..a03d576 100644
+--- media/libtremor/moz.build
++++ media/libtremor/moz.build
+@@ -6,3 +6,5 @@
+
+ DIRS += ['include/tremor', 'lib']
+
++if CONFIG['MOZ_NATIVE_OGG']:
++ CFLAGS += CONFIG['MOZ_OGG_CFLAGS']
+diff --git media/libvorbis/README_MOZILLA media/libvorbis/README_MOZILLA
+index 7c7454c..55baedd 100644
+--- media/libvorbis/README_MOZILLA
++++ media/libvorbis/README_MOZILLA
+@@ -8,3 +8,6 @@ https://svn.xiph.org/tags/vorbis/libvorbis-1.3.4@19059
+
+ Some files are renamed during the copy to prevent clashes with object
+ file names with other Mozilla libraries.
++
++The in-tree copy may be omitted during build by --with-system-vorbis.
++Keep version in configure.in in sync on updates.
+diff --git media/libvorbis/moz.build media/libvorbis/moz.build
+index 919b99e..cc776f7 100644
+--- media/libvorbis/moz.build
++++ media/libvorbis/moz.build
+@@ -55,3 +55,6 @@ FINAL_LIBRARY = 'gkmedias'
+ # Suppress warnings in third-party code.
+ if CONFIG['GNU_CC']:
+ CFLAGS += ['-Wno-uninitialized']
++
++if CONFIG['MOZ_NATIVE_OGG']:
++ CFLAGS += CONFIG['MOZ_OGG_CFLAGS']
+diff --git media/webrtc/signaling/test/moz.build media/webrtc/signaling/test/moz.build
+index bbc971c..6ed7e41 100644
+--- media/webrtc/signaling/test/moz.build
++++ media/webrtc/signaling/test/moz.build
+@@ -127,6 +127,9 @@ if CONFIG['MOZ_ALSA']:
+ if CONFIG['MOZ_NATIVE_JPEG']:
+ OS_LIBS += CONFIG['MOZ_JPEG_LIBS']
+
++if CONFIG['MOZ_NATIVE_OPUS']:
++ OS_LIBS += CONFIG['MOZ_OPUS_LIBS']
++
+ if CONFIG['MOZ_NATIVE_LIBVPX']:
+ OS_LIBS += CONFIG['MOZ_LIBVPX_LIBS']
+
+diff --git media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi
+index 00e77e7..55f48ab 100644
+--- media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi
++++ media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi
+@@ -17,18 +17,11 @@
+ 'conditions': [
+ ['build_with_mozilla==1', {
+ # Mozilla provides its own build of the opus library.
+- 'include_dirs': [
+- '/media/libopus/include',
+- '/media/libopus/src',
+- '/media/libopus/celt',
++ 'cflags_mozilla': [
++ '$(filter -I%, $(MOZ_CELT_CFLAGS))/celt',
++ '$(MOZ_OPUS_CFLAGS)',
++ '$(filter -I%, $(MOZ_OPUS_CFLAGS))/../src',
+ ],
+- 'direct_dependent_settings': {
+- 'include_dirs': [
+- '/media/libopus/include',
+- '/media/libopus/src',
+- '/media/libopus/celt',
+- ],
+- },
+ }, {
+ 'dependencies': [
+ '<(DEPTH)/third_party/opus/opus.gyp:opus'
+diff --git media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi
+index 00e77e7..55f48ab 100644
+--- media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi
++++ media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi
+@@ -84,19 +84,11 @@
+ ],
+ }],
+ ['build_with_mozilla==1', {
+- 'include_dirs': [
+- # Need Opus header files for the audio classifier.
+- '<(DEPTH)/../../../media/opus/celt',
+-# '<(DEPTH)/third_party/opus/src/src',
++ 'cflags_mozilla': [
++ '$(filter -I%, $(MOZ_CELT_CFLAGS))/celt',
++ '$(MOZ_OPUS_CFLAGS)',
++ '$(filter -I%, $(MOZ_OPUS_CFLAGS))/../src',
+ ],
+- 'direct_dependent_settings': {
+- 'include_dirs': [
+- '../../../../../../media/opus/celt',
+- # Need Opus header files for the audio classifier.
+- '<(DEPTH)/../../../media/opus/celt',
+-# '<(DEPTH)/third_party/opus/src/src',
+- ],
+- },
+ }],
+ ],
+ 'sources': [
+diff --git toolkit/library/moz.build toolkit/library/moz.build
+index d42137a..695e75a8 100644
+--- toolkit/library/moz.build
++++ toolkit/library/moz.build
+@@ -178,6 +178,30 @@ if CONFIG['MOZ_NATIVE_PNG']:
+ if CONFIG['MOZ_NATIVE_HUNSPELL']:
+ OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']
+
++if CONFIG['MOZ_NATIVE_OGG']:
++ OS_LIBS += CONFIG['MOZ_OGG_LIBS']
++
++if CONFIG['MOZ_NATIVE_THEORA']:
++ OS_LIBS += CONFIG['MOZ_THEORA_LIBS']
++
++if CONFIG['MOZ_NATIVE_VORBIS']:
++ OS_LIBS += CONFIG['MOZ_VORBIS_LIBS']
++
++if CONFIG['MOZ_NATIVE_TREMOR']:
++ OS_LIBS += CONFIG['MOZ_TREMOR_LIBS']
++
++if CONFIG['MOZ_NATIVE_CELT']:
++ OS_LIBS += CONFIG['MOZ_CELT_LIBS']
++
++if CONFIG['MOZ_NATIVE_OPUS']:
++ OS_LIBS += CONFIG['MOZ_OPUS_LIBS']
++
++if CONFIG['MOZ_NATIVE_SPEEX']:
++ OS_LIBS += CONFIG['MOZ_SPEEX_LIBS']
++
++if CONFIG['MOZ_NATIVE_SOUNDTOUCH']:
++ OS_LIBS += CONFIG['MOZ_SOUNDTOUCH_LIBS']
++
+ if CONFIG['MOZ_NATIVE_LIBEVENT']:
+ OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']
+
+diff --git xpcom/build/XPCOMInit.cpp xpcom/build/XPCOMInit.cpp
+index 2cf281e..6d7af0e 100644
+--- xpcom/build/XPCOMInit.cpp
++++ xpcom/build/XPCOMInit.cpp
+@@ -138,7 +138,9 @@ extern nsresult nsStringInputStreamConstructor(nsISupports*, REFNSIID, void**);
+ #include "mozilla/VisualEventTracer.h"
+ #endif
+
++#ifndef MOZ_OGG_NO_MEM_REPORTING
+ #include "ogg/ogg.h"
++#endif
+ #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
+ #include "vpx_mem/vpx_mem.h"
+ #endif
+@@ -651,11 +653,13 @@ NS_InitXPCOM2(nsIServiceManager** aResult,
+ // this oddness.
+ mozilla::SetICUMemoryFunctions();
+
++#ifndef MOZ_OGG_NO_MEM_REPORTING
+ // Do the same for libogg.
+ ogg_set_mem_functions(OggReporter::CountingMalloc,
+ OggReporter::CountingCalloc,
+ OggReporter::CountingRealloc,
+ OggReporter::CountingFree);
++#endif
+
+ #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
+ // And for VPX.
Property changes on: trunk/www/libxul/files/patch-z-bug517422
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
More information about the Midnightbsd-cvs
mailing list