[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / security / tor-browser

File: [cvs.NetBSD.org] / pkgsrc / security / tor-browser / Makefile (download)

Revision 1.93, Thu Jul 15 13:50:16 2021 UTC (3 months, 1 week ago) by wiz
Branch: MAIN
Changes since 1.92: +4 -4 lines

tor-browser: update to 10.5.2.


Windows + OS X + Linux

    Update Firefox to 78.12.0esr
    Bug 40497: Cannot set multiple pages as home pages in 10.5a17
    Bug 40507: Full update is not downloaded after applying partial update fails
    Bug 40510: open tabs get redirected to about:torconnect on restart




    All Platforms
        Update NoScript to 11.2.9
        Update Tor Launcher to 0.2.30
        Translations update
        Bug 25483: Provide Snowflake based on Pion for Windows, macOS, and Linux
        Bug 33761: Remove unnecessary snowflake dependencies
        Bug 40064: Bump libevent to 2.1.12
        Bug 40137: Migrate https-everywhere storage to idb
        Bug 40261: Bump versions of snowflake and webrtc
        Bug 40263: Update domain front for Snowflake
        Bug 40302: Update version of snowflake
        Bug 40030: DuckDuckGo redirect to html doesn't work
    Windows + OS X + Linux
        Bug 27476: Implement about:torconnect captive portal within Tor Browser [tor-browser]
        Bug 32228: Bookmark TPO support domains in Tor Browser
        Bug 33803: Add a secondary nightly MAR signing key [tor-browser]
        Bug 33954: Consider different approach for Bug 2176
        Bug 34345: "Don't Bootstrap" Startup Mode
        Bug 40011: Rename tor-browser-brand.ftl to brand.ftl
        Bug 40012: Fix about:tor not loading some images in 82
        Bug 40138: Move our primary nightly MAR signing key to tor-browser
        Bug 40209: Implement Basic Crypto Safety
        Bug 40428: Correct minor Cryptocurrency warning string typo
        Bug 40429: Update Onboarding for 10.5
        Bug 40455: Block or recover background requests after bootstrap
        Bug 40456: Update the SecureDrop HTTPS-Everywhere update channel
        Bug 40475: Include clearing CORS preflight cache
        Bug 40478: Onion alias url rewrite is broken
        Bug 40484: Bootstrapping page show Quickstart text
        Bug 40490: BridgeDB bridge captcha selection is broken in alpha
        Bug 40495: Onion pattern is focusable by click on about:torconnect
        Bug 40499: Onion Alias doesn't work with TOR_SKIP_LAUNCH
        Bug 40089: Remove CentOS 6 support for Tor Browser 10.5
    Build System
        All Platforms
            Update Go to 1.15.13
            Bug 23631: Use rootless containers [tor-browser-build]
            Bug 33693: Change snowflake and meek dummy address [tor-browser]
            Bug 40016: getfpaths is not setting origin_project
            Bug 40169: Update apt package cache after calling pre_pkginst, too
            Bug 40194: Remove osname part in cbindgen filename
        Windows + OS X + Linux
            Bug 40081: Build Mozilla code with --enable-rust-simd
            Bug 40104: Use our TMPDIR when creating our .mar files
            Bug 40133: Bump Rust version for ESR 78 to 1.43.0
            Bug 40166: Update apt cache before calling pre_pkginst in container-image config
            Bug 26238: Move to Debian Jessie for our Linux builds
            Bug 31729: Support Wayland
            Bug 40041: Remove CentOS 6 support for 10.5 series
            Bug 40103: Add i386 pkg-config path for linux-i686
            Bug 40112: Strip libstdc++ we ship
            Bug 40118: Add missing libdrm dev package to firefox container
            Bug 40235: Bump apt for Jessie containers

# $NetBSD: Makefile,v 1.93 2021/07/15 13:50:16 wiz Exp $
# How to update this package:
# replace all patches with the one from the correspoding www/firefox${ESR_RELEASE}
# compare e.g. the output of
# diff -r -I NetBSD . ../../www/firefox78
# BUT keep:
# patch-.mozconfig (if still necessary)
# patch-browser_app_profile_000-tor-browser.js
# patch-toolkit_moz.configure (second chunk)
# patch-xpcom_io_TorFileUtils.cpp
# make the patches apply
# when packaged up, read MESSAGE and test by visiting https://check.torproject.org
# and https://panopticlick.eff.org

DISTNAME=	src-firefox-tor-browser-78.12.0esr-10.5-1-build1
PKGNAME=	tor-browser-10.5.2
CATEGORIES=	security www
MASTER_SITES=	https://dist.torproject.org/torbrowser/${PKGVERSION_NOREV}/
#DISTFILES+=	src-tor-launcher-0.2.30${EXTRACT_SUFX}

HOMEPAGE=	https://www.torproject.org/projects/torbrowser.html.en
COMMENT=	Tor Browser based on Firefox
LICENSE=	mpl-1.1

UNLIMIT_RESOURCES+=	datasize virtualsize


MOZILLA_DIR=	# empty

DEPENDS+=	tor-[0-9]*:../../net/tor
DEPENDS+=	tor-browser-https-everywhere>=2020.5.20:../../security/tor-browser-https-everywhere
DEPENDS+=	tor-browser-noscript>=11.0.32:../../security/tor-browser-noscript

.include "../../mk/bsd.prefs.mk"

CONFIGURE_ARGS+=	--enable-tor-browser-data-outside-app-dir
CONFIGURE_ARGS+=	--with-tor-browser-version=${PKGVERSION_NOREV}

# workaround for link of libxul.so etc.
LDFLAGS.DragonFly+=	-lplc4 -lnspr4
LDFLAGS.FreeBSD+=	-lplc4 -lnspr4
LDFLAGS.Linux+=		-lnspr4
LDFLAGS.SunOS+=		-lm


# Avoid ld "invalid section index" errors.
BUILDLINK_TRANSFORM.SunOS+=	rm:-fdata-sections
BUILDLINK_TRANSFORM.SunOS+=	rm:-ffunction-sections

# Workaround for https://bugs.llvm.org/show_bug.cgi?id=46366
BUILDLINK_TRANSFORM.NetBSD+=	rm:-fexperimental-new-pass-manager

# Remove hardcoded build directory.
SUBST_CLASSES+=			fix-build-dir
SUBST_STAGE.fix-build-dir=	pre-configure
SUBST_FILES.fix-build-dir+=	.mozconfig
SUBST_SED.fix-build-dir+=	-e 's,mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@,,'

SUBST_STAGE.fonts=	pre-configure
SUBST_FILES.fonts+=	tor-browser_en-US/Browser/TorBrowser/Data/fontconfig/fonts.conf
SUBST_SED.fonts+=	-e 's,<dir>fonts</dir>,<dir>${PREFIX}/lib/tor-browser/browser/fonts</dir>,'
SUBST_MESSAGE.fonts=	Fixing path to bundled fonts directory.

.include "../../www/firefox78/mozilla-common.mk"
.include "options.mk"

CHECK_INTERPRETER_SKIP+=	lib/firefox-sdk/sdk/bin/header.py
CHECK_INTERPRETER_SKIP+=	lib/firefox-sdk/sdk/bin/typelib.py
CHECK_INTERPRETER_SKIP+=	lib/firefox-sdk/sdk/bin/xpidl.py
CHECK_INTERPRETER_SKIP+=	lib/firefox-sdk/sdk/bin/xpt.py

CHECK_WRKREF_SKIP+=	lib/${PKGBASE}/chrome/toolkit/content/global/buildconfig.html

# Generate list of subst entries for various .cargo-checksum.json files.  These
# are all handled together in one big substitution to simplify things rather
# than one substitution entry per file, but are kept separate below to ease
# updating and verification.

CKSUM_CRATES+=	third_party/rust/libc

# patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs
CKSUMS+=	a3540eab4dbc52e006e84e288bad17e1dae3865fea49020e0ed8b5a7724a9532
CKSUMS+=	5e58a2109f5eff0f497dfac150c161c1d517a2227b49e086da96c3d66522ac3a

CKSUM_CRATES+=	third_party/rust/getrandom

# patch-third__party_rust_getrandom_src_lib.rs
CKSUMS+=	0e52f6bde42d7bb05c297ce1c25b9879d61b28caba98f6226a152bff538db6c2
CKSUMS+=	394425b4ba03c21c494e64d993678f7014575b1e3d590b9ee452b5c2d83ec4ac

SUBST_STAGE.cksum=	pre-configure
.for crate in ${CKSUM_CRATES}
SUBST_FILES.cksum+=	${crate}/.cargo-checksum.json
.for from to in ${CKSUMS}
SUBST_SED.cksum+=	-e 's,${from},${to},g'

MOZILLA_ICON=	${WRKSRC}/browser/branding/official/default48.png

	mv ${WRKSRC}/gfx/ycbcr/yuv_row_arm.s ${WRKSRC}/gfx/ycbcr/yuv_row_arm.S
	mv ${WRKDIR}/tor-browser_en-US ${WRKSRC}
#	mv ${WRKDIR}/tor-launcher* ${WRKSRC}/browser/extensions/tor-launcher

	cd ${WRKSRC} && autoconf
	cd ${WRKSRC}/js/src && autoconf
	cd ${WRKSRC} && mkdir ${OBJDIR}
	cd ${WRKSRC}/${OBJDIR} && touch old-configure.vars
	# Do not fetch Rust Cargo file via network during build

	${SED} -e 's|@MOZILLA@|${MOZILLA}|g'				\
	  -e 's|@MOZILLA_NAME@|${MOZILLA_NAME}|g'			\
	  -e 's|@FIREFOX_ICON@|${MOZILLA}.png|g'			\
	  < ${FILESDIR}/desktop.in					\
	  > ${WRKDIR}/desktop
	${SED} -e 's|@PREFIX@|${PREFIX}|g'				\
	  < ${FILESDIR}/tor-browser.sh					\
	  > ${WRKDIR}/tor-browser.sh

INSTALLATION_DIRS+=	share/applications
INSTALLATION_DIRS+=	share/pixmaps
INSTALLATION_DIRS+=	${PREFIX}/lib/tor-browser/browser/fontconfig
INSTALLATION_DIRS+=	${PREFIX}/lib/tor-browser/browser/fonts

	${INSTALL_SCRIPT} ${WRKDIR}/tor-browser.sh \
	${INSTALL_DATA} ${WRKDIR}/desktop				\
	${INSTALL_DATA} ${WRKSRC}/tor-browser_en-US/Browser/TorBrowser/Data/fontconfig/fonts.conf \
	${INSTALL_DATA} ${WRKSRC}/tor-browser_en-US/Browser/fonts/* \

.include "../../sysutils/desktop-file-utils/desktopdb.mk"
.include "../../mk/bsd.pkg.mk"