commit: (<title> <author> <date> etc.)
blob: 37ee768401ac0b8e00eea306fe232752a804df09 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
PORTNAME= librewolf
DISTVERSION= 161.0
LWPATCH= -1
DISTVERSIONSUFFIX= ${LWPATCH}.source
CATEGORIES= www wayland
MASTER_SITES= https://librewolf.dev/api/packages/librewolf/generic/librewolf-source/${DISTVERSION}${LWPATCH}/ \
LOCAL/vvd
MAINTAINER= freebsd@sysctl.cz
COMMENT= Custom version of Firefox, focused on privacy, security and freedom
WWW= https://librewolf.net/
NOT_FOR_ARCHS= i386
NOT_FOR_ARCHS_REASON= fails to build: rust needs more address space than platform can provide
LICENSE= MPL20
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= nspr>=4.32:devel/nspr \
nss>=3.133:security/nss \
libevent>=2.1.8:devel/libevent \
harfbuzz>=10.1.0:print/harfbuzz \
graphite2>=1.3.14:graphics/graphite2 \
png>=1.6.45:graphics/png \
dav1d>=1.0.0:multimedia/dav1d \
libvpx>=1.15.0:multimedia/libvpx \
${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
v4l_compat>0:multimedia/v4l_compat \
nasm:devel/nasm \
yasm:devel/yasm \
zip:archivers/zip \
${LOCALBASE}/share/wasi-sysroot/lib/wasm32-wasip1/libc++abi.a:devel/wasi-libcxx${LLVM_VERSION} \
${LOCALBASE}/share/wasi-sysroot/lib/wasm32-wasip1/libc.a:devel/wasi-libc@${LLVM_VERSION} \
wasi-compiler-rt${LLVM_VERSION}>0:devel/wasi-compiler-rt${LLVM_VERSION}
USE_GECKO= gecko
USE_MOZILLA= -icu -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=""
WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}${LWPATCH}
FIREFOX_ICON= ${MOZILLA}.png
FIREFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/browser/chrome/icons/default/default48.png
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 \
--with-wasi-sysroot=${LOCALBASE}/share/wasi-sysroot \
--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 \
--with-l10n-base=${WRKSRC}/lw/l10n \
MOZ_CRASHREPORTER=0 \
MOZ_DATA_REPORTING=0
.include "${.CURDIR}/../../www/firefox/Makefile.options"
.include <bsd.port.options.mk>
.if ${ARCH} == i386 && ${MACHINE_CPU:Msse2}
# is not enabled on i386 by default
# Fix for error: always_inline function '_mm_setzero_si64' requires target feature 'sse2'
CFLAGS_i386+= -msse2
.endif
.if ${ARCH} == amd64
MOZ_OPTIONS+= --enable-rust-simd
.endif
post-extract:
@${SED} -e 's|@FIREFOX_ICON@|${FIREFOX_ICON:R}|;s|@MOZILLA@|${MOZILLA}|' \
-e 's|firefox|${MOZILLA}|' \
-e 's|Firefox|${MOZILLA_CAP}|' \
<${.CURDIR}/../firefox/files/firefox.desktop.in >${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop
post-patch:
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
${WRKSRC}/browser/app/nsBrowserApp.cpp
@${RM} ${WRKSRC}/mozconfig
.if ${ARCH} == i386
# mtu bindings were generated on amd64 and assert amd64 struct sizes and
# alignment; the struct definitions themselves are correct on i386
@${SED} -i '' -e '/^#\[allow(clippy::unnecessary_operation/,/^};/d' \
${WRKSRC}/third_party/rust/mtu/src/bindings/freebsd.rs
@${SED} -i '' -e 's|"src/bindings/freebsd.rs":"[0-9a-f]*",||' \
${WRKSRC}/third_party/rust/mtu/.cargo-checksum.json
.endif
post-install:
${INSTALL_DATA} ${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop ${STAGEDIR}${DESKTOPDIR}
${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps
${LN} -sf ${FIREFOX_ICON_SRC} ${STAGEDIR}${PREFIX}/share/pixmaps/${FIREFOX_ICON}
.include <bsd.port.mk>
|
This site is maintained by Jamie Landeg-Jones <jamie@catflap.org>, and is not an official FreeBSD project, nor is it endorsed by the FreeBSD team.