* [gentoo-commits] repo/gentoo:master commit in: dev-games/openscenegraph-openmw/, dev-games/openscenegraph-openmw/files/
@ 2020-07-08 5:44 Joonas Niilola
0 siblings, 0 replies; 2+ messages in thread
From: Joonas Niilola @ 2020-07-08 5:44 UTC (permalink / raw
To: gentoo-commits
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, <neundorf@kde.org>
++#
++# 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 <robert@openscenegraph.com>
+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 <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-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>alexey+gentoo@asokolov.org</email>
+ <name>Alexey Sokolov</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>games@gentoo.org</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
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-games/openscenegraph-openmw/, dev-games/openscenegraph-openmw/files/
@ 2022-02-18 2:14 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-02-18 2:14 UTC (permalink / raw
To: gentoo-commits
commit: 96e140368d521dc0694ce959513cc42e337d24c5
Author: Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Wed Feb 16 22:19:58 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 18 02:13:40 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96e14036
dev-games/openscenegraph-openmw: adjust to unslotted OpenEXR 3
Closes: https://bugs.gentoo.org/833492
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/openscenegraph-3.6-openexr3.patch | 68 +++++++++
.../openscenegraph-openmw-3.6_p20211017-r1.ebuild | 169 +++++++++++++++++++++
2 files changed, 237 insertions(+)
diff --git a/dev-games/openscenegraph-openmw/files/openscenegraph-3.6-openexr3.patch b/dev-games/openscenegraph-openmw/files/openscenegraph-3.6-openexr3.patch
new file mode 100644
index 000000000000..1cfab7715f10
--- /dev/null
+++ b/dev-games/openscenegraph-openmw/files/openscenegraph-3.6-openexr3.patch
@@ -0,0 +1,68 @@
+https://bugs.gentoo.org/833492
+
+--- 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-openmw/openscenegraph-openmw-3.6_p20211017-r1.ebuild b/dev-games/openscenegraph-openmw/openscenegraph-openmw-3.6_p20211017-r1.ebuild
new file mode 100644
index 000000000000..c0e8f55f2dbd
--- /dev/null
+++ b/dev-games/openscenegraph-openmw/openscenegraph-openmw-3.6_p20211017-r1.ebuild
@@ -0,0 +1,169 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-1 )
+
+WX_GTK_VER="3.0-gtk3"
+inherit cmake flag-o-matic lua-single wxwidgets
+
+MY_COMMIT="bbe61c3bc510a4f5bb4aea21cce506519c2d24e6"
+
+DESCRIPTION="OpenMW-specific fork of OpenSceneGraph"
+HOMEPAGE="https://github.com/OpenMW/osg"
+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/162" # NOTE: CHECK WHEN BUMPING! Subslot is SOVERSION
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="
+ +collada curl dicom debug doc egl examples +ffmpeg fltk fox gdal
+ gif glut gstreamer +jpeg las 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-doc/doxygen )
+"
+RDEPEND="
+ !dev-games/openscenegraph
+ dev-libs/glib:2
+ media-libs/fontconfig
+ 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: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 )
+ las? ( >=sci-geosciences/liblas-1.8.0 )
+ 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:2
+ 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.6.3-cmake.patch
+ "${FILESDIR}"/openscenegraph-3.6.3-docdir.patch
+ "${FILESDIR}"/openscenegraph-3.6.5-cmake_lua_version.patch
+ "${FILESDIR}"/openscenegraph-3.6-openexr3.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=(
+ -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
+ $(cmake_use_find_package las LIBLAS)
+ $(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
+ -DCMAKE_RELWITHDEBINFO_POSTFIX=
+ )
+
+ 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
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-18 2:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-08 5:44 [gentoo-commits] repo/gentoo:master commit in: dev-games/openscenegraph-openmw/, dev-games/openscenegraph-openmw/files/ Joonas Niilola
-- strict thread matches above, loose matches on Subject: below --
2022-02-18 2:14 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox