aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2015-11-05 18:21:15 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2015-11-05 18:21:15 +0000
commit5b89f3bd40d17d06e3a1f26471461a3ae544c676 (patch)
tree34df88fbbcf80c1e7a76080f73facbb721e7b84f /paludis/repositories/e/ebuild
parent55daefe197646bff5cfb39e63b9554528b74f0b4 (diff)
downloadpaludis-5b89f3bd40d17d06e3a1f26471461a3ae544c676.tar.gz
paludis-5b89f3bd40d17d06e3a1f26471461a3ae544c676.tar.xz
EAPI 6 default_src_prepare uses eapply
Diffstat (limited to 'paludis/repositories/e/ebuild')
-rw-r--r--paludis/repositories/e/ebuild/6/Makefile.am3
-rw-r--r--paludis/repositories/e/ebuild/6/src_prepare.bash71
2 files changed, 73 insertions, 1 deletions
diff --git a/paludis/repositories/e/ebuild/6/Makefile.am b/paludis/repositories/e/ebuild/6/Makefile.am
index 6c9ad46fd..0511c3462 100644
--- a/paludis/repositories/e/ebuild/6/Makefile.am
+++ b/paludis/repositories/e/ebuild/6/Makefile.am
@@ -9,7 +9,8 @@ libexecprog6_SCRIPTS = \
list_functions.bash \
multilib_functions.bash \
output_functions.bash \
- src_install.bash
+ src_install.bash \
+ src_prepare.bash
TESTS =
check_SCRIPTS = $(TESTS)
diff --git a/paludis/repositories/e/ebuild/6/src_prepare.bash b/paludis/repositories/e/ebuild/6/src_prepare.bash
new file mode 100644
index 000000000..17cc37da8
--- /dev/null
+++ b/paludis/repositories/e/ebuild/6/src_prepare.bash
@@ -0,0 +1,71 @@
+#!/usr/bin/env bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2006, 2007, 2009 Ciaran McCreesh
+# Copyright (c) 2008, 2015 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
+
+default_src_prepare()
+{
+ if ! declare -p PATCHES >/dev/null 2>&1 ; then
+ :
+ elif declare -p PATCHES | grep -q '^declare -a ' ; then
+ [[ ${#PATCHES[@]} -gt 0 ]] && eapply "${PATCHES[@]}"
+ else
+ [[ -n ${PATCHES} ]] && eapply ${PATCHES}
+ fi
+ eapply_user
+}
+
+src_prepare()
+{
+ default_src_prepare
+}
+
+ebuild_f_prepare()
+{
+ if [[ -d "${S}" ]] ; then
+ cd "${S}" || die "cd to \${S} (\"${S}\") failed"
+ elif [[ -n "${PALUDIS_NO_S_WORKDIR_FALLBACK}" ]] ; then
+ die "\${S} (\"${S}\") does not exist"
+ 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
+}
+