# $Id: Portfile 100561 2012-12-15 15:27:57Z landonf@macports.org $

PortSystem  1.0
PortGroup   xcode 1.0

name		class-dump
version		3.4
license		GPL-2
categories	devel
maintainers	nomaintainer
description	Utility for examining the Objective-C segment of Mach-O files.
long_description	\
	It generates declarations for the classes, categories and 	\
	protocols. This is the same information provided by using 	\
	'otool -ov', but presented as normal Objective-C declarations.

homepage	http://www.codethecode.com/projects/class-dump/
master_sites	http://www.codethecode.com/download/
use_bzip2		yes

checksums           sha1    bc6d9542af201028ae980b9d0497b491ce98227f \
                    rmd160  de5188f5c7a885d7d262475812990a26d75a7f3a

worksrcdir	${distname}/src

# 3.4+ must be built against the 10.8 SDK, as it requires LC_* constants
# and other definitions unavailable in earlier SDKs. It will, however,
# run against 10.7+.
configure.sdkroot "$developer_dir/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk"
xcode.target    all

xcode.configuration Release
xcode.destroot.path ${prefix}/bin

if {${os.major} < 11} {
    pre-fetch {
        return -code error "$name requires Mac OS X 10.7 or later."
    }
}

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

livecheck.type  regex
livecheck.url   ${homepage}changes/
livecheck.regex {Version (\d+(?:\.\d+)*) -}
