/[gentoo-alt]/trunk/prefix/app-shells/zsh/zsh-4.3.2.ebuild
Gentoo

Contents of /trunk/prefix/app-shells/zsh/zsh-4.3.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1166 - (show annotations) (download)
Sat Mar 25 22:08:50 2006 UTC (13 years, 3 months ago) by kito
File size: 4314 byte(s)
PREFIX->EPREFIX DEST->EDEST
1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="prefix"
6
7 inherit eutils multilib
8
9 DESCRIPTION="UNIX Shell similar to the Korn shell"
10 HOMEPAGE="http://www.zsh.org/"
11 SRC_URI="ftp://ftp.zsh.org/pub/${P}.tar.bz2
12 doc? ( ftp://ftp.zsh.org/pub/${P}-doc.tar.bz2 )"
13
14 LICENSE="ZSH"
15 SLOT="0"
16 KEYWORDS="~amd64 ~ppc ~ppc-macos ~x86"
17 IUSE="maildir ncurses static doc pcre cap"
18
19 RDEPEND="pcre? ( >=dev-libs/libpcre-3.9 )
20 cap? ( sys-libs/libcap )
21 ncurses? ( >=sys-libs/ncurses-5.1 )"
22 DEPEND="sys-apps/groff
23 >=sys-apps/sed-4
24 ${RDEPEND}"
25
26 src_unpack() {
27 unpack ${P}.tar.bz2
28 use doc && unpack ${P}-doc.tar.bz2
29 cd ${S}
30 epatch ${FILESDIR}/${PN}-init.d-gentoo.diff
31 cd ${S}/Doc
32 ln -sf . man1
33 # fix zshall problem with soelim
34 soelim zshall.1 > zshall.1.soelim
35 mv zshall.1.soelim zshall.1
36 }
37
38 src_compile() {
39 local myconf
40
41 use static && myconf="${myconf} --disable-dynamic" \
42 && LDFLAGS="${LDFLAGS} -static"
43
44 if use userland_Darwin; then
45 LDFLAGS="${LDFLAGS} -Wl,-x"
46 myconf="${myconf} --enable-libs=-liconv"
47 fi
48
49 econf \
50 $(with_bindir) \
51 --libdir=${EPREFIX}/usr/$(get_libdir) \
52 --enable-etcdir=${EPREFIX}/etc/zsh \
53 --enable-zshenv=${EPREFIX}/etc/zsh/zshenv \
54 --enable-zlogin=${EPREFIX}/etc/zsh/zlogin \
55 --enable-zlogout=${EPREFIX}/etc/zsh/zlogout \
56 --enable-zprofile=${EPREFIX}/etc/zsh/zprofile \
57 --enable-zshrc=${EPREFIX}/etc/zsh/zshrc \
58 --enable-fndir=${EPREFIX}/usr/share/zsh/${PV%_*}/functions \
59 --enable-site-fndir=${EPREFIX}/usr/share/zsh/site-functions \
60 --enable-function-subdirs \
61 --enable-ldflags="${LDFLAGS}" \
62 --with-tcsetpgrp \
63 $(use_with ncurses curses-terminfo) \
64 $(use_enable maildir maildir-support) \
65 $(use_enable pcre) \
66 $(use_enable cap) \
67 $(use_enable unicode multibyte) \
68 ${myconf} || die "configure failed"
69
70 if use static ; then
71 # compile all modules statically, see Bug #27392
72 sed -i -e "s/link=no/link=static/g" \
73 -e "s/load=no/load=yes/g" \
74 config.modules || die
75 else
76 # avoid linking to libs in /usr/lib, see Bug #27064
77 sed -i -e "/LIBS/s%-lpcre%${EPREFIX}/usr/lib/libpcre.a%" \
78 Makefile || die
79 fi
80
81 # emake still b0rks
82 emake -j1 || die "make failed"
83 }
84
85 src_test() {
86 for f in /dev/pt* ; do
87 addpredict $f
88 done
89 make check || die "make check failed"
90 }
91
92 src_install() {
93 einstall \
94 bindir=${D}/bin \
95 libdir=${D}/usr/$(get_libdir) \
96 fndir=${D}/usr/share/zsh/${PV%_*}/functions \
97 sitefndir=${D}/usr/share/zsh/site-functions \
98 scriptdir=${D}/usr/share/zsh/${PV%_*}/scripts \
99 install.bin install.man install.modules \
100 install.info install.fns || die "make install failed"
101
102 insinto /etc/zsh
103 doins ${FILESDIR}/zprofile
104
105 keepdir /usr/share/zsh/site-functions
106 insinto /usr/share/zsh/${PV%_*}/functions/Prompts
107 doins ${FILESDIR}/prompt_gentoo_setup || die
108
109 # install miscellaneous scripts; bug #54520
110 sed -i -e "s:/usr/local:${EPREFIX}/usr:g" {Util,Misc}/* || "sed failed"
111 insinto /usr/share/zsh/${PV%_*}/Util
112 doins Util/* || die "doins Util scripts failed"
113 insinto /usr/share/zsh/${PV%_*}/Misc
114 doins Misc/* || die "doins Misc scripts failed"
115
116 dodoc ChangeLog* META-FAQ README INSTALL LICENCE config.modules
117
118 if use doc ; then
119 dohtml Doc/*
120 insinto /usr/share/doc/${PF}
121 doins Doc/zsh{.dvi,_us.ps,_a4.ps}
122 fi
123
124 docinto StartupFiles
125 dodoc StartupFiles/z*
126 }
127
128 pkg_preinst() {
129 # Our zprofile file does the job of the old zshenv file
130 # Move the old version into a zprofile script so the normal
131 # etc-update process will handle any changes.
132 if [ -f ${EPREFIX}/etc/zsh/zshenv -a ! -f ${EPREFIX}/etc/zsh/zprofile ]; then
133 mv ${EPREFIX}/etc/zsh/zshenv ${EPREFIX}/etc/zsh/zprofile
134 fi
135 }
136
137 pkg_postinst() {
138 einfo
139 einfo "If you want to enable Portage completions and Gentoo prompt,"
140 einfo "emerge app-shells/zsh-completion and add"
141 einfo " autoload -U compinit promptinit"
142 einfo " compinit"
143 einfo " promptinit; prompt gentoo"
144 einfo "to your ~/.zshrc"
145 einfo
146 einfo "Also, if you want to enable cache for the completions, add"
147 einfo " zstyle ':completion::complete:*' use-cache 1"
148 einfo "to your ~/.zshrc"
149 einfo
150 # see Bug 26776
151 ewarn
152 ewarn "If you are upgrading from zsh-4.0.x you may need to"
153 ewarn "remove all your old ~/.zcompdump files in order to use"
154 ewarn "completion. For more info see zcompsys manpage."
155 ewarn
156 }

  ViewVC Help
Powered by ViewVC 1.1.20