source: trunk/dports/graphics/argyll/Portfile

Last change on this file was 148409, checked in by ryandesign@…, 15 months ago

argyll: use expand operator instead of eval

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.4 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 148409 2016-05-07 16:55:28Z ryandesign@macports.org $
3
4PortSystem              1.0
5
6name                    argyll
7version                 1.3.2
8revision                2
9categories              graphics
10platforms               darwin
11maintainers             nomaintainer
12license                 AGPL-3
13
14description             Argyll Color Management System
15long_description        ArgyllCMS is an ICC compatible color management \
16system. It supports accurate ICC profile creation for scanners, cameras \
17and film recorders, and calibration and profiling of displays and RGB \& \
18CMYK printers. Argyll includes a general purpose ICC V2 profile format \
19access library, icclib, and a general purpose CGATS file format I/O library.
20
21homepage                http://www.argyllcms.com/
22master_sites            ${homepage}
23use_zip                 yes
24distname                Argyll_V${version}_src
25
26checksums               md5     dd0b8e2da65e4bb7fc38aef377e73afd \
27                        sha1    51af2f880fa209dbc658cedf19c11abadbdc43e6 \
28                        rmd160  a447041d7fb05078c627aeeeca6837f908991c76
29
30worksrcdir              Argyll_V${version}
31
32depends_build           port:jam
33
34depends_lib             port:tiff \
35                        port:libusb-compat
36
37patchfiles              patch-jamfiles.diff \
38                        patch-spectro_usbio.c.diff
39
40# parts of Argyll (plot and spectra) use 32-bit Carbon
41supported_archs         i386 ppc
42
43post-patch {
44    # hard-wire libusb-compat info for now
45    reinplace "s,@LIBUSBLIBDIR@,${prefix}/lib,g" \
46        ${worksrcpath}/Jamtop
47    reinplace "s,@LIBUSBINCDIR@,${prefix}/include,g" \
48        ${worksrcpath}/Jamtop
49    reinplace "s,@LIBUSBNAME@,libusb,g" \
50        ${worksrcpath}/Jamtop
51
52    # fix IOKit header include: G -> g, for case sensitive file systems
53    reinplace "/include/s,IOKit/Graphics/IOGraphicsLib,IOKit/graphics/IOGraphicsLib,g" ${worksrcpath}/spectro/dispwin.h
54
55    # set to install all libraries
56    foreach fixfile [exec find ${worksrcpath} -name Jamfile] {
57        reinplace "s,#InstallLib,InstallLib,g" ${fixfile}
58    }
59
60    # fix CC / CXX / LD arch flag settings
61    reinplace "s,@CCFLAGS@,${configure.cc_archflags},g" \
62         ${worksrcpath}/Jambase
63    reinplace "s,@CXXFLAGS@,${configure.cxx_archflags},g" \
64         ${worksrcpath}/Jambase
65    reinplace "s,@LDFLAGS@,${configure.ld_archflags},g" \
66         ${worksrcpath}/Jambase
67}
68
69use_configure           no
70
71build.args              CC=${configure.cc}
72
73# 'destroot' actually just installed files locally to
74# the worksrcpath
75
76post-destroot {
77    # Install documentation.
78    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
79    xinstall -m 644 -W ${worksrcpath} \
80        notes.txt Readme.txt ttbd.txt \
81        ${destroot}${prefix}/share/doc/${name}
82    system "cp -r ${worksrcpath}/doc/* \
83        ${destroot}${prefix}/share/doc/${name} && \
84        chmod 0644 ${destroot}${prefix}/share/doc/${name}/*"
85
86    # Install binaries
87    delete ${worksrcpath}/bin/License.txt
88    xinstall -m 755 {*}[glob ${worksrcpath}/bin/*] \
89        ${destroot}${prefix}/bin
90
91    # Install headers
92    xinstall -m 755 -d ${destroot}${prefix}/include/${name}
93    foreach thisdir {cgats gamut h icc imdi jcnf numlib plot \
94                         render rspl scanin spectro target \
95                         ucmm xicc} {
96        xinstall -m 644 {*}[glob ${worksrcpath}/${thisdir}/*.h] \
97            ${destroot}${prefix}/include/${name}
98    }
99    # correct some headers: #include <../Y/X> -> <X>
100    foreach header {scanrd_.h gam.h refi.h gamut.h} {
101        reinplace "s,\.\./\[^ /\]*/,,g" \
102            ${destroot}/${prefix}/include/${name}/${header}
103    }
104
105    # Install libraries
106    xinstall -m 644 {*}[glob ${worksrcpath}/lib/lib*] \
107        ${destroot}${prefix}/lib
108
109    # Install references
110    xinstall -m 755 -d ${destroot}${prefix}/share/${name}/ref
111    xinstall -m 644 {*}[glob ${worksrcpath}/ref/*] \
112        ${destroot}${prefix}/share/${name}/ref
113
114    # xinstall does not remove 'quarantine' attribute;
115    # do that manually.
116    fs-traverse fixfile ${destroot} {
117        if {[exec xattr -l ${fixfile}] != ""} {
118            system "xattr -d com.apple.quarantine ${fixfile}"
119        }
120    }
121}
122
123# conflicts with num-utils on ${prefix}/bin/average
124conflicts-append    num-utils
125
126livecheck.type      regex
127livecheck.url       ${homepage}downloadsrc.html
128livecheck.regex     Argyll_V(\[0-9.]+)_src${extract.suffix}
Note: See TracBrowser for help on using the repository browser.