summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorheracles <heracles@localhost>2007-03-27 12:19:59 +0000
committerheracles <heracles@localhost>2007-03-27 12:19:59 +0000
commit46d19b92b4f4fe3b19662d4e2adedeed37d8fe2f (patch)
tree3bde89aac2e6ee63ed52feb6c5841e3b9f0a2be6
parentapp-admin/eselect-postgresql dev-db/{pgcluster,postgresql-server}: adjuste es... (diff)
downloadexperimental-46d19b92b4f4fe3b19662d4e2adedeed37d8fe2f.tar.gz
experimental-46d19b92b4f4fe3b19662d4e2adedeed37d8fe2f.tar.bz2
experimental-46d19b92b4f4fe3b19662d4e2adedeed37d8fe2f.zip
adjusted multislot to abstain from exporting illicit functions
svn path=/experimental/; revision=245
-rw-r--r--dev-db/postgresql-ip4r/Manifest8
-rw-r--r--dev-db/postgresql-ip4r/postgresql-ip4r-1.01.ebuild7
-rw-r--r--eclass/multislot.eclass40
-rw-r--r--eclass/postgresql-ext.eclass29
4 files changed, 44 insertions, 40 deletions
diff --git a/dev-db/postgresql-ip4r/Manifest b/dev-db/postgresql-ip4r/Manifest
index 1e04e63..5846447 100644
--- a/dev-db/postgresql-ip4r/Manifest
+++ b/dev-db/postgresql-ip4r/Manifest
@@ -1,8 +1,8 @@
DIST ip4r-1.01.tar.gz 18140 RMD160 1d31f02009a93cd14f4c76e4880186b29cd8542e SHA1 77044add07e1b98bca354b9205f3cdd4ea6758a9 SHA256 057ce1a9f13947a85e53b6ac47d398fe407afe3f6ffa60c317c6ea57cc0d252f
-EBUILD postgresql-ip4r-1.01.ebuild 719 RMD160 afad57a9dcb303f9afcc5e278b2dabd6fb748a39 SHA1 13ad6928472c450abb457e3b11f82fb6645a9898 SHA256 9af067853fccf5a6f8767b444bf2d47f2f17756b84f790ba81adece2bdccd4c9
-MD5 d31f6ed2748f1d8ac42c93a19ae8124c postgresql-ip4r-1.01.ebuild 719
-RMD160 afad57a9dcb303f9afcc5e278b2dabd6fb748a39 postgresql-ip4r-1.01.ebuild 719
-SHA256 9af067853fccf5a6f8767b444bf2d47f2f17756b84f790ba81adece2bdccd4c9 postgresql-ip4r-1.01.ebuild 719
+EBUILD postgresql-ip4r-1.01.ebuild 696 RMD160 d8f46ebad2bd01984cb802d87069d6a1495a629d SHA1 c06f35bb8d168d38314548bf094efb9638e7ea8f SHA256 26eab27a49c6ce900c29abb9f01b88d51313fdd2699de4e67f80784b6d538a4f
+MD5 60b78fe4c78e0db7d2a9569d6a3afedd postgresql-ip4r-1.01.ebuild 696
+RMD160 d8f46ebad2bd01984cb802d87069d6a1495a629d postgresql-ip4r-1.01.ebuild 696
+SHA256 26eab27a49c6ce900c29abb9f01b88d51313fdd2699de4e67f80784b6d538a4f postgresql-ip4r-1.01.ebuild 696
MD5 25769464f51bbf088ecb77e379c76d4a files/digest-postgresql-ip4r-1.01 226
RMD160 a850620ff3aab80e4e697119887b301efb35a9a4 files/digest-postgresql-ip4r-1.01 226
SHA256 991e96b5a3b904c90032e5ca7ee9d74fe6e3fc9ffee52ff790075af7bfdd00e3 files/digest-postgresql-ip4r-1.01 226
diff --git a/dev-db/postgresql-ip4r/postgresql-ip4r-1.01.ebuild b/dev-db/postgresql-ip4r/postgresql-ip4r-1.01.ebuild
index 844b3fd..24f8a62 100644
--- a/dev-db/postgresql-ip4r/postgresql-ip4r-1.01.ebuild
+++ b/dev-db/postgresql-ip4r/postgresql-ip4r-1.01.ebuild
@@ -2,6 +2,8 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
+# min max
+WANT_POSTGRES_SLOTS="8.0 8.2"
inherit eutils postgresql-ext
DESCRIPTION="Indexable IPv4 range / CIDR type for PostgreSQL"
HOMEPAGE="http://ip4r.projects.postgresql.org/"
@@ -11,13 +13,8 @@ SLOT="0"
KEYWORDS="~x86"
IUSE=""
-DEPEND="$(pg_slots_depend)"
-
S="${WORKDIR}/ip4r-${PV}"
-# "min max"
-POSTGREXT_SLOTS="8.0 8.2"
-
pgslot_src_compile() {
emake USE_PGXS=1 || die "emake for slot $SLOTSLOT failed"
}
diff --git a/eclass/multislot.eclass b/eclass/multislot.eclass
index 56fbfd8..17d55ea 100644
--- a/eclass/multislot.eclass
+++ b/eclass/multislot.eclass
@@ -10,9 +10,24 @@
ECLASS="multislot"
INHERITED="$INHERITED $ECLASS"
-EXPORT_FUNCTIONS \
- src_unpack src_compile src_test src_install \
- slot_src_unpack slot_src_compile slot_src_test slot_src_install
+EXPORT_FUNCTIONS src_unpack src_compile src_test src_install
+
+# Return the list of functions to try (the first match takes precedence)
+# multislot_funs <function_name> <parameters>
+multislot_run_fun() {
+ local fun="${1}"
+ shift
+ if [[ "$(type -t "$fun")" == function ]] ; then
+ $fun "$@"
+ return $?
+ fi
+ for e in ${MULTISLOT_ECLASSES} multislot ; do
+ if [[ "$(type -t "${e}_$fun")" == function ]] ; then
+ ${e}_$fun "$@"
+ return $?
+ fi
+ done
+}
# Store unslotted workdir for future reference if it wasn't stored yet.
multislot_storeWD() {
@@ -20,7 +35,7 @@ multislot_storeWD() {
}
# Discover what slots are we building for
multislot_storeSlots() {
- [[ -z "${MULTISLOT_SLOTS}" ]] && MULTISLOT_SLOTS="$(slots_enumerate)"
+ [[ -z "${MULTISLOT_SLOTS}" ]] && MULTISLOT_SLOTS="$(multislot_run_fun slots_enumerate)"
}
# Set up WORKDIR, S and SLOTSLOT variables for particular slot
@@ -40,7 +55,7 @@ multislot_src_unpack() {
multislot_slot_vars $slot
mkdir -p "${WORKDIR}"
cd "${WORKDIR}"
- slot_src_unpack
+ multislot_run_fun slot_src_unpack "$@"
done
}
@@ -50,7 +65,7 @@ multislot_src_compile() {
for slot in ${MULTISLOT_SLOTS} ; do
multislot_slot_vars $slot
cd ${S}
- slot_src_compile
+ multislot_run_fun slot_src_compile "$@"
done
}
multislot_src_test() {
@@ -59,7 +74,7 @@ multislot_src_test() {
for slot in ${MULTISLOT_SLOTS} ; do
multislot_slot_vars $slot
cd ${S}
- slot_src_test
+ multislot_run_fun slot_src_test "$@"
done
}
multislot_src_install() {
@@ -68,19 +83,10 @@ multislot_src_install() {
for slot in ${MULTISLOT_SLOTS} ; do
multislot_slot_vars $slot
cd ${S}
- slot_src_install
+ multislot_run_fun slot_src_install "$@"
done
}
multislot_slot_src_unpack() {
unpack ${A}
}
-multislot_slot_src_compile() {
- :
-}
-multislot_slot_src_test() {
- :
-}
-multislot_slot_src_install() {
- :
-}
diff --git a/eclass/postgresql-ext.eclass b/eclass/postgresql-ext.eclass
index fedce0a..de258b4 100644
--- a/eclass/postgresql-ext.eclass
+++ b/eclass/postgresql-ext.eclass
@@ -10,14 +10,12 @@
ECLASS="postgresql-ext"
INHERITED="$INHERITED $ECLASS"
inherit postgresql multislot
-EXPORT_FUNCTIONS \
- src_unpack src_compile src_install \
- slot_src_unpack slot_src_compile slot_src_test slot_src_install \
- pgslot_src_unpack pgslot_src_compile pgslot_src_test pgslot_src_install \
- slots_enumerate
+EXPORT_FUNCTIONS src_unpack src_compile src_test src_install
+
+MULTISLOT_ECLASSES="postgresql-ext ${MULTISLOT_ECLASSES}"
postgresql-ext_slots_enumerate() {
- postgresql_get_versions_range ${POSTGREXT_SLOTS}
+ postgresql_get_versions_range ${WANT_POSTGRES_SLOTS}
}
postgresql-ext_src_unpack() {
@@ -34,16 +32,16 @@ postgresql-ext_src_test() {
}
postgresql-ext_slot_src_unpack() {
- PATH="$(postgresql_get_bindir_for_slot $SLOTSLOT):${PATH}" pgslot_src_unpack
+ PATH="$(postgresql_get_bindir_for_slot $SLOTSLOT):${PATH}" multislot_run_fun pgslot_src_unpack "$@"
}
postgresql-ext_slot_src_compile() {
- PATH="$(postgresql_get_bindir_for_slot $SLOTSLOT):${PATH}" pgslot_src_compile
+ PATH="$(postgresql_get_bindir_for_slot $SLOTSLOT):${PATH}" multislot_run_fun pgslot_src_compile "$@"
}
postgresql-ext_slot_src_test() {
- PATH="$(postgresql_get_bindir_for_slot $SLOTSLOT):${PATH}" pgslot_src_test
+ PATH="$(postgresql_get_bindir_for_slot $SLOTSLOT):${PATH}" multislot_run_fun pgslot_src_test "$@"
}
postgresql-ext_slot_src_install() {
- PATH="$(postgresql_get_bindir_for_slot $SLOTSLOT):${PATH}" pgslot_src_install
+ PATH="$(postgresql_get_bindir_for_slot $SLOTSLOT):${PATH}" multislot_run_fun pgslot_src_install "$@"
}
postgresql-ext_pgslot_src_unpack() {
@@ -59,14 +57,17 @@ postgresql-ext_pgslot_src_install() {
multislot_slot_src_install
}
-pg_slots_depend() {
- local vers=( ${POSTGREXT_SLOTS} )
+postgresql-ext_pg_slots_depend() {
+ local vers=( ${WANT_POSTGRES_SLOTS} )
if [[ -z "${vers[0]}" ]] ; then
echo 'virtual/postgresql-server'
else
- echo ">=virtual/postgresql-server-${vers[0]}*"
+ echo ">=virtual/postgresql-server-${vers[0]}"
if [[ ! -z "${vers[1]}" ]] ; then
- echo "<=virtual/postgresql-server-${vers[1]}*"
+ echo "<=virtual/postgresql-server-${vers[1]}"
fi
fi
}
+
+DEPEND="$(postgresql-ext_pg_slots_depend)"
+RDEPEND="$(postgresql-ext_pg_slots_depend)"