summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2018-04-21 20:48:56 +0200
committerMartin Väth <martin@mvath.de>2018-04-21 20:48:56 +0200
commitd43cc556ef1c673f09d5545940e2556552768669 (patch)
tree055843de499ff0d348c44a3f59584ea1654b708c /dev-util
parentapp-shells/schily-tools: Version bump (diff)
downloadmv-d43cc556ef1c673f09d5545940e2556552768669.tar.gz
mv-d43cc556ef1c673f09d5545940e2556552768669.tar.bz2
mv-d43cc556ef1c673f09d5545940e2556552768669.zip
dev-util/replacer: Version bump
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/replacer/Manifest2
-rw-r--r--dev-util/replacer/replacer-3.0.ebuild (renamed from dev-util/replacer/replacer-2.2.ebuild)30
2 files changed, 28 insertions, 4 deletions
diff --git a/dev-util/replacer/Manifest b/dev-util/replacer/Manifest
index 66adc9c3..40e0488d 100644
--- a/dev-util/replacer/Manifest
+++ b/dev-util/replacer/Manifest
@@ -1 +1 @@
-DIST replacer-2.2.tar.gz 10751 SHA512 b2ec95384d963ec7151edb85c30b04156bf2aa57f54ac88a49101e4700eadb08dbc9275a3b08f5046f240cab576412d51ee9f7aeeb6084f7cb07a8c82be099d9
+DIST replacer-3.0.tar.gz 16306 SHA512 4c52d02219dd6e7339ddb5a3cf6da850a0cfc74112fe670194778809d170a8911e4c7466345f8a1f0e11b36a40754f0bc76f2bb4d86a96b1ab74730cc1653929
diff --git a/dev-util/replacer/replacer-2.2.ebuild b/dev-util/replacer/replacer-3.0.ebuild
index 6d6e7aa9..a35d15aa 100644
--- a/dev-util/replacer/replacer-2.2.ebuild
+++ b/dev-util/replacer/replacer-3.0.ebuild
@@ -13,18 +13,42 @@ SRC_URI="https://github.com/vaeth/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
+IUSE="nls"
+PLOCALES="de"
+for i in ${PLOCALES}; do
+ IUSE+=" l10n_${i}"
+done
-RDEPEND="${PYTHON_DEPS}"
+RDEPEND="${PYTHON_DEPS}
+ nls? ( virtual/libintl )"
+DEPEND="nls? ( sys-devel/gettext )"
src_prepare() {
+ local r
use prefix || sed -i \
-e '1s"^#!/usr/bin/env python$"#!'"${EPREFIX}/usr/bin/python"'"' \
- -- bin/* || die
+ bin/* || die
+ if use nls; then
+ localepath=${EPREFIX}/usr/share/locale
+ r="'${localepath}'"
+ else
+ r='None'
+ fi
+ sed -i \
+ -e 's"^\(localedir[[:space:]]*=[[:space:]]*\).*"\1'"${r}\"" \
+ bin/${PN} || die
default
}
src_install() {
+ local i
+ if use nls; then
+ export LINGUAS=
+ for i in ${PLOCALES}; do
+ use l10n_${i} && LINGUAS+=${LINGUAS:+ }${i}
+ done
+ po/install-mo "${D}${localepath}"
+ fi
dobin bin/*
dodoc README.md
insinto /usr/share/zsh/site-functions