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