Changeset View
Changeset View
Standalone View
Standalone View
Mk/bsd.gecko.mk
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | |||||
MAINTAINER?= gecko@FreeBSD.org | MAINTAINER?= gecko@FreeBSD.org | ||||
MOZILLA?= ${PORTNAME} | MOZILLA?= ${PORTNAME} | ||||
MOZILLA_VER?= ${PORTVERSION} | MOZILLA_VER?= ${PORTVERSION} | ||||
MOZILLA_BIN?= ${PORTNAME}-bin | MOZILLA_BIN?= ${PORTNAME}-bin | ||||
MOZILLA_EXEC_NAME?=${MOZILLA} | MOZILLA_EXEC_NAME?=${MOZILLA} | ||||
USES+= compiler:c++17-lang cpe gl gmake gnome iconv localbase perl5 pkgconfig \ | USES+= compiler:c++17-lang cpe gl gmake gnome iconv localbase perl5 pkgconfig \ | ||||
python:3.6+,build desktop-file-utils | python:3.6+,build desktop-file-utils rust | ||||
CPE_VENDOR?=mozilla | CPE_VENDOR?=mozilla | ||||
USE_GL= gl | USE_GL= gl | ||||
USE_GNOME= cairo gdkpixbuf2 gtk20 gtk30 | USE_GNOME= cairo gdkpixbuf2 gtk20 gtk30 | ||||
USE_PERL5= build | USE_PERL5= build | ||||
USE_XORG= x11 xcb xcomposite xdamage xext xfixes xrender xt | USE_XORG= x11 xcb xcomposite xdamage xext xfixes xrender xt | ||||
HAS_CONFIGURE= yes | HAS_CONFIGURE= yes | ||||
CONFIGURE_OUTSOURCE= yes | CONFIGURE_OUTSOURCE= yes | ||||
LDFLAGS+= -Wl,--as-needed | LDFLAGS+= -Wl,--as-needed | ||||
BINARY_ALIAS+= python3=${PYTHON_CMD} | BINARY_ALIAS+= python3=${PYTHON_CMD} | ||||
BUNDLE_LIBS= yes | BUNDLE_LIBS= yes | ||||
BUILD_DEPENDS+= llvm${LLVM_DEFAULT}>0:devel/llvm${LLVM_DEFAULT} \ | BUILD_DEPENDS+= llvm${LLVM_DEFAULT}>0:devel/llvm${LLVM_DEFAULT} \ | ||||
rust-cbindgen>=0.16.0:devel/rust-cbindgen \ | rust-cbindgen>=0.16.0:devel/rust-cbindgen \ | ||||
${RUST_DEFAULT}>=1.51.0:lang/${RUST_DEFAULT} \ | |||||
node:www/node | node:www/node | ||||
LIB_DEPENDS+= libdrm.so:graphics/libdrm | LIB_DEPENDS+= libdrm.so:graphics/libdrm | ||||
MOZ_EXPORT+= ${CONFIGURE_ENV} \ | MOZ_EXPORT+= ${CONFIGURE_ENV} \ | ||||
PERL="${PERL}" \ | PERL="${PERL}" \ | ||||
PYTHON3="${PYTHON_CMD}" \ | PYTHON3="${PYTHON_CMD}" \ | ||||
RUSTFLAGS="${RUSTFLAGS}" | RUSTFLAGS="${RUSTFLAGS}" | ||||
MOZ_OPTIONS+= --prefix="${PREFIX}" | MOZ_OPTIONS+= --prefix="${PREFIX}" | ||||
MOZ_MK_OPTIONS+=MOZ_OBJDIR="${BUILD_WRKSRC}" | MOZ_MK_OPTIONS+=MOZ_OBJDIR="${BUILD_WRKSRC}" | ||||
Show All 16 Lines | |||||
. endif | . endif | ||||
MOZSRC?= ${WRKSRC} | MOZSRC?= ${WRKSRC} | ||||
PLISTF?= ${WRKDIR}/plist_files | PLISTF?= ${WRKDIR}/plist_files | ||||
MOZCONFIG?= ${WRKSRC}/.mozconfig | MOZCONFIG?= ${WRKSRC}/.mozconfig | ||||
MOZILLA_PLIST_DIRS?= bin lib share/pixmaps share/applications | 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=/} | |||||
.elif ${ARCH:Mpowerpc64*} | |||||
RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/:S/power/pwr/} | |||||
.else | |||||
RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/} | |||||
.endif | |||||
# Standard depends | # Standard depends | ||||
_ALL_DEPENDS= av1 event ffi graphite harfbuzz icu jpeg nspr nss png pixman sqlite vpx webp | _ALL_DEPENDS= av1 event ffi graphite harfbuzz icu jpeg nspr nss png pixman sqlite vpx webp | ||||
.if exists(${FILESDIR}/patch-bug1559213) | .if exists(${FILESDIR}/patch-bug1559213) | ||||
av1_LIB_DEPENDS= libaom.so:multimedia/aom libdav1d.so:multimedia/dav1d | av1_LIB_DEPENDS= libaom.so:multimedia/aom libdav1d.so:multimedia/dav1d | ||||
av1_MOZ_OPTIONS= --with-system-av1 | av1_MOZ_OPTIONS= --with-system-av1 | ||||
.endif | .endif | ||||
▲ Show 20 Lines • Show All 239 Lines • ▼ Show 20 Lines | @${REINPLACE_CMD} -e 's|/usr/local/netscape|${LOCALBASE}|g ; \ | ||||
${MOZSRC}/xpcom/io/SpecialSystemDirectory.cpp | ${MOZSRC}/xpcom/io/SpecialSystemDirectory.cpp | ||||
@${REINPLACE_CMD} -e 's|/etc|${PREFIX}&|g' \ | @${REINPLACE_CMD} -e 's|/etc|${PREFIX}&|g' \ | ||||
${MOZSRC}/xpcom/build/nsXPCOMPrivate.h | ${MOZSRC}/xpcom/build/nsXPCOMPrivate.h | ||||
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ | @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ | ||||
-e 's|mozilla/plugins|browser_plugins|g' \ | -e 's|mozilla/plugins|browser_plugins|g' \ | ||||
-e 's|share/mozilla/extensions|lib/xpi|g' \ | -e 's|share/mozilla/extensions|lib/xpi|g' \ | ||||
${MOZSRC}/xpcom/io/nsAppFileLocationProvider.cpp \ | ${MOZSRC}/xpcom/io/nsAppFileLocationProvider.cpp \ | ||||
${MOZSRC}/toolkit/xre/nsXREDirProvider.cpp | ${MOZSRC}/toolkit/xre/nsXREDirProvider.cpp | ||||
# Disable vendor checksums like lang/rust | |||||
@${REINPLACE_CMD} 's,"files":{[^}]*},"files":{},' \ | |||||
${MOZSRC}/third_party/rust/*/.cargo-checksum.json | |||||
pre-configure-script: | pre-configure-script: | ||||
# Check that the running kernel has COMPAT_FREEBSD11 required by lang/rust post-ino64 | # Check that the running kernel has COMPAT_FREEBSD11 required by lang/rust post-ino64 | ||||
@${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \ | @${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \ | ||||
${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh | ${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh | ||||
post-install-script: gecko-create-plist | post-install-script: gecko-create-plist | ||||
Show All 12 Lines |