Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-games/openscenegraph/
Date: Sat, 31 Jul 2021 01:15:41
Message-Id: 1627693143.a7f816e5193bf8d2f30ce7fb2c49eba364ba79e8.ionen@gentoo
1 commit: a7f816e5193bf8d2f30ce7fb2c49eba364ba79e8
2 Author: Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
3 AuthorDate: Thu Jul 22 18:57:26 2021 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 31 00:59:03 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7f816e5
7
8 dev-games/openscenegraph: add collada support
9
10 Also apply egl patch from https://github.com/gentoo/gentoo/pull/21742
11
12 Bug: https://bugs.gentoo.org/797403
13 Package-Manager: Portage-3.0.20, Repoman-3.0.2
14 Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
15 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
16
17 dev-games/openscenegraph/metadata.xml | 1 +
18 .../openscenegraph-3.6.5-r110.ebuild | 167 +++++++++++++++++++++
19 2 files changed, 168 insertions(+)
20
21 diff --git a/dev-games/openscenegraph/metadata.xml b/dev-games/openscenegraph/metadata.xml
22 index 0f8459428ab..d265f9102bd 100644
23 --- a/dev-games/openscenegraph/metadata.xml
24 +++ b/dev-games/openscenegraph/metadata.xml
25 @@ -13,6 +13,7 @@
26 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.
27 </longdescription>
28 <use>
29 + <flag name="collada">Enable DAE file support via <pkg>dev-libs/collada-dom</pkg></flag>
30 <flag name="dicom">Enable DICOM medical image file support via <pkg>sci-libs/dcmtk</pkg></flag>
31 <flag name="egl">Enable EGL support</flag>
32 <flag name="fox">Build examples using <pkg>x11-libs/fox</pkg> library</flag>
33
34 diff --git a/dev-games/openscenegraph/openscenegraph-3.6.5-r110.ebuild b/dev-games/openscenegraph/openscenegraph-3.6.5-r110.ebuild
35 new file mode 100644
36 index 00000000000..34031794ef5
37 --- /dev/null
38 +++ b/dev-games/openscenegraph/openscenegraph-3.6.5-r110.ebuild
39 @@ -0,0 +1,167 @@
40 +# Copyright 1999-2021 Gentoo Authors
41 +# Distributed under the terms of the GNU General Public License v2
42 +
43 +EAPI=7
44 +
45 +LUA_COMPAT=( lua5-1 )
46 +
47 +WX_GTK_VER="3.0-gtk3"
48 +inherit cmake flag-o-matic lua-single wxwidgets
49 +
50 +MY_PN="OpenSceneGraph"
51 +MY_P=${MY_PN}-${PV}
52 +
53 +DESCRIPTION="Open source high performance 3D graphics toolkit"
54 +HOMEPAGE="http://www.openscenegraph.org/"
55 +SRC_URI="https://github.com/${PN}/${MY_PN}/archive/${MY_P}.tar.gz"
56 +S="${WORKDIR}/${MY_PN}-${MY_P}"
57 +
58 +LICENSE="wxWinLL-3 LGPL-2.1"
59 +SLOT="0/161" # NOTE: CHECK WHEN BUMPING! Subslot is SOVERSION
60 +KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
61 +IUSE="
62 + collada curl dicom debug doc egl examples ffmpeg fltk fox gdal
63 + gif glut gstreamer jpeg las lua openexr openinventor osgapps pdf png
64 + sdl sdl2 svg tiff truetype vnc wxwidgets xrandr +zlib
65 +"
66 +
67 +REQUIRED_USE="
68 + dicom? ( zlib )
69 + lua? ( ${LUA_REQUIRED_USE} )
70 + openexr? ( zlib )
71 + sdl2? ( sdl )
72 +"
73 +
74 +# TODO: FBX, GTA, NVTT, OpenVRML, Performer
75 +BDEPEND="
76 + app-arch/unzip
77 + virtual/pkgconfig
78 + doc? ( app-doc/doxygen )
79 +"
80 +RDEPEND="
81 + media-libs/mesa[egl(+)?]
82 + virtual/glu
83 + virtual/opengl
84 + x11-libs/libSM
85 + x11-libs/libXext
86 + collada? ( dev-libs/collada-dom:= )
87 + curl? ( net-misc/curl )
88 + examples? (
89 + fltk? ( x11-libs/fltk:1[opengl] )
90 + fox? ( x11-libs/fox:1.6[opengl] )
91 + glut? ( media-libs/freeglut )
92 + sdl2? ( media-libs/libsdl2 )
93 + wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[opengl,X] )
94 + )
95 + ffmpeg? ( media-video/ffmpeg:0= )
96 + gdal? ( sci-libs/gdal:= )
97 + gif? ( media-libs/giflib:= )
98 + gstreamer? (
99 + media-libs/gstreamer:1.0
100 + media-libs/gst-plugins-base:1.0
101 + )
102 + jpeg? ( virtual/jpeg:0 )
103 + las? ( >=sci-geosciences/liblas-1.8.0 )
104 + lua? ( ${LUA_DEPS} )
105 + openexr? (
106 + media-libs/ilmbase:=
107 + media-libs/openexr:=
108 + )
109 + openinventor? ( media-libs/coin )
110 + pdf? ( app-text/poppler[cairo] )
111 + png? ( media-libs/libpng:0= )
112 + sdl? ( media-libs/libsdl )
113 + svg? (
114 + gnome-base/librsvg
115 + x11-libs/cairo
116 + )
117 + tiff? ( media-libs/tiff:0 )
118 + truetype? ( media-libs/freetype:2 )
119 + vnc? ( net-libs/libvncserver )
120 + xrandr? ( x11-libs/libXrandr )
121 + zlib? ( sys-libs/zlib )
122 +"
123 +DEPEND="${RDEPEND}
124 + dev-libs/boost
125 + x11-base/xorg-proto
126 +"
127 +
128 +PATCHES=(
129 + "${FILESDIR}"/${PN}-3.6.3-cmake.patch
130 + "${FILESDIR}"/${PN}-3.6.3-docdir.patch
131 + "${FILESDIR}"/${PN}-3.6.5-use_boost_asio.patch
132 + "${FILESDIR}"/${PN}-3.6.5-cmake_lua_version.patch
133 +)
134 +
135 +pkg_setup() {
136 + use lua && lua-single_pkg_setup
137 +}
138 +
139 +src_configure() {
140 + if use examples && use wxwidgets; then
141 + setup-wxwidgets unicode
142 + fi
143 +
144 + # Needed by FFmpeg
145 + append-cppflags -D__STDC_CONSTANT_MACROS
146 +
147 + local libdir=$(get_libdir)
148 + local mycmakeargs=(
149 + -DDYNAMIC_OPENSCENEGRAPH=ON
150 + -DLIB_POSTFIX=${libdir/lib}
151 + -DOPENGL_PROFILE=GL2 #GL1 GL2 GL3 GLES1 GLES3 GLES3
152 + $(cmake_use_find_package collada COLLADA)
153 + $(cmake_use_find_package curl CURL)
154 + -DBUILD_DOCUMENTATION=$(usex doc)
155 + $(cmake_use_find_package dicom DCMTK)
156 + $(cmake_use_find_package egl EGL)
157 + -DBUILD_OSG_EXAMPLES=$(usex examples)
158 + $(cmake_use_find_package ffmpeg FFmpeg)
159 + $(cmake_use_find_package gdal GDAL)
160 + $(cmake_use_find_package gif GIFLIB)
161 + $(cmake_use_find_package gstreamer GLIB)
162 + $(cmake_use_find_package gstreamer GStreamer)
163 + -DCMAKE_DISABLE_FIND_PACKAGE_GtkGl=ON
164 + $(cmake_use_find_package jpeg JPEG)
165 + -DCMAKE_DISABLE_FIND_PACKAGE_Jasper=ON
166 + $(cmake_use_find_package las LIBLAS)
167 + $(cmake_use_find_package lua Lua)
168 + -DCMAKE_DISABLE_FIND_PACKAGE_OpenCascade=ON
169 + $(cmake_use_find_package openexr OpenEXR)
170 + $(cmake_use_find_package openinventor Inventor)
171 + -DBUILD_OSG_APPLICATIONS=$(usex osgapps)
172 + $(cmake_use_find_package pdf Poppler-glib)
173 + $(cmake_use_find_package png PNG)
174 + $(cmake_use_find_package sdl SDL)
175 + $(cmake_use_find_package sdl2 SDL2)
176 + $(cmake_use_find_package svg RSVG)
177 + $(cmake_use_find_package tiff TIFF)
178 + $(cmake_use_find_package truetype Freetype)
179 + $(cmake_use_find_package vnc LibVNCServer)
180 + -DOSGVIEWER_USE_XRANDR=$(usex xrandr)
181 + $(cmake_use_find_package zlib ZLIB)
182 + -DOSG_USE_LOCAL_LUA_SOURCE=OFF
183 + )
184 +
185 + if use examples; then
186 + mycmakeargs+=(
187 + $(cmake_use_find_package fltk FLTK)
188 + $(cmake_use_find_package fox FOX)
189 + $(cmake_use_find_package glut GLUT)
190 + $(cmake_use_find_package wxwidgets wxWidgets)
191 + )
192 + fi
193 +
194 + if use lua; then
195 + mycmakeargs+=(
196 + -DLUA_VERSION="$(lua_get_version)"
197 + )
198 + fi
199 +
200 + cmake_src_configure
201 +}
202 +
203 +src_compile() {
204 + cmake_src_compile
205 + use doc && cmake_src_compile doc_openscenegraph doc_openthreads
206 +}