source: trunk/dports/graphics/openexr/Portfile

Last change on this file was 149045, checked in by mcalhoun@…, 14 months ago

openexr: add to maintainer list

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.5 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 149045 2016-05-26 11:03:20Z ryandesign@macports.org $
3
4PortSystem 1.0
5
6name            openexr
7version         2.2.0
8categories      graphics
9license         BSD
10maintainers     mcalhoun openmaintainer
11description     OpenEXR Graphics Library
12long_description \
13    OpenEXR is a high dynamic-range (HDR) image file format developed \
14    by Industrial Light & Magic for use in computer imaging applications.
15homepage        http://www.openexr.com
16platforms       darwin
17master_sites    http://savannah.nongnu.org/download/openexr
18checksums       rmd160  a825ed42e731da3bc39f25ce2a310712a5b0f956 \
19                sha256  36a012f6c43213f840ce29a8b182700f6cf6b214bea0d5735594136b44914231
20
21# avoid dependency on port:cctools
22configure.env-append NM=${prefix}/bin/nm
23
24# avoid dependency on port:grep
25configure.env-append GREP=/usr/bin/grep
26
27if {${subport} ne "ilmbase"} {
28    depends_build-append port:pkgconfig
29}
30
31if {${subport} eq ${name}} {
32    revision 1
33
34    depends_lib-append port:ilmbase
35
36    # ImfCompressor.h is included in other header files
37    # see #49965
38    # see also https://lists.nongnu.org/archive/html/openexr-devel/2013-06/msg00001.html
39    patchfiles-append \
40        patch-IlmImf-Makefile.diff
41
42    # OS X < 10.6 lacks posix_memalign
43    # see https://github.com/openexr/openexr/issues/59
44    patchfiles-append \
45        patch-IlmImf-ImfSystemSpecific.h.diff
46
47    # which upgrading, do not find old header files and libraries
48    # see #51470 for MacPorts report
49    # see https://github.com/openexr/openexr/issues/130 for upstream report
50    patchfiles-append patch-search_order.diff
51    configure.ldflags-delete -L${prefix}/lib
52
53    # see #51470 for MacPorts report
54    # see https://github.com/openexr/openexr/pull/126 for upstream report
55    # see
56    #    https://github.com/openexr/openexr/commit/353cbc2e89c582e07796f01bce8f203e84c8ae46
57    #    https://github.com/openexr/openexr/commit/57ecf581d053f5cacf2e8fc3c024490e0bbe536f
58    #    for upstream fix
59    patchfiles-append patch-64bit_types.diff
60
61    # avoid "can't find a register in class 'BREG' while reloading 'asm'
62    # see #51470 for MacPorts report
63    # see https://github.com/openexr/openexr/issues/128 for upstream report
64    if { ${build_arch} eq "i386" && [string match *gcc-4* ${configure.compiler}] } {
65        patchfiles-append patch-pic.diff
66    }
67}
68
69subport ilmbase {
70    distname    ilmbase-${version}
71    checksums   \
72        rmd160  b1adb0c96eff6b3554ddaf8f8bafe2cba8c114e3 \
73        sha256  ecf815b60695555c1fbc73679e84c7c9902f4e8faa6e8000d2f905b8b86cedc7
74
75    # Bitrotted ucontext usage is buggy, don't bother with it.
76    patchfiles-append patch-configure.diff
77}
78
79set python_versions {27 34 35}
80
81foreach pver ${python_versions} {
82    subport py${pver}-pyilmbase {
83        PortGroup   active_variants 1.1
84        distname    pyilmbase-${version}
85        checksums                \
86            rmd160  9a6b711a2842b1e0124a43fc1c2148a2e7802710 \
87            sha256  68c968fec5c40930a2c692ccc88990faa50320ed74b88553a3632d7d02c87e1a
88
89        # so long as boost can only be installed with one version of python at a time,
90        #    conflict with all other pyilmbase ports
91        foreach over ${python_versions} {
92            if {${over} ne ${pver}} {
93                conflicts-append py${over}-pyilmbase
94            }
95        }
96
97        configure.args-append   \
98            --with-boost-python-libname=boost_python-mt
99
100        set pbranch [string range ${pver} 0 end-1].[string index ${pver} end]
101        configure.python ${prefix}/bin/python${pbranch}
102
103        depends_lib-append     \
104            port:ilmbase       \
105            port:python${pver} \
106            port:boost         \
107            port:py${pver}-numpy
108
109        require_active_variants boost python${pver}
110    }
111}
112
113subport openexr_viewers {
114    distname    openexr_viewers-${version}
115    checksums   rmd160  5f3edc7a0c706faa75a9cd205c0ac85e988c6e09 \
116                sha256  f73fe2e4d19e8fc9317d6c34f156598ad43497bb9549f03feacb8ba095dd04e9
117
118    depends_lib-append  \
119        port:openexr                \
120        path:lib/libfltk.dylib:fltk \
121        port:ctlang
122
123    # do not attempt to have fltk build application bundle
124    patchfiles-append   patch-fltk.diff
125}
126
127# The bundled libtool doesn't support -stdlib=...
128patchfiles-append \
129    patch-ltmain.sh.diff
130
131test.run        yes
132test.target     check
133
134livecheck.type  regex
135livecheck.url   ${homepage}/downloads.html
136livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)
Note: See TracBrowser for help on using the repository browser.