OSDN Git Service

update Readme.txt
[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 41457 2008-11-03 21:06: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.9
9 revision        1
10 categories      shells
11 platforms       darwin
12 maintainers     nox openmaintainer
13 description     Zsh is a UNIX command interpreter (shell)
14
15 long_description \
16     Zsh is a UNIX command interpreter (shell) which of the standard shells most resembles the Korn shell \
17     (ksh), although it is not completely compatible. It includes enhancements of many types, notably in \
18     the command-line editor, options for customising its behaviour, filename globbing, features to make \
19     C-shell (csh) users feel more at home and extra features drawn from tcsh (another `custom' shell).
20
21 homepage        http://www.zsh.org/
22 use_bzip2       yes
23 dist_subdir     ${my_name}
24 distname        ${my_name}-${version}
25 master_sites    ${homepage}pub/ \
26                 ftp://ftp.zsh.org/${my_name} \
27                 ftp://ftp.sterling.com/${my_name}/ \
28                 ftp://ftp.rge.com/pub/shells/${my_name}/ \
29                 ftp://ftp.fu-berlin.de/pub/unix/shells/${my_name}/ \
30                 ftp://ftp.ips.oz.au/pub/packages/${my_name}/ \
31                 ftp://ftp.uit.no/pub/unix/shells/${my_name}/ \
32                 ftp://ftp.iij.ad.jp/pub/misc/${my_name}/ \
33                 ftp://ftp.icm.edu.pl/vol/wojsyl/${my_name}/ \
34                 ftp://ftp.sunsite.auc.dk/disk1/${my_name}/ \
35                 sourceforge:${my_name} \
36                 http://deb.grml.org/pool/main/z/${my_name}-lovers/:love
37
38 # Some love for zsh: http://grml.org/zsh/zsh-lovers.html
39 set love_distname   zsh-lovers_0.8.1
40 set love_distfile   ${love_distname}.tar.gz
41 set worklovedir     zsh-lovers
42 set worklovepath    ${workpath}/${worklovedir}
43
44 checksums       zsh-4.3.9.tar.bz2 \
45                 md5     0539d0a590e545ad8c40ff8c97e94538 \
46                 sha1    7c80e1ad6b311ee5877172a1a7e0161a9a60da70 \
47                 rmd160  2c88347fa357e3624f000721963749c6ccb4e129 \
48                 zsh-4.3.9-doc.tar.bz2 \
49                 md5     b3a026cf02471b66454a2b241a4d92a4 \
50                 sha1    456a696de365066b32161d194de9c7643dbeb7a0 \
51                 rmd160  c7080f41901bd4b6d0b8e9f9385fd57a9d73a383 \
52                 zsh-lovers_0.8.1.tar.gz \
53                 md5     7383f4918aa18c04218ec424fe15df99 \
54                 sha1    4b5b839748063f61ccdf6fc996c100e54be4b551 \
55                 rmd160  76e4ca78fa41af3c779c553298413334c0a6a7c5
56
57 depends_lib     port:libiconv \
58                 port:ncursesw
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