aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-30 14:12:28 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-30 14:12:28 +0000
commitfda1ba1e7907c99396d96efa39d05464499deaee (patch)
treed2c36f1a12dc37bcfc9f7ae45317401f77f91158
parent54a8f8e65e9366f170d4b3b374cf05ab4eca344a (diff)
downloadpaludis-fda1ba1e7907c99396d96efa39d05464499deaee.tar.gz
paludis-fda1ba1e7907c99396d96efa39d05464499deaee.tar.xz
Ebuild work continues...
-rw-r--r--ebuild/depend.bash31
-rw-r--r--ebuild/ebuild.bash9
-rw-r--r--ebuild/eclass_functions.bash46
-rw-r--r--ebuild/src_unpack.bash2
4 files changed, 87 insertions, 1 deletions
diff --git a/ebuild/depend.bash b/ebuild/depend.bash
new file mode 100644
index 0000000..7a79976
--- /dev/null
+++ b/ebuild/depend.bash
@@ -0,0 +1,31 @@
+#!/bin/bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2006 Ciaran McCreesh <ciaranm@gentoo.org>
+#
+# 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 as published by the Free Software Foundation; either version
+# 2 of the License, or (at your option) any later version.
+#
+# 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_f_depend()
+{
+ local key
+ for key in DEPEND RDEPEND PDEPEND ; do
+ echo "${key}='" ${!key} "'"
+ done
+}
+
diff --git a/ebuild/ebuild.bash b/ebuild/ebuild.bash
index 65238e8..fe6dc06 100644
--- a/ebuild/ebuild.bash
+++ b/ebuild/ebuild.bash
@@ -61,6 +61,7 @@ ebuild_load_module echo_functions
ebuild_load_module install_functions
ebuild_load_module build_functions
ebuild_load_module unpack_functions
+ebuild_load_module eclass_functions
ebuild_load_ebuild()
{
@@ -69,10 +70,18 @@ ebuild_load_ebuild()
}
case ${1:x} in
+ metadata)
+ ebuild_load_ebuild "${2}"
+ ebuild_load_module depend
+ ebuild_f_depend
+ exit 0
+ ;;
+
unpack)
ebuild_load_ebuild "${2}"
ebuild_load_module src_unpack
ebuild_f_unpack
+ exit 0
;;
*)
diff --git a/ebuild/eclass_functions.bash b/ebuild/eclass_functions.bash
new file mode 100644
index 0000000..ffd51ec
--- /dev/null
+++ b/ebuild/eclass_functions.bash
@@ -0,0 +1,46 @@
+#!/bin/bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2006 Ciaran McCreesh <ciaranm@gentoo.org>
+#
+# 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 as published by the Free Software Foundation; either version
+# 2 of the License, or (at your option) any later version.
+#
+# 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
+
+EXPORT_FUNCTIONS()
+{
+ [[ -z "${ECLASS}" ]] && die "EXPORT_FUNCTIONS called but ECLASS undefined"
+
+ local e
+ for e in "$@" ; do
+ eval "$1() { ${ECLASS}_${e} \"\$@\" ; }"
+ done
+}
+
+inherit()
+{
+ local e
+ for e in "$@" ; do
+ local location="${ECLASSDIR}/${e}.eclass"
+ local old_ECLASS="${ECLASS}"
+ export ECLASS="${e}"
+ source "${location}" || die "Error sourcing eclass ${e}"
+ hasq "${ECLASS}" ${INHERITED} || export INHERITED="${INHERITED} ${ECLASS}"
+ export ECLASS="${old_ECLASS}"
+ done
+}
+
diff --git a/ebuild/src_unpack.bash b/ebuild/src_unpack.bash
index fc93851..05c788c 100644
--- a/ebuild/src_unpack.bash
+++ b/ebuild/src_unpack.bash
@@ -28,6 +28,6 @@ src_unpack()
ebuild_f_unpack()
{
-
+ src_unpack
}