unitas/www-client/torbrowser-31.5.0.ebuild.diff

73 lines
2.9 KiB
Diff

--- torbrowser-31.5.0.orig.ebuild 2015-03-01 13:50:00.000000000 +0100
+++ torbrowser-31.5.0.ebuild 2015-03-05 09:32:28.546289664 +0100
@@ -33,14 +33,21 @@
# BSD license applies to torproject-related code like the patches
# icons are under CCPL-Attribution-3.0
LICENSE="BSD CC-BY-3.0 MPL-2.0 GPL-2 LGPL-2.1"
-IUSE="hardened test"
+IUSE="hardened test linguas_de"
BASE_SRC_URI="https://dist.torproject.org/${PN}/${TOR_PV}"
SRC_URI="https://gitweb.torproject.org/tor-browser.git/snapshot/${GIT_TAG}.tar.gz -> ${GIT_TAG}.tar.gz
http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz
http://dev.gentoo.org/~axs/distfiles/${PATCH}.tar.xz
- x86? ( ${BASE_SRC_URI}/tor-browser-linux32-${TOR_PV}_en-US.tar.xz )
- amd64? ( ${BASE_SRC_URI}/tor-browser-linux64-${TOR_PV}_en-US.tar.xz )"
+ !linguas_de? (
+ x86? ( ${BASE_SRC_URI}/tor-browser-linux32-${TOR_PV}_en-US.tar.xz )
+ amd64? ( ${BASE_SRC_URI}/tor-browser-linux64-${TOR_PV}_en-US.tar.xz )
+ )
+ linguas_de? (
+ x86? ( ${BASE_SRC_URI}/tor-browser-linux32-${TOR_PV}_de.tar.xz )
+ amd64? ( ${BASE_SRC_URI}/tor-browser-linux64-${TOR_PV}_de.tar.xz )
+ )
+"
ASM_DEPEND=">=dev-lang/yasm-1.1"
@@ -219,9 +226,15 @@
|| die
# see: https://gitweb.torproject.org/builders/tor-browser-bundle.git/tree/gitian/descriptors/linux/gitian-bundle.yml?h=maint-4.0#n148
- echo "pref(\"general.useragent.locale\", \"en-US\");" \
- >> "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/000-tor-browser.js" \
- || die
+ if use linguas_de ; then
+ echo "pref(\"general.useragent.locale\", \"de\");" \
+ >> "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/000-tor-browser.js" \
+ || die
+ else
+ echo "pref(\"general.useragent.locale\", \"en-US\");" \
+ >> "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/000-tor-browser.js" \
+ || die
+ fi
MOZ_MAKE_FLAGS="${MAKEOPTS}" \
emake DESTDIR="${D}" install
@@ -260,7 +273,11 @@
# Profile without the tor-launcher extension
# see: https://trac.torproject.org/projects/tor/ticket/10160
- local profile_dir="${WORKDIR}/tor-browser_en-US/Browser/TorBrowser/Data/Browser/profile.default"
+ if use linguas_de ; then
+ local profile_dir="${WORKDIR}/tor-browser_de/Browser/TorBrowser/Data/Browser/profile.default"
+ else
+ local profile_dir="${WORKDIR}/tor-browser_en-US/Browser/TorBrowser/Data/Browser/profile.default"
+ fi
docompress -x "${EROOT}/usr/share/doc/${PF}/tor-launcher@torproject.org.xpi"
dodoc "${profile_dir}/extensions/tor-launcher@torproject.org.xpi"
@@ -276,7 +293,11 @@
# see: https://gitweb.torproject.org/builders/tor-browser-bundle.git/tree/RelativeLink/RelativeLink.sh?h=maint-4.0#n248
dodoc "${FILESDIR}/README.tor-launcher"
- dodoc "${WORKDIR}/tor-browser_en-US/Browser/TorBrowser/Docs/ChangeLog.txt"
+ if use linguas_de ; then
+ dodoc "${WORKDIR}/tor-browser_de/Browser/TorBrowser/Docs/ChangeLog.txt"
+ else
+ dodoc "${WORKDIR}/tor-browser_en-US/Browser/TorBrowser/Docs/ChangeLog.txt"
+ fi
}
pkg_preinst() {