/[gentoo-x86]/eclass/scsh.eclass
Gentoo

Contents of /eclass/scsh.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Thu Jan 5 17:51:33 2006 UTC (8 years, 10 months ago) by mkennedy
Branch: MAIN
Changes since 1.5: +9 -7 lines
Fixes for Bug #101910

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/scsh.eclass,v 1.5 2005/08/23 15:03:41 swegener Exp $
4 #
5
6 inherit eutils
7
8 LICENSE="as-is BSD"
9 SLOT="0"
10 IUSE="scsh"
11 DEPEND="$DEPEND
12 app-shells/scsh"
13
14 scsh_scsh_path() {
15 echo /usr/$(get_libdir)/scsh
16 }
17
18 set_layout() {
19 if use scsh; then
20 SCSH_LAYOUT=scsh
21 else
22 ewarn "No layout was specified via USE, defaulting to FHS."
23 SCSH_LAYOUT=fhs
24 fi
25 export SCSH_LAYOUT
26 }
27
28 set_path_variables() {
29 SCSH_VERSION="$(best_version 'app-shells/scsh')"
30 SCSH_MV="${SCSH_VERSION%*.*}"
31 SCSH_MV="${SCSH_MV//app-shells\/scsh-}"
32 export SCSH_VERSION SCSH_MV
33
34 case ${SCSH_LAYOUT} in
35 fhs)
36 SCSH_PREFIX=/usr
37 SCSH_MODULES_PATH=/usr/share/scsh-${SCSH_MV}/modules
38 ;;
39 scsh)
40 SCSH_PREFIX=/usr/$(get_libdir)/scsh/modules
41 SCSH_MODULES_PATH=/usr/$(get_libdir)/scsh/modules/${SCSH_MV}
42 ;;
43 esac
44 export SCSH_PREFIX SCSH_MODULES_PATH
45
46 SCSH_LIB_DIRS='"'${SCSH_MODULES_PATH}'"'" "'"'$(scsh_scsh_path)'"'" "'"'.'"'
47 export SCSH_LIB_DIRS
48 }
49
50 scsh_src_unpack() {
51 set_layout
52 set_path_variables
53 einfo "Using ${SCSH_LAYOUT} layout"
54 unpack ${A}
55 }
56
57 scsh_get_layout_conf() {
58 SCSH_LAYOUT_CONF=" --build ${CHOST}
59 --force
60 --layout ${SCSH_LAYOUT}
61 --prefix ${SCSH_PREFIX}
62 --no-user-defaults
63 --dest-dir ${D}"
64 export SCSH_LAYOUT_CONF
65 }
66
67 scsh_src_compile() {
68 scsh_get_layout_conf
69 }
70
71 scsh_src_install() {
72 dodir ${SCSH_MODULES_PATH}
73 scsh-install-pkg ${SCSH_LAYOUT_CONF} || die "./scsh-install-pkg failed"
74 }
75
76 EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20