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

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

  ViewVC Help
Powered by ViewVC 1.1.20