source: trunk/dports/graphics/openni/Portfile @ 103770

Last change on this file since 103770 was 103770, checked in by larryv@…, 6 years ago

openni: Add explicit graphviz dependency for doc generation (#38217).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 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 103770 2013-03-06 22:59:00Z larryv@macports.org $
3
4PortSystem          1.0
5PortGroup           github 1.0
6
7github.setup        OpenNI openni 1.5.2.23 Stable-
8categories          graphics
9platforms           darwin
10maintainers         ryandesign openmaintainer
11license             LGPL-3+
12supported_archs     i386 x86_64
13
14description         APIs for natural interaction devices
15
16long_description    The OpenNI framework provides a set of APIs for accessing \
17                    natural interaction devices, including support for voice \
18                    and voice command recognition, hand gestures, and body \
19                    motion tracking.
20
21checksums           rmd160  ecf46e11a82752388bb394562dfbbec1e018c40b \
22                    sha256  7f097f6b7e304dab75afd23ce73cbe3dcefec62b6a8f843fa6bdf2f6b1d81e99
23
24depends_build       port:doxygen \
25                    path:bin/dot:graphviz
26
27depends_lib         port:libusb
28
29pre-fetch {
30    if {${os.platform} == "darwin" && ${os.major} < 10} {
31        ui_error "${name} ${version} requires OS X 10.6 or greater."
32        return -code error "incompatible OS X version"
33    }
34}
35
36build.dir           ${worksrcpath}/Platform/Linux/CreateRedist
37
38post-extract {
39    file attributes ${build.dir}/RedistMaker -permissions a+x
40    # DOS to UNIX line endings so we can patch.
41    reinplace "s|\r||g" ${worksrcpath}/Source/OpenNI/XnOpenNI.cpp
42}
43
44patchfiles          patch-Platform-Linux-Build-Common-CommonCppMakefile.diff \
45                    patch-Platform-Linux-Build-Common-Platform.x86.diff \
46                    patch-Platform-Linux-CreateRedist-install.sh.diff \
47                    patch-Source-OpenNI-XnOpenNI.cpp.diff
48
49post-patch {
50    reinplace "s|@PREFIX@|${prefix}|g"  ${build.dir}/install.sh \
51                                        ${worksrcpath}/Platform/Linux/Build/Common/CommonCppMakefile \
52                                        ${worksrcpath}/Source/OpenNI/XnOpenNI.cpp
53}
54
55use_configure       no
56
57variant universal {}
58
59build.cmd           ./RedistMaker
60build.env           CXX="${configure.cxx} [get_canonical_archflags cxx]"
61build.target
62
63pre-destroot {
64    destroot.dir    [glob ${worksrcpath}/Platform/Linux/Redist/*]
65}
66destroot.cmd        ./install.sh
67destroot.target
68destroot.destdir    -c ${destroot}
69destroot.keepdirs   ${destroot}${prefix}/var/lib/ni
70
71set libs {libnimMockNodes.dylib libnimCodecs.dylib libnimRecorder.dylib}
72
73post-activate {
74    foreach lib ${libs} {
75        system "${prefix}/bin/niReg -r ${prefix}/lib/${lib}"
76    }
77}
78
79pre-deactivate {
80    foreach lib ${libs} {
81        system "${prefix}/bin/niReg -u ${prefix}/lib/${lib}"
82    }
83}
Note: See TracBrowser for help on using the repository browser.