# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*-

PortSystem          1.0

name                gnat-booch95
version             20090629
revision            1
platforms           darwin
categories          devel
license             GPL-2
maintainers         nomaintainer

description         The Ada 95 Booch Components
long_description    The Ada 95 Booch Components

homepage            http://booch95.sourceforge.net/index.html
master_sites        sourceforge:gnuada

distfiles           bc-${version}.7z
worksrcdir          bc-${version}

checksums           md5     3e5c7443db6e5beb7cdfe3706c9d9226 \
                    sha1    1fa7d43d59232375b03bc21a3fbbb6a873b8e22d \
                    rmd160  5d61b3784ca1e3744acd8297946d299fd8bebfe2

use_7z              yes
use_parallel_build  yes
use_configure       no

depends_build       port:p7zip
depends_lib         port:gnat-gcc

build {
    system "
    pushd ${workpath}/${worksrcdir}/GNAT;
    gnumake release;
    gnumake debug;
    popd;
    "
}

destroot {
    xinstall -m 775 -d ${destroot}${prefix}/lib/booch
    xinstall -m 775 -d ${destroot}${prefix}/include/booch/src
    xinstall -m 775 -d ${destroot}${prefix}/include/booch/GNAT
    xinstall -m 775 -d ${destroot}${prefix}/include/booch/GNAT/Darwin-i686-Release
    xinstall -m 775 -d ${destroot}${prefix}/include/booch/GNAT/Darwin-i686-Release/obj
    xinstall -m 775 -d ${destroot}${prefix}/include/booch/GNAT/Darwin-i686-Release/lib
    xinstall -m 775 -d ${destroot}${prefix}/include/booch/GNAT/Darwin-i686-Debug
    xinstall -m 775 -d ${destroot}${prefix}/include/booch/GNAT/Darwin-i686-Debug/obj
    xinstall -m 775 -d ${destroot}${prefix}/include/booch/GNAT/Darwin-i686-Debug/lib

    xinstall -m 664 {*}[glob ${workpath}/${worksrcdir}/GNAT/Darwin-i686-Release/lib/*]    ${destroot}${prefix}/lib/booch
    xinstall -m 664 {*}[glob ${workpath}/${worksrcdir}/src/*]                 ${destroot}${prefix}/include/booch/src
    xinstall -m 664 {*}[glob ${workpath}/${worksrcdir}/GNAT/Makefile]             ${destroot}${prefix}/include/booch/GNAT
    xinstall -m 664 {*}[glob ${workpath}/${worksrcdir}/GNAT/booch_95.gpr]         ${destroot}${prefix}/include/booch/GNAT
    xinstall -m 664 {*}[glob ${workpath}/${worksrcdir}/GNAT/Darwin-i686-Release/obj/*]    ${destroot}${prefix}/include/booch/GNAT/Darwin-i686-Release/obj
    xinstall -m 664 {*}[glob ${workpath}/${worksrcdir}/GNAT/Darwin-i686-Release/lib/*]    ${destroot}${prefix}/include/booch/GNAT/Darwin-i686-Release/lib
    xinstall -m 664 {*}[glob ${workpath}/${worksrcdir}/GNAT/Darwin-i686-Debug/obj/*]      ${destroot}${prefix}/include/booch/GNAT/Darwin-i686-Debug/obj
    xinstall -m 664 {*}[glob ${workpath}/${worksrcdir}/GNAT/Darwin-i686-Debug/lib/*]      ${destroot}${prefix}/include/booch/GNAT/Darwin-i686-Debug/lib
}

# vim: set nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab :
# vim: set textwidth=0 filetype=tcl foldmethod=marker nospell :
