Ticket #37276: Portfile.2.2

File Portfile.2.2, 2.9 KB (added by josephhowse@…, 12 years ago)

graphics/openni-sensorkinect/Portfile

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$
3
4PortSystem          1.0
5PortGroup           github 1.0
6
7github.setup        avin2 sensorkinect 0.93-5.1.2.1 v
8name                openni-sensorkinect
9version             0.93
10categories          graphics
11platforms           darwin
12maintainers         nummist.com:josephhowse openmaintainer
13license             LGPL-3+
14supported_archs     i386 x86_64
15
16description         Microsoft Kinect sensor modules for the OpenNI framework
17
18long_description    OpenNI is a framework for getting data to support 'Natural \
19                    Interaction', i.e. skeleton tracking, gesture tracking, and similar \
20                    ways of getting data from humans. This package provides modules for \
21                    OpenNI that get the data from the Kinect camera for processing with \
22                    OpenNI-compliant middleware, such as PrimeSense NITE. These modules \
23                    are an unofficial 'avin2' branch of the PrimeSense sensors, patched \
24                    for Kinect support.
25
26homepage            https://github.com/avin2/SensorKinect
27
28checksums           rmd160  4d1bb3d3e7a593d53a6822eb830b9c3cb6a5e213 \
29                    sha256  968356332be82aff383ab4162359fcff3e45fa5b5a8b13b2260b4ce713fd102d
30
31depends_lib         port:openni-devel
32
33build.dir           ${worksrcpath}/Platform/Linux/CreateRedist
34
35post-extract {
36    # DOS to UNIX line endings so we can patch.
37    reinplace "s|\r||g" ${worksrcpath}/Platform/Linux/Build/Common/CommonCppMakefile \
38                        ${worksrcpath}/Platform/Linux/Build/Common/Platform.x86 \
39                        ${worksrcpath}/Platform/Linux/Build/Makefile \
40                        ${worksrcpath}/Platform/Linux/CreateRedist/install.sh
41}
42
43patchfiles          patch-Platform-Linux-Build-Common-CommonCppMakefile.diff \
44                    patch-Platform-Linux-Build-Common-Platform.x86.diff \
45                    patch-Platform-Linux-Build-Makefile.diff \
46                    patch-Platform-Linux-CreateRedist-install.sh.diff
47
48post-patch {
49    reinplace "s|@PREFIX@|${prefix}|g"  ${build.dir}/install.sh \
50                                        ${worksrcpath}/Platform/Linux/Build/Common/CommonCppMakefile
51}
52
53use_configure       no
54
55variant universal {}
56
57build.cmd           ./RedistMaker
58build.env           CXX="${configure.cxx} [get_canonical_archflags cxx] -I${prefix}/include/ni"
59build.target
60
61pre-destroot {
62    destroot.dir    [glob ${worksrcpath}/Platform/Linux/Redist/*]
63}
64destroot.cmd        ./install.sh
65destroot.target
66destroot.destdir    -c ${destroot}
67
68set libs {libXnCore.dylib libXnDDK.dylib libXnDeviceFile.dylib libXnDeviceSensorV2KM.dylib libXnFormats.dylib}
69
70post-activate {
71    foreach lib ${libs} {
72        system "${prefix}/bin/niReg -r ${prefix}/lib/${lib}"
73    }
74}
75
76pre-deactivate {
77    foreach lib ${libs} {
78        system "${prefix}/bin/niReg -u ${prefix}/lib/${lib}"
79    }
80}