View previous topic :: View next topic |
Author |
Message |
alecStewart1 Tux's lil' helper
Joined: 03 Jul 2022 Posts: 148
|
Posted: Fri Aug 23, 2024 8:52 pm Post subject: Need help updating OpenMW and Openscenegraph-OpenMW ebuilds |
|
|
Hey gang!
Been a hot minute. So OpenMW is awesome. However the ebuilds need quite a bit of touching up. Most of the stuff here is confirmed by people on the OpenMW Discord development-main channel.
Firstly on the develop version of OpenMW, Qt6 is supported. So the following lines in the openmw-9999.ebuild
Code: |
qt5? (
app-arch/unshield
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtnetwork:5
dev-qt/qtopengl:5
dev-qt/qtwidgets:5
)
|
Can be updated to use the Qt6 version of the libraries.
Also i386 is not a supported architecture
Quote: |
...as it's pretty common to use more than 4GB of memory
|
^ from the Discord.
That's easy. Now comes the weird stuff, mainly with openscenegraph and the openmw fork of it. In the ebuild, there's this line
Code: |
# FIXME: Unbundle dev-games/openscenegraph-qt in extern/osgQt directory,
# used when BUILD_OPENCS flag is enabled. See bug #676266.
|
However, again, from the Discord:
Quote: |
but that's got some of our own changes on top, so the one in our `extern` directory really does need to be there
|
With these lines regarding the osg-fork use flag:
Code: |
osg-fork? ( >=dev-games/openscenegraph-openmw-3.6:=[collada(-),jpeg,png,sdl,svg,truetype,zlib] )
!osg-fork? ( >=dev-games/openscenegraph-3.5.5:=[collada(-),jpeg,png,sdl,svg,truetype,zlib] )
|
There's a few things.
First is something easy: Openscenegraph-3.5.5 is not even the most recent nor stable release. So to bump it to at least a stable version, we'd have to go to 3.6.5. However, from the Discord:
Quote: |
It's a bit of a simplification, but if you're not using our OSG fork, you need to be using the tip of the upstream OpenSceneGraph-3.6 branch.
|
So while there likely does need to be an ebuild for the tagged release of OpenSceneGraph 3.6.5, for the develop version of OpenMW, it need to use an ebuild that follows that upstream OpenSceneGraph-3.6 branch. This is where it gets a little wonky for me, as I assume one should change those lines to
Code: |
osg-fork? ( >=dev-games/openscenegraph-openmw-3.6=[collada(-),jpeg,png,sdl,svg,truetype,zlib] )
!osg-fork? ( >=dev-games/openscenegraph-3.6.5:=[collada(-),jpeg,png,sdl,svg,truetype,zlib] )
|
And add an ebuild to follow that upstream branch for openscenegraph.
On top of that, the package for openscenegraph-openmw is behind as well. The most recent commit is 43faf6f (there's more numbers, obviously), while what's used is 69cfecebfb6dc703b42e8de39eed750a84a87489.
The most recent tagged release is b02abe2_tag.
The other thing is that there's a few OSG plugins are not needed for OpenMW. From here on the OpenMW Wiki:
Quote: |
When using the OSG git master (to be 3.6), or the OpenMW OSG fork, you can use the following cmake arguments to avoid unneeded plugins from being built:
-DBUILD_OSG_PLUGINS_BY_DEFAULT=0 -DBUILD_OSG_PLUGIN_OSG=1 -DBUILD_OSG_PLUGIN_DAE=1 -DBUILD_OSG_PLUGIN_DDS=1 -DBUILD_OSG_PLUGIN_TGA=1 -DBUILD_OSG_PLUGIN_BMP=1 -DBUILD_OSG_PLUGIN_JPEG=1 -DBUILD_OSG_PLUGIN_PNG=1 -DBUILD_OSG_PLUGIN_FREETYPE=1 -DBUILD_OSG_DEPRECATED_SERIALIZERS=0
|
Yet some plugins are required in the ebuild anyway, like zlib.
Quote: |
osg-fork? ( >=dev-games/openscenegraph-openmw-3.6:=[collada(-),jpeg,png,sdl,svg,truetype,zlib] )
!osg-fork? ( >=dev-games/openscenegraph-3.6.5:=[collada(-),jpeg,png,sdl,svg,truetype,zlib] )
|
My questions are
- How do we have ebuilds follow a particular branch?
- How do we have ebuilds used tagged releases?
|
|
Back to top |
|
|
alecStewart1 Tux's lil' helper
Joined: 03 Jul 2022 Posts: 148
|
Posted: Sat Aug 24, 2024 4:31 pm Post subject: |
|
|
I've answers some of my own questions.
The following is what I have changed for the openscenegraph-openmw-9999.build
Code: |
if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/OpenMW/osg"
EGIT_BRANCH="3.6"
else
MY_COMMIT="b02abe2_tag"
SRC_URI="https://github.com/OpenMW/osg/archive/refs/tags/${MY_COMMIT}.zip -> ${P}.tar.gz"
S="${WORKDIR}/osg-${MY_COMMIT}"
fi
|
|
|
Back to top |
|
|
alecStewart1 Tux's lil' helper
Joined: 03 Jul 2022 Posts: 148
|
Posted: Wed Aug 28, 2024 1:22 am Post subject: |
|
|
Okay I have two working ebuilds for both openscenegraph-openmw and openmw
openmw:
Code: |
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
LUA_COMPAT=( luajit )
inherit cmake lua-single readme.gentoo-r1 xdg
DESCRIPTION="Open source reimplementation of TES III: Morrowind"
HOMEPAGE="https://openmw.org/ https://gitlab.com/OpenMW/openmw"
if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://gitlab.com/OpenMW/openmw.git"
else
SRC_URI="https://gitlab.com/OpenMW/openmw/archive/${P}.tar.gz"
KEYWORDS="~amd64"
S="${WORKDIR}/${PN}-${P}"
fi
LICENSE="GPL-3 MIT BitstreamVera ZLIB"
SLOT="0"
IUSE="doc devtools +osg-fork test +qt5 +lua"
REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
# FIXME: Unbundle dev-games/openscenegraph-qt in extern/osgQt directory,
# used when BUILD_OPENCS flag is enabled. See bug #676266.
RDEPEND="${LUA_DEPS}
app-arch/lz4:=
>=dev-games/mygui-3.4.3:=
dev-cpp/yaml-cpp:=
dev-db/sqlite:3
dev-games/recastnavigation:=
dev-libs/boost:=[zlib]
dev-libs/icu:=
dev-libs/tinyxml[stl]
media-libs/libsdl2[joystick,opengl,video]
media-libs/openal
media-video/ffmpeg:=
>=sci-physics/bullet-2.86:=[double-precision]
virtual/opengl
osg-fork? ( >=dev-games/openscenegraph-openmw-3.6:=[collada(-),jpeg,png,sdl,svg,truetype] )
!osg-fork? ( >=dev-games/openscenegraph-3.6.5:=[collada(-),jpeg,png,sdl,svg,truetype] )
qt5? (
app-arch/unshield
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtnetwork:5
dev-qt/qtopengl:5
dev-qt/qtwidgets:5
)
lua? ( ${LUA_DEPS} )
"
DEPEND="${RDEPEND}
dev-cpp/sol2
"
BDEPEND="
virtual/pkgconfig
doc? (
app-text/doxygen[dot]
dev-python/sphinx
)
test? (
dev-cpp/gtest
)
"
pkg_setup() {
use lua && lua-single_pkg_setup
}
src_prepare() {
cmake_src_prepare
# Use the system tinyxml headers
rm -v extern/oics/tiny{str,xml}* || die
# Use the system sol2 (v3) headers
rm -rv extern/sol3 || die
}
src_configure() {
use devtools && ! use qt5 &&
elog "'qt5' USE flag is disabled, 'openmw-cs' will not be installed"
local mycmakeargs=(
-DBUILD_BSATOOL=$(usex devtools)
-DBUILD_DOCS=$(usex doc)
-DBUILD_ESMTOOL=$(usex devtools)
-DBUILD_LAUNCHER=$(usex qt5)
-DBUILD_NIFTEST=$(usex devtools)
-DBUILD_OPENCS=$(usex devtools $(usex qt5))
-DBUILD_WIZARD=$(usex qt5)
-DBUILD_UNITTESTS=$(usex test)
-DGLOBAL_DATA_PATH="${EPREFIX}/usr/share"
-DICONDIR="${EPREFIX}/usr/share/icons/hicolor/256x256/apps"
-DUSE_SYSTEM_TINYXML=ON
-DOPENMW_USE_SYSTEM_GOOGLETEST=ON
-DOPENMW_USE_SYSTEM_RECASTNAVIGATION=ON
-DUSE_LUAJIT=$(usex lua)
$(cmake_use_find_package lua Lua)
)
if use lua; then
mycmakeargs+=(
-DLUA_VERSION="$(lua_get_version)"
)
fi
if use test ; then
mkdir -p "${BUILD_DIR}"/apps/openmw_test_suite/data || die
cp "${DISTDIR}"/openmw-template-${MY_TEMPLATE_COMMIT}.omwgame \
"${BUILD_DIR}"/apps/openmw_test_suite/data/template.omwgame || die
fi
cmake_src_configure
}
src_compile() {
cmake_src_compile
if use doc ; then
cmake_src_compile doc
find "${BUILD_DIR}"/docs/Doxygen/html \
-name '*.md5' -type f -delete || die
HTML_DOCS=( "${BUILD_DIR}"/docs/Doxygen/html/. )
fi
}
src_test() {
# Lua 5.x is supported in theory, but don't work as well, the test fails
# Upstream recommends luajit, but it has less arch coverage
if [[ ${ELUA} != luajit ]]; then
elog "Skipping tests on ${ELUA}"
return
fi
pushd "${BUILD_DIR}" > /dev/null || die
./openmw_test_suite || die
popd > /dev/null || die
}
src_install() {
cmake_src_install
local DOC_CONTENTS="
You need the original Morrowind data files. If you haven't
installed them yet, you can install them straight via the
installation wizard which is the officially supported method
(either by using the launcher or by calling 'openmw-wizard'
directly).\n"
if ! use qt5; then
DOC_CONTENTS+="\n\n
USE flag 'qt5' is disabled, 'openmw-launcher' and
'openmw-wizard' are not available. You are on your own for
making the Morrowind data files available and pointing
openmw at them.\n\n
Additionally; you must import the Morrowind.ini file before
running openmw with the Morrowind data files for the first
time. Typically this can be done like so:\n\n
\t mkdir -p ~/.config/openmw\n
\t openmw-iniimporter /path/to/Morrowind.ini ~/.config/openmw/openmw.cfg"
fi
readme.gentoo_create_doc
}
pkg_postinst() {
xdg_pkg_postinst
readme.gentoo_print_elog
}
|
openscenegraph-openmw
Code: |
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
LUA_COMPAT=( luajit )
WX_GTK_VER="3.2-gtk3"
inherit cmake flag-o-matic lua-single wxwidgets
if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/OpenMW/osg"
EGIT_BRANCH="3.6"
else
MY_COMMIT="b02abe2_tag"
SRC_URI="https://github.com/OpenMW/osg/archive/refs/tags/${MY_COMMIT}.zip -> ${P}.tar.gz"
S="${WORKDIR}/osg-${MY_COMMIT}"
fi
DESCRIPTION="OpenMW-specific fork of OpenSceneGraph"
HOMEPAGE="https://github.com/OpenMW/osg"
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 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-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:= )
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:= )
truetype? ( media-libs/freetype:2 )
vnc? ( net-libs/libvncserver )
xrandr? ( x11-libs/libXrandr )
zlib? ( sys-libs/zlib )
"
DEPEND="${RDEPEND}
x11-base/xorg-proto
"
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}
-DBUILD_OSG_PLUGINS_BY_DEFAULT=0
-DBUILD_OSG_PLUGIN_OSG=1
-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
$(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
-DBUILD_OSG_DEPRECATED_SERIALIZERS=0
-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
}
|
Both build without any errors and at least openmw-launcher seems to work just fine. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|