aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2015-11-03 17:53:16 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2015-11-05 17:37:28 +0000
commit8ebd4aced7665928454a498988727a4d156484b2 (patch)
tree3b2a1e5aeccbb3b8d980315ba59f644fcaab8f9f
parent01a7fdc7633c7e693d0a73aae5eb0583688ae839 (diff)
downloadpaludis-8ebd4aced7665928454a498988727a4d156484b2.tar.gz
paludis-8ebd4aced7665928454a498988727a4d156484b2.tar.xz
EAPI 6 has einstalldocs
-rw-r--r--paludis/repositories/e/e_repository_TEST_5.cc9
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_5_setup.sh18
-rw-r--r--paludis/repositories/e/e_repository_TEST_6.cc189
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_6_setup.sh682
-rw-r--r--paludis/repositories/e/ebuild/6/build_functions.bash38
5 files changed, 936 insertions, 0 deletions
diff --git a/paludis/repositories/e/e_repository_TEST_5.cc b/paludis/repositories/e/e_repository_TEST_5.cc
index b3ead8d..7478d68 100644
--- a/paludis/repositories/e/e_repository_TEST_5.cc
+++ b/paludis/repositories/e/e_repository_TEST_5.cc
@@ -321,6 +321,15 @@ TEST(ERepository, InstallEAPI5)
EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
id->perform_action(action);
}
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/no-einstalldocs-5",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
}
TEST(ERepository, RequiredUse)
diff --git a/paludis/repositories/e/e_repository_TEST_5_setup.sh b/paludis/repositories/e/e_repository_TEST_5_setup.sh
index c85aa64..d0ef2f2 100755
--- a/paludis/repositories/e/e_repository_TEST_5_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_5_setup.sh
@@ -615,6 +615,24 @@ pkg_setup() {
}
END
+mkdir -p "cat/no-einstalldocs" || exit 1
+cat << 'END' > cat/no-einstalldocs/no-einstalldocs-5.ebuild || exit 1
+EAPI="5"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_install() {
+ [[ -z $(declare -F einstalldocs) ]] || die
+}
+END
+
mkdir -p "cat/subslots" || exit 1
cat << 'END' > cat/subslots/subslots-5.ebuild || exit 1
EAPI="5"
diff --git a/paludis/repositories/e/e_repository_TEST_6.cc b/paludis/repositories/e/e_repository_TEST_6.cc
index 8d8f131..64cab2a 100644
--- a/paludis/repositories/e/e_repository_TEST_6.cc
+++ b/paludis/repositories/e/e_repository_TEST_6.cc
@@ -346,5 +346,194 @@ TEST(ERepository, InstallEAPI6)
EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
EXPECT_THROW(id->perform_action(action), ActionFailedError);
}
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-nothing-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-DOCS-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-DOCS-array-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-empty-DOCS-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-empty-DOCS-array-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-HTML_DOCS-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-HTML_DOCS-array-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-empty-HTML_DOCS-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-empty-HTML_DOCS-array-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-DOCS-HTML_DOCS-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-failure-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ EXPECT_THROW(id->perform_action(action), ActionFailedError);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-nonfatal-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-DOCS-failure-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ EXPECT_THROW(id->perform_action(action), ActionFailedError);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-DOCS-nonfatal-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-DOCS-array-failure-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ EXPECT_THROW(id->perform_action(action), ActionFailedError);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-DOCS-array-nonfatal-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-HTML_DOCS-failure-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ EXPECT_THROW(id->perform_action(action), ActionFailedError);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-HTML_DOCS-nonfatal-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-HTML_DOCS-array-failure-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ EXPECT_THROW(id->perform_action(action), ActionFailedError);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/einstalldocs-HTML_DOCS-array-nonfatal-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
}
diff --git a/paludis/repositories/e/e_repository_TEST_6_setup.sh b/paludis/repositories/e/e_repository_TEST_6_setup.sh
index 5ccac77..38073db 100755
--- a/paludis/repositories/e/e_repository_TEST_6_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_6_setup.sh
@@ -602,5 +602,687 @@ if [[ -n ${MERGE_TYPE} ]] && in_iuse test ; then
fi
END
+mkdir -p "cat/einstalldocs" || exit 1
+cat << 'END' > cat/einstalldocs/einstalldocs-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo README >README || die
+ echo README0.txt >README0.txt || die
+ touch README1.txt || die
+ echo testing.txt >testing.txt || die
+ echo testing2.txt >testing2.txt || die
+}
+
+src_install() {
+ d="${D}"/usr/share/doc/${PF}
+ docinto testing
+
+ dodoc testing.txt
+ [[ -f ${d}/testing/testing.txt ]] || die testing/testing.txt
+
+ [[ -n $(declare -F einstalldocs) ]] || die not defined
+ einstalldocs || die einstalldocs
+ [[ -d ${d} ]] || die ${d}
+ [[ -f ${d}/README ]] || die README
+ [[ -f ${d}/README0.txt ]] || die README0.txt
+ [[ -f ${d}/README1.txt ]] && die README1.txt
+ [[ -d ${d}/html ]] && die html
+
+ dodoc testing2.txt
+ [[ -f ${d}/testing/testing2.txt ]] || die testing/testing2.txt
+}
+END
+
+mkdir -p "cat/einstalldocs-nothing" || exit 1
+cat << 'END' > cat/einstalldocs-nothing/einstalldocs-nothing-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_install() {
+ d="${D}"/usr/share/doc/${PF}
+
+ einstalldocs || die einstalldocs
+ [[ -d ${d} ]] && die ${d}
+ [[ -d ${d}/html ]] && die html
+}
+END
+
+mkdir -p "cat/einstalldocs-DOCS" || exit 1
+cat << 'END' > cat/einstalldocs-DOCS/einstalldocs-DOCS-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo README >README || die
+ echo testing.txt >testing.txt || die
+ echo testing2.txt >testing2.txt || die
+ touch empty.txt || die
+ mkdir dir || die
+ echo dir/testing3.txt >dir/testing3.txt || die
+}
+
+DOCS="testing*.txt empty.txt dir"
+
+src_install() {
+ d="${D}"/usr/share/doc/${PF}
+
+ einstalldocs || die einstalldocs
+ [[ -d ${d} ]] || die ${d}
+ [[ -f ${d}/README ]] && die README
+ [[ -f ${d}/testing.txt ]] || die testing.txt
+ [[ -f ${d}/testing2.txt ]] || die testing2.txt
+ [[ -f ${d}/empty.txt ]] && die empty.txt
+ [[ -f ${d}/dir/testing3.txt ]] || die dir/testing3.txt
+ [[ -d ${d}/html ]] && die html
+}
+END
+
+mkdir -p "cat/einstalldocs-DOCS-array" || exit 1
+cat << 'END' > cat/einstalldocs-DOCS-array/einstalldocs-DOCS-array-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo README >README || die
+ echo testing.txt >testing.txt || die
+ echo testing2.txt >testing2.txt || die
+ touch empty.txt || die
+ mkdir dir || die
+ echo dir/testing3.txt >dir/testing3.txt || die
+ echo "with some spaces.txt" >"with some spaces.txt" || die
+}
+
+DOCS=( testing.txt empty.txt dir "with some spaces.txt" )
+
+src_install() {
+ d="${D}"/usr/share/doc/${PF}
+
+ einstalldocs || die einstalldocs
+ [[ -d ${d} ]] || die ${d}
+ [[ -f ${d}/README ]] && die README
+ [[ -f ${d}/testing.txt ]] || die testing.txt
+ [[ -f ${d}/testing2.txt ]] && die testing2.txt
+ [[ -f ${d}/empty.txt ]] && die empty.txt
+ [[ -f ${d}/dir/testing3.txt ]] || die dir/testing3.txt
+ [[ -f ${d}/"with some spaces.txt" ]] || die "with some spaces.txt"
+ [[ -d ${d}/html ]] && die html
+}
+END
+
+mkdir -p "cat/einstalldocs-empty-DOCS" || exit 1
+cat << 'END' > cat/einstalldocs-empty-DOCS/einstalldocs-empty-DOCS-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo README >README || die
+ echo testing.txt >testing.txt || die
+}
+
+DOCS=""
+
+src_install() {
+ d="${D}"/usr/share/doc/${PF}
+
+ einstalldocs || die einstalldocs
+ [[ -d ${d} ]] && die ${d}
+ [[ -f ${d}/README ]] && die README
+ [[ -f ${d}/testing.txt ]] && die testing.txt
+ [[ -d ${d}/html ]] && die html
+}
+END
+
+mkdir -p "cat/einstalldocs-empty-DOCS-array" || exit 1
+cat << 'END' > cat/einstalldocs-empty-DOCS-array/einstalldocs-empty-DOCS-array-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo README >README || die
+ echo testing.txt >testing.txt || die
+}
+
+DOCS=( )
+
+src_install() {
+ d="${D}"/usr/share/doc/${PF}
+
+ einstalldocs || die einstalldocs
+ [[ -d ${d} ]] && die ${d}
+ [[ -f ${d}/README ]] && die README
+ [[ -f ${d}/testing.txt ]] && die testing.txt
+ [[ -d ${d}/html ]] && die html
+}
+END
+
+mkdir -p "cat/einstalldocs-HTML_DOCS" || exit 1
+cat << 'END' > cat/einstalldocs-HTML_DOCS/einstalldocs-HTML_DOCS-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo README >README || die
+ echo testing.html >testing.html || die
+ echo testing2.html >testing2.html || die
+ touch empty.html || die
+ mkdir dir || die
+ echo dir/testing3.html >dir/testing3.html || die
+}
+
+HTML_DOCS="testing*.html empty.html dir"
+
+src_install() {
+ d="${D}"/usr/share/doc/${PF}
+
+ einstalldocs || die einstalldocs
+ [[ -d ${d} ]] || die ${d}
+ [[ -f ${d}/README ]] || die README
+ [[ -d ${d}/html ]] || die html
+ [[ -f ${d}/html/testing.html ]] || die html/testing.html
+ [[ -f ${d}/html/testing2.html ]] || die html/testing2.html
+ [[ -f ${d}/html/empty.html ]] && die html/empty.html
+ [[ -f ${d}/html/dir/testing3.html ]] || die html/dir/testing3.html
+}
+END
+
+mkdir -p "cat/einstalldocs-HTML_DOCS-array" || exit 1
+cat << 'END' > cat/einstalldocs-HTML_DOCS-array/einstalldocs-HTML_DOCS-array-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo README >README || die
+ echo testing.html >testing.html || die
+ echo testing2.html >testing2.html || die
+ touch empty.html || die
+ mkdir dir || die
+ echo dir/testing3.html >dir/testing3.html || die
+ echo "with some spaces.html" >"with some spaces.html" || die
+}
+
+HTML_DOCS=( testing.html empty.html dir "with some spaces.html" )
+
+src_install() {
+ d="${D}"/usr/share/doc/${PF}
+
+ einstalldocs || die einstalldocs
+ [[ -d ${d} ]] || die ${d}
+ [[ -f ${d}/README ]] || die README
+ [[ -d ${d}/html ]] || die html
+ [[ -f ${d}/html/testing.html ]] || die testing.html
+ [[ -f ${d}/html/testing2.html ]] && die testing2.html
+ [[ -f ${d}/html/empty.html ]] && die empty.html
+ [[ -f ${d}/html/dir/testing3.html ]] || die dir/testing3.html
+ [[ -f ${d}/html/"with some spaces.html" ]] || die "with some spaces.html"
+}
+END
+
+mkdir -p "cat/einstalldocs-empty-HTML_DOCS" || exit 1
+cat << 'END' > cat/einstalldocs-empty-HTML_DOCS/einstalldocs-empty-HTML_DOCS-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo README >README || die
+ echo testing.html >testing.html || die
+}
+
+HTML_DOCS=""
+
+src_install() {
+ d="${D}"/usr/share/doc/${PF}
+
+ einstalldocs || die einstalldocs
+ [[ -d ${d} ]] || die ${d}
+ [[ -f ${d}/README ]] || die README
+ [[ -d ${d}/html ]] && die html
+ [[ -f ${d}/html/testing.html ]] && die html/testing.html
+}
+END
+
+mkdir -p "cat/einstalldocs-empty-HTML_DOCS-array" || exit 1
+cat << 'END' > cat/einstalldocs-empty-HTML_DOCS-array/einstalldocs-empty-HTML_DOCS-array-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo README >README || die
+ echo testing.html >testing.html || die
+}
+
+HTML_DOCS=( )
+
+src_install() {
+ d="${D}"/usr/share/doc/${PF}
+
+ einstalldocs || die einstalldocs
+ [[ -d ${d} ]] || die ${d}
+ [[ -f ${d}/README ]] || die README
+ [[ -d ${d}/html ]] && die html
+ [[ -f ${d}/html/testing.html ]] && die html/testing.html
+}
+END
+
+mkdir -p "cat/einstalldocs-DOCS-HTML_DOCS" || exit 1
+cat << 'END' > cat/einstalldocs-DOCS-HTML_DOCS/einstalldocs-DOCS-HTML_DOCS-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo README >README || die
+ echo testing.txt >testing.txt || die
+ echo testing.html >testing.html || die
+}
+
+DOCS="testing.txt"
+HTML_DOCS="testing.html"
+
+src_install() {
+ d="${D}"/usr/share/doc/${PF}
+
+ einstalldocs || die einstalldocs
+ [[ -d ${d} ]] || die ${d}
+ [[ -f ${d}/README ]] && die README
+ [[ -f ${d}/testing.txt ]] || die testing.txt
+ [[ -d ${d}/html ]] || die html
+ [[ -f ${d}/html/testing.html ]] || die html/testing.html
+}
+END
+
+mkdir -p "cat/einstalldocs-failure" || exit 1
+cat << 'END' > cat/einstalldocs-failure/einstalldocs-failure-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo README >README || die
+ chmod -r README || die
+}
+
+src_install() {
+ einstalldocs
+}
+END
+
+mkdir -p "cat/einstalldocs-nonfatal" || exit 1
+cat << 'END' > cat/einstalldocs-nonfatal/einstalldocs-nonfatal-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo README0.txt >README0.txt || die
+ echo README1.txt >README1.txt || die
+ chmod -r README1.txt || die
+ echo README2.txt >README2.txt || die
+ echo testing.html >testing.html || die
+}
+
+HTML_DOCS="testing.html"
+
+src_install() {
+ d="${D}"/usr/share/doc/${PF}
+
+ nonfatal einstalldocs && die einstalldocs
+ [[ -d ${d} ]] || die ${d}
+ [[ -f ${d}/README0.txt ]] || die README0.txt
+ [[ -f ${d}/README1.txt ]] && die README1.txt
+ [[ -f ${d}/README2.txt ]] && die README2.txt
+ [[ -d ${d}/html ]] && die html
+ [[ -f ${d}/html/testing.html ]] && die html/testing.html
+}
+END
+
+mkdir -p "cat/einstalldocs-DOCS-failure" || exit 1
+cat << 'END' > cat/einstalldocs-DOCS-failure/einstalldocs-DOCS-failure-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo testing.txt >testing.txt || die
+ chmod -r testing.txt || die
+}
+
+DOCS="testing.txt"
+
+src_install() {
+ einstalldocs
+}
+END
+
+mkdir -p "cat/einstalldocs-DOCS-nonfatal" || exit 1
+cat << 'END' > cat/einstalldocs-DOCS-nonfatal/einstalldocs-DOCS-nonfatal-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo testing.txt >testing.txt || die
+ echo testing2.txt >testing2.txt || die
+ chmod -r testing2.txt || die
+ echo testing3.txt >testing3.txt || die
+ echo testing.html >testing.html || die
+}
+
+DOCS="testing*.txt"
+HTML_DOCS="testing.html"
+
+src_install() {
+ d="${D}"/usr/share/doc/${PF}
+
+ nonfatal einstalldocs && die einstalldocs
+ [[ -d ${d} ]] || die ${d}
+ [[ -f ${d}/testing.txt ]] || die testing.txt
+ [[ -f ${d}/testing2.txt ]] && die testing2.txt
+ [[ -f ${d}/testing3.txt ]] || die testing3.txt
+ [[ -d ${d}/html ]] && die html
+ [[ -f ${d}/html/testing.html ]] && die html/testing.html
+}
+END
+
+mkdir -p "cat/einstalldocs-DOCS-array-failure" || exit 1
+cat << 'END' > cat/einstalldocs-DOCS-array-failure/einstalldocs-DOCS-array-failure-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo testing.txt >testing.txt || die
+ chmod -r testing.txt || die
+}
+
+DOCS=( testing.txt )
+
+src_install() {
+ einstalldocs
+}
+END
+
+mkdir -p "cat/einstalldocs-DOCS-array-nonfatal" || exit 1
+cat << 'END' > cat/einstalldocs-DOCS-array-nonfatal/einstalldocs-DOCS-array-nonfatal-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo testing.txt >testing.txt || die
+ echo testing2.txt >testing2.txt || die
+ chmod -r testing2.txt || die
+ echo testing3.txt >testing3.txt || die
+ echo testing.html >testing.html || die
+}
+
+DOCS=( testing{,2,3}.txt )
+HTML_DOCS="testing.html"
+
+src_install() {
+ d="${D}"/usr/share/doc/${PF}
+
+ nonfatal einstalldocs && die einstalldocs
+ [[ -d ${d} ]] || die ${d}
+ [[ -f ${d}/testing.txt ]] || die testing.txt
+ [[ -f ${d}/testing2.txt ]] && die testing2.txt
+ [[ -f ${d}/testing3.txt ]] || die testing3.txt
+ [[ -d ${d}/html ]] && die html
+ [[ -f ${d}/html/testing.html ]] && die html/testing.html
+}
+END
+
+mkdir -p "cat/einstalldocs-HTML_DOCS-failure" || exit 1
+cat << 'END' > cat/einstalldocs-HTML_DOCS-failure/einstalldocs-HTML_DOCS-failure-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo testing.html >testing.html || die
+ chmod -r testing.html || die
+}
+
+HTML_DOCS="testing.html"
+
+src_install() {
+ einstalldocs
+}
+END
+
+mkdir -p "cat/einstalldocs-HTML_DOCS-nonfatal" || exit 1
+cat << 'END' > cat/einstalldocs-HTML_DOCS-nonfatal/einstalldocs-HTML_DOCS-nonfatal-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo README >README || die
+ echo testing.html >testing.html || die
+ echo testing2.html >testing2.html || die
+ chmod -r testing2.html || die
+ echo testing3.html >testing3.html || die
+}
+
+HTML_DOCS="testing*.html"
+
+src_install() {
+ d="${D}"/usr/share/doc/${PF}
+
+ nonfatal einstalldocs && die einstalldocs
+ [[ -d ${d} ]] || die ${d}
+ [[ -f ${d}/README ]] || die README
+ [[ -d ${d}/html ]] || die html
+ [[ -f ${d}/html/testing.html ]] || die html/testing.html
+ [[ -f ${d}/html/testing2.html ]] && die html/testing2.html
+ [[ -f ${d}/html/testing3.html ]] || die html/testing3.html
+}
+END
+
+mkdir -p "cat/einstalldocs-HTML_DOCS-array-failure" || exit 1
+cat << 'END' > cat/einstalldocs-HTML_DOCS-array-failure/einstalldocs-HTML_DOCS-array-failure-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo testing.html >testing.html || die
+ chmod -r testing.html || die
+}
+
+HTML_DOCS=( testing.html )
+
+src_install() {
+ einstalldocs
+}
+END
+
+mkdir -p "cat/einstalldocs-HTML_DOCS-array-nonfatal" || exit 1
+cat << 'END' > cat/einstalldocs-HTML_DOCS-array-nonfatal/einstalldocs-HTML_DOCS-array-nonfatal-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_unpack() {
+ echo README >README || die
+ echo testing.html >testing.html || die
+ echo testing2.html >testing2.html || die
+ chmod -r testing2.html || die
+ echo testing3.html >testing3.html || die
+}
+
+HTML_DOCS=( testing{,2,3}.html )
+
+src_install() {
+ d="${D}"/usr/share/doc/${PF}
+
+ nonfatal einstalldocs && die einstalldocs
+ [[ -d ${d} ]] || die ${d}
+ [[ -f ${d}/README ]] || die README
+ [[ -d ${d}/html ]] || die html
+ [[ -f ${d}/html/testing.html ]] || die testing.html
+ [[ -f ${d}/html/testing2.html ]] && die testing2.html
+ [[ -f ${d}/html/testing3.html ]] || die testing3.html
+}
+END
+
cd ..
cd ..
diff --git a/paludis/repositories/e/ebuild/6/build_functions.bash b/paludis/repositories/e/ebuild/6/build_functions.bash
index b51b5f8..ede8189 100644
--- a/paludis/repositories/e/ebuild/6/build_functions.bash
+++ b/paludis/repositories/e/ebuild/6/build_functions.bash
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
+# Copyright (c) 2006, 2007, 2009 Ciaran McCreesh
# Copyright (c) 2015 David Leverton
#
# This file is part of the Paludis package manager. Paludis is free software;
@@ -23,3 +24,40 @@ einstall()
die "einstall is banned in EAPI 6"
}
+einstalldocs()
+{
+ local DOCDESTTREE=
+ if ! declare -p DOCS >/dev/null 2>&1 ; then
+ local d
+ for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \
+ THANKS BUGS FAQ CREDITS CHANGELOG ; do
+ if [[ -s "${d}" ]] ; then
+ dodoc "${d}" || return $?
+ fi
+ done
+ elif declare -p DOCS | grep -q '^declare -a ' ; then
+ if [[ ${#DOCS[@]} -gt 0 ]] ; then
+ dodoc -r "${DOCS[@]}" || return $?
+ fi
+ else
+ if [[ -n ${DOCS} ]] ; then
+ dodoc -r ${DOCS} || return $?
+ fi
+ fi
+
+ DOCDESTTREE=html
+ if ! declare -p HTML_DOCS >/dev/null 2>&1 ; then
+ :
+ elif declare -p HTML_DOCS | grep -q '^declare -a ' ; then
+ if [[ ${#HTML_DOCS[@]} -gt 0 ]] ; then
+ dodoc -r "${HTML_DOCS[@]}" || return $?
+ fi
+ else
+ if [[ -n ${HTML_DOCS} ]] ; then
+ dodoc -r ${HTML_DOCS} || return $?
+ fi
+ fi
+
+ return 0
+}
+