diff options
author | Alexey Sokolov <sokolov@google.com> | 2020-05-29 02:22:32 +0100 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2020-07-08 08:44:28 +0300 |
commit | 74f618175eb32e95a00361c9af621febaa4de09c (patch) | |
tree | 7c2af2dbd9c259317c2d59388ab71c5b710a5e56 /dev-games/openscenegraph-openmw/files | |
parent | net-im/teams: bump to v1.3.00.16851 (diff) | |
download | gentoo-74f618175eb32e95a00361c9af621febaa4de09c.tar.gz gentoo-74f618175eb32e95a00361c9af621febaa4de09c.tar.bz2 gentoo-74f618175eb32e95a00361c9af621febaa4de09c.zip |
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@asokolov.org>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-games/openscenegraph-openmw/files')
3 files changed, 194 insertions, 0 deletions
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 000000000000..85eff1ab7907 --- /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 000000000000..f6e85e8e352d --- /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 000000000000..75dd48b30687 --- /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 + |