Date: Fri, 22 Nov 2024 16:15:01 GMT From: Vladimir Druzenko <vvd@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org Subject: git: 746fb8058824 - 2024Q4 - www/tor-browser: Improve port Message-ID: <202411221615.4AMGF15c010011@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch 2024Q4 has been updated by vvd: URL: https://cgit.FreeBSD.org/ports/commit/?id=746fb80588248293b0b39deb0ba256ade5faea4a commit 746fb80588248293b0b39deb0ba256ade5faea4a Author: Vladimir Druzenko <vvd@FreeBSD.org> AuthorDate: 2024-11-22 15:48:59 +0000 Commit: Vladimir Druzenko <vvd@FreeBSD.org> CommitDate: 2024-11-22 16:12:35 +0000 www/tor-browser: Improve port - move git tags to variables, - move list of locales to variable, - replace CP+CHMOD with COPYTREE_SHARE, - sort options, - align lines, - strip long lines, - pet portclippy, - use UNZIP_NATIVE_CMD instead if direct run unzip, - remove unnecessary BUILD_DEPENDS from zip. PR: 282752 Approved by: Martin Filla <freebsd@sysctl.cz> (maintainer) MFH: 2024Q4 (cherry picked from commit b9efb7c8e0a8814e4c0c789127407c19edd3cc4e) --- www/tor-browser/Makefile | 165 ++++++++++++++++++++++++++--------------------- 1 file changed, 91 insertions(+), 74 deletions(-) diff --git a/www/tor-browser/Makefile b/www/tor-browser/Makefile index 7dd4f1dcfab7..9fabcbb6e9dd 100644 --- a/www/tor-browser/Makefile +++ b/www/tor-browser/Makefile @@ -5,15 +5,15 @@ MASTER_SITES= TOR \ https://build-sources.tbb.torproject.org/:source1 \ LOCAL/jsm:source2 \ https://secure.informaction.com/%SUBDIR%/:source3 - +MASTER_SITE_SUBDIR= torbrowser/${DISTVERSION}/:DEFAULT \ + download/releases/:source3 +DISTNAME= src-firefox-tor-browser-128.4.0esr-14.0-1-build2 +NOSCRIPT= noscript-11.4.42.xpi DISTFILES= ${DISTNAME}.tar.xz \ manual_215922.zip:source1 \ fonts-3--4348e1.tar.zst:source2 \ - noscript-11.4.42.xpi:source3 -MASTER_SITE_SUBDIR= torbrowser/${DISTVERSION}/:DEFAULT \ - download/releases/:source3 + ${NOSCRIPT}:source3 -DISTNAME= src-firefox-tor-browser-128.4.0esr-14.0-1-build2 MAINTAINER= freebsd@sysctl.cz COMMENT= Tor Browser for FreeBSD WWW= https://www.torproject.org/ @@ -34,62 +34,66 @@ BUILD_DEPENDS= nspr>=4.32:devel/nspr \ v4l_compat>0:multimedia/v4l_compat \ autoconf2.13:devel/autoconf2.13 \ nasm:devel/nasm \ - yasm:devel/yasm \ - zip:archivers/zip - -USE_GITHUB=nodefault -GH_TUPLE= mozilla-l10n:firefox-l10n:878fe6f256d52c7e5b0205b07b061829ccde4f17:ffl10n -USE_GITLAB=nodefault -GL_SITE= https://gitlab.torproject.org/ -GL_ACCOUNT= tpo -GL_PROJECT= translation:basebrowser translation:torbrowser -GL_TAGNAME= 3b1be2065b54939ed019d94174f137847bcf3c66:basebrowser ba63bd165f3fd4bdd472815c9761413d4671cfb7:torbrowser + yasm:devel/yasm RUN_DEPENDS= tor:security/tor \ obfs4proxy:security/obfs4proxy-tor \ snowflake-client:security/snowflake-tor -USES= compiler:c++11-lib libtool \ - perl5 pkgconfig python shebangfix localbase:ldflags tar:xz python:3 +USES= compiler:c++11-lib libtool localbase:ldflags perl5 pkgconfig \ + python:3.8+ shebangfix tar:xz USE_GECKO= gecko +USE_GITHUB= nodefault +TAG_L10N= 878fe6f256d52c7e5b0205b07b061829ccde4f17 +GH_TUPLE= mozilla-l10n:firefox-l10n:${TAG_L10N}:ffl10n +USE_GITLAB= nodefault +GL_SITE= https://gitlab.torproject.org/ +GL_ACCOUNT= tpo +GL_PROJECT= translation:basebrowser translation:torbrowser +TAG_BASE= 3b1be2065b54939ed019d94174f137847bcf3c66 +TAG_TOR= ba63bd165f3fd4bdd472815c9761413d4671cfb7 +GL_TAGNAME= ${TAG_BASE}:basebrowser ${TAG_TOR}:torbrowser +USE_MOZILLA= -sqlite -SSP_UNSAFE= yes +LOCALES= ar ca cs da de el es-ES fa fi fr ga-IE he hu id is it ja ka ko \ + lt mk ms my nb-NO nl pl pt-BR ro ru sq sv-SE th tr uk vi zh-CN \ + zh-TW +CONFIGURE_ENV+= BINDGEN_CFLAGS="-I${LOCALBASE}/include" \ + MOZ_CHROME_MULTILOCALE="${LOCALES}" -SUB_FILES= torrc-defaults tor-browser.desktop fonts.conf -BUNDLE_LIBS= yes +MAKE_ENV+= LOCALES="${LOCALES}" -USE_MOZILLA= -sqlite -MOZILLA_VER=128.4.0 CFLAGS_powerpc64le= -DSQLITE_BYTEORDER=1234 -CONFIGURE_ENV+= BINDGEN_CFLAGS="-I${LOCALBASE}/include" \ - MOZ_CHROME_MULTILOCALE="ar ca cs da de el es-ES fa fi fr ga-IE he hu id is it ja ka ko lt mk ms my nb-NO nl pl pt-BR ro ru sq sv-SE th tr uk vi zh-CN zh-TW" +SSP_UNSAFE= yes -MAKE_ENV+= LOCALES="ar ca cs da de el es-ES fa fi fr ga-IE he hu id is it ja ka ko lt mk ms my nb-NO nl pl pt-BR ro ru sq sv-SE th tr uk vi zh-CN zh-TW" +BUNDLE_LIBS= yes +SUB_FILES= fonts.conf tor-browser.desktop torrc-defaults + +WRKSRC= ${WRKDIR}/${DISTNAME:S/src-//} MOZ_EXPORT+= MOZ_TELEMETRY_REPORTING="" \ MOZILLA_OFFICIAL="1" \ MOZ_OFFICIAL_BRANDING="1" \ MOZ_APP_DISPLAYNAME="Tor Browser" \ MOZ_APP_NAME="tor-browser" \ - MOZ_CHROME_MULTILOCALE="ar ca cs da de el es-ES fa fi fr ga-IE he hu id is it ja ka ko lt mk ms my nb-NO nl pl pt-BR ro ru sq sv-SE th tr uk vi zh-CN zh-TW" - -MOZ_OPTIONS=--with-base-browser-version=14.0.1 \ - --enable-official-branding \ - --enable-optimize \ - --enable-bundled-fonts \ - --disable-tests \ - --disable-debug \ - --disable-crashreporter \ - --disable-webrtc \ - --disable-parental-controls \ - --enable-proxy-bypass-protection \ - --disable-system-policies \ - --disable-backgroundtasks \ - --with-distribution-id=org.torproject \ - --with-branding=browser/branding/tb-release - -WRKSRC= ${WRKDIR}/${DISTNAME:S/src-//} + MOZ_CHROME_MULTILOCALE="${LOCALES}" + +MOZ_OPTIONS= --with-base-browser-version=${DISTVERSION} \ + --enable-official-branding \ + --enable-optimize \ + --enable-bundled-fonts \ + --disable-tests \ + --disable-debug \ + --disable-crashreporter \ + --disable-webrtc \ + --disable-parental-controls \ + --enable-proxy-bypass-protection \ + --disable-system-policies \ + --disable-backgroundtasks \ + --with-distribution-id=org.torproject \ + --with-branding=browser/branding/tb-release + +.include "${.CURDIR}/../../www/firefox/Makefile.options" -.include "${.CURDIR}/../../www/firefox/Makefile.options" .include <bsd.port.options.mk> .if ${ARCH} == amd64 @@ -101,52 +105,65 @@ MOZ_OPTIONS+= --without-wasm-sandboxed-libraries 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@${LLVM_VERSION} \ wasi-compiler-rt${LLVM_VERSION}>0:devel/wasi-compiler-rt${LLVM_VERSION} -MOZILLA_PLIST_DIRS= bin lib share/pixmaps share/applications share/tor-browser +MOZILLA_PLIST_DIRS= bin lib share/applications share/pixmaps \ + share/tor-browser MOZ_OPTIONS+= --with-wasi-sysroot=${LOCALBASE}/share/wasi-sysroot .endif post-patch: - @${REINPLACE_CMD} 's|LOCALBASE|${LOCALBASE}|g' "${WRKSRC}/browser/app/profile/000-tor-browser.js" - @${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/browser/app/nsBrowserApp.cpp + @${REINPLACE_CMD} 's|LOCALBASE|${LOCALBASE}|g' \ + "${WRKSRC}/browser/app/profile/000-tor-browser.js" + @${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' \ + ${WRKSRC}/browser/app/nsBrowserApp.cpp ${MKDIR} ${WRKSRC}/tmp-manual - unzip -d ${WRKSRC}/tmp-manual ${DISTDIR}/manual_215922.zip + ${UNZIP_NATIVE_CMD} -d ${WRKSRC}/tmp-manual ${DISTDIR}/manual_215922.zip pre-configure: @${REINPLACE_CMD} 's|export MOZ_GOOGLE_.*||g' ${WRKSRC}/.mozconfig - ${PYTHON_CMD} ${FILESDIR}/packagemanual.py ${WRKSRC}/tmp-manual/public ${WRKSRC}/browser/base/content/manual + ${PYTHON_CMD} ${FILESDIR}/packagemanual.py ${WRKSRC}/tmp-manual/public \ + ${WRKSRC}/browser/base/content/manual post-configure: ${MKDIR} ${WRKDIR}/.mozbuild/l10n-central - ${CP} -r ${WRKDIR}/firefox-l10n-878fe6f256d52c7e5b0205b07b061829ccde4f17/* ${WRKDIR}/.mozbuild/l10n-central - -.for i in ar ca cs da de el es-ES fa fi fr ga-IE he hu id is it ja ka ko lt mk ms my nb-NO nl pl pt-BR ro ru sq sv-SE th tr uk vi zh-CN zh-TW - ${CP} ${WRKDIR}/translation-3b1be2065b54939ed019d94174f137847bcf3c66/${i}/base-browser.ftl ${WRKDIR}/.mozbuild/l10n-central/${i}/toolkit/toolkit/global/ - ${CP} ${WRKDIR}/translation-3b1be2065b54939ed019d94174f137847bcf3c66/${i}/newIdentity.properties ${WRKDIR}/.mozbuild/l10n-central/${i}/browser/chrome/browser/ - ${CP} ${WRKDIR}/translation-3b1be2065b54939ed019d94174f137847bcf3c66/${i}/securityLevel.properties ${WRKDIR}/.mozbuild/l10n-central/${i}/browser/chrome/browser/ - ${CP} ${WRKDIR}/translation-ba63bd165f3fd4bdd472815c9761413d4671cfb7/${i}/tor-browser.ftl ${WRKDIR}/.mozbuild/l10n-central/${i}/toolkit/toolkit/global/ + ${CP} -r ${WRKDIR}/firefox-l10n-${TAG_L10N}/* \ + ${WRKDIR}/.mozbuild/l10n-central + +.for i in ${LOCALES} + ${CP} ${WRKDIR}/translation-${TAG_BASE}/${i}/base-browser.ftl \ + ${WRKDIR}/.mozbuild/l10n-central/${i}/toolkit/toolkit/global/ + ${CP} ${WRKDIR}/translation-${TAG_BASE}/${i}/newIdentity.properties \ + ${WRKDIR}/.mozbuild/l10n-central/${i}/browser/chrome/browser/ + ${CP} ${WRKDIR}/translation-${TAG_BASE}/${i}/securityLevel.properties \ + ${WRKDIR}/.mozbuild/l10n-central/${i}/browser/chrome/browser/ + ${CP} ${WRKDIR}/translation-${TAG_TOR}/${i}/tor-browser.ftl \ + ${WRKDIR}/.mozbuild/l10n-central/${i}/toolkit/toolkit/global/ ${MKDIR} ${WRKSRC}/toolkit/torbutton/chrome/locale/${i}/ -.for j in aboutTBUpdate.dtd brand.properties onionLocation.properties torbutton.properties torlauncher.properties brand.dtd settings.properties torbutton.dtd torConnect.properties - ${CP} ${WRKDIR}/translation-ba63bd165f3fd4bdd472815c9761413d4671cfb7/${i}/${j} ${WRKSRC}/toolkit/torbutton/chrome/locale/${i}/ - +.for j in aboutTBUpdate.dtd brand.dtd brand.properties onionLocation.properties \ + settings.properties torConnect.properties torbutton.dtd \ + torbutton.properties torlauncher.properties + ${CP} ${WRKDIR}/translation-${TAG_TOR}/${i}/${j} \ + ${WRKSRC}/toolkit/torbutton/chrome/locale/${i}/ .endfor - ${CP} -r ${WRKDIR}/translation-ba63bd165f3fd4bdd472815c9761413d4671cfb7/${i}/branding ${WRKSRC}/toolkit/torbutton/chrome/locale/${i} + ${CP} -r ${WRKDIR}/translation-${TAG_TOR}/${i}/branding \ + ${WRKSRC}/toolkit/torbutton/chrome/locale/${i} .endfor post-build: - MOZBUILD_STATE_PATH=${WRKDIR}/.mozbuild AB_CD="multi" MOZ_AUTOMATION="1" PATH="`find ${WRKRDIR}/.mozbuild/srcdirs -name build -type d -print`/bin:${PATH}" ${WRKSRC}/mach package-multi-locale --locales ar ca cs da de el es-ES fa fi fr ga-IE he hu id is it ja ka ko lt mk ms my nb-NO nl pl pt-BR ro ru sq sv-SE th tr uk vi zh-CN zh-TW + MOZBUILD_STATE_PATH=${WRKDIR}/.mozbuild AB_CD="multi" MOZ_AUTOMATION="1" \ + PATH="`find ${WRKRDIR}/.mozbuild/srcdirs -name build -type d -print`/bin:${PATH}" \ + ${WRKSRC}/mach package-multi-locale --locales ${LOCALES} post-install: @${MKDIR} ${STAGEDIR}${DATADIR} - ${INSTALL_DATA} ${WRKDIR}/torrc-defaults ${STAGEDIR}${DATADIR}/torrc-defaults - ${INSTALL_DATA} ${WRKDIR}/tor-browser.desktop ${STAGEDIR}${PREFIX}/share/applications/tor-browser.desktop - ${MKDIR} ${STAGEDIR}${PREFIX}/lib/tor-browser/fontconfig - ${MKDIR} ${STAGEDIR}${PREFIX}/lib/tor-browser/fonts - ${INSTALL_DATA} ${WRKDIR}/fonts.conf ${STAGEDIR}${PREFIX}/lib/tor-browser/fontconfig/fonts.conf - ${CP} ${WRKDIR}/fonts/*.ttf ${STAGEDIR}${PREFIX}/lib/tor-browser/fonts/ - ${CP} ${WRKDIR}/fonts/*.otf ${STAGEDIR}${PREFIX}/lib/tor-browser/fonts/ - ${CHMOD} 0744 ${STAGEDIR}${PREFIX}/lib/tor-browser/fonts - ${CHMOD} 0744 ${STAGEDIR}${PREFIX}/lib/tor-browser/fontconfig/ - ${CHMOD} 0644 ${STAGEDIR}${PREFIX}/lib/tor-browser/fontconfig/fonts.conf - ${CHMOD} 0644 ${STAGEDIR}${PREFIX}/lib/tor-browser/fonts/*.ttf - ${CHMOD} 0644 ${STAGEDIR}${PREFIX}/lib/tor-browser/fonts/*.otf + ${INSTALL_DATA} ${WRKDIR}/torrc-defaults \ + ${STAGEDIR}${DATADIR}/torrc-defaults + ${INSTALL_DATA} ${WRKDIR}/tor-browser.desktop \ + ${STAGEDIR}${PREFIX}/share/applications/tor-browser.desktop + ${MKDIR} ${STAGEDIR}${PREFIX}/lib/tor-browser/fontconfig + ${MKDIR} ${STAGEDIR}${PREFIX}/lib/tor-browser/fonts + ${INSTALL_DATA} ${WRKDIR}/fonts.conf \ + ${STAGEDIR}${PREFIX}/lib/tor-browser/fontconfig/fonts.conf + (cd ${WRKDIR}/fonts && \ + ${COPYTREE_SHARE} "*.otf *.ttf" ${STAGEDIR}${PREFIX}/lib/tor-browser/fonts) ${MKDIR} ${STAGEDIR}${PREFIX}/lib/tor-browser/distribution/extensions - ${CP} ${DISTDIR}/noscript-11.4.42.xpi "${STAGEDIR}${PREFIX}/lib/tor-browser/distribution/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi" + ${INSTALL_DATA} ${DISTDIR}/${NOSCRIPT} \ + "${STAGEDIR}${PREFIX}/lib/tor-browser/distribution/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi" .include <bsd.port.mk>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202411221615.4AMGF15c010011>