aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-08-10 21:41:03 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2008-08-11 13:25:44 +0100
commitdb052e1a2087fd307ba611c33801f8a3f949fcce (patch)
tree819a1960eaf22c527ab0325f51fb28c2abf8047c
parent6d6a8296a8cc61e9c930ecb472f6e5b6332679d0 (diff)
downloadpaludis-db052e1a2087fd307ba611c33801f8a3f949fcce.tar.gz
paludis-db052e1a2087fd307ba611c33801f8a3f949fcce.tar.xz
Default phase functions for the upcoming EAPI 2.
-rw-r--r--configure.ac1
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc186
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_setup.sh248
-rw-r--r--paludis/repositories/e/ebuild/2/Makefile.am44
-rw-r--r--paludis/repositories/e/ebuild/2/eclass_functions.bash27
-rw-r--r--paludis/repositories/e/ebuild/2/output_functions.bash30
-rw-r--r--paludis/repositories/e/ebuild/2/pkg_nofetch.bash45
-rw-r--r--paludis/repositories/e/ebuild/2/src_compile.bash46
-rw-r--r--paludis/repositories/e/ebuild/2/src_configure.bash77
-rw-r--r--paludis/repositories/e/ebuild/2/src_install.bash44
-rw-r--r--paludis/repositories/e/ebuild/2/src_test.bash45
-rw-r--r--paludis/repositories/e/ebuild/2/src_unpack.bash45
-rw-r--r--paludis/repositories/e/ebuild/Makefile.am2
-rw-r--r--paludis/util/echo_functions.bash.in1
14 files changed, 840 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index b4962ce..b13e597 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1347,6 +1347,7 @@ AC_OUTPUT(
paludis/repositories/e/eapis/Makefile
paludis/repositories/e/ebuild/0/Makefile
paludis/repositories/e/ebuild/1/Makefile
+ paludis/repositories/e/ebuild/2/Makefile
paludis/repositories/e/ebuild/Makefile
paludis/repositories/e/ebuild/exheres-0/Makefile
paludis/repositories/e/ebuild/kdebuild-1/Makefile
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index bce4812..ef1e8a1 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -1276,6 +1276,16 @@ namespace test_cases
}
{
+ TestMessageSuffix suffix("no src_configure 0", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/src_configure-0",
+ &env, UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
+ id->perform_action(action);
+ }
+
+ {
TestMessageSuffix suffix("best version", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/best-version-0",
@@ -1393,9 +1403,175 @@ namespace test_cases
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
}
+
+ {
+ TestMessageSuffix suffix("no src_configure 1", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/src_configure-1",
+ &env, UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
+ id->perform_action(action);
+ }
}
} test_e_repository_install_eapi_1;
+#if 0
+ struct ERepositoryInstallEAPI2Test : TestCase
+ {
+ ERepositoryInstallEAPI2Test() : TestCase("install_eapi_2") { }
+
+ unsigned max_run_time() const
+ {
+ return 3000;
+ }
+
+ bool repeatable() const
+ {
+ return false;
+ }
+
+ void run()
+ {
+ TestEnvironment env;
+ env.set_paludis_command("/bin/false");
+ std::tr1::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ keys->insert("format", "ebuild");
+ keys->insert("names_cache", "/var/empty");
+ keys->insert("location", "e_repository_TEST_dir/repo13");
+ keys->insert("profiles", "e_repository_TEST_dir/repo13/profiles/profile");
+ keys->insert("layout", "traditional");
+ keys->insert("eapi_when_unknown", "0");
+ keys->insert("eapi_when_unspecified", "0");
+ keys->insert("profile_eapi", "0");
+ keys->insert("distdir", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "distdir"));
+ keys->insert("builddir", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "build"));
+ std::tr1::shared_ptr<ERepository> repo(make_ebuild_repository(&env,
+ std::tr1::bind(from_keys, keys, std::tr1::placeholders::_1)));
+ env.package_database()->add_repository(1, repo);
+
+ std::tr1::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository(&env, RepositoryName("installed")));
+ env.package_database()->add_repository(2, installed_repo);
+
+ InstallAction action(make_named_values<InstallActionOptions>(
+ value_for<n::checks>(iaco_default),
+ value_for<n::debug_build>(iado_none),
+ value_for<n::destination>(installed_repo)
+ ));
+
+ {
+ TestMessageSuffix suffix("econf source 2", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/econf-source-2",
+ &env, UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("doman 2", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/doman-2",
+ &env, UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("src_configure 2", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/src_configure-2",
+ &env, UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("default src_configure 2", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/default-src_configure-2",
+ &env, UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("default src_compile 2", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/default-src_compile-2",
+ &env, UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("default_src_compile 2", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/default_src_compile-2",
+ &env, UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("src_compile via default function 2", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/src_compile-via-default-func-2",
+ &env, UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("eapi0_src_compile 2", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/eapi0_src_compile-2",
+ &env, UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("eapi0_src_compile with ECONF_SOURCE 2", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/eapi0_src_compile-with-econf_source-2",
+ &env, UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("eapi1_src_compile 2", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/eapi1_src_compile-2",
+ &env, UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("eapi2_src_compile 2", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/eapi2_src_compile-2",
+ &env, UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
+ id->perform_action(action);
+ }
+ }
+ } test_e_repository_install_eapi_2;
+#endif
+
struct ERepositoryInstallEAPIKdebuild1Test : TestCase
{
ERepositoryInstallEAPIKdebuild1Test() : TestCase("install_eapi_kdebuild_1") { }
@@ -1496,6 +1672,16 @@ namespace test_cases
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
id->perform_action(action);
}
+
+ {
+ TestMessageSuffix suffix("no src_configure kdebuild-1", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/src_configure-kdebuild-1",
+ &env, UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
+ id->perform_action(action);
+ }
}
} test_e_repository_install_eapi_kdebuild_1;
diff --git a/paludis/repositories/e/e_repository_TEST_setup.sh b/paludis/repositories/e/e_repository_TEST_setup.sh
index a1e7d29..37cb37c 100755
--- a/paludis/repositories/e/e_repository_TEST_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_setup.sh
@@ -769,6 +769,7 @@ src_install() {
}
END
cp cat/econf-source/econf-source-{0,1}.ebuild || exit 1
+cp cat/econf-source/econf-source-{0,2}.ebuild || exit 1
mkdir -p "cat/doman"
cat <<END > cat/doman/doman-0.ebuild || exit 1
EAPI="\${PV}"
@@ -1007,6 +1008,251 @@ pkg_preinst() {
[[ -d "${T}" ]] || die "T not a dir"
}
END
+mkdir -p "cat/src_configure"
+cat <<END > cat/src_configure/src_configure-0.ebuild || exit 1
+EAPI="\${PV}"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_configure() {
+ die src_configure
+}
+END
+cp cat/src_configure/src_configure-{0,1}.ebuild || exit 1
+cp cat/src_configure/src_configure-{0,2}.ebuild || exit 1
+mkdir -p "cat/default-src_configure" || exit 1
+cat << END > cat/default-src_configure/default-src_configure-2.ebuild || exit 1
+EAPI="\${PV}"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_unpack() {
+ cat <<EOF >configure
+#! /bin/sh
+touch foo
+EOF
+ chmod +x configure
+ echo 'all: ; rm foo' >Makefile
+}
+
+src_compile() {
+ [[ -e foo ]] || die
+}
+END
+mkdir -p "cat/default-src_compile" || exit 1
+cat << END > cat/default-src_compile/default-src_compile-2.ebuild || exit 1
+EAPI="\${PV}"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_unpack() {
+ cat <<EOF >configure
+#! /bin/sh
+rm Makefile
+EOF
+ chmod +x configure
+ echo 'all: ; touch foo' >Makefile
+}
+
+src_configure() {
+ :
+}
+
+src_install() {
+ [[ -e foo ]] || die
+}
+END
+mkdir -p "cat/default_src_compile" || exit 1
+cat << END > cat/default_src_compile/default_src_compile-2.ebuild || exit 1
+EAPI="\${PV}"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_unpack() {
+ cat <<EOF >configure
+#! /bin/sh
+rm Makefile
+EOF
+ chmod +x configure
+ echo 'all: ; touch foo' >Makefile
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ default_src_compile
+ [[ -e foo ]] || die
+}
+END
+mkdir -p "cat/src_compile-via-default-func" || exit 1
+cat << END > cat/src_compile-via-default-func/src_compile-via-default-func-2.ebuild || exit 1
+EAPI="\${PV}"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_unpack() {
+ cat <<EOF >configure
+#! /bin/sh
+rm Makefile
+EOF
+ chmod +x configure
+ echo 'all: ; touch foo' >Makefile
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ default
+ [[ -e foo ]] || die
+}
+END
+mkdir -p "cat/eapi0_src_compile" || exit 1
+cat << END > cat/eapi0_src_compile/eapi0_src_compile-2.ebuild || exit 1
+EAPI="\${PV}"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_unpack() {
+ cat <<EOF >configure
+#! /bin/sh
+echo 'all: ; touch foo' >Makefile
+EOF
+ chmod +x configure
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ eapi0_src_compile
+ [[ -e foo ]] || die
+}
+END
+mkdir -p "cat/eapi0_src_compile-with-econf_source" || exit 1
+cat << END > cat/eapi0_src_compile-with-econf_source/eapi0_src_compile-with-econf_source-2.ebuild || exit 1
+EAPI="\${PV}"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_unpack() {
+ mkdir subdir
+ cat <<EOF >subdir/configure
+#! /bin/sh
+rm Makefile
+EOF
+ chmod +x subdir/configure
+ echo 'all: ; touch foo' >Makefile
+ ECONF_SOURCE=subdir
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ eapi0_src_compile
+ [[ -e foo ]] || die
+}
+END
+mkdir -p "cat/eapi1_src_compile" || exit 1
+cat << END > cat/eapi1_src_compile/eapi1_src_compile-2.ebuild || exit 1
+EAPI="\${PV}"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_unpack() {
+ mkdir subdir
+ cat <<EOF >subdir/configure
+#! /bin/sh
+echo 'all: ; touch foo' >Makefile
+EOF
+ chmod +x subdir/configure
+ ECONF_SOURCE=subdir
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ eapi1_src_compile
+ [[ -e foo ]] || die
+}
+END
+mkdir -p "cat/eapi2_src_compile" || exit 1
+cat << END > cat/eapi2_src_compile/eapi2_src_compile-2.ebuild || exit 1
+EAPI="\${PV}"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_unpack() {
+ cat <<EOF >configure
+#! /bin/sh
+rm Makefile
+EOF
+ chmod +x configure
+ echo 'all: ; touch foo' >Makefile
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ eapi2_src_compile
+ [[ -e foo ]] || die
+}
+END
mkdir -p "cat/econf-source-kdebuild"
cat <<END > cat/econf-source-kdebuild/econf-source-kdebuild-1.kdebuild-1 || exit 1
DESCRIPTION="The Description"
@@ -1116,6 +1362,8 @@ src_install() {
END
mkdir -p "cat/doman-kdebuild"
sed -e /EAPI=/d cat/doman/doman-0.ebuild >cat/doman-kdebuild/doman-kdebuild-1.kdebuild-1 || exit 1
+mkdir -p "cat/src_configure-kdebuild"
+sed -e /EAPI=/d cat/src_configure/src_configure-0.ebuild >cat/src_configure-kdebuild/src_configure-kdebuild-1.kdebuild-1 || exit 1
mkdir -p "cat/expand-vars"
cat <<"END" > cat/expand-vars/expand-vars-0.ebuild || exit 1
DESCRIPTION="The Description"
diff --git a/paludis/repositories/e/ebuild/2/Makefile.am b/paludis/repositories/e/ebuild/2/Makefile.am
new file mode 100644
index 0000000..921123b
--- /dev/null
+++ b/paludis/repositories/e/ebuild/2/Makefile.am
@@ -0,0 +1,44 @@
+MAINTAINERCLEANFILES = Makefile.in
+CLEANFILES = *~
+SUBDIRS = .
+
+libexecprog2dir = $(libexecdir)/paludis/2
+
+libexecprog2_SCRIPTS = \
+ eclass_functions.bash \
+ pkg_nofetch.bash \
+ src_compile.bash \
+ src_configure.bash \
+ src_install.bash \
+ src_test.bash \
+ src_unpack.bash \
+ output_functions.bash
+
+TESTS_ENVIRONMENT = env \
+ PALUDIS_EBUILD_DIR="$(top_srcdir)/paludis/repositories/e/ebuild/" \
+ PALUDIS_EBUILD_DIR_FALLBACK="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories/e/ebuild/`" \
+ PALUDIS_EBUILD_MODULE_SUFFIXES="1 0" \
+ PALUDIS_EAPIS_DIR="$(top_srcdir)/paludis/eapis/" \
+ PALUDIS_DISTRIBUTIONS_DIR="$(top_srcdir)/paludis/distributions/" \
+ PALUDIS_DISTRIBUTION="gentoo" \
+ PALUDIS_EBUILD_LOG_LEVEL="warning" \
+ TOP_BUILD_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/`" \
+ TEST_SCRIPT_DIR="$(srcdir)/" \
+ bash $(top_srcdir)/test/run_test.sh $(top_srcdir)/paludis/repositories/e/ebuild/run_test.bash
+
+TESTS =
+check_SCRIPTS = $(TESTS)
+
+EXTRA_DIST = $(libexecprog2_SCRIPTS)
+
+built-sources : $(BUILT_SOURCES)
+ for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done
+
+distcheck-deps-local : $(DISTCHECK_DEPS)
+
+distcheck-deps : distcheck-deps-subdirs
+
+distcheck-deps-subdirs :
+ for s in $(SUBDIRS) . ; do if test x$$s = x. ; then $(MAKE) distcheck-deps-local || exit 1 ; \
+ else $(MAKE) -C $$s distcheck-deps || exit 1 ; fi ; done
+
diff --git a/paludis/repositories/e/ebuild/2/eclass_functions.bash b/paludis/repositories/e/ebuild/2/eclass_functions.bash
new file mode 100644
index 0000000..bd78f5d
--- /dev/null
+++ b/paludis/repositories/e/ebuild/2/eclass_functions.bash
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2007, 2008 Ciaran McCreesh
+# Copyright (c) 2008 David Leverton
+#
+# This file is part of the Paludis package manager. Paludis is free software;
+# you can redistribute it and/or modify it under the terms of the GNU General
+# Public License, version 2, as published by the Free Software Foundation.
+#
+# Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+
+ebuild_load_module 0/eclass_functions
+
+default()
+{
+ [[ $(type -t "default_$(paludis_phase_to_function_name "${EBUILD_PHASE}")" ) == "function" ]] || \
+ die "default_$(paludis_phase_to_function_name "${EBUILD_PHASE}") is not a function"
+ default_$(paludis_phase_to_function_name "${EBUILD_PHASE}") "$@"
+}
diff --git a/paludis/repositories/e/ebuild/2/output_functions.bash b/paludis/repositories/e/ebuild/2/output_functions.bash
new file mode 100644
index 0000000..498257b
--- /dev/null
+++ b/paludis/repositories/e/ebuild/2/output_functions.bash
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
+#
+# This file is part of the Paludis package manager. Paludis is free software;
+# you can redistribute it and/or modify it under the terms of the GNU General
+# Public License, version 2, as published by the Free Software Foundation.
+#
+# Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+
+ebuild_notice()
+{
+ [[ -z "${PALUDIS_PIPE_COMMANDS_SUPPORTED}" ]] && return
+ paludis_pipe_command LOG "$EAPI" "$@" >/dev/null
+}
+
+ebuild_section()
+{
+ echo -ne "${COLOUR_BROWN}>>>${COLOUR_NORMAL} "
+ echo "$@"
+}
+
diff --git a/paludis/repositories/e/ebuild/2/pkg_nofetch.bash b/paludis/repositories/e/ebuild/2/pkg_nofetch.bash
new file mode 100644
index 0000000..8b53cbf
--- /dev/null
+++ b/paludis/repositories/e/ebuild/2/pkg_nofetch.bash
@@ -0,0 +1,45 @@
+#!/usr/bin/env bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2008 David Leverton
+#
+# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
+# Gentoo Foundation and distributed under the terms of the GNU General
+# Public License v2.
+#
+# This file is part of the Paludis package manager. Paludis is free software;
+# you can redistribute it and/or modify it under the terms of the GNU General
+# Public License, version 2, as published by the Free Software Foundation.
+#
+# Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+
+ebuild_load_module 0/pkg_nofetch
+eval "eapi0_$(declare -f pkg_nofetch)"
+
+eapi1_pkg_nofetch()
+{
+ eapi0_pkg_nofetch
+}
+
+eapi2_pkg_nofetch()
+{
+ eapi0_pkg_nofetch
+}
+
+default_pkg_nofetch()
+{
+ eapi2_pkg_nofetch
+}
+
+pkg_nofetch()
+{
+ default_pkg_nofetch
+}
+
diff --git a/paludis/repositories/e/ebuild/2/src_compile.bash b/paludis/repositories/e/ebuild/2/src_compile.bash
new file mode 100644
index 0000000..5d23504
--- /dev/null
+++ b/paludis/repositories/e/ebuild/2/src_compile.bash
@@ -0,0 +1,46 @@
+#!/usr/bin/env bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2006, 2007 Ciaran McCreesh
+# Copyright (c) 2008 David Leverton
+#
+# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
+# Gentoo Foundation and distributed under the terms of the GNU General
+# Public License v2.
+#
+# This file is part of the Paludis package manager. Paludis is free software;
+# you can redistribute it and/or modify it under the terms of the GNU General
+# Public License, version 2, as published by the Free Software Foundation.
+#
+# Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+
+ebuild_load_module 0/src_compile
+eval "eapi0_$(declare -f src_compile)"
+
+ebuild_load_module 1/src_compile
+eval "eapi1_$(declare -f src_compile)"
+
+eapi2_src_compile()
+{
+ if [[ -f Makefile ]] || [[ -f makefile ]] || [[ -f GNUmakefile ]] ; then
+ emake || die "emake failed"
+ fi
+}
+
+default_src_compile()
+{
+ eapi2_src_compile
+}
+
+src_compile()
+{
+ default_src_compile
+}
+
diff --git a/paludis/repositories/e/ebuild/2/src_configure.bash b/paludis/repositories/e/ebuild/2/src_configure.bash
new file mode 100644
index 0000000..d2ec9ad
--- /dev/null
+++ b/paludis/repositories/e/ebuild/2/src_configure.bash
@@ -0,0 +1,77 @@
+#!/usr/bin/env bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2006, 2007 Ciaran McCreesh
+# Copyright (c) 2008 David Leverton
+#
+# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
+# Gentoo Foundation and distributed under the terms of the GNU General
+# Public License v2.
+#
+# This file is part of the Paludis package manager. Paludis is free software;
+# you can redistribute it and/or modify it under the terms of the GNU General
+# Public License, version 2, as published by the Free Software Foundation.
+#
+# Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+
+eapi0_src_configure()
+{
+ die "${FUNCNAME} is not supported"
+}
+
+eapi1_src_configure()
+{
+ die "${FUNCNAME} is not supported"
+}
+
+eapi2_src_configure()
+{
+ [[ -x ${ECONF_SOURCE:-.}/configure ]] && econf
+}
+
+default_src_configure()
+{
+ eapi2_src_configure
+}
+
+src_configure()
+{
+ default_src_configure
+}
+
+ebuild_f_configure()
+{
+ if [[ -d "${S}" ]] ; then
+ cd "${S}" || die "cd to \${S} (\"${S}\") failed"
+ elif [[ -d "${WORKDIR}" ]] ; then
+ cd "${WORKDIR}" || die "cd to \${WORKDIR} (\"${WORKDIR}\") failed"
+ fi
+
+ if hasq "configure" ${SKIP_FUNCTIONS} ; then
+ ebuild_section "Skipping src_configure (SKIP_FUNCTIONS)"
+ else
+ if [[ $(type -t pre_src_configure ) == "function" ]] ; then
+ ebuild_section "Starting pre_src_configure"
+ pre_src_configure
+ ebuild_section "Done pre_src_configure"
+ fi
+
+ ebuild_section "Starting src_configure"
+ src_configure
+ ebuild_section "Done src_configure"
+
+ if [[ $(type -t post_src_configure ) == "function" ]] ; then
+ ebuild_section "Starting post_src_configure"
+ post_src_configure
+ ebuild_section "Done post_src_configure"
+ fi
+ fi
+}
+
diff --git a/paludis/repositories/e/ebuild/2/src_install.bash b/paludis/repositories/e/ebuild/2/src_install.bash
new file mode 100644
index 0000000..55d967f
--- /dev/null
+++ b/paludis/repositories/e/ebuild/2/src_install.bash
@@ -0,0 +1,44 @@
+#!/usr/bin/env bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2008 David Leverton
+#
+# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
+# Gentoo Foundation and distributed under the terms of the GNU General
+# Public License v2.
+#
+# This file is part of the Paludis package manager. Paludis is free software;
+# you can redistribute it and/or modify it under the terms of the GNU General
+# Public License, version 2, as published by the Free Software Foundation.
+#
+# Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+
+ebuild_load_module 0/src_install
+
+eapi0_src_install()
+{
+ die "${FUNCNAME} is not supported"
+}
+
+eapi1_src_install()
+{
+ die "${FUNCNAME} is not supported"
+}
+
+eapi2_src_install()
+{
+ die "${FUNCNAME} is not supported"
+}
+
+default_src_install()
+{
+ eapi2_src_install
+}
+
diff --git a/paludis/repositories/e/ebuild/2/src_test.bash b/paludis/repositories/e/ebuild/2/src_test.bash
new file mode 100644
index 0000000..5ca2cba
--- /dev/null
+++ b/paludis/repositories/e/ebuild/2/src_test.bash
@@ -0,0 +1,45 @@
+#!/usr/bin/env bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2008 David Leverton
+#
+# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
+# Gentoo Foundation and distributed under the terms of the GNU General
+# Public License v2.
+#
+# This file is part of the Paludis package manager. Paludis is free software;
+# you can redistribute it and/or modify it under the terms of the GNU General
+# Public License, version 2, as published by the Free Software Foundation.
+#
+# Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+
+ebuild_load_module 0/src_test
+eval "eapi0_$(declare -f src_test)"
+
+eapi1_src_test()
+{
+ eapi0_src_test
+}
+
+eapi2_src_test()
+{
+ eapi0_src_test
+}
+
+default_src_test()
+{
+ eapi2_src_test
+}
+
+src_test()
+{
+ default_src_test
+}
+
diff --git a/paludis/repositories/e/ebuild/2/src_unpack.bash b/paludis/repositories/e/ebuild/2/src_unpack.bash
new file mode 100644
index 0000000..827d7c1
--- /dev/null
+++ b/paludis/repositories/e/ebuild/2/src_unpack.bash
@@ -0,0 +1,45 @@
+#!/usr/bin/env bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2008 David Leverton
+#
+# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
+# Gentoo Foundation and distributed under the terms of the GNU General
+# Public License v2.
+#
+# This file is part of the Paludis package manager. Paludis is free software;
+# you can redistribute it and/or modify it under the terms of the GNU General
+# Public License, version 2, as published by the Free Software Foundation.
+#
+# Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+
+ebuild_load_module 0/src_unpack
+eval "eapi0_$(declare -f src_unpack)"
+
+eapi1_src_unpack()
+{
+ eapi0_src_unpack
+}
+
+eapi2_src_unpack()
+{
+ eapi0_src_unpack
+}
+
+default_src_unpack()
+{
+ eapi2_src_unpack
+}
+
+src_unpack()
+{
+ default_src_unpack
+}
+
diff --git a/paludis/repositories/e/ebuild/Makefile.am b/paludis/repositories/e/ebuild/Makefile.am
index 1c0678b..9665a67 100644
--- a/paludis/repositories/e/ebuild/Makefile.am
+++ b/paludis/repositories/e/ebuild/Makefile.am
@@ -1,6 +1,6 @@
MAINTAINERCLEANFILES = Makefile.in
CLEANFILES = *~
-SUBDIRS = . 0 1 exheres-0 kdebuild-1 paludis-1 pbin-1 utils
+SUBDIRS = . 0 1 2 exheres-0 kdebuild-1 paludis-1 pbin-1 utils
AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@
diff --git a/paludis/util/echo_functions.bash.in b/paludis/util/echo_functions.bash.in
index ba22e16..527d0a0 100644
--- a/paludis/util/echo_functions.bash.in
+++ b/paludis/util/echo_functions.bash.in
@@ -30,6 +30,7 @@ COLOUR_RED=$'\e[31;01m'
COLOUR_BLUE=$'\e[34;01m'
COLOUR_PINK=$'\e[35;01m'
COLOUR_CYAN=$'\e[36;01m'
+COLOUR_BROWN=$'\e[33m'
if [[ ${PALUDIS_COLOURS} == pink ]]; then
COLOUR_GOOD=${COLOUR_PINK}