source: trunk/dports/graphics/povray/Portfile

Last change on this file was 148894, checked in by mcalhoun@…, 18 months ago

openexr, ilmbase: update version to 2.2.0
revbump dependencies since library name changes
homepage states that new features "should be available to applications without code modifications"
merge openexr and ilmbase into one Portfile since versions now seem linked
fixes #44620, #44619, #49965, and #49966; maintainer timeout

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.8 KB
Line 
1# -*- 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
2# $Id: Portfile 148894 2016-05-22 14:26:15Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           github 1.0
6PortGroup           muniversal 1.0
7
8github.setup        POV-Ray povray 3.7.0.0 v
9revision            2
10set branch          [join [lrange [split ${version} .] 0 1] .]
11categories          graphics
12platforms           darwin
13license             AGPL-3
14maintainers         nomaintainer
15
16description         Persistence Of Vision RAYtracer
17
18long_description    POVRAY is a 'free' and popular Ray Tracer available for \
19                    many platforms (including UNIX). This is a port of the \
20                    UNIX version, not the graphical Mac OS X version.
21
22homepage            http://www.povray.org/
23
24checksums           rmd160  e60baea42f8041b4647bc874021e2ff1f9c3300d \
25                    sha256  33335f90394d3a3e2e108a69ac367ec7a75b2699ea48bb59fa197be5c22f4810
26
27depends_build       port:autoconf \
28                    port:automake \
29                    port:pkgconfig
30
31depends_lib         port:boost \
32                    port:openexr \
33                    port:xorg-libsm \
34                    port:xpm \
35                    port:libpng \
36                    port:libsdl \
37                    port:jpeg \
38                    port:zlib \
39                    port:tiff
40
41post-patch {
42    fs-traverse item ${worksrcpath} {
43        if {[file isfile ${item}]} {
44            switch [file extension ${item}] {
45                .cpp -
46                .h -
47                .hpp {
48                    # Replace shared_ptr with boost::shared_ptr.
49                    # https://github.com/POV-Ray/povray/issues/8
50                    reinplace -locale en_US.ISO8859-1 -E {/^[   ]*\/\//! s%([   (]|^)(shared_ptr)%\1boost::\2%g} ${item}
51                }
52            }
53        }
54    }
55}
56
57pre-configure {
58    # There is no pre-generated configure script included in the download.
59    # https://github.com/POV-Ray/povray/issues/1
60    system -W ${worksrcpath}/unix "./prebuild.sh"
61}
62
63configure.env       COMPILED_BY="MacPorts <https://www.macports.org/>"
64configure.libs      -lboost_system-mt -lboost_thread-mt
65configure.args      --with-boost=${prefix} \
66                    --with-boost-thread \
67                    --with-libjpeg=${prefix}/lib \
68                    --with-libpng=${prefix}/lib \
69                    --with-libsdl=${prefix}/lib \
70                    --with-libtiff=${prefix}/lib \
71                    --with-openexr=${prefix}/lib \
72                    --with-zlib=${prefix}/lib
73
74set conf_files      {povray.conf povray.ini}
75
76post-destroot {
77    foreach f ${conf_files} {
78        move ${destroot}${prefix}/etc/povray/${branch}/${f} \
79             ${destroot}${prefix}/etc/povray/${branch}/${f}.sample
80    }
81}
82
83post-activate {
84    foreach f ${conf_files} {
85        if {![file exists ${prefix}/etc/povray/${branch}/${f}]} {
86            copy ${prefix}/etc/povray/${branch}/${f}.sample \
87                 ${prefix}/etc/povray/${branch}/${f}
88        }
89    }
90}
91
92test.run            yes
93test.target         check
94
95# Unable to cross compile, so we need to be able to run the built code
96if {${os.arch} eq "i386" && ${os.major} >= 11} {
97    supported_archs i386 x86_64
98    set universal_archs_supported {i386 x86_64}
99} elseif {${os.arch} eq "i386" && ${configure.build_arch} eq "x86_64"} {
100    supported_archs i386 x86_64 ppc
101    set universal_archs_supported {i386 x86_64 ppc}
102} elseif {${os.arch} eq "i386"} {
103    supported_archs i386 ppc
104    set universal_archs_supported {i386 ppc}
105} elseif {${configure.build_arch} eq "ppc64"} {
106    supported_archs ppc ppc64
107    set universal_archs_supported {ppc ppc64}
108} else {
109    supported_archs ${configure.build_arch}
110    set universal_archs_supported ${configure.build_arch}
111}
112
113platform darwin {
114    patchfiles-append   patch-unix-configure.ac.diff \
115                        patch-unix-prebuild.sh.diff \
116                        patch-lseek64.diff \
117                        patch-vfe-uint.diff
118
119    if {${os.major} <= 10} {
120        depends_build
121        depends_lib
122        pre-fetch {
123            ui_error "${name} @${version} does not build on Mac OS X 10.6 Snow Leopard or earlier."
124            return -code error "unsupported Mac OS X version"
125        }
126    }
127
128    set merger_host(x86_64) x86_64-apple-${os.platform}${os.major}
129    set merger_host(i386) i686-apple-${os.platform}${os.major}
130    set merger_host(ppc64) powerpc64-apple-${os.platform}${os.major}
131    set merger_host(ppc) powerpc-apple-${os.platform}${os.major}
132    foreach arch ${configure.universal_archs} {
133        set merger_configure_args(${arch}) --build=$merger_host(${arch})
134    }
135    if {![variant_isset universal] && [info exists merger_configure_args(${configure.build_arch})]} {
136        configure.args-append --host=$merger_host(${configure.build_arch}) $merger_configure_args(${configure.build_arch})
137    }
138}
Note: See TracBrowser for help on using the repository browser.