# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 107638 2013-07-03 15:19:01Z and.damore@macports.org $

PortSystem              1.0

name                    fish
license                 GPL-2
version                 2.0.0
revision                1
categories              shells
platforms               darwin
maintainers             nomaintainer

description             A command line shell for the 90s 
long_description        fish is a smart and user-friendly command line shell for OS X, Linux, and the rest of the family 

homepage                http://fishshell.com/

master_sites            ${homepage}files/${version}/
worksrcdir              fish
checksums               md5     fe5907e6af61607d4128ce891a1f6501 \
                        sha1    2d28553e2ff975f8e5fed6b266f7a940493b6636 \
                        rmd160  23848c1e577abb6893d253c1253fee98a53f0c74

depends_build           port:doxygen \
                        path:bin/dot:graphviz
depends_lib             port:libiconv \
                        port:ncurses \
                        port:gettext

use_autoconf            yes

# MEMO: patchfile patch-proc_c.diff could be still needed
patchfiles          patch-share_config_fish.diff

post-patch {
    reinplace "s|@@PREFIX@@|${prefix}/bin|g"     "${worksrcpath}/share/config.fish"
}

notes "
To set MacPorts' ${name} as default login shell, run:

    sudo chpass -s ${prefix}/bin/${name} \${USER}

To be able to switch default shells to or from ${name} without superuser\
privileges, add it to /etc/shells:

    sudo sh -c 'echo ${prefix}/bin/${name} >> /etc/shells'

For X clipboard integration, install the xsel port:

    sudo port install xsel
"

livecheck.type          regex
livecheck.regex         fish-(.*?).tar.gz
