From: Jakub Bogusz Date: Wed, 17 Feb 2021 06:43:26 +0000 (+0100) Subject: - updated to 3.6.5 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=489984cc2bfcd54b7f1e5480eab669ab0f3648e6;p=packages%2FOpenSceneGraph.git - updated to 3.6.5 --- diff --git a/OpenSceneGraph-OpenCASCADE.patch b/OpenSceneGraph-OpenCASCADE.patch new file mode 100644 index 0000000..df22925 --- /dev/null +++ b/OpenSceneGraph-OpenCASCADE.patch @@ -0,0 +1,11 @@ +--- OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp.orig 2020-01-31 12:03:07.000000000 +0100 ++++ OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp 2023-09-06 21:48:10.078847663 +0200 +@@ -211,7 +211,7 @@ osg::ref_ptr ReaderWritte + { + // populate vertex list + // Ref: http://www.opencascade.org/org/forum/thread_16694/?forum=3 +- gp_Pnt pt = (triangulation->Nodes())(j).Transformed(transformation * location.Transformation()); ++ gp_Pnt pt = triangulation->Node(j).Transformed(transformation * location.Transformation()); + vertexList->push_back(osg::Vec3(pt.X(), pt.Y(), pt.Z())); + + // populate color list diff --git a/OpenSceneGraph-asio.patch b/OpenSceneGraph-asio.patch index 998563d..fc9d5f4 100644 --- a/OpenSceneGraph-asio.patch +++ b/OpenSceneGraph-asio.patch @@ -1,11 +1,96 @@ ---- OpenSceneGraph-3.5.1/src/osgPlugins/RestHttpDevice/server.cpp.orig 2013-06-19 19:25:55.000000000 +0200 -+++ OpenSceneGraph-3.5.1/src/osgPlugins/RestHttpDevice/server.cpp 2023-03-29 21:53:19.150878828 +0200 -@@ -23,7 +23,7 @@ server::server(const std::string& addres +diff -rupN --no-dereference OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/RestHttpDevice/connection.cpp OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/RestHttpDevice/connection.cpp +--- OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/RestHttpDevice/connection.cpp 2020-01-31 12:03:07.000000000 +0100 ++++ OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/RestHttpDevice/connection.cpp 2022-11-13 19:16:22.452241561 +0100 +@@ -10,7 +10,6 @@ + + #include "connection.hpp" + #include +-#include + #include "request_handler.hpp" + #include + +@@ -39,9 +38,9 @@ void connection::start() + OSG_DEBUG << "RestHttpDevice :: connection::start" << std::endl; + + socket_.async_read_some(asio::buffer(buffer_), +- boost::bind(&connection::handle_read, shared_from_this(), +- asio::placeholders::error, +- asio::placeholders::bytes_transferred)); ++ std::bind(&connection::handle_read, shared_from_this(), ++ std::placeholders::_1, ++ std::placeholders::_2)); + } + + void connection::handle_read(const asio::error_code& e, +@@ -57,22 +56,22 @@ void connection::handle_read(const asio: + { + request_handler_.handle_request(request_, reply_); + asio::async_write(socket_, reply_.to_buffers(), +- boost::bind(&connection::handle_write, shared_from_this(), +- asio::placeholders::error)); ++ std::bind(&connection::handle_write, shared_from_this(), ++ std::placeholders::_1)); + } + else if (!result) + { + reply_ = reply::stock_reply(reply::bad_request); + asio::async_write(socket_, reply_.to_buffers(), +- boost::bind(&connection::handle_write, shared_from_this(), +- asio::placeholders::error)); ++ std::bind(&connection::handle_write, shared_from_this(), ++ std::placeholders::_1)); + } + else + { + socket_.async_read_some(asio::buffer(buffer_), +- boost::bind(&connection::handle_read, shared_from_this(), +- asio::placeholders::error, +- asio::placeholders::bytes_transferred)); ++ std::bind(&connection::handle_read, shared_from_this(), ++ std::placeholders::_1, ++ std::placeholders::_2)); + } + } + +diff -rupN --no-dereference OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/RestHttpDevice/server.cpp OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/RestHttpDevice/server.cpp +--- OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/RestHttpDevice/server.cpp 2020-01-31 12:03:07.000000000 +0100 ++++ OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/RestHttpDevice/server.cpp 2022-11-13 19:16:22.452241561 +0100 +@@ -9,7 +9,6 @@ + // + + #include "server.hpp" +-#include + + namespace http { + namespace server { +@@ -23,7 +22,7 @@ server::server(const std::string& addres request_handler_(doc_root) { // Open the acceptor with the option to reuse the address (i.e. SO_REUSEADDR). - asio::ip::tcp::resolver resolver(acceptor_.get_io_service()); -+ asio::ip::tcp::resolver resolver((asio::io_context&)acceptor_.get_executor().context()); ++ asio::ip::tcp::resolver resolver(acceptor_.get_executor()); asio::ip::tcp::resolver::query query(address, port); asio::ip::tcp::endpoint endpoint = *resolver.resolve(query); acceptor_.open(endpoint.protocol()); +@@ -31,8 +30,8 @@ server::server(const std::string& addres + acceptor_.bind(endpoint); + acceptor_.listen(); + acceptor_.async_accept(new_connection_->socket(), +- boost::bind(&server::handle_accept, this, +- asio::placeholders::error)); ++ std::bind(&server::handle_accept, this, ++ std::placeholders::_1)); + } + + void server::run() +@@ -56,8 +55,8 @@ void server::handle_accept(const asio::e + new_connection_.reset(new connection( + io_service_pool_.get_io_service(), request_handler_)); + acceptor_.async_accept(new_connection_->socket(), +- boost::bind(&server::handle_accept, this, +- asio::placeholders::error)); ++ std::bind(&server::handle_accept, this, ++ std::placeholders::_1)); + } + else + { diff --git a/OpenSceneGraph-gta.patch b/OpenSceneGraph-gta.patch new file mode 100644 index 0000000..619ad6c --- /dev/null +++ b/OpenSceneGraph-gta.patch @@ -0,0 +1,11 @@ +--- OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/gta/CMakeLists.txt.orig 2020-01-31 12:03:07.000000000 +0100 ++++ OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/gta/CMakeLists.txt 2023-09-07 21:44:21.308684691 +0200 +@@ -2,7 +2,7 @@ INCLUDE_DIRECTORIES( ${GTA_INCLUDE_DIRS} + + SET(TARGET_SRC ReaderWriterGTA.cpp ) + +-SET(TARGET_LIBRARIES_VARS GTA_LIBRARY) ++SET(TARGET_LIBRARIES_VARS GTA_LIBRARIES) + + #### end var setup ### + SETUP_PLUGIN(gta) diff --git a/OpenSceneGraph-openexr3.patch b/OpenSceneGraph-openexr3.patch new file mode 100644 index 0000000..e94c168 --- /dev/null +++ b/OpenSceneGraph-openexr3.patch @@ -0,0 +1,78 @@ +diff -rupN --no-dereference OpenSceneGraph-OpenSceneGraph-3.6.5/CMakeLists.txt OpenSceneGraph-OpenSceneGraph-3.6.5-new/CMakeLists.txt +--- OpenSceneGraph-OpenSceneGraph-3.6.5/CMakeLists.txt 2022-11-13 19:16:21.608241542 +0100 ++++ OpenSceneGraph-OpenSceneGraph-3.6.5-new/CMakeLists.txt 2022-11-13 19:16:22.285241557 +0100 +@@ -742,7 +742,19 @@ ELSE() + FIND_PACKAGE(ilmbase) + FIND_PACKAGE(Inventor) + FIND_PACKAGE(Jasper) +- FIND_PACKAGE(OpenEXR) ++ FIND_PACKAGE(Imath CONFIG) ++ IF(TARGET Imath::Imath) ++ FIND_PACKAGE(OpenEXR REQUIRED CONFIG) ++ SET(OPENEXR_LIBRARIES OpenEXR::OpenEXR Imath::Imath) ++ SET(OPENEXR_LIBRARIES_VARS "${OPENEXR_LIBRARIES}") ++ GET_TARGET_PROPERTY(OPENEXR_INCLUDE_DIR OpenEXR::OpenEXRConfig INTERFACE_INCLUDE_DIRECTORIES) ++ GET_TARGET_PROPERTY(IMATH_INCLUDE_DIR Imath::ImathConfig INTERFACE_INCLUDE_DIRECTORIES) ++ LIST(APPEND OPENEXR_INCLUDE_DIR ${IMATH_INCLUDE_DIR}) ++ MESSAGE(STATUS "OpenEXR/Imath libraries: " ${OPENEXR_LIBRARIES}) ++ SET(OPENEXR_FOUND TRUE) ++ ELSE() ++ FIND_PACKAGE(OpenEXR) ++ ENDIF() + FIND_PACKAGE(OpenCascade) + FIND_PACKAGE(COLLADA) + FIND_PACKAGE(FBX) +diff -rupN --no-dereference OpenSceneGraph-OpenSceneGraph-3.6.5/CMakeModules/FindOpenEXR.cmake OpenSceneGraph-OpenSceneGraph-3.6.5-new/CMakeModules/FindOpenEXR.cmake +--- OpenSceneGraph-OpenSceneGraph-3.6.5/CMakeModules/FindOpenEXR.cmake 2020-01-31 12:03:07.000000000 +0100 ++++ OpenSceneGraph-OpenSceneGraph-3.6.5-new/CMakeModules/FindOpenEXR.cmake 2022-11-13 19:16:22.285241557 +0100 +@@ -23,6 +23,7 @@ FIND_PATH(OPENEXR_INCLUDE_DIR OpenEXR/Im + /opt/include + /usr/freeware/include + ) ++SET(OPENEXR_INCLUDE_DIR ${OPENEXR_INCLUDED_DIR}/OpenEXR) + + # Macro to find exr libraries (deduplicating search paths) + # example: OPENEXR_FIND_VAR(OPENEXR_IlmImf_LIBRARY IlmImf) +diff -rupN --no-dereference OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/exr/CMakeLists.txt OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/exr/CMakeLists.txt +--- OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/exr/CMakeLists.txt 2020-01-31 12:03:07.000000000 +0100 ++++ OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/exr/CMakeLists.txt 2022-11-13 19:16:22.285241557 +0100 +@@ -12,3 +12,8 @@ ENDIF() + + #### end var setup ### + SETUP_PLUGIN(exr) ++ ++# Force linking with OpenEXR/Imath until upstream fixes their config. ++if(TARGET Imath::Imath) ++ target_link_libraries(osgdb_exr OpenEXR::OpenEXR Imath::Imath) ++endif() +diff -rupN --no-dereference OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/exr/ReaderWriterEXR.cpp OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/exr/ReaderWriterEXR.cpp +--- OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/exr/ReaderWriterEXR.cpp 2020-01-31 12:03:07.000000000 +0100 ++++ OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/exr/ReaderWriterEXR.cpp 2022-11-13 19:16:22.285241557 +0100 +@@ -41,11 +41,11 @@ public: + { + return _inStream->read(c,n).good(); + }; +- virtual Int64 tellg () ++ virtual uint64_t tellg () + { + return _inStream->tellg(); + }; +- virtual void seekg (Int64 pos) ++ virtual void seekg (uint64_t pos) + { + _inStream->seekg(pos); + }; +@@ -69,11 +69,11 @@ public: + { + _outStream->write(c,n); + }; +- virtual Int64 tellp () ++ virtual uint64_t tellp () + { + return _outStream->tellp(); + }; +- virtual void seekp (Int64 pos) ++ virtual void seekp (uint64_t pos) + { + _outStream->seekp(pos); + }; diff --git a/OpenSceneGraph.spec b/OpenSceneGraph.spec index 69ce998..ad03a9d 100644 --- a/OpenSceneGraph.spec +++ b/OpenSceneGraph.spec @@ -1,40 +1,71 @@ +# TODO: 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: 15 +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 -Patch1: %{name}-asio.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 +Patch0: %{name}-asio.patch +Patch1: %{name}-OpenCASCADE.patch +Patch2: %{name}-gta.patch +Patch3: %{name}-openexr3.patch +URL: https://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: Qt5Core-devel >= 5 BuildRequires: Qt5Gui-devel >= 5 BuildRequires: Qt5OpenGL-devel >= 5 BuildRequires: Qt5Widgets-devel >= 5 +BuildRequires: SoXt-devel +BuildRequires: EGL-devel +BuildRequires: SDL2-devel >= 2 BuildRequires: asio-devel >= 1.11 BuildRequires: boost-devel >= 1.37 BuildRequires: cairo-devel -BuildRequires: cmake -BuildRequires: freetype-devel +BuildRequires: cmake >= 2.8.0 +BuildRequires: collada-dom-devel +BuildRequires: curl-devel +BuildRequires: dcmtk-devel +%{?with_fbx:BuildRequires: fbxsdk-devel} +BuildRequires: ffmpeg-devel +BuildRequires: fontconfig-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 +# only for osgviewerGTK, which is not built +#BuildRequires: gtkglext-devel +BuildRequires: jasper-devel +BuildRequires: libgta-devel BuildRequires: libjpeg-devel +BuildRequires: liblas-devel BuildRequires: libpng-devel -BuildRequires: librsvg-devel +BuildRequires: librsvg-devel >= 1:2.35 BuildRequires: libtiff-devel +BuildRequires: libvncserver-devel +BuildRequires: lua52-devel >= 5.2 BuildRequires: pkgconfig BuildRequires: poppler-glib-devel BuildRequires: qt5-build >= 5 BuildRequires: qt5-qmake >= 5 -BuildRequires: rpmbuild(macros) >= 1.600 +BuildRequires: rpmbuild(macros) >= 1.605 BuildRequires: unzip -#BuildRequires: xulrunner-devel +BuildRequires: xorg-lib-libX11-devel +BuildRequires: xorg-lib-libXinerama-devel +BuildRequires: xorg-lib-libXrandr-devel BuildRequires: zlib-devel BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -48,6 +79,19 @@ 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} +Requires: librsvg-devel >= 1:2.35 + +%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 @@ -72,33 +116,23 @@ 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 +%setup -q -n %{name}-%{name}-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build install -d build cd build -CXXFLAGS="%{rpmcxxflags} -DASIO_ENABLE_BOOST=1" -%cmake \ +%cmake .. \ -DDESIRED_QT_VERSION=5 \ %ifarch x32 -DLIB_POSTFIX=x32 \ %endif - ../ + -DOSG_USE_LOCAL_LUA_SOURCE=OFF + %{__make} %install @@ -118,44 +152,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) @@ -173,7 +208,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 @@ -194,7 +229,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 @@ -206,5 +241,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(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(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(context->opaque); -+ -+ const int result = avcodec_default_get_buffer2(context, picture, flags); -+ int64_t * p_pts = reinterpret_cast( 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 - } - --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 {