OSDN Git Service

zsh-devel 4.3.10
[splhack/MacPorts.git] / shells / zsh-devel / Portfile
1 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
2 # $Id: Portfile 52171 2009-06-11 15:36:35Z nox@macports.org $
3
4 PortSystem      1.0
5
6 name            zsh-devel
7 set my_name     [strsed ${name} {s/-.*//}]
8 version         4.3.10
9 categories      shells
10 platforms       darwin
11 maintainers     nox openmaintainer
12 description     Zsh is a UNIX command interpreter (shell)
13
14 long_description \
15     Zsh is a UNIX command interpreter (shell) which of the standard shells most resembles the Korn shell \
16     (ksh), although it is not completely compatible. It includes enhancements of many types, notably in \
17     the command-line editor, options for customising its behaviour, filename globbing, features to make \
18     C-shell (csh) users feel more at home and extra features drawn from tcsh (another `custom' shell).
19
20 homepage        http://www.zsh.org/
21 use_bzip2       yes
22 dist_subdir     ${my_name}
23 distname        ${my_name}-${version}
24 master_sites    ${homepage}pub/ \
25                 ftp://ftp.zsh.org/${my_name} \
26                 ftp://ftp.sterling.com/${my_name}/ \
27                 ftp://ftp.rge.com/pub/shells/${my_name}/ \
28                 ftp://ftp.fu-berlin.de/pub/unix/shells/${my_name}/ \
29                 ftp://ftp.ips.oz.au/pub/packages/${my_name}/ \
30                 ftp://ftp.uit.no/pub/unix/shells/${my_name}/ \
31                 ftp://ftp.iij.ad.jp/pub/misc/${my_name}/ \
32                 ftp://ftp.icm.edu.pl/vol/wojsyl/${my_name}/ \
33                 ftp://ftp.sunsite.auc.dk/disk1/${my_name}/ \
34                 sourceforge:${my_name} \
35                 http://deb.grml.org/pool/main/z/${my_name}-lovers/:love
36
37 # Some love for zsh: http://grml.org/zsh/zsh-lovers.html
38 set love_distname   zsh-lovers_0.8.3
39 set love_distfile   ${love_distname}.tar.gz
40 set worklovedir     zsh-lovers
41 set worklovepath    ${workpath}/${worklovedir}
42
43 checksums        zsh-4.3.10.tar.bz2 \
44                     md5     74c5b275544400082a1cde806c98682a \
45                     sha1    132f9ce411bf318abccbae9cdc2f8cc14f8be85b \
46                     rmd160  fad1412b76d1388d825cb870681c21696fdfa273 \
47                 zsh-4.3.10-doc.tar.bz2 \
48                     md5     c7bbc55d7914d7c3c60329d92396f75f \
49                     sha1    e67e10478aa69a9e9cc92986515d337efc30a2bf \
50                     rmd160  b56fd30ac63e2d3f2479c7d390ced260cad604f7 \
51                 zsh-lovers_0.8.3.tar.gz \
52                     md5     6604f3bb8a971e66281e1369cc4bd033 \
53                     sha1    f4905d8825c982371e72053a58cb9679329249a8 \
54                     rmd160  f8482d61d700cc79530b4839de5a86aed6783e99
55
56 depends_lib     port:libiconv \
57                 port:ncursesw \
58                 port:gdbm
59
60 configure.args  --mandir=${prefix}/share/man \
61                 --infodir=${prefix}/share/info \
62                 --with-curses-terminfo \
63                 --enable-multibyte \
64                 --enable-etcdir=${prefix}/etc
65
66 configure.env   DL_EXT=bundle
67
68 use_parallel_build  yes
69
70 test.run        yes
71 test.target     check
72
73 set docdir      ${prefix}/share/doc/${my_name}-${version}
74
75 post-destroot {
76     # This manpage only includes every zsh manpage; as manpages are gzipped in MacPorts,
77     # .so groff directives will fail.
78     system "cd ${destroot}${prefix}/share/man/man1 && \
79         soelim -I.. zshall.1 > zshall.1.soelim"
80     move -force \
81         ${destroot}${prefix}/share/man/man1/zshall.1.soelim \
82         ${destroot}${prefix}/share/man/man1/zshall.1
83
84     xinstall -d ${destroot}${docdir}
85     xinstall -m 0644 -W ${worksrcpath} ChangeLog FEATURES LICENCE NEWS README ${destroot}${docdir}
86
87     if {[variant_isset doc] || [variant_isset examples]} {
88         xinstall -d ${destroot}${docdir}/pdf
89     }
90 }
91
92 post-install {
93     ui_info "If you want MacPorts' ${my_name} as login shell, you should run:"
94     ui_info "% sudo sh -c \"echo '${prefix}/bin/${my_name}' >> /etc/shells\""
95     ui_info "% chsh -s ${prefix}/bin/${my_name}"
96 }
97
98 platform darwin 8 {
99     post-configure {
100         # poll(2) is broken on Darwin 8.
101         reinplace "s|#define HAVE_POLL 1|#undef HAVE_POLL|" \
102           ${worksrcpath}/config.h
103     }
104 }
105
106 variant mp_completion description {Install port(1) completion file} {
107     post-destroot {
108         set sitedir ${prefix}/share/${my_name}/site-functions
109         xinstall -m 0644 ${filespath}/_port \
110             ${destroot}${sitedir}
111     }
112 }
113
114 variant pcre description {Add regular expressions support in builtin functions through PCRE} {
115     configure.args-append   --enable-pcre
116     depends_lib-append      port:pcre
117 }
118
119 variant doc description {Install extra documentation} {
120     distfiles-append        [suffix ${distname}-doc]
121
122     post-build {
123         system "${build.cmd} -C ${worksrcpath}/Doc html info"
124     }
125
126     destroot.target-append  install.html \
127                             install.info
128 }
129
130 variant examples description {Install configuration examples} {
131     distfiles-append    ${love_distfile}:love
132     extract.only-delete ${love_distfile}
133
134     post-extract {
135         system "tar xzf ${distpath}/${love_distfile} -C ${workpath}"
136     }
137
138     post-destroot {
139         proc xinstall_dir {dir destdir} {
140             xinstall -d ${destdir}
141
142             foreach {file} [glob ${dir}/*] {
143                 if {[file isdirectory ${file}]} {
144                     xinstall_dir ${file} [file join ${destdir} [file tail ${file}]]
145                 } else {
146                     xinstall -m 0644 ${file} ${destdir}
147                 }
148             }
149         }
150
151         xinstall -m 0644 ${worklovepath}/refcard.pdf ${destroot}${docdir}/pdf
152         xinstall_dir ${worklovepath}/zsh_people ${destroot}${docdir}/examples
153     }
154 }
155
156 variant cjk description {Add East Asian Ambiguous characters support} {
157     patchfiles-append   patch-compat.c patch-zsh.h
158 }
159
160 livecheck.distname  ${my_name}-dev