commit:     74f618175eb32e95a00361c9af621febaa4de09c
Author:     Alexey Sokolov <sokolov <AT> google <DOT> com>
AuthorDate: Fri May 29 01:22:32 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Jul  8 05:44:28 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74f61817

dev-games/openscenegraph-openmw: new package

This is mostly copied from openscenegraph-3.5.5.ebuild

Bug: https://bugs.gentoo.org/673864
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-games/openscenegraph-openmw/Manifest           |   1 +
 .../files/openscenegraph-3.4-cmake.patch           |  87 ++++++++++++
 .../files/openscenegraph-3.5.1-jpeg-9.patch        |  34 +++++
 .../files/openscenegraph-3.6.3-docdir.patch        |  73 ++++++++++
 dev-games/openscenegraph-openmw/metadata.xml       |  28 ++++
 .../openscenegraph-openmw-3.4_p20200425.ebuild     | 156 +++++++++++++++++++++
 6 files changed, 379 insertions(+)

diff --git a/dev-games/openscenegraph-openmw/Manifest 
b/dev-games/openscenegraph-openmw/Manifest
new file mode 100644
index 00000000000..16fc597107e
--- /dev/null
+++ b/dev-games/openscenegraph-openmw/Manifest
@@ -0,0 +1 @@
+DIST openscenegraph-openmw-3.4_p20200425.tar.gz 5698786 BLAKE2B 
43684fa898912434dae9a7b41070a893c407dceba7e468a3f3dede32e24aea55d921098faf8d9d05708d2ef01a3507b2f126939dc13b8693002a0bec189bbaf7
 SHA512 
9bb4d2a6ca4694ee22a29508b74a095a483584ea801dc8298ec8a9b41c4d4fe18c52a21849ae9ec1065060479dcad5156227f82feed13c177415662ecba1da70

diff --git 
a/dev-games/openscenegraph-openmw/files/openscenegraph-3.4-cmake.patch 
b/dev-games/openscenegraph-openmw/files/openscenegraph-3.4-cmake.patch
new file mode 100644
index 00000000000..85eff1ab790
--- /dev/null
+++ b/dev-games/openscenegraph-openmw/files/openscenegraph-3.4-cmake.patch
@@ -0,0 +1,87 @@
+--- OpenSceneGraph-3.4.0/CMakeLists.txt
++++ OpenSceneGraph-3.4.0/CMakeLists.txt
+@@ -76,6 +76,7 @@
+     SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, 
options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
+ ENDIF(NOT CMAKE_BUILD_TYPE)
+ 
++INCLUDE(MacroOptionalFindPackage)
+ 
+ IF(ANDROID)
+     INCLUDE(OsgAndroidMacroUtils)--- 
OpenSceneGraph-3.4.0/CMakeModules/COPYING-CMAKE-SCRIPTS
++++ OpenSceneGraph-3.4.0/CMakeModules/COPYING-CMAKE-SCRIPTS
+@@ -0,0 +1,22 @@
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions
++are met:
++
++1. Redistributions of source code must retain the copyright
++   notice, this list of conditions and the following disclaimer.
++2. Redistributions in binary form must reproduce the copyright
++   notice, this list of conditions and the following disclaimer in the
++   documentation and/or other materials provided with the distribution.
++3. The name of the author may not be used to endorse or promote products
++   derived from this software without specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
++IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+--- OpenSceneGraph-3.4.0/CMakeModules/MacroOptionalFindPackage.cmake
++++ OpenSceneGraph-3.4.0/CMakeModules/MacroOptionalFindPackage.cmake
+@@ -0,0 +1,28 @@
++# - MACRO_OPTIONAL_FIND_PACKAGE() combines FIND_PACKAGE() with an OPTION()
++# MACRO_OPTIONAL_FIND_PACKAGE( <name> [QUIT] )
++# This macro is a combination of OPTION() and FIND_PACKAGE(), it
++# works like FIND_PACKAGE(), but additionally it automatically creates
++# an option name WITH_<name>, which can be disabled via the cmake GUI.
++# or via -DWITH_<name>=OFF
++# The standard <name>_FOUND variables can be used in the same way
++# as when using the normal FIND_PACKAGE()
++
++# Copyright (c) 2006, Alexander Neundorf, <[email protected]>
++#
++# Redistribution and use is allowed according to the terms of the BSD license.
++# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
++
++
++macro (MACRO_OPTIONAL_FIND_PACKAGE _name )
++   option(WITH_${_name} "Search for ${_name} package" ON)
++   if (WITH_${_name})
++      find_package(${_name} ${ARGN})
++   else (WITH_${_name})
++      set(${_name}_FOUND)
++      set(${_name}_INCLUDE_DIR)
++      set(${_name}_INCLUDES)
++      set(${_name}_LIBRARY)
++      set(${_name}_LIBRARIES)
++   endif (WITH_${_name})
++endmacro (MACRO_OPTIONAL_FIND_PACKAGE)
++
+--- OpenSceneGraph-3.5.5/CMakeModules/OsgMacroUtils.cmake
++++ OpenSceneGraph-3.5.5/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)
+
+--- OpenSceneGraph-3.4.0/examples/osgviewerFLTK/CMakeLists.txt
++++ OpenSceneGraph-3.4.0/examples/osgviewerFLTK/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ SET(TARGET_SRC osgviewerFLTK.cpp )
+ 
+-SET(TARGET_EXTERNAL_LIBRARIES ${FLTK_LIBRARY} ${FLTK_GL_LIBRARY})
++SET(TARGET_EXTERNAL_LIBRARIES ${FLTK_BASE_LIBRARY} ${FLTK_GL_LIBRARY})
+ 
+ INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR} )
+ 

diff --git 
a/dev-games/openscenegraph-openmw/files/openscenegraph-3.5.1-jpeg-9.patch 
b/dev-games/openscenegraph-openmw/files/openscenegraph-3.5.1-jpeg-9.patch
new file mode 100644
index 00000000000..f6e85e8e352
--- /dev/null
+++ b/dev-games/openscenegraph-openmw/files/openscenegraph-3.5.1-jpeg-9.patch
@@ -0,0 +1,34 @@
+From 34b4e7001522c1b47b4211dac34d2d6a6b994a6f Mon Sep 17 00:00:00 2001
+From: Robert Osfield <[email protected]>
+Date: Thu, 17 Aug 2017 10:52:59 +0100
+Subject: [PATCH] Added version check for boolean, TRUE and FALSE settings
+
+---
+ src/osgPlugins/jpeg/ReaderWriterJPEG.cpp | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/src/osgPlugins/jpeg/ReaderWriterJPEG.cpp 
b/src/osgPlugins/jpeg/ReaderWriterJPEG.cpp
+index 9f7f4c38937..115203322a5 100644
+--- a/src/osgPlugins/jpeg/ReaderWriterJPEG.cpp
++++ b/src/osgPlugins/jpeg/ReaderWriterJPEG.cpp
+@@ -70,12 +70,14 @@ namespace osgDBJPEG
+ 
+ static int jpegerror = ERR_NO_ERROR;
+ 
+-/* Some versions of jmorecfg.h define boolean, some don't...
+-   Those that do also define HAVE_BOOLEAN, so we can guard using that. */
+-#ifndef HAVE_BOOLEAN
+-  typedef int boolean;
+-  #define FALSE 0
+-  #define TRUE 1
++#if JPEG_LIB_VERSION < 90
++    /* Some versions of jmorecfg.h define boolean, some don't...
++    Those that do also define HAVE_BOOLEAN, so we can guard using that. */
++    #ifndef HAVE_BOOLEAN
++    typedef int boolean;
++    #define FALSE 0
++    #define TRUE 1
++    #endif
+ #endif
+ 
+ /* CODE FOR READING/WRITING JPEG FROM STREAMS

diff --git 
a/dev-games/openscenegraph-openmw/files/openscenegraph-3.6.3-docdir.patch 
b/dev-games/openscenegraph-openmw/files/openscenegraph-3.6.3-docdir.patch
new file mode 100644
index 00000000000..75dd48b3068
--- /dev/null
+++ b/dev-games/openscenegraph-openmw/files/openscenegraph-3.6.3-docdir.patch
@@ -0,0 +1,73 @@
+From 1dfc0e3218e15b94f7b145c8f5b2bf61974b9573 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <[email protected]>
+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 <[email protected]>
+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-openmw/metadata.xml 
b/dev-games/openscenegraph-openmw/metadata.xml
new file mode 100644
index 00000000000..bc586e1a812
--- /dev/null
+++ b/dev-games/openscenegraph-openmw/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Alexey Sokolov</name>
+       </maintainer>
+       <maintainer type="project">
+               <email>[email protected]</email>
+               <name>Proxy Maintainers</name>
+       </maintainer>
+       <maintainer type="project">
+               <email>[email protected]</email>
+               <name>Gentoo Games Project</name>
+       </maintainer>
+       <longdescription lang="en">
+               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.
+       </longdescription>
+       <use>
+               <flag name="egl">Enable EGL support</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>
+</pkgmetadata>

diff --git 
a/dev-games/openscenegraph-openmw/openscenegraph-openmw-3.4_p20200425.ebuild 
b/dev-games/openscenegraph-openmw/openscenegraph-openmw-3.4_p20200425.ebuild
new file mode 100644
index 00000000000..fe26f799c8c
--- /dev/null
+++ b/dev-games/openscenegraph-openmw/openscenegraph-openmw-3.4_p20200425.ebuild
@@ -0,0 +1,156 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+WX_GTK_VER="3.0-gtk3"
+inherit cmake flag-o-matic wxwidgets
+
+DESCRIPTION="OpenMW-specific fork of OpenSceneGraph"
+HOMEPAGE="https://github.com/OpenMW/osg";
+MY_COMMIT="8b07809fa674ecffe77338aaea2e223b3aadff0e"
+SRC_URI="https://github.com/OpenMW/osg/archive/${MY_COMMIT}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}/osg-${MY_COMMIT}"
+
+LICENSE="wxWinLL-3 LGPL-2.1"
+SLOT="0/132" # NOTE: CHECK WHEN BUMPING! Subslot is SOVERSION
+KEYWORDS="~amd64 ~x86"
+IUSE="curl debug doc examples egl ffmpeg fltk fox gdal gif glut gstreamer jpeg
+       lua openexr openinventor osgapps pdf png qt5 sdl sdl2 svg tiff
+       truetype vnc wxwidgets xine xrandr zlib"
+
+REQUIRED_USE="
+       sdl2? ( sdl )
+       openexr? ( zlib )
+"
+
+# TODO: COLLADA, FBX, GTA, OpenVRML, Performer, DCMTK
+BDEPEND="
+       app-arch/unzip
+       virtual/pkgconfig
+       doc? ( app-doc/doxygen )
+"
+RDEPEND="
+       !dev-games/openscenegraph
+       media-libs/mesa[egl?]
+       virtual/glu
+       virtual/opengl
+       x11-libs/libSM
+       x11-libs/libXext
+       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:0= )
+       gdal? ( sci-libs/gdal:= )
+       gif? ( media-libs/giflib:= )
+       gstreamer? (
+               media-libs/gstreamer:1.0
+               media-libs/gst-plugins-base:1.0
+       )
+       jpeg? ( virtual/jpeg:0 )
+       lua? ( >=dev-lang/lua-5.1.5:* )
+       openexr? (
+               media-libs/ilmbase:=
+               media-libs/openexr:=
+       )
+       openinventor? ( media-libs/coin )
+       pdf? ( app-text/poppler[cairo] )
+       png? ( media-libs/libpng:0= )
+       qt5? (
+               dev-qt/qtopengl:5
+               dev-qt/qtwidgets:5
+       )
+       sdl? ( media-libs/libsdl )
+       svg? (
+               gnome-base/librsvg
+               x11-libs/cairo
+       )
+       tiff? ( media-libs/tiff:0 )
+       truetype? ( media-libs/freetype:2 )
+       vnc? ( net-libs/libvncserver )
+       xrandr? ( x11-libs/libXrandr )
+       zlib? ( sys-libs/zlib )
+"
+DEPEND="${RDEPEND}
+       x11-base/xorg-proto
+"
+
+PATCHES=(
+       "${FILESDIR}"/openscenegraph-3.4-cmake.patch
+       "${FILESDIR}"/openscenegraph-3.5.1-jpeg-9.patch
+       "${FILESDIR}"/openscenegraph-3.6.3-docdir.patch
+)
+
+src_prepare() {
+       sed -i "s/ FIND_PACKAGE/ MACRO_OPTIONAL_FIND_PACKAGE/g" CMakeLists.txt 
|| die "can't replace FIND_PACKAGE"
+       cmake_src_prepare
+}
+
+src_configure() {
+       if use examples && use wxwidgets; then
+               setup-wxwidgets
+       fi
+
+       # Needed by FFmpeg
+       append-cppflags -D__STDC_CONSTANT_MACROS
+
+       local libdir=$(get_libdir)
+       local mycmakeargs=(
+               -DDYNAMIC_OPENSCENEGRAPH=ON
+               -DLIB_POSTFIX=${libdir/lib}
+               -DOPENGL_PROFILE=GL2 #GL1 GL2 GL3 GLES1 GLES3 GLES3
+               -DOSG_PROVIDE_READFILE=ON
+               -DOSG_USE_LOCAL_LUA_SOURCE=OFF
+               -DWITH_Lua51=OFF # We use CMake-version FindLua52.cmake instead 
which can find any lua
+               -DWITH_Lua52=$(usex lua)
+               -DWITH_Asio=OFF # Fails to build, similar to 
https://github.com/chriskohlhoff/asio/issues/316
+               -DWITH_CURL=$(usex curl)
+               -DBUILD_DOCUMENTATION=$(usex doc)
+               -DBUILD_OSG_APPLICATIONS=$(usex osgapps)
+               -DBUILD_OSG_EXAMPLES=$(usex examples)
+               -DWITH_FFmpeg=$(usex ffmpeg)
+               -DWITH_GDAL=$(usex gdal)
+               -DWITH_GIFLIB=$(usex gif)
+               -DWITH_GStreamer=$(usex gstreamer)
+               -DWITH_GLIB=$(usex gstreamer)
+               -DWITH_GtkGl=OFF
+               -DWITH_JPEG=$(usex jpeg)
+               -DWITH_Jasper=OFF
+               -DWITH_LIBLAS=OFF # dep failed to build 
https://bugs.gentoo.org/725938
+               -DWITH_OpenEXR=$(usex openexr)
+               -DWITH_Inventor=$(usex openinventor)
+               -DWITH_Poppler-glib=$(usex pdf)
+               -DWITH_PNG=$(usex png)
+               -DWITH_SDL=$(usex sdl)
+               -DWITH_SDL2=$(usex sdl2)
+               -DWITH_RSVG=$(usex svg rsvg)
+               -DWITH_TIFF=$(usex tiff)
+               -DWITH_Freetype=$(usex truetype)
+               -DWITH_LibVNCServer=$(usex vnc)
+               -DWITH_Xine=$(usex xine)
+               -DOSGVIEWER_USE_XRANDR=$(usex xrandr)
+               -DWITH_ZLIB=$(usex zlib)
+               -DOSG_USE_QT=$(usex qt5)
+               -DDESIRED_QT_VERSION=5
+       )
+       if use examples; then
+               mycmakeargs+=(
+                       -DWITH_FLTK=$(usex fltk)
+                       -DWITH_FOX=$(usex fox)
+                       -DWITH_GLUT=$(usex glut)
+                       -DWITH_wxWidgets=$(usex wxwidgets)
+               )
+       fi
+
+       cmake_src_configure
+}
+
+src_compile() {
+       cmake_src_compile
+       use doc && cmake_src_compile doc_openscenegraph doc_openthreads
+}

Reply via email to