OSDN Git Service

My MacPorts
authorKazuki Sakamoto <sakamoto@splhack.org>
Fri, 5 Dec 2008 14:22:11 +0000 (23:22 +0900)
committerKazuki Sakamoto <sakamoto@splhack.org>
Fri, 5 Dec 2008 14:22:11 +0000 (23:22 +0900)
16 files changed:
aqua/iTerm/Portfile [new file with mode: 0644]
aqua/iTerm/files/patch-PTYSession.m [new file with mode: 0644]
aqua/iTerm/files/patch-PTYTextView.m [new file with mode: 0644]
devel/ctags/Portfile [new file with mode: 0644]
devel/ctags/files/patch-Makefile.in.diff [new file with mode: 0644]
devel/ctags/files/patch-ctags.1.diff [new file with mode: 0644]
devel/fmdiff/Portfile [new file with mode: 0644]
editors/vim/Portfile [new file with mode: 0644]
editors/vim/files/gdb [new file with mode: 0644]
editors/vim/files/patch-gdb.c [new file with mode: 0644]
editors/vim/files/patchlist [new file with mode: 0644]
editors/vim/files/serverlist [new file with mode: 0644]
shells/zsh-devel/Portfile [new file with mode: 0644]
shells/zsh-devel/files/_port [new file with mode: 0644]
shells/zsh-devel/files/patch-compat.c [new file with mode: 0644]
shells/zsh-devel/files/patch-zsh.h [new file with mode: 0644]

diff --git a/aqua/iTerm/Portfile b/aqua/iTerm/Portfile
new file mode 100644 (file)
index 0000000..09ad629
--- /dev/null
@@ -0,0 +1,39 @@
+# $Id: Portfile 28165 2007-08-23 10:37:08Z ryandesign@macports.org $
+
+PortSystem 1.0
+name           iTerm
+version                0.9.6
+revision       1201
+categories     aqua shells
+maintainers    waqar@macports.org
+description    Enhanced terminal emulator program for Mac OS X
+long_description       \
+       iTerm is a full featured terminal emulation program written     \
+       for OS X using Cocoa. We are aiming at providing users with     \
+       best command line experience under OS X. The letter i           \
+       represents a native Apple look and feel of the program          \
+       interface, and an emphasis on complete international support. 
+
+homepage       http://iterm.sourceforge.net
+platforms      macosx
+
+distfiles
+patchfiles-append patch-PTYSession.m patch-PTYTextView.m
+extract {
+       cd ${workpath}
+       system "cvs -d :pserver:anonymous@iterm.cvs.sourceforge.net:/cvsroot/iterm export -Dnow iTerm"
+}
+
+worksrcdir     ${name}
+use_configure  no
+
+build.type     pbx
+set configuration      Deployment
+build.target   -target ${name} -configuration ${configuration}
+build.args     build -project ${name}.xcodeproj
+
+destroot       {
+       xinstall -d -m 755 ${destroot}/Applications/MacPorts
+       file copy ${build.dir}/build/${configuration}/${name}.app \
+               ${destroot}/Applications/MacPorts/${name}.app
+}
diff --git a/aqua/iTerm/files/patch-PTYSession.m b/aqua/iTerm/files/patch-PTYSession.m
new file mode 100644 (file)
index 0000000..0779c8c
--- /dev/null
@@ -0,0 +1,11 @@
+--- PTYSession.m
++++ PTYSession.m
+@@ -245,7 +245,7 @@
+     if ([env objectForKey:COLORFGBG_ENVNAME] == nil && COLORFGBG_VALUE != nil)
+         [env setObject:COLORFGBG_VALUE forKey:COLORFGBG_ENVNAME];
+-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
++#if 0 //MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
+     NSString* locale = [self _getLocale];
+     if(locale != nil) {
+         [env setObject:locale forKey:@"LANG"];
diff --git a/aqua/iTerm/files/patch-PTYTextView.m b/aqua/iTerm/files/patch-PTYTextView.m
new file mode 100644 (file)
index 0000000..59a452c
--- /dev/null
@@ -0,0 +1,20 @@
+--- PTYTextView.m
++++ PTYTextView.m
+@@ -89,7 +89,7 @@
+     
+     [self setMarkedTextAttributes:
+         [NSDictionary dictionaryWithObjectsAndKeys:
+-            [NSColor yellowColor], NSBackgroundColorAttributeName,
++            [NSColor greenColor], NSBackgroundColorAttributeName,
+             [NSColor blackColor], NSForegroundColorAttributeName,
+             nafont, NSFontAttributeName,
+             [NSNumber numberWithInt:2],NSUnderlineStyleAttributeName,
+@@ -493,7 +493,7 @@
+     nafont=naFont;
+     [self setMarkedTextAttributes:
+         [NSDictionary dictionaryWithObjectsAndKeys:
+-            [NSColor yellowColor], NSBackgroundColorAttributeName,
++            [NSColor greenColor], NSBackgroundColorAttributeName,
+             [NSColor blackColor], NSForegroundColorAttributeName,
+             nafont, NSFontAttributeName,
+             [NSNumber numberWithInt:2],NSUnderlineStyleAttributeName,
diff --git a/devel/ctags/Portfile b/devel/ctags/Portfile
new file mode 100644 (file)
index 0000000..37aed94
--- /dev/null
@@ -0,0 +1,31 @@
+# $Id: Portfile 23082 2007-03-24 19:10:14Z pipping@macports.org $
+
+PortSystem 1.0
+name             ctags
+version          5.6j1
+revision         1
+categories       devel
+maintainers      nomaintainer@macports.org
+description      Reimplementation of ctags(1)
+long_description \
+       Exuberant Ctags generates an index (or tag) file of source language \
+       objects in source files that allows these items to be quickly and \
+       easily located by a text editor or other utility. \
+       Alternatively, it can generate a cross reference file which lists, \
+       in human-readable form, information about the various objects found \
+       in a set of source code files. \
+       Supported languages include: Assembler, AWK, ASP, BETA, Bourne/Korn/Zsh \
+       Shell, C, C++, COBOL, Eiffel, Fortran, Java, Lisp, Lua, Make, Pascal, Perl, \
+       PHP, Python, REXX, Ruby, S-Lang, Scheme, Tcl, Vim and Yacc.
+homepage         http://hp.vector.co.jp/authors/VA025040/ctags/
+platforms        darwin freebsd
+master_sites     http://hp.vector.co.jp/authors/VA025040/ctags/downloads/
+checksums        md5 801f533e5f25f74c13cbef6353c92e27
+patchfiles       patch-Makefile.in.diff \
+                 patch-ctags.1.diff
+configure.type   gnu
+configure.args   --enable-macro-patterns \
+                 --mandir=\\\${prefix}/share/man \
+                 --with-readlib
+
+destroot.destdir prefix=${destroot}${prefix}
diff --git a/devel/ctags/files/patch-Makefile.in.diff b/devel/ctags/files/patch-Makefile.in.diff
new file mode 100644 (file)
index 0000000..28712b9
--- /dev/null
@@ -0,0 +1,11 @@
+--- Makefile.in.orig   2006-06-06 08:24:24.000000000 +0900
++++ Makefile.in        2007-07-23 21:18:32.000000000 +0900
+@@ -6,7 +6,7 @@
+ # These are the names of the installed programs, in case you wish to change
+ # them.
+ #
+-CTAGS_PROG = ctags
++CTAGS_PROG = jexctags
+ ETAGS_PROG = etags
+ # Set this to the path to your shell (must run Bourne shell commands).
diff --git a/devel/ctags/files/patch-ctags.1.diff b/devel/ctags/files/patch-ctags.1.diff
new file mode 100644 (file)
index 0000000..bce7fc2
--- /dev/null
@@ -0,0 +1,26 @@
+--- ctags.1.orig       2006-06-12 12:47:51.000000000 +0900
++++ ctags.1    2007-07-23 21:20:36.000000000 +0900
+@@ -1,19 +1,19 @@
+-.TH CTAGS 1 "Version 5.6" "Darren Hiebert" "Exuberant Ctags"
++.TH JEXCTAGS 1 "Version 5.6" "Darren Hiebert" "Exuberant Ctags"
+ .SH "NAME"
+-ctags \- Generate tag files for source code
++jexctags \- Generate tag files for source code
+ .SH SYNOPSIS
+ .TP 6
+-\fBctags\fP [\fBoptions\fP] [\fIfile(s)\fP]
++\fBjexctags\fP [\fBoptions\fP] [\fIfile(s)\fP]
+ .TP 6
+ \fBetags\fP [\fBoptions\fP] [\fIfile(s)\fP]
+ .SH "DESCRIPTION"
+-The \fBctags\fP and \fBetags\fP programs (hereinafter collectively referred to
++The \fBjexctags\fP and \fBetags\fP programs (hereinafter collectively referred to
+ as \fBctags\fP, except where distinguished) generate an index (or "tag") file
+ for a variety of language objects found in \fIfile(s)\fP.
+ This tag file allows these items to be quickly and easily located by a text
diff --git a/devel/fmdiff/Portfile b/devel/fmdiff/Portfile
new file mode 100644 (file)
index 0000000..6e3cc4b
--- /dev/null
@@ -0,0 +1,32 @@
+# $Id$
+
+PortSystem 1.0
+name            fmdiff
+version         7554
+revision        0
+categories      devel
+maintainers     nomaintainer@macports.org
+description     Wrapper scripts for FileMerge
+long_description Apple's Developer Tools for Mac OS X include FileMerge, \
+    a graphical tool to compare and merge files. FileMerge can be much \
+    handier to use, unfortunately, it doesn't integrate with Subversion \
+    straightforwardly. It can be opened from the command line with \
+    the opendiff command, but its interface differs from that of diff \
+    and diff3. It returns immediately (i.e. it forks and does not block) \
+    and it expects different arguments. Some wrapper scripts are thus \
+    required to call FileMerge from Subversion.
+homepage        http://ssel.vub.ac.be/ssel/internal:fmdiff
+platforms       darwin
+
+fetch.type      svn
+svn.url         http://ssel.vub.ac.be/svn-gen/bdefrain/fmscripts/
+svn.tag         ${version}
+worksrcdir      fmscripts
+
+patch {
+    reinplace "s|DESTDIR=/usr/local|DESTDIR=${destroot}${prefix}|" ${worksrcpath}/Makefile
+}
+
+use_configure   no
+build {}
+destroot.destdir
diff --git a/editors/vim/Portfile b/editors/vim/Portfile
new file mode 100644 (file)
index 0000000..fa06a61
--- /dev/null
@@ -0,0 +1,152 @@
+# $Id: Portfile 42126 2008-11-15 23:33:08Z raimue@macports.org $
+
+PortSystem          1.0
+
+name                vim
+set vim_version     7.2
+set vim_patchlevel  042
+version             ${vim_version}.${vim_patchlevel}
+categories          editors
+maintainers         raimue
+description         Vi \"workalike\" with many additional features
+long_description \
+    Vim is an advanced text editor that seeks to provide the power of the   \
+    de-facto Unix editor 'Vi', with a more complete feature set.
+
+homepage            http://www.vim.org/
+platforms           darwin freebsd
+
+use_bzip2           yes
+
+distfiles \
+    [suffix ${name}-${vim_version}]:vim \
+    ${name}-${vim_version}-extra.tar.gz:extra \
+    ${name}-${vim_version}-lang.tar.gz:extra
+checksums \
+  [suffix ${name}-${vim_version}] \
+    md5     f0901284b338e448bfd79ccca0041254 \
+    sha1    a4b6641ca528fada71ea77c998a441495ed4984c \
+    rmd160  eaff64d0fec09d725addf8de569f508b80a5766e \
+  ${name}-${vim_version}-extra.tar.gz \
+    md5     35e04482f07c57221c9a751aaa3b8dac \
+    sha1    6a17629093e59958bff336b6c122dea1b8b1b649 \
+    rmd160  05976466c8a6c1bd2fb2b1d58eb4613947de07df \
+  ${name}-${vim_version}-lang.tar.gz \
+    md5     d8884786979e0e520c112faf2e176f05 \
+    sha1    970e0dda7e5b2308cf33488be1ea33d593d951cb \
+    rmd160  946bd64fbf030b341cc13bee7101f2c0acb26ce2
+
+distname            ${name}[strsed ${vim_version} {g/\.//}]
+dist_subdir         ${distname}
+
+depends_build       bin:gnutar:gnutar \
+                    bin:grep:grep
+depends_lib         port:ncurses \
+                    port:libiconv \
+                    port:ctags
+
+configure.args      --enable-gui=no \
+                    --without-x \
+                    --disable-gpm \
+                    --disable-nls \
+                    --mandir=${prefix}/share/man \
+                    --with-tlib=ncurses \
+                    --enable-multibyte
+
+extract.only        [suffix ${name}-${vim_version}]
+post-extract {
+    system "gnutar xvfz ${distpath}/${name}-${vim_version}-extra.tar.gz -C \
+      ${workpath}"
+    system "gnutar xvfz ${distpath}/${name}-${vim_version}-lang.tar.gz -C \
+      ${workpath}"
+}
+
+post-patch {
+       set features [open ${worksrcpath}/src/feature.h a+]
+       puts $features "#define SYS_VIMRC_FILE \"${prefix}/etc/vimrc\""
+       close $features
+}
+
+use_parallel_build  yes
+
+post-destroot {
+    ln -s ${prefix}/bin/vim ${destroot}${prefix}/bin/vi
+}
+
+test.run            yes
+
+variant athena description {Build GUI version using Athena widgets} conflicts gtk1 gtk2 motif {
+    configure.args-delete   --enable-gui=no --without-x
+    configure.args-append   --enable-gui=athena --with-x --disable-darwin
+    depends_lib-append      lib:libX11:XFree86
+}
+variant gtk1 description {Build GUI version using GTK 1.x widgets} conflicts athena gtk2 motif {
+    configure.args-delete   --enable-gui=no --without-x
+    configure.args-append   --enable-gui=gtk --with-x --disable-darwin
+    depends_lib-append      port:gtk1
+}
+variant gtk2 description {Build GUI version using GTK 2.x widgets} conflicts athena gtk1 motif {
+    configure.args-delete   --enable-gui=no --without-x
+    configure.args-append   --enable-gui=gtk2 --with-x --disable-darwin
+    depends_lib-append      port:gtk2
+}
+variant motif description {Build GUI version with Motif widgets} conflicts athena gtk1 gtk2 {
+    configure.args-delete   --enable-gui=no --without-x
+    configure.args-append   --enable-gui=motif --with-x --disable-darwin
+    depends_lib-append      port:openmotif
+}
+
+variant tiny description {Build tiny feature set} {
+    configure.args-append --with-features=tiny
+}
+variant small description {Build small feature set} conflicts tiny {
+    configure.args-append --with-features=small
+}
+variant big description {Build big feature set} conflicts tiny small   {
+    configure.args-append --with-features=big
+}
+variant huge description {Build huge feature set} conflicts tiny small big {
+    configure.args-append --with-features=huge
+}
+variant xim description {Build with support for X Input Method} {
+    configure.args-append --with-xim
+}
+
+variant perl description {Enable Perl scripting} {
+    configure.args-append   --enable-perlinterp
+    depends_lib-append      port:perl5.8
+}
+variant python description {Enable Python scripting} {
+    configure.args-append   --enable-pythoninterp
+    depends_lib-append      port:python25
+}
+variant ruby description {Enable Ruby scripting} {
+    configure.args-append   --enable-rubyinterp
+    depends_lib-append      port:ruby
+}
+variant tcl description {Enable Tcl scripting} {
+    configure.args-append   --enable-tclinterp
+    depends_lib-append      port:tcl
+}
+
+variant cscope description {Enable source code browsing with cscope} {
+    configure.args-append   --enable-cscope
+}
+
+variant nls {
+    configure.args-delete   --disable-nls
+    depends_lib-append      port:gettext
+}
+
+platform puredarwin {
+    configure.args-append --disable-darwin
+}
+
+include serverlist
+include patchlist
+
+livecheck.check regex
+livecheck.url   http://ftp.vim.org/pub/${name}/patches/${vim_version}/?O=D
+livecheck.regex (${vim_version}\.\\d+)
+
+include gdb
diff --git a/editors/vim/files/gdb b/editors/vim/files/gdb
new file mode 100644 (file)
index 0000000..caf9d5d
--- /dev/null
@@ -0,0 +1,25 @@
+set gdbdistfile        vimgdb72-1.14.tar.gz
+variant gdb description {Enable GDB integration} {
+       master_sites-append             sourceforge:clewn:gdb
+       distfiles-append                ${gdbdistfile}:gdb
+       checksums-append                ${gdbdistfile} md5 e406c64d29a3152a3f5d0fffe3d2bba8
+       configure.args-append   --enable-gdb
+       patchfiles-append       patch-gdb.c
+       post-extract {
+               system "gnutar xvfz ${distpath}/${gdbdistfile} -C ${workpath}"
+       }
+       pre-patch {
+               system "patch -d ${worksrcpath} -p0 < \
+                       ${workpath}/vimgdb/${distname}.diff"
+       }
+       post-destroot {
+               system "gnutar xvfz ${workpath}/vimgdb/vimgdb_runtime.tgz \
+                       -C ${destroot}${prefix}/share/vim/${distname}"
+               system "${destroot}${prefix}/bin/vim \
+                       --cmd \"helptag ${destroot}${prefix}/share/vim/${distname}/doc\" \
+                       --cmd exit"
+       }
+}
+
+variant my {}
+if { [variant_isset my] } { default_variants +cscope +gdb +huge +ruby }
diff --git a/editors/vim/files/patch-gdb.c b/editors/vim/files/patch-gdb.c
new file mode 100644 (file)
index 0000000..8b9fb5d
--- /dev/null
@@ -0,0 +1,29 @@
+--- src/gdb.c.orig
++++ src/gdb.c
+@@ -1605,7 +1605,7 @@
+     if (this->buf == NULL)
+     {
+       p_mm = MAXMEM;  /* buffer max virtual memory */
+-      (void)do_ecmd(0, name, NULL, NULL, ECMD_ONE, ECMD_HIDE);
++      (void)do_ecmd(0, name, NULL, NULL, ECMD_ONE, ECMD_HIDE, NULL);
+       p_mm = s_mm;
+       vim_free(name);                 /* free name with vim_free */
+@@ -1665,7 +1665,7 @@
+     if (win_split(0, WSP_BOT) == OK)
+     {
+       /* create the asm buffer empty */
+-      (void)do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE);
++      (void)do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE, NULL);
+       gdb_as_setname(name);
+ # ifdef FEAT_AUTOCMD
+       /* allow autocommands for loading syntax */
+@@ -1972,7 +1972,7 @@
+       }
+       (void)do_ecmd(0, fpn, NULL, NULL, lnum,
+-                    (P_HID(curbuf) ? ECMD_HIDE : 0) + ECMD_OLDBUF);
++                    (P_HID(curbuf) ? ECMD_HIDE : 0) + ECMD_OLDBUF, NULL);
+     }
+     else if (buf != curbuf)
+       set_curbuf(buf, DOBUF_GOTO);
diff --git a/editors/vim/files/patchlist b/editors/vim/files/patchlist
new file mode 100644 (file)
index 0000000..e42cfef
--- /dev/null
@@ -0,0 +1,61 @@
+eval {
+  set low 1
+  set patchlevel [string trimleft $vim_patchlevel 0]
+  set files {}
+
+  while {$low <= $patchlevel} {
+    set high [expr $low + 99];
+    if {$high < $patchlevel} {
+      patchfiles-append [format "%s.%03d-%03d.gz" $vim_version $low $high]
+      incr low 100
+    } else {
+      patchfiles-append [format "%s.%03d" $vim_version $low]
+      incr low 1
+    }
+  }
+}
+
+checksums-append \
+  7.2.001 md5 7c2dc4a956cf315e546e347bc349968c \
+  7.2.002 md5 7f16f80814f1e071a689806c2056b39d \
+  7.2.003 md5 0de916fdfd450a4a0d95bed44ae2c398 \
+  7.2.004 md5 25cc99ad42b25b16a4610e2fad9cdab4 \
+  7.2.005 md5 a5b7b1c7c5b75aa7d730b0b9aa491558 \
+  7.2.006 md5 a93a72cd40c37da91dc634dc8dddefec \
+  7.2.007 md5 c2b2b63dea27ddad92668e63797406c5 \
+  7.2.008 md5 e65c8c2223eea5289d8cbef2e867a5de \
+  7.2.009 md5 ab1566b69bd0e0c82a866f00675ffe0e \
+  7.2.010 md5 d69f559bfb5436c157e8069a829ca50d \
+  7.2.011 md5 05334a6bb31402bfd49d82ea6f59a57b \
+  7.2.012 md5 a11dcd5552f36544a9e27978b5359935 \
+  7.2.013 md5 8bc70978291aadea9c82072b623c955d \
+  7.2.014 md5 a87826187cb77ad2e567a40c1609eea4 \
+  7.2.015 md5 47a466fbfdbca616f519fc4afa0432df \
+  7.2.016 md5 fd08bac73d7ffcabf53bd25a63dff893 \
+  7.2.017 md5 0f0284d87f6f52101802dbe1a45d54c3 \
+  7.2.018 md5 38d06ba325b716c1177c1012d781bada \
+  7.2.019 md5 661ca021fb70c24ef4df229512cfb14b \
+  7.2.020 md5 cb2c5ca0f9a9718fb635874925432dd8 \
+  7.2.021 md5 9073d2311ae7101c143237a45afb4efa \
+  7.2.022 md5 48ccb0deec77a3bb91bf967dacb43492 \
+  7.2.023 md5 d77ed8aa4de30d4dbd17a7998ae8f269 \
+  7.2.024 md5 cf983237e5e866ef459870fee2754bac \
+  7.2.025 md5 ab32defa4b2cfb509ccb34d4858b1223 \
+  7.2.026 md5 5e96c227c7765b1e0f03f44cb5b750f6 \
+  7.2.027 md5 f26b7ee0f271eacbb3652dbdf92dd860 \
+  7.2.028 md5 fc54a3d35bdc7b7a7660c6d2274f7b74 \
+  7.2.029 md5 d53630dc8f3a823f54dfba73dcd47b36 \
+  7.2.030 md5 208f8ed2db2665ebfc17674f78d47c6d \
+  7.2.031 md5 3387583af86faa78e10be979214071f3 \
+  7.2.032 md5 eca017686205ec8658bf9fa8c73f7af6 \
+  7.2.033 md5 88c91b84ffc772fd57f86475f7ba90f1 \
+  7.2.034 md5 c3d6eaaa0b74df423f90afaaafa3a0de \
+  7.2.035 md5 f4c35dae581d671dc271407d377f7199 \
+  7.2.036 md5 0ae8b6ed636fc013e2fa6bdabc182041 \
+  7.2.037 md5 1c6501c366cc8df205955f3e4d3ebba9 \
+  7.2.038 md5 ed3479ddb4ded7b74c82af5e50b0e4a6 \
+  7.2.039 md5 2a61f28f6f793c5a43abded6e59b6506 \
+  7.2.040 md5 4c493255ae227498016f30a0002ec1cc \
+  7.2.041 md5 66bde35426c09d9c666e23215f9a19c9 \
+  7.2.042 md5 99baedef8a9c908774b7ed74deacf184
+
diff --git a/editors/vim/files/serverlist b/editors/vim/files/serverlist
new file mode 100644 (file)
index 0000000..35c00ba
--- /dev/null
@@ -0,0 +1,10 @@
+set serverList {
+  http://ftp.vim.org/pub/vim/
+}
+
+# create list of locations for source, extras, patches from serverList
+foreach server ${serverList} {
+  master_sites-append ${server}unix/:vim
+  master_sites-append ${server}extra/:extra
+  patch_sites-append  ${server}patches/${vim_version}
+}
diff --git a/shells/zsh-devel/Portfile b/shells/zsh-devel/Portfile
new file mode 100644 (file)
index 0000000..9724751
--- /dev/null
@@ -0,0 +1,160 @@
+# -*- 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
+# $Id: Portfile 41457 2008-11-03 21:06:35Z nox@macports.org $
+
+PortSystem      1.0
+
+name            zsh-devel
+set my_name     [strsed ${name} {s/-.*//}]
+version         4.3.9
+revision        1
+categories      shells
+platforms       darwin
+maintainers     nox openmaintainer
+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.8.1
+set love_distfile   ${love_distname}.tar.gz
+set worklovedir     zsh-lovers
+set worklovepath    ${workpath}/${worklovedir}
+
+checksums       zsh-4.3.9.tar.bz2 \
+                md5     0539d0a590e545ad8c40ff8c97e94538 \
+                sha1    7c80e1ad6b311ee5877172a1a7e0161a9a60da70 \
+                rmd160  2c88347fa357e3624f000721963749c6ccb4e129 \
+                zsh-4.3.9-doc.tar.bz2 \
+                md5     b3a026cf02471b66454a2b241a4d92a4 \
+                sha1    456a696de365066b32161d194de9c7643dbeb7a0 \
+                rmd160  c7080f41901bd4b6d0b8e9f9385fd57a9d73a383 \
+                zsh-lovers_0.8.1.tar.gz \
+                md5     7383f4918aa18c04218ec424fe15df99 \
+                sha1    4b5b839748063f61ccdf6fc996c100e54be4b551 \
+                rmd160  76e4ca78fa41af3c779c553298413334c0a6a7c5
+
+depends_lib     port:libiconv \
+                port:ncursesw
+
+configure.args  --mandir=${prefix}/share/man \
+                --infodir=${prefix}/share/info \
+                --with-curses-terminfo \
+                --enable-multibyte \
+                --enable-etcdir=${prefix}/etc
+
+configure.env   DL_EXT=bundle
+
+use_parallel_build  yes
+
+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 8 {
+    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 "${build.cmd} -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
+    }
+}
+
+variant cjk description {Add East Asian Ambiguous characters support} {
+    patchfiles-append   patch-compat.c patch-zsh.h
+}
+
+livecheck.distname  ${my_name}-dev
diff --git a/shells/zsh-devel/files/_port b/shells/zsh-devel/files/_port
new file mode 100644 (file)
index 0000000..06d7fb4
--- /dev/null
@@ -0,0 +1,89 @@
+#compdef port
+
+local subcmds 
+
+# we cache the list of ports
+# we shall use some cache policy to avoid problems with new ports
+if (( ! $+portlist )); then
+       portlist=($(port echo all; echo "all current active inactive installed uninstalled outdated"))
+fi
+
+subcmds=(
+'activate'
+'archive'
+'build'
+'cat'
+'clean'
+'configure'
+'contents'
+'deactivate'
+'dependents'
+'deps'
+'destroot'
+'dir'
+'distcheck'
+'distclean'
+'dmg'
+'echo'
+'edit'
+'extract'
+'fetch'
+'file'
+'help'
+'info'
+'install' 
+'installed' 
+'list'
+'livecheck'
+'location'
+'mpkg'
+'outdated'
+'patch'
+'pkg'
+'provides'
+'rpmpackage'
+'search'
+'selfupdate'
+'sync'
+'test'
+'unarchive'
+'uninstall'
+'upgrade' 
+'variants'
+'version'
+)
+
+_arguments -C \
+'-v[verbose mode (generate verbose messages)]' \
+'-d[debug mode (generate debugging messages)]' \
+'-q[quiet mode (suppress messages)]' \
+'-D[specify portdir]' \
+'-k[keep mode (do not autoclean after install)]' \
+'-n[dont follow dependencies in upgrade (only for upgrading)]' \
+'-a[upgrade all installed ports (only for upgrading)]' \
+'-u[uninstall non-active ports when upgrading and uninstalling]' \
+'-f[force mode (ignore state file)]' \
+'-s[source-only mode]' \
+'-b[binary-only mode]' \
+'-o[honor state files older than Portfile]' \
+'*::command:->command' \
+&& return 0
+
+case $state in
+       command)
+       if ((CURRENT == 1)); then
+               state=subcommands
+       else
+               state=portname
+       fi
+       ;;
+esac
+
+case $state in
+       subcommands)
+       _describe -t commands 'port commands' subcmds
+       ;;
+       portname)
+       _describe -t commands 'available ports' portlist
+       ;;
+esac
diff --git a/shells/zsh-devel/files/patch-compat.c b/shells/zsh-devel/files/patch-compat.c
new file mode 100644 (file)
index 0000000..33967ae
--- /dev/null
@@ -0,0 +1,18 @@
+--- Src/compat.c.orig
++++ Src/compat.c
+@@ -777,6 +777,7 @@
+   return width;
+ }
++#endif /* 0 */
+ /*
+@@ -856,6 +857,7 @@
+ }
++#if 0
+ int mk_wcswidth_cjk(const wchar_t *pwcs, size_t n)
+ {
+   int w, width = 0;
diff --git a/shells/zsh-devel/files/patch-zsh.h b/shells/zsh-devel/files/patch-zsh.h
new file mode 100644 (file)
index 0000000..24d093e
--- /dev/null
@@ -0,0 +1,11 @@
+--- Src/zsh.h.orig
++++ Src/zsh.h
+@@ -2464,7 +2464,7 @@
+ #define MB_METASTRLEN2(str, widthp)   mb_metastrlen(str, widthp)
+ #ifdef BROKEN_WCWIDTH
+-#define WCWIDTH(wc)   mk_wcwidth(wc)
++#define WCWIDTH(wc)   mk_wcwidth_cjk(wc)
+ #else
+ #define WCWIDTH(wc)   wcwidth(wc)
+ #endif