# -*- 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 102914 2013-02-11 01:03:23Z jeremyhu@macports.org $

PortSystem      1.0

name            dos2unix
version         6.0.3
categories      textproc
platforms       darwin
maintainers     nomaintainer
license         BSD

description     Convert text between dos, unix, and mac formats

long_description ${description}

homepage        http://www.xs4all.nl/~waterlan/dos2unix.html
master_sites    sourceforge:project/dos2unix/dos2unix/${version} \
                http://www.xs4all.nl/~waterlan/dos2unix/

checksums       rmd160  c21dc47b7f1e4adb11705f884ac18a2ead018ad9 \
                sha256  f5268c5b28a1983537210c72b3fd43f4aad17a8dacb6727b615b56dca2ef9a04

depends_lib     port:gettext

use_configure   no

variant universal {}

configure.cflags-append ${configure.cppflags} [get_canonical_archflags cc]
configure.ldflags-append -lintl [get_canonical_archflags ld]

build.args      prefix=${prefix} \
                CC=${configure.cc} \
                CFLAGS_OS="[join ${configure.cflags}]" \
                LDFLAGS_EXTRA="[join ${configure.ldflags}]"

destroot.args   prefix=${prefix} \
                DOCDIR=${destroot}${prefix}/share/doc/${name}

livecheck.type  regex
livecheck.regex {Stable version: (\d+(?:\.\d+)*)}
