# -*- 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 78871 2011-05-24 22:08:39Z ryandesign@macports.org $

PortSystem          1.0

name                dylibbundler
version             0.3.1
categories          devel
platforms           darwin
maintainers         strasweb.fr:rudloff openmaintainer
license             GPL-2+

description         terminal utility for Mac OS X that eases bundling dynamic \
                    libraries (.dylib) inside app bundles

long_description    ${name} is a small command-line programs that aims to \
                    make bundling .dylibs as easy as possible. It \
                    automatically determines which dylibs are needed by your \
                    program, copies these libraries inside the app bundle, \
                    and fixes both them and the executable to be ready for \
                    distribution, all this with a single command. It will \
                    also work if your program uses plug-ins that have \
                    dependencies too.

homepage            http://macdylibbundler.sourceforge.net/
master_sites        sourceforge:macdylibbundler

checksums           sha1    c3126a057b527f33f92f6c258715534c6e52ce26 \
                    rmd160  2792088a4e605f7c8e362fb374ce1ca95c75a09c

distname            ${name}${version}
use_zip             yes
worksrcdir          ${name}

patchfiles          patch-makefile.diff

use_configure       no

variant universal {}
if {[variant_isset universal]} {
    set archflags ${configure.universal_cflags}
} else {
    set archflags ${configure.cc_archflags}
}

build.args          CXX="${configure.cxx} ${archflags}"

destroot.args       PREFIX=${prefix}

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/${name}
    xinstall -d ${docdir}
    xinstall -m 644 ${worksrcpath}/help.html ${docdir}
}
