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

Contents of /eclass/scsh.eclass

Parent Directory Parent Directory | Revision Log Revision Log


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

1 mkennedy 1.1 # Copyright 1999-2005 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 mkennedy 1.6 # $Header: /var/cvsroot/gentoo-x86/eclass/scsh.eclass,v 1.5 2005/08/23 15:03:41 swegener 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.6 DEPEND="$DEPEND
12     app-shells/scsh"
13 mkennedy 1.1
14 mkennedy 1.6 scsh_scsh_path() {
15     echo /usr/$(get_libdir)/scsh
16     }
17 mkennedy 1.1
18     set_layout() {
19 mkennedy 1.2 if use scsh; then
20 mkennedy 1.1 SCSH_LAYOUT=scsh
21     else
22 mkennedy 1.2 ewarn "No layout was specified via USE, defaulting to FHS."
23 mkennedy 1.1 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 swegener 1.5 case ${SCSH_LAYOUT} in
35 mkennedy 1.1 fhs)
36     SCSH_PREFIX=/usr
37 swegener 1.5 SCSH_MODULES_PATH=/usr/share/scsh-${SCSH_MV}/modules
38 mkennedy 1.1 ;;
39     scsh)
40     SCSH_PREFIX=/usr/$(get_libdir)/scsh/modules
41 swegener 1.5 SCSH_MODULES_PATH=/usr/$(get_libdir)/scsh/modules/${SCSH_MV}
42 mkennedy 1.1 ;;
43     esac
44     export SCSH_PREFIX SCSH_MODULES_PATH
45    
46 mkennedy 1.6 SCSH_LIB_DIRS='"'${SCSH_MODULES_PATH}'"'" "'"'$(scsh_scsh_path)'"'" "'"'.'"'
47 mkennedy 1.1 export SCSH_LIB_DIRS
48     }
49    
50     scsh_src_unpack() {
51     set_layout
52     set_path_variables
53 swegener 1.5 einfo "Using ${SCSH_LAYOUT} layout"
54 mkennedy 1.1 unpack ${A}
55     }
56    
57     scsh_get_layout_conf() {
58 swegener 1.5 SCSH_LAYOUT_CONF=" --build ${CHOST}
59 mkennedy 1.1 --force
60 swegener 1.5 --layout ${SCSH_LAYOUT}
61     --prefix ${SCSH_PREFIX}
62 mkennedy 1.1 --no-user-defaults
63     --dest-dir ${D}"
64     export SCSH_LAYOUT_CONF
65     }
66    
67     scsh_src_compile() {
68 mkennedy 1.6 scsh_get_layout_conf
69 mkennedy 1.1 }
70    
71     scsh_src_install() {
72 swegener 1.5 dodir ${SCSH_MODULES_PATH}
73 mkennedy 1.1 scsh-install-pkg ${SCSH_LAYOUT_CONF} || die "./scsh-install-pkg failed"
74     }
75    
76 mkennedy 1.6 EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20