# -*- 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 92271 2012-04-23 16:45:06Z jmr@macports.org $

PortSystem              1.0

name                    fish
version                 1.23.1
revision                1
categories              shells
platforms               darwin
maintainers             nomaintainer
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://fishshell.com/
master_sites            ${homepage}files/${version}/
use_bzip2               yes

checksums               md5     ead6b7c6cdb21f35a3d4aa1d5fa596f1 \
                        sha1    3a6a5d0cfff348e5f9b1e7cd771865fd1dcd802e \
                        rmd160  820b7a57f31b98a6faf1520b356a06422891e787

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

depends_build           port:doxygen

depends_lib             port:libiconv \
                        port:ncurses \
                        port:gettext

configure.ccache        no

configure.args          --mandir=${prefix}/share/man \
                        --without-xsel
# ticket #29839
patchfiles              patch-fix-freeze.diff

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
}
