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

Contents of /eclass/scsh.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (hide annotations) (download)
Sat Jun 2 19:16:31 2012 UTC (2 years, 1 month ago) by zmedico
Branch: MAIN
Changes since 1.8: +3 -3 lines
inherit multilib for get_libdir

1 zmedico 1.9 # Copyright 1999-2012 Gentoo Foundation
2 mkennedy 1.1 # Distributed under the terms of the GNU General Public License v2
3 zmedico 1.9 # $Header: /var/cvsroot/gentoo-x86/eclass/scsh.eclass,v 1.8 2011/12/27 17:55:12 fauli Exp $
4 mkennedy 1.1 #
5    
6 zmedico 1.9 inherit eutils multilib
7 mkennedy 1.1
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