aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2015-11-01 15:30:01 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2015-11-05 17:37:27 +0000
commitd71ab4e7c5a35755fb3ec108a116f89965a5df2c (patch)
tree6435002c4cea8b07ae2787ef4ac3f20e5015f231
parent14959dc161f3b48858db8b221bfd60326d60305a (diff)
downloadpaludis-d71ab4e7c5a35755fb3ec108a116f89965a5df2c.tar.gz
paludis-d71ab4e7c5a35755fb3ec108a116f89965a5df2c.tar.xz
EAPI 6 passes --docdir / --htmldir to econf
-rw-r--r--paludis/repositories/e/e_repository_TEST_5.cc9
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_5_setup.sh41
-rw-r--r--paludis/repositories/e/e_repository_TEST_6.cc36
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_6_setup.sh160
-rw-r--r--paludis/repositories/e/eapis/6.conf2
5 files changed, 248 insertions, 0 deletions
diff --git a/paludis/repositories/e/e_repository_TEST_5.cc b/paludis/repositories/e/e_repository_TEST_5.cc
index 1c471e2..7f12e39 100644
--- a/paludis/repositories/e/e_repository_TEST_5.cc
+++ b/paludis/repositories/e/e_repository_TEST_5.cc
@@ -142,6 +142,15 @@ TEST(ERepository, InstallEAPI5)
{
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/econf-no-docdir-htmldir-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);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/usex-5::test-repo",
&env, { })), nullptr, { }))]->last());
ASSERT_TRUE(bool(id));
diff --git a/paludis/repositories/e/e_repository_TEST_5_setup.sh b/paludis/repositories/e/e_repository_TEST_5_setup.sh
index 6c5d5ea..c176636 100755
--- a/paludis/repositories/e/e_repository_TEST_5_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_5_setup.sh
@@ -112,6 +112,47 @@ EOF
}
END
+mkdir -p "cat/econf-no-docdir-htmldir" || exit 1
+cat << 'END' > cat/econf-no-docdir-htmldir/econf-no-docdir-htmldir-5.ebuild || exit 1
+EAPI="5"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ mkdir -p ${WORKDIR}
+ cd "${WORKDIR}"
+
+ cat <<'EOF' > configure
+#!/bin/sh
+
+if echo "$@" | grep -q 'help' ; then
+ echo --docdir
+ echo --htmldir
+ exit 0
+fi
+
+if echo "$@" | grep -q 'docdir' ; then
+ exit 1
+fi
+
+if echo "$@" | grep -q 'htmldir' ; then
+ exit 1
+fi
+
+exit 0
+EOF
+
+ chmod +x configure
+}
+END
+
mkdir -p "cat/strict-use" || exit 1
cat << 'END' > cat/strict-use/strict-use-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 1a80e6e..f990d21 100644
--- a/paludis/repositories/e/e_repository_TEST_6.cc
+++ b/paludis/repositories/e/e_repository_TEST_6.cc
@@ -194,5 +194,41 @@ TEST(ERepository, InstallEAPI6)
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/econf-no-docdir-htmldir-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/econf-docdir-only-6-r6",
+ &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/econf-htmldir-only-6-r6",
+ &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/econf-docdir-htmldir-6-r6",
+ &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 36c0231..391a2f3 100755
--- a/paludis/repositories/e/e_repository_TEST_6_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_6_setup.sh
@@ -167,5 +167,165 @@ src_unpack() {
}
END
+mkdir -p "cat/econf-no-docdir-htmldir" || exit 1
+cat << 'END' > cat/econf-no-docdir-htmldir/econf-no-docdir-htmldir-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ mkdir -p ${WORKDIR}
+ cd "${WORKDIR}"
+
+ cat <<'EOF' > configure
+#!/bin/sh
+
+if echo "$@" | grep -q 'help' ; then
+ exit 0
+fi
+
+if echo "$@" | grep -q 'docdir' ; then
+ exit 1
+fi
+
+if echo "$@" | grep -q 'htmldir' ; then
+ exit 1
+fi
+
+exit 0
+EOF
+
+ chmod +x configure
+}
+END
+
+mkdir -p "cat/econf-docdir-only" || exit 1
+cat << 'END' > cat/econf-docdir-only/econf-docdir-only-6-r6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ mkdir -p ${WORKDIR}
+ cd "${WORKDIR}"
+
+ cat <<'EOF' > configure
+#!/bin/sh
+
+if echo "$@" | grep -q 'help' ; then
+ echo --docdir
+ exit 0
+fi
+
+if ! echo "$@" | grep -q 'docdir=/usr/share/doc/econf-docdir-only-6-r6' ; then
+ exit 1
+fi
+
+if echo "$@" | grep -q 'htmldir' ; then
+ exit 1
+fi
+
+exit 0
+EOF
+
+ chmod +x configure
+}
+END
+
+mkdir -p "cat/econf-htmldir-only" || exit 1
+cat << 'END' > cat/econf-htmldir-only/econf-htmldir-only-6-r6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ mkdir -p ${WORKDIR}
+ cd "${WORKDIR}"
+
+ cat <<'EOF' > configure
+#!/bin/sh
+
+if echo "$@" | grep -q 'help' ; then
+ echo --htmldir
+ exit 0
+fi
+
+if echo "$@" | grep -q 'docdir' ; then
+ exit 1
+fi
+
+if ! echo "$@" | grep -q 'htmldir=/usr/share/doc/econf-htmldir-only-6-r6/html' ; then
+ exit 1
+fi
+
+exit 0
+EOF
+
+ chmod +x configure
+}
+END
+
+mkdir -p "cat/econf-docdir-htmldir" || exit 1
+cat << 'END' > cat/econf-docdir-htmldir/econf-docdir-htmldir-6-r6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ mkdir -p ${WORKDIR}
+ cd "${WORKDIR}"
+
+ cat <<'EOF' > configure
+#!/bin/sh
+
+if echo "$@" | grep -q 'help' ; then
+ echo --docdir
+ echo --htmldir
+ exit 0
+fi
+
+if ! echo "$@" | grep -q 'docdir=/usr/share/doc/econf-docdir-htmldir-6-r6' ; then
+ exit 1
+fi
+
+if ! echo "$@" | grep -q 'htmldir=/usr/share/doc/econf-docdir-htmldir-6-r6/html' ; then
+ exit 1
+fi
+
+exit 0
+EOF
+
+ chmod +x configure
+}
+END
+
cd ..
cd ..
diff --git a/paludis/repositories/e/eapis/6.conf b/paludis/repositories/e/eapis/6.conf
index 30e2c16..c8b0bb4 100644
--- a/paludis/repositories/e/eapis/6.conf
+++ b/paludis/repositories/e/eapis/6.conf
@@ -11,6 +11,8 @@ utility_path_suffixes = 6 5 4 3 2 1 0
shell_options_global = failglob
+econf_extra_options_help_dependent = ${econf_extra_options_help_dependent} --docdir::--docdir=/usr/share/doc/\${PF} --htmldir::--htmldir=/usr/share/doc/\${PF}/html
+
unpack_any_path = true
unpack_case_insensitive = true
unpack_suffixes = ${unpack_suffixes} tar.xz,txz