diff --git a/www/librewolf/Makefile b/www/librewolf/Makefile index d5c03b400547..75b4870e338c 100644 --- a/www/librewolf/Makefile +++ b/www/librewolf/Makefile @@ -1,103 +1,103 @@ PORTNAME= librewolf -DISTVERSION= 128.0-2 -DISTVERSIONSUFFIX= .source +DISTVERSION= 128.0.3 +DISTVERSIONSUFFIX= -2.source CATEGORIES= www wayland -MASTER_SITES= https://gitlab.com/api/v4/projects/32320088/packages/generic/${PORTNAME}-source/${DISTVERSION}/ +MASTER_SITES= https://gitlab.com/api/v4/projects/32320088/packages/generic/${PORTNAME}-source/${DISTVERSION}-2/ MAINTAINER= freebsd@sysctl.cz COMMENT= Custom version of Firefox, focused on privacy, security and freedom WWW= https://librewolf.net/ LICENSE= MPL20 LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= nspr>=4.32:devel/nspr \ nss>=3.101:security/nss \ icu>=73.1:devel/icu \ libevent>=2.1.8:devel/libevent \ harfbuzz>=8.5.0:print/harfbuzz \ graphite2>=1.3.14:graphics/graphite2 \ png>=1.6.43:graphics/png \ dav1d>=1.0.0:multimedia/dav1d \ libvpx>=1.14.0:multimedia/libvpx \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \ v4l_compat>0:multimedia/v4l_compat \ autoconf2.13:devel/autoconf2.13 \ nasm:devel/nasm \ yasm:devel/yasm \ zip:archivers/zip USE_GECKO= gecko USE_MOZILLA= -sqlite # work around bindgen not finding ICU, e.g. # dist/include/mozilla/intl/ICU4CGlue.h:8:10: fatal error: 'unicode/uenum.h' file not found, err: true CONFIGURE_ENV+= BINDGEN_CFLAGS="-I${LOCALBASE}/include" CONFIGURE_ENV+= MOZ_REQUIRE_SIGNING="" CFLAGS_powerpc64le= -DSQLITE_BYTEORDER=1234 -WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION} +WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}-2 MOZILLA_CAP= ${MOZILLA:C/^(.).*/\1/:tu}${MOZILLA:C/^.//} MOZ_EXPORT+= MOZ_TELEMETRY_REPORTING="" \ MOZILLA_OFFICIAL="1" \ MOZ_OFFICIAL_BRANDING="1" \ MOZ_APP_DISPLAYNAME="${MOZILLA_CAP}" \ MOZ_APP_NAME="${MOZILLA}" MOZ_OPTIONS= --enable-application=browser \ --allow-addon-sideload \ --disable-crashreporter \ --disable-debug \ --disable-default-browser-agent \ --disable-tests \ --disable-updater \ --enable-hardening \ --enable-optimize \ --enable-release \ --with-app-name=${MOZILLA} \ --with-branding=browser/branding/${MOZILLA} \ --with-unsigned-addon-scopes=app,system \ --enable-bootstrap \ MOZ_CRASHREPORTER=0 \ MOZ_DATA_REPORTING=0 FIREFOX_ICON= ${MOZILLA}.png FIREFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/browser/chrome/icons/default/default48.png FIREFOX_DESKTOP= ${MOZSRC}/taskcluster/docker/firefox-snap/firefox.desktop .include "${.CURDIR}/../../www/firefox/Makefile.options" .include .if ${ARCH} == amd64 MOZ_OPTIONS+= --enable-rust-simd .endif .if ${ARCH} == powerpc64 CFLAGS+= -DHWY_COMPILE_ONLY_SCALAR MOZ_OPTIONS+= --without-wasm-sandboxed-libraries .else BUILD_DEPENDS+= ${LOCALBASE}/share/wasi-sysroot/lib/wasm32-wasi/libc++abi.a:devel/wasi-libcxx${LLVM_VERSION} \ ${LOCALBASE}/share/wasi-sysroot/lib/wasm32-wasi/libc.a:devel/wasi-libc \ wasi-compiler-rt${LLVM_VERSION}>0:devel/wasi-compiler-rt${LLVM_VERSION} MOZ_OPTIONS+= --with-wasi-sysroot=${LOCALBASE}/share/wasi-sysroot .endif post-patch: @${REINPLACE_CMD} -e 's/%u/%U/' -e '/X-MultipleArgs/d' \ -e 's/firefox/${MOZILLA}/' \ -e 's/Firefox/${MOZILLA_CAP}/' \ -e '/^Icon/s/=.*/=${FIREFOX_ICON:R}/' \ ${FIREFOX_DESKTOP} @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/browser/app/nsBrowserApp.cpp @${RM} ${WRKSRC}/mozconfig post-install: ${INSTALL_DATA} ${FIREFOX_DESKTOP} ${STAGEDIR}${PREFIX}/share/applications/${MOZILLA}.desktop ${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps ${LN} -sf ${FIREFOX_ICON_SRC} ${STAGEDIR}${PREFIX}/share/pixmaps/${FIREFOX_ICON} .include diff --git a/www/librewolf/distinfo b/www/librewolf/distinfo index cf07b9211a77..a57618cd4c66 100644 --- a/www/librewolf/distinfo +++ b/www/librewolf/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1720960887 -SHA256 (librewolf-128.0-2.source.tar.gz) = f09a75c9d86a6711edf66d45b3aeaa144951fb11eba145d4683fda0a978308f3 -SIZE (librewolf-128.0-2.source.tar.gz) = 1014230589 +TIMESTAMP = 1723485802 +SHA256 (librewolf-128.0.3-2.source.tar.gz) = df1033b7d825da65e1892f599e65525e8d138374f75c5ebb76ee13ab818b4020 +SIZE (librewolf-128.0.3-2.source.tar.gz) = 1014691590 diff --git a/www/librewolf/files/patch-bug847568 b/www/librewolf/files/patch-bug847568 index 2ee46579d43d..6e2cccebff70 100644 --- a/www/librewolf/files/patch-bug847568 +++ b/www/librewolf/files/patch-bug847568 @@ -1,260 +1,232 @@ # Allow building against system-wide graphite2/harfbuzz. -diff --git config/system-headers.mozbuild config/system-headers.mozbuild -index 0c06f581b33b..10f125be25ab 100644 ---- config/system-headers.mozbuild +--- config/system-headers.mozbuild.orig 2024-07-25 20:34:40 UTC +++ config/system-headers.mozbuild -@@ -1307,6 +1307,19 @@ if CONFIG["MOZ_ENABLE_LIBPROXY"]: +@@ -1305,6 +1305,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_ICU"]: system_headers += [ "unicode/calendar.h", -diff --git dom/base/moz.build dom/base/moz.build -index 14c9f9dd96fb..bd1c8f241e9b 100644 ---- dom/base/moz.build +--- dom/base/moz.build.orig 2024-07-25 20:34:40 UTC +++ dom/base/moz.build -@@ -606,6 +606,9 @@ FINAL_LIBRARY = "xul" +@@ -616,6 +616,9 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"] + GeneratedFile( "UseCounterList.h", script="gen-usecounters.py", -diff --git gfx/graphite2/geckoextra/moz.build gfx/graphite2/geckoextra/moz.build -new file mode 100644 -index 000000000000..24e8d7a03274 ---- /dev/null +--- gfx/graphite2/geckoextra/moz.build.orig 2024-08-13 19:48:57 UTC +++ gfx/graphite2/geckoextra/moz.build @@ -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 = 'xul' -diff --git gfx/harfbuzz/README-mozilla.fbsd gfx/harfbuzz/README-mozilla.fbsd -new file mode 100644 -index 000000000000..2a10eb1e2b42 ---- /dev/null +--- gfx/harfbuzz/README-mozilla.fbsd.orig 2024-08-13 19:48:57 UTC +++ gfx/harfbuzz/README-mozilla.fbsd @@ -0,0 +1,4 @@ +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 56ea317bedfc..07dd7f66f1bc 100644 ---- gfx/moz.build +--- gfx/moz.build.orig 2024-07-25 20:34:43 UTC +++ gfx/moz.build -@@ -10,6 +10,14 @@ with Files("**"): +@@ -10,6 +10,14 @@ with Files("wr/**"): with Files("wr/**"): BUG_COMPONENT = ("Core", "Graphics: WebRender") +if CONFIG["MOZ_SYSTEM_GRAPHITE2"]: + DIRS += ["graphite2/geckoextra"] +else: + DIRS += ["graphite2/src" ] + +if not CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + DIRS += ["harfbuzz/src"] + DIRS += [ "cairo", "2d", @@ -19,8 +27,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 c161d24df853..8c7dd395b371 100755 ---- gfx/skia/generate_mozbuild.py +--- gfx/skia/generate_mozbuild.py.orig 2024-07-25 20:34:42 UTC +++ gfx/skia/generate_mozbuild.py -@@ -91,6 +91,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'): +@@ -95,6 +95,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'): LOCAL_INCLUDES += [ "/gfx/cairo/cairo/src", -diff --git gfx/skia/moz.build gfx/skia/moz.build -index 83aa2957a938..0859316a1f09 100644 ---- gfx/skia/moz.build +--- gfx/skia/moz.build.orig 2024-07-25 20:34:42 UTC +++ gfx/skia/moz.build -@@ -601,6 +601,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'): +@@ -623,6 +623,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'): LOCAL_INCLUDES += [ "/gfx/cairo/cairo/src", -diff --git gfx/thebes/moz.build gfx/thebes/moz.build -index fd1fcf236d81..958d3f699ffd 100644 ---- gfx/thebes/moz.build +--- gfx/thebes/moz.build.orig 2024-07-25 20:34:42 UTC +++ gfx/thebes/moz.build -@@ -293,7 +293,13 @@ if CONFIG["MOZ_WAYLAND"]: +@@ -295,7 +295,13 @@ LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"] 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"] CXXFLAGS += ["-Werror=switch"] -diff --git intl/unicharutil/util/moz.build intl/unicharutil/util/moz.build -index 2bbd00415cae..f66bd37695d4 100644 ---- intl/unicharutil/util/moz.build +--- intl/unicharutil/util/moz.build.orig 2024-07-25 20:34:43 UTC +++ intl/unicharutil/util/moz.build @@ -24,6 +24,9 @@ UNIFIED_SOURCES += [ "nsUnicodeProperties.cpp", ] +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"] + include("/ipc/chromium/chromium-config.mozbuild") GeneratedFile( -diff --git netwerk/dns/moz.build netwerk/dns/moz.build -index c926d14707d1..35a3f33e2885 100644 ---- netwerk/dns/moz.build +--- netwerk/dns/moz.build.orig 2024-07-25 20:34:48 UTC +++ netwerk/dns/moz.build @@ -112,6 +112,9 @@ GeneratedFile( "etld_data.inc", script="prepare_tlds.py", inputs=["effective_tld_names.dat"] ) +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"] + # need to include etld_data.inc LOCAL_INCLUDES += [ "/netwerk/base", -diff --git old-configure.in old-configure.in -index 2ca88a20a4b3..88bc9b873eff 100644 ---- old-configure.in +--- old-configure.in.orig 2024-07-25 20:34:49 UTC +++ old-configure.in -@@ -1067,6 +1067,27 @@ fi - AC_DEFINE_UNQUOTED(MOZ_MACBUNDLE_ID,$MOZ_MACBUNDLE_ID) +@@ -704,6 +704,27 @@ dnl ================================================== AC_SUBST(MOZ_MACBUNDLE_ID) -+dnl ======================================================== + 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,14) + #error "Insufficient graphite2 version." + #endif + ], [], + [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])]) + CFLAGS=$_SAVE_CFLAGS +fi + - dnl ======================================================== ++dnl ======================================================== dnl = Child Process Name for IPC dnl ======================================================== -diff --git toolkit/library/moz.build toolkit/library/moz.build -index 76746f308011..f6844f4c400b 100644 ---- toolkit/library/moz.build + if test "$MOZ_WIDGET_TOOLKIT" != "android"; then +--- toolkit/library/moz.build.orig 2024-07-25 20:34:58 UTC +++ toolkit/library/moz.build -@@ -292,6 +292,12 @@ if CONFIG["MOZ_SYSTEM_PNG"]: +@@ -297,6 +297,12 @@ if CONFIG["MOZ_SYSTEM_WEBP"]: 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 a060a59f728f..f0778d1ae2d6 100644 ---- toolkit/moz.configure +--- toolkit/moz.configure.orig 2024-08-02 23:23:42 UTC +++ toolkit/moz.configure -@@ -1218,6 +1218,26 @@ def enable_cairo_ft(target, tree_freetype, freetype2_info): +@@ -1279,6 +1279,26 @@ set_config("CAIRO_FT_CFLAGS", ft2_info.cflags, when=en set_config("MOZ_ENABLE_CAIRO_FT", True, when=enable_cairo_ft) set_config("CAIRO_FT_CFLAGS", ft2_info.cflags, when=enable_cairo_ft) +# 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.7.4", + when="--with-system-harfbuzz") + +set_config("MOZ_SYSTEM_HARFBUZZ", depends_if(system_harfbuzz)(lambda _: True)) + # WebDriver (HTTP / BiDi) # ==============================================================