source: trunk/dports/graphics/lprof/Portfile @ 73549

Last change on this file since 73549 was 73549, checked in by michaelld@…, 9 years ago

lprof: Add missing dependency; fix use of sysroot; skip arch check on cmake.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.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 73549 2010-11-17 14:05:11Z michaelld@macports.org $
3
4PortSystem          1.0
5PortGroup           qt4 1.0
6
7name                lprof
8version             20090113
9revision            5
10categories          graphics
11license             GPL
12maintainers         nomaintainer
13description         LProf open source ICC profiler
14long_description    LProf is an open source color profiler that creates ICC \
15                    compliant profiles for devices such as cameras, scanners \
16                    and monitors. Origanally authored by Marti Maria the \
17                    creator of LCMS. Marti has graciously consented to the \
18                    creation of this project.
19
20platforms           darwin
21homepage            http://lprof.sourceforge.net
22master_sites        sourceforge
23fetch.type          cvs
24cvs.root            :pserver:anonymous@lprof.cvs.sourceforge.net:/cvsroot/lprof
25cvs.date            ${version}
26cvs.module          lprof
27
28depends_lib-append  port:libusb-compat port:libpng port:tiff \
29                    port:zlib port:qt-assistant
30depends_build-append port:cmake
31depends_skip_archcheck cmake
32
33worksrcdir          lprof
34
35# link final 'lprof' executable with PNG and AppKit
36patchfiles          patch-src-CMakeLists.txt.diff
37
38configure.cmd       cmake
39configure.ccache    no
40configure.args      -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
41                    -DCMAKE_VERBOSE_MAKEFILE=ON \
42                    -DCMAKE_BUILD_TYPE=Release \
43                    -DCMAKE_SYSTEM_PREFIX_PATH=\"${prefix}\;/usr\" \
44                    -DCMAKE_INSTALL_PREFIX=${prefix} \
45                    -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib/ \
46                    -DCMAKE_INCLUDE_PATH=${prefix}/include \
47                    -DCMAKE_LIBRARY_PATH=${prefix}/lib \
48                    ${qt_cmake_defines} \
49                    -DQTTRANS_LRELEASE_EXECUTABLE=${qt_lrelease_cmd} \
50                    -Wno-dev .
51
52if {${configure.sdkroot} != ""} {
53    configure.args-append \
54        -DCMAKE_C_FLAGS_RELEASE="-isysroot ${configure.sdkroot}" \
55        -DCMAKE_CXX_FLAGS_RELEASE="-isysroot ${configure.sdkroot}" \
56        -DCMAKE_LD_FLAGS="-Wl,-syslibroot,${configure.sdkroot}"
57}
58
59post-patch {
60    # make PNG required
61    reinplace "s,PNG,PNG REQUIRED," ${worksrcpath}/CMakeLists.txt
62
63    # fix IOKit header include: G -> g, for case sensitive file systems
64    reinplace "/include/s,IOKit/Graphics/IOGraphicsLib,IOKit/graphics/IOGraphicsLib,g" ${worksrcpath}/src/videoLUTutils/LUTutil.h
65
66    # fix use of SysBeep -> NSBeep
67    reinplace "s,SysBeep,NSBeep,g" \
68        ${worksrcpath}/src/argyll/spectro/unixio.c
69}
70
71post-destroot {
72    # create an OSX .app
73    set appcdir ${destroot}${applications_dir}/LProf.app/Contents
74    xinstall -m 755 -d ${appcdir}/MacOS
75    xinstall -m 755 -d ${appcdir}/Resources
76    xinstall -m 755 -d ${appcdir}/Argyll.kext
77    move ${destroot}${prefix}/bin/lprof ${appcdir}/MacOS
78    move ${destroot}${prefix}/bin/icc2it8 ${appcdir}/MacOS
79    copy ${worksrcpath}/build/darwin/lprof.app/Contents/Info.plist \
80        ${appcdir}
81    copy ${worksrcpath}/build/darwin/lprof.app/Contents/Resources/lprof.icns ${appcdir}/Resources
82    copy ${worksrcpath}/src/argyll/libusb/Argyll.kext/Info.plist \
83        ${appcdir}/Argyll.kext
84    copy ${qt_apps_dir}/Assistant.app ${appcdir}/MacOS
85    move ${destroot}${prefix}/data ${appcdir}/MacOS
86}
87
88livecheck.type      none
Note: See TracBrowser for help on using the repository browser.