# $Id: Portfile 60375 2009-11-10 12:14:00Z jmr@macports.org $

PortSystem 1.0

name                    fish
version                 1.23.1
categories              shells
platforms               darwin
maintainers             eridius openmaintainer
description             user friendly command line shell for UNIX-like operating systems
long_description        fish is a user friendly command line shell for UNIX-like \
                        operating systems like Darwin.

homepage                http://www.fishshell.org/
master_sites            http://www.fishshell.org/files/${version}/
checksums               md5     ead6b7c6cdb21f35a3d4aa1d5fa596f1 \
                        sha1    3a6a5d0cfff348e5f9b1e7cd771865fd1dcd802e \
                        rmd160  820b7a57f31b98a6faf1520b356a06422891e787
use_bzip2               yes

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

depends_build   bin:doxygen:doxygen
depends_lib     lib:libiconv:libiconv lib:libncurses:ncurses lib:libintl:gettext

configure.ccache no

configure.args  --mandir=${prefix}/share/man --without-xsel

platform darwin {
    # there's something wonky about the libiconv headers installed by
    # macports that prevents autoconf from detecting libiconv, so i
    # have to fake it. See
    # <http://permalink.gmane.org/gmane.comp.shells.fish.user/1217>
    # for details.
    patchfiles-append   patch-configure.ac.diff
    use_autoconf        yes
    post-configure {
        reinplace "s|LDFLAGS = |LDFLAGS= -liconv |g" "${worksrcpath}/Makefile"
    }
}

variant xsel description "enable xsel support, only appropriate for use within X11" {
    configure.args-delete --without-xsel
}
