[packages/OpenSceneGraph/DEVEL-3.6] - updated to 3.6.5 (WIP, saving work)

qboosh qboosh at pld-linux.org
Wed Feb 17 07:43:02 CET 2021


commit a564a8035eb9e5a9ec2e68a15f1208e1bda547bd
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Feb 17 07:43:26 2021 +0100

    - updated to 3.6.5 (WIP, saving work)

 OpenSceneGraph.spec | 131 ++++++++++++++++++++++++++-----------------
 ffmpeg3.patch       | 159 ----------------------------------------------------
 2 files changed, 81 insertions(+), 209 deletions(-)
---
diff --git a/OpenSceneGraph.spec b/OpenSceneGraph.spec
index b381911..39c1a09 100644
--- a/OpenSceneGraph.spec
+++ b/OpenSceneGraph.spec
@@ -1,34 +1,59 @@
+#TODO: COLLADA, nvtt
+#
+# Conditional build:
+%bcond_with	fbx	# Autodesk FBX SDK support (proprietary)
+
 Summary:	Open Scene Graph - real-time visualization library
 Summary(pl.UTF-8):	Open Scene Graph - biblioteka do wizualizacji
 Name:		OpenSceneGraph
-Version:	3.5.1
-Release:	8
+Version:	3.6.5
+Release:	1
 License:	OpenSceneGraph Public Licence (based on LGPL with exceptions)
 Group:		X11/Libraries
-Source0:	http://trac.openscenegraph.org/downloads/developer_releases/%{name}-%{version}.zip
-# Source0-md5:	71b97b18f11b6c361631fc3e34fb4b67
-#Source1:	osg-doxygen-0.9.1.tar.gz
-## Source1-md5:	7e6d785d1b763aaeae03c2dc4c148805
-Patch0:		ffmpeg3.patch
-URL:		http://www.openscenegraph.org/projects/osg/
+#Source0Download: https://github.com/openscenegraph/OpenSceneGraph/releases
+Source0:	https://github.com/openscenegraph/OpenSceneGraph/archive/%{name}-%{version}.tar.gz
+# Source0-md5:	51b1c6ee5627246e78b23adbf0aa48f8
+URL:		http://www.openscenegraph.org/index.php/33-openscenegraph/4-front-page
+BuildRequires:	Coin-devel
+BuildRequires:	EGL-devel
+BuildRequires:	OpenCASCADE-devel
+BuildRequires:	OpenEXR-devel
+BuildRequires:	OpenGL-devel >= 2
 BuildRequires:	QtCore-devel
 BuildRequires:	QtOpenGL-devel
+BuildRequires:	SoXt-devel
+BuildRequires:	EGL-devel
+BuildRequires:	SDL2-devel >= 2
+# for asio
+BuildRequires:	boost-devel >= 1.37
 BuildRequires:	cairo-devel
-BuildRequires:	cmake
-BuildRequires:	freetype-devel
+BuildRequires:	cmake >= 2.8.0
+BuildRequires:	curl-devel
+BuildRequires:	dcmtk-devel
+%{?with_fbx:BuildRequires:	fbxsdk-devel}
+BuildRequires:	ffmpeg-devel
+BuildRequires:	freetype-devel >= 2
+BuildRequires:	gdal-devel
 BuildRequires:	giflib-devel
+BuildRequires:	glib2-devel >= 2.0
+BuildRequires:	gstreamer-plugins-base-devel
 BuildRequires:	gtk+2-devel
 BuildRequires:	gtkglext-devel
+BuildRequires:	libgta-devel
 BuildRequires:	libjpeg-devel
+BuildRequires:	liblas-devel
 BuildRequires:	libpng-devel
 BuildRequires:	librsvg-devel
 BuildRequires:	libtiff-devel
+BuildRequires:	libvncserver-devel
+BuildRequires:	lua52-devel >= 5.2
 BuildRequires:	pkgconfig
 BuildRequires:	poppler-glib-devel
 BuildRequires:	qt4-build
 BuildRequires:	qt4-qmake
-BuildRequires:	rpmbuild(macros) >= 1.600
+BuildRequires:	rpmbuild(macros) >= 1.605
 BuildRequires:	unzip
+BuildRequires:	xorg-lib-libX11-devel
 #BuildRequires:	xulrunner-devel
 BuildRequires:	zlib-devel
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -41,6 +66,18 @@ real-time visualization.
 Open Scene Graph to wieloplatformowa oparta o C++ i OpenGL biblioteka
 do wizualizacji w czasie rzeczywistym.
 
+%package plugins
+Summary:	Plugins for Open Scene Graph
+Summary(pl.UTF-8):	Wtyczki dla biblioteki Open Scene Graph
+Group:		Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description plugins
+Plugins for Open Scene Graph library.
+
+%description plugins -l pl.UTF-8
+Wtyczki dla biblioteki Open Scene Graph.
+
 %package devel
 Summary:	Header files for Open Scene Graph
 Summary(pl.UTF-8):	Pliki nagłówkowe dla Open Scene Graph
@@ -65,31 +102,19 @@ Examples for Open Scene Graph Library.
 %description examples -l pl.UTF-8
 Przykłady dla biblioteki Open Scene Graph.
 
-%package plugins
-Summary:	Plugins for Open Scene Graph
-Summary(pl.UTF-8):	Wtyczki dla biblioteki Open Scene Graph
-Group:		Libraries
-Requires:	%{name} = %{version}-%{release}
-
-%description plugins
-Plugins for Open Scene Graph library.
-
-%description plugins -l pl.UTF-8
-Wtyczki dla biblioteki Open Scene Graph.
-
 %prep
-%setup -q
-%patch0 -p1
+%setup -q -n %{name}-%{name}-%{version}
 
 %build
 install -d build
 cd build
-%cmake \
+%cmake .. \
 	-DDESIRED_QT_VERSION=4 \
 %ifarch x32
 	-DLIB_POSTFIX=x32 \
 %endif
-	../
+	-DOSG_USE_LOCAL_LUA_SOURCE=OFF
+
 %{__make}
 
 %install
@@ -109,44 +134,45 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
+%doc AUTHORS.txt ChangeLog LICENSE.txt NEWS.txt README.md
 %attr(755,root,root) %{_libdir}/libOpenThreads.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libOpenThreads.so.20
+%attr(755,root,root) %ghost %{_libdir}/libOpenThreads.so.21
 %attr(755,root,root) %{_libdir}/libosg.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libosg.so.141
+%attr(755,root,root) %ghost %{_libdir}/libosg.so.161
 %attr(755,root,root) %{_libdir}/libosgAnimation.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libosgAnimation.so.141
+%attr(755,root,root) %ghost %{_libdir}/libosgAnimation.so.161
 %attr(755,root,root) %{_libdir}/libosgDB.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libosgDB.so.141
+%attr(755,root,root) %ghost %{_libdir}/libosgDB.so.161
 %attr(755,root,root) %{_libdir}/libosgFX.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libosgFX.so.141
+%attr(755,root,root) %ghost %{_libdir}/libosgFX.so.161
 %attr(755,root,root) %{_libdir}/libosgGA.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libosgGA.so.141
+%attr(755,root,root) %ghost %{_libdir}/libosgGA.so.161
 %attr(755,root,root) %{_libdir}/libosgManipulator.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libosgManipulator.so.141
+%attr(755,root,root) %ghost %{_libdir}/libosgManipulator.so.161
 %attr(755,root,root) %{_libdir}/libosgParticle.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libosgParticle.so.141
+%attr(755,root,root) %ghost %{_libdir}/libosgParticle.so.161
 %attr(755,root,root) %{_libdir}/libosgPresentation.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libosgPresentation.so.141
-%attr(755,root,root) %{_libdir}/libosgQt.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libosgQt.so.141
+%attr(755,root,root) %ghost %{_libdir}/libosgPresentation.so.161
+#%attr(755,root,root) %{_libdir}/libosgQt.so.*.*.*
+#%attr(755,root,root) %ghost %{_libdir}/libosgQt.so.141
 %attr(755,root,root) %{_libdir}/libosgShadow.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libosgShadow.so.141
+%attr(755,root,root) %ghost %{_libdir}/libosgShadow.so.161
 %attr(755,root,root) %{_libdir}/libosgSim.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libosgSim.so.141
+%attr(755,root,root) %ghost %{_libdir}/libosgSim.so.161
 %attr(755,root,root) %{_libdir}/libosgTerrain.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libosgTerrain.so.141
+%attr(755,root,root) %ghost %{_libdir}/libosgTerrain.so.161
 %attr(755,root,root) %{_libdir}/libosgText.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libosgText.so.141
+%attr(755,root,root) %ghost %{_libdir}/libosgText.so.161
 %attr(755,root,root) %{_libdir}/libosgUI.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libosgUI.so.141
+%attr(755,root,root) %ghost %{_libdir}/libosgUI.so.161
 %attr(755,root,root) %{_libdir}/libosgUtil.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libosgUtil.so.141
+%attr(755,root,root) %ghost %{_libdir}/libosgUtil.so.161
 %attr(755,root,root) %{_libdir}/libosgViewer.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libosgViewer.so.141
+%attr(755,root,root) %ghost %{_libdir}/libosgViewer.so.161
 %attr(755,root,root) %{_libdir}/libosgVolume.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libosgVolume.so.141
+%attr(755,root,root) %ghost %{_libdir}/libosgVolume.so.161
 %attr(755,root,root) %{_libdir}/libosgWidget.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libosgWidget.so.141
+%attr(755,root,root) %ghost %{_libdir}/libosgWidget.so.161
 
 %files plugins
 %defattr(644,root,root,755)
@@ -164,7 +190,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/libosgManipulator.so
 %attr(755,root,root) %{_libdir}/libosgParticle.so
 %attr(755,root,root) %{_libdir}/libosgPresentation.so
-%attr(755,root,root) %{_libdir}/libosgQt.so
+#%attr(755,root,root) %{_libdir}/libosgQt.so
 %attr(755,root,root) %{_libdir}/libosgShadow.so
 %attr(755,root,root) %{_libdir}/libosgSim.so
 %attr(755,root,root) %{_libdir}/libosgTerrain.so
@@ -185,7 +211,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_pkgconfigdir}/openscenegraph-osgGA.pc
 %{_pkgconfigdir}/openscenegraph-osgManipulator.pc
 %{_pkgconfigdir}/openscenegraph-osgParticle.pc
-%{_pkgconfigdir}/openscenegraph-osgQt.pc
+#%{_pkgconfigdir}/openscenegraph-osgQt.pc
 %{_pkgconfigdir}/openscenegraph-osgShadow.pc
 %{_pkgconfigdir}/openscenegraph-osgSim.pc
 %{_pkgconfigdir}/openscenegraph-osgTerrain.pc
@@ -197,5 +223,10 @@ rm -rf $RPM_BUILD_ROOT
 
 %files examples
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/*
+%attr(755,root,root) %{_bindir}/osgarchive
+%attr(755,root,root) %{_bindir}/osgconv
+%attr(755,root,root) %{_bindir}/osgfilecache
+%attr(755,root,root) %{_bindir}/osgversion
+%attr(755,root,root) %{_bindir}/osgviewer
+%attr(755,root,root) %{_bindir}/present3D
 %{_examplesdir}/%{name}-%{version}
diff --git a/ffmpeg3.patch b/ffmpeg3.patch
deleted file mode 100644
index 3e1a9e1..0000000
--- a/ffmpeg3.patch
+++ /dev/null
@@ -1,159 +0,0 @@
---- OpenSceneGraph-3.5.1/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp~	2015-06-01 15:40:20.000000000 +0200
-+++ OpenSceneGraph-3.5.1/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp	2016-03-21 11:37:09.380644409 +0100
-@@ -226,9 +226,12 @@
-         // Open codec
-         if (avcodec_open2(m_context, p_codec, NULL) < 0)
-             throw std::runtime_error("avcodec_open() failed");
--
-+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(55, 0, 0)
-         m_context->get_buffer = avcodec_default_get_buffer;
-         m_context->release_buffer = avcodec_default_release_buffer;
-+#else
-+        m_context->get_buffer2 = avcodec_default_get_buffer2;
-+#endif
- 
-     }
- 
---- OpenSceneGraph-3.5.1/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp.orig	2016-03-21 11:37:53.888177241 +0100
-+++ OpenSceneGraph-3.5.1/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp	2016-03-21 11:54:04.889892930 +0100
-@@ -71,7 +71,7 @@
-     findAspectRatio();
- 
-     // Find out whether we support Alpha channel
--    m_alpha_channel = (m_context->pix_fmt == PIX_FMT_YUVA420P);
-+    m_alpha_channel = (m_context->pix_fmt == AV_PIX_FMT_YUVA420P);
- 
-     // Find out the framerate
-     #if LIBAVCODEC_VERSION_MAJOR >= 56
-@@ -95,20 +95,24 @@
-         throw std::runtime_error("avcodec_open() failed");
- 
-     // Allocate video frame
--    m_frame.reset(avcodec_alloc_frame());
-+    m_frame.reset(av_frame_alloc());
- 
-     // Allocate converted RGB frame
--    m_frame_rgba.reset(avcodec_alloc_frame());
--    m_buffer_rgba[0].resize(avpicture_get_size(PIX_FMT_RGB24, width(), height()));
-+    m_frame_rgba.reset(av_frame_alloc());
-+    m_buffer_rgba[0].resize(avpicture_get_size(AV_PIX_FMT_RGB24, width(), height()));
-     m_buffer_rgba[1].resize(m_buffer_rgba[0].size());
- 
-     // Assign appropriate parts of the buffer to image planes in m_frame_rgba
--    avpicture_fill((AVPicture *) (m_frame_rgba).get(), &(m_buffer_rgba[0])[0], PIX_FMT_RGB24, width(), height());
-+    avpicture_fill((AVPicture *) (m_frame_rgba).get(), &(m_buffer_rgba[0])[0], AV_PIX_FMT_RGB24, width(), height());
- 
-     // Override get_buffer()/release_buffer() from codec context in order to retrieve the PTS of each frame.
-     m_context->opaque = this;
-+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(55, 0, 0)
-     m_context->get_buffer = getBuffer;
-     m_context->release_buffer = releaseBuffer;
-+#else
-+    m_context->get_buffer2 = getBuffer;
-+#endif
- }
- 
- 
-@@ -267,8 +271,8 @@
- #ifdef USE_SWSCALE
-     if (m_swscale_ctx==0)
-     {
--        m_swscale_ctx = sws_getContext(src_width, src_height, (PixelFormat) src_pix_fmt,
--                                      src_width, src_height, (PixelFormat) dst_pix_fmt,
-+        m_swscale_ctx = sws_getContext(src_width, src_height, (AVPixelFormat) src_pix_fmt,
-+                                      src_width, src_height, (AVPixelFormat) dst_pix_fmt,
-                                       /*SWS_BILINEAR*/ SWS_BICUBIC, NULL, NULL, NULL);
-     }
- 
-@@ -315,14 +319,14 @@
-     AVPicture * const dst = (AVPicture *) m_frame_rgba.get();
- 
-     // Assign appropriate parts of the buffer to image planes in m_frame_rgba
--    avpicture_fill((AVPicture *) (m_frame_rgba).get(), &(m_buffer_rgba[m_writeBuffer])[0], PIX_FMT_RGB24, width(), height());
-+    avpicture_fill((AVPicture *) (m_frame_rgba).get(), &(m_buffer_rgba[m_writeBuffer])[0], AV_PIX_FMT_RGB24, width(), height());
- 
-     // Convert YUVA420p (i.e. YUV420p plus alpha channel) using our own routine
- 
--    if (m_context->pix_fmt == PIX_FMT_YUVA420P)
-+    if (m_context->pix_fmt == AV_PIX_FMT_YUVA420P)
-         yuva420pToRgba(dst, src, width(), height());
-     else
--        convert(dst, PIX_FMT_RGB24, src, m_context->pix_fmt, width(), height());
-+        convert(dst, AV_PIX_FMT_RGB24, src, m_context->pix_fmt, width(), height());
- 
-     // Wait 'delay' seconds before publishing the picture.
-     int i_delay = static_cast<int>(delay * 1000000 + 0.5);
-@@ -349,7 +353,7 @@
- 
- void FFmpegDecoderVideo::yuva420pToRgba(AVPicture * const dst, AVPicture * const src, int width, int height)
- {
--    convert(dst, PIX_FMT_RGB24, src, m_context->pix_fmt, width, height);
-+    convert(dst, AV_PIX_FMT_RGB24, src, m_context->pix_fmt, width, height);
- 
-     const size_t bpp = 4;
- 
-@@ -369,6 +373,7 @@
- 
- 
- 
-+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(55, 0, 0)
- int FFmpegDecoderVideo::getBuffer(AVCodecContext * const context, AVFrame * const picture)
- {
-     const FFmpegDecoderVideo * const this_ = reinterpret_cast<const FFmpegDecoderVideo*>(context->opaque);
-@@ -381,15 +386,31 @@
- 
-     return result;
- }
-+#else
-+int FFmpegDecoderVideo::getBuffer(AVCodecContext * const context, AVFrame * const picture, int flags)
-+{
-+    const FFmpegDecoderVideo * const this_ = reinterpret_cast<const FFmpegDecoderVideo*>(context->opaque);
-+
-+    const int result = avcodec_default_get_buffer2(context, picture, flags);
-+    int64_t * p_pts = reinterpret_cast<int64_t*>( av_malloc(sizeof(int64_t)) );
-+
-+    *p_pts = this_->m_packet_pts;
-+    picture->opaque = p_pts;
-+
-+    return result;
-+}
-+#endif
- 
- 
- 
- void FFmpegDecoderVideo::releaseBuffer(AVCodecContext * const context, AVFrame * const picture)
- {
-+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(55, 0, 0)
-     if (picture != 0)
-         av_freep(&picture->opaque);
- 
-     avcodec_default_release_buffer(context, picture);
-+#endif
- }
- 
- 
---- OpenSceneGraph-3.5.1/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp.orig	2016-03-21 11:55:42.261200729 +0100
-+++ OpenSceneGraph-3.5.1/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp	2016-03-21 11:55:58.214746802 +0100
-@@ -94,7 +94,11 @@
-                 int src_pix_fmt, int src_width, int src_height);
- 
- 
-+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(55, 0, 0)
-     static int getBuffer(AVCodecContext * context, AVFrame * picture);
-+#else
-+    static int getBuffer(AVCodecContext * context, AVFrame * picture, int flags);
-+#endif
-     static void releaseBuffer(AVCodecContext * context, AVFrame * picture);
- 
-     PacketQueue &           m_packets;
---- OpenSceneGraph-3.5.1/src/osgPlugins/ffmpeg/FFmpegParameters.cpp~	2013-09-05 12:04:56.000000000 +0200
-+++ OpenSceneGraph-3.5.1/src/osgPlugins/ffmpeg/FFmpegParameters.cpp	2016-03-21 11:56:17.585004570 +0100
-@@ -19,7 +19,7 @@
-     #include <libavutil/pixdesc.h>
- }
- 
--inline PixelFormat osg_av_get_pix_fmt(const char *name) { return av_get_pix_fmt(name); }
-+inline AVPixelFormat osg_av_get_pix_fmt(const char *name) { return av_get_pix_fmt(name); }
- 
- 
- namespace osgFFmpeg {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/OpenSceneGraph.git/commitdiff/a564a8035eb9e5a9ec2e68a15f1208e1bda547bd



More information about the pld-cvs-commit mailing list