# -*- 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
PortSystem 1.0
PortGroup github 1.0
PortGroup muniversal 1.0
github.setup POV-Ray povray 3.7.0.0 v
revision 5
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 <https://www.macports.org/>"
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