Index: branches/2020Q1/Mk/bsd.gecko.mk =================================================================== --- branches/2020Q1/Mk/bsd.gecko.mk (revision 525720) +++ branches/2020Q1/Mk/bsd.gecko.mk (revision 525721) @@ -1,392 +1,392 @@ #-*- tab-width: 4; -*- # ex:ts=4 # # Date created: 12 Nov 2005 # Whom: Michael Johnson # # $FreeBSD$ # # 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_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} # # NOMOZCONFIG Don't drop a customized .mozconfig into the build # directory. Options will have to be specified in # CONFIGURE_ARGS instead # MAINTAINER?= gecko@FreeBSD.org MOZILLA?= ${PORTNAME} MOZILLA_VER?= ${PORTVERSION} MOZILLA_BIN?= ${PORTNAME}-bin MOZILLA_EXEC_NAME?=${MOZILLA} USES+= compiler:c++17-lang cpe gl gmake gnome iconv localbase perl5 pkgconfig \ python:2.7,build desktop-file-utils CPE_VENDOR?=mozilla USE_GL= gl USE_GNOME= cairo gdkpixbuf2 gtk20 gtk30 USE_PERL5= build USE_XORG= x11 xcb xcomposite xdamage xext xfixes xrender xt HAS_CONFIGURE= yes CONFIGURE_OUTSOURCE= yes LDFLAGS+= -Wl,--as-needed BUNDLE_LIBS= yes BUILD_DEPENDS+= llvm${LLVM_DEFAULT}>0:devel/llvm${LLVM_DEFAULT} \ - rust-cbindgen>=0.8.7:devel/rust-cbindgen \ - ${RUST_DEFAULT}>=1.35:lang/${RUST_DEFAULT} \ + rust-cbindgen>=0.12.0:devel/rust-cbindgen \ + ${RUST_DEFAULT}>=1.39:lang/${RUST_DEFAULT} \ ${LOCALBASE}/bin/python${PYTHON3_DEFAULT}:lang/python${PYTHON3_DEFAULT:S/.//g} \ node:www/node MOZ_EXPORT+= ${CONFIGURE_ENV} \ LLVM_CONFIG=llvm-config${LLVM_DEFAULT} \ PERL="${PERL}" \ PYTHON3="${LOCALBASE}/bin/python${PYTHON3_DEFAULT}" \ RUSTFLAGS="${RUSTFLAGS}" MOZ_OPTIONS+= --prefix="${PREFIX}" MOZ_MK_OPTIONS+=MOZ_OBJDIR="${BUILD_WRKSRC}" # Require newer Clang than what's in base system unless user opted out . if ${CC} == cc && ${CXX} == c++ && exists(/usr/lib/libc++.so) BUILD_DEPENDS+= ${LOCALBASE}/bin/clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} CPP= ${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT} CC= ${LOCALBASE}/bin/clang${LLVM_DEFAULT} CXX= ${LOCALBASE}/bin/clang++${LLVM_DEFAULT} USES:= ${USES:Ncompiler\:*} # XXX avoid warnings . endif MOZSRC?= ${WRKSRC} PLISTF?= ${WRKDIR}/plist_files MOZCONFIG?= ${WRKSRC}/.mozconfig MOZILLA_PLIST_DIRS?= bin lib share/pixmaps share/applications # Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk .if ${ARCH} == amd64 || ${ARCH} == i386 RUSTFLAGS+= ${CFLAGS:M-march=*:S/-march=/-C target-cpu=/} .else RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/} .endif # Standard depends _ALL_DEPENDS= av1 event ffi graphite harfbuzz icu jpeg nspr nss png pixman sqlite vpx webp .if exists(${FILESDIR}/patch-bug1559213) av1_LIB_DEPENDS= libaom.so:multimedia/aom libdav1d.so:multimedia/dav1d av1_MOZ_OPTIONS= --with-system-av1 .endif event_LIB_DEPENDS= libevent.so:devel/libevent event_MOZ_OPTIONS= --with-system-libevent ffi_LIB_DEPENDS= libffi.so:devel/libffi ffi_MOZ_OPTIONS= --enable-system-ffi .if exists(${FILESDIR}/patch-bug847568) graphite_LIB_DEPENDS= libgraphite2.so:graphics/graphite2 graphite_MOZ_OPTIONS= --with-system-graphite2 harfbuzz_LIB_DEPENDS= libharfbuzz.so:print/harfbuzz harfbuzz_MOZ_OPTIONS= --with-system-harfbuzz .endif icu_LIB_DEPENDS= libicui18n.so:devel/icu icu_MOZ_OPTIONS= --with-system-icu --with-intl-api -jpeg_BUILD_DEPENDS=yasm:devel/yasm jpeg_USES= jpeg jpeg_MOZ_OPTIONS= --with-system-jpeg=${LOCALBASE} nspr_LIB_DEPENDS= libnspr4.so:devel/nspr nspr_MOZ_OPTIONS= --with-system-nspr nss_LIB_DEPENDS= libnss3.so:security/nss nss_MOZ_OPTIONS= --with-system-nss pixman_LIB_DEPENDS= libpixman-1.so:x11/pixman pixman_MOZ_OPTIONS= --enable-system-pixman png_LIB_DEPENDS= libpng.so:graphics/png png_MOZ_OPTIONS= --with-system-png=${LOCALBASE} sqlite_LIB_DEPENDS= libsqlite3.so:databases/sqlite3 sqlite_MOZ_OPTIONS= --enable-system-sqlite -vpx_BUILD_DEPENDS= yasm:devel/yasm vpx_LIB_DEPENDS= libvpx.so:multimedia/libvpx vpx_MOZ_OPTIONS= --with-system-libvpx webp_LIB_DEPENDS= libwebp.so:graphics/webp webp_MOZ_OPTIONS= --with-system-webp .for use in ${USE_MOZILLA} ${use:S/-/_WITHOUT_/}= ${TRUE} .endfor LIB_DEPENDS+= libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 .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_OPTIONS+= \ --enable-update-channel=${PKGNAMESUFFIX:Urelease:S/^-//} \ --disable-updater \ --with-system-zlib \ --with-system-bz2 # 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_LOCATION_SERVICE_API_KEY=AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8 MOZ_EXPORT+= MOZ_GOOGLE_SAFEBROWSING_API_KEY=AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8 .if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} CFLAGS+= -O3 MOZ_EXPORT+= MOZ_OPTIMIZE_FLAGS="${CFLAGS:M-O*}" MOZ_OPTIONS+= --enable-optimize .else MOZ_OPTIONS+= --disable-optimize . if ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld # ld 2.17 barfs on Stylo built with -C opt-level=0 USE_BINUTILS= yes LDFLAGS+= -B${LOCALBASE}/bin . endif .endif .if ${PORT_OPTIONS:MCANBERRA} RUN_DEPENDS+= libcanberra>0:audio/libcanberra .endif .if ${PORT_OPTIONS:MDBUS} BUILD_DEPENDS+= libnotify>0:devel/libnotify LIB_DEPENDS+= libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libstartup-notification-1.so:x11/startup-notification MOZ_OPTIONS+= --enable-startup-notification .else MOZ_OPTIONS+= --disable-dbus .endif .if ${PORT_OPTIONS:MFFMPEG} # dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp RUN_DEPENDS+= ffmpeg>=0.8,1:multimedia/ffmpeg .endif .if ${PORT_OPTIONS:MGCONF} # XXX USE_GNOME+=gconf2:build is not supported BUILD_DEPENDS+= ${LOCALBASE}/lib/libgconf-2.so:devel/gconf2 MOZ_OPTIONS+= --enable-gconf .else MOZ_OPTIONS+= --disable-gconf .endif .if ${PORT_OPTIONS:MLIBPROXY} LIB_DEPENDS+= libproxy.so:net/libproxy MOZ_OPTIONS+= --enable-libproxy .else MOZ_OPTIONS+= --disable-libproxy .endif .if ${PORT_OPTIONS:MALSA} BUILD_DEPENDS+= ${LOCALBASE}/include/alsa/asoundlib.h:audio/alsa-lib RUN_DEPENDS+= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins RUN_DEPENDS+= alsa-lib>=1.1.1_1:audio/alsa-lib MOZ_OPTIONS+= --enable-alsa .endif .if ${PORT_OPTIONS:MJACK} BUILD_DEPENDS+= ${LOCALBASE}/include/jack/jack.h:audio/jack MOZ_OPTIONS+= --enable-jack .endif .if ${PORT_OPTIONS:MPULSEAUDIO} BUILD_DEPENDS+= ${LOCALBASE}/include/pulse/pulseaudio.h:audio/pulseaudio MOZ_OPTIONS+= --enable-pulseaudio .else MOZ_OPTIONS+= --disable-pulseaudio .endif .if ${PORT_OPTIONS:MSNDIO} BUILD_DEPENDS+= ${LOCALBASE}/include/sndio.h:audio/sndio post-patch-SNDIO-on: @${REINPLACE_CMD} -e 's|OpenBSD|${OPSYS}|g' \ -e '/DISABLE_LIBSNDIO_DLOPEN/d' \ ${MOZSRC}/media/libcubeb/src/moz.build .endif .if ${PORT_OPTIONS:MDEBUG} MOZ_OPTIONS+= --enable-debug --disable-release STRIP= # ports/184285 .else MOZ_OPTIONS+= --disable-debug --disable-debug-symbols --enable-release . if ${ARCH:Maarch64} || ${MACHINE_CPU:Msse2} MOZ_OPTIONS+= --enable-rust-simd . 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 .if ${ARCH} == amd64 . if ${USE_MOZILLA:M-nss} USE_BINUTILS= # intel-gcm.s CFLAGS+= -B${LOCALBASE}/bin LDFLAGS+= -B${LOCALBASE}/bin . endif .elif ${ARCH:Mpowerpc*} . if ${ARCH} == "powerpc64" MOZ_EXPORT+= UNAME_m="${ARCH}" . endif .elif ${ARCH} == "sparc64" # Work around miscompilation/mislinkage of the sCanonicalVTable hacks. MOZ_OPTIONS+= --disable-v1-string-abi .endif .else # bsd.port.post.mk post-patch: gecko-post-patch gecko-post-patch: @${RM} ${MOZCONFIG} .if !defined(NOMOZCONFIG) .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 ${USE_MOZILLA:M-nspr} @${ECHO_MSG} "===> Applying NSPR patches" @for i in ${.CURDIR}/../../devel/nspr/files/patch-*; do \ ${PATCH} ${PATCH_ARGS} -d ${MOZSRC}/nsprpub < $$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 @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|/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 # Disable vendor checksums like lang/rust @${REINPLACE_CMD} 's,"files":{[^}]*},"files":{},' \ ${MOZSRC}/third_party/rust/*/.cargo-checksum.json post-install-script: gecko-create-plist gecko-create-plist: # Create the plist ${RM} ${PLISTF} .for dir in ${MOZILLA_PLIST_DIRS} @cd ${STAGEDIR}${PREFIX}/${dir} && ${FIND} -H -s * ! -type d | \ ${SED} -e 's|^|${dir}/|' >> ${PLISTF} .endfor ${CAT} ${PLISTF} | ${SORT} >> ${TMPPLIST} .endif .endif # HERE THERE BE TACOS -- adamw Index: branches/2020Q1/www/firefox/Makefile =================================================================== --- branches/2020Q1/www/firefox/Makefile (revision 525720) +++ branches/2020Q1/www/firefox/Makefile (revision 525721) @@ -1,60 +1,61 @@ # Created by: Alan Eldridge # $FreeBSD$ PORTNAME= firefox -DISTVERSION= 72.0.2 +DISTVERSION= 73.0 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= www MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ - MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source + MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build3/source DISTFILES= ${DISTNAME}.source${EXTRACT_SUFX} MAINTAINER= gecko@FreeBSD.org COMMENT= Web browser based on the browser portion of Mozilla BUILD_DEPENDS= nspr>=4.24:devel/nspr \ - nss>=3.48:security/nss \ + nss>=3.49.2:security/nss \ icu>=64.1,1:devel/icu \ libevent>=2.1.8:devel/libevent \ harfbuzz>=2.6.4:print/harfbuzz \ graphite2>=1.3.13:graphics/graphite2 \ png>=1.6.35:graphics/png \ libvpx>=1.5.0:multimedia/libvpx \ sqlite3>=3.30.1:databases/sqlite3 \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \ v4l_compat>0:multimedia/v4l_compat \ autoconf-2.13:devel/autoconf213 \ nasm:devel/nasm \ zip:archivers/zip USE_GECKO= gecko CONFLICTS_INSTALL= firefox-esr USE_MOZILLA= -vpx USES= tar:xz FIREFOX_ICON= ${MOZILLA}.png FIREFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/browser/chrome/icons/default/default48.png FIREFOX_DESKTOP= ${MOZSRC}/taskcluster/docker/${MOZILLA}-snap/${MOZILLA}.desktop MOZ_OPTIONS= --enable-application=browser \ --enable-official-branding .include "${.CURDIR}/../../www/firefox/Makefile.options" post-patch: @${REINPLACE_CMD} -e 's/%u/%U/' -e '/X-MultipleArgs/d' \ -e '/^Icon/s/=.*/=${FIREFOX_ICON:R}/' \ ${FIREFOX_DESKTOP} @${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: ${INSTALL_DATA} ${FIREFOX_DESKTOP} ${STAGEDIR}${PREFIX}/share/applications/ ${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps ${LN} -sf ${FIREFOX_ICON_SRC} ${STAGEDIR}${PREFIX}/share/pixmaps/${FIREFOX_ICON} .include Index: branches/2020Q1/www/firefox/distinfo =================================================================== --- branches/2020Q1/www/firefox/distinfo (revision 525720) +++ branches/2020Q1/www/firefox/distinfo (revision 525721) @@ -1,3 +1,3 @@ -TIMESTAMP = 1579296956 -SHA256 (firefox-72.0.2.source.tar.xz) = 77fd224bea885172d757aef587ad443f2171aa84e4297bca55df91a1951be389 -SIZE (firefox-72.0.2.source.tar.xz) = 315848856 +TIMESTAMP = 1581110080 +SHA256 (firefox-73.0.source.tar.xz) = b57af802aae32d7f4624ce8b373701236b76904abcb893ded9e0cb5805ba6e17 +SIZE (firefox-73.0.source.tar.xz) = 319387000 Index: branches/2020Q1/www/firefox/files/patch-bug1556301 =================================================================== --- branches/2020Q1/www/firefox/files/patch-bug1556301 (revision 525720) +++ branches/2020Q1/www/firefox/files/patch-bug1556301 (nonexistent) @@ -1,238 +0,0 @@ -commit 5f2329c58c1b -Author: myfreeweb -Date: Wed Dec 18 20:25:00 2019 +0000 - - Bug 1556301 - Wayland-EGL/GLES support in glxtest - - This allows GfxInfoX11 to get GLES3 and Mesa version from Wayland-EGL, which - allows automatic enablement of acceleration to work without Xwayland. - - This also fixes bug 1578598 - WebRender did not work correctly - without this GL version information. - - Differential Revision: https://phabricator.services.mozilla.com/D57474 ---- - toolkit/xre/glxtest.cpp | 132 +++++++++++++++++++++++++++++++++++-- - widget/gtk/mozwayland/mozwayland.h | 1 + - 2 files changed, 126 insertions(+), 7 deletions(-) - -diff --git toolkit/xre/glxtest.cpp toolkit/xre/glxtest.cpp -index 7b33a5c2b08f0..a1e6036cb6002 100644 ---- toolkit/xre/glxtest.cpp -+++ toolkit/xre/glxtest.cpp -@@ -36,6 +36,11 @@ - - #include "mozilla/Unused.h" - -+#ifdef MOZ_WAYLAND -+#include "nsAppRunner.h" // for IsWaylandDisabled -+#include "mozilla/widget/mozwayland.h" -+#endif -+ - // stuff from glx.h - typedef struct __GLXcontextRec* GLXContext; - typedef XID GLXPixmap; -@@ -74,6 +79,15 @@ typedef uint32_t GLenum; - #define GLX_RENDERER_ID_MESA 0x818E - // clang-format on - -+// stuff from egl.h -+#define EGL_BLUE_SIZE 0x3022 -+#define EGL_GREEN_SIZE 0x3023 -+#define EGL_RED_SIZE 0x3024 -+#define EGL_NONE 0x3038 -+#define EGL_VENDOR 0x3053 -+#define EGL_CONTEXT_CLIENT_VERSION 0x3098 -+#define EGL_NO_CONTEXT nullptr -+ - namespace mozilla { - namespace widget { - // the read end of the pipe, which will be used by GfxInfo -@@ -118,7 +132,10 @@ static int x_error_handler(Display*, XErrorEvent* ev) { - // care about leaking memory - extern "C" { - --static int get_egl_status(char* buf, int bufsize) { -+typedef void* EGLNativeDisplayType; -+ -+static int get_egl_status(char* buf, int bufsize, -+ EGLNativeDisplayType native_dpy, bool gles_test) { - void* libegl = dlopen("libEGL.so.1", RTLD_LAZY); - if (!libegl) { - libegl = dlopen("libEGL.so", RTLD_LAZY); -@@ -164,7 +181,7 @@ static int get_egl_status(char* buf, int bufsize) { - return 0; - } - -- EGLDisplay dpy = eglGetDisplay(nullptr); -+ EGLDisplay dpy = eglGetDisplay(native_dpy); - if (!dpy) { - dlclose(libegl); - return 0; -@@ -177,9 +194,87 @@ static int get_egl_status(char* buf, int bufsize) { - } - - int length = 0; -+ -+ if (gles_test) { -+ typedef void* EGLConfig; -+ typedef void* EGLContext; -+ typedef void* EGLSurface; -+ -+ typedef EGLBoolean (*PFNEGLCHOOSECONFIGPROC)( -+ EGLDisplay dpy, EGLint const* attrib_list, EGLConfig* configs, -+ EGLint config_size, EGLint* num_config); -+ PFNEGLCHOOSECONFIGPROC eglChooseConfig = -+ cast(eglGetProcAddress("eglChooseConfig")); -+ -+ typedef EGLContext (*PFNEGLCREATECONTEXTPROC)( -+ EGLDisplay dpy, EGLConfig config, EGLContext share_context, -+ EGLint const* attrib_list); -+ PFNEGLCREATECONTEXTPROC eglCreateContext = -+ cast(eglGetProcAddress("eglCreateContext")); -+ -+ typedef EGLSurface (*PFNEGLCREATEPBUFFERSURFACEPROC)( -+ EGLDisplay dpy, EGLConfig config, EGLint const* attrib_list); -+ PFNEGLCREATEPBUFFERSURFACEPROC eglCreatePbufferSurface = -+ cast( -+ eglGetProcAddress("eglCreatePbufferSurface")); -+ -+ typedef EGLBoolean (*PFNEGLMAKECURRENTPROC)( -+ EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext context); -+ PFNEGLMAKECURRENTPROC eglMakeCurrent = -+ cast(eglGetProcAddress("eglMakeCurrent")); -+ -+ void* libgles = dlopen("libGLESv2.so.2", RTLD_LAZY); -+ if (!libgles) { -+ libgles = dlopen("libGLESv2.so", RTLD_LAZY); -+ } -+ if (!libgles) { -+ fatal_error("Unable to load libGLESv2"); -+ } -+ -+ typedef GLubyte* (*PFNGLGETSTRING)(GLenum); -+ PFNGLGETSTRING glGetString = -+ cast(eglGetProcAddress("glGetString")); -+ -+ if (!glGetString) { -+ // Implementations disagree about whether eglGetProcAddress or dlsym -+ // should be used for getting functions from the actual API, see -+ // https://github.com/anholt/libepoxy/commit/14f24485e33816139398d1bd170d617703473738 -+ glGetString = cast(dlsym(libgles, "glGetString")); -+ } -+ -+ if (!glGetString) { -+ fatal_error("GLESv2 glGetString not found"); -+ } -+ -+ EGLint config_attrs[] = {EGL_RED_SIZE, 8, EGL_GREEN_SIZE, 8, -+ EGL_BLUE_SIZE, 8, EGL_NONE}; -+ EGLConfig config; -+ EGLint num_config; -+ eglChooseConfig(dpy, config_attrs, &config, 1, &num_config); -+ EGLint ctx_attrs[] = {EGL_CONTEXT_CLIENT_VERSION, 3, EGL_NONE}; -+ EGLContext ectx = eglCreateContext(dpy, config, EGL_NO_CONTEXT, ctx_attrs); -+ EGLSurface pbuf = eglCreatePbufferSurface(dpy, config, nullptr); -+ eglMakeCurrent(dpy, pbuf, pbuf, ectx); -+ -+ const GLubyte* versionString = glGetString(GL_VERSION); -+ const GLubyte* vendorString = glGetString(GL_VENDOR); -+ const GLubyte* rendererString = glGetString(GL_RENDERER); -+ -+ if (!versionString || !vendorString || !rendererString) -+ fatal_error("glGetString returned null"); -+ -+ length = snprintf(buf, bufsize, -+ "VENDOR\n%s\nRENDERER\n%s\nVERSION\n%s\nTFP\nTRUE\n", -+ vendorString, rendererString, versionString); -+ if (length >= bufsize) { -+ fatal_error("GL strings length too large for buffer size"); -+ } -+ } -+ - const char* driDriver = eglGetDisplayDriverName(dpy); - if (driDriver) { -- length = snprintf(buf, bufsize, "DRI_DRIVER\n%s\n", driDriver); -+ length += -+ snprintf(buf + length, bufsize - length, "DRI_DRIVER\n%s\n", driDriver); - } - - eglTerminate(dpy); -@@ -187,7 +282,7 @@ static int get_egl_status(char* buf, int bufsize) { - return length; - } - --void glxtest() { -+static void close_logging() { - // we want to redirect to /dev/null stdout, stderr, and while we're at it, - // any PR logging file descriptors. To that effect, we redirect all positive - // file descriptors up to what open() returns here. In particular, 1 is stdout -@@ -199,8 +294,32 @@ void glxtest() { - if (getenv("MOZ_AVOID_OPENGL_ALTOGETHER")) - fatal_error( - "The MOZ_AVOID_OPENGL_ALTOGETHER environment variable is defined"); -+} -+ -+#ifdef MOZ_WAYLAND -+bool wayland_egltest() { -+ // NOTE: returns false to fall back to X11 when the Wayland socket doesn't -+ // exist but fails with fatal_error if something actually went wrong -+ struct wl_display* dpy = wl_display_connect(nullptr); -+ if (!dpy) return false; -+ -+ enum { bufsize = 2048 }; -+ char buf[bufsize]; -+ -+ int length = get_egl_status(buf, bufsize, (EGLNativeDisplayType)dpy, true); -+ if (length >= bufsize) { -+ fatal_error("GL strings length too large for buffer size"); -+ } - -- ///// Open libGL and load needed symbols ///// -+ ///// Finally write data to the pipe -+ mozilla::Unused << write(write_end_of_the_pipe, buf, length); -+ -+ return true; -+} -+#endif -+ -+void glxtest() { -+ ///// Open libGL and load needed symbols ///// - #if defined(__OpenBSD__) || defined(__NetBSD__) - # define LIBGL_FILENAME "libGL.so" - #else -@@ -401,7 +520,7 @@ void glxtest() { - // If we failed to get the driver name from X, try via EGL_MESA_query_driver. - // We are probably using Wayland. - if (!gotDriDriver) { -- length += get_egl_status(buf + length, bufsize - length); -+ length += get_egl_status(buf + length, bufsize - length, nullptr, false); - if (length >= bufsize) { - fatal_error("GL strings length too large for buffer size"); - } -@@ -431,7 +550,12 @@ bool fire_glxtest_process() { - if (pid == 0) { - close(pfd[0]); - write_end_of_the_pipe = pfd[1]; -- glxtest(); -+ close_logging(); -+ // TODO: --display command line argument is not properly handled -+#ifdef MOZ_WAYLAND -+ if (IsWaylandDisabled() || !wayland_egltest()) -+#endif -+ glxtest(); - close(pfd[1]); - _exit(0); - } -diff --git widget/gtk/mozwayland/mozwayland.h widget/gtk/mozwayland/mozwayland.h -index b31742fb2bc33..8aa0ce6f4665a 100644 ---- widget/gtk/mozwayland/mozwayland.h -+++ widget/gtk/mozwayland/mozwayland.h -@@ -20,6 +20,7 @@ - extern "C" { - #endif - -+MOZ_EXPORT struct wl_display* wl_display_connect(const char* name); - MOZ_EXPORT int wl_display_roundtrip_queue(struct wl_display* display, - struct wl_event_queue* queue); - MOZ_EXPORT uint32_t wl_proxy_get_version(struct wl_proxy* proxy); Property changes on: branches/2020Q1/www/firefox/files/patch-bug1556301 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: branches/2020Q1/www/firefox/files/patch-addon-search =================================================================== --- branches/2020Q1/www/firefox/files/patch-addon-search (revision 525720) +++ branches/2020Q1/www/firefox/files/patch-addon-search (revision 525721) @@ -1,55 +1,55 @@ https://github.com/mozilla/addons/issues/708 https://github.com/mozilla/addons-frontend/issues/4610 diff --git browser/app/profile/firefox.js browser/app/profile/firefox.js index 75c2c5e435e35..4d8c09c02759b 100644 --- browser/app/profile/firefox.js +++ browser/app/profile/firefox.js -@@ -45,8 +45,8 @@ pref("extensions.webextOptionalPermissionPrompts", tru +@@ -37,8 +37,8 @@ pref("extensions.webextOptionalPermissionPrompts", tru + // Preferences for AMO integration pref("extensions.getAddons.cache.enabled", true); pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/api/v3/addons/search/?guid=%IDS%&lang=%LOCALE%"); - pref("extensions.getAddons.compatOverides.url", "https://services.addons.mozilla.org/api/v3/addons/compat-override/?guid=%IDS%&lang=%LOCALE%"); -pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%&platform=%OS%&appver=%VERSION%"); -pref("extensions.webservice.discoverURL", "https://discovery.addons.mozilla.org/%LOCALE%/firefox/discovery/pane/%VERSION%/%OS%/%COMPATIBILITY_MODE%"); +pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%&platform=Linux&appver=%VERSION%"); +pref("extensions.webservice.discoverURL", "https://discovery.addons.mozilla.org/%LOCALE%/firefox/discovery/pane/%VERSION%/Linux/%COMPATIBILITY_MODE%"); pref("extensions.getAddons.link.url", "https://addons.mozilla.org/%LOCALE%/firefox/"); - pref("extensions.getAddons.themes.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/themes/?src=firefox"); - -@@ -186,8 +186,8 @@ pref("app.update.service.enabled", true); + pref("extensions.getAddons.langpacks.url", "https://services.addons.mozilla.org/api/v3/addons/language-tools/?app=firefox&type=language&appversion=%VERSION%"); + pref("extensions.getAddons.discovery.api_url", "https://services.addons.mozilla.org/api/v4/discovery/?lang=%LOCALE%&edition=%DISTRIBUTION%"); +@@ -169,8 +169,8 @@ pref("app.update.url", "https://aus5.mozilla.org/updat // .. etc .. // pref("extensions.update.enabled", true); -pref("extensions.update.url", "https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%"); -pref("extensions.update.background.url", "https://versioncheck-bg.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%"); +pref("extensions.update.url", "https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=Linux&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%"); +pref("extensions.update.background.url", "https://versioncheck-bg.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=Linux&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%"); pref("extensions.update.interval", 86400); // Check for updates to Extensions and // Themes every day - // Non-symmetric (not shared by extensions) extension-specific [update] preferences + diff --git toolkit/mozapps/extensions/internal/AddonRepository.jsm toolkit/mozapps/extensions/internal/AddonRepository.jsm index f70fd8d7e3bd8..81e8cd7764fdf 100644 --- toolkit/mozapps/extensions/internal/AddonRepository.jsm +++ toolkit/mozapps/extensions/internal/AddonRepository.jsm @@ -602,7 +602,7 @@ var AddonRepository = { addon.version = String(aEntry.current_version.version); if (Array.isArray(aEntry.current_version.files)) { for (let file of aEntry.current_version.files) { - if (file.platform == "all" || file.platform == PLATFORM) { + if (file.platform == "all" || file.platform == "linux" || file.platform == PLATFORM) { if (file.url) { addon.sourceURI = NetUtil.newURI(file.url); } diff --git toolkit/mozapps/extensions/internal/XPIDatabase.jsm toolkit/mozapps/extensions/internal/XPIDatabase.jsm index f70fd8d7e3bd8..81e8cd7764fdf 100644 --- toolkit/mozapps/extensions/internal/XPIDatabase.jsm +++ toolkit/mozapps/extensions/internal/XPIDatabase.jsm @@ -355,7 +355,7 @@ class AddonInternal { // Something is causing errors in here try { for (let platform of this.targetPlatforms) { - if (platform.os == Services.appinfo.OS) { + if (platform.os == "Linux" || platform.os == Services.appinfo.OS) { if (platform.abi) { needsABI = true; if (platform.abi === abi) Index: branches/2020Q1/www/firefox/files/patch-bug1288587 =================================================================== --- branches/2020Q1/www/firefox/files/patch-bug1288587 (revision 525720) +++ branches/2020Q1/www/firefox/files/patch-bug1288587 (revision 525721) @@ -1,67 +1,70 @@ diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure index 855214a..1e91d51 100644 --- build/moz.configure/init.configure +++ build/moz.configure/init.configure -@@ -165,16 +165,17 @@ option(env='PYTHON', nargs=1, help='Python interpreter') - # ============================================================== - @depends('PYTHON', check_build_environment, mozconfig, '--help') - @imports('os') - @imports('sys') - @imports('subprocess') - @imports(_from='mozbuild.configure.util', _import='LineIO') +@@ -211,6 +211,7 @@ option(env='PYTHON', nargs=1, help='Python 2.7 interpr @imports(_from='mozbuild.virtualenv', _import='VirtualenvManager') @imports(_from='mozbuild.virtualenv', _import='verify_python_version') + @imports(_from='mozbuild.virtualenv', _import='PY2') +@imports(_from='__builtin__', _import='KeyError') - @imports('distutils.sysconfig') - def virtualenv_python(env_python, build_env, mozconfig, help): + def virtualenv_python2(env_python, build_env, mozconfig, help): if help: return - - python = env_python[0] if env_python else None - - # Ideally we'd rely on the mozconfig injection from mozconfig_options, -@@ -184,16 +185,22 @@ def virtualenv_python(env_python, build_env, mozconfig, help): - if 'PYTHON' in mozconfig['env']['added']: - python = mozconfig['env']['added']['PYTHON'] - elif 'PYTHON' in mozconfig['env']['modified']: - python = mozconfig['env']['modified']['PYTHON'][1] - elif 'PYTHON' in mozconfig['vars']['added']: +@@ -242,6 +243,12 @@ def virtualenv_python2(env_python, build_env, mozconfi python = mozconfig['vars']['added']['PYTHON'] elif 'PYTHON' in mozconfig['vars']['modified']: python = mozconfig['vars']['modified']['PYTHON'][1] + for i in ('env', 'vars'): + for j in ('added', 'modified'): + try: + del mozconfig[i][j]['PYTHON'] + except KeyError: + pass - with LineIO(lambda l: log.error(l)) as out: - verify_python_version(out) - topsrcdir, topobjdir = build_env.topsrcdir, build_env.topobjdir - if topobjdir.endswith('/js/src'): - topobjdir = topobjdir[:-7] + log.debug("python2: executable from configuration: %r" % python) - with LineIO(lambda l: log.info(l)) as out: -@@ -255,17 +262,20 @@ def virtualenv_python(env_python, build_env, mozconfig - log.info('Creating Python environment') - manager.build(python) +@@ -294,7 +301,10 @@ def virtualenv_python2(env_python, build_env, mozconfi + sys.executable, manager.python_path)) + log.info('Reexecuting in the virtualenv') + if env_python: +- del os.environ['PYTHON'] ++ try: ++ del os.environ['PYTHON'] ++ except KeyError: ++ pass + # One would prefer to use os.execl, but that's completely borked on + # Windows. + sys.exit(subprocess.call([python] + sys.argv)) +@@ -430,6 +440,7 @@ option(env='PYTHON3', nargs=1, help='Python 3 interpre + @imports(_from='mozbuild.virtualenv', _import='PY3') + @imports(_from='mozbuild.pythonutil', _import='find_python3_executable') + @imports(_from='mozbuild.pythonutil', _import='python_executable_version') ++@imports(_from='__builtin__', _import='KeyError') + def virtualenv_python3(env_python, build_env, mozillabuild, mozconfig, help): + if help: + return +@@ -465,6 +476,12 @@ def virtualenv_python3(env_python, build_env, mozillab + python = mozconfig['vars']['added']['PYTHON3'] + elif 'PYTHON3' in mozconfig['vars']['modified']: + python = mozconfig['vars']['modified']['PYTHON3'][1] ++ for i in ('env', 'vars'): ++ for j in ('added', 'modified'): ++ try: ++ del mozconfig[i][j]['PYTHON3'] ++ except KeyError: ++ pass - python = normsep(manager.python_path) + log.debug("python3: executable from configuration: %r" % python) - if not normsep(sys.executable).startswith(normsep(virtualenvs_root)): - log.info('Reexecuting in the virtualenv') - if env_python: -- del os.environ['PYTHON'] -+ try: -+ del os.environ['PYTHON'] -+ except KeyError: -+ pass - # One would prefer to use os.execl, but that's completely borked on - # Windows. - sys.exit(subprocess.call([python] + sys.argv)) - - # We are now in the virtualenv - if not distutils.sysconfig.get_python_lib(): - die('Could not determine python site packages directory') - +@@ -545,7 +562,10 @@ def virtualenv_python3(env_python, build_env, mozillab + sys.executable, manager.python_path)) + log.info('Re-executing in the virtualenv') + if env_python: +- del os.environ['PYTHON3'] ++ try: ++ del os.environ['PYTHON3'] ++ except KeyError: ++ pass + # One would prefer to use os.execl, but that's completely borked on + # Windows. + sys.exit(subprocess.call([python] + sys.argv)) Index: branches/2020Q1/www/firefox/files/patch-bug1594027 =================================================================== --- branches/2020Q1/www/firefox/files/patch-bug1594027 (nonexistent) +++ branches/2020Q1/www/firefox/files/patch-bug1594027 (revision 525721) @@ -0,0 +1,29 @@ +Disable STL wrappers in some places to help libc++ 9 + +diff --git config/external/rlbox/moz.build config/external/rlbox/moz.build +index d216e62cad861..391bbdf566b88 100644 +--- config/external/rlbox/moz.build ++++ config/external/rlbox/moz.build +@@ -26,4 +26,7 @@ SOURCES += [ + 'rlbox_thread_locals.cpp' + ] + ++# bug 1594027 ++DisableStlWrapping() ++ + FINAL_LIBRARY = 'xul' +\ No newline at end of file +diff --git gfx/graphite2/src/moz.build gfx/graphite2/src/moz.build +index 447cd861126a3..8a4fcd814e6fb 100755 +--- gfx/graphite2/src/moz.build ++++ gfx/graphite2/src/moz.build +@@ -69,6 +69,9 @@ if CONFIG['MOZ_WASM_SANDBOXING_GRAPHITE']: + # thebes + DefineAndWasmDefine('GRAPHITE2_STATIC', True) + ++# bug 1594027 ++DisableStlWrapping() ++ + # We allow warnings for third-party code that can be updated from upstream. + AllowCompilerWarnings() + Property changes on: branches/2020Q1/www/firefox/files/patch-bug1594027 ___________________________________________________________________ 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: branches/2020Q1/www/firefox/files/patch-bug847568 =================================================================== --- branches/2020Q1/www/firefox/files/patch-bug847568 (revision 525720) +++ branches/2020Q1/www/firefox/files/patch-bug847568 (revision 525721) @@ -1,286 +1,287 @@ # Allow building against system-wide graphite2/harfbuzz. diff --git config/system-headers.mozbuild config/system-headers.mozbuild index 7620b4d00623..09d3db5ca8c0 100644 --- config/system-headers.mozbuild +++ config/system-headers.mozbuild @@ -1299,6 +1299,19 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']: 'proxy.h', ] +if CONFIG['MOZ_SYSTEM_GRAPHITE2']: + system_headers += [ + 'graphite2/Font.h', + 'graphite2/Segment.h', + ] + +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: + system_headers += [ + 'harfbuzz/hb-glib.h', + 'harfbuzz/hb-ot.h', + 'harfbuzz/hb.h', + ] + if CONFIG['MOZ_SYSTEM_LIBVPX']: system_headers += [ 'vpx_mem/vpx_mem.h', diff --git dom/base/moz.build dom/base/moz.build index 8e19020315ae..2fcdbb6f7b42 100644 --- dom/base/moz.build +++ dom/base/moz.build @@ -543,6 +543,9 @@ if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']: if CONFIG['MOZ_X11']: CXXFLAGS += CONFIG['TK_CFLAGS'] +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] + GeneratedFile('UseCounterList.h', script='gen-usecounters.py', entry_point='use_counter_list', inputs=['UseCounters.conf']) diff --git gfx/graphite2/geckoextra/moz.build gfx/graphite2/geckoextra/moz.build new file mode 100644 index 0000000000000..24e8d7a03274a --- /dev/null +++ gfx/graphite2/geckoextra/moz.build -@@ -0,0 +1,20 @@ +@@ -0,0 +1,21 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# 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/. + +EXPORTS.graphite2 += [ + 'include/GraphiteExtra.h', ++ 'include/GraphiteStructsForRLBox.h', +] + +UNIFIED_SOURCES += [ + '../geckoextra/src/GraphiteExtra.cpp', +] + +CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS'] + +# Match bundled graphite2 configuration +AllowCompilerWarnings() + +FINAL_LIBRARY = 'gkmedias' diff --git gfx/graphite2/moz-gr-update.sh gfx/graphite2/moz-gr-update.sh index faaab1b17971..04eff5f09882 100644 --- gfx/graphite2/moz-gr-update.sh +++ gfx/graphite2/moz-gr-update.sh @@ -1,6 +1,7 @@ #!/bin/bash # Script used to update the Graphite2 library in the mozilla source tree +# and bump version for --with-system-graphite2 # This script lives in gfx/graphite2, along with the library source, # but must be run from the top level of the mozilla-central tree. @@ -37,12 +38,16 @@ echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla #find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s///;s/Windows.h/windows.h/;" {} \; #find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s///;s/Windows.h/windows.h/;" {} \; +# chase version for --with-system-graphite2 +perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$RELEASE/ and tr/./,/ \ + if /GR2_VERSION_REQUIRE/" old-configure.in + # summarize what's been touched echo Updated to $RELEASE. echo Here is what changed in the gfx/graphite2 directory: echo -hg stat gfx/graphite2 +hg stat old-configure.in gfx/graphite2 echo echo If gfx/graphite2/src/files.mk has changed, please make corresponding diff --git gfx/harfbuzz/README-mozilla gfx/harfbuzz/README-mozilla index 22c76a7df020..a01490bd49ee 100644 --- gfx/harfbuzz/README-mozilla +++ gfx/harfbuzz/README-mozilla @@ -15,3 +15,8 @@ from within the gfx/harfbuzz directory. If the collection of source files changes, manual updates to moz.build may be needed as we don't use the upstream makefiles. + +The in-tree copy may be omitted during build by --with-system-harfbuzz. +Make sure to keep pkg-config version check within toolkit/moz.configure 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 771f652e837a..3b358d84e384 100644 --- gfx/moz.build +++ gfx/moz.build @@ -13,6 +13,14 @@ with Files('wr/**'): if CONFIG['MOZ_TREE_CAIRO']: DIRS += ['cairo'] +if CONFIG['MOZ_SYSTEM_GRAPHITE2']: + DIRS += ['graphite2/geckoextra'] +else: + DIRS += ['graphite2/src' ] + +if not CONFIG['MOZ_SYSTEM_HARFBUZZ']: + DIRS += ['harfbuzz/src'] + DIRS += [ '2d', 'ycbcr', @@ -21,8 +29,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 e06ae3457a47..93faa61594a3 100755 --- gfx/skia/generate_mozbuild.py +++ gfx/skia/generate_mozbuild.py @@ -117,6 +117,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'): '-Wno-unused-private-field', ] +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'): CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS'] diff --git gfx/skia/moz.build gfx/skia/moz.build index 2118677ca3a8..e4978b413784 100644 --- gfx/skia/moz.build +++ gfx/skia/moz.build @@ -493,6 +493,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'): '-Wno-unused-private-field', ] +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'): CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS'] diff --git gfx/thebes/moz.build gfx/thebes/moz.build index 56f1b9fe3f4b..0ac1100b0df3 100644 --- gfx/thebes/moz.build +++ gfx/thebes/moz.build @@ -284,7 +284,13 @@ if CONFIG['MOZ_WAYLAND']: LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES'] -DEFINES['GRAPHITE2_STATIC'] = True +if CONFIG['MOZ_SYSTEM_GRAPHITE2']: + CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS'] +else: + DEFINES['GRAPHITE2_STATIC'] = True + +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] if CONFIG['CC_TYPE'] == 'clang': # Suppress warnings from Skia header files. diff --git intl/unicharutil/util/moz.build intl/unicharutil/util/moz.build index cb1233c56d7e..06fb1f9f174b 100644 --- intl/unicharutil/util/moz.build +++ intl/unicharutil/util/moz.build @@ -25,4 +25,7 @@ UNIFIED_SOURCES += [ 'nsUnicodeProperties.cpp', ] +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] + FINAL_LIBRARY = 'xul' diff --git netwerk/dns/moz.build netwerk/dns/moz.build index 79c26e3e7001..c4d93bc5f7dc 100644 --- netwerk/dns/moz.build +++ netwerk/dns/moz.build @@ -86,3 +86,6 @@ USE_LIBS += ['icu'] if CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += ['-Wno-error=shadow'] + +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] diff --git old-configure.in old-configure.in index 95a58b634593..b614eef85c89 100644 --- old-configure.in +++ old-configure.in @@ -2639,6 +2639,27 @@ dnl ======================================================== AC_SUBST(MOZ_LINUX_32_SSE2_STARTUP_ERROR) +dnl ======================================================== +dnl Check for graphite2 +dnl ======================================================== +if test -n "$MOZ_SYSTEM_GRAPHITE2"; then + dnl graphite2.pc has bogus version, check manually + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $MOZ_GRAPHITE2_CFLAGS" + AC_TRY_COMPILE([ #include + #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,3,12) ++ #if !GR2_VERSION_REQUIRE(1,3,13) + #error "Insufficient graphite2 version." + #endif + ], [], + [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])]) + CFLAGS=$_SAVE_CFLAGS +fi + dnl ======================================================== dnl Check for pixman and cairo dnl ======================================================== diff --git toolkit/library/moz.build toolkit/library/moz.build index 24f940e1ed7e..079a575adec3 100644 --- toolkit/library/moz.build +++ toolkit/library/moz.build @@ -248,6 +248,12 @@ if CONFIG['MOZ_SYSTEM_PNG']: if CONFIG['MOZ_SYSTEM_WEBP']: OS_LIBS += CONFIG['MOZ_WEBP_LIBS'] +if CONFIG['MOZ_SYSTEM_GRAPHITE2']: + OS_LIBS += CONFIG['MOZ_GRAPHITE2_LIBS'] + +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: + OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS'] + if CONFIG['MOZ_SYSTEM_LIBEVENT']: OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS'] diff --git toolkit/moz.configure toolkit/moz.configure index 9297e4d6f501..d8e273887e4b 100644 --- toolkit/moz.configure +++ toolkit/moz.configure @@ -937,6 +937,25 @@ add_old_configure_assignment('FT2_LIBS', add_old_configure_assignment('FT2_CFLAGS', ft2_info.cflags) +# Graphite2 +# ============================================================== +option('--with-system-graphite2', + help="Use system graphite2 (located with pkgconfig)") + +system_graphite2 = pkg_check_modules('MOZ_GRAPHITE2', 'graphite2', + when='--with-system-graphite2') + +set_config('MOZ_SYSTEM_GRAPHITE2', depends_if(system_graphite2)(lambda _: True)) + +# HarfBuzz +# ============================================================== +option('--with-system-harfbuzz', + help="Use system harfbuzz (located with pkgconfig)") + -+system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 2.6.2', ++system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 2.6.4', + when='--with-system-harfbuzz') + +set_config('MOZ_SYSTEM_HARFBUZZ', depends_if(system_harfbuzz)(lambda _: True)) # Remote agent (part of CDP based remote protocol) # ============================================================== Index: branches/2020Q1/www/firefox/files/patch-cubeb-sndio =================================================================== --- branches/2020Q1/www/firefox/files/patch-cubeb-sndio (revision 525720) +++ branches/2020Q1/www/firefox/files/patch-cubeb-sndio (revision 525721) @@ -1,113 +1,15 @@ -https://github.com/kinetiknz/cubeb/commit/a71f116501fe39962599c435ef65066f7e7ea9f5 -https://github.com/kinetiknz/cubeb/commit/3025cbec70f3ed097ec9a2f33a4823316a29efc4 -https://github.com/kinetiknz/cubeb/commit/bb2735fa2ff680fdc615edbb363b19ff4a759503 -https://github.com/kinetiknz/cubeb/pull/564 +https://github.com/kinetiknz/cubeb/commit/3ab507569153 diff --git a/src/cubeb_sndio.c b/src/cubeb_sndio.c index 4a05bd84..34b3513d 100644 --- media/libcubeb/src/cubeb_sndio.c +++ media/libcubeb/src/cubeb_sndio.c -@@ -32,6 +32,7 @@ - X(sio_eof) \ - X(sio_getpar) \ - X(sio_initpar) \ -+ X(sio_nfds) \ - X(sio_onmove) \ - X(sio_open) \ - X(sio_pollfd) \ -@@ -124,6 +125,23 @@ s16_to_float(void *ptr, long nsamp) - *(--dst) = (1. / 32768) * *(--src); - } - -+static const char * -+sndio_get_device() -+{ -+#ifdef __linux__ -+ /* -+ * On other platforms default to sndio devices, -+ * so cubebs other backends can be used instead. -+ */ -+ const char *dev = getenv("AUDIODEVICE"); -+ if (dev == NULL || *dev == '\0') -+ return "snd/0"; -+ return dev; -+#else -+ return SIO_DEVANY; -+#endif -+} -+ - static void - sndio_onmove(void *arg, int delta) +@@ -128,7 +128,7 @@ s16_to_float(void *ptr, long nsamp) + static const char * + sndio_get_device() { -@@ -135,18 +153,23 @@ sndio_onmove(void *arg, int delta) - static void * - sndio_mainloop(void *arg) - { --#define MAXFDS 8 -- struct pollfd pfds[MAXFDS]; -+ struct pollfd *pfds; - cubeb_stream *s = arg; - int n, eof = 0, prime, nfds, events, revents, state = CUBEB_STATE_STARTED; - size_t pstart = 0, pend = 0, rstart = 0, rend = 0; - long nfr; - -+ nfds = WRAP(sio_nfds)(s->hdl); -+ pfds = calloc(nfds, sizeof (struct pollfd)); -+ if (pfds == NULL) -+ return NULL; -+ - DPR("sndio_mainloop()\n"); - s->state_cb(s, s->arg, CUBEB_STATE_STARTED); - pthread_mutex_lock(&s->mtx); - if (!WRAP(sio_start)(s->hdl)) { - pthread_mutex_unlock(&s->mtx); -+ free(pfds); - return NULL; - } - DPR("sndio_mainloop(), started\n"); -@@ -274,6 +297,7 @@ sndio_mainloop(void *arg) - s->hwpos = s->swpos; - pthread_mutex_unlock(&s->mtx); - s->state_cb(s, s->arg, state); -+ free(pfds); - return NULL; - } - -@@ -281,6 +305,9 @@ sndio_mainloop(void *arg) - sndio_init(cubeb **context, char const *context_name) - { - void * libsndio = NULL; -+ struct sio_hdl *hdl; -+ -+ assert(context); - - #ifndef DISABLE_LIBSNDIO_DLOPEN - libsndio = dlopen("libsndio.so.7.0", RTLD_LAZY); -@@ -305,8 +332,17 @@ sndio_init(cubeb **context, char const *context_name) - #undef LOAD - #endif - -+ /* test if sndio works */ -+ hdl = WRAP(sio_open)(sndio_get_device(), SIO_PLAY, 1); -+ if (hdl == NULL) { -+ return CUBEB_ERROR; -+ } -+ WRAP(sio_close)(hdl); -+ - DPR("sndio_init(%s)\n", context_name); -- *context = malloc(sizeof(*context)); -+ *context = malloc(sizeof(**context)); -+ if (*context == NULL) -+ return CUBEB_ERROR; - (*context)->libsndio = libsndio; - (*context)->ops = &sndio_ops; - (void)context_name; -@@ -377,7 +413,7 @@ sndio_stream_init(cubeb * context, - goto err; - } - s->context = context; -- s->hdl = WRAP(sio_open)(NULL, s->mode, 1); -+ s->hdl = WRAP(sio_open)(sndio_get_device(), s->mode, 1); - if (s->hdl == NULL) { - DPR("sndio_stream_init(), sio_open() failed\n"); - goto err; +-#ifndef __OpenBSD__ ++#ifdef __linux__ + /* + * On other platforms default to sndio devices, + * so cubebs other backends can be used instead. Index: branches/2020Q1 =================================================================== --- branches/2020Q1 (revision 525720) +++ branches/2020Q1 (revision 525721) Property changes on: branches/2020Q1 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r525108,525155,525478,525512