source: trunk/dports/shells/zsh-devel/Portfile @ 78762

Last change on this file since 78762 was 78762, checked in by jmr@…, 9 years ago

remove ncursesw dependencies

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.0 KB
Line 
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 78762 2011-05-21 15:29:21Z jmr@macports.org $
3
4PortSystem      1.0
5
6name            zsh-devel
7set my_name     [strsed ${name} {s/-.*//}]
8version         4.3.11
9categories      shells
10platforms       darwin
11maintainers     nomaintainer
12description     Zsh is a UNIX command interpreter (shell)
13
14long_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
20homepage        http://www.zsh.org/
21use_bzip2       yes
22dist_subdir     ${my_name}
23distname        ${my_name}-${version}
24master_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
38set love_distname   zsh-lovers_0.8.3
39set love_distfile   ${love_distname}.tar.gz
40set worklovedir     zsh-lovers
41set worklovepath    ${workpath}/${worklovedir}
42
43checksums       zsh-${version}.tar.bz2 \
44                    md5     3225c7f53b69f395e95723585d6785ed \
45                    sha1    25cf0daadc4543d147f6241573d6730b60f16016 \
46                    rmd160  e5e0d79231cdb95e6b6edac0e1b81db6c0018c37 \
47                zsh-${version}-doc.tar.bz2 \
48                    md5     44c92fe036a05ed9da5cf541e4765ad0 \
49                    sha1    5f3a6a35f23596738e911b9f8847808da5c765ba \
50                    rmd160  b6ef6fef121b49f7060163b5b1493987af6dfe3f \
51                zsh-lovers_0.8.3.tar.gz \
52                    md5     6604f3bb8a971e66281e1369cc4bd033 \
53                    sha1    f4905d8825c982371e72053a58cb9679329249a8 \
54                    rmd160  f8482d61d700cc79530b4839de5a86aed6783e99
55
56depends_lib     port:libiconv \
57                port:ncurses \
58                port:gdbm
59
60configure.args  --mandir=${prefix}/share/man \
61                --infodir=${prefix}/share/info \
62                --enable-multibyte \
63                --enable-etcdir=${prefix}/etc \
64                --with-tcsetpgrp
65
66configure.env   DL_EXT=bundle
67
68use_parallel_build  yes
69
70test.run        yes
71test.target     check
72
73set docdir      ${prefix}/share/doc/${my_name}-${version}
74
75post-patch {
76    reinplace "s|/usr/share/zsh|${prefix}/share/zsh|" ${worksrcpath}/Functions/Misc/run-help
77}
78
79post-destroot {
80    # This manpage only includes every zsh manpage; as manpages are gzipped in MacPorts,
81    # .so groff directives will fail.
82    system "cd ${destroot}${prefix}/share/man/man1 && \
83        soelim -I.. zshall.1 > zshall.1.soelim"
84    move -force \
85        ${destroot}${prefix}/share/man/man1/zshall.1.soelim \
86        ${destroot}${prefix}/share/man/man1/zshall.1
87
88    # Install helpfiles for shell builtins (for use by run-help) by
89    # extracting them from the zshbuiltins manpage
90    set helpdir ${prefix}/share/${my_name}/${version}/help
91    xinstall -d ${destroot}${helpdir}
92    system "cd ${destroot}${helpdir} && nroff -mandoc -Tascii -c ${destroot}${prefix}/share/man/man1/zshbuiltins.1 | colcrt - | perl ${worksrcpath}/Util/helpfiles"
93   
94    xinstall -d ${destroot}${docdir}
95    xinstall -m 0644 -W ${worksrcpath} ChangeLog FEATURES LICENCE NEWS README ${destroot}${docdir}
96
97    if {[variant_isset doc] || [variant_isset examples]} {
98        xinstall -d ${destroot}${docdir}/pdf
99    }
100}
101
102notes "
103If you want MacPorts' ${my_name} as login shell, you should run:
104% sudo sh -c \"echo '${prefix}/bin/${my_name}' >> /etc/shells\"
105% chsh -s ${prefix}/bin/${my_name}
106"
107
108platform darwin 8 {
109    post-configure {
110        # poll(2) is broken on Darwin 8.
111        reinplace "s|#define HAVE_POLL 1|#undef HAVE_POLL|" \
112          ${worksrcpath}/config.h
113    }
114}
115
116variant mp_completion description {Install port(1) completion file} {
117    post-destroot {
118        set sitedir ${prefix}/share/${my_name}/site-functions
119        xinstall -m 0644 ${filespath}/_port \
120            ${destroot}${sitedir}
121    }
122}
123
124variant pcre description {Add regular expressions support in builtin functions through PCRE} {
125    configure.args-append   --enable-pcre
126    depends_lib-append      port:pcre
127}
128
129variant doc description {Install extra documentation} {
130    distfiles-append        [suffix ${distname}-doc]
131
132    post-build {
133        system "${build.cmd} -C ${worksrcpath}/Doc html info"
134    }
135
136    destroot.target-append  install.html \
137                            install.info
138}
139
140variant examples description {Install configuration examples} {
141    distfiles-append    ${love_distfile}:love
142    extract.only-delete ${love_distfile}
143
144    post-extract {
145        system "tar xzf ${distpath}/${love_distfile} -C ${workpath}"
146    }
147
148    post-destroot {
149        proc xinstall_dir {dir destdir} {
150            xinstall -d ${destdir}
151
152            foreach {file} [glob ${dir}/*] {
153                if {[file isdirectory ${file}]} {
154                    xinstall_dir ${file} [file join ${destdir} [file tail ${file}]]
155                } else {
156                    xinstall -m 0644 ${file} ${destdir}
157                }
158            }
159        }
160
161        xinstall -m 0644 ${worklovepath}/refcard.pdf ${destroot}${docdir}/pdf
162        xinstall_dir ${worklovepath}/zsh_people ${destroot}${docdir}/examples
163    }
164}
165
166livecheck.distname  ${my_name}-dev
Note: See TracBrowser for help on using the repository browser.