# -*- 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$ PortSystem 1.0 PortGroup github 1.0 PortGroup muniversal 1.0 github.setup POV-Ray povray 3.7.0.0 v revision 2 set branch [join [lrange [split ${version} .] 0 1] .] categories graphics platforms darwin license AGPL-3 maintainers nomaintainer description Persistence Of Vision RAYtracer long_description POVRAY is a 'free' and popular Ray Tracer available for \ many platforms (including UNIX). This is a port of the \ UNIX version, not the graphical Mac OS X version. homepage http://www.povray.org/ checksums rmd160 e60baea42f8041b4647bc874021e2ff1f9c3300d \ sha256 33335f90394d3a3e2e108a69ac367ec7a75b2699ea48bb59fa197be5c22f4810 depends_build port:autoconf \ port:automake \ port:pkgconfig depends_lib port:boost \ port:openexr \ port:xorg-libsm \ port:xpm \ port:libpng \ port:libsdl \ port:jpeg \ port:zlib \ port:tiff post-patch { fs-traverse item ${worksrcpath} { if {[file isfile ${item}]} { switch [file extension ${item}] { .cpp - .h - .hpp { # Replace shared_ptr with boost::shared_ptr. # https://github.com/POV-Ray/povray/issues/8 reinplace -locale en_US.ISO8859-1 -E {/^[ ]*\/\//! s%([ (]|^)(shared_ptr)%\1boost::\2%g} ${item} } } } } } pre-configure { # There is no pre-generated configure script included in the download. # https://github.com/POV-Ray/povray/issues/1 system -W ${worksrcpath}/unix "./prebuild.sh" } configure.env COMPILED_BY="MacPorts " configure.libs -lboost_system-mt -lboost_thread-mt configure.args --with-boost=${prefix} \ --with-boost-thread \ --with-libjpeg=${prefix}/lib \ --with-libpng=${prefix}/lib \ --with-libsdl=${prefix}/lib \ --with-libtiff=${prefix}/lib \ --with-openexr=${prefix}/lib \ --with-zlib=${prefix}/lib set conf_files {povray.conf povray.ini} post-destroot { foreach f ${conf_files} { move ${destroot}${prefix}/etc/povray/${branch}/${f} \ ${destroot}${prefix}/etc/povray/${branch}/${f}.sample } } post-activate { foreach f ${conf_files} { if {![file exists ${prefix}/etc/povray/${branch}/${f}]} { copy ${prefix}/etc/povray/${branch}/${f}.sample \ ${prefix}/etc/povray/${branch}/${f} } } } test.run yes test.target check # Unable to cross compile, so we need to be able to run the built code if {${os.arch} eq "i386" && ${os.major} >= 11} { supported_archs i386 x86_64 set universal_archs_supported {i386 x86_64} } elseif {${os.arch} eq "i386" && ${configure.build_arch} eq "x86_64"} { supported_archs i386 x86_64 ppc set universal_archs_supported {i386 x86_64 ppc} } elseif {${os.arch} eq "i386"} { supported_archs i386 ppc set universal_archs_supported {i386 ppc} } elseif {${configure.build_arch} eq "ppc64"} { supported_archs ppc ppc64 set universal_archs_supported {ppc ppc64} } else { supported_archs ${configure.build_arch} set universal_archs_supported ${configure.build_arch} } platform darwin { patchfiles-append patch-unix-configure.ac.diff \ patch-unix-prebuild.sh.diff \ patch-lseek64.diff \ patch-vfe-uint.diff if {${os.major} <= 10} { depends_build depends_lib pre-fetch { ui_error "${name} @${version} does not build on Mac OS X 10.6 Snow Leopard or earlier." return -code error "unsupported Mac OS X version" } } set merger_host(x86_64) x86_64-apple-${os.platform}${os.major} set merger_host(i386) i686-apple-${os.platform}${os.major} set merger_host(ppc64) powerpc64-apple-${os.platform}${os.major} set merger_host(ppc) powerpc-apple-${os.platform}${os.major} foreach arch ${configure.universal_archs} { set merger_configure_args(${arch}) --build=$merger_host(${arch}) } if {![variant_isset universal] && [info exists merger_configure_args(${configure.build_arch})]} { configure.args-append --host=$merger_host(${configure.build_arch}) $merger_configure_args(${configure.build_arch}) } }