summaryrefslogtreecommitdiff
path: root/community/openscenegraph
diff options
context:
space:
mode:
Diffstat (limited to 'community/openscenegraph')
-rw-r--r--community/openscenegraph/PKGBUILD32
-rw-r--r--community/openscenegraph/build-fix.diff137
2 files changed, 169 insertions, 0 deletions
diff --git a/community/openscenegraph/PKGBUILD b/community/openscenegraph/PKGBUILD
new file mode 100644
index 000000000..68cd7a829
--- /dev/null
+++ b/community/openscenegraph/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 38818 2011-02-01 11:50:23Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: Hans Janssen <janserv@gmail.com>
+# Contributor: my64 <packages@obordes.com>
+# Contributor: Colin Pitrat <colin.pitrat@gmail.com>
+
+pkgname=openscenegraph
+pkgver=2.8.3
+pkgrel=5
+pkgdesc="An Open Source, high performance real-time graphics toolkit"
+arch=('i686' 'x86_64')
+license=('custom:OSGPL')
+url="http://www.openscenegraph.org"
+depends=('giflib' 'jasper' 'librsvg' 'xine-lib' 'curl' 'pth')
+makedepends=('cmake' 'libvncserver')
+optdepends=('libvncserver' 'gdal' 'openexr' 'poppler-glib')
+conflicts=('openthreads')
+provides=('openthreads')
+source=(http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-$pkgver/source/OpenSceneGraph-$pkgver.zip
+ build-fix.diff)
+md5sums=('dc43b9161555c4eab7f5a678dd4e01ab'
+ '0fbcd32f129f94ac4775de326775b3cf')
+
+build() {
+ cd "$srcdir/OpenSceneGraph-$pkgver"
+ [ $NOEXTRACT -eq 1 ] || cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
+ patch -p1 <$srcdir/build-fix.diff || true
+ make
+ make DESTDIR="$pkgdir" install
+ install -D -m644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ [ -d "$pkgdir/usr/lib64" ] && mv "$pkgdir/usr/lib64" "$pkgdir/usr/lib" || true
+}
diff --git a/community/openscenegraph/build-fix.diff b/community/openscenegraph/build-fix.diff
new file mode 100644
index 000000000..7e9fb0baa
--- /dev/null
+++ b/community/openscenegraph/build-fix.diff
@@ -0,0 +1,137 @@
+diff -wbBur OpenSceneGraph-2.8.3/include/osg/AudioStream OpenSceneGraph-2.8.3.my/include/osg/AudioStream
+--- OpenSceneGraph-2.8.3/include/osg/AudioStream 2010-03-19 09:14:12.000000000 +0000
++++ OpenSceneGraph-2.8.3.my/include/osg/AudioStream 2011-02-01 10:50:20.000000000 +0000
+@@ -68,7 +68,7 @@
+ virtual int audioFrequency() const = 0;
+ virtual int audioNbChannels() const = 0;
+
+- enum SampleFormat
++ enum XSampleFormat
+ {
+ SAMPLE_FORMAT_U8,
+ SAMPLE_FORMAT_S16,
+@@ -76,8 +76,7 @@
+ SAMPLE_FORMAT_S32,
+ SAMPLE_FORMAT_F32
+ };
+-
+- virtual SampleFormat audioSampleFormat() const = 0;
++ virtual XSampleFormat audioSampleFormat() const = 0;
+ };
+
+ } // namespace
+diff -wbBur OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegAudioStream.cpp OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegAudioStream.cpp
+--- OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegAudioStream.cpp 2010-03-19 08:48:34.000000000 +0000
++++ OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegAudioStream.cpp 2011-02-01 10:52:42.000000000 +0000
+@@ -1,3 +1,10 @@
++#include <stdint.h>
++
++# if __WORDSIZE == 64
++# define UINT64_C(c) c ## UL
++# else
++# define UINT64_C(c) c ## ULL
++# endif
+
+ #include "FFmpegAudioStream.hpp"
+
+@@ -66,7 +71,7 @@
+
+
+
+-osg::AudioStream::SampleFormat FFmpegAudioStream::audioSampleFormat() const
++osg::AudioStream::XSampleFormat FFmpegAudioStream::audioSampleFormat() const
+ {
+ return m_decoder->audio_decoder().sampleFormat();
+ }
+diff -wbBur OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegAudioStream.hpp OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegAudioStream.hpp
+--- OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegAudioStream.hpp 2010-03-19 08:48:36.000000000 +0000
++++ OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegAudioStream.hpp 2011-02-01 10:52:33.000000000 +0000
+@@ -23,7 +23,7 @@
+
+ int audioFrequency() const;
+ int audioNbChannels() const;
+- osg::AudioStream::SampleFormat audioSampleFormat() const;
++ osg::AudioStream::XSampleFormat audioSampleFormat() const;
+
+ double duration() const;
+
+diff -wbBur OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp
+--- OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp 2010-03-19 09:14:34.000000000 +0000
++++ OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp 2011-02-01 10:52:12.000000000 +0000
+@@ -80,7 +79,7 @@
+
+ m_frequency = m_context->sample_rate;
+ m_nb_channels = m_context->channels;
+- m_sample_format = osg::AudioStream::SampleFormat(m_context->sample_fmt);
++ m_sample_format = osg::AudioStream::XSampleFormat(m_context->sample_fmt);
+
+ // Check stream sanity
+ if (m_context->codec_id == CODEC_ID_NONE)
+diff -wbBur OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp
+--- OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp 2010-03-19 09:14:18.000000000 +0000
++++ OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp 2011-02-01 10:51:34.000000000 +0000
+@@ -13,8 +13,7 @@
+
+ #include "BoundedMessageQueue.hpp"
+
+-
+-
++#include <libavcore/samplefmt.h>
+
+ namespace osgFFmpeg {
+
+@@ -45,7 +42,7 @@
+ bool validContext() const;
+ int frequency() const;
+ int nbChannels() const;
+- osg::AudioStream::SampleFormat sampleFormat() const;
++ osg::AudioStream::XSampleFormat sampleFormat() const;
+
+ private:
+
+@@ -71,7 +68,7 @@
+
+ int m_frequency;
+ int m_nb_channels;
+- osg::AudioStream::SampleFormat m_sample_format;
++ osg::AudioStream::XSampleFormat m_sample_format;
+
+ SinkPtr m_audio_sink;
+
+@@ -104,7 +101,7 @@
+ }
+
+
+-inline osg::AudioStream::SampleFormat FFmpegDecoderAudio::sampleFormat() const
++inline osg::AudioStream::XSampleFormat FFmpegDecoderAudio::sampleFormat() const
+ {
+ return m_sample_format;
+ }
+diff -wbBur OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegImageStream.cpp OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegImageStream.cpp
+--- OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegImageStream.cpp 2010-03-19 09:14:18.000000000 +0000
++++ OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegImageStream.cpp 2011-01-31 18:04:48.000000000 +0000
+@@ -1,3 +1,10 @@
++#include <stdint.h>
++
++# if __WORDSIZE == 64
++# define UINT64_C(c) c ## UL
++# else
++# define UINT64_C(c) c ## ULL
++# endif
+
+ #include "FFmpegImageStream.hpp"
+ #include "FFmpegAudioStream.hpp"
+diff -wbBur OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp
+--- OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp 2010-03-19 09:04:40.000000000 +0000
++++ OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp 2011-01-31 17:52:59.000000000 +0000
+@@ -1,3 +1,10 @@
++#include <stdint.h>
++
++# if __WORDSIZE == 64
++# define UINT64_C(c) c ## UL
++# else
++# define UINT64_C(c) c ## ULL
++# endif
+ /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
+ *
+ * This library is open source and may be redistributed and/or modified under