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

Last change on this file since 91007 was 91007, checked in by g5pw@…, 7 years ago

shells/zsh-devel:
It is nomaintainer, so I took the liberty to bump the version to 4.3.17
It builds with no issues.

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