Lines 1-15
Link Here
|
1 |
# -*-eselect-*- vim: ft=eselect |
1 |
# -*-eselect-*- vim: ft=eselect |
2 |
# Copyright 1999-2014 Gentoo Foundation |
2 |
# Copyright 1999-2018 Gentoo Foundation |
3 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# Distributed under the terms of the GNU General Public License v2 |
4 |
|
4 |
|
5 |
inherit config |
5 |
inherit config package-manager |
6 |
|
6 |
|
7 |
DESCRIPTION="Manage the system default wxWidgets profile" |
7 |
DESCRIPTION="Manage the system default wxWidgets profile" |
8 |
MAINTAINER="wxwidgets@gentoo.org" |
8 |
MAINTAINER="wxwidgets@gentoo.org" |
9 |
VERSION="20140423" |
9 |
VERSION="20140423" |
10 |
|
10 |
|
11 |
WXCONFFILE="${EROOT}"/var/lib/wxwidgets/current |
11 |
WXCONFFILE="${EROOT}"/var/lib/wxwidgets/current |
12 |
WXCONFDIR="${EROOT}"/usr/lib/wx/config |
12 |
|
|
|
13 |
# get_libdir |
14 |
# Print the libdir name obtained according to PMS algorithm 12.5 |
15 |
# !!! This function is included here only for testing, and will |
16 |
# !!! be added to libs/package-manager.bash.in of eselect instead |
17 |
get_libdir() { |
18 |
local abi libdir |
19 |
abi=$(envvar sys-devel/gcc ABI) |
20 |
[[ -n ${abi} ]] && libdir=$(envvar sys-devel/gcc "LIBDIR_${abi}") |
21 |
echo "${libdir:-lib}" |
22 |
} |
23 |
|
24 |
get_confdir() { |
25 |
echo "${EROOT}/usr/$(get_libdir)/wx/config" |
26 |
} |
13 |
|
27 |
|
14 |
find_targets() { |
28 |
find_targets() { |
15 |
local conf |
29 |
local conf |
Lines 89-94
describe_list() {
Link Here
|
89 |
} |
103 |
} |
90 |
|
104 |
|
91 |
do_list() { |
105 |
do_list() { |
|
|
106 |
local WXCONFDIR=$(get_confdir) |
92 |
local i targets currconf |
107 |
local i targets currconf |
93 |
targets=( $(find_targets) ) |
108 |
targets=( $(find_targets) ) |
94 |
[[ -e ${WXCONFFILE} ]] && currconf=$(load_config ${WXCONFFILE} WXCONFIG) |
109 |
[[ -e ${WXCONFFILE} ]] && currconf=$(load_config ${WXCONFFILE} WXCONFIG) |
Lines 123-128
do_set() {
Link Here
|
123 |
[[ ! -w "${EROOT}"/var/lib/ ]] \ |
138 |
[[ ! -w "${EROOT}"/var/lib/ ]] \ |
124 |
&& die -q "You need write permission to /var/lib to perform this action." |
139 |
&& die -q "You need write permission to /var/lib to perform this action." |
125 |
|
140 |
|
|
|
141 |
local WXCONFDIR=$(get_confdir) |
126 |
set_config "${1}" |
142 |
set_config "${1}" |
127 |
} |
143 |
} |
128 |
|
144 |
|
Lines 133-138
describe_update() {
Link Here
|
133 |
do_update() { |
149 |
do_update() { |
134 |
[[ ! -e ${WXCONFFILE} ]] && do_set none |
150 |
[[ ! -e ${WXCONFFILE} ]] && do_set none |
135 |
|
151 |
|
|
|
152 |
local WXCONFDIR=$(get_confdir) |
136 |
currconf=$(load_config ${WXCONFFILE} WXCONFIG) |
153 |
currconf=$(load_config ${WXCONFFILE} WXCONFIG) |
137 |
|
154 |
|
138 |
# if current config is valid leave it alone |
155 |
# if current config is valid leave it alone |