1 |
commit: 4087e26ba7a542e391b3705e88e93a14bf032410 |
2 |
Author: Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org> |
3 |
AuthorDate: Thu Jul 22 19:10:30 2021 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 31 00:59:04 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4087e26b |
7 |
|
8 |
dev-games/openscenegraph-openmw: new version 3.6_p20210610 |
9 |
|
10 |
Based on openscenegraph-3.6.5-r110 |
11 |
|
12 |
Also apply egl patch from https://github.com/gentoo/gentoo/pull/21742 |
13 |
|
14 |
Bug: https://bugs.gentoo.org/797403 |
15 |
Package-Manager: Portage-3.0.20, Repoman-3.0.2 |
16 |
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org> |
17 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
18 |
|
19 |
dev-games/openscenegraph-openmw/Manifest | 1 + |
20 |
.../files/openscenegraph-3.6.3-cmake.patch | 12 + |
21 |
.../openscenegraph-3.6.5-cmake_lua_version.patch | 14 ++ |
22 |
.../openscenegraph-3.6.5-use_boost_asio.patch | 263 +++++++++++++++++++++ |
23 |
dev-games/openscenegraph-openmw/metadata.xml | 6 + |
24 |
.../openscenegraph-openmw-3.6_p20210610.ebuild | 167 +++++++++++++ |
25 |
6 files changed, 463 insertions(+) |
26 |
|
27 |
diff --git a/dev-games/openscenegraph-openmw/Manifest b/dev-games/openscenegraph-openmw/Manifest |
28 |
index 16fc597107e..f6fca44cefb 100644 |
29 |
--- a/dev-games/openscenegraph-openmw/Manifest |
30 |
+++ b/dev-games/openscenegraph-openmw/Manifest |
31 |
@@ -1 +1,2 @@ |
32 |
DIST openscenegraph-openmw-3.4_p20200425.tar.gz 5698786 BLAKE2B 43684fa898912434dae9a7b41070a893c407dceba7e468a3f3dede32e24aea55d921098faf8d9d05708d2ef01a3507b2f126939dc13b8693002a0bec189bbaf7 SHA512 9bb4d2a6ca4694ee22a29508b74a095a483584ea801dc8298ec8a9b41c4d4fe18c52a21849ae9ec1065060479dcad5156227f82feed13c177415662ecba1da70 |
33 |
+DIST openscenegraph-openmw-3.6_p20210610.tar.gz 5788655 BLAKE2B fdf345502ee7bb742741da758ae212028882544766a6acba3309d27e2fffa230e4a07626c9a39dbdf1310374b765b3941c915d7b6d527fc7cb75ba028230b4a0 SHA512 1964b12fedf297b8baf77d4db2eb4ce6732925bb3974fb4d8d20b1dec751400ceb57faf0b069c2a5cf45728cad83ea434356edbcb19413d650717c3d2ac39a03 |
34 |
|
35 |
diff --git a/dev-games/openscenegraph-openmw/files/openscenegraph-3.6.3-cmake.patch b/dev-games/openscenegraph-openmw/files/openscenegraph-3.6.3-cmake.patch |
36 |
new file mode 100644 |
37 |
index 00000000000..708c6865968 |
38 |
--- /dev/null |
39 |
+++ b/dev-games/openscenegraph-openmw/files/openscenegraph-3.6.3-cmake.patch |
40 |
@@ -0,0 +1,12 @@ |
41 |
+--- a/CMakeModules/OsgMacroUtils.cmake |
42 |
++++ b/CMakeModules/OsgMacroUtils.cmake |
43 |
+@@ -463,7 +463,7 @@ MACRO(SETUP_EXAMPLE EXAMPLE_NAME) |
44 |
+ IF(APPLE) |
45 |
+ INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin BUNDLE DESTINATION share/OpenSceneGraph/bin ) |
46 |
+ ELSE(APPLE) |
47 |
+- INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples ) |
48 |
++ INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin COMPONENT openscenegraph-examples ) |
49 |
+ IF(MSVC) |
50 |
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_TARGETNAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples CONFIGURATIONS RelWithDebInfo) |
51 |
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_TARGETNAME}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples CONFIGURATIONS Debug) |
52 |
+ |
53 |
|
54 |
diff --git a/dev-games/openscenegraph-openmw/files/openscenegraph-3.6.5-cmake_lua_version.patch b/dev-games/openscenegraph-openmw/files/openscenegraph-3.6.5-cmake_lua_version.patch |
55 |
new file mode 100644 |
56 |
index 00000000000..1373b296da0 |
57 |
--- /dev/null |
58 |
+++ b/dev-games/openscenegraph-openmw/files/openscenegraph-3.6.5-cmake_lua_version.patch |
59 |
@@ -0,0 +1,14 @@ |
60 |
+--- a/CMakeLists.txt |
61 |
++++ b/CMakeLists.txt |
62 |
+@@ -771,10 +771,7 @@ |
63 |
+ FIND_PACKAGE(LIBLAS) |
64 |
+ |
65 |
+ IF (NOT(OSG_USE_LOCAL_LUA_SOURCE)) |
66 |
+- FIND_PACKAGE(Lua52) |
67 |
+- IF (NOT (LUA_LIBRARIES AND LUA_INCLUDE_DIR)) |
68 |
+- FIND_PACKAGE(Lua51) |
69 |
+- ENDIF() |
70 |
++ FIND_PACKAGE(Lua ${LUA_VERSION} EXACT) |
71 |
+ ENDIF() |
72 |
+ |
73 |
+ # V8 and Python plugins are tests for linking against these libraries but aren't functionality beyond this. |
74 |
|
75 |
diff --git a/dev-games/openscenegraph-openmw/files/openscenegraph-3.6.5-use_boost_asio.patch b/dev-games/openscenegraph-openmw/files/openscenegraph-3.6.5-use_boost_asio.patch |
76 |
new file mode 100644 |
77 |
index 00000000000..f9a32c0dc60 |
78 |
--- /dev/null |
79 |
+++ b/dev-games/openscenegraph-openmw/files/openscenegraph-3.6.5-use_boost_asio.patch |
80 |
@@ -0,0 +1,263 @@ |
81 |
+--- a/CMakeLists.txt |
82 |
++++ b/CMakeLists.txt |
83 |
+@@ -764,7 +764,7 @@ |
84 |
+ FIND_PACKAGE(DirectInput) |
85 |
+ FIND_PACKAGE(NVTT) |
86 |
+ IF (NOT WIN32) |
87 |
+- FIND_PACKAGE(Asio) |
88 |
++ FIND_PACKAGE(Boost) |
89 |
+ ENDIF() |
90 |
+ FIND_PACKAGE(ZeroConf) |
91 |
+ |
92 |
+--- a/CMakeModules/FindAsio.cmake |
93 |
++++ b/CMakeModules/FindAsio.cmake |
94 |
+@@ -1,22 +0,0 @@ |
95 |
+-# Locate ASIO-headers (http://think-async.com/Asio) |
96 |
+-# This module defines |
97 |
+-# ASIO_FOUND, if false, do not try to link to gdal |
98 |
+-# ASIO_INCLUDE_DIR, where to find the headers |
99 |
+-# |
100 |
+-# Created by Stephan Maximilian Huber |
101 |
+- |
102 |
+-FIND_PATH(ASIO_INCLUDE_DIR |
103 |
+- NAMES |
104 |
+- asio.hpp |
105 |
+- PATHS |
106 |
+- /usr/include |
107 |
+- /usr/local/include |
108 |
+-) |
109 |
+- |
110 |
+-SET(ASIO_FOUND "NO") |
111 |
+-IF(ASIO_INCLUDE_DIR) |
112 |
+- FIND_PACKAGE( Boost 1.37 ) |
113 |
+- IF(Boost_FOUND) |
114 |
+- SET(ASIO_FOUND "YES") |
115 |
+- ENDIF() |
116 |
+-ENDIF() |
117 |
+--- a/src/osgPlugins/CMakeLists.txt |
118 |
++++ b/src/osgPlugins/CMakeLists.txt |
119 |
+@@ -299,13 +299,13 @@ |
120 |
+ # |
121 |
+ # Device integration plugins |
122 |
+ # |
123 |
+-IF (SDL_FOUND) |
124 |
++IF(SDL_FOUND) |
125 |
+ ADD_PLUGIN_DIRECTORY(sdl) |
126 |
+-ENDIF(SDL_FOUND) |
127 |
++ENDIF() |
128 |
+ |
129 |
+-IF(ASIO_FOUND) |
130 |
++IF(Boost_FOUND) |
131 |
+ ADD_PLUGIN_DIRECTORY(RestHttpDevice) |
132 |
+-ENDIF(ASIO_FOUND) |
133 |
++ENDIF() |
134 |
+ |
135 |
+ |
136 |
+ IF(ZEROCONF_FOUND) |
137 |
+--- a/src/osgPlugins/RestHttpDevice/CMakeLists.txt |
138 |
++++ b/src/osgPlugins/RestHttpDevice/CMakeLists.txt |
139 |
+@@ -1,6 +1,5 @@ |
140 |
+ INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) |
141 |
+-INCLUDE_DIRECTORIES(${ASIO_INCLUDE_DIR}) |
142 |
+- |
143 |
++ |
144 |
+ SET(TARGET_SRC |
145 |
+ connection.cpp |
146 |
+ io_service_pool.cpp |
147 |
+@@ -26,7 +25,7 @@ |
148 |
+ RestHttpDevice.hpp |
149 |
+ ) |
150 |
+ |
151 |
+-SET(TARGET_ADDED_LIBRARIES osgPresentation ) |
152 |
++SET(TARGET_ADDED_LIBRARIES osgPresentation) |
153 |
+ |
154 |
+ #### end var setup ### |
155 |
+ SETUP_PLUGIN(resthttp) |
156 |
+--- a/src/osgPlugins/RestHttpDevice/connection.cpp |
157 |
++++ b/src/osgPlugins/RestHttpDevice/connection.cpp |
158 |
+@@ -37,14 +37,14 @@ |
159 |
+ void connection::start() |
160 |
+ { |
161 |
+ OSG_DEBUG << "RestHttpDevice :: connection::start" << std::endl; |
162 |
+- |
163 |
++ |
164 |
+ socket_.async_read_some(asio::buffer(buffer_), |
165 |
+ boost::bind(&connection::handle_read, shared_from_this(), |
166 |
+ asio::placeholders::error, |
167 |
+ asio::placeholders::bytes_transferred)); |
168 |
+ } |
169 |
+ |
170 |
+-void connection::handle_read(const asio::error_code& e, |
171 |
++void connection::handle_read(const boost::system::error_code& e, |
172 |
+ std::size_t bytes_transferred) |
173 |
+ { |
174 |
+ if (!e) |
175 |
+@@ -82,12 +82,12 @@ |
176 |
+ // handler returns. The connection class's destructor closes the socket. |
177 |
+ } |
178 |
+ |
179 |
+-void connection::handle_write(const asio::error_code& e) |
180 |
++void connection::handle_write(const boost::system::error_code& e) |
181 |
+ { |
182 |
+ if (!e) |
183 |
+ { |
184 |
+ // Initiate graceful connection closure. |
185 |
+- asio::error_code ignored_ec; |
186 |
++ boost::system::error_code ignored_ec; |
187 |
+ socket_.shutdown(asio::ip::tcp::socket::shutdown_both, ignored_ec); |
188 |
+ } |
189 |
+ |
190 |
+--- a/src/osgPlugins/RestHttpDevice/connection.hpp |
191 |
++++ b/src/osgPlugins/RestHttpDevice/connection.hpp |
192 |
+@@ -11,7 +11,7 @@ |
193 |
+ #ifndef HTTP_SERVER_CONNECTION_HPP |
194 |
+ #define HTTP_SERVER_CONNECTION_HPP |
195 |
+ |
196 |
+-#include <asio.hpp> |
197 |
++#include <boost/asio.hpp> |
198 |
+ #include <boost/array.hpp> |
199 |
+ #include <boost/noncopyable.hpp> |
200 |
+ #include <boost/shared_ptr.hpp> |
201 |
+@@ -21,6 +21,8 @@ |
202 |
+ #include "request_handler.hpp" |
203 |
+ #include "request_parser.hpp" |
204 |
+ |
205 |
++using namespace boost; |
206 |
++ |
207 |
+ namespace http { |
208 |
+ namespace server { |
209 |
+ |
210 |
+@@ -42,11 +44,11 @@ |
211 |
+ ~connection(); |
212 |
+ private: |
213 |
+ /// Handle completion of a read operation. |
214 |
+- void handle_read(const asio::error_code& e, |
215 |
++ void handle_read(const boost::system::error_code& e, |
216 |
+ std::size_t bytes_transferred); |
217 |
+ |
218 |
+ /// Handle completion of a write operation. |
219 |
+- void handle_write(const asio::error_code& e); |
220 |
++ void handle_write(const boost::system::error_code& e); |
221 |
+ |
222 |
+ /// Socket for the connection. |
223 |
+ asio::ip::tcp::socket socket_; |
224 |
+--- a/src/osgPlugins/RestHttpDevice/io_service_pool.cpp |
225 |
++++ b/src/osgPlugins/RestHttpDevice/io_service_pool.cpp |
226 |
+@@ -11,7 +11,7 @@ |
227 |
+ #include "server.hpp" |
228 |
+ #include <stdexcept> |
229 |
+ #include <boost/bind.hpp> |
230 |
+-#include <boost/shared_ptr.hpp> |
231 |
++#include <boost/thread.hpp> |
232 |
+ |
233 |
+ namespace http { |
234 |
+ namespace server { |
235 |
+@@ -36,17 +36,14 @@ |
236 |
+ void io_service_pool::run() |
237 |
+ { |
238 |
+ // Create a pool of threads to run all of the io_services. |
239 |
+- std::vector<boost::shared_ptr<asio::thread> > threads; |
240 |
++ std::vector<thread> threads; |
241 |
+ for (std::size_t i = 0; i < io_services_.size(); ++i) |
242 |
+- { |
243 |
+- boost::shared_ptr<asio::thread> thread(new asio::thread( |
244 |
+- boost::bind(&asio::io_service::run, io_services_[i]))); |
245 |
+- threads.push_back(thread); |
246 |
+- } |
247 |
++ threads.emplace_back(thread(boost::bind(&asio::io_service::run, |
248 |
++ io_services_[i]))); |
249 |
+ |
250 |
+ // Wait for all threads in the pool to exit. |
251 |
+ for (std::size_t i = 0; i < threads.size(); ++i) |
252 |
+- threads[i]->join(); |
253 |
++ threads[i].join(); |
254 |
+ } |
255 |
+ |
256 |
+ void io_service_pool::stop() |
257 |
+--- a/src/osgPlugins/RestHttpDevice/io_service_pool.hpp |
258 |
++++ b/src/osgPlugins/RestHttpDevice/io_service_pool.hpp |
259 |
+@@ -11,11 +11,13 @@ |
260 |
+ #ifndef HTTP_SERVER_IO_SERVICE_POOL_HPP |
261 |
+ #define HTTP_SERVER_IO_SERVICE_POOL_HPP |
262 |
+ |
263 |
+-#include <asio.hpp> |
264 |
++#include <boost/asio.hpp> |
265 |
+ #include <vector> |
266 |
+ #include <boost/noncopyable.hpp> |
267 |
+ #include <boost/shared_ptr.hpp> |
268 |
+ |
269 |
++using namespace boost; |
270 |
++ |
271 |
+ namespace http { |
272 |
+ namespace server { |
273 |
+ |
274 |
+--- a/src/osgPlugins/RestHttpDevice/reply.hpp |
275 |
++++ b/src/osgPlugins/RestHttpDevice/reply.hpp |
276 |
+@@ -13,9 +13,11 @@ |
277 |
+ |
278 |
+ #include <string> |
279 |
+ #include <vector> |
280 |
+-#include <asio.hpp> |
281 |
++#include <boost/asio.hpp> |
282 |
+ #include "header.hpp" |
283 |
+ |
284 |
++using namespace boost; |
285 |
++ |
286 |
+ namespace http { |
287 |
+ namespace server { |
288 |
+ |
289 |
+--- a/src/osgPlugins/RestHttpDevice/server.cpp |
290 |
++++ b/src/osgPlugins/RestHttpDevice/server.cpp |
291 |
+@@ -23,7 +23,7 @@ |
292 |
+ request_handler_(doc_root) |
293 |
+ { |
294 |
+ // Open the acceptor with the option to reuse the address (i.e. SO_REUSEADDR). |
295 |
+- asio::ip::tcp::resolver resolver(acceptor_.get_io_service()); |
296 |
++ asio::ip::tcp::resolver resolver(io_service_pool_.get_io_service()); |
297 |
+ asio::ip::tcp::resolver::query query(address, port); |
298 |
+ asio::ip::tcp::endpoint endpoint = *resolver.resolve(query); |
299 |
+ acceptor_.open(endpoint.protocol()); |
300 |
+@@ -47,7 +47,7 @@ |
301 |
+ io_service_pool_.stop(); |
302 |
+ } |
303 |
+ |
304 |
+-void server::handle_accept(const asio::error_code& e) |
305 |
++void server::handle_accept(const boost::system::error_code& e) |
306 |
+ { |
307 |
+ if (!e) |
308 |
+ { |
309 |
+--- a/src/osgPlugins/RestHttpDevice/server.hpp |
310 |
++++ b/src/osgPlugins/RestHttpDevice/server.hpp |
311 |
+@@ -11,7 +11,7 @@ |
312 |
+ #ifndef HTTP_SERVER_SERVER_HPP |
313 |
+ #define HTTP_SERVER_SERVER_HPP |
314 |
+ |
315 |
+-#include <asio.hpp> |
316 |
++#include <boost/asio.hpp> |
317 |
+ #include <string> |
318 |
+ #include <vector> |
319 |
+ #include <boost/noncopyable.hpp> |
320 |
+@@ -20,6 +20,8 @@ |
321 |
+ #include "io_service_pool.hpp" |
322 |
+ #include "request_handler.hpp" |
323 |
+ |
324 |
++using namespace boost; |
325 |
++ |
326 |
+ namespace http { |
327 |
+ namespace server { |
328 |
+ |
329 |
+@@ -38,12 +40,12 @@ |
330 |
+ |
331 |
+ /// Stop the server. |
332 |
+ void stop(); |
333 |
+- |
334 |
++ |
335 |
+ void setCallback(request_handler::Callback* cb) { request_handler_.setCallback(cb); } |
336 |
+ |
337 |
+ private: |
338 |
+ /// Handle completion of an asynchronous accept operation. |
339 |
+- void handle_accept(const asio::error_code& e); |
340 |
++ void handle_accept(const boost::system::error_code& e); |
341 |
+ |
342 |
+ /// The pool of io_service objects used to perform asynchronous operations. |
343 |
+ io_service_pool io_service_pool_; |
344 |
|
345 |
diff --git a/dev-games/openscenegraph-openmw/metadata.xml b/dev-games/openscenegraph-openmw/metadata.xml |
346 |
index 6e5dbab6657..c9b5ea504b4 100644 |
347 |
--- a/dev-games/openscenegraph-openmw/metadata.xml |
348 |
+++ b/dev-games/openscenegraph-openmw/metadata.xml |
349 |
@@ -16,10 +16,16 @@ |
350 |
<longdescription lang="en"> |
351 |
OpenSceneGraph on steroids. This fork was created to experiment with performance enhancements for OpenMW that are too controversial to be included in the general purpose OSG project - either for design reasons or backward compatibility reasons. OpenMW still works with "vanilla" OpenSceneGraph, but it is recommended to use the fork for better performance (around 10-15% on most devices). Note that the improvements are very specific to OpenMW and its animation code in particular; other OpenSceneGraph applications are not likely to see the same speed-up, or any speed-up at all if they are already GPU limited. |
352 |
</longdescription> |
353 |
+ <upstream> |
354 |
+ <remote-id type="github">OpenMW/osg</remote-id> |
355 |
+ </upstream> |
356 |
<use> |
357 |
+ <flag name="collada">Enable DAE file support via <pkg>dev-libs/collada-dom</pkg></flag> |
358 |
+ <flag name="dicom">Enable DICOM medical image file support via <pkg>sci-libs/dcmtk</pkg></flag> |
359 |
<flag name="egl">Enable EGL support</flag> |
360 |
<flag name="fox">Build examples using <pkg>x11-libs/fox</pkg> library</flag> |
361 |
<flag name="gdal">Enable support for <pkg>sci-libs/gdal</pkg> library</flag> |
362 |
+ <flag name="las">Enable support for geospatial data LAS LiDAR format using <pkg>sci-geosciences/liblas</pkg></flag> |
363 |
<flag name="openinventor">Build OpenInventor plugin</flag> |
364 |
<flag name="osgapps">Build osg applications</flag> |
365 |
<flag name="sdl2">Use <pkg>media-libs/libsdl2</pkg> additionally to <pkg>media-libs/libsdl</pkg></flag> |
366 |
|
367 |
diff --git a/dev-games/openscenegraph-openmw/openscenegraph-openmw-3.6_p20210610.ebuild b/dev-games/openscenegraph-openmw/openscenegraph-openmw-3.6_p20210610.ebuild |
368 |
new file mode 100644 |
369 |
index 00000000000..1fe85653833 |
370 |
--- /dev/null |
371 |
+++ b/dev-games/openscenegraph-openmw/openscenegraph-openmw-3.6_p20210610.ebuild |
372 |
@@ -0,0 +1,167 @@ |
373 |
+# Copyright 1999-2021 Gentoo Authors |
374 |
+# Distributed under the terms of the GNU General Public License v2 |
375 |
+ |
376 |
+EAPI=7 |
377 |
+ |
378 |
+LUA_COMPAT=( lua5-1 ) |
379 |
+ |
380 |
+WX_GTK_VER="3.0-gtk3" |
381 |
+inherit cmake flag-o-matic lua-single wxwidgets |
382 |
+ |
383 |
+MY_COMMIT="b02abe200c4847e73b887b064a89ea1758a5b733" |
384 |
+ |
385 |
+DESCRIPTION="OpenMW-specific fork of OpenSceneGraph" |
386 |
+HOMEPAGE="https://github.com/OpenMW/osg" |
387 |
+SRC_URI="https://github.com/OpenMW/osg/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz" |
388 |
+S="${WORKDIR}/osg-${MY_COMMIT}" |
389 |
+ |
390 |
+LICENSE="wxWinLL-3 LGPL-2.1" |
391 |
+SLOT="0/162" # NOTE: CHECK WHEN BUMPING! Subslot is SOVERSION |
392 |
+KEYWORDS="~amd64 ~x86" |
393 |
+IUSE=" |
394 |
+ collada curl dicom debug doc egl examples ffmpeg fltk fox gdal |
395 |
+ gif glut gstreamer jpeg las lua openexr openinventor osgapps pdf png |
396 |
+ sdl sdl2 svg tiff truetype vnc wxwidgets xrandr +zlib |
397 |
+" |
398 |
+ |
399 |
+REQUIRED_USE=" |
400 |
+ dicom? ( zlib ) |
401 |
+ lua? ( ${LUA_REQUIRED_USE} ) |
402 |
+ openexr? ( zlib ) |
403 |
+ sdl2? ( sdl ) |
404 |
+" |
405 |
+ |
406 |
+# TODO: FBX, GTA, NVTT, OpenVRML, Performer |
407 |
+BDEPEND=" |
408 |
+ app-arch/unzip |
409 |
+ virtual/pkgconfig |
410 |
+ doc? ( app-doc/doxygen ) |
411 |
+" |
412 |
+RDEPEND=" |
413 |
+ !dev-games/openscenegraph |
414 |
+ media-libs/mesa[egl(+)?] |
415 |
+ virtual/glu |
416 |
+ virtual/opengl |
417 |
+ x11-libs/libSM |
418 |
+ x11-libs/libXext |
419 |
+ collada? ( dev-libs/collada-dom:= ) |
420 |
+ curl? ( net-misc/curl ) |
421 |
+ examples? ( |
422 |
+ fltk? ( x11-libs/fltk:1[opengl] ) |
423 |
+ fox? ( x11-libs/fox:1.6[opengl] ) |
424 |
+ glut? ( media-libs/freeglut ) |
425 |
+ sdl2? ( media-libs/libsdl2 ) |
426 |
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[opengl,X] ) |
427 |
+ ) |
428 |
+ ffmpeg? ( media-video/ffmpeg:0= ) |
429 |
+ gdal? ( sci-libs/gdal:= ) |
430 |
+ gif? ( media-libs/giflib:= ) |
431 |
+ gstreamer? ( |
432 |
+ media-libs/gstreamer:1.0 |
433 |
+ media-libs/gst-plugins-base:1.0 |
434 |
+ ) |
435 |
+ jpeg? ( virtual/jpeg:0 ) |
436 |
+ las? ( >=sci-geosciences/liblas-1.8.0 ) |
437 |
+ lua? ( ${LUA_DEPS} ) |
438 |
+ openexr? ( |
439 |
+ media-libs/ilmbase:= |
440 |
+ media-libs/openexr:= |
441 |
+ ) |
442 |
+ openinventor? ( media-libs/coin ) |
443 |
+ pdf? ( app-text/poppler[cairo] ) |
444 |
+ png? ( media-libs/libpng:0= ) |
445 |
+ sdl? ( media-libs/libsdl ) |
446 |
+ svg? ( |
447 |
+ gnome-base/librsvg |
448 |
+ x11-libs/cairo |
449 |
+ ) |
450 |
+ tiff? ( media-libs/tiff:0 ) |
451 |
+ truetype? ( media-libs/freetype:2 ) |
452 |
+ vnc? ( net-libs/libvncserver ) |
453 |
+ xrandr? ( x11-libs/libXrandr ) |
454 |
+ zlib? ( sys-libs/zlib ) |
455 |
+" |
456 |
+DEPEND="${RDEPEND} |
457 |
+ dev-libs/boost |
458 |
+ x11-base/xorg-proto |
459 |
+" |
460 |
+ |
461 |
+PATCHES=( |
462 |
+ "${FILESDIR}"/openscenegraph-3.6.3-cmake.patch |
463 |
+ "${FILESDIR}"/openscenegraph-3.6.3-docdir.patch |
464 |
+ "${FILESDIR}"/openscenegraph-3.6.5-use_boost_asio.patch |
465 |
+ "${FILESDIR}"/openscenegraph-3.6.5-cmake_lua_version.patch |
466 |
+) |
467 |
+ |
468 |
+pkg_setup() { |
469 |
+ use lua && lua-single_pkg_setup |
470 |
+} |
471 |
+ |
472 |
+src_configure() { |
473 |
+ if use examples && use wxwidgets; then |
474 |
+ setup-wxwidgets unicode |
475 |
+ fi |
476 |
+ |
477 |
+ # Needed by FFmpeg |
478 |
+ append-cppflags -D__STDC_CONSTANT_MACROS |
479 |
+ |
480 |
+ local libdir=$(get_libdir) |
481 |
+ local mycmakeargs=( |
482 |
+ -DDYNAMIC_OPENSCENEGRAPH=ON |
483 |
+ -DLIB_POSTFIX=${libdir/lib} |
484 |
+ -DOPENGL_PROFILE=GL2 #GL1 GL2 GL3 GLES1 GLES3 GLES3 |
485 |
+ $(cmake_use_find_package collada COLLADA) |
486 |
+ $(cmake_use_find_package curl CURL) |
487 |
+ -DBUILD_DOCUMENTATION=$(usex doc) |
488 |
+ $(cmake_use_find_package dicom DCMTK) |
489 |
+ $(cmake_use_find_package egl EGL) |
490 |
+ -DBUILD_OSG_EXAMPLES=$(usex examples) |
491 |
+ $(cmake_use_find_package ffmpeg FFmpeg) |
492 |
+ $(cmake_use_find_package gdal GDAL) |
493 |
+ $(cmake_use_find_package gif GIFLIB) |
494 |
+ $(cmake_use_find_package gstreamer GLIB) |
495 |
+ $(cmake_use_find_package gstreamer GStreamer) |
496 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_GtkGl=ON |
497 |
+ $(cmake_use_find_package jpeg JPEG) |
498 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Jasper=ON |
499 |
+ $(cmake_use_find_package las LIBLAS) |
500 |
+ $(cmake_use_find_package lua Lua) |
501 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_OpenCascade=ON |
502 |
+ $(cmake_use_find_package openexr OpenEXR) |
503 |
+ $(cmake_use_find_package openinventor Inventor) |
504 |
+ -DBUILD_OSG_APPLICATIONS=$(usex osgapps) |
505 |
+ $(cmake_use_find_package pdf Poppler-glib) |
506 |
+ $(cmake_use_find_package png PNG) |
507 |
+ $(cmake_use_find_package sdl SDL) |
508 |
+ $(cmake_use_find_package sdl2 SDL2) |
509 |
+ $(cmake_use_find_package svg RSVG) |
510 |
+ $(cmake_use_find_package tiff TIFF) |
511 |
+ $(cmake_use_find_package truetype Freetype) |
512 |
+ $(cmake_use_find_package vnc LibVNCServer) |
513 |
+ -DOSGVIEWER_USE_XRANDR=$(usex xrandr) |
514 |
+ $(cmake_use_find_package zlib ZLIB) |
515 |
+ -DOSG_USE_LOCAL_LUA_SOURCE=OFF |
516 |
+ ) |
517 |
+ |
518 |
+ if use examples; then |
519 |
+ mycmakeargs+=( |
520 |
+ $(cmake_use_find_package fltk FLTK) |
521 |
+ $(cmake_use_find_package fox FOX) |
522 |
+ $(cmake_use_find_package glut GLUT) |
523 |
+ $(cmake_use_find_package wxwidgets wxWidgets) |
524 |
+ ) |
525 |
+ fi |
526 |
+ |
527 |
+ if use lua; then |
528 |
+ mycmakeargs+=( |
529 |
+ -DLUA_VERSION="$(lua_get_version)" |
530 |
+ ) |
531 |
+ fi |
532 |
+ |
533 |
+ cmake_src_configure |
534 |
+} |
535 |
+ |
536 |
+src_compile() { |
537 |
+ cmake_src_compile |
538 |
+ use doc && cmake_src_compile doc_openscenegraph doc_openthreads |
539 |
+} |