# $Id: Portfile,v 1.2 2006/05/03 23:40:25 yves Exp $

PortSystem  1.0
PortGroup   gnustep 1.0

name        gnustep-gui
version     0.10.3
revision    1
platforms   darwin
maintainers yves@opendarwin.org

description  A library of graphical user interface Objective C classes
long_description \
    The GNUstep gui library is a library of graphical user interface classes \
    written completely in the Objective-C language. The classes are based \
    upon the OpenStep specification as release by NeXT Software, Inc.  These \
    classes include graphical objects such as buttons, text fields, popup \
    lists, browser lists, and windows. There are also many associated \
    classes for handling events, colors, fonts, pasteboards and images.

checksums     md5 ce015fcf9c6ff421e723811275f5a5c6
depends_lib   port:aspell port:audiofile port:gnustep-base port:gnutls \
              port:jpeg port:libpng port:libungif port:tiff
use_configure   yes
configure.args-append \
                --with-jpeg-library=${prefix}/lib \
                --with-jpeg-include=${prefix}/include

platform darwin {
    pre-patch {
        set fl [open "| otool -l ${prefix}/lib/libaspell.dylib | grep libintl"]
        set data [read $fl]
	    if { ! [catch {close $fl} err]} {
	        patchfiles-append patch-configure
	        ui_msg "\n\n\
	            **** WARNING ****\n\n\
	            Spell checking support is disabled\
	            because of a runtime bug.  \n\
	            If you want ro enable it,\
	            aspell must be configured with '--disable-nls'\n\n"
	    }
    }
    array set gnustep.post_flags {
        TextConverters/RTF "-lgnustep-gui"
    }
    depends_lib-delete      port:audiofile
    configure.args-append   --disable-gsnd
}
