# -*- 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 106058 2013-05-14 02:51:09Z ryandesign@macports.org $

PortSystem              1.0
PortGroup               ruby 1.0

ruby.setup              RMagick 2.13.2 setup.rb {README.html examples} rubyforge:76735
revision                1
categories-append       graphics
platforms               darwin
maintainers             nomaintainer
license                 MIT

description             The Ruby interface to ImageMagick

long_description        RMagick is an interface between the Ruby programming \
                        language and the ImageMagick image processing library. It is \
                        fully featured and has good documentation.

use_bzip2               yes

checksums               rmd160  c4be179241f9e72b00ac9991bdfa4ea0c958362c \
                        sha256  a8c2df101549f74c66f687eceada6b703183234d7ce67dc84d85d16745a638e3

depends_lib-append      port:ImageMagick

pre-configure {
    foreach exe {wmf2eps gs} {
        if {[catch {set found [binaryInPath ${exe}]}] != 0} {
            ui_warn "${exe} is not installed, some RMagick examples will fail."
        } else {
            ui_info "${exe} found: ${found}"
        }
    }
}

configure.args          --doc-dir=${prefix}/share/doc/${name}/userguide \
                        --allow-example-errors
