diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-04 16:47:34 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-04 16:47:34 -0500 |
| commit | dda948891d3731927b821ce31f9d9a2d03ba20c5 (patch) | |
| tree | 99cd40be4cbb0606260da212cd81b8ab2db9da9b /dev-games/openscenegraph-openmw | |
| parent | a3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7 (diff) | |
| download | baldeagleos-repo-dda948891d3731927b821ce31f9d9a2d03ba20c5.tar.gz baldeagleos-repo-dda948891d3731927b821ce31f9d9a2d03ba20c5.tar.xz baldeagleos-repo-dda948891d3731927b821ce31f9d9a2d03ba20c5.zip | |
Adding metadata
Diffstat (limited to 'dev-games/openscenegraph-openmw')
7 files changed, 547 insertions, 0 deletions
diff --git a/dev-games/openscenegraph-openmw/Manifest b/dev-games/openscenegraph-openmw/Manifest new file mode 100644 index 000000000000..9d34115d933d --- /dev/null +++ b/dev-games/openscenegraph-openmw/Manifest @@ -0,0 +1 @@ +DIST openscenegraph-openmw-3.6_p20251012.tar.gz 5790388 BLAKE2B 2ee32e73d810271039e06f9f19013ceecff0faeded12adbe2cd75e7362fbc813c20da8eeaf53775ad3607d692cc2bf7426ddca971e04b16829fb6077900eb0d5 SHA512 13fa0b544ae604416a456d8c148c29d92b13d1550e39ea2028f617775b56654d58b660d649e5ee6ec691d4031849509b819d765dc35f59501dc478c85c7f9abb 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/files/openscenegraph-openmw-3.6_p20221115-cmake-lua_version.patch b/dev-games/openscenegraph-openmw/files/openscenegraph-openmw-3.6_p20221115-cmake-lua_version.patch new file mode 100644 index 000000000000..f7d7579a017b --- /dev/null +++ b/dev-games/openscenegraph-openmw/files/openscenegraph-openmw-3.6_p20221115-cmake-lua_version.patch @@ -0,0 +1,41 @@ +From e9120748f39cd0851701e8e18a1a1199b58c2f7e Mon Sep 17 00:00:00 2001 +From: Alexey Sokolov <alexey+gentoo@asokolov.org> +Date: Thu, 22 Jul 2021 20:10:30 +0100 +Subject: [PATCH] Fix find Gentoo system Lua + +Add BUILD_OSG_LUA_PLUGIN option to silence warning about empty LUA_VERSION + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + CMakeLists.txt | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index da4f7f58a..a1f7408a5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -736,6 +736,7 @@ IF(WIN32 AND NOT ANDROID AND OSG_FIND_3RD_PARTY_DEPS) + INCLUDE(Find3rdPartyDependencies) + ENDIF() + ++OPTION(BUILD_OSG_LUA_PLUGIN "Enable to build OSG lua plugin" ON) + OPTION(OSG_USE_LOCAL_LUA_SOURCE "Enable to use local Lua source when building the lua plugin" ON) + + # +@@ -779,11 +780,8 @@ ELSE() + + FIND_PACKAGE(PDAL CONFIG) + +- IF (NOT(OSG_USE_LOCAL_LUA_SOURCE)) +- FIND_PACKAGE(Lua52) +- IF (NOT (LUA_LIBRARIES AND LUA_INCLUDE_DIR)) +- FIND_PACKAGE(Lua51) +- ENDIF() ++ IF (BUILD_OSG_LUA_PLUGIN AND NOT(OSG_USE_LOCAL_LUA_SOURCE)) ++ FIND_PACKAGE(Lua ${LUA_VERSION} EXACT) + ENDIF() + + # V8 and Python plugins are tests for linking against these libraries but aren't functionality beyond this. +-- +2.51.0 + diff --git a/dev-games/openscenegraph-openmw/files/openscenegraph-openmw-3.6_p20221115-cmake.patch b/dev-games/openscenegraph-openmw/files/openscenegraph-openmw-3.6_p20221115-cmake.patch new file mode 100644 index 000000000000..f5f542847076 --- /dev/null +++ b/dev-games/openscenegraph-openmw/files/openscenegraph-openmw-3.6_p20221115-cmake.patch @@ -0,0 +1,51 @@ +Source: https://github.com/OpenMW/osg/pull/32 + +From ef03c3442028dcfd6a861369926d0198bc4059cd Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Sun, 7 Sep 2025 15:13:57 +0200 +Subject: [PATCH 2/2] Use more GNUInstalldirs (CMAKE_INSTALL_DOCDIR) + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + CMakeLists.txt | 4 ++-- + CMakeModules/OsgMacroUtils.cmake | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 478932641..4f6ca614b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1191,7 +1191,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) +@@ -1207,7 +1207,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 +diff --git a/CMakeModules/OsgMacroUtils.cmake b/CMakeModules/OsgMacroUtils.cmake +index cafd8725b..1c2e6cb77 100644 +--- a/CMakeModules/OsgMacroUtils.cmake ++++ b/CMakeModules/OsgMacroUtils.cmake +@@ -487,7 +487,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 $<TARGET_PDB_FILE:${TARGET_NAME}> DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples) + ENDIF(MSVC) +-- +2.51.0 + diff --git a/dev-games/openscenegraph-openmw/files/openscenegraph-openmw-3.6_p20221115-cmake4.patch b/dev-games/openscenegraph-openmw/files/openscenegraph-openmw-3.6_p20221115-cmake4.patch new file mode 100644 index 000000000000..54e5c2dd4c49 --- /dev/null +++ b/dev-games/openscenegraph-openmw/files/openscenegraph-openmw-3.6_p20221115-cmake4.patch @@ -0,0 +1,175 @@ +Source: https://github.com/OpenMW/osg/pull/32 + +From d83a247904ac5eb3a38fe68c341a1f54c6e203a7 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Sun, 7 Sep 2025 15:01:03 +0200 +Subject: [PATCH 1/2] Raise CMake minimum version req to 3.5 (lowest still + supported by >=CMake-4) + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + CMakeLists.txt | 81 ++++++------------- + .../Android/android.toolchain.cmake | 2 +- + examples/osgCMakeExample/CMakeLists.txt | 2 +- + examples/osgemscripten/CMakeLists.txt | 2 +- + 4 files changed, 28 insertions(+), 59 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 21d2c05d4..478932641 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,8 @@ + # + # OpenSceneGraph CMake build file + # ++CMAKE_MINIMUM_REQUIRED(VERSION 3.5 FATAL_ERROR) ++ + SET(OPENSCENEGRAPH_MAJOR_VERSION 3) + SET(OPENSCENEGRAPH_MINOR_VERSION 6) + SET(OPENSCENEGRAPH_PATCH_VERSION 5) +@@ -13,27 +15,19 @@ 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) +- +-if(COMMAND cmake_policy) +- # Works around warnings libraries linked against that don't +- # have absolute paths (e.g. -lpthreads) +- cmake_policy(SET CMP0003 NEW) ++# Works around warnings libraries linked against that don't ++# have absolute paths (e.g. -lpthreads) ++cmake_policy(SET CMP0003 NEW) + +- # Works around warnings about escaped quotes in ADD_DEFINITIONS +- # statements. +- cmake_policy(SET CMP0005 NEW) ++# Works around warnings about escaped quotes in ADD_DEFINITIONS ++# statements. ++cmake_policy(SET CMP0005 NEW) + +- # tell CMake to prefer CMake's own CMake modules when available +- # only available from cmake-2.8.4 +- if("${CMAKE_VERSION}" VERSION_GREATER 2.8.3) +- cmake_policy(SET CMP0017 NEW) +- endif() ++cmake_policy(SET CMP0017 NEW) + +- # INTERPROCEDURAL_OPTIMIZATION is enforced when enabled. +- # Allows passing -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON +- cmake_policy(SET CMP0069 NEW) +-endif() ++# INTERPROCEDURAL_OPTIMIZATION is enforced when enabled. ++# Allows passing -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON ++cmake_policy(SET CMP0069 NEW) + + IF(APPLE) + # Get OSX version in MAJOR.MINOR format +@@ -155,6 +149,7 @@ IF(NOT CMAKE_BUILD_TYPE) + 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(GNUInstallDirs) + + IF(ANDROID) + INCLUDE(OsgAndroidMacroUtils) +@@ -902,25 +897,8 @@ IF(DEFINED LIB_POSTFIX) + # Use LIB_POSTFIX if defined + SET(OSG_INSTALL_LIBDIR lib${LIB_POSTFIX}) + ELSE() +- IF(CMAKE_VERSION VERSION_LESS "2.8.5") +- IF(UNIX AND NOT WIN32 AND NOT APPLE) +- IF(CMAKE_SIZEOF_VOID_P MATCHES "8") +- SET(LIB_POSTFIX "64" CACHE STRING "suffix for 32/64 dir placement") +- MARK_AS_ADVANCED(LIB_POSTFIX) +- ENDIF() +- ENDIF() +- IF(NOT DEFINED LIB_POSTFIX) +- SET(LIB_POSTFIX "") +- ENDIF() +- SET(OSG_INSTALL_LIBDIR lib${LIB_POSTFIX}) +- ELSE() +- # Use the GNU standard installation directories for CMake >= 2.8.5 +- INCLUDE(GNUInstallDirs) +- SET(OSG_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR}) +- ENDIF() +-ENDIF() +-IF(NOT DEFINED LIB_POSTFIX) +- SET(LIB_POSTFIX "") ++ SET(OSG_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR}) ++ SET(LIB_POSTFIX "") + ENDIF() + + # Here we apparently do some funky stuff with making the bin/ and lib/ +@@ -952,25 +930,16 @@ ELSE(WIN32) + SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_LIBDIR}) + ENDIF(WIN32) + +-# Testing CMAKE_VERSION is possible in >= 2.6.4 only +-BUILDER_VERSION_GREATER(2 8 0) +-IF(VALID_BUILDER_VERSION) # If CMake >= 2.8.1 +- FOREACH(CONF ${CMAKE_CONFIGURATION_TYPES}) # For each configuration (Debug, Release, MinSizeRel... and/or anything the user chooses) +- STRING(TOUPPER "${CONF}" CONF) # Go uppercase (DEBUG, RELEASE...) +- SET("CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_LIBDIR}") +- SET("CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_BINDIR}") +- IF(WIN32) +- SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_BINDIR}") +- ELSE() +- SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_LIBDIR}") +- ENDIF() +- ENDFOREACH() +-ENDIF(VALID_BUILDER_VERSION) +- +-#SET(INSTALL_BINDIR OpenSceneGraph/bin) +-#SET(INSTALL_INCDIR OpenSceneGraph/include) +-#SET(INSTALL_LIBDIR OpenSceneGraph/lib) +-#SET(INSTALL_DOCDIR OpenSceneGraph/doc) ++FOREACH(CONF ${CMAKE_CONFIGURATION_TYPES}) # For each configuration (Debug, Release, MinSizeRel... and/or anything the user chooses) ++ STRING(TOUPPER "${CONF}" CONF) # Go uppercase (DEBUG, RELEASE...) ++ SET("CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_LIBDIR}") ++ SET("CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_BINDIR}") ++ IF(WIN32) ++ SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_BINDIR}") ++ ELSE() ++ SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_LIBDIR}") ++ ENDIF() ++ENDFOREACH() + + ################################################################################ + # User Options +diff --git a/PlatformSpecifics/Android/android.toolchain.cmake b/PlatformSpecifics/Android/android.toolchain.cmake +index fc349162f..7015e6d8f 100644 +--- a/PlatformSpecifics/Android/android.toolchain.cmake ++++ b/PlatformSpecifics/Android/android.toolchain.cmake +@@ -210,7 +210,7 @@ + + # Modified by Lasse Oorni and Yao Wei Tjong for Urho3D + +-cmake_minimum_required( VERSION 2.6.3 ) ++cmake_minimum_required( VERSION 3.5 ) + + # Urho3D: on Windows Cygwin-based NDK tools may fail in the linking phase with too long command line. Turn on response files to avoid this + if( CMAKE_HOST_WIN32 ) +diff --git a/examples/osgCMakeExample/CMakeLists.txt b/examples/osgCMakeExample/CMakeLists.txt +index cd843299a..418708630 100644 +--- a/examples/osgCMakeExample/CMakeLists.txt ++++ b/examples/osgCMakeExample/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 2.6) ++cmake_minimum_required(VERSION 3.5) + + SET(PROJECT_NAME osgCMakeExample) + +diff --git a/examples/osgemscripten/CMakeLists.txt b/examples/osgemscripten/CMakeLists.txt +index b2bc9875a..10c4daf68 100644 +--- a/examples/osgemscripten/CMakeLists.txt ++++ b/examples/osgemscripten/CMakeLists.txt +@@ -1,4 +1,4 @@ +-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR) ++CMAKE_MINIMUM_REQUIRED(VERSION 3.5 FATAL_ERROR) + + # Path to OpenSceneGraph + SET(OSG_DIR "${CMAKE_SOURCE_DIR}/../..") +-- +2.51.0 + diff --git a/dev-games/openscenegraph-openmw/metadata.xml b/dev-games/openscenegraph-openmw/metadata.xml new file mode 100644 index 000000000000..51a14052b74b --- /dev/null +++ b/dev-games/openscenegraph-openmw/metadata.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>alexey+gentoo@asokolov.org</email> + <name>Alexey Sokolov</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <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="collada">Enable DAE file support via <pkg>dev-libs/collada-dom</pkg> + </flag> + <flag name="dicom">Enable DICOM medical image file support via <pkg>sci-libs/dcmtk</pkg> + </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> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/dev-games/openscenegraph-openmw/openscenegraph-openmw-3.6_p20251012-r1.ebuild b/dev-games/openscenegraph-openmw/openscenegraph-openmw-3.6_p20251012-r1.ebuild new file mode 100644 index 000000000000..db272d69c517 --- /dev/null +++ b/dev-games/openscenegraph-openmw/openscenegraph-openmw-3.6_p20251012-r1.ebuild @@ -0,0 +1,170 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1,3,4} luajit ) + +WX_GTK_VER="3.2-gtk3" +inherit cmake flag-o-matic lua-single toolchain-funcs wxwidgets + +MY_COMMIT="aa66653fde55365671eb9038b9392cf952ec7a05" + +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 ~ppc64 ~x86" +IUSE=" + +collada curl dicom debug doc egl examples fltk fox gdal + gif gstreamer +jpeg 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-text/doxygen[dot] ) +" +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] ) + sdl2? ( media-libs/libsdl2 ) + wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}=[opengl,X] ) + ) + gdal? ( sci-libs/gdal:= ) + gif? ( media-libs/giflib:= ) + gstreamer? ( + media-libs/gstreamer:1.0 + media-libs/gst-plugins-base:1.0 + ) + jpeg? ( media-libs/libjpeg-turbo:= ) + 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:= ) + truetype? ( media-libs/freetype:2 ) + vnc? ( net-libs/libvncserver ) + xrandr? ( x11-libs/libXrandr ) + zlib? ( virtual/zlib:= ) +" +DEPEND="${RDEPEND} + x11-base/xorg-proto +" + +PATCHES=( + "${FILESDIR}"/openscenegraph-openmw-3.6_p20221115-cmake4.patch # bug 960858 + "${FILESDIR}"/openscenegraph-openmw-3.6_p20221115-cmake.patch # GNUInstalldirs, paths + "${FILESDIR}"/openscenegraph-openmw-3.6_p20221115-cmake-lua_version.patch # downstream 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 + # bug #955848 + tc-is-lto && filter-flags -fno-semantic-interposition + + 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) + -DCMAKE_DISABLE_FIND_PACKAGE_FFmpeg=ON + $(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 + # PDAL instead of LAS: No one upstream willing to pick it up: + # https://github.com/openscenegraph/OpenSceneGraph/pull/1093 + # https://github.com/OpenMW/osg/pull/33 + -DCMAKE_DISABLE_FIND_PACKAGE_LIBLAS=ON + -DBUILD_OSG_LUA_PLUGIN=$(usex 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 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 +} |
