[96206] trunk/dports/graphics

ryandesign at macports.org ryandesign at macports.org
Fri Aug 3 17:27:46 PDT 2012


Revision: 96206
          https://trac.macports.org/changeset/96206
Author:   ryandesign at macports.org
Date:     2012-08-03 17:27:43 -0700 (Fri, 03 Aug 2012)
Log Message:
-----------
openni: new port, version 1.5.2.23 (#35512)

Added Paths:
-----------
    trunk/dports/graphics/openni/
    trunk/dports/graphics/openni/Portfile
    trunk/dports/graphics/openni/files/
    trunk/dports/graphics/openni/files/patch-Platform-Linux-Build-Common-CommonCppMakefile.diff
    trunk/dports/graphics/openni/files/patch-Platform-Linux-Build-Common-Platform.x86.diff
    trunk/dports/graphics/openni/files/patch-Platform-Linux-CreateRedist-install.sh.diff
    trunk/dports/graphics/openni/files/patch-Source-OpenNI-XnOpenNI.cpp.diff

Added: trunk/dports/graphics/openni/Portfile
===================================================================
--- trunk/dports/graphics/openni/Portfile	                        (rev 0)
+++ trunk/dports/graphics/openni/Portfile	2012-08-04 00:27:43 UTC (rev 96206)
@@ -0,0 +1,82 @@
+# -*- 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
+# $Id$
+
+PortSystem          1.0
+PortGroup           github 1.0
+
+github.setup        OpenNI openni 1.5.2.23 Stable-
+categories          graphics
+platforms           darwin
+maintainers         ryandesign openmaintainer
+license             LGPL-3+
+supported_archs     i386 x86_64
+
+description         APIs for natural interaction devices
+
+long_description    The OpenNI framework provides a set of APIs for accessing \
+                    natural interaction devices, including support for voice \
+                    and voice command recognition, hand gestures, and body \
+                    motion tracking.
+
+checksums           rmd160  ecf46e11a82752388bb394562dfbbec1e018c40b \
+                    sha256  7f097f6b7e304dab75afd23ce73cbe3dcefec62b6a8f843fa6bdf2f6b1d81e99
+
+depends_build       port:doxygen
+
+depends_lib         port:libusb
+
+pre-fetch {
+    if {${os.platform} == "darwin" && ${os.major} < 10} {
+        ui_error "${name} ${version} requires OS X 10.6 or greater."
+        return -code error "incompatible OS X version"
+    }
+}
+
+build.dir           ${worksrcpath}/Platform/Linux/CreateRedist
+
+post-extract {
+    file attributes ${build.dir}/RedistMaker -permissions a+x
+    # DOS to UNIX line endings so we can patch.
+    reinplace "s|\r||g" ${worksrcpath}/Source/OpenNI/XnOpenNI.cpp
+}
+
+patchfiles          patch-Platform-Linux-Build-Common-CommonCppMakefile.diff \
+                    patch-Platform-Linux-Build-Common-Platform.x86.diff \
+                    patch-Platform-Linux-CreateRedist-install.sh.diff \
+                    patch-Source-OpenNI-XnOpenNI.cpp.diff
+
+post-patch {
+    reinplace "s|@PREFIX@|${prefix}|g"  ${build.dir}/install.sh \
+                                        ${worksrcpath}/Platform/Linux/Build/Common/CommonCppMakefile \
+                                        ${worksrcpath}/Source/OpenNI/XnOpenNI.cpp
+}
+
+use_configure       no
+
+variant universal {}
+
+build.cmd           ./RedistMaker
+build.env           CXX="${configure.cxx} [get_canonical_archflags cxx]"
+build.target
+
+pre-destroot {
+    destroot.dir    [glob ${worksrcpath}/Platform/Linux/Redist/*]
+}
+destroot.cmd        ./install.sh
+destroot.target
+destroot.destdir    -c ${destroot}
+destroot.keepdirs   ${destroot}${prefix}/var/lib/ni
+
+set libs {libnimMockNodes.dylib libnimCodecs.dylib libnimRecorder.dylib}
+
+post-activate {
+    foreach lib ${libs} {
+        system "${prefix}/bin/niReg -r ${prefix}/lib/${lib}"
+    }
+}
+
+pre-deactivate {
+    foreach lib ${libs} {
+        system "${prefix}/bin/niReg -u ${prefix}/lib/${lib}"
+    }
+}


Property changes on: trunk/dports/graphics/openni/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/graphics/openni/files/patch-Platform-Linux-Build-Common-CommonCppMakefile.diff
===================================================================
--- trunk/dports/graphics/openni/files/patch-Platform-Linux-Build-Common-CommonCppMakefile.diff	                        (rev 0)
+++ trunk/dports/graphics/openni/files/patch-Platform-Linux-Build-Common-CommonCppMakefile.diff	2012-08-04 00:27:43 UTC (rev 96206)
@@ -0,0 +1,11 @@
+--- Platform/Linux/Build/Common/CommonCppMakefile.orig	2012-01-04 05:35:46.000000000 -0600
++++ Platform/Linux/Build/Common/CommonCppMakefile	2012-08-03 17:57:02.000000000 -0500
+@@ -82,7 +82,7 @@
+ 	else
+ 		LDFLAGS += -undefined error
+ 		OUTPUT_NAME = lib$(LIB_NAME).dylib
+-		OUTPUT_COMMAND = $(CXX) -o $(OUTPUT_FILE) $(OBJ_FILES) $(LDFLAGS) -dynamiclib -headerpad_max_install_names
++		OUTPUT_COMMAND = $(CXX) -o $(OUTPUT_FILE) $(OBJ_FILES) $(LDFLAGS) -dynamiclib -headerpad_max_install_names -install_name @PREFIX@/lib/$(notdir $(OUTPUT_FILE))
+ 	endif
+ endif
+ ifneq "$(EXE_NAME)" ""

Added: trunk/dports/graphics/openni/files/patch-Platform-Linux-Build-Common-Platform.x86.diff
===================================================================
--- trunk/dports/graphics/openni/files/patch-Platform-Linux-Build-Common-Platform.x86.diff	                        (rev 0)
+++ trunk/dports/graphics/openni/files/patch-Platform-Linux-Build-Common-Platform.x86.diff	2012-08-04 00:27:43 UTC (rev 96206)
@@ -0,0 +1,14 @@
+--- Platform/Linux/Build/Common/Platform.x86.orig	2012-01-04 05:35:46.000000000 -0600
++++ Platform/Linux/Build/Common/Platform.x86	2012-08-03 16:59:30.000000000 -0500
+@@ -5,11 +5,6 @@
+ 	SSE_GENERATION = 3
+ endif
+ 
+-ifeq ("$(OSTYPE)","Darwin")
+-	# Making the binary a universal one (x86 + x64)
+-	CFLAGS += -arch i386 -arch x86_64
+-	LDFLAGS += -arch i386 -arch x86_64
+-endif
+ 
+ ifeq ($(SSE_GENERATION), 2)
+ 	CFLAGS += -msse2

Added: trunk/dports/graphics/openni/files/patch-Platform-Linux-CreateRedist-install.sh.diff
===================================================================
--- trunk/dports/graphics/openni/files/patch-Platform-Linux-CreateRedist-install.sh.diff	                        (rev 0)
+++ trunk/dports/graphics/openni/files/patch-Platform-Linux-CreateRedist-install.sh.diff	2012-08-04 00:27:43 UTC (rev 96206)
@@ -0,0 +1,32 @@
+--- Platform/Linux/CreateRedist/install.sh.orig	2012-01-04 05:35:46.000000000 -0600
++++ Platform/Linux/CreateRedist/install.sh	2012-08-03 18:06:13.000000000 -0500
+@@ -71,11 +71,11 @@
+ 	exit 1
+ fi
+ 
+-INSTALL_LIB=$rootfs/usr/lib
+-INSTALL_BIN=$rootfs/usr/bin
+-INSTALL_INC=$rootfs/usr/include/ni
+-INSTALL_VAR=$rootfs/var/lib/ni
+-INSTALL_JAR=$rootfs/usr/share/java
++INSTALL_LIB=$rootfs at PREFIX@/lib
++INSTALL_BIN=$rootfs at PREFIX@/bin
++INSTALL_INC=$rootfs at PREFIX@/include/ni
++INSTALL_VAR=$rootfs at PREFIX@/var/lib/ni
++INSTALL_JAR=$rootfs at PREFIX@/share/java
+ 
+ # make all calls into OpenNI run in this filesystem
+ export OPEN_NI_INSTALL_PATH=$rootfs
+@@ -107,12 +107,6 @@
+ 	mkdir -p $INSTALL_VAR
+ 	printf "OK\n"
+ 
+-	# register modules
+-	for module in $MODULES; do
+-		printf "registering module '$module'..."
+-		$INSTALL_BIN/niReg -r $INSTALL_LIB/$module
+-		printf "OK\n"
+-	done
+ 
+ 	# mono
+ 	if [ -f $rootfs/usr/bin/gmcs -a -f Bin/OpenNI.net.dll ]; then

Added: trunk/dports/graphics/openni/files/patch-Source-OpenNI-XnOpenNI.cpp.diff
===================================================================
--- trunk/dports/graphics/openni/files/patch-Source-OpenNI-XnOpenNI.cpp.diff	                        (rev 0)
+++ trunk/dports/graphics/openni/files/patch-Source-OpenNI-XnOpenNI.cpp.diff	2012-08-04 00:27:43 UTC (rev 96206)
@@ -0,0 +1,11 @@
+--- Source/OpenNI/XnOpenNI.cpp.orig	2012-01-04 05:35:46.000000000 -0600
++++ Source/OpenNI/XnOpenNI.cpp	2012-08-03 18:41:09.000000000 -0500
+@@ -6993,7 +6993,7 @@
+ #elif (CE4100)
+ 	#define XN_OPEN_NI_FILES_LOCATION "/usr/etc/ni/"
+ #elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_MACOSX)
+-	#define XN_OPEN_NI_FILES_LOCATION "/var/lib/ni/"
++	#define XN_OPEN_NI_FILES_LOCATION "@PREFIX@/var/lib/ni/"
+ #elif (XN_PLATFORM == XN_PLATFORM_ANDROID_ARM)
+ 	#define XN_OPEN_NI_FILES_LOCATION "/data/ni/"
+ #else
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120803/31d8a172/attachment.html>


More information about the macports-changes mailing list