aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-09-01 14:43:37 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2008-09-01 14:43:37 +0100
commiteebdfdbd65a7971d2cbb5812dea42ef05dd899cf (patch)
treecc07c8e586197aac38701a568fb3ce9298d4a9e1
parenta66a6d5cf3410da1c8f6ba0f52afc1af0ac8c986 (diff)
downloadpaludis-eebdfdbd65a7971d2cbb5812dea42ef05dd899cf.tar.gz
paludis-eebdfdbd65a7971d2cbb5812dea42ef05dd899cf.tar.xz
EAPI 2 will have src_prepare
-rw-r--r--paludis/repositories/e/ebuild/2/Makefile.am1
-rw-r--r--paludis/repositories/e/ebuild/2/src_prepare.bash77
2 files changed, 78 insertions, 0 deletions
diff --git a/paludis/repositories/e/ebuild/2/Makefile.am b/paludis/repositories/e/ebuild/2/Makefile.am
index 1e30166..75c3cdb 100644
--- a/paludis/repositories/e/ebuild/2/Makefile.am
+++ b/paludis/repositories/e/ebuild/2/Makefile.am
@@ -10,6 +10,7 @@ libexecprog2_SCRIPTS = \
src_compile.bash \
src_configure.bash \
src_install.bash \
+ src_prepare.bash \
src_test.bash \
src_unpack.bash \
output_functions.bash
diff --git a/paludis/repositories/e/ebuild/2/src_prepare.bash b/paludis/repositories/e/ebuild/2/src_prepare.bash
new file mode 100644
index 0000000..8e02299
--- /dev/null
+++ b/paludis/repositories/e/ebuild/2/src_prepare.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_prepare()
+{
+ die "${FUNCNAME} is not supported"
+}
+
+eapi1_src_prepare()
+{
+ die "${FUNCNAME} is not supported"
+}
+
+eapi2_src_prepare()
+{
+ :
+}
+
+default_src_prepare()
+{
+ eapi2_src_prepare
+}
+
+src_prepare()
+{
+ default_src_prepare
+}
+
+ebuild_f_prepare()
+{
+ 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 "prepare" ${SKIP_FUNCTIONS} ; then
+ ebuild_section "Skipping src_prepare (SKIP_FUNCTIONS)"
+ else
+ if [[ $(type -t pre_src_prepare ) == "function" ]] ; then
+ ebuild_section "Starting pre_src_prepare"
+ pre_src_prepare
+ ebuild_section "Done pre_src_prepare"
+ fi
+
+ ebuild_section "Starting src_prepare"
+ src_prepare
+ ebuild_section "Done src_prepare"
+
+ if [[ $(type -t post_src_prepare ) == "function" ]] ; then
+ ebuild_section "Starting post_src_prepare"
+ post_src_prepare
+ ebuild_section "Done post_src_prepare"
+ fi
+ fi
+}
+