# -*- 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
maintainers {kencu @kencu} openmaintainer
description lightening fast realtime 3D game engine
long_description ${description}
homepage http://irrlicht.sourceforge.net/
set branch [join [lrange [split ${version} .] 0 1] .]
master_sites sourceforge:project/irrlicht/Irrlicht%20SDK/${branch}/${version}/
checksums sha256 f42b280bc608e545b820206fe2a999c55f290de5c7509a02bdbeeccc1bf9e433 \
rmd160 275eb79193a330b3924166e9cac8d74d37990256
# fix build on case-sensitive file systems
# can change this to a simple move command once base is updated
system "mv ${worksrcpath}/source/Irrlicht/MacOSX/irrFramework-Info.plist ${worksrcpath}/source/Irrlicht/MacOSX/IrrFramework-Info.plist"
# fix an errant typecast in one file, but not on 10.9
if {${os.platform} eq "darwin" && ${os.major} != 13 } {
patchfiles-append patch-irrlicht-cirrdevice.diff
# patch out test to exclude older zlib versions that fails on some mac systems like 10.6
patchfiles-append patch-pngpriv-zlib-test.diff
xcode.project ./source/Irrlicht/MacOSX/MacOSX.xcodeproj
xcode.configuration Release
xcode.destroot.type framework
xcode.target IrrFramework
# the xcode project does not install all the include files
set flist [glob ${worksrcpath}/include/*.h]
file copy -force $f ${destroot}${prefix}/Library/Frameworks/IrrFramework.framework/Versions/A/Headers
# add traditional paths for software that expects to find irrlicht in the headers & libs folders
ln -s ${prefix}/Library/Frameworks/IrrFramework.framework/Versions/A/Headers ${destroot}${prefix}/include/irrlicht
ln -s ${prefix}/Library/Frameworks/IrrFramework.framework/Versions/A/IrrFramework ${destroot}${prefix}/lib/libIrrlicht.dylib
xinstall -d ${destroot}${prefix}/share/${name}
copy ${worksrcpath}/doc ${destroot}${prefix}/share/${name}/
delete ${destroot}${prefix}/share/${name}/doc/docu