mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-15 07:56:36 +00:00
2322b66100
PR: 278834
105 lines
3.6 KiB
Makefile
105 lines
3.6 KiB
Makefile
PORTNAME= librewolf
|
|
DISTVERSION= 124.0.1-1
|
|
PORTREVISION= 1
|
|
CATEGORIES= www wayland
|
|
MASTER_SITES= https://gitlab.com/api/v4/projects/32320088/packages/generic/librewolf-source/${DISTVERSION:R}-1/
|
|
DISTNAME= ${PORTNAME}-${DISTVERSION:R}-1.source.
|
|
EXTRACT_SUFX= tar.gz
|
|
|
|
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.95:security/nss \
|
|
icu>=73.1:devel/icu \
|
|
libevent>=2.1.8:devel/libevent \
|
|
harfbuzz>=8.3.0:print/harfbuzz \
|
|
graphite2>=1.3.14:graphics/graphite2 \
|
|
png>=1.6.39: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
|
|
EXTRA_PATCHES= ${FILESDIR}/unity-menubar.patch:-p1
|
|
|
|
.include "${.CURDIR}/../../www/firefox/Makefile.options"
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
.if ${ARCH} != powerpc64
|
|
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}
|
|
.endif
|
|
|
|
USE_GECKO= gecko
|
|
USE_MOZILLA= -sqlite
|
|
|
|
CFLAGS_powerpc64le= -DSQLITE_BYTEORDER=1234
|
|
# 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=""
|
|
MOZ_EXPORT+= MOZ_TELEMETRY_REPORTING="" \
|
|
MOZILLA_OFFICIAL="1" \
|
|
MOZ_OFFICIAL_BRANDING="1" \
|
|
MOZ_APP_DISPLAYNAME="Librewolf" \
|
|
MOZ_APP_NAME="librewolf"
|
|
|
|
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 \
|
|
--enable-rust-simd \
|
|
--with-app-name=librewolf \
|
|
--with-branding=browser/branding/librewolf \
|
|
--with-unsigned-addon-scopes=app,system \
|
|
--with-l10n-base=$PWD/browser/locales/l10n \
|
|
--enable-bootstrap \
|
|
MOZ_CRASHREPORTER=0 \
|
|
MOZ_DATA_REPORTING=0 \
|
|
MOZ_SERVICES_HEALTHREPORT=0
|
|
|
|
# helpful when testing beta
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION:R}-1
|
|
|
|
FIREFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/browser/chrome/icons/default/default48.png
|
|
FIREFOX_DESKTOP= ${MOZSRC}/taskcluster/docker/firefox-snap/firefox.desktop
|
|
|
|
.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|%%LOCALBASE%%|${LOCALBASE}|g' \
|
|
${WRKSRC}/browser/app/nsBrowserApp.cpp
|
|
@${RM} ${WRKSRC}/mozconfig
|
|
|
|
post-install:
|
|
${CP} ${FIREFOX_DESKTOP} ${STAGEDIR}${PREFIX}/share/applications/librewolf.desktop
|
|
${REINPLACE_CMD} -e 's|Firefox|Librewolf|g' ${STAGEDIR}${PREFIX}/share/applications/librewolf.desktop
|
|
${REINPLACE_CMD} -e 's|firefox|librewolf|g' ${STAGEDIR}${PREFIX}/share/applications/librewolf.desktop
|
|
${REINPLACE_CMD} -e 's|Icon=.*|Icon=${FIREFOX_ICON_SRC}|g' ${STAGEDIR}${PREFIX}/share/applications/librewolf.desktop
|
|
|
|
.include <bsd.port.mk>
|