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

Contents of /eclass/scsh.eclass

Parent Directory Parent Directory | Revision Log Revision Log


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

1 # Copyright 1999-2012 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.8 2011/12/27 17:55:12 fauli Exp $
4 #
5
6 inherit eutils multilib
7
8 LICENSE="as-is BSD"
9 SLOT="0"
10 IUSE="scsh"
11
12 scsh_scsh_path() {
13 echo /usr/$(get_libdir)/scsh
14 }
15
16 set_layout() {
17 if use scsh; then
18 SCSH_LAYOUT=scsh
19 else
20 ewarn "No layout was specified via USE, defaulting to FHS."
21 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 case ${SCSH_LAYOUT} in
33 fhs)
34 SCSH_PREFIX=/usr
35 SCSH_MODULES_PATH=/usr/share/scsh-${SCSH_MV}/modules
36 ;;
37 scsh)
38 SCSH_PREFIX=/usr/$(get_libdir)/scsh/modules
39 SCSH_MODULES_PATH=/usr/$(get_libdir)/scsh/modules/${SCSH_MV}
40 ;;
41 esac
42 export SCSH_PREFIX SCSH_MODULES_PATH
43
44 SCSH_LIB_DIRS='"'${SCSH_MODULES_PATH}'"'" "'"'$(scsh_scsh_path)'"'" "'"'.'"'
45 export SCSH_LIB_DIRS
46 }
47
48 scsh_src_unpack() {
49 set_layout
50 set_path_variables
51 einfo "Using ${SCSH_LAYOUT} layout"
52 unpack ${A}
53 }
54
55 scsh_get_layout_conf() {
56 SCSH_LAYOUT_CONF=" --build ${CHOST}
57 --force
58 --layout ${SCSH_LAYOUT}
59 --prefix ${SCSH_PREFIX}
60 --no-user-defaults
61 --dest-dir ${D}"
62 export SCSH_LAYOUT_CONF
63 }
64
65 scsh_src_compile() {
66 scsh_get_layout_conf
67 }
68
69 scsh_src_install() {
70 dodir ${SCSH_MODULES_PATH}
71 scsh-install-pkg ${SCSH_LAYOUT_CONF} || die "./scsh-install-pkg failed"
72 }
73
74 EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20