summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Sokolov <alexey+gentoo@asokolov.org>2022-02-16 22:19:58 +0000
committerSam James <sam@gentoo.org>2022-02-18 02:13:40 +0000
commit96e140368d521dc0694ce959513cc42e337d24c5 (patch)
tree5ece2d1c3bcb584a2481eba0e34f656d352d292a /dev-games
parentdev-games/openscenegraph-openmw: drop old (diff)
downloadgentoo-96e140368d521dc0694ce959513cc42e337d24c5.tar.gz
gentoo-96e140368d521dc0694ce959513cc42e337d24c5.tar.bz2
gentoo-96e140368d521dc0694ce959513cc42e337d24c5.zip
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@asokolov.org> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-games')
-rw-r--r--dev-games/openscenegraph-openmw/files/openscenegraph-3.6-openexr3.patch68
-rw-r--r--dev-games/openscenegraph-openmw/openscenegraph-openmw-3.6_p20211017-r1.ebuild169
2 files changed, 237 insertions, 0 deletions
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
+}