Ticket #11983: zsh-devel-4.3.4.diff

File zsh-devel-4.3.4.diff, 4.7 KB (added by n.oxyde@…, 17 years ago)
  • Portfile

    old new  
    22
    33PortSystem 1.0
    44name            zsh-devel
     5set my_name [strsed ${name} {s/-.*//}]
    56version         4.3.4
    6 categories      shells
    7 maintainers     nomaintainer@macports.org
     7revision    1
     8categories shells
     9maintainers     n.oxyde@gmail.com
    810description     Zsh is a UNIX command interpreter (shell)
    911long_description        Zsh is a UNIX command interpreter (shell) which of \
    1012                        the standard shells most resembles the Korn shell \
     
    1719homepage        http://www.zsh.org
    1820platforms       darwin
    1921use_bzip2       yes
    20 master_sites    http://www.zsh.org/pub/ ftp://ftp.zsh.org/zsh/ \
    21                 ftp://ftp.sterling.com/zsh/ \
    22                 ftp://ftp.rge.com/pub/shells/zsh/ \
    23                 ftp://ftp.fu-berlin.de/pub/unix/shells/zsh \
    24                 ftp://ftp.ips.oz.au/pub/packages/zsh/ \
    25                 ftp://ftp.uit.no/pub/unix/shells/zsh/ \
    26                 ftp://ftp.iij.ad.jp/pub/misc/zsh/ \
    27                 ftp://ftp.icm.edu.pl/vol/wojsyl/zsh/\
    28                 ftp://ftp.sunsite.auc.dk/disk1/zsh/
    29 distname        zsh-${version}
    30 checksums       sha1 6bd905c4bf61bf3df5e5bb78f64be68366ad7517
    31 livecheck.check regex
    32 livecheck.url   http://www.zsh.org/pub/
    33 livecheck.regex zsh-(4.3.\[0-9\]+)\.tar\.gz
     22master_sites    ${homepage}pub/ \
     23                ftp://ftp.zsh.org/${my_name} \
     24                ftp://ftp.sterling.com/${my_name}/ \
     25                ftp://ftp.rge.com/pub/shells/${my_name}/ \
     26                ftp://ftp.fu-berlin.de/pub/unix/shells/${my_name}/ \
     27                ftp://ftp.ips.oz.au/pub/packages/${my_name}/ \
     28                ftp://ftp.uit.no/pub/unix/shells/${my_name}/ \
     29                ftp://ftp.iij.ad.jp/pub/misc/${my_name}/ \
     30                ftp://ftp.icm.edu.pl/vol/wojsyl/${my_name}/ \
     31                ftp://ftp.sunsite.auc.dk/disk1/${my_name}/ \
     32                sourceforge:${my_name}
    3433
     34dist_subdir     ${my_name}
     35distname        ${my_name}-${version}
     36
     37checksums       [suffix ${distname}] \
     38                    md5 8410a30e4f5c6160790bc3afc096424f \
     39                    sha1 6bd905c4bf61bf3df5e5bb78f64be68366ad7517 \
     40                    rmd160 2fe0fcf6371d2072c3b7eeae0392c7ef3665457c \
     41                [suffix ${distname}-doc] \
     42                    md5 1a4ab09a9d75c5ae8585ad645406f27d \
     43                    sha1 83d1a38112f305892393cb036058248ebbf6168e \
     44                    rmd160 768ce8ca2860139428d27a0fedf5c0724967e444
     45
     46depends_lib     port:libiconv port:ncurses
    3547configure.args  --mandir=${prefix}/share/man --infodir=${prefix}/share/info \
    36                 --enable-libs=-liconv --with-curses-terminfo
     48                --with-curses-terminfo \
     49                --enable-etcdir=${prefix}/etc
     50
     51test.run        yes
     52test.target     check
     53
     54set docdir      ${prefix}/share/doc/${my_name}-${version}
     55
     56post-destroot {
     57    # This manpage only includes every zsh manpage; as manpages are gzipped in MacPorts,
     58    # includes fail, so this one is useless.
     59    delete ${destroot}${prefix}/share/man/man1/zshall.1
     60
     61    xinstall -m 0755 -d ${destroot}${docdir}
     62    xinstall -m 0644 -W ${worksrcpath} ChangeLog FEATURES LICENCE NEWS README ${destroot}${docdir}
     63}
     64
     65post-install {
     66    ui_info "If you want MacPorts' ${my_name} as login shell, you should run:"
     67    ui_info "% sudo sh -c "echo '${prefix}/bin/${my_name}' >> /etc/shells"
     68    ui_info "% chsh -s ${prefix}/bin/${my_name}"
     69}
     70
     71platform darwin {
     72    # Dynamic loadable libraries' extension is `bundle` on Darwin
     73    configure.env-append DL_EXT=bundle
     74}
    3775
    3876platform darwin 8 {
    3977        configure.env-append \
    4078          CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
    4179        post-configure {
     80        # poll(2) is broken on Darwin 8.
    4281                reinplace "s|#define HAVE_POLL 1|#undef HAVE_POLL|" \
    4382                  ${worksrcpath}/config.h
    4483        }
    4584}
    4685
    47 variant dp_completion {
    48         post-destroot   {
    49                 file copy -force ${filespath}/_port \
    50                   ${destroot}${prefix}/share/zsh/${version}/functions
    51         }
     86variant mp_completion description {Install port(1) completion file} {
     87    post-destroot {
     88        xinstall -m 0644 ${filespath}/_port \
     89            ${destroot}${prefix}/share/${my_name}/${version}/functions
     90    }
     91}
     92
     93variant utf8 description {Add UTF-8 support} {
     94    configure.args-append   --enable-multibyte
     95}
     96
     97variant pcre description {Add regular expressions support in builtin functions through PCRE} {
     98    configure.args-append   --enable-pcre
     99    depends_lib-append      port:pcre
     100}
     101
     102variant doc description {Install extra documentation} {
     103    distfiles-append        [suffix ${distname}-doc]
     104
     105    post-destroot {
     106        foreach {dir} {dvi html pdf} {
     107            xinstall -m 0755 -d ${destroot}${docdir}/${dir}
     108            eval xinstall -m 0644 [glob ${worksrcpath}/Doc/*.${dir}] ${destroot}${docdir}/${dir}
     109        }
     110    }
    52111}
    53112
    54 variant utf8 { configure.args-append --enable-multibyte }
     113livecheck.distname  ${my_name}-dev