# -*- 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 85273 2011-10-12 07:01:02Z jmr@macports.org $

PortSystem 1.0

name		orbit
version		0.5.17
revision	4
set branch      [join [lrange [split ${version} .] 0 1] .]
categories	devel
license		{GPL-2+ LGPL}
maintainers	nomaintainer
description 	High-performance CORBA ORB with C lang support
long_description    \
    ORBit is a high-performance CORBA ORB with support for the C \
    language. It allows programs to send requests and receive replies \
    from other programs, regardless of the locations of the two \
    programs.
homepage    	http://orbit-resource.sourceforge.net/
platforms	darwin
master_sites    gnome:sources/ORBit/${branch}/
checksums	md5 35acc6f8d49d930b566104fcceb893d3
distname    	ORBit-${version}
use_bzip2	yes
depends_lib 	port:glib1 port:gettext

patchfiles	patch-configure patch-m4-underquoted

post-patch {
    fs-traverse item ${worksrcpath} {
        if {"Makefile.in" == [file tail ${item}]} {
            reinplace -E {/--mode=/s|(\$\(CC(LD)?\))|"\1"|g} ${item}
        }
    }
}

configure.args	\
    	LDFLAGS="-L${prefix}/lib" \
	CPPFLAGS="-I${prefix}/include -DHAVE_LIMITED_WRITEV \
	    	-DMAX_LIMITED_IOVECS=1024" \
	CFLAGS="-O3 -fstrict-aliasing -funroll-loops" \
	--infodir=${prefix}/share/info

livecheck.type  regex
livecheck.url   http://ftp.gnome.org/pub/gnome/sources/ORBit/${branch}/
livecheck.regex {LATEST-IS-(\d+(?:\.\d+)*)}

# port:glib1 is not universal
universal_variant  no
