summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Schneider2012-04-06 17:09:12 +0200
committerSven Schneider2012-04-06 17:09:12 +0200
commit7f974d74c338a3022c348e2bbe740aae9656ccc1 (patch)
tree057620f92deee3c125125008f909cc149f0378b4
downloadaur-7f974d74c338a3022c348e2bbe740aae9656ccc1.tar.gz
added initial set of pkgbuilds
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD57
-rw-r--r--ntk.patch12
-rw-r--r--rgb_demo.patch217
4 files changed, 315 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..de57157e1c29
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+pkgbase = rgbdemo
+ pkgdesc = The Internet Communications Engine Embedded (IceE) is a modern distributed computing platform
+ pkgver = 0.6.1
+ pkgrel = 1
+ url = http://nicolas.burrus.name/index.php/Research/KinectRgbDemoV6
+ arch = i686
+ arch = x86_64
+ license = LGPL
+ makedepends = cmake
+ depends = libfreenect
+ depends = opencv
+ depends = eigen3
+ depends = libflann
+ depends = boost
+ depends = pcl
+ depends = freeglut
+ depends = glew
+ depends = qt
+ depends = cminpack
+ depends = qhull
+ source = http://downloads.sourceforge.net/project/roboticslab/RGBDemo-0.6.1-Source.tar.gz
+ source = ntk.patch
+ source = rgb_demo.patch
+ md5sums = 0954c58abb183431c43f0019dd2e3f3a
+ md5sums = bd4edd6c94853edfae5b239a7be5dde2
+ md5sums = 661a085eb1b8b4b02954d2478cebd8fb
+
+pkgname = rgbdemo
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2fec6c9994ea
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,57 @@
+# Maintainer: Sven Schneider <archlinux.sandmann@googlemail.com>
+
+pkgname=rgbdemo
+pkgver=0.6.1
+pkgrel=1
+pkgdesc="The Internet Communications Engine Embedded (IceE) is a modern distributed computing platform"
+arch=('i686' 'x86_64')
+url="http://nicolas.burrus.name/index.php/Research/KinectRgbDemoV6"
+license=('LGPL')
+depends=('libfreenect' 'opencv' 'eigen3' 'libflann' 'boost' 'pcl' 'freeglut' 'glew' 'qt' 'cminpack' 'qhull')
+makedepends=('cmake')
+source=(http://downloads.sourceforge.net/project/roboticslab/RGBDemo-${pkgver}-Source.tar.gz
+ ntk.patch
+ rgb_demo.patch)
+md5sums=('0954c58abb183431c43f0019dd2e3f3a'
+ 'bd4edd6c94853edfae5b239a7be5dde2'
+ '661a085eb1b8b4b02954d2478cebd8fb')
+
+build() {
+ cd "${srcdir}/RGBDemo-${pkgver}-Source"
+
+ #patch -p1 < ../rgb_demo.patch
+ patch -p1 < ../ntk.patch
+
+ sed 's/NAMES cminpack/NAMES minpack/g' nestk/cmake/FindCMinpack.cmake -i
+ sed 's/SET(NESTK_USE_OPENNI 1)/SET(NESTK_USE_OPENNI 0)/g' CMakeLists.txt -i
+ sed 's/ADD_LIBRARY(glew SHARED src\/glew.c)/ADD_LIBRARY(glew STATIC src\/glew.c)/g' nestk/deps/glew/CMakeLists.txt -i
+ sed 's/SET_TARGET_PROPERTIES(glew PROPERTIES/SET_TARGET_PROPERTIES(glew PROPERTIES COMPILE_FLAGS -fPIC/g' nestk/deps/glew/CMakeLists.txt -i
+ sed 's/SET(FREENECT_LIBRARIES freenect)/SET(FREENECT_LIBRARIES freenectstatic)/g' nestk/deps/cmake/UseNestkDeps.cmake.in -i
+
+ if [ ! -d build ]; then mkdir build; fi
+ cd build
+
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DNESTK_USE_PCL=False -DNESTK_USE_FREENECT=True \
+ -DNESTK_USE_OPENNI=False -DNESTK_USE_EMBEDDED_FREENECT=True \
+ -DNESTK_USE_EMBEDDED_GLEW=True -DNESTK_USE_EMBEDDED_EIGEN=False \
+ -DNESTK_USE_EMBEDDED_OPENNI=False -DCMAKE_BUILD_TYPE= RelWithDebInfo ..
+ make
+}
+
+package() {
+ cd "${srcdir}/RGBDemo-${pkgver}-Source/build"
+
+ make DESTDIR="${pkgdir}" install
+
+ rm -rf "${pkgdir}/usr/bin/glview"
+ rm -rf "${pkgdir}/usr/share/"
+ rm -rf "${pkgdir}/usr/include/libfreenect/"
+ rm -rf "${pkgdir}/usr/include/GL/"
+ rm -rf "${pkgdir}/usr/lib/pkgconfig/"
+ rm -rf "${pkgdir}/usr/lib/libfreenect.a"
+ rm -rf "${pkgdir}/usr/lib/libfreenect.so"
+ rm -rf "${pkgdir}/usr/lib/libfreenect.so.0.0"
+ rm -rf "${pkgdir}/usr/lib/libfreenect.so.0.0.1"
+ rm -rf "${pkgdir}/usr/lib/libglew.a"
+}
+
diff --git a/ntk.patch b/ntk.patch
new file mode 100644
index 000000000000..c728e3eb912e
--- /dev/null
+++ b/ntk.patch
@@ -0,0 +1,12 @@
+diff -Nur RGBDemo-0.4.0-Source.orig/nestk/ntk/numeric/levenberg_marquart_minimizer.cpp RGBDemo-0.4.0-Source/nestk/ntk/numeric/levenberg_marquart_minimizer.cpp
+--- RGBDemo-0.4.0-Source.orig/nestk/ntk/numeric/levenberg_marquart_minimizer.cpp 2011-02-05 01:49:08.000000000 +0100
++++ RGBDemo-0.4.0-Source/nestk/ntk/numeric/levenberg_marquart_minimizer.cpp 2011-12-27 03:03:37.000000000 +0100
+@@ -63,7 +63,7 @@
+ }
+
+ private:
+- mutable CostFunction& m_cost_function;
++ CostFunction& m_cost_function;
+ mutable std::vector<double> m_current_input;
+ mutable std::vector<double> m_current_output;
+ int m_input_dimension;
diff --git a/rgb_demo.patch b/rgb_demo.patch
new file mode 100644
index 000000000000..f2d5447e4035
--- /dev/null
+++ b/rgb_demo.patch
@@ -0,0 +1,217 @@
+diff -Nur RGBDemo-0.4.0-Source.orig/nestk/deps/opencv/modules/core/include/opencv2/core/core.hpp RGBDemo-0.4.0-Source/nestk/deps/opencv/modules/core/include/opencv2/core/core.hpp
+--- RGBDemo-0.4.0-Source.orig/nestk/deps/opencv/modules/core/include/opencv2/core/core.hpp 2011-02-05 01:48:42.000000000 +0100
++++ RGBDemo-0.4.0-Source/nestk/deps/opencv/modules/core/include/opencv2/core/core.hpp 2011-12-27 02:34:39.000000000 +0100
+@@ -56,6 +56,7 @@
+ #include <algorithm>
+ #include <cmath>
+ #include <complex>
++#include <cstddef>
+ #include <map>
+ #include <new>
+ #include <string>
+diff -Nur RGBDemo-0.4.0-Source.orig/nestk/deps/opencv/modules/features2d/src/matchers.cpp RGBDemo-0.4.0-Source/nestk/deps/opencv/modules/features2d/src/matchers.cpp
+--- RGBDemo-0.4.0-Source.orig/nestk/deps/opencv/modules/features2d/src/matchers.cpp 2011-02-05 01:48:41.000000000 +0100
++++ RGBDemo-0.4.0-Source/nestk/deps/opencv/modules/features2d/src/matchers.cpp 2011-12-27 02:54:45.000000000 +0100
+@@ -42,7 +42,7 @@
+ #include "precomp.hpp"
+
+ #ifdef HAVE_EIGEN2
+-#include <Eigen/Array>
++#include <Eigen/Core>
+ #endif
+
+ using namespace std;
+diff -Nur RGBDemo-0.4.0-Source.orig/nestk/deps/opencv/modules/highgui/src/cap.cpp RGBDemo-0.4.0-Source/nestk/deps/opencv/modules/highgui/src/cap.cpp
+--- RGBDemo-0.4.0-Source.orig/nestk/deps/opencv/modules/highgui/src/cap.cpp 2011-02-05 01:48:42.000000000 +0100
++++ RGBDemo-0.4.0-Source/nestk/deps/opencv/modules/highgui/src/cap.cpp 2011-12-27 03:00:54.000000000 +0100
+@@ -171,7 +171,7 @@
+ if (capture)
+ return capture;
+ #endif
+- #if defined (HAVE_CAMV4L) || defined (HAVE_CAMV4L2)
++ #if defined (HAVE_CAMV4L)
+ capture = cvCreateCameraCapture_V4L (index);
+ if (capture)
+ return capture;
+diff -Nur RGBDemo-0.4.0-Source.orig/nestk/deps/opencv/modules/highgui/src/cap_ffmpeg.cpp RGBDemo-0.4.0-Source/nestk/deps/opencv/modules/highgui/src/cap_ffmpeg.cpp
+--- RGBDemo-0.4.0-Source.orig/nestk/deps/opencv/modules/highgui/src/cap_ffmpeg.cpp 2011-02-05 01:48:42.000000000 +0100
++++ RGBDemo-0.4.0-Source/nestk/deps/opencv/modules/highgui/src/cap_ffmpeg.cpp 2011-12-27 02:52:46.000000000 +0100
+@@ -466,7 +466,7 @@
+ AVCodecContext *enc = &ic->streams[i]->codec;
+ #endif
+
+- if( CODEC_TYPE_VIDEO == enc->codec_type && video_stream < 0) {
++ if( AVMEDIA_TYPE_VIDEO == enc->codec_type && video_stream < 0) {
+ AVCodec *codec = avcodec_find_decoder(enc->codec_id);
+ if (!codec ||
+ avcodec_open(enc, codec) < 0)
+@@ -550,15 +550,27 @@
+ continue;
+ }
+
+-#if LIBAVFORMAT_BUILD > 4628
+- avcodec_decode_video(video_st->codec,
+- picture, &got_picture,
+- packet.data, packet.size);
+-#else
+- avcodec_decode_video(&video_st->codec,
+- picture, &got_picture,
+- packet.data, packet.size);
+-#endif
++
++ AVPacket avpkt;
++ av_init_packet(&avpkt);
++ avpkt.data = packet.data;
++ avpkt.size = packet.size;
++ //
++ // HACK for CorePNG to decode as normal PNG by default
++ // same method used by ffmpeg
++ avpkt.flags = AV_PKT_FLAG_KEY;
++ avcodec_decode_video2(video_st->codec,
++ picture, &got_picture, &avpkt);
++//Functions Removed from ffmpeg on 4/19/11
++//#if LIBAVFORMAT_BUILD > 4628
++// avcodec_decode_video(video_st->codec,
++// picture, &got_picture,
++// packet.data, packet.size);
++//#else
++// avcodec_decode_video(&video_st->codec,
++// picture, &got_picture,
++// packet.data, packet.size);
++//#endif
+
+ if (got_picture) {
+ // we have a new picture, so memorize it
+@@ -803,24 +815,25 @@
+ #endif
+ };
+
+-static const char * icvFFMPEGErrStr(int err)
+-{
+- switch(err) {
+- case AVERROR_NUMEXPECTED:
+- return "Incorrect filename syntax";
+- case AVERROR_INVALIDDATA:
+- return "Invalid data in header";
+- case AVERROR_NOFMT:
+- return "Unknown format";
+- case AVERROR_IO:
+- return "I/O error occurred";
+- case AVERROR_NOMEM:
+- return "Memory allocation error";
+- default:
+- break;
+- }
+- return "Unspecified error";
+-}
++//Deprecated Errors, should be using AVERROR(EINVAL) to return error strings
++//static const char * icvFFMPEGErrStr(int err)
++//{
++// switch(err) {
++// case AVERROR_NUMEXPECTED:
++// return "Incorrect filename syntax";
++// case AVERROR_INVALIDDATA:
++// return "Invalid data in header";
++// case AVERROR_NOFMT:
++// return "Unknown format";
++// case AVERROR_IO:
++// return "I/O error occurred";
++// case AVERROR_NOMEM:
++// return "Memory allocation error";
++// default:
++// break;
++// }
++// return "Unspecified error";
++//}
+
+ /* function internal to FFMPEG (libavformat/riff.c) to lookup codec id by fourcc tag*/
+ extern "C" {
+@@ -899,7 +912,7 @@
+ #endif
+
+ #if LIBAVFORMAT_BUILD > 4621
+- c->codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, CODEC_TYPE_VIDEO);
++ c->codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_VIDEO);
+ #else
+ c->codec_id = oc->oformat->video_codec;
+ #endif
+@@ -911,7 +924,7 @@
+ //if(codec_tag) c->codec_tag=codec_tag;
+ codec = avcodec_find_encoder(c->codec_id);
+
+- c->codec_type = CODEC_TYPE_VIDEO;
++ c->codec_type = AVMEDIA_TYPE_VIDEO;
+
+ /* put sample parameters */
+ c->bit_rate = bitrate;
+@@ -998,7 +1011,7 @@
+ AVPacket pkt;
+ av_init_packet(&pkt);
+
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+ pkt.stream_index= video_st->index;
+ pkt.data= (uint8_t *)picture;
+ pkt.size= sizeof(AVPicture);
+@@ -1018,7 +1031,7 @@
+ pkt.pts = c->coded_frame->pts;
+ #endif
+ if(c->coded_frame->key_frame)
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+ pkt.stream_index= video_st->index;
+ pkt.data= outbuf;
+ pkt.size= out_size;
+@@ -1215,7 +1228,7 @@
+ av_register_all ();
+
+ /* auto detect the output format from the name and fourcc code. */
+- fmt = guess_format(NULL, filename, NULL);
++ fmt = av_guess_format(NULL, filename, NULL);
+ if (!fmt)
+ return false;
+
+@@ -1238,7 +1251,7 @@
+ #endif
+
+ // alloc memory for context
+- oc = av_alloc_format_context();
++ oc = avformat_alloc_context();
+ assert (oc);
+
+ /* set file name */
+@@ -1310,7 +1323,7 @@
+ /* open the codec */
+ if ( (err=avcodec_open(c, codec)) < 0) {
+ char errtext[256];
+- sprintf(errtext, "Could not open codec '%s': %s", codec->name, icvFFMPEGErrStr(err));
++ sprintf(errtext, "Could not open codec '%s': %s", codec->name, AVERROR(EINVAL));
+ CV_Error(CV_StsBadArg, errtext);
+ }
+
+diff -Nur RGBDemo-0.4.0-Source.orig/nestk/deps/opencv/modules/highgui/src/cap_libv4l.cpp RGBDemo-0.4.0-Source/nestk/deps/opencv/modules/highgui/src/cap_libv4l.cpp
+--- RGBDemo-0.4.0-Source.orig/nestk/deps/opencv/modules/highgui/src/cap_libv4l.cpp 2011-02-05 01:48:42.000000000 +0100
++++ RGBDemo-0.4.0-Source/nestk/deps/opencv/modules/highgui/src/cap_libv4l.cpp 2011-12-27 03:00:29.000000000 +0100
+@@ -241,8 +241,10 @@
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+
++#ifdef HAVE_CAMV4L
+ #include <linux/videodev.h>
+ #include <linux/videodev2.h>
++#endif
+
+ #include <libv4l1.h>
+ #include <libv4l2.h>
+diff -Nur RGBDemo-0.4.0-Source.orig/nestk/ntk/numeric/levenberg_marquart_minimizer.cpp RGBDemo-0.4.0-Source/nestk/ntk/numeric/levenberg_marquart_minimizer.cpp
+--- RGBDemo-0.4.0-Source.orig/nestk/ntk/numeric/levenberg_marquart_minimizer.cpp 2011-02-05 01:49:08.000000000 +0100
++++ RGBDemo-0.4.0-Source/nestk/ntk/numeric/levenberg_marquart_minimizer.cpp 2011-12-27 03:03:37.000000000 +0100
+@@ -63,7 +63,7 @@
+ }
+
+ private:
+- mutable CostFunction& m_cost_function;
++ CostFunction& m_cost_function;
+ mutable std::vector<double> m_current_input;
+ mutable std::vector<double> m_current_output;
+ int m_input_dimension;