aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-engines/instead')
-rw-r--r--games-engines/instead/Manifest1
-rw-r--r--games-engines/instead/instead-3.4.1.ebuild114
2 files changed, 115 insertions, 0 deletions
diff --git a/games-engines/instead/Manifest b/games-engines/instead/Manifest
index 6aea58357..addf566b8 100644
--- a/games-engines/instead/Manifest
+++ b/games-engines/instead/Manifest
@@ -1 +1,2 @@
DIST instead-3.3.5.tar.gz 3603530 BLAKE2B 3be93facf3f456ebdd81dc5f251177e50a3ba745107c5183c8032bc5c3b914d3843beed82fbb62950873517714d19f7412543ced5ef2c72b942580ac77ee2e5b SHA512 4db126b6eb84f79ba3651b8b4664ebc5c66baec8e1ae3bbaa9626993ac221104250f84d2e65dacb9403f13ad3c60f36eda63fbbd84e0199b2ae8c5009a2c8ae6
+DIST instead-3.4.1.tar.gz 3605352 BLAKE2B de1597ece93f603d6937c19be5a8cd08a69ca5c45f987bf74654909a3dd2ae75b2fb7d6114eec79b3fce2ed24172924eed160e6d42892ae44695e6f4ed67f2dc SHA512 0eb552f6d535a8d28ee6f986b14c7c21482223854fa0eaf12247fee6e3a5bd8eb3e0c3650e8f269b105ff155f68c36fcf73c280c9ee58e6d0193d7612fc86e4b
diff --git a/games-engines/instead/instead-3.4.1.ebuild b/games-engines/instead/instead-3.4.1.ebuild
new file mode 100644
index 000000000..fd8a67314
--- /dev/null
+++ b/games-engines/instead/instead-3.4.1.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PLOCALES="cs de en es fr it nl pt ru uk"
+PLOCALE_BACKUP="en"
+LUA_COMPAT=( lua5-1 luajit )
+
+inherit cmake lua-single plocale
+
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/instead-hub/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/instead-hub/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="INSTEAD text-based quest game engine"
+HOMEPAGE="https://instead.hugeping.ru/"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="doc +iconv +sdl2"
+# gtk3 is forced since gtk2 already near its end-of-life
+# harfbuzz support requres features from SDL2_ttf version which is not yet released (>2.0.15)
+
+REQUIRED_USE="
+ ${LUA_REQUIRED_USE}
+"
+
+BDEPEND="
+ virtual/pkgconfig
+ ${LUA_DEPS}
+"
+
+SDL_DEPS="
+ media-libs/libsdl!VER![sound,video]
+ media-libs/sdl!VER!-mixer
+ media-libs/sdl!VER!-image
+ media-libs/sdl!VER!-ttf
+"
+
+COMMON_DEPEND="
+ ${LUA_DEPS}
+ sys-libs/zlib
+ x11-libs/gtk+:3
+ sdl2? ( ${SDL_DEPS//!VER!/2} )
+ !sdl2? ( ${SDL_DEPS//!VER!/} )
+ iconv? ( >=virtual/libiconv-0-r1 )
+"
+# harfbuzz? (
+# media-libs/harfbuzz
+# media-libs/sdl!VER!-ttf[harfbuzz]
+# )
+
+RDEPEND="${COMMON_DEPEND}"
+DEPEND="${COMMON_DEPEND}"
+
+DOCS=( AUTHORS ChangeLog README.md )
+
+src_prepare() {
+ plocale_find_changes "${S}/lang" "" ".ini"
+
+ rm_loc() { rm "lang/$1.ini" || die; }
+ plocale_for_each_disabled_locale rm_loc
+
+ # The docs dir contains some code to build pdf out of the Markdown docs, but it requires some
+ # weird util called multimarkdown, so we will just install the md's themselfs.
+ if use doc; then
+ EXTRA_DOCS=()
+ for l in $(plocale_get_locales) ${PLOCALE_BACKUP}; do
+ for d in "docs/modules-$l.md" "docs/stead3-$l.md"; do
+ if [[ -f "$d" ]]; then
+ EXTRA_DOCS=( "${EXTRA_DOCS[@]}" "$d" )
+ fi
+ done
+ done
+
+ DOCS=( "${DOCS[@]}" "${EXTRA_DOCS[@]}" )
+ fi
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DWITH_GTK2=OFF
+ -DWITH_GTK3=ON
+ -DWITH_LUAJIT="$(usex lua_single_target_luajit)"
+ -DWITH_ICONV="$(usex iconv)"
+ -DWITH_SDL2="$(usex sdl2)"
+ )
+# -DWITH_HARFBUZZ="$(usex harfbuzz)"
+
+ cmake_src_configure
+}
+
+pkg_postinst() {
+ elog "The instead package contains only a game engine. The actual"
+ elog "games have to be installed separately. To install a game"
+ elog "download an archive and extract it to ~/.instead/games or"
+ elog "to ${EPREFIX}/usr/share/instead/games."
+ elog ""
+ elog "A collection of various games can be found at:"
+ elog " https://instead.itch.io/"
+ elog " http://instead-games.ru/"
+ elog ""
+ elog "Also there are some third-party tools to manage download"
+ elog "and installation of games like insteadman3:"
+ elog " https://jhekasoft.github.io/insteadman"
+
+}