Index: head/mail/thunderbird/Makefile =================================================================== --- head/mail/thunderbird/Makefile (revision 422402) +++ head/mail/thunderbird/Makefile (revision 422403) @@ -1,159 +1,160 @@ # Created by: Joe Marcus Clarke # $FreeBSD$ PORTNAME= thunderbird DISTVERSION= 45.3.0 +PORTREVISION= 1 CATEGORIES= mail news net-im ipv6 MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source DISTFILES= ${PORTNAME}-${DISTVERSION}.source${EXTRACT_SUFX} EXTRACT_ONLY= ${PORTNAME}-${DISTVERSION}.source${EXTRACT_SUFX} MAINTAINER= gecko@FreeBSD.org COMMENT= Mozilla Thunderbird is standalone mail and news that stands above BUILD_DEPENDS= nspr>=4.12:devel/nspr \ nss>=3.21.1:security/nss \ libevent2>=2.0.21_2:devel/libevent2 \ soundtouch>=1.9.0:audio/soundtouch \ harfbuzz>=1.1.0:print/harfbuzz \ graphite2>=1.3.7:graphics/graphite2 \ png>=1.6.19:graphics/png \ libvorbis>=1.3.5,3:audio/libvorbis \ libvpx>=1.5.0:multimedia/libvpx \ sqlite3>=3.9.1:databases/sqlite3 \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3 \ v4l_compat>0:multimedia/v4l_compat \ autoconf-2.13:devel/autoconf213 \ yasm:devel/yasm \ zip:archivers/zip LIB_DEPENDS= libv4l2.so:multimedia/libv4l EM_VERSION= 1.9.5 L_VERSION= 4.7.3 SSP_UNSAFE= yes USE_GECKO= gecko USE_MOZILLA= # empty USE_GL= gl USES= tar:xz MOZ_OPTIONS= --program-transform-name='s/thunderbird/${MOZILLA}/' \ --enable-single-profile --disable-profilesharing \ --enable-application=mail --enable-official-branding MOZ_MK_OPTIONS= MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1 MOZ_EXPORT= MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1 MOZ_PKGCONFIG_FILES= PORTNAME_ICON= ${MOZILLA}.png PORTNAME_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default48.png SYSTEM_PREFS= ${FAKEDIR}/lib/${PORTNAME}/defaults/pref/${PORTNAME}.js MOZ_PIS_SCRIPTS=moz_pis_S50cleanhome OPTIONS_EXCLUDE=GSTREAMER LOGGING OPTIONS_DEFINE= ENIGMAIL LIGHTNING RUST OPTIONS_SINGLE= TOOLKIT OPTIONS_SINGLE_TOOLKIT= GTK2 GTK3 OPTIONS_DEFAULT=BUNDLED_CAIRO CANBERRA ENIGMAIL GTK2 LIGHTNING .include "${.CURDIR}/../../www/firefox/Makefile.options" .include WRKSRC:= ${WRKDIR}/${PORTNAME}-${DISTVERSION} MOZSRC:= ${WRKSRC}/mozilla XPI_LIBDIR= ${PREFIX}/lib/xpi .if ${PORT_OPTIONS:MENIGMAIL} MASTER_SITES+= https://www.enigmail.net/download/source/:enigmail DISTFILES+= ${EM_DISTFILE}:enigmail RUN_DEPENDS+= gpg2:security/gnupg EM_DISTNAME= enigmail-${EM_VERSION} EM_DISTFILE= ${EM_DISTNAME}.tar.gz EM_XPI_FILE= ${WRKSRC}/mailnews/extensions/enigmail/build/${EM_DISTNAME}.xpi EM_ORIG_ID= {847b3a00-7ab1-11d4-8f02-006008948af5} EM_ID= ${PORTNAME}@mozilla-enigmail.org EM_ID_RFILES= ${XPI_LIBDIR}/${EM_ID}/install.rdf \ ${XPI_LIBDIR}/${EM_ID}/components/enigmail.js \ ${XPI_LIBDIR}/${EM_ID}/modules/app.jsm .endif .if ${PORT_OPTIONS:MLIGHTNING} MOZ_OPTIONS+= --enable-calendar MOZ_MK_OPTIONS+= MOZ_CO_PROJECT=calendar LIGHTNING_DIR= share/lightning XPI_FILE= ${MOZ_OBJDIR}/dist/xpi-stage/lightning-${L_VERSION}.en-US.${OPSYS:tl}${OSREL}-${ARCH:S/amd64/x86_64/}.xpi XPI_ORIG_ID= {e2fda1a4-762b-4020-b5ad-a41df1933103} XPI_ID= lightning@thunderbird.mozilla.org .else MOZ_OPTIONS+= --disable-calendar .endif post-extract: @${SED} -e 's|@PORTNAME_ICON@|${PORTNAME_ICON}|;s|@MOZILLA@|${MOZILLA}|' \ <${FILESDIR}/thunderbird.desktop.in >${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop .if ${PORT_OPTIONS:MENIGMAIL} @${TAR} -xf ${_DISTDIR}/${EM_DISTFILE} \ -C ${WRKSRC}/mailnews/extensions .endif post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/mail/app/nsMailApp.cpp .if ${PORT_OPTIONS:MENIGMAIL} @${REINPLACE_CMD} -e 's,/usr/bin/perl,${PERL},' \ ${WRKSRC}/mailnews/extensions/enigmail/util/fixlang.pl \ ${WRKSRC}/mailnews/extensions/enigmail/util/make-lang-xpi.pl @${REINPLACE_CMD} -e '/^xpi/s/$$/ all/' \ -e '/^all/s/ xpi//' \ -e '/^XPI_MODULE_VERS/s/= .*/= ${EM_VERSION}/' \ ${WRKSRC}/mailnews/extensions/enigmail/Makefile @${REINPLACE_CMD} -e '/em:version/s,>[^<]*<,>${EM_VERSION}<,' \ -e '/em:maxVersion/s/pre//' \ ${WRKSRC}/mailnews/extensions/enigmail/package/install.rdf .endif pre-configure: (cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf-2.13) (cd ${MOZSRC} && ${LOCALBASE}/bin/autoconf-2.13) (cd ${MOZSRC}/js/src/ && ${LOCALBASE}/bin/autoconf-2.13) .if ${PORT_OPTIONS:MENIGMAIL} post-configure: cd ${WRKSRC}/mailnews/extensions/enigmail/ && \ ${SETENV} ${CONFIGURE_ENV} ${MAKE_ENV} ./configure post-build: ${DO_MAKE_BUILD:N-j*:S,${MAKEFILE},Makefile,} all xpi \ -C ${WRKSRC}/mailnews/extensions/enigmail .endif port-pre-install: ${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/defaults post-install: ${INSTALL_DATA} ${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop ${STAGEDIR}${PREFIX}/share/applications ${LN} -sf ${PORTNAME_ICON_SRC} ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME_ICON} .if ${PORT_OPTIONS:MLIGHTNING} @${MKDIR} ${STAGEDIR}${XPI_LIBDIR}/${XPI_ID} ${STAGEDIR}${XPI_LIBDIR}/symlinks/thunderbird @(cd ${STAGEDIR}${XPI_LIBDIR}/${XPI_ID}; ${TAR} -xf ${XPI_FILE}) @${REINPLACE_CMD} -i "" "s/${XPI_ORIG_ID}/${XPI_ID}/" ${STAGEDIR}${XPI_LIBDIR}/${XPI_ID}/install.rdf @${CHMOD} -R a+rX,go-w ${STAGEDIR}${XPI_LIBDIR}/${XPI_ID} @${LN} -sf ${XPI_LIBDIR}/${XPI_ID} ${STAGEDIR}${XPI_LIBDIR}/symlinks/thunderbird 2>/dev/null || true @${ECHO_CMD} '@exec ${LN} -sf %D/lib/xpi/${XPI_ID} ${LOCALBASE}/lib/thunderbird/extensions 2>/dev/null || true' >> ${TMPPLIST} @${ECHO_CMD} '@unexec ${RM} -f ${LOCALBASE}/lib/thunderbird/extensions/${XPI_ID}' >> ${TMPPLIST} .endif .if ${PORT_OPTIONS:MENIGMAIL} @${MKDIR} ${STAGEDIR}${XPI_LIBDIR}/${EM_ID} ${STAGEDIR}${XPI_LIBDIR}/symlinks/${PORTNAME} @(cd ${STAGEDIR}${XPI_LIBDIR}/${EM_ID}; ${TAR} -xf ${EM_XPI_FILE}) @${REINPLACE_CMD} -i "" "s/${EM_ORIG_ID}/${EM_ID}/" ${EM_ID_RFILES:S/^/${STAGEDIR}/} @${CHMOD} -R a+rX,go-w ${STAGEDIR}${XPI_LIBDIR}/${EM_ID} @${LN} -sf ${XPI_LIBDIR}/${EM_ID} ${STAGEDIR}${XPI_LIBDIR}/symlinks/${PORTNAME} 2>/dev/null || true @${ECHO_CMD} '@exec ${LN} -sf %D/lib/xpi/${EM_ID} ${LOCALBASE}/lib/${PORTNAME}/extensions 2>/dev/null || true' >> ${TMPPLIST} @${ECHO_CMD} '@unexec ${RM} -f ${LOCALBASE}/lib/${PORTNAME}/extensions/${EM_ID}' >> ${TMPPLIST} .endif .include Index: head/mail/thunderbird/files/patch-bug1245076 =================================================================== --- head/mail/thunderbird/files/patch-bug1245076 (nonexistent) +++ head/mail/thunderbird/files/patch-bug1245076 (revision 422403) @@ -0,0 +1,74 @@ + +# HG changeset patch +# User Mike Hommey +# Date 1457596445 -32400 +# Node ID 55212130f19da3079167a6b0a5a0ed6689c9a71d +# Parent 27c94617d7064d566c24a42e11cd4c7ef725923d +Bug 1245076 - Don't include mozalloc.h from the cstdlib wrapper. r=froydnj + +Our STL wrappers do various different things, one of which is including +mozalloc.h for infallible operator new. mozalloc.h includes stdlib.h, +which, in libstdc++ >= 6 is now itself a wrapper around cstdlib, which +circles back to our STL wrapper. + +But of the things our STL wrappers do, including mozalloc.h is not one +that is necessary for cstdlib. So skip including mozalloc.h in our +cstdlib wrapper. + +Additionally, some C++ sources (in media/mtransport) are including +headers in an extern "C" block, which end up including stdlib.h, which +ends up including cstdlib because really, this is all C++, and our +wrapper pre-includes for mozalloc.h, which fails because templates +don't work inside extern "C". So, don't pre-include when we're not +including mozalloc.h. + + +diff --git config/gcc-stl-wrapper.template.h config/gcc-stl-wrapper.template.h +--- mozilla/config/gcc-stl-wrapper.template.h ++++ mozilla/config/gcc-stl-wrapper.template.h +@@ -12,33 +12,40 @@ + // compiling ObjC. + #if defined(__EXCEPTIONS) && __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS) + # error "STL code can only be used with -fno-exceptions" + #endif + + // Silence "warning: #include_next is a GCC extension" + #pragma GCC system_header + ++// Don't include mozalloc for cstdlib. See bug 1245076. ++#ifndef moz_dont_include_mozalloc_for_cstdlib ++# define moz_dont_include_mozalloc_for_cstdlib ++#endif ++#ifndef moz_dont_include_mozalloc_for_${HEADER} + // mozalloc.h wants ; break the cycle by always explicitly + // including here. NB: this is a tad sneaky. Sez the gcc docs: + // + // `#include_next' does not distinguish between and "file" + // inclusion, nor does it check that the file you specify has the + // same name as the current file. It simply looks for the file + // named, starting with the directory in the search path after the + // one where the current file was found. +-#include_next ++# include_next + + // See if we're in code that can use mozalloc. NB: this duplicates + // code in nscore.h because nscore.h pulls in prtypes.h, and chromium + // can't build with that being included before base/basictypes.h. +-#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) +-# include "mozilla/mozalloc.h" +-#else +-# error "STL code can only be used with infallible ::operator new()" ++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) ++# include "mozilla/mozalloc.h" ++# else ++# error "STL code can only be used with infallible ::operator new()" ++# endif ++ + #endif + + #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG) + // Enable checked iterators and other goodies + // + // FIXME/bug 551254: gcc's debug STL implementation requires -frtti. + // Figure out how to resolve this with -fno-rtti. Maybe build with + // -frtti in DEBUG builds? Property changes on: head/mail/thunderbird/files/patch-bug1245076 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property 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 Index: head/mail/thunderbird/files/patch-bug1268816 =================================================================== --- head/mail/thunderbird/files/patch-bug1268816 (nonexistent) +++ head/mail/thunderbird/files/patch-bug1268816 (revision 422403) @@ -0,0 +1,50 @@ + +# HG changeset patch +# User Lee Salzman +# Date 1461978185 14400 +# Node ID b622cbd9ba13d01abcb1d04684dcb39c22a08590 +# Parent f3a5c8b5e17073a1e68f079da93f8dbe10e454a9 +Bug 1268816 - allow Skia to use C++11 features on platforms that have them. r=froydnj + +diff --git config/stl-headers config/stl-headers +--- mozilla/config/stl-headers ++++ mozilla/config/stl-headers +@@ -29,16 +29,17 @@ iterator + limits + list + map + memory + ostream + set + stack + string ++type_traits + utility + vector + cassert + climits + cmath + cstdarg + cstdio + cstdlib +diff --git config/system-headers config/system-headers +--- mozilla/config/system-headers ++++ mozilla/config/system-headers +@@ -1109,16 +1109,17 @@ ThreadManagerTests.h + Threads.h + time.h + Timer.h + tlhelp32.h + ToolUtils.h + tr1/functional + trace.h + Traps.h ++type_traits + typeinfo + types.h + Types.h + UAppleEventsMgr.h + UAttachments.h + ucontext.h + uconv.h + UCursor.h Property changes on: head/mail/thunderbird/files/patch-bug1268816 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property 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 Index: head/mail/thunderbird/files/patch-bug1269171 =================================================================== --- head/mail/thunderbird/files/patch-bug1269171 (nonexistent) +++ head/mail/thunderbird/files/patch-bug1269171 (revision 422403) @@ -0,0 +1,258 @@ + +# HG changeset patch +# User Mike Hommey +# Date 1463557039 -32400 +# Node ID 68da139d0866977c0ada86319fa94388f2255446 +# Parent a640e6fa8ab9977fb6c5bcf63dc4daca6699477b +Bug 1269171 - Change how mozalloc.h is hooked in STL wrappers. r=froydnj + +Since the introduction of the STL wrappers, they have included +mozalloc.h, and multiple times, we've hit header reentrancy problems, +and worked around them as best as we could. + +Taking a step back, all mozalloc.h does is: +- declare moz_* allocator functions. +- define inline implementations of various operator new/delete variants. + +The first only requires the functions to be declared before they are used, +so mozalloc.h only needs to be included before anything that would use +those functions. + +The second doesn't actually require a specific order, as long as the +declaration for those functions comes before their use, and they are +either declared in or implicitly by the C++ compiler. + +So all in all, it doesn't matter that mozalloc.h is included before the +wrapped STL headers. What matters is that it's included when STL headers +are included. So arrange things such that mozalloc.h is included after +the first wrapped STL header is fully preprocessed (and all its includes +have been included). + + +diff --git config/gcc-stl-wrapper.template.h config/gcc-stl-wrapper.template.h +--- mozilla/config/gcc-stl-wrapper.template.h ++++ mozilla/config/gcc-stl-wrapper.template.h +@@ -12,56 +12,54 @@ + // compiling ObjC. + #if defined(__EXCEPTIONS) && __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS) + # error "STL code can only be used with -fno-exceptions" + #endif + + // Silence "warning: #include_next is a GCC extension" + #pragma GCC system_header + +-// Don't include mozalloc for cstdlib. See bug 1245076. +-#ifndef moz_dont_include_mozalloc_for_cstdlib +-# define moz_dont_include_mozalloc_for_cstdlib +-#endif +-#ifndef moz_dont_include_mozalloc_for_${HEADER} +-// mozalloc.h wants ; break the cycle by always explicitly +-// including here. NB: this is a tad sneaky. Sez the gcc docs: +-// +-// `#include_next' does not distinguish between and "file" +-// inclusion, nor does it check that the file you specify has the +-// same name as the current file. It simply looks for the file +-// named, starting with the directory in the search path after the +-// one where the current file was found. +-# include_next +- +-// See if we're in code that can use mozalloc. NB: this duplicates +-// code in nscore.h because nscore.h pulls in prtypes.h, and chromium +-// can't build with that being included before base/basictypes.h. +-# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) +-# include "mozilla/mozalloc.h" +-# else +-# error "STL code can only be used with infallible ::operator new()" +-# endif +- +-#endif +- + #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG) + // Enable checked iterators and other goodies + // + // FIXME/bug 551254: gcc's debug STL implementation requires -frtti. + // Figure out how to resolve this with -fno-rtti. Maybe build with + // -frtti in DEBUG builds? + // + // # define _GLIBCXX_DEBUG 1 + #endif + ++// Don't include mozalloc for cstdlib. See bug 1245076. ++#ifndef moz_dont_include_mozalloc_for_cstdlib ++# define moz_dont_include_mozalloc_for_cstdlib ++#endif ++ ++// Include mozalloc after the STL header and all other headers it includes ++// have been preprocessed. ++#if !defined(MOZ_INCLUDE_MOZALLOC_H) && \ ++ !defined(moz_dont_include_mozalloc_for_${HEADER}) ++# define MOZ_INCLUDE_MOZALLOC_H ++# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++#endif ++ + #pragma GCC visibility push(default) + #include_next <${HEADER}> + #pragma GCC visibility pop + ++#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++// See if we're in code that can use mozalloc. NB: this duplicates ++// code in nscore.h because nscore.h pulls in prtypes.h, and chromium ++// can't build with that being included before base/basictypes.h. ++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) ++# include "mozilla/mozalloc.h" ++# else ++# error "STL code can only be used with infallible ::operator new()" ++# endif ++#endif ++ + // gcc calls a __throw_*() function from bits/functexcept.h when it + // wants to "throw an exception". functexcept exists nominally to + // support -fno-exceptions, but since we'll always use the system + // libstdc++, and it's compiled with exceptions, then in practice + // these __throw_*() functions will always throw exceptions (shades of + // -fshort-wchar). We don't want that and so define our own inlined + // __throw_*(). + #ifndef mozilla_throw_gcc_h +diff --git config/make-stl-wrappers.py config/make-stl-wrappers.py +--- mozilla/config/make-stl-wrappers.py ++++ mozilla/config/make-stl-wrappers.py +@@ -25,28 +25,26 @@ def header_path(header, compiler): + def is_comment(line): + return re.match(r'\s*#.*', line) + + def main(outdir, compiler, template_file, header_list_file): + if not os.path.isdir(outdir): + os.mkdir(outdir) + + template = open(template_file, 'r').read() +- path_to_new = header_path('new', compiler) + + for header in open(header_list_file, 'r'): + header = header.rstrip() + if 0 == len(header) or is_comment(header): + continue + + path = header_path(header, compiler) + with FileAvoidWrite(os.path.join(outdir, header)) as f: + f.write(string.Template(template).substitute(HEADER=header, +- HEADER_PATH=path, +- NEW_HEADER_PATH=path_to_new)) ++ HEADER_PATH=path)) + + + if __name__ == '__main__': + if 5 != len(sys.argv): + print("""Usage: + python {0} OUT_DIR ('msvc'|'gcc') TEMPLATE_FILE HEADER_LIST_FILE + """.format(sys.argv[0]), file=sys.stderr) + sys.exit(1) +diff --git config/msvc-stl-wrapper.template.h config/msvc-stl-wrapper.template.h +--- mozilla/config/msvc-stl-wrapper.template.h ++++ mozilla/config/msvc-stl-wrapper.template.h +@@ -3,45 +3,33 @@ + */ + /* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + + #ifndef mozilla_${HEADER}_h + #define mozilla_${HEADER}_h + +-#ifndef MOZ_HAVE_INCLUDED_ALLOC +-#define MOZ_HAVE_INCLUDED_ALLOC +- + #if _HAS_EXCEPTIONS + # error "STL code can only be used with -fno-exceptions" + #endif + ++// Include mozalloc after the STL header and all other headers it includes ++// have been preprocessed. ++#if !defined(MOZ_INCLUDE_MOZALLOC_H) ++# define MOZ_INCLUDE_MOZALLOC_H ++# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++#endif ++ + // Code built with !_HAS_EXCEPTIONS calls std::_Throw(), but the win2k + // CRT doesn't export std::_Throw(). So we define it. + #ifndef mozilla_Throw_h + # include "mozilla/throw_msvc.h" + #endif + +-// Code might include before other wrapped headers, but +-// includes and so we want to wrap it. But mozalloc.h +-// wants also, so we break the cycle by always explicitly +-// including here. +-#include <${NEW_HEADER_PATH}> +- +-// See if we're in code that can use mozalloc. NB: this duplicates +-// code in nscore.h because nscore.h pulls in prtypes.h, and chromium +-// can't build with that being included before base/basictypes.h. +-#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) +-# include "mozilla/mozalloc.h" +-#else +-# error "STL code can only be used with infallible ::operator new()" +-#endif +-#endif /* MOZ_HAVE_INCLUDED_ALLOC */ +- + #ifdef _DEBUG + // From + // http://msdn.microsoft.com/en-us/library/aa985982%28VS.80%29.aspx + // and + // http://msdn.microsoft.com/en-us/library/aa985965%28VS.80%29.aspx + // there appear to be two types of STL container checking. The + // former is enabled by -D_DEBUG (which is implied by -MDd or -MTd), and + // looks to be full generation/mutation checked iterators as done by +@@ -70,9 +58,20 @@ + // but that's OK because we're not throwing them. + #pragma warning( push ) + #pragma warning( disable : 4275 4530 ) + + #include <${HEADER_PATH}> + + #pragma warning( pop ) + ++#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++// See if we're in code that can use mozalloc. NB: this duplicates ++// code in nscore.h because nscore.h pulls in prtypes.h, and chromium ++// can't build with that being included before base/basictypes.h. ++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) ++# include "mozilla/mozalloc.h" ++# else ++# error "STL code can only be used with infallible ::operator new()" ++# endif ++#endif ++ + #endif // if mozilla_${HEADER}_h +diff --git memory/mozalloc/mozalloc.h memory/mozalloc/mozalloc.h +--- mozilla/memory/mozalloc/mozalloc.h ++++ mozilla/memory/mozalloc/mozalloc.h +@@ -7,20 +7,27 @@ + + #ifndef mozilla_mozalloc_h + #define mozilla_mozalloc_h + + /* + * https://bugzilla.mozilla.org/show_bug.cgi?id=427099 + */ + +-#include +-#include + #if defined(__cplusplus) + # include ++// Since libstdc++ 6, including the C headers (e.g. stdlib.h) instead of the ++// corresponding C++ header (e.g. cstdlib) can cause confusion in C++ code ++// using things defined there. Specifically, with stdlib.h, the use of abs() ++// in gfx/graphite2/src/inc/UtfCodec.h somehow ends up picking the wrong abs() ++# include ++# include ++#else ++# include ++# include + #endif + + #if defined(__cplusplus) + #include "mozilla/fallible.h" + #include "mozilla/TemplateLib.h" + #endif + #include "mozilla/Attributes.h" + #include "mozilla/Types.h" Property changes on: head/mail/thunderbird/files/patch-bug1269171 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property 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 Index: head/www/firefox-esr/Makefile =================================================================== --- head/www/firefox-esr/Makefile (revision 422402) +++ head/www/firefox-esr/Makefile (revision 422403) @@ -1,80 +1,80 @@ # Created by: Alan Eldridge # $FreeBSD$ PORTNAME= firefox DISTVERSION= 45.4.0 DISTVERSIONSUFFIX=esr.source -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= www ipv6 MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}esr/source \ MOZILLA/${PORTNAME}/candidates/${DISTVERSION}esr-candidates/build1/source PKGNAMESUFFIX= -esr MAINTAINER= gecko@FreeBSD.org COMMENT= Web browser based on the browser portion of Mozilla BUILD_DEPENDS= nspr>=4.12:devel/nspr \ nss>=3.21.1:security/nss \ libevent2>=2.0.21_2:devel/libevent2 \ soundtouch>=1.9.0:audio/soundtouch \ harfbuzz>=1.1.0:print/harfbuzz \ graphite2>=1.3.6:graphics/graphite2 \ png>=1.6.19:graphics/png \ libvorbis>=1.3.5,3:audio/libvorbis \ libvpx>=1.5.0:multimedia/libvpx \ sqlite3>=3.9.1:databases/sqlite3 \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3 \ v4l_compat>0:multimedia/v4l_compat \ autoconf-2.13:devel/autoconf213 \ yasm:devel/yasm \ zip:archivers/zip LIB_DEPENDS= libv4l2.so:multimedia/libv4l USE_GECKO= gecko CPE_PRODUCT= ${PORTNAME}_esr CONFLICTS_INSTALL= firefox-[0-9]* MOZ_PKGCONFIG_FILES= # empty USE_MOZILLA= # empty MOZILLA_NAME= Firefox USE_GL= gl USES= tar:xz 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 OPTIONS_EXCLUDE= GSTREAMER LOGGING OPTIONS_DEFINE= RUST OPTIONS_DEFAULT= BUNDLED_CAIRO GTK2 OPTIONS_SINGLE+= TOOLKIT OPTIONS_SINGLE_TOOLKIT= GTK2 GTK3 .include "${.CURDIR}/../../www/firefox/Makefile.options" WRKSRC:= ${WRKDIR}/${PORTNAME}-${DISTVERSION}esr post-extract: @${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 '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 Index: head/www/firefox-esr/files/patch-bug1245076 =================================================================== --- head/www/firefox-esr/files/patch-bug1245076 (nonexistent) +++ head/www/firefox-esr/files/patch-bug1245076 (revision 422403) @@ -0,0 +1,74 @@ + +# HG changeset patch +# User Mike Hommey +# Date 1457596445 -32400 +# Node ID 55212130f19da3079167a6b0a5a0ed6689c9a71d +# Parent 27c94617d7064d566c24a42e11cd4c7ef725923d +Bug 1245076 - Don't include mozalloc.h from the cstdlib wrapper. r=froydnj + +Our STL wrappers do various different things, one of which is including +mozalloc.h for infallible operator new. mozalloc.h includes stdlib.h, +which, in libstdc++ >= 6 is now itself a wrapper around cstdlib, which +circles back to our STL wrapper. + +But of the things our STL wrappers do, including mozalloc.h is not one +that is necessary for cstdlib. So skip including mozalloc.h in our +cstdlib wrapper. + +Additionally, some C++ sources (in media/mtransport) are including +headers in an extern "C" block, which end up including stdlib.h, which +ends up including cstdlib because really, this is all C++, and our +wrapper pre-includes for mozalloc.h, which fails because templates +don't work inside extern "C". So, don't pre-include when we're not +including mozalloc.h. + + +diff --git config/gcc-stl-wrapper.template.h config/gcc-stl-wrapper.template.h +--- config/gcc-stl-wrapper.template.h ++++ config/gcc-stl-wrapper.template.h +@@ -12,33 +12,40 @@ + // compiling ObjC. + #if defined(__EXCEPTIONS) && __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS) + # error "STL code can only be used with -fno-exceptions" + #endif + + // Silence "warning: #include_next is a GCC extension" + #pragma GCC system_header + ++// Don't include mozalloc for cstdlib. See bug 1245076. ++#ifndef moz_dont_include_mozalloc_for_cstdlib ++# define moz_dont_include_mozalloc_for_cstdlib ++#endif ++#ifndef moz_dont_include_mozalloc_for_${HEADER} + // mozalloc.h wants ; break the cycle by always explicitly + // including here. NB: this is a tad sneaky. Sez the gcc docs: + // + // `#include_next' does not distinguish between and "file" + // inclusion, nor does it check that the file you specify has the + // same name as the current file. It simply looks for the file + // named, starting with the directory in the search path after the + // one where the current file was found. +-#include_next ++# include_next + + // See if we're in code that can use mozalloc. NB: this duplicates + // code in nscore.h because nscore.h pulls in prtypes.h, and chromium + // can't build with that being included before base/basictypes.h. +-#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) +-# include "mozilla/mozalloc.h" +-#else +-# error "STL code can only be used with infallible ::operator new()" ++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) ++# include "mozilla/mozalloc.h" ++# else ++# error "STL code can only be used with infallible ::operator new()" ++# endif ++ + #endif + + #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG) + // Enable checked iterators and other goodies + // + // FIXME/bug 551254: gcc's debug STL implementation requires -frtti. + // Figure out how to resolve this with -fno-rtti. Maybe build with + // -frtti in DEBUG builds? Property changes on: head/www/firefox-esr/files/patch-bug1245076 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property 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 Index: head/www/firefox-esr/files/patch-bug1268816 =================================================================== --- head/www/firefox-esr/files/patch-bug1268816 (nonexistent) +++ head/www/firefox-esr/files/patch-bug1268816 (revision 422403) @@ -0,0 +1,50 @@ + +# HG changeset patch +# User Lee Salzman +# Date 1461978185 14400 +# Node ID b622cbd9ba13d01abcb1d04684dcb39c22a08590 +# Parent f3a5c8b5e17073a1e68f079da93f8dbe10e454a9 +Bug 1268816 - allow Skia to use C++11 features on platforms that have them. r=froydnj + +diff --git config/stl-headers config/stl-headers +--- config/stl-headers ++++ config/stl-headers +@@ -29,16 +29,17 @@ iterator + limits + list + map + memory + ostream + set + stack + string ++type_traits + utility + vector + cassert + climits + cmath + cstdarg + cstdio + cstdlib +diff --git config/system-headers config/system-headers +--- config/system-headers ++++ config/system-headers +@@ -1109,16 +1109,17 @@ ThreadManagerTests.h + Threads.h + time.h + Timer.h + tlhelp32.h + ToolUtils.h + tr1/functional + trace.h + Traps.h ++type_traits + typeinfo + types.h + Types.h + UAppleEventsMgr.h + UAttachments.h + ucontext.h + uconv.h + UCursor.h Property changes on: head/www/firefox-esr/files/patch-bug1268816 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property 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 Index: head/www/firefox-esr/files/patch-bug1269171 =================================================================== --- head/www/firefox-esr/files/patch-bug1269171 (nonexistent) +++ head/www/firefox-esr/files/patch-bug1269171 (revision 422403) @@ -0,0 +1,258 @@ + +# HG changeset patch +# User Mike Hommey +# Date 1463557039 -32400 +# Node ID 68da139d0866977c0ada86319fa94388f2255446 +# Parent a640e6fa8ab9977fb6c5bcf63dc4daca6699477b +Bug 1269171 - Change how mozalloc.h is hooked in STL wrappers. r=froydnj + +Since the introduction of the STL wrappers, they have included +mozalloc.h, and multiple times, we've hit header reentrancy problems, +and worked around them as best as we could. + +Taking a step back, all mozalloc.h does is: +- declare moz_* allocator functions. +- define inline implementations of various operator new/delete variants. + +The first only requires the functions to be declared before they are used, +so mozalloc.h only needs to be included before anything that would use +those functions. + +The second doesn't actually require a specific order, as long as the +declaration for those functions comes before their use, and they are +either declared in or implicitly by the C++ compiler. + +So all in all, it doesn't matter that mozalloc.h is included before the +wrapped STL headers. What matters is that it's included when STL headers +are included. So arrange things such that mozalloc.h is included after +the first wrapped STL header is fully preprocessed (and all its includes +have been included). + + +diff --git config/gcc-stl-wrapper.template.h config/gcc-stl-wrapper.template.h +--- config/gcc-stl-wrapper.template.h ++++ config/gcc-stl-wrapper.template.h +@@ -12,56 +12,54 @@ + // compiling ObjC. + #if defined(__EXCEPTIONS) && __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS) + # error "STL code can only be used with -fno-exceptions" + #endif + + // Silence "warning: #include_next is a GCC extension" + #pragma GCC system_header + +-// Don't include mozalloc for cstdlib. See bug 1245076. +-#ifndef moz_dont_include_mozalloc_for_cstdlib +-# define moz_dont_include_mozalloc_for_cstdlib +-#endif +-#ifndef moz_dont_include_mozalloc_for_${HEADER} +-// mozalloc.h wants ; break the cycle by always explicitly +-// including here. NB: this is a tad sneaky. Sez the gcc docs: +-// +-// `#include_next' does not distinguish between and "file" +-// inclusion, nor does it check that the file you specify has the +-// same name as the current file. It simply looks for the file +-// named, starting with the directory in the search path after the +-// one where the current file was found. +-# include_next +- +-// See if we're in code that can use mozalloc. NB: this duplicates +-// code in nscore.h because nscore.h pulls in prtypes.h, and chromium +-// can't build with that being included before base/basictypes.h. +-# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) +-# include "mozilla/mozalloc.h" +-# else +-# error "STL code can only be used with infallible ::operator new()" +-# endif +- +-#endif +- + #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG) + // Enable checked iterators and other goodies + // + // FIXME/bug 551254: gcc's debug STL implementation requires -frtti. + // Figure out how to resolve this with -fno-rtti. Maybe build with + // -frtti in DEBUG builds? + // + // # define _GLIBCXX_DEBUG 1 + #endif + ++// Don't include mozalloc for cstdlib. See bug 1245076. ++#ifndef moz_dont_include_mozalloc_for_cstdlib ++# define moz_dont_include_mozalloc_for_cstdlib ++#endif ++ ++// Include mozalloc after the STL header and all other headers it includes ++// have been preprocessed. ++#if !defined(MOZ_INCLUDE_MOZALLOC_H) && \ ++ !defined(moz_dont_include_mozalloc_for_${HEADER}) ++# define MOZ_INCLUDE_MOZALLOC_H ++# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++#endif ++ + #pragma GCC visibility push(default) + #include_next <${HEADER}> + #pragma GCC visibility pop + ++#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++// See if we're in code that can use mozalloc. NB: this duplicates ++// code in nscore.h because nscore.h pulls in prtypes.h, and chromium ++// can't build with that being included before base/basictypes.h. ++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) ++# include "mozilla/mozalloc.h" ++# else ++# error "STL code can only be used with infallible ::operator new()" ++# endif ++#endif ++ + // gcc calls a __throw_*() function from bits/functexcept.h when it + // wants to "throw an exception". functexcept exists nominally to + // support -fno-exceptions, but since we'll always use the system + // libstdc++, and it's compiled with exceptions, then in practice + // these __throw_*() functions will always throw exceptions (shades of + // -fshort-wchar). We don't want that and so define our own inlined + // __throw_*(). + #ifndef mozilla_throw_gcc_h +diff --git config/make-stl-wrappers.py config/make-stl-wrappers.py +--- config/make-stl-wrappers.py ++++ config/make-stl-wrappers.py +@@ -25,28 +25,26 @@ def header_path(header, compiler): + def is_comment(line): + return re.match(r'\s*#.*', line) + + def main(outdir, compiler, template_file, header_list_file): + if not os.path.isdir(outdir): + os.mkdir(outdir) + + template = open(template_file, 'r').read() +- path_to_new = header_path('new', compiler) + + for header in open(header_list_file, 'r'): + header = header.rstrip() + if 0 == len(header) or is_comment(header): + continue + + path = header_path(header, compiler) + with FileAvoidWrite(os.path.join(outdir, header)) as f: + f.write(string.Template(template).substitute(HEADER=header, +- HEADER_PATH=path, +- NEW_HEADER_PATH=path_to_new)) ++ HEADER_PATH=path)) + + + if __name__ == '__main__': + if 5 != len(sys.argv): + print("""Usage: + python {0} OUT_DIR ('msvc'|'gcc') TEMPLATE_FILE HEADER_LIST_FILE + """.format(sys.argv[0]), file=sys.stderr) + sys.exit(1) +diff --git config/msvc-stl-wrapper.template.h config/msvc-stl-wrapper.template.h +--- config/msvc-stl-wrapper.template.h ++++ config/msvc-stl-wrapper.template.h +@@ -3,45 +3,33 @@ + */ + /* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + + #ifndef mozilla_${HEADER}_h + #define mozilla_${HEADER}_h + +-#ifndef MOZ_HAVE_INCLUDED_ALLOC +-#define MOZ_HAVE_INCLUDED_ALLOC +- + #if _HAS_EXCEPTIONS + # error "STL code can only be used with -fno-exceptions" + #endif + ++// Include mozalloc after the STL header and all other headers it includes ++// have been preprocessed. ++#if !defined(MOZ_INCLUDE_MOZALLOC_H) ++# define MOZ_INCLUDE_MOZALLOC_H ++# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++#endif ++ + // Code built with !_HAS_EXCEPTIONS calls std::_Throw(), but the win2k + // CRT doesn't export std::_Throw(). So we define it. + #ifndef mozilla_Throw_h + # include "mozilla/throw_msvc.h" + #endif + +-// Code might include before other wrapped headers, but +-// includes and so we want to wrap it. But mozalloc.h +-// wants also, so we break the cycle by always explicitly +-// including here. +-#include <${NEW_HEADER_PATH}> +- +-// See if we're in code that can use mozalloc. NB: this duplicates +-// code in nscore.h because nscore.h pulls in prtypes.h, and chromium +-// can't build with that being included before base/basictypes.h. +-#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) +-# include "mozilla/mozalloc.h" +-#else +-# error "STL code can only be used with infallible ::operator new()" +-#endif +-#endif /* MOZ_HAVE_INCLUDED_ALLOC */ +- + #ifdef _DEBUG + // From + // http://msdn.microsoft.com/en-us/library/aa985982%28VS.80%29.aspx + // and + // http://msdn.microsoft.com/en-us/library/aa985965%28VS.80%29.aspx + // there appear to be two types of STL container checking. The + // former is enabled by -D_DEBUG (which is implied by -MDd or -MTd), and + // looks to be full generation/mutation checked iterators as done by +@@ -70,9 +58,20 @@ + // but that's OK because we're not throwing them. + #pragma warning( push ) + #pragma warning( disable : 4275 4530 ) + + #include <${HEADER_PATH}> + + #pragma warning( pop ) + ++#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++// See if we're in code that can use mozalloc. NB: this duplicates ++// code in nscore.h because nscore.h pulls in prtypes.h, and chromium ++// can't build with that being included before base/basictypes.h. ++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) ++# include "mozilla/mozalloc.h" ++# else ++# error "STL code can only be used with infallible ::operator new()" ++# endif ++#endif ++ + #endif // if mozilla_${HEADER}_h +diff --git memory/mozalloc/mozalloc.h memory/mozalloc/mozalloc.h +--- memory/mozalloc/mozalloc.h ++++ memory/mozalloc/mozalloc.h +@@ -7,20 +7,27 @@ + + #ifndef mozilla_mozalloc_h + #define mozilla_mozalloc_h + + /* + * https://bugzilla.mozilla.org/show_bug.cgi?id=427099 + */ + +-#include +-#include + #if defined(__cplusplus) + # include ++// Since libstdc++ 6, including the C headers (e.g. stdlib.h) instead of the ++// corresponding C++ header (e.g. cstdlib) can cause confusion in C++ code ++// using things defined there. Specifically, with stdlib.h, the use of abs() ++// in gfx/graphite2/src/inc/UtfCodec.h somehow ends up picking the wrong abs() ++# include ++# include ++#else ++# include ++# include + #endif + + #if defined(__cplusplus) + #include "mozilla/fallible.h" + #include "mozilla/TemplateLib.h" + #endif + #include "mozilla/Attributes.h" + #include "mozilla/Types.h" Property changes on: head/www/firefox-esr/files/patch-bug1269171 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property 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 Index: head/www/libxul/Makefile =================================================================== --- head/www/libxul/Makefile (revision 422402) +++ head/www/libxul/Makefile (revision 422403) @@ -1,78 +1,78 @@ # Created by: Michael Johnson # $FreeBSD$ PORTNAME= libxul DISTVERSION= 45.4.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES?= www devel MASTER_SITES= MOZILLA/firefox/releases/${DISTVERSION}esr/source \ MOZILLA/firefox/candidates/${DISTVERSION}esr-candidates/build2/source DISTNAME= firefox-${DISTVERSION}esr.source MAINTAINER?= gecko@FreeBSD.org COMMENT?= Mozilla runtime package that can be used to bootstrap XUL+XPCOM apps BUILD_DEPENDS= nspr>=4.12:devel/nspr \ nss>=3.21.1:security/nss \ libevent2>=2.0.21_2:devel/libevent2 \ soundtouch>=1.9.0:audio/soundtouch \ harfbuzz>=1.1.0:print/harfbuzz \ graphite2>=1.3.6:graphics/graphite2 \ png>=1.6.19:graphics/png \ libvorbis>=1.3.5,3:audio/libvorbis \ libvpx>=1.5.0:multimedia/libvpx \ sqlite3>=3.9.1:databases/sqlite3 \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3 \ v4l_compat>0:multimedia/v4l_compat \ autoconf-2.13:devel/autoconf213 \ yasm:devel/yasm \ zip:archivers/zip LIB_DEPENDS= libv4l2.so:multimedia/libv4l WRKSRC:= ${WRKDIR}/firefox-${DISTVERSION}esr CONFLICTS_INSTALL= libxul-1.9.* USE_GL= gl USES= pathfix tar:xz MAKE_ENV= SKIP_GRE_REGISTRATION=1 mozappdir=${PREFIX}/lib/${MOZILLA} LDFLAGS+= -Wl,-rpath,${PREFIX}/lib/${MOZ_RPATH} USE_LDCONFIG= ${PREFIX}/lib/${MOZILLA} MOZ_OPTIONS?= --enable-application=xulrunner USE_GECKO= gecko CPE_PRODUCT= firefox_esr MOZILLA_EXEC_NAME=xulrunner USE_MOZILLA= # empty MOZILLA_PLIST_DIRS= bin include lib share/idl libdata MOZ_PKGCONFIG_FILES= libxul-embedding libxul mozilla-js \ mozilla-plugin OPTIONS_EXCLUDE= GSTREAMER LOGGING OPTIONS_DEFINE= RUST OPTIONS_DEFAULT= BUNDLED_CAIRO GTK2 OPTIONS_SINGLE+= TOOLKIT OPTIONS_SINGLE_TOOLKIT= GTK2 GTK3 .include "${.CURDIR}/../../www/firefox/Makefile.options" .if ${USE_MOZILLA:M-nss} MOZ_PKGCONFIG_FILES+= mozilla-nss .endif post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/xulrunner/stub/nsXULStub.cpp pre-configure: (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,${PREFIX}/lib/${MOZ_RPATH}\2| ; \ s|%sdkdir%|%sdkdir%/sdk|g ; \ s|%%MOZ_LIBDIR%%|${PREFIX}/lib/${MOZILLA}|g" \ ${WRKSRC}/xulrunner/installer/*.pc.in || ${TRUE} .include Index: head/www/libxul/files/patch-bug1245076 =================================================================== --- head/www/libxul/files/patch-bug1245076 (nonexistent) +++ head/www/libxul/files/patch-bug1245076 (revision 422403) @@ -0,0 +1,74 @@ + +# HG changeset patch +# User Mike Hommey +# Date 1457596445 -32400 +# Node ID 55212130f19da3079167a6b0a5a0ed6689c9a71d +# Parent 27c94617d7064d566c24a42e11cd4c7ef725923d +Bug 1245076 - Don't include mozalloc.h from the cstdlib wrapper. r=froydnj + +Our STL wrappers do various different things, one of which is including +mozalloc.h for infallible operator new. mozalloc.h includes stdlib.h, +which, in libstdc++ >= 6 is now itself a wrapper around cstdlib, which +circles back to our STL wrapper. + +But of the things our STL wrappers do, including mozalloc.h is not one +that is necessary for cstdlib. So skip including mozalloc.h in our +cstdlib wrapper. + +Additionally, some C++ sources (in media/mtransport) are including +headers in an extern "C" block, which end up including stdlib.h, which +ends up including cstdlib because really, this is all C++, and our +wrapper pre-includes for mozalloc.h, which fails because templates +don't work inside extern "C". So, don't pre-include when we're not +including mozalloc.h. + + +diff --git config/gcc-stl-wrapper.template.h config/gcc-stl-wrapper.template.h +--- config/gcc-stl-wrapper.template.h ++++ config/gcc-stl-wrapper.template.h +@@ -12,33 +12,40 @@ + // compiling ObjC. + #if defined(__EXCEPTIONS) && __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS) + # error "STL code can only be used with -fno-exceptions" + #endif + + // Silence "warning: #include_next is a GCC extension" + #pragma GCC system_header + ++// Don't include mozalloc for cstdlib. See bug 1245076. ++#ifndef moz_dont_include_mozalloc_for_cstdlib ++# define moz_dont_include_mozalloc_for_cstdlib ++#endif ++#ifndef moz_dont_include_mozalloc_for_${HEADER} + // mozalloc.h wants ; break the cycle by always explicitly + // including here. NB: this is a tad sneaky. Sez the gcc docs: + // + // `#include_next' does not distinguish between and "file" + // inclusion, nor does it check that the file you specify has the + // same name as the current file. It simply looks for the file + // named, starting with the directory in the search path after the + // one where the current file was found. +-#include_next ++# include_next + + // See if we're in code that can use mozalloc. NB: this duplicates + // code in nscore.h because nscore.h pulls in prtypes.h, and chromium + // can't build with that being included before base/basictypes.h. +-#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) +-# include "mozilla/mozalloc.h" +-#else +-# error "STL code can only be used with infallible ::operator new()" ++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) ++# include "mozilla/mozalloc.h" ++# else ++# error "STL code can only be used with infallible ::operator new()" ++# endif ++ + #endif + + #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG) + // Enable checked iterators and other goodies + // + // FIXME/bug 551254: gcc's debug STL implementation requires -frtti. + // Figure out how to resolve this with -fno-rtti. Maybe build with + // -frtti in DEBUG builds? Property changes on: head/www/libxul/files/patch-bug1245076 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property 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 Index: head/www/libxul/files/patch-bug1268816 =================================================================== --- head/www/libxul/files/patch-bug1268816 (nonexistent) +++ head/www/libxul/files/patch-bug1268816 (revision 422403) @@ -0,0 +1,50 @@ + +# HG changeset patch +# User Lee Salzman +# Date 1461978185 14400 +# Node ID b622cbd9ba13d01abcb1d04684dcb39c22a08590 +# Parent f3a5c8b5e17073a1e68f079da93f8dbe10e454a9 +Bug 1268816 - allow Skia to use C++11 features on platforms that have them. r=froydnj + +diff --git config/stl-headers config/stl-headers +--- config/stl-headers ++++ config/stl-headers +@@ -29,16 +29,17 @@ iterator + limits + list + map + memory + ostream + set + stack + string ++type_traits + utility + vector + cassert + climits + cmath + cstdarg + cstdio + cstdlib +diff --git config/system-headers config/system-headers +--- config/system-headers ++++ config/system-headers +@@ -1109,16 +1109,17 @@ ThreadManagerTests.h + Threads.h + time.h + Timer.h + tlhelp32.h + ToolUtils.h + tr1/functional + trace.h + Traps.h ++type_traits + typeinfo + types.h + Types.h + UAppleEventsMgr.h + UAttachments.h + ucontext.h + uconv.h + UCursor.h Property changes on: head/www/libxul/files/patch-bug1268816 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property 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 Index: head/www/libxul/files/patch-bug1269171 =================================================================== --- head/www/libxul/files/patch-bug1269171 (nonexistent) +++ head/www/libxul/files/patch-bug1269171 (revision 422403) @@ -0,0 +1,258 @@ + +# HG changeset patch +# User Mike Hommey +# Date 1463557039 -32400 +# Node ID 68da139d0866977c0ada86319fa94388f2255446 +# Parent a640e6fa8ab9977fb6c5bcf63dc4daca6699477b +Bug 1269171 - Change how mozalloc.h is hooked in STL wrappers. r=froydnj + +Since the introduction of the STL wrappers, they have included +mozalloc.h, and multiple times, we've hit header reentrancy problems, +and worked around them as best as we could. + +Taking a step back, all mozalloc.h does is: +- declare moz_* allocator functions. +- define inline implementations of various operator new/delete variants. + +The first only requires the functions to be declared before they are used, +so mozalloc.h only needs to be included before anything that would use +those functions. + +The second doesn't actually require a specific order, as long as the +declaration for those functions comes before their use, and they are +either declared in or implicitly by the C++ compiler. + +So all in all, it doesn't matter that mozalloc.h is included before the +wrapped STL headers. What matters is that it's included when STL headers +are included. So arrange things such that mozalloc.h is included after +the first wrapped STL header is fully preprocessed (and all its includes +have been included). + + +diff --git config/gcc-stl-wrapper.template.h config/gcc-stl-wrapper.template.h +--- config/gcc-stl-wrapper.template.h ++++ config/gcc-stl-wrapper.template.h +@@ -12,56 +12,54 @@ + // compiling ObjC. + #if defined(__EXCEPTIONS) && __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS) + # error "STL code can only be used with -fno-exceptions" + #endif + + // Silence "warning: #include_next is a GCC extension" + #pragma GCC system_header + +-// Don't include mozalloc for cstdlib. See bug 1245076. +-#ifndef moz_dont_include_mozalloc_for_cstdlib +-# define moz_dont_include_mozalloc_for_cstdlib +-#endif +-#ifndef moz_dont_include_mozalloc_for_${HEADER} +-// mozalloc.h wants ; break the cycle by always explicitly +-// including here. NB: this is a tad sneaky. Sez the gcc docs: +-// +-// `#include_next' does not distinguish between and "file" +-// inclusion, nor does it check that the file you specify has the +-// same name as the current file. It simply looks for the file +-// named, starting with the directory in the search path after the +-// one where the current file was found. +-# include_next +- +-// See if we're in code that can use mozalloc. NB: this duplicates +-// code in nscore.h because nscore.h pulls in prtypes.h, and chromium +-// can't build with that being included before base/basictypes.h. +-# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) +-# include "mozilla/mozalloc.h" +-# else +-# error "STL code can only be used with infallible ::operator new()" +-# endif +- +-#endif +- + #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG) + // Enable checked iterators and other goodies + // + // FIXME/bug 551254: gcc's debug STL implementation requires -frtti. + // Figure out how to resolve this with -fno-rtti. Maybe build with + // -frtti in DEBUG builds? + // + // # define _GLIBCXX_DEBUG 1 + #endif + ++// Don't include mozalloc for cstdlib. See bug 1245076. ++#ifndef moz_dont_include_mozalloc_for_cstdlib ++# define moz_dont_include_mozalloc_for_cstdlib ++#endif ++ ++// Include mozalloc after the STL header and all other headers it includes ++// have been preprocessed. ++#if !defined(MOZ_INCLUDE_MOZALLOC_H) && \ ++ !defined(moz_dont_include_mozalloc_for_${HEADER}) ++# define MOZ_INCLUDE_MOZALLOC_H ++# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++#endif ++ + #pragma GCC visibility push(default) + #include_next <${HEADER}> + #pragma GCC visibility pop + ++#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++// See if we're in code that can use mozalloc. NB: this duplicates ++// code in nscore.h because nscore.h pulls in prtypes.h, and chromium ++// can't build with that being included before base/basictypes.h. ++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) ++# include "mozilla/mozalloc.h" ++# else ++# error "STL code can only be used with infallible ::operator new()" ++# endif ++#endif ++ + // gcc calls a __throw_*() function from bits/functexcept.h when it + // wants to "throw an exception". functexcept exists nominally to + // support -fno-exceptions, but since we'll always use the system + // libstdc++, and it's compiled with exceptions, then in practice + // these __throw_*() functions will always throw exceptions (shades of + // -fshort-wchar). We don't want that and so define our own inlined + // __throw_*(). + #ifndef mozilla_throw_gcc_h +diff --git config/make-stl-wrappers.py config/make-stl-wrappers.py +--- config/make-stl-wrappers.py ++++ config/make-stl-wrappers.py +@@ -25,28 +25,26 @@ def header_path(header, compiler): + def is_comment(line): + return re.match(r'\s*#.*', line) + + def main(outdir, compiler, template_file, header_list_file): + if not os.path.isdir(outdir): + os.mkdir(outdir) + + template = open(template_file, 'r').read() +- path_to_new = header_path('new', compiler) + + for header in open(header_list_file, 'r'): + header = header.rstrip() + if 0 == len(header) or is_comment(header): + continue + + path = header_path(header, compiler) + with FileAvoidWrite(os.path.join(outdir, header)) as f: + f.write(string.Template(template).substitute(HEADER=header, +- HEADER_PATH=path, +- NEW_HEADER_PATH=path_to_new)) ++ HEADER_PATH=path)) + + + if __name__ == '__main__': + if 5 != len(sys.argv): + print("""Usage: + python {0} OUT_DIR ('msvc'|'gcc') TEMPLATE_FILE HEADER_LIST_FILE + """.format(sys.argv[0]), file=sys.stderr) + sys.exit(1) +diff --git config/msvc-stl-wrapper.template.h config/msvc-stl-wrapper.template.h +--- config/msvc-stl-wrapper.template.h ++++ config/msvc-stl-wrapper.template.h +@@ -3,45 +3,33 @@ + */ + /* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + + #ifndef mozilla_${HEADER}_h + #define mozilla_${HEADER}_h + +-#ifndef MOZ_HAVE_INCLUDED_ALLOC +-#define MOZ_HAVE_INCLUDED_ALLOC +- + #if _HAS_EXCEPTIONS + # error "STL code can only be used with -fno-exceptions" + #endif + ++// Include mozalloc after the STL header and all other headers it includes ++// have been preprocessed. ++#if !defined(MOZ_INCLUDE_MOZALLOC_H) ++# define MOZ_INCLUDE_MOZALLOC_H ++# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++#endif ++ + // Code built with !_HAS_EXCEPTIONS calls std::_Throw(), but the win2k + // CRT doesn't export std::_Throw(). So we define it. + #ifndef mozilla_Throw_h + # include "mozilla/throw_msvc.h" + #endif + +-// Code might include before other wrapped headers, but +-// includes and so we want to wrap it. But mozalloc.h +-// wants also, so we break the cycle by always explicitly +-// including here. +-#include <${NEW_HEADER_PATH}> +- +-// See if we're in code that can use mozalloc. NB: this duplicates +-// code in nscore.h because nscore.h pulls in prtypes.h, and chromium +-// can't build with that being included before base/basictypes.h. +-#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) +-# include "mozilla/mozalloc.h" +-#else +-# error "STL code can only be used with infallible ::operator new()" +-#endif +-#endif /* MOZ_HAVE_INCLUDED_ALLOC */ +- + #ifdef _DEBUG + // From + // http://msdn.microsoft.com/en-us/library/aa985982%28VS.80%29.aspx + // and + // http://msdn.microsoft.com/en-us/library/aa985965%28VS.80%29.aspx + // there appear to be two types of STL container checking. The + // former is enabled by -D_DEBUG (which is implied by -MDd or -MTd), and + // looks to be full generation/mutation checked iterators as done by +@@ -70,9 +58,20 @@ + // but that's OK because we're not throwing them. + #pragma warning( push ) + #pragma warning( disable : 4275 4530 ) + + #include <${HEADER_PATH}> + + #pragma warning( pop ) + ++#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++// See if we're in code that can use mozalloc. NB: this duplicates ++// code in nscore.h because nscore.h pulls in prtypes.h, and chromium ++// can't build with that being included before base/basictypes.h. ++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) ++# include "mozilla/mozalloc.h" ++# else ++# error "STL code can only be used with infallible ::operator new()" ++# endif ++#endif ++ + #endif // if mozilla_${HEADER}_h +diff --git memory/mozalloc/mozalloc.h memory/mozalloc/mozalloc.h +--- memory/mozalloc/mozalloc.h ++++ memory/mozalloc/mozalloc.h +@@ -7,20 +7,27 @@ + + #ifndef mozilla_mozalloc_h + #define mozilla_mozalloc_h + + /* + * https://bugzilla.mozilla.org/show_bug.cgi?id=427099 + */ + +-#include +-#include + #if defined(__cplusplus) + # include ++// Since libstdc++ 6, including the C headers (e.g. stdlib.h) instead of the ++// corresponding C++ header (e.g. cstdlib) can cause confusion in C++ code ++// using things defined there. Specifically, with stdlib.h, the use of abs() ++// in gfx/graphite2/src/inc/UtfCodec.h somehow ends up picking the wrong abs() ++# include ++# include ++#else ++# include ++# include + #endif + + #if defined(__cplusplus) + #include "mozilla/fallible.h" + #include "mozilla/TemplateLib.h" + #endif + #include "mozilla/Attributes.h" + #include "mozilla/Types.h" Property changes on: head/www/libxul/files/patch-bug1269171 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property 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 Index: head/www/seamonkey/Makefile =================================================================== --- head/www/seamonkey/Makefile (revision 422402) +++ head/www/seamonkey/Makefile (revision 422403) @@ -1,184 +1,184 @@ # Created by: eivind/dima/jseger # $FreeBSD$ PORTNAME= seamonkey DISTVERSION= 2.39 MOZILLA_VER= 42 # above + 3 -PORTREVISION= 11 +PORTREVISION= 12 CATEGORIES?= www mail news editors irc ipv6 MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source DISTFILES= ${PORTNAME}-${DISTVERSION}.source${EXTRACT_SUFX} EXTRACT_ONLY= ${PORTNAME}-${DISTVERSION}.source${EXTRACT_SUFX} MAINTAINER= gecko@FreeBSD.org COMMENT= The open source, standards compliant web browser BUILD_DEPENDS= nspr>=4.10.10:devel/nspr \ nss>=3.19.4:security/nss \ libevent2>=2.0.21_2:devel/libevent2 \ soundtouch>=1.8.0:audio/soundtouch \ harfbuzz>=0.9.42:print/harfbuzz \ graphite2>=1.2.4:graphics/graphite2 \ libvorbis>=1.3.5,3:audio/libvorbis \ libvpx>=1.3.0:multimedia/libvpx \ sqlite3>=3.8.9:databases/sqlite3 \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3 \ v4l_compat>0:multimedia/v4l_compat \ autoconf-2.13:devel/autoconf213 \ yasm:devel/yasm \ zip:archivers/zip # opus>=1.1:audio/opus \ LIB_DEPENDS= libv4l2.so:multimedia/libv4l EM_VERSION= 1.9.1 L_VERSION= 4.4 SSP_UNSAFE= yes USE_GECKO= gecko USE_GL= gl USES= tar:xz MOZ_PIS_SCRIPTS= moz_pis_S50cleanhome MOZ_EXTENSIONS= default MOZ_OPTIONS+= --program-transform-name='s/seamonkey/${MOZILLA}/' \ --enable-application=suite USE_MOZILLA= -opus MOZ_PKGCONFIG_FILES= NOT_FOR_ARCHS= ia64 OPTIONS_EXCLUDE=LOGGING OPTIONS_DEFINE= CHATZILLA COMPOSER ENIGMAIL LDAP LIGHTNING MAILNEWS OPTIONS_DEFAULT=CANBERRA CHATZILLA COMPOSER ENIGMAIL LDAP LIGHTNING MAILNEWS CHATZILLA_DESC?=Chatzilla IRC module COMPOSER_DESC?= HTML Composer module LDAP_DESC?= LDAP support for Mailnews MAILNEWS_DESC?= Mail and News modules .include "${.CURDIR}/../../www/firefox/Makefile.options" .include .if ${PORT_OPTIONS:MCHATZILLA} MOZ_EXTENSIONS:= ${MOZ_EXTENSIONS},irc .endif .include WRKSRC:= ${WRKDIR}/${PORTNAME}-${DISTVERSION} MOZSRC:= ${WRKSRC}/mozilla XPI_LIBDIR= ${PREFIX}/lib/xpi .if ! ${PORT_OPTIONS:MMAILNEWS} MOZ_OPTIONS+= --disable-ldap --disable-mailnews .else # mail and news desired, but not LDAP .if ! ${PORT_OPTIONS:MLDAP} MOZ_OPTIONS+= --disable-ldap --enable-mailnews .else MOZ_OPTIONS+= --enable-ldap --enable-mailnews .endif .if ${PORT_OPTIONS:MENIGMAIL} MASTER_SITES+= https://www.enigmail.net/download/source/:enigmail DISTFILES+= ${EM_DISTFILE}:enigmail RUN_DEPENDS+= gpg2:security/gnupg EM_DISTNAME= enigmail-${EM_VERSION} EM_DISTFILE= ${EM_DISTNAME}.tar.gz EM_XPI_FILE= ${WRKSRC}/mailnews/extensions/enigmail/build/${EM_DISTNAME}.xpi EM_ORIG_ID= {847b3a00-7ab1-11d4-8f02-006008948af5} EM_ID= ${PORTNAME}@mozilla-enigmail.org EM_ID_RFILES= ${XPI_LIBDIR}/${EM_ID}/install.rdf \ ${XPI_LIBDIR}/${EM_ID}/components/enigmail.js \ ${XPI_LIBDIR}/${EM_ID}/modules/app.jsm .endif .endif .if ! ${PORT_OPTIONS:MCOMPOSER} MOZ_OPTIONS+= --disable-composer .endif .if ${PORT_OPTIONS:MLIGHTNING} MOZ_OPTIONS+= --enable-calendar MOZ_MK_OPTIONS+= MOZ_CO_PROJECT=calendar LIGHTNING_DIR= share/lightning XPI_FILE= ${MOZ_OBJDIR}/dist/xpi-stage/lightning-${L_VERSION}.en-US.${OPSYS:tl}${OSREL}-${ARCH:S/amd64/x86_64/}.xpi XPI_ORIG_ID= {e2fda1a4-762b-4020-b5ad-a41df1933103} XPI_ID= lightning@seamonkey.mozilla.org .else MOZ_OPTIONS+= --disable-calendar .endif .if ${PORT_OPTIONS:MMAILNEWS} && ${PORT_OPTIONS:MENIGMAIL} post-extract: @${TAR} -xf ${_DISTDIR}/${EM_DISTFILE} \ -C ${WRKSRC}/mailnews/extensions .endif post-patch: @${REINPLACE_CMD} -e '/MOZPNG/s/=[0-9]*/=10511/' \ ${MOZSRC}/configure.in ${WRKSRC}/configure.in @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/suite/app/nsSuiteApp.cpp @${REINPLACE_CMD} -e '/accessibility.typeaheadfind.enablesound/s/true/false/' \ ${WRKSRC}/mozilla/modules/libpref/init/all.js @${SED} -e 's|%%MOZILLA%%|${MOZILLA}|g' \ < ${FILESDIR}/seamonkey.desktop.in > \ ${WRKDIR}/${MOZILLA}.desktop .if ${PORT_OPTIONS:MMAILNEWS} && ${PORT_OPTIONS:MENIGMAIL} @${REINPLACE_CMD} -e 's,/usr/bin/perl,${PERL},' \ ${WRKSRC}/mailnews/extensions/enigmail/util/fixlang.pl \ ${WRKSRC}/mailnews/extensions/enigmail/util/make-lang-xpi.pl @${REINPLACE_CMD} -e '/^xpi/s/$$/ all/' \ -e '/^all/s/ xpi//' \ -e '/^XPI_MODULE_VERS/s/= .*/= ${EM_VERSION}/' \ ${WRKSRC}/mailnews/extensions/enigmail/Makefile @${REINPLACE_CMD} -e '/em:version/s,>[^<]*<,>${EM_VERSION}<,' \ -e '/em:maxVersion/s/pre//' \ ${WRKSRC}/mailnews/extensions/enigmail/package/install.rdf .endif pre-configure: (cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf-2.13) (cd ${MOZSRC} && ${LOCALBASE}/bin/autoconf-2.13) (cd ${MOZSRC}/js/src/ && ${LOCALBASE}/bin/autoconf-2.13) .if ${PORT_OPTIONS:MMAILNEWS} && ${PORT_OPTIONS:MENIGMAIL} post-configure: cd ${WRKSRC}/mailnews/extensions/enigmail/ && \ ${SETENV} ${CONFIGURE_ENV} ${MAKE_ENV} ./configure .endif .if ${PORT_OPTIONS:MMAILNEWS} && ${PORT_OPTIONS:MENIGMAIL} post-build: ${DO_MAKE_BUILD:N-j*:S,${MAKEFILE},Makefile,} all xpi \ -C ${WRKSRC}/mailnews/extensions/enigmail .endif post-install: ${INSTALL_DATA} ${WRKDIR}/${MOZILLA}.desktop ${STAGEDIR}${PREFIX}/share/applications/ ${LN} -sf ${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default48.png \ ${STAGEDIR}${PREFIX}/share/pixmaps/${MOZILLA}.png .if ${PORT_OPTIONS:MLIGHTNING} @${MKDIR} ${STAGEDIR}${XPI_LIBDIR}/${XPI_ID} ${STAGEDIR}${XPI_LIBDIR}/symlinks/seamonkey @(cd ${STAGEDIR}${XPI_LIBDIR}/${XPI_ID}; ${TAR} -xf ${XPI_FILE}) @${REINPLACE_CMD} -i "" "s/${XPI_ORIG_ID}/${XPI_ID}/" ${STAGEDIR}${XPI_LIBDIR}/${XPI_ID}/install.rdf @${CHMOD} -R a+rX,go-w ${STAGEDIR}${XPI_LIBDIR}/${XPI_ID} @${LN} -sf ${XPI_LIBDIR}/${XPI_ID} ${STAGEDIR}${XPI_LIBDIR}/symlinks/seamonkey 2>/dev/null || true @${ECHO_CMD} '@exec ${LN} -sf %D/lib/xpi/${XPI_ID} ${LOCALBASE}/lib/seamonkey/extensions 2>/dev/null || true' >> ${TMPPLIST} @${ECHO_CMD} '@unexec ${RM} -f ${LOCALBASE}/lib/seamonkey/extensions/${XPI_ID}' >> ${TMPPLIST} .endif .if ${PORT_OPTIONS:MMAILNEWS} && ${PORT_OPTIONS:MENIGMAIL} @${MKDIR} ${STAGEDIR}${XPI_LIBDIR}/${EM_ID} ${STAGEDIR}${XPI_LIBDIR}/symlinks/${PORTNAME} @(cd ${STAGEDIR}${XPI_LIBDIR}/${EM_ID}; ${TAR} -xf ${EM_XPI_FILE}) @${REINPLACE_CMD} -i "" "s/${EM_ORIG_ID}/${EM_ID}/" ${EM_ID_RFILES:S/^/${STAGEDIR}/g} @${CHMOD} -R a+rX,go-w ${STAGEDIR}${XPI_LIBDIR}/${EM_ID} @${LN} -sf ${XPI_LIBDIR}/${EM_ID} ${STAGEDIR}${XPI_LIBDIR}/symlinks/${PORTNAME} 2>/dev/null || true @${ECHO_CMD} '@exec ${LN} -sf %D/lib/xpi/${EM_ID} ${LOCALBASE}/lib/${PORTNAME}/extensions 2>/dev/null || true' >> ${TMPPLIST} @${ECHO_CMD} '@unexec ${RM} -f ${LOCALBASE}/lib/${PORTNAME}/extensions/${EM_ID}' >> ${TMPPLIST} .endif .include Index: head/www/seamonkey/files/patch-bug1245076 =================================================================== --- head/www/seamonkey/files/patch-bug1245076 (nonexistent) +++ head/www/seamonkey/files/patch-bug1245076 (revision 422403) @@ -0,0 +1,74 @@ + +# HG changeset patch +# User Mike Hommey +# Date 1457596445 -32400 +# Node ID 55212130f19da3079167a6b0a5a0ed6689c9a71d +# Parent 27c94617d7064d566c24a42e11cd4c7ef725923d +Bug 1245076 - Don't include mozalloc.h from the cstdlib wrapper. r=froydnj + +Our STL wrappers do various different things, one of which is including +mozalloc.h for infallible operator new. mozalloc.h includes stdlib.h, +which, in libstdc++ >= 6 is now itself a wrapper around cstdlib, which +circles back to our STL wrapper. + +But of the things our STL wrappers do, including mozalloc.h is not one +that is necessary for cstdlib. So skip including mozalloc.h in our +cstdlib wrapper. + +Additionally, some C++ sources (in media/mtransport) are including +headers in an extern "C" block, which end up including stdlib.h, which +ends up including cstdlib because really, this is all C++, and our +wrapper pre-includes for mozalloc.h, which fails because templates +don't work inside extern "C". So, don't pre-include when we're not +including mozalloc.h. + + +diff --git config/gcc-stl-wrapper.template.h config/gcc-stl-wrapper.template.h +--- mozilla/config/gcc-stl-wrapper.template.h ++++ mozilla/config/gcc-stl-wrapper.template.h +@@ -12,33 +12,40 @@ + // compiling ObjC. + #if defined(__EXCEPTIONS) && __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS) + # error "STL code can only be used with -fno-exceptions" + #endif + + // Silence "warning: #include_next is a GCC extension" + #pragma GCC system_header + ++// Don't include mozalloc for cstdlib. See bug 1245076. ++#ifndef moz_dont_include_mozalloc_for_cstdlib ++# define moz_dont_include_mozalloc_for_cstdlib ++#endif ++#ifndef moz_dont_include_mozalloc_for_${HEADER} + // mozalloc.h wants ; break the cycle by always explicitly + // including here. NB: this is a tad sneaky. Sez the gcc docs: + // + // `#include_next' does not distinguish between and "file" + // inclusion, nor does it check that the file you specify has the + // same name as the current file. It simply looks for the file + // named, starting with the directory in the search path after the + // one where the current file was found. +-#include_next ++# include_next + + // See if we're in code that can use mozalloc. NB: this duplicates + // code in nscore.h because nscore.h pulls in prtypes.h, and chromium + // can't build with that being included before base/basictypes.h. +-#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) +-# include "mozilla/mozalloc.h" +-#else +-# error "STL code can only be used with infallible ::operator new()" ++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) ++# include "mozilla/mozalloc.h" ++# else ++# error "STL code can only be used with infallible ::operator new()" ++# endif ++ + #endif + + #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG) + // Enable checked iterators and other goodies + // + // FIXME/bug 551254: gcc's debug STL implementation requires -frtti. + // Figure out how to resolve this with -fno-rtti. Maybe build with + // -frtti in DEBUG builds? Property changes on: head/www/seamonkey/files/patch-bug1245076 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property 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 Index: head/www/seamonkey/files/patch-bug1268816 =================================================================== --- head/www/seamonkey/files/patch-bug1268816 (nonexistent) +++ head/www/seamonkey/files/patch-bug1268816 (revision 422403) @@ -0,0 +1,50 @@ + +# HG changeset patch +# User Lee Salzman +# Date 1461978185 14400 +# Node ID b622cbd9ba13d01abcb1d04684dcb39c22a08590 +# Parent f3a5c8b5e17073a1e68f079da93f8dbe10e454a9 +Bug 1268816 - allow Skia to use C++11 features on platforms that have them. r=froydnj + +diff --git config/stl-headers config/stl-headers +--- mozilla/config/stl-headers ++++ mozilla/config/stl-headers +@@ -27,16 +27,17 @@ iterator + limits + list + map + memory + ostream + set + stack + string ++type_traits + utility + vector + cassert + climits + cstdarg + cstdio + cstdlib + cstring +diff --git config/system-headers config/system-headers +--- mozilla/config/system-headers ++++ mozilla/config/system-headers +@@ -1109,16 +1109,17 @@ ThreadManagerTests.h + Threads.h + time.h + Timer.h + tlhelp32.h + ToolUtils.h + tr1/functional + trace.h + Traps.h ++type_traits + typeinfo + types.h + Types.h + UAppleEventsMgr.h + UAttachments.h + ucontext.h + uconv.h + UCursor.h Property changes on: head/www/seamonkey/files/patch-bug1268816 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property 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 Index: head/www/seamonkey/files/patch-bug1269171 =================================================================== --- head/www/seamonkey/files/patch-bug1269171 (nonexistent) +++ head/www/seamonkey/files/patch-bug1269171 (revision 422403) @@ -0,0 +1,229 @@ + +# HG changeset patch +# User Mike Hommey +# Date 1463557039 -32400 +# Node ID 68da139d0866977c0ada86319fa94388f2255446 +# Parent a640e6fa8ab9977fb6c5bcf63dc4daca6699477b +Bug 1269171 - Change how mozalloc.h is hooked in STL wrappers. r=froydnj + +Since the introduction of the STL wrappers, they have included +mozalloc.h, and multiple times, we've hit header reentrancy problems, +and worked around them as best as we could. + +Taking a step back, all mozalloc.h does is: +- declare moz_* allocator functions. +- define inline implementations of various operator new/delete variants. + +The first only requires the functions to be declared before they are used, +so mozalloc.h only needs to be included before anything that would use +those functions. + +The second doesn't actually require a specific order, as long as the +declaration for those functions comes before their use, and they are +either declared in or implicitly by the C++ compiler. + +So all in all, it doesn't matter that mozalloc.h is included before the +wrapped STL headers. What matters is that it's included when STL headers +are included. So arrange things such that mozalloc.h is included after +the first wrapped STL header is fully preprocessed (and all its includes +have been included). + + +diff --git config/gcc-stl-wrapper.template.h config/gcc-stl-wrapper.template.h +--- mozilla/config/gcc-stl-wrapper.template.h ++++ mozilla/config/gcc-stl-wrapper.template.h +@@ -12,56 +12,54 @@ + // compiling ObjC. + #if defined(__EXCEPTIONS) && __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS) + # error "STL code can only be used with -fno-exceptions" + #endif + + // Silence "warning: #include_next is a GCC extension" + #pragma GCC system_header + +-// Don't include mozalloc for cstdlib. See bug 1245076. +-#ifndef moz_dont_include_mozalloc_for_cstdlib +-# define moz_dont_include_mozalloc_for_cstdlib +-#endif +-#ifndef moz_dont_include_mozalloc_for_${HEADER} +-// mozalloc.h wants ; break the cycle by always explicitly +-// including here. NB: this is a tad sneaky. Sez the gcc docs: +-// +-// `#include_next' does not distinguish between and "file" +-// inclusion, nor does it check that the file you specify has the +-// same name as the current file. It simply looks for the file +-// named, starting with the directory in the search path after the +-// one where the current file was found. +-# include_next +- +-// See if we're in code that can use mozalloc. NB: this duplicates +-// code in nscore.h because nscore.h pulls in prtypes.h, and chromium +-// can't build with that being included before base/basictypes.h. +-# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) +-# include "mozilla/mozalloc.h" +-# else +-# error "STL code can only be used with infallible ::operator new()" +-# endif +- +-#endif +- + #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG) + // Enable checked iterators and other goodies + // + // FIXME/bug 551254: gcc's debug STL implementation requires -frtti. + // Figure out how to resolve this with -fno-rtti. Maybe build with + // -frtti in DEBUG builds? + // + // # define _GLIBCXX_DEBUG 1 + #endif + ++// Don't include mozalloc for cstdlib. See bug 1245076. ++#ifndef moz_dont_include_mozalloc_for_cstdlib ++# define moz_dont_include_mozalloc_for_cstdlib ++#endif ++ ++// Include mozalloc after the STL header and all other headers it includes ++// have been preprocessed. ++#if !defined(MOZ_INCLUDE_MOZALLOC_H) && \ ++ !defined(moz_dont_include_mozalloc_for_${HEADER}) ++# define MOZ_INCLUDE_MOZALLOC_H ++# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++#endif ++ + #pragma GCC visibility push(default) + #include_next <${HEADER}> + #pragma GCC visibility pop + ++#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++// See if we're in code that can use mozalloc. NB: this duplicates ++// code in nscore.h because nscore.h pulls in prtypes.h, and chromium ++// can't build with that being included before base/basictypes.h. ++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) ++# include "mozilla/mozalloc.h" ++# else ++# error "STL code can only be used with infallible ::operator new()" ++# endif ++#endif ++ + // gcc calls a __throw_*() function from bits/functexcept.h when it + // wants to "throw an exception". functexcept exists nominally to + // support -fno-exceptions, but since we'll always use the system + // libstdc++, and it's compiled with exceptions, then in practice + // these __throw_*() functions will always throw exceptions (shades of + // -fshort-wchar). We don't want that and so define our own inlined + // __throw_*(). + #ifndef mozilla_throw_gcc_h +diff --git config/make-stl-wrappers.py config/make-stl-wrappers.py +--- mozilla/config/make-stl-wrappers.py ++++ mozilla/config/make-stl-wrappers.py +@@ -25,28 +25,26 @@ def header_path(header, compiler): + def is_comment(line): + return re.match(r'\s*#.*', line) + + def main(outdir, compiler, template_file, header_list_file): + if not os.path.isdir(outdir): + os.mkdir(outdir) + + template = open(template_file, 'r').read() +- path_to_new = header_path('new', compiler) + + for header in open(header_list_file, 'r'): + header = header.rstrip() + if 0 == len(header) or is_comment(header): + continue + + path = header_path(header, compiler) + with FileAvoidWrite(os.path.join(outdir, header)) as f: + f.write(string.Template(template).substitute(HEADER=header, +- HEADER_PATH=path, +- NEW_HEADER_PATH=path_to_new)) ++ HEADER_PATH=path)) + + + if __name__ == '__main__': + if 5 != len(sys.argv): + print("""Usage: + python {0} OUT_DIR ('msvc'|'gcc') TEMPLATE_FILE HEADER_LIST_FILE + """.format(sys.argv[0]), file=sys.stderr) + sys.exit(1) +diff --git config/msvc-stl-wrapper.template.h config/msvc-stl-wrapper.template.h +--- mozilla/config/msvc-stl-wrapper.template.h ++++ mozilla/config/msvc-stl-wrapper.template.h +@@ -7,16 +7,23 @@ + + #ifndef mozilla_${HEADER}_h + #define mozilla_${HEADER}_h + + #if _HAS_EXCEPTIONS + # error "STL code can only be used with -fno-exceptions" + #endif + ++// Include mozalloc after the STL header and all other headers it includes ++// have been preprocessed. ++#if !defined(MOZ_INCLUDE_MOZALLOC_H) ++# define MOZ_INCLUDE_MOZALLOC_H ++# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++#endif ++ + // Code built with !_HAS_EXCEPTIONS calls std::_Throw(), but the win2k + // CRT doesn't export std::_Throw(). So we define it. + #ifndef mozilla_Throw_h + # include "mozilla/throw_msvc.h" + #endif + + // Code might include before other wrapped headers, but + // includes and so we want to wrap it. But mozalloc.h +@@ -66,9 +73,20 @@ + // but that's OK because we're not throwing them. + #pragma warning( push ) + #pragma warning( disable : 4275 4530 ) + + #include <${HEADER_PATH}> + + #pragma warning( pop ) + ++#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++// See if we're in code that can use mozalloc. NB: this duplicates ++// code in nscore.h because nscore.h pulls in prtypes.h, and chromium ++// can't build with that being included before base/basictypes.h. ++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) ++# include "mozilla/mozalloc.h" ++# else ++# error "STL code can only be used with infallible ::operator new()" ++# endif ++#endif ++ + #endif // if mozilla_${HEADER}_h +diff --git memory/mozalloc/mozalloc.h memory/mozalloc/mozalloc.h +--- mozilla/memory/mozalloc/mozalloc.h ++++ mozilla/memory/mozalloc/mozalloc.h +@@ -7,20 +7,27 @@ + + #ifndef mozilla_mozalloc_h + #define mozilla_mozalloc_h + + /* + * https://bugzilla.mozilla.org/show_bug.cgi?id=427099 + */ + +-#include +-#include + #if defined(__cplusplus) + # include ++// Since libstdc++ 6, including the C headers (e.g. stdlib.h) instead of the ++// corresponding C++ header (e.g. cstdlib) can cause confusion in C++ code ++// using things defined there. Specifically, with stdlib.h, the use of abs() ++// in gfx/graphite2/src/inc/UtfCodec.h somehow ends up picking the wrong abs() ++# include ++# include ++#else ++# include ++# include + #endif + + #if defined(__cplusplus) + #include "mozilla/fallible.h" + #include "mozilla/TemplateLib.h" + #endif + #include "mozilla/Attributes.h" + #include "mozilla/Types.h" Property changes on: head/www/seamonkey/files/patch-bug1269171 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property 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