Ticket #37198: Portfile-zsh-devel.patch

File Portfile-zsh-devel.patch, 6.7 KB (added by collin@…, 12 years ago)
  • Portfile-zsh-devel

    old new  
    66name            zsh-devel
    77set my_name     [strsed ${name} {s/-.*//}]
    88version         5.0.0
     9revision        1
    910categories      shells
    1011platforms       darwin
    1112maintainers     nomaintainer
     
    1314description     Zsh is a UNIX command interpreter (shell)
    1415
    1516long_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).
     17    Zsh is a UNIX command interpreter (shell) which of the standard     \
     18    shells most resembles the Korn shell (ksh), although it is not      \
     19    completely compatible. It includes enhancements of many types,      \
     20    notably in the command-line editor, options for customising its     \
     21    behaviour, filename globbing, features to make C-shell (csh) users  \
     22    feel more at home and extra features drawn from tcsh (another       \
     23    `custom' shell).
    2024
    21 homepage        http://www.zsh.org/
     25homepage        http://www.zsh.org
    2226use_bzip2       yes
     27
    2328dist_subdir     ${my_name}
    2429distname        ${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
    3730
    38 # Some love for zsh: http://grml.org/zsh/zsh-lovers.html
    39 set love_distname   zsh-lovers_0.8.3
    40 set love_distfile   ${love_distname}.tar.gz
    41 set worklovedir     zsh-lovers
    42 set worklovepath    ${workpath}/${worklovedir}
     31master_sites    sourceforge:project/zsh/zsh/${version} \
     32                http://www.zsh.org/pub/ \
     33                ftp://ftp.zsh.org/zsh/ \
     34                http://mirror.dejanseo.com.au/pub/zsh/ \
     35                http://www.cs.elte.hu/pub/zsh/ \
     36                ftp://ftp.cs.elte.hu/pub/zsh/
    4337
    44 checksums       zsh-${version}.tar.bz2 \
     38checksums       ${distname}${extract.suffix} \
    4539                rmd160  d2aff295e245dd5e805215c6dcca1e76af8b9725 \
    46                 sha256  cd014a8e09a3607c68369d1615db96d0fbb7279a125950b32032fd448c44a888 \
    47                 zsh-${version}-doc.tar.bz2 \
    48                 rmd160  83994a0c5a49db26c9876b27631c2327dda0672b \
    49                 sha256  d2219eb3003c108af9d297ff055aa6df3cdb756ccf6b1b2ee3db8a72dbb2ef30 \
    50                 ${love_distfile} \
    51                 rmd160  f8482d61d700cc79530b4839de5a86aed6783e99 \
    52                 sha256  c786724ac9526e2504142c6d607bc6f3703a35b3db804123f0ffe4214b399ea9
     40                sha256  cd014a8e09a3607c68369d1615db96d0fbb7279a125950b32032fd448c44a888
    5341
    5442depends_lib     port:libiconv \
    5543                port:ncurses \
     
    6654test.run        yes
    6755test.target     check
    6856
    69 set docdir      ${prefix}/share/doc/${my_name}-${version}
     57set docdir      ${prefix}/share/doc/${distname}
     58
     59# Some love for zsh: http://grml.org/zsh/zsh-lovers.html
     60set love_distname   zsh-lovers_0.8.3
     61set love_distfile   ${love_distname}.tar.gz
     62set worklovedir     zsh-lovers
     63set worklovepath    ${workpath}/${worklovedir}
    7064
    7165post-patch {
    7266    reinplace "s|/usr/share/zsh|${prefix}/share/zsh|" ${worksrcpath}/Functions/Misc/run-help
     
    8377
    8478    # Install helpfiles for shell builtins (for use by run-help) by
    8579    # extracting them from the zshbuiltins manpage
    86     set helpdir ${prefix}/share/${my_name}/${version}/help
     80    set helpdir ${prefix}/share/zsh/${version}/help
    8781    xinstall -d ${destroot}${helpdir}
    88     system "cd ${destroot}${helpdir} && nroff -mandoc -Tascii -c ${destroot}${prefix}/share/man/man1/zshbuiltins.1 | colcrt - | perl ${worksrcpath}/Util/helpfiles"
    89    
     82    system "cd ${destroot}${helpdir} && nroff -mandoc -Tascii -c \
     83        ${destroot}${prefix}/share/man/man1/zshbuiltins.1 | colcrt - | \
     84        perl ${worksrcpath}/Util/helpfiles"
     85
    9086    xinstall -d ${destroot}${docdir}
    9187    xinstall -m 0644 -W ${worksrcpath} ChangeLog FEATURES LICENCE NEWS README ${destroot}${docdir}
    9288
     
    9692}
    9793
    9894notes "
    99 If you want MacPorts' ${my_name} as login shell, you should run:
    100 % sudo sh -c \"echo '${prefix}/bin/${my_name}' >> /etc/shells\"
    101 % chsh -s ${prefix}/bin/${my_name}
     95If you want MacPorts' zsh as login shell, you should run:
     96% sudo sh -c \"echo '${prefix}/bin/zsh' >> /etc/shells\"
     97% chsh -s ${prefix}/bin/zsh
    10298"
    10399
    104100platform darwin 8 {
    105101    post-configure {
    106102        # poll(2) is broken on Darwin 8.
    107         reinplace "s|#define HAVE_POLL 1|#undef HAVE_POLL|" \
    108           ${worksrcpath}/config.h
     103        reinplace "s|#define HAVE_POLL 1|#undef HAVE_POLL|" ${worksrcpath}/config.h
    109104    }
    110105}
    111106
    112 variant mp_completion description {Install port(1) completion file} {
     107variant mp_completion description {Include automatic completion of MacPorts commands} {
    113108    post-destroot {
    114         set sitedir ${prefix}/share/${my_name}/site-functions
    115         xinstall -m 0644 ${filespath}/_port \
    116             ${destroot}${sitedir}
     109        set sitedir ${prefix}/share/zsh/site-functions
     110        xinstall -m 0644 ${filespath}/_port ${destroot}${sitedir}
    117111    }
    118112}
    119113
     
    123117}
    124118
    125119variant doc description {Install extra documentation} {
    126     distfiles-append        [suffix ${distname}-doc]
     120    distfiles-append ${distname}-doc${extract.suffix}
     121    checksums-append ${distname}-doc${extract.suffix} \
     122                     sha1    ea65b463a0b9475ec084ba4f96f390b84b2630a7 \
     123                     rmd160  83994a0c5a49db26c9876b27631c2327dda0672b
    127124
    128125    post-build {
    129126        system "${build.cmd} -C ${worksrcpath}/Doc html info"
     
    134131}
    135132
    136133variant examples description {Install configuration examples} {
     134    master_sites-append http://deb.grml.org/pool/main/z/zsh-lovers/:love
    137135    distfiles-append    ${love_distfile}:love
     136    checksums-append    ${love_distfile} \
     137                        rmd160  f8482d61d700cc79530b4839de5a86aed6783e99 \
     138                        sha256  c786724ac9526e2504142c6d607bc6f3703a35b3db804123f0ffe4214b399ea9
    138139    extract.only-delete ${love_distfile}
    139140
    140141    post-extract {