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

Contents of /eclass/scsh.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (hide annotations) (download)
Sat Sep 9 15:17:01 2006 UTC (8 years, 1 month ago) by christel
Branch: MAIN
Changes since 1.6: +1 -3 lines
Remove app-shells/scsh's DEPEND upon itself. Bug #121723.

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

  ViewVC Help
Powered by ViewVC 1.1.20