Skip to content

Commit

Permalink
app-doc/php-docs: Migrate from LINGUAS to L10N.
Browse files Browse the repository at this point in the history
Package-Manager: portage-2.3.0
  • Loading branch information
ulm committed Jun 25, 2016
1 parent 8650629 commit 50db73d
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions app-doc/php-docs/php-docs-20101029-r1.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2012 Gentoo Foundation
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

Expand All @@ -16,26 +16,26 @@ IUSE=""

RESTRICT="strip binchecks"

LANGS="en de es fa fr ja pl pt_BR ro tr"
LANGS="en de es fa fr ja pl pt-BR ro tr"
for lang in ${LANGS} ; do
IUSE="${IUSE} linguas_${lang}"
SRC_URI="${SRC_URI}
linguas_${lang}? ( http://olemarkus.org/~olemarkus/gentoo/${MY_PN}_${lang}-${PV}.tar.gz )"
IUSE+=" l10n_${lang}"
SRC_URI+=" l10n_${lang}? ( http://olemarkus.org/~olemarkus/gentoo/${MY_PN}_${lang/-/_}-${PV}.tar.gz )"
done

REQUIRED_USE="|| ( ${IUSE} )"

# Set English to default
IUSE="${IUSE/linguas_en/+linguas_en}"
IUSE="${IUSE/l10n_en/+l10n_en}"

S=${WORKDIR}

src_unpack() {
for lang in ${LANGS} ; do
if use linguas_${lang} ; then
mkdir ${lang}
pushd ${lang} >/dev/null
unpack ${MY_PN}_${lang}-${PV}.tar.gz || die "unpack failed on ${lang}"
if use l10n_${lang} ; then
mkdir ${lang/-/_}
pushd ${lang/-/_} >/dev/null
unpack ${MY_PN}_${lang/-/_}-${PV}.tar.gz \
|| die "unpack failed on ${lang}"
popd >/dev/null
fi
done
Expand All @@ -50,9 +50,10 @@ src_install() {
dodir /usr/share/doc/${PF}

for lang in ${LANGS} ; do
if use linguas_${lang} ; then
if use l10n_${lang} ; then
ebegin "Installing ${lang} manual, will take a while"
cp -R "${WORKDIR}"/${lang} "${ED}"/usr/share/doc/${PF} || die "cp failed on ${lang}"
cp -R "${WORKDIR}"/${lang/-/_} "${ED}"/usr/share/doc/${PF} \
|| die "cp failed on ${lang}"
eend $?
fi
done
Expand Down

0 comments on commit 50db73d

Please sign in to comment.