Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-engines/openmw/
Date: Wed, 27 May 2020 09:43:19
Message-Id: 1590572584.52f86590fd3a4c5a7d19c39cc6c17cc53d4b4b3d.asturm@gentoo
1 commit: 52f86590fd3a4c5a7d19c39cc6c17cc53d4b4b3d
2 Author: Alexey Sokolov <sokolov <AT> google <DOT> com>
3 AuthorDate: Sat Nov 10 12:50:53 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Wed May 27 09:43:04 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52f86590
7
8 games-engines/openmw: add live ebuild
9
10 And add me (with p-m) to maintainers
11
12 Signed-off-by: Alexey Sokolov <sokolov <AT> google.com>
13 Closes: https://github.com/gentoo/gentoo/pull/15400
14 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
15
16 games-engines/openmw/metadata.xml | 8 ++
17 games-engines/openmw/openmw-9999.ebuild | 142 ++++++++++++++++++++++++++++++++
18 2 files changed, 150 insertions(+)
19
20 diff --git a/games-engines/openmw/metadata.xml b/games-engines/openmw/metadata.xml
21 index 191124d297e..9927592a87f 100644
22 --- a/games-engines/openmw/metadata.xml
23 +++ b/games-engines/openmw/metadata.xml
24 @@ -1,6 +1,14 @@
25 <?xml version="1.0" encoding="UTF-8"?>
26 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
27 <pkgmetadata>
28 + <maintainer type="person">
29 + <email>alexey+gentoo@××××××××.org</email>
30 + <name>Alexey Sokolov</name>
31 + </maintainer>
32 + <maintainer type="project">
33 + <email>proxy-maint@g.o</email>
34 + <name>Proxy Maintainers</name>
35 + </maintainer>
36 <maintainer type="project">
37 <email>games@g.o</email>
38 <name>Gentoo Games Project</name>
39
40 diff --git a/games-engines/openmw/openmw-9999.ebuild b/games-engines/openmw/openmw-9999.ebuild
41 new file mode 100644
42 index 00000000000..ac6ee3301bc
43 --- /dev/null
44 +++ b/games-engines/openmw/openmw-9999.ebuild
45 @@ -0,0 +1,142 @@
46 +# Copyright 1999-2020 Gentoo Authors
47 +# Distributed under the terms of the GNU General Public License v2
48 +
49 +EAPI=7
50 +
51 +inherit cmake xdg-utils readme.gentoo-r1
52 +
53 +DESCRIPTION="Open source reimplementation of TES III: Morrowind"
54 +HOMEPAGE="https://openmw.org/"
55 +
56 +if [[ ${PV} == *9999* ]]; then
57 + inherit git-r3
58 + EGIT_REPO_URI=${EGIT_REPO_URI:-"https://github.com/OpenMW/openmw.git"}
59 +else
60 + SRC_URI="https://github.com/OpenMW/openmw/archive/${P}.tar.gz"
61 + KEYWORDS="~amd64 ~x86"
62 + S="${WORKDIR}/${PN}-${P}"
63 +fi
64 +
65 +LICENSE="GPL-3 MIT BitstreamVera ZLIB"
66 +SLOT="0"
67 +IUSE="doc devtools test +qt5"
68 +RESTRICT="!test? ( test )"
69 +
70 +# FIXME: Unbundle dev-games/openscenegraph-qt in extern/osgQt directory,
71 +# used when BUILD_OPENCS flag is enabled. See bug #676266.
72 +
73 +RDEPEND="
74 + dev-games/mygui
75 + >=dev-games/openscenegraph-3.5.5:=[ffmpeg,jpeg,png,sdl,svg,truetype,zlib]
76 + dev-libs/boost:=[threads]
77 + dev-libs/tinyxml[stl]
78 + media-libs/libsdl2[joystick,opengl,video]
79 + media-libs/openal
80 + media-video/ffmpeg:=
81 + >=sci-physics/bullet-2.86:=
82 + virtual/opengl
83 + qt5? (
84 + app-arch/unshield
85 + dev-qt/qtcore:5
86 + dev-qt/qtgui:5
87 + dev-qt/qtnetwork:5
88 + dev-qt/qtopengl:5
89 + dev-qt/qtwidgets:5
90 + )
91 +"
92 +
93 +DEPEND="${RDEPEND}"
94 +
95 +BDEPEND="
96 + virtual/pkgconfig
97 + doc? (
98 + app-doc/doxygen[doc]
99 + dev-python/sphinx
100 + )
101 + test? (
102 + dev-cpp/gtest
103 + )
104 +"
105 +
106 +src_prepare() {
107 + cmake_src_prepare
108 +
109 + # We don't install license files
110 + sed -i '/LICDIR/d' CMakeLists.txt || die
111 +
112 + # Use the system tinyxml headers
113 + rm -v extern/oics/tiny{str,xml}* || die
114 +}
115 +
116 +src_configure() {
117 + use devtools && ! use qt5 && \
118 + elog "'qt5' USE flag is disabled, 'openmw-cs' will not be installed"
119 +
120 + local mycmakeargs=(
121 + -DBUILD_BSATOOL=$(usex devtools)
122 + -DBUILD_DOCS=$(usex doc)
123 + -DBUILD_ESMTOOL=$(usex devtools)
124 + -DBUILD_LAUNCHER=$(usex qt5)
125 + -DBUILD_NIFTEST=$(usex devtools)
126 + -DBUILD_OPENCS=$(usex devtools $(usex qt5))
127 + -DBUILD_WIZARD=$(usex qt5)
128 + -DBUILD_UNITTESTS=$(usex test)
129 + -DGLOBAL_DATA_PATH=/usr/share
130 + -DICONDIR="/usr/share/icons/hicolor/256x256/apps"
131 + -DMORROWIND_DATA_FILES="/usr/share/morrowind-data"
132 + -DUSE_SYSTEM_TINYXML=ON
133 + -DDESIRED_QT_VERSION=5
134 + )
135 +
136 + cmake_src_configure
137 +}
138 +
139 +src_compile() {
140 + cmake_src_compile
141 +
142 + if use doc ; then
143 + cmake_src_compile doc
144 + find "${CMAKE_BUILD_DIR}"/docs/Doxygen/html \
145 + -name '*.md5' -type f -delete || die
146 + HTML_DOCS=( "${CMAKE_BUILD_DIR}"/docs/Doxygen/html/. )
147 + fi
148 +}
149 +
150 +src_test() {
151 + "${BUILD_DIR}/openmw_test_suite" || die
152 +}
153 +
154 +src_install() {
155 + cmake_src_install
156 +
157 + local DOC_CONTENTS="
158 + You need the original Morrowind data files. If you haven't
159 + installed them yet, you can install them straight via the
160 + installation wizard which is the officially supported method
161 + (either by using the launcher or by calling 'openmw-wizard'
162 + directly).\n"
163 +
164 + if ! use qt5; then
165 + local DOC_CONTENTS+="\n\n
166 + USE flag 'qt5' is disabled, 'openmw-launcher' and
167 + 'openmw-wizard' are not available. You are on your own for
168 + making the Morrowind data files available and pointing
169 + openmw at them.\n\n
170 + Additionally; you must import the Morrowind.ini file before
171 + running openmw with the Morrowind data files for the first
172 + time. Typically this can be done like so:\n\n
173 + \t mkdir -p ~/.config/openmw\n
174 + \t openmw-iniimporter /path/to/Morrowind.ini ~/.config/openmw/openmw.cfg"
175 + fi
176 +
177 + readme.gentoo_create_doc
178 +}
179 +
180 +pkg_postinst() {
181 + xdg_icon_cache_update
182 + readme.gentoo_print_elog
183 +}
184 +
185 +pkg_postrm() {
186 + xdg_icon_cache_update
187 +}