diff options
author | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2014-01-20 14:35:09 +0000 |
---|---|---|
committer | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2014-01-20 14:35:09 +0000 |
commit | c9da3035def4436b3ca404a5880ab21579fe6a41 (patch) | |
tree | e836f1eec4aeb289bf15d74ce0ab5a49226b5784 /graphics/osg | |
parent | 31d87a6cc6b08302ee966e69f559a837e18cfd70 (diff) | |
download | ports-c9da3035def4436b3ca404a5880ab21579fe6a41.tar.gz ports-c9da3035def4436b3ca404a5880ab21579fe6a41.zip |
Notes
Diffstat (limited to 'graphics/osg')
-rw-r--r-- | graphics/osg/Makefile | 54 | ||||
-rw-r--r-- | graphics/osg/distinfo | 4 | ||||
-rw-r--r-- | graphics/osg/files/patch-CMakeModules-FindGTA.cmake | 25 | ||||
-rw-r--r-- | graphics/osg/files/patch-include-OpenThreads-Atomic | 11 | ||||
-rw-r--r-- | graphics/osg/files/patch-include-osg-Math | 29 | ||||
-rw-r--r-- | graphics/osg/files/patch-libav07 | 22 | ||||
-rw-r--r-- | graphics/osg/files/patch-libav9 | 284 | ||||
-rw-r--r-- | graphics/osg/files/patch-src-OpenThreads-common-Atomic.cpp | 11 | ||||
-rw-r--r-- | graphics/osg/files/patch-src-osgPlugins-ffmpeg-FFmpegDecoderAudio.cpp | 11 | ||||
-rw-r--r-- | graphics/osg/files/patch-src-osgPlugins-osc-osc-OscHostEndianess.h | 29 | ||||
-rw-r--r-- | graphics/osg/files/patch-src-osgPlugins-xine-video__out__rgb.c | 98 | ||||
-rw-r--r-- | graphics/osg/pkg-plist | 45 |
12 files changed, 132 insertions, 491 deletions
diff --git a/graphics/osg/Makefile b/graphics/osg/Makefile index 1b3714a97187..7dcfaf9f4b02 100644 --- a/graphics/osg/Makefile +++ b/graphics/osg/Makefile @@ -2,16 +2,20 @@ # $FreeBSD$ PORTNAME= osg -PORTVERSION= 3.0.1 -PORTREVISION= 9 +PORTVERSION= 3.2.0 CATEGORIES= graphics -MASTER_SITES= http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-${PORTVERSION}/source/ \ +MASTER_SITES= http://trac.openscenegraph.org/downloads/developer_releases/ \ http://mirror.amdmi3.ru/distfiles/ DISTNAME= OpenSceneGraph-${PORTVERSION} MAINTAINER= amdmi3@FreeBSD.org COMMENT= C++ OpenGL scene graph library for real-time rendering +LICENSE= OSGPL +LICENSE_NAME= OpenSceneGraph Public License +LICENSE_FILE= ${WRKSRC}/LICENSE.txt +LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept + LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \ libpng.so:${PORTSDIR}/graphics/png \ libtiff.so:${PORTSDIR}/graphics/tiff @@ -19,27 +23,28 @@ LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \ CONFLICTS= osg-devel-[0-9]* USE_ZIP= yes -USES= cmake pkgconfig +USES= cmake:outsource pkgconfig USE_GL= gl glu USE_XORG= x11 USE_LDCONFIG= yes PLIST_SUB= OSG_VERSION=${PORTVERSION} \ - OSG_SHLIBVER=80 \ - OPENTHREADS_VERSION=2.6.0 \ - OPENTHREADS_SHLIBVER=12 + OSG_SHLIBVER=100 \ + OPENTHREADS_VERSION=${PORTVERSION} \ + OPENTHREADS_SHLIBVER=13 PORTSCOUT= limitw:1,even -OPTIONS_DEFINE= CURL FREETYPE GDAL GIF INVENTOR JASPER XINE ITK \ - VNC OPENEXR FFMPEG SVG PDF XRANDR SDL +OPTIONS_DEFINE= CURL FREETYPE GDAL GIF INVENTOR JASPER XINE GTA \ + VNC OPENEXR FFMPEG SVG PDF SDL NVTT QT4 XRANDR OPTIONS_DEFAULT=FREETYPE GIF FFMPEG XRANDR GDAL_DESC= GDAL support INVENTOR_DESC= SGI OpenInventor support -ITK_DESC= InsightToolkit support +GTA_DESC= GTA file format support VNC_DESC= LibVNCServer support SDL_DESC= Use SDL (joystick support in present3d) +NVTT_DESC= Use NVidia texture tools OPTIONS_SUB= yes @@ -50,21 +55,27 @@ GIF_LIB_DEPENDS= libgif.so:${PORTSDIR}/graphics/giflib INVENTOR_LIB_DEPENDS= libInventor.so:${PORTSDIR}/graphics/inventor JASPER_LIB_DEPENDS= libjasper.so:${PORTSDIR}/graphics/jasper XINE_LIB_DEPENDS= libxine.so:${PORTSDIR}/multimedia/libxine -ITK_BUILD_DEPENDS= ${LOCALBASE}/lib/InsightToolkit/UseITK.cmake:${PORTSDIR}/science/InsightToolkit -ITK_RUN_DEPENDS= ${LOCALBASE}/lib/InsightToolkit/UseITK.cmake:${PORTSDIR}/science/InsightToolkit +GTA_LIB_DEPENDS= libgta.so:${PORTSDIR}/devel/libgta VNC_LIB_DEPENDS= libvncserver.so:${PORTSDIR}/net/libvncserver OPENEXR_LIB_DEPENDS= libIlmImf.so:${PORTSDIR}/graphics/OpenEXR FFMPEG_LIB_DEPENDS= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg SVG_LIB_DEPENDS= librsvg-2.so:${PORTSDIR}/graphics/librsvg2 PDF_LIB_DEPENDS= libpoppler-glib.so:${PORTSDIR}/graphics/poppler-glib +SDL_USE= SDL=sdl +NVTT_LIB_DEPENDS= libnvtt.so:${PORTSDIR}/graphics/nvidia-texture-tools XRANDR_CMAKE_ON= -DOSGVIEWER_USE_XRANDR:BOOL=ON XRANDR_CMAKE_OFF= -DOSGVIEWER_USE_XRANDR:BOOL=OFF +QT4_USE= QT4=corelib,gui,opengl,qmake_build,moc_build,uic_build,rcc_build +QT4_CMAKE_ON= -DOSG_USE_QT=ON +QT4_CMAKE_OFF= -DOSG_USE_QT=OFF .include <bsd.port.options.mk> # GUI toolkits are only needed for building examples, which are not even installed -FORCE_IGNORE= FLTK GLUT FOX Qt3 Qt4 wxWidgets OpenAL GtkGl # only for examples +FORCE_IGNORE= FLTK GLUT FOX Qt3 Qt5Widgets wxWidgets OpenAL GtkGl # only for examples FORCE_IGNORE+= COLLADA Performer OurDCMTK XUL FBX # not in ports +FORCE_IGNORE+= OpenVRML # ports version too old +FORCE_IGNORE+= ITK # ports version doesn't build on 10.x FORCE_REQUIRE= Threads OpenGL X11 JPEG PNG TIFF ZLIB # common & lightweight # options that affect FIND_PACKAGE @@ -104,20 +115,16 @@ FORCE_REQUIRE+= Jasper FORCE_IGNORE+= Jasper .endif -# broken (openvrml from ports is too old) -FORCE_IGNORE+= OpenVRML - .if ${PORT_OPTIONS:MXINE} FORCE_REQUIRE+= Xine .else FORCE_IGNORE+= Xine .endif -.if ${PORT_OPTIONS:MITK} -FORCE_REQUIRE+= ITK -CXXFLAGS+= -DVCL_CAN_STATIC_CONST_INIT_FLOAT=0 +.if ${PORT_OPTIONS:MGTA} +FORCE_REQUIRE+= GTA .else -FORCE_IGNORE+= ITK +FORCE_IGNORE+= GTA .endif .if ${PORT_OPTIONS:MVNC} @@ -140,11 +147,16 @@ FORCE_IGNORE+= FFmpeg .if ${PORT_OPTIONS:MSDL} FORCE_REQUIRE+= SDL -USE_SDL= sdl .else FORCE_IGNORE+= SDL .endif +.if ${PORT_OPTIONS:MNVTT} +FORCE_REQUIRE+= NVTT +.else +FORCE_IGNORE+= NVTT +.endif + # options that affect PKG_CHECK_MODULES .if ${PORT_OPTIONS:MSVG} FORCE_REQUIRE+= RSVG diff --git a/graphics/osg/distinfo b/graphics/osg/distinfo index 0e9a0637714e..fbdaf6731fd8 100644 --- a/graphics/osg/distinfo +++ b/graphics/osg/distinfo @@ -1,2 +1,2 @@ -SHA256 (OpenSceneGraph-3.0.1.zip) = 0c1103574b0a5a27c7d68d43454f1bf9c0cea114a583c42637bc8eb47b1d8296 -SIZE (OpenSceneGraph-3.0.1.zip) = 6780282 +SHA256 (OpenSceneGraph-3.2.0.zip) = ceca56e58e9ba245d5f9d0661352ddf405a7cb105341a122c5541b69c0ce032e +SIZE (OpenSceneGraph-3.2.0.zip) = 7195748 diff --git a/graphics/osg/files/patch-CMakeModules-FindGTA.cmake b/graphics/osg/files/patch-CMakeModules-FindGTA.cmake new file mode 100644 index 000000000000..8a648a5ac524 --- /dev/null +++ b/graphics/osg/files/patch-CMakeModules-FindGTA.cmake @@ -0,0 +1,25 @@ +--- CMakeModules/FindGTA.cmake.orig 2014-01-19 17:46:13.693927259 +0400 ++++ CMakeModules/FindGTA.cmake 2014-01-19 18:38:17.868997891 +0400 +@@ -8,16 +8,6 @@ + # correspond to the ./configure --prefix=$GTA_DIR + # used in building libgta. + +-INCLUDE(FindPkgConfig OPTIONAL) +- +-IF(PKG_CONFIG_FOUND) +- +- INCLUDE(FindPkgConfig) +- +- PKG_CHECK_MODULES(GTA gta) +- +-ELSE(PKG_CONFIG_FOUND) +- + FIND_PATH(GTA_INCLUDE_DIRS gta/gta.hpp + $ENV{GTA_DIR}/include + $ENV{GTA_DIR} +@@ -52,5 +42,3 @@ + IF(GTA_LIBRARIES AND GTA_INCLUDE_DIRS) + SET(GTA_FOUND "YES") + ENDIF(GTA_LIBRARIES AND GTA_INCLUDE_DIRS) +- +-ENDIF(PKG_CONFIG_FOUND) diff --git a/graphics/osg/files/patch-include-OpenThreads-Atomic b/graphics/osg/files/patch-include-OpenThreads-Atomic deleted file mode 100644 index 3061b662a747..000000000000 --- a/graphics/osg/files/patch-include-OpenThreads-Atomic +++ /dev/null @@ -1,11 +0,0 @@ ---- include/OpenThreads/Atomic.orig 2011-01-31 12:35:50.000000000 +0100 -+++ include/OpenThreads/Atomic 2013-09-18 12:41:22.000000000 +0200 -@@ -241,7 +241,7 @@ - AtomicPtr::assign(void* ptrNew, const void* const ptrOld) - { - #if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) -- return __sync_bool_compare_and_swap(&_ptr, ptrOld, ptrNew); -+ return __sync_bool_compare_and_swap(&_ptr, (void *)ptrOld, ptrNew); - #elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - return __compare_and_swap((unsigned long*)&_ptr, (unsigned long)ptrOld, (unsigned long)ptrNew); - #elif defined(_OPENTHREADS_ATOMIC_USE_SUN) diff --git a/graphics/osg/files/patch-include-osg-Math b/graphics/osg/files/patch-include-osg-Math deleted file mode 100644 index a53261098173..000000000000 --- a/graphics/osg/files/patch-include-osg-Math +++ /dev/null @@ -1,29 +0,0 @@ ---- include/osg/Math.orig 2011-05-26 20:52:08.000000000 +0400 -+++ include/osg/Math 2013-09-24 22:00:59.252519925 +0400 -@@ -20,7 +20,7 @@ - - //certain math functions were not defined until 10.2 - //so this code checks the version so it can add in workarounds for older versions. --#ifdef __APPLE__ -+#if defined(__APPLE__) - // Using std::isnan will work for OS X, but use of <cmath> - // and std:: are not necessarily portible with other systems so - // the include of <cmath> is isolated here. -@@ -38,6 +38,8 @@ - #define APPLE_PRE_10_2 - #endif - #endif -+#elif defined(__FreeBSD__) -+#include <cmath> - #endif - - #if defined(_MSC_VER) -@@ -207,7 +209,7 @@ - inline bool isNaN(float v) { return _isnan(v)!=0; } - inline bool isNaN(double v) { return _isnan(v)!=0; } - #else -- #if defined(__APPLE__) -+ #if defined(__APPLE__) || defined(__FreeBSD__) - inline bool isNaN(float v) { return std::isnan(v); } - inline bool isNaN(double v) { return std::isnan(v); } - #else diff --git a/graphics/osg/files/patch-libav07 b/graphics/osg/files/patch-libav07 deleted file mode 100644 index e0c6284f167c..000000000000 --- a/graphics/osg/files/patch-libav07 +++ /dev/null @@ -1,22 +0,0 @@ -diff -ruN src/osgPlugins/ffmpeg/FFmpegHeaders.hpp src/osgPlugins/ffmpeg/FFmpegHeaders.hpp ---- src/osgPlugins/ffmpeg/FFmpegHeaders.hpp 2011-06-17 10:41:56.000000000 +0200 -+++ src/osgPlugins/ffmpeg/FFmpegHeaders.hpp 2011-11-17 19:44:33.194607494 +0100 -@@ -9,12 +9,13 @@ - #define FF_API_OLD_SAMPLE_FMT 0 - #include <errno.h> // for error codes defined in avformat.h - #include <stdint.h> --#include <avcodec.h> --#include <avformat.h> --#include <avdevice.h> -+#include <libavcodec/avcodec.h> -+#include <libavformat/avformat.h> -+#include <libavdevice/avdevice.h> -+#include <libavutil/mathematics.h> - --#ifdef USE_SWSCALE -- #include <swscale.h> -+#ifdef USE_SWSCALE -+ #include <libswscale/swscale.h> - #endif - - } diff --git a/graphics/osg/files/patch-libav9 b/graphics/osg/files/patch-libav9 deleted file mode 100644 index b0ed4296f2d3..000000000000 --- a/graphics/osg/files/patch-libav9 +++ /dev/null @@ -1,284 +0,0 @@ -Patch by lu_zero -https://bugs.gentoo.org/show_bug.cgi?id=439606 -upstream svn rev. 13335 contains similar changes. -no need to upstream this patch. - -diff -burN CMakeModules/FindFFmpeg.cmake CMakeModules/FindFFmpeg.cmake ---- CMakeModules/FindFFmpeg.cmake 2011-04-19 13:40:22.000000000 +0200 -+++ CMakeModules/FindFFmpeg.cmake 2012-11-22 13:59:28.303401170 +0100 -@@ -131,20 +131,16 @@ - SET(FFMPEG_FOUND "YES") - - SET(FFMPEG_INCLUDE_DIRS -- ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS} ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS}/libavformat -- ${FFMPEG_LIBAVDEVICE_INCLUDE_DIRS} ${FFMPEG_LIBAVDEVICE_INCLUDE_DIRS}/libavdevice -- ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS} ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS}/libavcodec -- ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS} ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS}/libavutil -+ ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS} -+ ${FFMPEG_LIBAVDEVICE_INCLUDE_DIRS} -+ ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS} -+ ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS} - ) - - IF (FFMPEG_STDINT_INCLUDE_DIR) - SET(FFMPEG_INCLUDE_DIRS - ${FFMPEG_INCLUDE_DIRS} - ${FFMPEG_STDINT_INCLUDE_DIR} -- ${FFMPEG_STDINT_INCLUDE_DIR}/libavformat -- ${FFMPEG_STDINT_INCLUDE_DIR}/libavdevice -- ${FFMPEG_STDINT_INCLUDE_DIR}/libavcodec -- ${FFMPEG_STDINT_INCLUDE_DIR}/libavutil - ) - ENDIF() - -diff -burN src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp ---- src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp 2011-04-19 13:40:22.000000000 +0200 -+++ src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp 2012-11-22 15:03:53.668601596 +0100 -@@ -89,7 +89,7 @@ - // m_context->flags |= CODEC_FLAG_TRUNCATED; - - // Open codec -- if (avcodec_open(m_context, p_codec) < 0) -+ if (avcodec_open2(m_context, p_codec, NULL) < 0) - throw std::runtime_error("avcodec_open() failed"); - } - -Binary files src/osgPlugins/ffmpeg/.FFmpegDecoderAudio.cpp.swp and src/osgPlugins/ffmpeg/.FFmpegDecoderAudio.cpp.swp differ -diff -burN src/osgPlugins/ffmpeg/FFmpegDecoder.cpp src/osgPlugins/ffmpeg/FFmpegDecoder.cpp ---- src/osgPlugins/ffmpeg/FFmpegDecoder.cpp 2011-07-15 12:25:12.000000000 +0200 -+++ src/osgPlugins/ffmpeg/FFmpegDecoder.cpp 2012-11-22 15:59:39.569775078 +0100 -@@ -64,21 +64,12 @@ - - OSG_NOTICE<<"Attempting to stream "<<filename<<std::endl; - -- AVFormatParameters formatParams; -- memset(&formatParams, 0, sizeof(AVFormatParameters)); - AVInputFormat *iformat; -+ AVDictionary *options = NULL; - -- formatParams.channel = 0; -- formatParams.standard = 0; --#if 1 -- formatParams.width = 320; -- formatParams.height = 240; --#else -- formatParams.width = 640; -- formatParams.height = 480; --#endif -- formatParams.time_base.num = 1; -- formatParams.time_base.den = 30; -+ av_dict_set(&options, "video_size", "320x240", 0); -+ -+ av_dict_set(&options, "framerate", "1/30", 0); - - std::string format = "video4linux2"; - iformat = av_find_input_format(format.c_str()); -@@ -92,7 +83,7 @@ - OSG_NOTICE<<"Failed to find input format: "<<format<<std::endl; - } - -- int error = av_open_input_file(&p_format_context, filename.c_str(), iformat, 0, &formatParams); -+ int error = avformat_open_input(&p_format_context, filename.c_str(), iformat, &options); - if (error != 0) - { - std::string error_str; -@@ -110,21 +101,21 @@ - default: error_str = "Unknown error"; break; - } - -- throw std::runtime_error("av_open_input_file() failed : " + error_str); -+ throw std::runtime_error("avformat_open_input() failed : " + error_str); - } - } - else - { - AVInputFormat* av_format = (parameters ? parameters->getFormat() : 0); -- AVFormatParameters* av_params = (parameters ? parameters->getFormatParameter() : 0); -- if (av_open_input_file(&p_format_context, filename.c_str(), av_format, 0, av_params) !=0 ) -+ AVDictionary* av_options = (parameters ? parameters->getOptions() : NULL); -+ if (avformat_open_input(&p_format_context, filename.c_str(), av_format, &av_options) !=0 ) - throw std::runtime_error("av_open_input_file() failed"); - } - - m_format_context.reset(p_format_context); - - // Retrieve stream info -- if (av_find_stream_info(p_format_context) < 0) -+ if (avformat_find_stream_info(p_format_context, NULL) < 0) - throw std::runtime_error("av_find_stream_info() failed"); - - m_duration = double(m_format_context->duration) / AV_TIME_BASE; -@@ -134,7 +125,7 @@ - m_clocks.reset(m_start); - - // Dump info to stderr -- dump_format(p_format_context, 0, filename.c_str(), false); -+ av_dump_format(p_format_context, 0, filename.c_str(), false); - - // Find and open the first video and audio streams (note that audio stream is optional and only opened if possible) - -@@ -292,7 +283,7 @@ - // Read the next frame packet - if (av_read_frame(m_format_context.get(), &packet) < 0) - { -- if (url_ferror(m_format_context->pb) == 0) -+ if (m_format_context->pb->eof_reached == 0) - end_of_stream = true; - else - throw std::runtime_error("av_read_frame() failed"); -Binary files src/osgPlugins/ffmpeg/.FFmpegDecoder.cpp.swp and src/osgPlugins/ffmpeg/.FFmpegDecoder.cpp.swp differ -diff -burN src/osgPlugins/ffmpeg/FFmpegDecoder.hpp src/osgPlugins/ffmpeg/FFmpegDecoder.hpp ---- src/osgPlugins/ffmpeg/FFmpegDecoder.hpp 2011-04-19 13:40:22.000000000 +0200 -+++ src/osgPlugins/ffmpeg/FFmpegDecoder.hpp 2012-11-22 15:59:18.895774005 +0100 -@@ -46,8 +46,8 @@ - { - if (_ptr) - { -- OSG_NOTICE<<"Calling av_close_input_file("<<_ptr<<")"<<std::endl; -- av_close_input_file(_ptr); -+ OSG_NOTICE<<"Calling avformat_close_input("<<_ptr<<")"<<std::endl; -+ avformat_close_input(&_ptr); - } - _ptr = 0; - } -@@ -151,8 +151,7 @@ - - inline double FFmpegDecoder::creation_time() const - { -- if(m_format_context) return m_format_context->timestamp; -- else return HUGE_VAL; -+ return HUGE_VAL; - } - - inline double FFmpegDecoder::duration() const -diff -burN src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp ---- src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp 2011-04-19 13:40:22.000000000 +0200 -+++ src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp 2012-11-22 16:01:30.906780849 +0100 -@@ -83,7 +83,7 @@ - m_context = stream->codec; - - // Trust the video size given at this point -- // (avcodec_open seems to sometimes return a 0x0 size) -+ // (avcodec_open2 seems to sometimes return a 0x0 size) - m_width = m_context->width; - m_height = m_context->height; - findAspectRatio(); -@@ -105,8 +105,8 @@ - // m_context->flags |= CODEC_FLAG_TRUNCATED; - - // Open codec -- if (avcodec_open(m_context, m_codec) < 0) -- throw std::runtime_error("avcodec_open() failed"); -+ if (avcodec_open2(m_context, m_codec, NULL) < 0) -+ throw std::runtime_error("avcodec_open2() failed"); - - // Allocate video frame - m_frame.reset(avcodec_alloc_frame()); -Binary files src/osgPlugins/ffmpeg/.FFmpegDecoderVideo.cpp.swp and src/osgPlugins/ffmpeg/.FFmpegDecoderVideo.cpp.swp differ -diff -burN src/osgPlugins/ffmpeg/FFmpegParameters.cpp src/osgPlugins/ffmpeg/FFmpegParameters.cpp ---- src/osgPlugins/ffmpeg/FFmpegParameters.cpp 2011-07-15 12:25:12.000000000 +0200 -+++ src/osgPlugins/ffmpeg/FFmpegParameters.cpp 2012-11-22 17:20:09.019025477 +0100 -@@ -8,7 +8,7 @@ - #if LIBAVCODEC_VERSION_MAJOR >= 53 - extern "C" - { -- #include <parseutils.h> -+ #include <libavutil/parseutils.h> - } - #define av_parse_video_frame_size av_parse_video_size - #define av_parse_video_frame_rate av_parse_video_rate -@@ -19,7 +19,7 @@ - - extern "C" - { -- #include <pixdesc.h> -+ #include <libavutil/pixdesc.h> - } - - inline PixelFormat osg_av_get_pix_fmt(const char *name) { return av_get_pix_fmt(name); } -@@ -34,14 +34,15 @@ - - - FFmpegParameters::FFmpegParameters() : -- m_format(0) --{ -- memset(&m_parameters, 0, sizeof(m_parameters)); --} -+ m_format(0), -+ m_options(NULL) -+{} - - - FFmpegParameters::~FFmpegParameters() --{} -+{ -+ av_dict_free(&m_options); -+} - - - void FFmpegParameters::parse(const std::string& name, const std::string& value) -@@ -59,40 +60,19 @@ - } - else if (name == "pixel_format") - { -- m_parameters.pix_fmt = osg_av_get_pix_fmt(value.c_str()); -+ av_dict_set(&m_options, "pixel_format", value.c_str(), 0); - } - else if (name == "frame_size") - { -- int frame_width = 0, frame_height = 0; -- if (av_parse_video_frame_size(&frame_width, &frame_height, value.c_str()) < 0) -- { -- OSG_NOTICE<<"Failed to apply frame size: "<<value.c_str()<<std::endl; -- return; -- } -- if ((frame_width % 2) != 0 || (frame_height % 2) != 0) -- { -- OSG_NOTICE<<"Frame size must be a multiple of 2: "<<frame_width<<"x"<<frame_height<<std::endl; -- return; -- } -- m_parameters.width = frame_width; -- m_parameters.height = frame_height; -+ av_dict_set(&m_options, "video_size", value.c_str(), 0); - } - else if (name == "frame_rate") - { -- AVRational frame_rate; -- if (av_parse_video_frame_rate(&frame_rate, value.c_str()) < 0) -- { -- OSG_NOTICE<<"Failed to apply frame rate: "<<value.c_str()<<std::endl; -- return; -- } -- m_parameters.time_base.den = frame_rate.num; -- m_parameters.time_base.num = frame_rate.den; -+ av_dict_set(&m_options, "framerate", value.c_str(), 0); - } - else if (name == "audio_sample_rate") - { -- int audio_sample_rate = 44100; -- std::stringstream ss(value); ss >> audio_sample_rate; -- m_parameters.sample_rate = audio_sample_rate; -+ av_dict_set(&m_options, "sample_rate", value.c_str(), 0); - } - } - -diff -burN src/osgPlugins/ffmpeg/FFmpegParameters.hpp src/osgPlugins/ffmpeg/FFmpegParameters.hpp ---- src/osgPlugins/ffmpeg/FFmpegParameters.hpp 2011-04-19 13:40:22.000000000 +0200 -+++ src/osgPlugins/ffmpeg/FFmpegParameters.hpp 2012-11-22 15:23:27.490662455 +0100 -@@ -21,14 +21,14 @@ - bool isFormatAvailable() const { return m_format!=NULL; } - - AVInputFormat* getFormat() { return m_format; } -- AVFormatParameters* getFormatParameter() { return &m_parameters; } -+ AVDictionary* getOptions() { return m_options; } - - void parse(const std::string& name, const std::string& value); - - protected: - - AVInputFormat* m_format; -- AVFormatParameters m_parameters; -+ AVDictionary* m_options; - }; - - diff --git a/graphics/osg/files/patch-src-OpenThreads-common-Atomic.cpp b/graphics/osg/files/patch-src-OpenThreads-common-Atomic.cpp deleted file mode 100644 index ef439e271090..000000000000 --- a/graphics/osg/files/patch-src-OpenThreads-common-Atomic.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/OpenThreads/common/Atomic.cpp.orig 2011-04-19 13:40:22.000000000 +0200 -+++ src/OpenThreads/common/Atomic.cpp 2013-09-18 11:26:03.000000000 +0200 -@@ -143,7 +143,7 @@ - AtomicPtr::assign(void* ptrNew, const void* const ptrOld) - { - #if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) -- return __sync_bool_compare_and_swap(&_ptr, ptrOld, ptrNew); -+ return __sync_bool_compare_and_swap(&_ptr, (void *)ptrOld, ptrNew); - #elif defined(_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED) - return ptrOld == InterlockedCompareExchangePointer((PVOID volatile*)&_ptr, (PVOID)ptrNew, (PVOID)ptrOld); - #elif defined(_OPENTHREADS_ATOMIC_USE_BSD_ATOMIC) diff --git a/graphics/osg/files/patch-src-osgPlugins-ffmpeg-FFmpegDecoderAudio.cpp b/graphics/osg/files/patch-src-osgPlugins-ffmpeg-FFmpegDecoderAudio.cpp deleted file mode 100644 index 1c98be72e403..000000000000 --- a/graphics/osg/files/patch-src-osgPlugins-ffmpeg-FFmpegDecoderAudio.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp.orig 2013-10-28 13:22:11.997950234 -0200 -+++ src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp 2013-10-28 13:22:39.838945189 -0200 -@@ -9,6 +9,8 @@ - //#include <iostream> - - -+#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio -+ - - namespace osgFFmpeg { - diff --git a/graphics/osg/files/patch-src-osgPlugins-osc-osc-OscHostEndianess.h b/graphics/osg/files/patch-src-osgPlugins-osc-osc-OscHostEndianess.h new file mode 100644 index 000000000000..54b5c92be57e --- /dev/null +++ b/graphics/osg/files/patch-src-osgPlugins-osc-osc-OscHostEndianess.h @@ -0,0 +1,29 @@ +Index: src/osgPlugins/osc/osc/OscHostEndianness.h +=================================================================== +--- src/osgPlugins/osc/osc/OscHostEndianness.h (revision 13802) ++++ src/osgPlugins/osc/osc/OscHostEndianness.h (working copy) +@@ -60,6 +60,15 @@ + #else + #error Unknown machine endianness detected. + #endif ++ #elif defined(__FreeBSD__) ++ #include <sys/endian.h> ++ #if (_BYTE_ORDER == _LITTLE_ENDIAN) ++ #define __LITTLE_ENDIAN__ ++ #elif (_BYTE_ORDER == _BIG_ENDIAN) ++ #define __BIG_ENDIAN__ ++ #else ++ #error Unknown machine endianness detected. ++ #endif + #endif + + #if defined(__LITTLE_ENDIAN__) +@@ -74,7 +83,7 @@ + + #else + +- #error please edit OSCHostEndianness.h to configure endianness ++ #error please edit OscHostEndianness.h to configure endianness + + #endif + diff --git a/graphics/osg/files/patch-src-osgPlugins-xine-video__out__rgb.c b/graphics/osg/files/patch-src-osgPlugins-xine-video__out__rgb.c deleted file mode 100644 index 41f1c6bf8dc2..000000000000 --- a/graphics/osg/files/patch-src-osgPlugins-xine-video__out__rgb.c +++ /dev/null @@ -1,98 +0,0 @@ ---- src/osgPlugins/xine/video_out_rgb.c.orig -+++ src/osgPlugins/xine/video_out_rgb.c -@@ -51,6 +51,11 @@ - #include "xine/video_out.h" - #include "video_out_rgb.h" - -+#if !(XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2)) -+#define round round_not -+#include <libavutil/mem.h> -+#undef round -+#endif - - #define THIS "video_out_rgb" - -@@ -2235,9 +2240,15 @@ rgbout_frame_dispose(vo_frame_t* vo_fram - - EVAL(vo_frame != NULL) - -+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2) - release(frame->chunk[0]); - release(frame->chunk[1]); - release(frame->chunk[2]); -+#else -+ av_freep(frame->chunk[0]); -+ av_freep(frame->chunk[1]); -+ av_freep(frame->chunk[2]); -+#endif - free(frame); - - FAILURE: -@@ -2301,9 +2312,15 @@ rgbout_update_frame_format(vo_driver_t* - this->frame_width = frame->width; - this->frame_height = frame->height; - -+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2) - release(frame->chunk[0]); - release(frame->chunk[1]); - release(frame->chunk[2]); -+#else -+ av_freep(frame->chunk[0]); -+ av_freep(frame->chunk[1]); -+ av_freep(frame->chunk[2]); -+#endif - - CHECK_FRAME: - switch(frame->format) -@@ -2320,6 +2337,7 @@ CHECK_FRAME: - frame->vo_frame.pitches[0] = (frame->width > 7) ? frame->width : 8; - frame->vo_frame.pitches[1] = (frame->width > 15) ? (frame->width >> 1) : 8; - frame->vo_frame.pitches[2] = frame->vo_frame.pitches[1]; -+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2) - frame->vo_frame.base[0] = (uint8_t*) xine_xmalloc_aligned(16, - frame->vo_frame.pitches[0] * frame->height, - &(frame->chunk[0])); -@@ -2329,6 +2347,14 @@ CHECK_FRAME: - frame->vo_frame.base[2] = (uint8_t*) xine_xmalloc_aligned(16, - frame->vo_frame.pitches[2] * (frame->height >> 1), - &(frame->chunk[2])); -+#else -+ frame->vo_frame.base[0] = (uint8_t*)(frame->chunk[0] = -+ av_mallocz(frame->vo_frame.pitches[0] * frame->height)); -+ frame->vo_frame.base[1] = (uint8_t*)(frame->chunk[1] = -+ av_mallocz(frame->vo_frame.pitches[1] * (frame->height >> 1))); -+ frame->vo_frame.base[2] = (uint8_t*)(frame->chunk[2] = -+ av_mallocz(frame->vo_frame.pitches[2] * (frame->height >> 1))); -+#endif - } - break; - -@@ -2344,9 +2370,14 @@ CHECK_FRAME: - frame->vo_frame.pitches[0] = (frame->width > 3) ? (frame->width << 1) : 8; - frame->vo_frame.pitches[1] = 0; - frame->vo_frame.pitches[2] = 0; -+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2) - frame->vo_frame.base[0] = (uint8_t*) xine_xmalloc_aligned(16, - frame->vo_frame.pitches[0] * frame->height, - &(frame->chunk[0])); -+#else -+ frame->vo_frame.base[0] = (uint8_t*)(frame->chunk[0] = -+ av_mallocz(frame->vo_frame.pitches[0] * frame->height)); -+#endif - frame->vo_frame.base[1] = NULL; - frame->vo_frame.base[2] = NULL; - } -@@ -2767,8 +2798,13 @@ init_class(xine_t* xine, void* vo_visual - clear(rgb_class, sizeof(rgbout_class_t)); - - rgb_class->driver_class.open_plugin = open_plugin; -+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2) - rgb_class->driver_class.get_identifier = get_identifier; - rgb_class->driver_class.get_description = get_description; -+#else -+ rgb_class->driver_class.identifier = get_identifier(NULL); -+ rgb_class->driver_class.description = get_description(NULL); -+#endif - rgb_class->driver_class.dispose = dispose_class; - - return(rgb_class); diff --git a/graphics/osg/pkg-plist b/graphics/osg/pkg-plist index 31a4e683871f..2d311d5b9fa9 100644 --- a/graphics/osg/pkg-plist +++ b/graphics/osg/pkg-plist @@ -112,6 +112,7 @@ include/osg/OccluderNode include/osg/OcclusionQueryNode include/osg/OperationThread include/osg/PagedLOD +include/osg/PatchParameter include/osg/Plane include/osg/Point include/osg/PointSprite @@ -120,6 +121,7 @@ include/osg/PolygonOffset include/osg/PolygonStipple include/osg/Polytope include/osg/PositionAttitudeTransform +include/osg/PrimitiveRestartIndex include/osg/PrimitiveSet include/osg/Program include/osg/Projection @@ -127,6 +129,7 @@ include/osg/ProxyNode include/osg/Quat include/osg/Referenced include/osg/RenderInfo +include/osg/SampleMaski include/osg/Scissor include/osg/Sequence include/osg/ShadeModel @@ -157,6 +160,7 @@ include/osg/Texture2D include/osg/Texture2DArray include/osg/Texture2DMultisample include/osg/Texture3D +include/osg/TextureBuffer include/osg/TextureCubeMap include/osg/TextureRectangle include/osg/Timer @@ -171,18 +175,29 @@ include/osg/Vec2 include/osg/Vec2b include/osg/Vec2d include/osg/Vec2f +include/osg/Vec2i include/osg/Vec2s +include/osg/Vec2ub +include/osg/Vec2ui +include/osg/Vec2us include/osg/Vec3 include/osg/Vec3b include/osg/Vec3d include/osg/Vec3f +include/osg/Vec3i include/osg/Vec3s +include/osg/Vec3ub +include/osg/Vec3ui +include/osg/Vec3us include/osg/Vec4 include/osg/Vec4b include/osg/Vec4d include/osg/Vec4f +include/osg/Vec4i include/osg/Vec4s include/osg/Vec4ub +include/osg/Vec4ui +include/osg/Vec4us include/osg/Version include/osg/VertexProgram include/osg/View @@ -288,6 +303,7 @@ include/osgFX/Version include/osgGA/AnimationPathManipulator include/osgGA/CameraManipulator include/osgGA/CameraViewSwitchManipulator +include/osgGA/Device include/osgGA/DriveManipulator include/osgGA/EventQueue include/osgGA/EventVisitor @@ -382,9 +398,18 @@ include/osgParticle/range include/osgPresentation/AnimationMaterial include/osgPresentation/CompileSlideCallback include/osgPresentation/Export +include/osgPresentation/KeyEventHandler include/osgPresentation/PickEventHandler +include/osgPresentation/PropertyManager include/osgPresentation/SlideEventHandler include/osgPresentation/SlideShowConstructor +include/osgPresentation/Timeout +%%QT4%%include/osgQt/Export +%%QT4%%include/osgQt/GraphicsWindowQt +%%QT4%%include/osgQt/QFontImplementation +%%QT4%%include/osgQt/QGraphicsViewAdapter +%%QT4%%include/osgQt/QWebViewImage +%%QT4%%include/osgQt/QWidgetImage include/osgShadow/ConvexPolyhedron include/osgShadow/DebugShadowMap include/osgShadow/Export @@ -396,6 +421,7 @@ include/osgShadow/OccluderGeometry include/osgShadow/ParallelSplitShadowMap include/osgShadow/ProjectionShadowMap include/osgShadow/ShadowMap +include/osgShadow/ShadowSettings include/osgShadow/ShadowTechnique include/osgShadow/ShadowTexture include/osgShadow/ShadowVolume @@ -403,6 +429,7 @@ include/osgShadow/ShadowedScene include/osgShadow/SoftShadowMap include/osgShadow/StandardShadowMap include/osgShadow/Version +include/osgShadow/ViewDependentShadowMap include/osgShadow/ViewDependentShadowTechnique include/osgSim/BlinkSequence include/osgSim/ColorRange @@ -467,6 +494,7 @@ include/osgUtil/LineSegmentIntersector include/osgUtil/MeshOptimizers include/osgUtil/OperationArrayFunctor include/osgUtil/Optimizer +include/osgUtil/PerlinNoise include/osgUtil/PlaneIntersector include/osgUtil/PolytopeIntersector include/osgUtil/PositionalStateContainer @@ -493,6 +521,7 @@ include/osgUtil/Version include/osgViewer/CompositeViewer include/osgViewer/Export include/osgViewer/GraphicsWindow +include/osgViewer/Keystone include/osgViewer/Renderer include/osgViewer/Scene include/osgViewer/Version @@ -564,6 +593,9 @@ lib/libosgParticle.so.%%OSG_SHLIBVER%% lib/libosgPresentation.so lib/libosgPresentation.so.%%OSG_VERSION%% lib/libosgPresentation.so.%%OSG_SHLIBVER%% +%%QT4%%lib/libosgQt.so +%%QT4%%lib/libosgQt.so.%%OSG_VERSION%% +%%QT4%%lib/libosgQt.so.%%OSG_SHLIBVER%% lib/libosgShadow.so lib/libosgShadow.so.%%OSG_VERSION%% lib/libosgShadow.so.%%OSG_SHLIBVER%% @@ -608,7 +640,6 @@ lib/osgPlugins-%%OSG_VERSION%%/osgdb_deprecated_osgtext.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_deprecated_osgviewer.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_deprecated_osgvolume.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_deprecated_osgwidget.so -%%ITK%%lib/osgPlugins-%%OSG_VERSION%%/osgdb_dicom.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_dot.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_dw.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_dxf.so @@ -616,24 +647,27 @@ lib/osgPlugins-%%OSG_VERSION%%/osgdb_dxf.so %%FFMPEG%%lib/osgPlugins-%%OSG_VERSION%%/osgdb_ffmpeg.so %%FREETYPE%%lib/osgPlugins-%%OSG_VERSION%%/osgdb_freetype.so %%GDAL%%lib/osgPlugins-%%OSG_VERSION%%/osgdb_gdal.so -lib/osgPlugins-%%OSG_VERSION%%/osgdb_geo.so %%GIF%%lib/osgPlugins-%%OSG_VERSION%%/osgdb_gif.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_glsl.so +%%GTA%%lib/osgPlugins-%%OSG_VERSION%%/osgdb_gta.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_gz.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_hdr.so %%INVENTOR%%lib/osgPlugins-%%OSG_VERSION%%/osgdb_iv.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_ive.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_jpeg.so %%JASPER%%lib/osgPlugins-%%OSG_VERSION%%/osgdb_jp2.so +lib/osgPlugins-%%OSG_VERSION%%/osgdb_ktx.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_logo.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_lwo.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_lws.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_md2.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_mdl.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_normals.so +%%NVTT%%lib/osgPlugins-%%OSG_VERSION%%/osgdb_nvtt.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_obj.so %%GDAL%%lib/osgPlugins-%%OSG_VERSION%%/osgdb_ogr.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_openflight.so +lib/osgPlugins-%%OSG_VERSION%%/osgdb_osc.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_osg.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_osga.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_osgshadow.so @@ -648,6 +682,7 @@ lib/osgPlugins-%%OSG_VERSION%%/osgdb_png.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_pnm.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_pov.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_pvr.so +%%QT4%%lib/osgPlugins-%%OSG_VERSION%%/osgdb_qfont.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_revisions.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_rgb.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_rot.so @@ -655,13 +690,16 @@ lib/osgPlugins-%%OSG_VERSION%%/osgdb_scale.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_serializers_osg.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_serializers_osganimation.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_serializers_osgfx.so +lib/osgPlugins-%%OSG_VERSION%%/osgdb_serializers_osgga.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_serializers_osgmanipulator.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_serializers_osgparticle.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_serializers_osgshadow.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_serializers_osgsim.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_serializers_osgterrain.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_serializers_osgtext.so +lib/osgPlugins-%%OSG_VERSION%%/osgdb_serializers_osgviewer.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_serializers_osgvolume.so +%%SDL%%lib/osgPlugins-%%OSG_VERSION%%/osgdb_sdl.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_shp.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_stl.so %%SVG%%lib/osgPlugins-%%OSG_VERSION%%/osgdb_svg.so @@ -669,6 +707,7 @@ lib/osgPlugins-%%OSG_VERSION%%/osgdb_tga.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_tgz.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_tiff.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_trans.so +lib/osgPlugins-%%OSG_VERSION%%/osgdb_trk.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_txf.so lib/osgPlugins-%%OSG_VERSION%%/osgdb_txp.so %%VNC%%lib/osgPlugins-%%OSG_VERSION%%/osgdb_vnc.so @@ -683,6 +722,7 @@ libdata/pkgconfig/openscenegraph-osgFX.pc libdata/pkgconfig/openscenegraph-osgGA.pc libdata/pkgconfig/openscenegraph-osgManipulator.pc libdata/pkgconfig/openscenegraph-osgParticle.pc +%%QT4%%libdata/pkgconfig/openscenegraph-osgQt.pc libdata/pkgconfig/openscenegraph-osgShadow.pc libdata/pkgconfig/openscenegraph-osgSim.pc libdata/pkgconfig/openscenegraph-osgTerrain.pc @@ -704,6 +744,7 @@ libdata/pkgconfig/openthreads.pc @dirrm include/osgTerrain @dirrm include/osgSim @dirrm include/osgShadow +%%QT4%%@dirrm include/osgQt @dirrm include/osgPresentation @dirrm include/osgParticle @dirrm include/osgManipulator |