blob: be260ba282e84761a19f688844a2befb79791cfb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
#
# Original Author: root
# Purpose: Installing postgresql extension for all available slots
#
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
postgresql-ext_slots_enumerate() {
postgresql_get_versions_range ${POSTGREXT_SLOTS}
}
postgresql-ext_src_unpack() {
multislot_src_unpack "$@"
}
postgresql-ext_src_compile() {
multislot_src_compile "$@"
}
postgresql-ext_src_install() {
multislot_src_install "$@"
}
postgresql-ext_src_test() {
multislot_src_test "$@"
}
postgresql-ext_slot_src_unpack() {
PATH="$(postgresql_get_bindir_for_slot $SLOTSLOT):${PATH}" pgslot_src_unpack
}
postgresql-ext_slot_src_compile() {
PATH="$(postgresql_get_bindir_for_slot $SLOTSLOT):${PATH}" pgslot_src_compile
}
postgresql-ext_slot_src_test() {
PATH="$(postgresql_get_bindir_for_slot $SLOTSLOT):${PATH}" pgslot_src_test
}
postgresql-ext_slot_src_install() {
PATH="$(postgresql_get_bindir_for_slot $SLOTSLOT):${PATH}" pgslot_src_install
}
postgresql-ext_pgslot_src_unpack() {
multislot_slot_src_unpack
}
postgresql-ext_pgslot_src_compile() {
multislot_slot_src_compile
}
postgresql-ext_pgslot_src_test() {
multislot_slot_src_test
}
postgresql-ext_pgslot_src_install() {
multislot_slot_src_install
}
pg_slots_depend() {
local vers=( ${POSTGREXT_SLOTS} )
if [[ -z "${vers[0]}" ]] ; then
echo 'dev-db/postgresql-server'
else
echo ">=dev-db/postgresql-${vers[0]}*"
if [[ ! -z "${vers[1]}" ]] ; then
echo "<=dev-db/postgresql-${vers[1]}*"
fi
fi
}
|