aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-05 21:54:40 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-05 21:54:40 +0000
commit6f938d4fb2097e401eb715bd8ab9fba56c416879 (patch)
tree24ff983cf03dd3a64e78ff0dc38401adfa19081c
parentff5e9baba8780789e5badc94e1da50dd6bc67dba (diff)
downloadpaludis-6f938d4fb2097e401eb715bd8ab9fba56c416879.tar.gz
paludis-6f938d4fb2097e401eb715bd8ab9fba56c416879.tar.xz
EAPI 4 doman -i18n is different
-rw-r--r--paludis/repositories/e/e_repository_TEST_4.cc10
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_4_setup.sh24
-rw-r--r--paludis/repositories/e/eapi.cc1
-rw-r--r--paludis/repositories/e/eapi.hh2
-rw-r--r--paludis/repositories/e/eapis/0.conf1
-rw-r--r--paludis/repositories/e/eapis/4.conf2
-rw-r--r--paludis/repositories/e/eapis/exheres-0.conf1
-rw-r--r--paludis/repositories/e/eapis/paludis-1.conf1
-rw-r--r--paludis/repositories/e/ebuild.cc2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doman5
10 files changed, 48 insertions, 1 deletions
diff --git a/paludis/repositories/e/e_repository_TEST_4.cc b/paludis/repositories/e/e_repository_TEST_4.cc
index 9e87568..ea672a4 100644
--- a/paludis/repositories/e/e_repository_TEST_4.cc
+++ b/paludis/repositories/e/e_repository_TEST_4.cc
@@ -233,6 +233,16 @@ namespace test_cases
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(action);
}
+
+ {
+ TestMessageSuffix suffix("doman 4", true);
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/doman-4",
+ &env, { })), { }))]->last());
+ TEST_CHECK(bool(id));
+ TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ id->perform_action(action);
+ }
}
} test_e_repository_install_eapi_4;
diff --git a/paludis/repositories/e/e_repository_TEST_4_setup.sh b/paludis/repositories/e/e_repository_TEST_4_setup.sh
index e13c254..22653d4 100755
--- a/paludis/repositories/e/e_repository_TEST_4_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_4_setup.sh
@@ -1177,6 +1177,30 @@ IUSE="disabled1 enabled2 enabled3"
REQUIRED_USE="^^ ( disabled1 enabled2 enabled3 )"
S="${WORKDIR}"
END
+mkdir -p "cat/doman"
+cat <<"END" > cat/doman/doman-4.ebuild || exit 1
+EAPI="${PV}"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+S="${WORKDIR}"
+
+src_compile() {
+ echo \${PF} >foo.en_GB.8
+ echo \${PF} >bar.en_GB.7
+}
+
+src_install() {
+ doman -i18n= foo.* || die
+ doman -i18n=xx bar.* || die
+ rm "${D}"/usr/share/man/man8/foo.en_GB.8 || die
+ rm "${D}"/usr/share/man/xx/man7/bar.en_GB.7 || die
+}
+END
cd ..
cd ..
diff --git a/paludis/repositories/e/eapi.cc b/paludis/repositories/e/eapi.cc
index 6fc3bca..d5dcae8 100644
--- a/paludis/repositories/e/eapi.cc
+++ b/paludis/repositories/e/eapi.cc
@@ -233,6 +233,7 @@ namespace
n::dodoc_r() = destringify_key<bool>(k, "dodoc_r"),
n::doins_symlink() = destringify_key<bool>(k, "doins_symlink"),
n::doman_lang_filenames() = destringify_key<bool>(k, "doman_lang_filenames"),
+ n::doman_lang_filenames_overrides() = destringify_key<bool>(k, "doman_lang_filenames_overrides"),
n::dosym_mkdir() = destringify_key<bool>(k, "dosym_mkdir"),
n::econf_extra_options() = k.get("econf_extra_options"),
n::failure_is_fatal() = destringify_key<bool>(k, "failure_is_fatal"),
diff --git a/paludis/repositories/e/eapi.hh b/paludis/repositories/e/eapi.hh
index 6a0ace7..9a64fd1 100644
--- a/paludis/repositories/e/eapi.hh
+++ b/paludis/repositories/e/eapi.hh
@@ -64,6 +64,7 @@ namespace paludis
typedef Name<struct dodoc_r_name> dodoc_r;
typedef Name<struct doins_symlink_name> doins_symlink;
typedef Name<struct doman_lang_filenames_name> doman_lang_filenames;
+ typedef Name<struct doman_lang_filenames_overrides_name> doman_lang_filenames_overrides;
typedef Name<struct dosym_mkdir_name> dosym_mkdir;
typedef Name<struct eapi_name> eapi;
typedef Name<struct ebuild_bad_options_name> ebuild_bad_options;
@@ -441,6 +442,7 @@ namespace paludis
NamedValue<n::dodoc_r, bool> dodoc_r;
NamedValue<n::doins_symlink, bool> doins_symlink;
NamedValue<n::doman_lang_filenames, bool> doman_lang_filenames;
+ NamedValue<n::doman_lang_filenames_overrides, bool> doman_lang_filenames_overrides;
NamedValue<n::dosym_mkdir, bool> dosym_mkdir;
NamedValue<n::econf_extra_options, std::string> econf_extra_options;
NamedValue<n::failure_is_fatal, bool> failure_is_fatal;
diff --git a/paludis/repositories/e/eapis/0.conf b/paludis/repositories/e/eapis/0.conf
index a5c79c5..8b62c70 100644
--- a/paludis/repositories/e/eapis/0.conf
+++ b/paludis/repositories/e/eapis/0.conf
@@ -268,6 +268,7 @@ pipe_commands_no_slot_or_repo = true
unpack_unrecognised_is_fatal = false
unpack_fix_permissions = true
doman_lang_filenames = false
+doman_lang_filenames_overrides = false
dodoc_r = false
doins_symlink = false
dosym_mkdir = true
diff --git a/paludis/repositories/e/eapis/4.conf b/paludis/repositories/e/eapis/4.conf
index 6e033c7..b311258 100644
--- a/paludis/repositories/e/eapis/4.conf
+++ b/paludis/repositories/e/eapis/4.conf
@@ -64,3 +64,5 @@ rdepend_defaults_to_depend = false
econf_extra_options = --disable-dependency-tracking
+doman_lang_filenames_overrides = true
+
diff --git a/paludis/repositories/e/eapis/exheres-0.conf b/paludis/repositories/e/eapis/exheres-0.conf
index 37adfed..e27ab18 100644
--- a/paludis/repositories/e/eapis/exheres-0.conf
+++ b/paludis/repositories/e/eapis/exheres-0.conf
@@ -340,6 +340,7 @@ pipe_commands_no_slot_or_repo = false
unpack_unrecognised_is_fatal = true
unpack_fix_permissions = false
doman_lang_filenames = true
+doman_lang_filenames_overrides = false
dodoc_r = true
dosym_mkdir = false
doins_symlink = true
diff --git a/paludis/repositories/e/eapis/paludis-1.conf b/paludis/repositories/e/eapis/paludis-1.conf
index 0172cf0..3bad9f2 100644
--- a/paludis/repositories/e/eapis/paludis-1.conf
+++ b/paludis/repositories/e/eapis/paludis-1.conf
@@ -267,6 +267,7 @@ pipe_commands_no_slot_or_repo = true
unpack_unrecognised_is_fatal = false
unpack_fix_permissions = false
doman_lang_filenames = true
+doman_lang_filenames_overrides = false
dodoc_r = false
dosym_mkdir = false
doins_symlink = false
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index cf7a468..5f4abe1 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -243,6 +243,8 @@ EbuildCommand::operator() ()
params.package_id()->eapi()->supported()->tools_options()->doins_symlink() ? "yes" : "")
.setenv("PALUDIS_DOMAN_LANG_FILENAMES",
params.package_id()->eapi()->supported()->tools_options()->doman_lang_filenames() ? "yes" : "")
+ .setenv("PALUDIS_DOMAN_LANG_FILENAMES_OVERRIDES",
+ params.package_id()->eapi()->supported()->tools_options()->doman_lang_filenames_overrides() ? "yes" : "")
.setenv("PALUDIS_DOSYM_NO_MKDIR",
params.package_id()->eapi()->supported()->tools_options()->dosym_mkdir() ? "" : "yes")
.setenv("PALUDIS_FAILURE_IS_FATAL",
diff --git a/paludis/repositories/e/ebuild/utils/doman b/paludis/repositories/e/ebuild/utils/doman
index 76f6bf6..8c1ac34 100755
--- a/paludis/repositories/e/ebuild/utils/doman
+++ b/paludis/repositories/e/ebuild/utils/doman
@@ -52,7 +52,10 @@ for x in "$@"; do
suffix=${realname##*.}
fi
- if [[ -n ${PALUDIS_DOMAN_LANG_FILENAMES} && \
+ if [[ -n ${PALUDIS_DOMAN_LANG_FILENAMES_OVERRIDES} && -n ${i18n} ]] ; then
+ name=${x##*/}
+ mandir=${i18n}man${suffix:0:1}
+ elif [[ -n ${PALUDIS_DOMAN_LANG_FILENAMES} && \
$x =~ (.*)\.([a-z][a-z](_[A-Z][A-Z])?)\.(.*) ]] ; then
name=${BASH_REMATCH[1]##*/}.${BASH_REMATCH[4]}
mandir=${BASH_REMATCH[2]}/man${suffix:0:1}