# $Id$ PortSystem 1.0 name zsh-devel set my_name [strsed ${name} {s/-.*//}] version 4.3.4 revision 4 categories shells platforms darwin maintainers nox description Zsh is a UNIX command interpreter (shell) long_description \ Zsh is a UNIX command interpreter (shell) which of the standard shells most resembles the Korn shell \ (ksh), although it is not completely compatible. It includes enhancements of many types, notably in \ the command-line editor, options for customising its behaviour, filename globbing, features to make \ C-shell (csh) users feel more at home and extra features drawn from tcsh (another `custom' shell). homepage http://www.zsh.org/ use_bzip2 yes dist_subdir ${my_name} distname ${my_name}-${version} master_sites ${homepage}pub/ \ ftp://ftp.zsh.org/${my_name} \ ftp://ftp.sterling.com/${my_name}/ \ ftp://ftp.rge.com/pub/shells/${my_name}/ \ ftp://ftp.fu-berlin.de/pub/unix/shells/${my_name}/ \ ftp://ftp.ips.oz.au/pub/packages/${my_name}/ \ ftp://ftp.uit.no/pub/unix/shells/${my_name}/ \ ftp://ftp.iij.ad.jp/pub/misc/${my_name}/ \ ftp://ftp.icm.edu.pl/vol/wojsyl/${my_name}/ \ ftp://ftp.sunsite.auc.dk/disk1/${my_name}/ \ sourceforge:${my_name} \ http://deb.grml.org/pool/main/z/${my_name}-lovers/:love # Some love for zsh: http://grml.org/zsh/zsh-lovers.html set love_distname zsh-lovers_0.7.0 set love_distfile ${love_distname}.tar.gz set worklovedir [strsed [strsed ${love_distname} {s/-[0-9][0-9]*$//}] {g/_/-/}] set worklovepath ${workpath}/${worklovedir} checksums [suffix ${distname}] \ md5 8410a30e4f5c6160790bc3afc096424f \ sha1 6bd905c4bf61bf3df5e5bb78f64be68366ad7517 \ rmd160 2fe0fcf6371d2072c3b7eeae0392c7ef3665457c \ [suffix ${distname}-doc] \ md5 1a4ab09a9d75c5ae8585ad645406f27d \ sha1 83d1a38112f305892393cb036058248ebbf6168e \ rmd160 768ce8ca2860139428d27a0fedf5c0724967e444 \ ${love_distfile} \ md5 e7a4ecabe514afdf2d1a56d1e925fb86 \ sha1 669fd529080492819c10379ad41b7b5e7a575fd1 \ rmd160 16367651748e7e7102de74b1f70e5d3b59fdd867 depends_lib port:libiconv \ port:ncurses post-patch { # Fixes #13359. May need to be removed on upstream update. reinplace "s/curses\\.h/ncurses.h/" \ ${worksrcpath}/Src/Modules/termcap.c \ ${worksrcpath}/Src/Modules/terminfo.c } # configure.universal_ldflags-append -isysroot ${sysroot} configure.universal_ldflags-append -isysroot /Developer/SDKs/MacOSX10.4u.sdk configure.args --mandir=${prefix}/share/man \ --infodir=${prefix}/share/info \ --with-curses-terminfo \ --enable-multibyte \ --enable-etcdir=${prefix}/etc test.run yes test.target check set docdir ${prefix}/share/doc/${my_name}-${version} post-destroot { # This manpage only includes every zsh manpage; as manpages are gzipped in MacPorts, # .so groff directives will fail. system "cd ${destroot}${prefix}/share/man/man1 && \ soelim -I.. zshall.1 > zshall.1.soelim" move -force \ ${destroot}${prefix}/share/man/man1/zshall.1.soelim \ ${destroot}${prefix}/share/man/man1/zshall.1 xinstall -d ${destroot}${docdir} xinstall -m 0644 -W ${worksrcpath} ChangeLog FEATURES LICENCE NEWS README ${destroot}${docdir} if {[variant_isset doc] || [variant_isset examples]} { xinstall -d ${destroot}${docdir}/pdf } } post-install { ui_info "If you want MacPorts' ${my_name} as login shell, you should run:" ui_info "% sudo sh -c \"echo '${prefix}/bin/${my_name}' >> /etc/shells\"" ui_info "% chsh -s ${prefix}/bin/${my_name}" } platform darwin { # Dynamic loadable libraries' extension is `bundle` on Darwin configure.env-append DL_EXT=bundle } platform darwin 8 { configure.compiler gcc-4.0 post-configure { # poll(2) is broken on Darwin 8. reinplace "s|#define HAVE_POLL 1|#undef HAVE_POLL|" \ ${worksrcpath}/config.h } } variant mp_completion description {Install port(1) completion file} { post-destroot { set sitedir ${prefix}/share/${my_name}/site-functions xinstall -m 0644 ${filespath}/_port \ ${destroot}${sitedir} } } variant pcre description {Add regular expressions support in builtin functions through PCRE} { configure.args-append --enable-pcre depends_lib-append port:pcre } variant doc description {Install extra documentation} { distfiles-append [suffix ${distname}-doc] post-build { system "make -C ${worksrcpath}/Doc html info" } destroot.target-append install.html \ install.info } variant examples description {Install configuration examples} { distfiles-append ${love_distfile}:love extract.only-delete ${love_distfile} post-extract { system "tar xzf ${distpath}/${love_distfile} -C ${workpath}" } post-destroot { proc xinstall_dir {dir destdir} { xinstall -d ${destdir} foreach {file} [glob ${dir}/*] { if {[file isdirectory ${file}]} { xinstall_dir ${file} [file join ${destdir} [file tail ${file}]] } else { xinstall -m 0644 ${file} ${destdir} } } } xinstall -m 0644 ${worklovepath}/refcard.pdf ${destroot}${docdir}/pdf xinstall_dir ${worklovepath}/zsh_people ${destroot}${docdir}/examples } } livecheck.distname ${my_name}-dev