diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-04 05:48:38 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-04 05:48:38 -0500 |
| commit | bfd9c39e4712ebdb442d4ca0673061faed1e70e1 (patch) | |
| tree | 0d7a74b4463ee387f9cf9368ceb1b757f694f72a /dev-games/openscenegraph | |
| parent | f716a9fe6455d39eef01e718aae68dae61c19704 (diff) | |
| download | baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.gz baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.xz baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.zip | |
Revert "Adding metadata"
This reverts commit f716a9fe6455d39eef01e718aae68dae61c19704.
Diffstat (limited to 'dev-games/openscenegraph')
10 files changed, 1103 insertions, 0 deletions
diff --git a/dev-games/openscenegraph/Manifest b/dev-games/openscenegraph/Manifest new file mode 100644 index 000000000000..b2f78728f975 --- /dev/null +++ b/dev-games/openscenegraph/Manifest @@ -0,0 +1 @@ +DIST OpenSceneGraph-3.6.5.tar.gz 5780762 BLAKE2B 31ebeeae94eb6aff043788313946d5c08886f97d97cd5796e600918e137ef7f06839206b79b2f5649aac7f34037d4d79e18a5638152e150de931b7f7a7d3c38b SHA512 7002fa30a3bcf6551d2e1050b4ca75a3736013fd190e4f50953717406864da1952deb09f530bc8c5ddf6e4b90204baec7dbc283f497829846d46d561f66feb4b diff --git a/dev-games/openscenegraph/files/openscenegraph-3.6.3-cmake.patch b/dev-games/openscenegraph/files/openscenegraph-3.6.3-cmake.patch new file mode 100644 index 000000000000..708c68659680 --- /dev/null +++ b/dev-games/openscenegraph/files/openscenegraph-3.6.3-cmake.patch @@ -0,0 +1,12 @@ +--- a/CMakeModules/OsgMacroUtils.cmake ++++ b/CMakeModules/OsgMacroUtils.cmake +@@ -463,7 +463,7 @@ MACRO(SETUP_EXAMPLE EXAMPLE_NAME) + IF(APPLE) + INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin BUNDLE DESTINATION share/OpenSceneGraph/bin ) + ELSE(APPLE) +- INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples ) ++ INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin COMPONENT openscenegraph-examples ) + IF(MSVC) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_TARGETNAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples CONFIGURATIONS RelWithDebInfo) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_TARGETNAME}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples CONFIGURATIONS Debug) + diff --git a/dev-games/openscenegraph/files/openscenegraph-3.6.3-docdir.patch b/dev-games/openscenegraph/files/openscenegraph-3.6.3-docdir.patch new file mode 100644 index 000000000000..75dd48b30687 --- /dev/null +++ b/dev-games/openscenegraph/files/openscenegraph-3.6.3-docdir.patch @@ -0,0 +1,73 @@ +From 1dfc0e3218e15b94f7b145c8f5b2bf61974b9573 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Sun, 23 Dec 2018 22:10:49 +0100 +Subject: [PATCH 1/2] Add GNUInstallDirs for standard installation directories + +Distributions are given standard variables for already existing hooks. +Multiarch libdirs is taken care of automagically. +Raises minimum cmake version by a little (2.8.5 is enough). +--- + CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 064d4e289..777265e0e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,7 +13,7 @@ SET(OPENSCENEGRAPH_RELEASE_CANDIDATE 0) + set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE) + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR) ++CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5 FATAL_ERROR) + + if(COMMAND cmake_policy) + # Works around warnings libraries linked against that don't +@@ -767,6 +767,7 @@ ELSE() + # FIND_PACKAGE(PythonLibs) + ENDIF() + ++INCLUDE(GNUInstallDirs) + # Include macro utilities here + INCLUDE(OsgMacroUtils) + +-- +2.20.1 + + +From d2be900de7b5fb4e23d9429c02269f671962c670 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Sun, 23 Dec 2018 22:12:33 +0100 +Subject: [PATCH 2/2] Replace OPENJPEG_INSTALL_DOC_DIR with + CMAKE_INSTALL_DOCDIR + +This changes the default doc installdir to DATAROOTDIR/doc/PROJECT_NAME +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 777265e0e..e1ed1bd51 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1180,7 +1180,7 @@ IF(BUILD_DOCUMENTATION) + ${PROJECT_BINARY_DIR}/doc/OpenSceneGraphReferenceDocs/osg32-32.png COPYONLY + ) + #INSTALL(FILES ${PROJECT_BINARY_DIR}/doc/${PROJECT_NAME}ReferenceDocs-${OPENSCENEGRAPH_VERSION}.chm DESTINATION doc OPTIONAL COMPONENT openscenegraph-doc) +- INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/doc/OpenSceneGraphReferenceDocs DESTINATION doc COMPONENT openscenegraph-doc) ++ INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/doc/OpenSceneGraphReferenceDocs DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT openscenegraph-doc) + + # now set up openthreads documentation generation + IF(BUILD_REF_DOCS_TAGFILE) +@@ -1196,7 +1196,7 @@ IF(BUILD_DOCUMENTATION) + ${PROJECT_BINARY_DIR}/doc/OpenThreadsReferenceDocs/osg32-32.png COPYONLY + ) + #INSTALL(FILES ${PROJECT_BINARY_DIR}/doc/${PROJECT_NAME}ReferenceDocs-${OPENSCENEGRAPH_VERSION}.chm DESTINATION doc OPTIONAL COMPONENT openscenegraph-doc) +- INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/doc/OpenThreadsReferenceDocs DESTINATION doc COMPONENT openthreads-doc) ++ INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/doc/OpenThreadsReferenceDocs DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT openthreads-doc) + + # Process our other doxyfiles but don't create targets for these + CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/doc/Doxyfiles/all_Doxyfile +-- +2.20.1 + diff --git a/dev-games/openscenegraph/files/openscenegraph-3.6.5-boost-1.87.0.patch b/dev-games/openscenegraph/files/openscenegraph-3.6.5-boost-1.87.0.patch new file mode 100644 index 000000000000..22e54593b981 --- /dev/null +++ b/dev-games/openscenegraph/files/openscenegraph-3.6.5-boost-1.87.0.patch @@ -0,0 +1,301 @@ +diff '--color=auto' -urNp openscenegraph-3.6.5-orig/src/osgPlugins/RestHttpDevice/connection.cpp openscenegraph-3.6.5-dwok/src/osgPlugins/RestHttpDevice/connection.cpp +--- openscenegraph-3.6.5-orig/src/osgPlugins/RestHttpDevice/connection.cpp 2024-12-27 12:34:55.469783593 +0100 ++++ openscenegraph-3.6.5-dwok/src/osgPlugins/RestHttpDevice/connection.cpp 2024-12-27 12:45:50.072697619 +0100 +@@ -10,16 +10,17 @@ + + #include "connection.hpp" + #include <vector> +-#include <boost/bind.hpp> ++#include <boost/bind/bind.hpp> ++using namespace boost::placeholders; + #include "request_handler.hpp" + #include <osg/Notify> + + namespace http { + namespace server { + +-connection::connection(asio::io_service& io_service, ++connection::connection(boost::asio::io_context& io_context, + request_handler& handler) +- : socket_(io_service), ++ : socket_(io_context), + request_handler_(handler) + { + OSG_DEBUG << "RestHttpDevice :: connection::connection" << std::endl; +@@ -29,7 +30,7 @@ connection::~connection() + { + OSG_DEBUG << "RestHttpDevice :: connection::~connection" << std::endl; + } +-asio::ip::tcp::socket& connection::socket() ++boost::asio::ip::tcp::socket& connection::socket() + { + return socket_; + } +@@ -38,10 +39,8 @@ 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)); ++ socket_.async_read_some(boost::asio::buffer(buffer_), ++ boost::bind(&connection::handle_read, shared_from_this(), _1, _2)); + } + + void connection::handle_read(const boost::system::error_code& e, +@@ -56,23 +55,19 @@ void connection::handle_read(const boost + if (result) + { + request_handler_.handle_request(request_, reply_); +- asio::async_write(socket_, reply_.to_buffers(), +- boost::bind(&connection::handle_write, shared_from_this(), +- asio::placeholders::error)); ++ boost::asio::async_write(socket_, reply_.to_buffers(), ++ boost::bind(&connection::handle_write, shared_from_this(), _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)); ++ boost::asio::async_write(socket_, reply_.to_buffers(), ++ boost::bind(&connection::handle_write, shared_from_this(), _1)); + } + else + { +- socket_.async_read_some(asio::buffer(buffer_), +- boost::bind(&connection::handle_read, shared_from_this(), +- asio::placeholders::error, +- asio::placeholders::bytes_transferred)); ++ socket_.async_read_some(boost::asio::buffer(buffer_), ++ boost::bind(&connection::handle_read, shared_from_this(), _1, _2)); + } + } + +@@ -88,7 +83,7 @@ void connection::handle_write(const boos + { + // Initiate graceful connection closure. + boost::system::error_code ignored_ec; +- socket_.shutdown(asio::ip::tcp::socket::shutdown_both, ignored_ec); ++ socket_.shutdown(boost::asio::ip::tcp::socket::shutdown_both, ignored_ec); + } + + // No new asynchronous operations are started. This means that all shared_ptr +diff '--color=auto' -urNp openscenegraph-3.6.5-orig/src/osgPlugins/RestHttpDevice/connection.hpp openscenegraph-3.6.5-dwok/src/osgPlugins/RestHttpDevice/connection.hpp +--- openscenegraph-3.6.5-orig/src/osgPlugins/RestHttpDevice/connection.hpp 2024-12-27 12:34:55.469783593 +0100 ++++ openscenegraph-3.6.5-dwok/src/osgPlugins/RestHttpDevice/connection.hpp 2024-12-27 12:40:08.523007514 +0100 +@@ -33,7 +33,7 @@ class connection + { + public: + /// Construct a connection with the given io_service. +- explicit connection(asio::io_service& io_service, ++ explicit connection(boost::asio::io_context& io_context, + request_handler& handler); + + /// Get the socket associated with the connection. +diff '--color=auto' -urNp openscenegraph-3.6.5-orig/src/osgPlugins/RestHttpDevice/io_service_pool.cpp openscenegraph-3.6.5-dwok/src/osgPlugins/RestHttpDevice/io_service_pool.cpp +--- openscenegraph-3.6.5-orig/src/osgPlugins/RestHttpDevice/io_service_pool.cpp 2024-12-27 12:34:55.469783593 +0100 ++++ openscenegraph-3.6.5-dwok/src/osgPlugins/RestHttpDevice/io_service_pool.cpp 2024-12-27 12:48:08.654997383 +0100 +@@ -8,16 +8,18 @@ + // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + // + +-#include "server.hpp" ++#include "io_service_pool.hpp" + #include <stdexcept> +-#include <boost/bind.hpp> ++#include <boost/bind/bind.hpp> ++using namespace boost::placeholders; ++#include <boost/shared_ptr.hpp> + #include <boost/thread.hpp> + + namespace http { + namespace server { + + io_service_pool::io_service_pool(std::size_t pool_size) +- : next_io_service_(0) ++ : next_io_context_(0) + { + if (pool_size == 0) + throw std::runtime_error("io_service_pool size is 0"); +@@ -26,9 +28,9 @@ io_service_pool::io_service_pool(std::si + // exit until they are explicitly stopped. + for (std::size_t i = 0; i < pool_size; ++i) + { +- io_service_ptr io_service(new asio::io_service); +- work_ptr work(new asio::io_service::work(*io_service)); +- io_services_.push_back(io_service); ++ io_context_ptr io_context(new boost::asio::io_context); ++ work_ptr work(new boost::asio::executor_work_guard<boost::asio::io_context::executor_type>(boost::asio::make_work_guard(*io_context))); ++ io_contexts_.push_back(io_context); + work_.push_back(work); + } + } +@@ -36,31 +38,34 @@ io_service_pool::io_service_pool(std::si + void io_service_pool::run() + { + // Create a pool of threads to run all of the io_services. +- std::vector<thread> threads; +- for (std::size_t i = 0; i < io_services_.size(); ++i) +- threads.emplace_back(thread(boost::bind(&asio::io_service::run, +- io_services_[i]))); ++ std::vector<boost::shared_ptr<boost::thread>> threads; ++ for (std::size_t i = 0; i < io_contexts_.size(); ++i) ++ { ++ boost::shared_ptr<boost::thread> thread(new boost::thread( ++ boost::bind(&boost::asio::io_context::run, io_contexts_[i]))); ++ threads.push_back(thread); ++ } + + // Wait for all threads in the pool to exit. + for (std::size_t i = 0; i < threads.size(); ++i) +- threads[i].join(); ++ threads[i]->join(); + } + + void io_service_pool::stop() + { + // Explicitly stop all io_services. +- for (std::size_t i = 0; i < io_services_.size(); ++i) +- io_services_[i]->stop(); ++ for (std::size_t i = 0; i < io_contexts_.size(); ++i) ++ io_contexts_[i]->stop(); + } + +-asio::io_service& io_service_pool::get_io_service() ++boost::asio::io_context& io_service_pool::get_io_context() + { + // Use a round-robin scheme to choose the next io_service to use. +- asio::io_service& io_service = *io_services_[next_io_service_]; +- ++next_io_service_; +- if (next_io_service_ == io_services_.size()) +- next_io_service_ = 0; +- return io_service; ++ boost::asio::io_context& io_context = *io_contexts_[next_io_context_]; ++ ++next_io_context_; ++ if (next_io_context_ == io_contexts_.size()) ++ next_io_context_ = 0; ++ return io_context; + } + + } // namespace server +diff '--color=auto' -urNp openscenegraph-3.6.5-orig/src/osgPlugins/RestHttpDevice/io_service_pool.hpp openscenegraph-3.6.5-dwok/src/osgPlugins/RestHttpDevice/io_service_pool.hpp +--- openscenegraph-3.6.5-orig/src/osgPlugins/RestHttpDevice/io_service_pool.hpp 2024-12-27 12:34:55.469783593 +0100 ++++ openscenegraph-3.6.5-dwok/src/osgPlugins/RestHttpDevice/io_service_pool.hpp 2024-12-27 12:40:08.523007514 +0100 +@@ -16,8 +16,6 @@ + #include <boost/noncopyable.hpp> + #include <boost/shared_ptr.hpp> + +-using namespace boost; +- + namespace http { + namespace server { + +@@ -36,20 +34,20 @@ public: + void stop(); + + /// Get an io_service to use. +- asio::io_service& get_io_service(); ++ boost::asio::io_context& get_io_context(); + + private: +- typedef boost::shared_ptr<asio::io_service> io_service_ptr; +- typedef boost::shared_ptr<asio::io_service::work> work_ptr; ++ typedef boost::shared_ptr<boost::asio::io_context> io_context_ptr; ++ typedef boost::shared_ptr<boost::asio::executor_work_guard<boost::asio::io_context::executor_type>> work_ptr; + + /// The pool of io_services. +- std::vector<io_service_ptr> io_services_; ++ std::vector<io_context_ptr> io_contexts_; + + /// The work that keeps the io_services running. + std::vector<work_ptr> work_; + + /// The next io_service to use for a connection. +- std::size_t next_io_service_; ++ std::size_t next_io_context_; + }; + + } // namespace server +diff '--color=auto' -urNp openscenegraph-3.6.5-orig/src/osgPlugins/RestHttpDevice/ReaderWriterRestHttpDevice.cpp openscenegraph-3.6.5-dwok/src/osgPlugins/RestHttpDevice/ReaderWriterRestHttpDevice.cpp +--- openscenegraph-3.6.5-orig/src/osgPlugins/RestHttpDevice/ReaderWriterRestHttpDevice.cpp 2024-12-27 12:34:55.469783593 +0100 ++++ openscenegraph-3.6.5-dwok/src/osgPlugins/RestHttpDevice/ReaderWriterRestHttpDevice.cpp 2024-12-27 12:49:01.143868489 +0100 +@@ -35,6 +35,8 @@ + #include <osgDB/FileNameUtils> + #include <osgDB/FileUtils> + #include "RestHttpDevice.hpp" ++#include <boost/bind/bind.hpp> ++using namespace boost::placeholders; + + + +diff '--color=auto' -urNp openscenegraph-3.6.5-orig/src/osgPlugins/RestHttpDevice/RestHttpDevice.cpp openscenegraph-3.6.5-dwok/src/osgPlugins/RestHttpDevice/RestHttpDevice.cpp +--- openscenegraph-3.6.5-orig/src/osgPlugins/RestHttpDevice/RestHttpDevice.cpp 2024-12-27 12:34:55.469783593 +0100 ++++ openscenegraph-3.6.5-dwok/src/osgPlugins/RestHttpDevice/RestHttpDevice.cpp 2024-12-27 12:48:44.131586152 +0100 +@@ -16,6 +16,8 @@ + #include <osg/ValueObject> + #include <osgDB/FileUtils> + #include "request_handler.hpp" ++#include <boost/bind/bind.hpp> ++using namespace boost::placeholders; + + namespace RestHttp { + +diff '--color=auto' -urNp openscenegraph-3.6.5-orig/src/osgPlugins/RestHttpDevice/server.cpp openscenegraph-3.6.5-dwok/src/osgPlugins/RestHttpDevice/server.cpp +--- openscenegraph-3.6.5-orig/src/osgPlugins/RestHttpDevice/server.cpp 2024-12-27 12:34:55.469783593 +0100 ++++ openscenegraph-3.6.5-dwok/src/osgPlugins/RestHttpDevice/server.cpp 2024-12-27 12:47:11.326045994 +0100 +@@ -9,7 +9,8 @@ + // + + #include "server.hpp" +-#include <boost/bind.hpp> ++#include <boost/bind/bind.hpp> ++using namespace boost::placeholders; + + namespace http { + namespace server { +@@ -17,22 +18,21 @@ namespace server { + server::server(const std::string& address, const std::string& port, + const std::string& doc_root, std::size_t io_service_pool_size) + : io_service_pool_(io_service_pool_size), +- acceptor_(io_service_pool_.get_io_service()), ++ acceptor_(io_service_pool_.get_io_context()), + new_connection_(new connection( +- io_service_pool_.get_io_service(), request_handler_)), ++ io_service_pool_.get_io_context(), request_handler_)), + request_handler_(doc_root) + { + // Open the acceptor with the option to reuse the address (i.e. SO_REUSEADDR). +- asio::ip::tcp::resolver resolver(io_service_pool_.get_io_service()); +- asio::ip::tcp::resolver::query query(address, port); +- asio::ip::tcp::endpoint endpoint = *resolver.resolve(query); ++ boost::asio::ip::tcp::resolver resolver(io_service_pool_.get_io_context()); ++ boost::asio::ip::tcp::resolver::results_type endpoints = resolver.resolve(address, port); ++ boost::asio::ip::tcp::endpoint endpoint = *endpoints.begin(); + acceptor_.open(endpoint.protocol()); +- acceptor_.set_option(asio::ip::tcp::acceptor::reuse_address(true)); ++ acceptor_.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true)); + acceptor_.bind(endpoint); + acceptor_.listen(); + acceptor_.async_accept(new_connection_->socket(), +- boost::bind(&server::handle_accept, this, +- asio::placeholders::error)); ++ boost::bind(&server::handle_accept, this, _1)); + } + + void server::run() +@@ -54,10 +54,9 @@ void server::handle_accept(const boost:: + OSG_DEBUG << "RestHttpDevice :: server::handle_accept" << std::endl; + new_connection_->start(); + new_connection_.reset(new connection( +- io_service_pool_.get_io_service(), request_handler_)); ++ io_service_pool_.get_io_context(), request_handler_)); + acceptor_.async_accept(new_connection_->socket(), +- boost::bind(&server::handle_accept, this, +- asio::placeholders::error)); ++ boost::bind(&server::handle_accept, this, _1)); + } + else + { diff --git a/dev-games/openscenegraph/files/openscenegraph-3.6.5-cmake_lua_version.patch b/dev-games/openscenegraph/files/openscenegraph-3.6.5-cmake_lua_version.patch new file mode 100644 index 000000000000..1373b296da04 --- /dev/null +++ b/dev-games/openscenegraph/files/openscenegraph-3.6.5-cmake_lua_version.patch @@ -0,0 +1,14 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -771,10 +771,7 @@ + FIND_PACKAGE(LIBLAS) + + IF (NOT(OSG_USE_LOCAL_LUA_SOURCE)) +- FIND_PACKAGE(Lua52) +- IF (NOT (LUA_LIBRARIES AND LUA_INCLUDE_DIR)) +- FIND_PACKAGE(Lua51) +- ENDIF() ++ FIND_PACKAGE(Lua ${LUA_VERSION} EXACT) + ENDIF() + + # V8 and Python plugins are tests for linking against these libraries but aren't functionality beyond this. diff --git a/dev-games/openscenegraph/files/openscenegraph-3.6.5-openexr3.patch b/dev-games/openscenegraph/files/openscenegraph-3.6.5-openexr3.patch new file mode 100644 index 000000000000..6a6aa57950d6 --- /dev/null +++ b/dev-games/openscenegraph/files/openscenegraph-3.6.5-openexr3.patch @@ -0,0 +1,68 @@ +https://bugs.gentoo.org/833491 + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -752,7 +752,6 @@ ELSE() +- FIND_PACKAGE(ilmbase) + FIND_PACKAGE(Inventor) + FIND_PACKAGE(Jasper) +- FIND_PACKAGE(OpenEXR) ++ FIND_PACKAGE(OpenEXR CONFIG) + FIND_PACKAGE(OpenCascade) + FIND_PACKAGE(COLLADA) + FIND_PACKAGE(FBX) +--- a/src/osgPlugins/CMakeLists.txt ++++ b/src/osgPlugins/CMakeLists.txt +@@ -105,7 +105,7 @@ ENDIF() + IF(JASPER_FOUND) + ADD_PLUGIN_DIRECTORY(jp2) + ENDIF() +-IF(OPENEXR_FOUND AND ZLIB_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE) ++IF(OpenEXR_FOUND AND ZLIB_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE) + ADD_PLUGIN_DIRECTORY(exr) + ENDIF() + IF(GIFLIB_FOUND) +--- a/src/osgPlugins/exr/CMakeLists.txt ++++ b/src/osgPlugins/exr/CMakeLists.txt +@@ -1,9 +1,7 @@ +-INCLUDE_DIRECTORIES( ${ILMBASE_INCLUDE_DIR}/OpenEXR ) +-INCLUDE_DIRECTORIES( ${OPENEXR_INCLUDE_DIR}/OpenEXR ) +- + SET(TARGET_SRC ReaderWriterEXR.cpp ) + +-SET(TARGET_LIBRARIES_VARS ${OPENEXR_LIBRARIES_VARS} ${ILMBASE_LIBRARIES_VARS} ZLIB_LIBRARIES) ++SET(OPENEXR_LIBRARIES_VARS OpenEXR::OpenEXR) ++SET(TARGET_LIBRARIES_VARS OPENEXR_LIBRARIES_VARS ZLIB_LIBRARIES) + + IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + REMOVE_CXX_FLAG(-Wshadow) +--- a/src/osgPlugins/exr/ReaderWriterEXR.cpp ++++ b/src/osgPlugins/exr/ReaderWriterEXR.cpp +@@ -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/dev-games/openscenegraph/files/openscenegraph-3.6.5-remove-register-keyword.patch b/dev-games/openscenegraph/files/openscenegraph-3.6.5-remove-register-keyword.patch new file mode 100644 index 000000000000..474e738e05c3 --- /dev/null +++ b/dev-games/openscenegraph/files/openscenegraph-3.6.5-remove-register-keyword.patch @@ -0,0 +1,172 @@ +diff -ruN osg/src/osgPlugins/cfg/ConfigLexer.cpp my/src/osgPlugins/cfg/ConfigLexer.cpp +--- osg/src/osgPlugins/cfg/ConfigLexer.cpp 2020-01-31 12:03:07.000000000 +0100 ++++ my/src/osgPlugins/cfg/ConfigLexer.cpp 2024-02-24 06:23:01.866597764 +0100 +@@ -832,9 +832,9 @@ + + YY_DECL + { +- register yy_state_type yy_current_state; +- register char *yy_cp, *yy_bp; +- register int yy_act; ++ yy_state_type yy_current_state; ++ char *yy_cp, *yy_bp; ++ int yy_act; + + #line 35 ".././ConfigLexer.l" + +@@ -881,7 +881,7 @@ + yy_match: + do + { +- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; ++ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + yy_last_accepting_state = yy_current_state; +@@ -1598,9 +1598,9 @@ + + int yyFlexLexer::yy_get_next_buffer() + { +- register char *dest = yy_current_buffer->yy_ch_buf; +- register char *source = yytext_ptr; +- register int number_to_move, i; ++ char *dest = yy_current_buffer->yy_ch_buf; ++ char *source = yytext_ptr; ++ int number_to_move, i; + int ret_val; + + if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) +@@ -1730,14 +1730,14 @@ + + yy_state_type yyFlexLexer::yy_get_previous_state() + { +- register yy_state_type yy_current_state; +- register char *yy_cp; ++ yy_state_type yy_current_state; ++ char *yy_cp; + + yy_current_state = yy_start; + + for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + { +- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); ++ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yy_last_accepting_state = yy_current_state; +@@ -1764,10 +1764,10 @@ + + yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state ) + { +- register int yy_is_jam; +- register char *yy_cp = yy_c_buf_p; ++ int yy_is_jam; ++ char *yy_cp = yy_c_buf_p; + +- register YY_CHAR yy_c = 1; ++ YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yy_last_accepting_state = yy_current_state; +@@ -1786,9 +1786,9 @@ + } + + +-void yyFlexLexer::yyunput( int c, register char* yy_bp ) ++void yyFlexLexer::yyunput( int c, char* yy_bp ) + { +- register char *yy_cp = yy_c_buf_p; ++ char *yy_cp = yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yy_hold_char; +@@ -1796,10 +1796,10 @@ + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ +- register int number_to_move = yy_n_chars + 2; +- register char *dest = &yy_current_buffer->yy_ch_buf[ ++ int number_to_move = yy_n_chars + 2; ++ char *dest = &yy_current_buffer->yy_ch_buf[ + yy_current_buffer->yy_buf_size + 2]; +- register char *source = ++ char *source = + &yy_current_buffer->yy_ch_buf[number_to_move]; + + while ( source > yy_current_buffer->yy_ch_buf ) +@@ -2119,7 +2119,7 @@ + int n; + #endif + { +- register int i; ++ int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; + } +@@ -2133,7 +2133,7 @@ + yyconst char *s; + #endif + { +- register int n; ++ int n; + for ( n = 0; s[n]; ++n ) + ; + +diff -ruN osg/src/osgPlugins/cfg/ConfigParser.cpp my/src/osgPlugins/cfg/ConfigParser.cpp +--- osg/src/osgPlugins/cfg/ConfigParser.cpp 2020-01-31 12:03:07.000000000 +0100 ++++ my/src/osgPlugins/cfg/ConfigParser.cpp 2024-02-24 06:21:37.488008033 +0100 +@@ -351,7 +351,7 @@ + # define YYCOPY(To, From, Count) \ + do \ + { \ +- register YYSIZE_T yyi; \ ++ YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ +@@ -1025,7 +1025,7 @@ + const char *yystr; + # endif + { +- register const char *yys = yystr; ++ const char *yys = yystr; + + while (*yys++ != '\0') + continue; +@@ -1050,8 +1050,8 @@ + const char *yysrc; + # endif + { +- register char *yyd = yydest; +- register const char *yys = yysrc; ++ char *yyd = yydest; ++ const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; +@@ -1175,8 +1175,8 @@ + #endif + { + +- register int yystate; +- register int yyn; ++ int yystate; ++ int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; +@@ -1194,12 +1194,12 @@ + /* The state stack. */ + short yyssa[YYINITDEPTH]; + short *yyss = yyssa; +- register short *yyssp; ++ short *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; +- register YYSTYPE *yyvsp; ++ YYSTYPE *yyvsp; + + + diff --git a/dev-games/openscenegraph/files/openscenegraph-3.6.5-use_boost_asio.patch b/dev-games/openscenegraph/files/openscenegraph-3.6.5-use_boost_asio.patch new file mode 100644 index 000000000000..f9a32c0dc601 --- /dev/null +++ b/dev-games/openscenegraph/files/openscenegraph-3.6.5-use_boost_asio.patch @@ -0,0 +1,263 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -764,7 +764,7 @@ + FIND_PACKAGE(DirectInput) + FIND_PACKAGE(NVTT) + IF (NOT WIN32) +- FIND_PACKAGE(Asio) ++ FIND_PACKAGE(Boost) + ENDIF() + FIND_PACKAGE(ZeroConf) + +--- a/CMakeModules/FindAsio.cmake ++++ b/CMakeModules/FindAsio.cmake +@@ -1,22 +0,0 @@ +-# Locate ASIO-headers (http://think-async.com/Asio) +-# This module defines +-# ASIO_FOUND, if false, do not try to link to gdal +-# ASIO_INCLUDE_DIR, where to find the headers +-# +-# Created by Stephan Maximilian Huber +- +-FIND_PATH(ASIO_INCLUDE_DIR +- NAMES +- asio.hpp +- PATHS +- /usr/include +- /usr/local/include +-) +- +-SET(ASIO_FOUND "NO") +-IF(ASIO_INCLUDE_DIR) +- FIND_PACKAGE( Boost 1.37 ) +- IF(Boost_FOUND) +- SET(ASIO_FOUND "YES") +- ENDIF() +-ENDIF() +--- a/src/osgPlugins/CMakeLists.txt ++++ b/src/osgPlugins/CMakeLists.txt +@@ -299,13 +299,13 @@ + # + # Device integration plugins + # +-IF (SDL_FOUND) ++IF(SDL_FOUND) + ADD_PLUGIN_DIRECTORY(sdl) +-ENDIF(SDL_FOUND) ++ENDIF() + +-IF(ASIO_FOUND) ++IF(Boost_FOUND) + ADD_PLUGIN_DIRECTORY(RestHttpDevice) +-ENDIF(ASIO_FOUND) ++ENDIF() + + + IF(ZEROCONF_FOUND) +--- a/src/osgPlugins/RestHttpDevice/CMakeLists.txt ++++ b/src/osgPlugins/RestHttpDevice/CMakeLists.txt +@@ -1,6 +1,5 @@ + INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) +-INCLUDE_DIRECTORIES(${ASIO_INCLUDE_DIR}) +- ++ + SET(TARGET_SRC + connection.cpp + io_service_pool.cpp +@@ -26,7 +25,7 @@ + RestHttpDevice.hpp + ) + +-SET(TARGET_ADDED_LIBRARIES osgPresentation ) ++SET(TARGET_ADDED_LIBRARIES osgPresentation) + + #### end var setup ### + SETUP_PLUGIN(resthttp) +--- a/src/osgPlugins/RestHttpDevice/connection.cpp ++++ b/src/osgPlugins/RestHttpDevice/connection.cpp +@@ -37,14 +37,14 @@ + 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)); + } + +-void connection::handle_read(const asio::error_code& e, ++void connection::handle_read(const boost::system::error_code& e, + std::size_t bytes_transferred) + { + if (!e) +@@ -82,12 +82,12 @@ + // handler returns. The connection class's destructor closes the socket. + } + +-void connection::handle_write(const asio::error_code& e) ++void connection::handle_write(const boost::system::error_code& e) + { + if (!e) + { + // Initiate graceful connection closure. +- asio::error_code ignored_ec; ++ boost::system::error_code ignored_ec; + socket_.shutdown(asio::ip::tcp::socket::shutdown_both, ignored_ec); + } + +--- a/src/osgPlugins/RestHttpDevice/connection.hpp ++++ b/src/osgPlugins/RestHttpDevice/connection.hpp +@@ -11,7 +11,7 @@ + #ifndef HTTP_SERVER_CONNECTION_HPP + #define HTTP_SERVER_CONNECTION_HPP + +-#include <asio.hpp> ++#include <boost/asio.hpp> + #include <boost/array.hpp> + #include <boost/noncopyable.hpp> + #include <boost/shared_ptr.hpp> +@@ -21,6 +21,8 @@ + #include "request_handler.hpp" + #include "request_parser.hpp" + ++using namespace boost; ++ + namespace http { + namespace server { + +@@ -42,11 +44,11 @@ + ~connection(); + private: + /// Handle completion of a read operation. +- void handle_read(const asio::error_code& e, ++ void handle_read(const boost::system::error_code& e, + std::size_t bytes_transferred); + + /// Handle completion of a write operation. +- void handle_write(const asio::error_code& e); ++ void handle_write(const boost::system::error_code& e); + + /// Socket for the connection. + asio::ip::tcp::socket socket_; +--- a/src/osgPlugins/RestHttpDevice/io_service_pool.cpp ++++ b/src/osgPlugins/RestHttpDevice/io_service_pool.cpp +@@ -11,7 +11,7 @@ + #include "server.hpp" + #include <stdexcept> + #include <boost/bind.hpp> +-#include <boost/shared_ptr.hpp> ++#include <boost/thread.hpp> + + namespace http { + namespace server { +@@ -36,17 +36,14 @@ + void io_service_pool::run() + { + // Create a pool of threads to run all of the io_services. +- std::vector<boost::shared_ptr<asio::thread> > threads; ++ std::vector<thread> threads; + for (std::size_t i = 0; i < io_services_.size(); ++i) +- { +- boost::shared_ptr<asio::thread> thread(new asio::thread( +- boost::bind(&asio::io_service::run, io_services_[i]))); +- threads.push_back(thread); +- } ++ threads.emplace_back(thread(boost::bind(&asio::io_service::run, ++ io_services_[i]))); + + // Wait for all threads in the pool to exit. + for (std::size_t i = 0; i < threads.size(); ++i) +- threads[i]->join(); ++ threads[i].join(); + } + + void io_service_pool::stop() +--- a/src/osgPlugins/RestHttpDevice/io_service_pool.hpp ++++ b/src/osgPlugins/RestHttpDevice/io_service_pool.hpp +@@ -11,11 +11,13 @@ + #ifndef HTTP_SERVER_IO_SERVICE_POOL_HPP + #define HTTP_SERVER_IO_SERVICE_POOL_HPP + +-#include <asio.hpp> ++#include <boost/asio.hpp> + #include <vector> + #include <boost/noncopyable.hpp> + #include <boost/shared_ptr.hpp> + ++using namespace boost; ++ + namespace http { + namespace server { + +--- a/src/osgPlugins/RestHttpDevice/reply.hpp ++++ b/src/osgPlugins/RestHttpDevice/reply.hpp +@@ -13,9 +13,11 @@ + + #include <string> + #include <vector> +-#include <asio.hpp> ++#include <boost/asio.hpp> + #include "header.hpp" + ++using namespace boost; ++ + namespace http { + namespace server { + +--- a/src/osgPlugins/RestHttpDevice/server.cpp ++++ b/src/osgPlugins/RestHttpDevice/server.cpp +@@ -23,7 +23,7 @@ + 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(io_service_pool_.get_io_service()); + asio::ip::tcp::resolver::query query(address, port); + asio::ip::tcp::endpoint endpoint = *resolver.resolve(query); + acceptor_.open(endpoint.protocol()); +@@ -47,7 +47,7 @@ + io_service_pool_.stop(); + } + +-void server::handle_accept(const asio::error_code& e) ++void server::handle_accept(const boost::system::error_code& e) + { + if (!e) + { +--- a/src/osgPlugins/RestHttpDevice/server.hpp ++++ b/src/osgPlugins/RestHttpDevice/server.hpp +@@ -11,7 +11,7 @@ + #ifndef HTTP_SERVER_SERVER_HPP + #define HTTP_SERVER_SERVER_HPP + +-#include <asio.hpp> ++#include <boost/asio.hpp> + #include <string> + #include <vector> + #include <boost/noncopyable.hpp> +@@ -20,6 +20,8 @@ + #include "io_service_pool.hpp" + #include "request_handler.hpp" + ++using namespace boost; ++ + namespace http { + namespace server { + +@@ -38,12 +40,12 @@ + + /// Stop the server. + void stop(); +- ++ + void setCallback(request_handler::Callback* cb) { request_handler_.setCallback(cb); } + + private: + /// Handle completion of an asynchronous accept operation. +- void handle_accept(const asio::error_code& e); ++ void handle_accept(const boost::system::error_code& e); + + /// The pool of io_service objects used to perform asynchronous operations. + io_service_pool io_service_pool_; diff --git a/dev-games/openscenegraph/metadata.xml b/dev-games/openscenegraph/metadata.xml new file mode 100644 index 000000000000..ae083ab7367e --- /dev/null +++ b/dev-games/openscenegraph/metadata.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>games@gentoo.org</email> + <name>Gentoo Games Project</name> + </maintainer> + <longdescription lang="en"> + The OpenSceneGraph is an open source high performance 3D graphics toolkit, used by application developers in fields such as visual simulation, games, virtual reality, scientific visualization and modelling. Written entirely in Standard C++ and OpenGL it runs on all Windows platforms, OSX, GNU/Linux, IRIX, Solaris, HP-Ux, AIX and FreeBSD operating systems. The OpenSceneGraph is now well established as the world leading scene graph technology, used widely in the vis-sim, space, scientific, oil-gas, games and virtual reality industries. + </longdescription> + <use> + <flag name="collada">Enable DAE file support via <pkg>dev-libs/collada-dom</pkg></flag> + <flag name="dicom">Enable DICOM medical image file support via <pkg>sci-libs/dcmtk</pkg></flag> + <flag name="fox">Build examples using <pkg>x11-libs/fox</pkg> library</flag> + <flag name="gdal">Enable support for <pkg>sci-libs/gdal</pkg> library</flag> + <flag name="openinventor">Build OpenInventor plugin</flag> + <flag name="osgapps">Build osg applications</flag> + <flag name="sdl2">Use <pkg>media-libs/libsdl2</pkg> additionally to <pkg>media-libs/libsdl</pkg></flag> + <flag name="xrandr">Enable support for the X xrandr extension</flag> + </use> + <upstream> + <remote-id type="github">openscenegraph/OpenSceneGraph</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-games/openscenegraph/openscenegraph-3.6.5-r118.ebuild b/dev-games/openscenegraph/openscenegraph-3.6.5-r118.ebuild new file mode 100644 index 000000000000..fb651f65949f --- /dev/null +++ b/dev-games/openscenegraph/openscenegraph-3.6.5-r118.ebuild @@ -0,0 +1,175 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1,3,4} luajit ) + +WX_GTK_VER="3.2-gtk3" +inherit cmake flag-o-matic lua-single wxwidgets + +MY_PN="OpenSceneGraph" +MY_P=${MY_PN}-${PV} + +DESCRIPTION="Open source high performance 3D graphics toolkit" +HOMEPAGE="https://www.openscenegraph.com/" +SRC_URI="https://github.com/${PN}/${MY_PN}/archive/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_PN}-${MY_P}" + +LICENSE="wxWinLL-3 LGPL-2.1" +SLOT="0/161" # NOTE: CHECK WHEN BUMPING! Subslot is SOVERSION +KEYWORDS="amd64 ~arm64 ~hppa ppc64 x86" +IUSE=" + collada curl dicom debug doc egl examples ffmpeg fltk fox gdal + gif glut gstreamer jpeg lua openexr openinventor osgapps pdf png + sdl sdl2 svg tiff truetype vnc wxwidgets xrandr +zlib +" + +REQUIRED_USE=" + dicom? ( zlib ) + lua? ( ${LUA_REQUIRED_USE} ) + openexr? ( zlib ) + sdl2? ( sdl ) +" + +# TODO: FBX, GTA, NVTT, OpenVRML, Performer +BDEPEND=" + app-arch/unzip + virtual/pkgconfig + doc? ( app-text/doxygen[dot] ) +" +# <ffmpeg-5 for bug #831486 / bug #834425 and +# https://github.com/openscenegraph/OpenSceneGraph/issues/1111 +RDEPEND=" + media-libs/mesa[egl(+)?] + virtual/glu + virtual/opengl + x11-libs/libSM + x11-libs/libXext + collada? ( dev-libs/collada-dom:= ) + curl? ( net-misc/curl ) + examples? ( + fltk? ( x11-libs/fltk:1[opengl] ) + fox? ( x11-libs/fox:1.6[opengl] ) + glut? ( media-libs/freeglut ) + sdl2? ( media-libs/libsdl2 ) + wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}=[opengl,X] ) + ) + ffmpeg? ( <media-video/ffmpeg-5:= ) + gdal? ( sci-libs/gdal:= ) + gif? ( media-libs/giflib:= ) + gstreamer? ( + media-libs/gstreamer:1.0 + media-libs/gst-plugins-base:1.0 + ) + jpeg? ( media-libs/libjpeg-turbo:= ) + lua? ( ${LUA_DEPS} ) + openexr? ( + dev-libs/imath:= + >=media-libs/openexr-3:= + ) + openinventor? ( media-libs/coin ) + pdf? ( app-text/poppler[cairo] ) + png? ( media-libs/libpng:0= ) + sdl? ( media-libs/libsdl ) + svg? ( + gnome-base/librsvg + x11-libs/cairo + ) + tiff? ( media-libs/tiff:= ) + truetype? ( media-libs/freetype:2 ) + vnc? ( net-libs/libvncserver ) + xrandr? ( x11-libs/libXrandr ) + zlib? ( virtual/zlib:= ) +" +DEPEND="${RDEPEND} + dev-libs/boost + x11-base/xorg-proto +" + +PATCHES=( + "${FILESDIR}"/${PN}-3.6.3-cmake.patch + "${FILESDIR}"/${PN}-3.6.3-docdir.patch + "${FILESDIR}"/${PN}-3.6.5-use_boost_asio.patch + "${FILESDIR}"/${PN}-3.6.5-cmake_lua_version.patch + "${FILESDIR}"/${PN}-3.6.5-openexr3.patch + "${FILESDIR}"/${PN}-3.6.5-remove-register-keyword.patch + "${FILESDIR}"/${PN}-3.6.5-boost-1.87.0.patch +) + +pkg_setup() { + use lua && lua-single_pkg_setup +} + +src_configure() { + if use examples && use wxwidgets; then + setup-wxwidgets unicode + fi + + # Needed by FFmpeg + append-cppflags -D__STDC_CONSTANT_MACROS + + local libdir=$(get_libdir) + local mycmakeargs=( + -DCMAKE_RELWITHDEBINFO_POSTFIX= + -DDYNAMIC_OPENSCENEGRAPH=ON + -DLIB_POSTFIX=${libdir/lib} + -DOPENGL_PROFILE=GL2 #GL1 GL2 GL3 GLES1 GLES3 GLES3 + $(cmake_use_find_package collada COLLADA) + $(cmake_use_find_package curl CURL) + -DBUILD_DOCUMENTATION=$(usex doc) + $(cmake_use_find_package dicom DCMTK) + $(cmake_use_find_package egl EGL) + -DBUILD_OSG_EXAMPLES=$(usex examples) + $(cmake_use_find_package ffmpeg FFmpeg) + $(cmake_use_find_package gdal GDAL) + $(cmake_use_find_package gif GIFLIB) + $(cmake_use_find_package gstreamer GLIB) + $(cmake_use_find_package gstreamer GStreamer) + -DCMAKE_DISABLE_FIND_PACKAGE_GtkGl=ON + $(cmake_use_find_package jpeg JPEG) + -DCMAKE_DISABLE_FIND_PACKAGE_Jasper=ON + # PDAL instead of LAS: No one upstream willing to pick it up: + # https://github.com/openscenegraph/OpenSceneGraph/pull/1093 + # https://github.com/OpenMW/osg/pull/33 + -DCMAKE_DISABLE_FIND_PACKAGE_LIBLAS=ON + $(cmake_use_find_package lua Lua) + -DCMAKE_DISABLE_FIND_PACKAGE_OpenCascade=ON + $(cmake_use_find_package openexr OpenEXR) + $(cmake_use_find_package openinventor Inventor) + -DBUILD_OSG_APPLICATIONS=$(usex osgapps) + $(cmake_use_find_package pdf Poppler-glib) + $(cmake_use_find_package png PNG) + $(cmake_use_find_package sdl SDL) + $(cmake_use_find_package sdl2 SDL2) + $(cmake_use_find_package svg RSVG) + $(cmake_use_find_package tiff TIFF) + $(cmake_use_find_package truetype Freetype) + $(cmake_use_find_package vnc LibVNCServer) + -DOSGVIEWER_USE_XRANDR=$(usex xrandr) + $(cmake_use_find_package zlib ZLIB) + -DOSG_USE_LOCAL_LUA_SOURCE=OFF + ) + + if use examples; then + mycmakeargs+=( + $(cmake_use_find_package fltk FLTK) + $(cmake_use_find_package fox FOX) + $(cmake_use_find_package glut GLUT) + $(cmake_use_find_package wxwidgets wxWidgets) + ) + fi + + if use lua; then + mycmakeargs+=( + -DLUA_VERSION="$(lua_get_version)" + ) + fi + + cmake_src_configure +} + +src_compile() { + cmake_src_compile + use doc && cmake_src_compile doc_openscenegraph doc_openthreads +} |
