summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-strategy/ja2-stracciatella/ja2-stracciatella-0.17.0.ebuild')
-rw-r--r--games-strategy/ja2-stracciatella/ja2-stracciatella-0.17.0.ebuild49
1 files changed, 31 insertions, 18 deletions
diff --git a/games-strategy/ja2-stracciatella/ja2-stracciatella-0.17.0.ebuild b/games-strategy/ja2-stracciatella/ja2-stracciatella-0.17.0.ebuild
index 635f22ba7acd..8ea06434f52a 100644
--- a/games-strategy/ja2-stracciatella/ja2-stracciatella-0.17.0.ebuild
+++ b/games-strategy/ja2-stracciatella/ja2-stracciatella-0.17.0.ebuild
@@ -95,24 +95,30 @@ inherit cargo cmake xdg-utils
DESCRIPTION="An improved, cross-platform, stable Jagged Alliance 2 runtime"
HOMEPAGE="https://github.com/ja2-stracciatella/"
-
-SRC_URI="https://github.com/ja2-stracciatella/ja2-stracciatella/releases/tag/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI="https://github.com/ja2-stracciatella/ja2-stracciatella/releases/tag/v${PV}.tar.gz -> ${P}.tar.gz
+ editor? ( https://github.com/ja2-stracciatella/free-ja2-resources/releases/download/v1/editor.slf -> ${P}-editor.slf )
+"
SRC_URI+=" $(cargo_crate_uris ${CRATES})"
-IUSE="cdinstall"
-LICENSE="SFI-SCLA"
+LICENSE="CC-BY-NC-2.0 SFI-SCLA"
SLOT="0"
KEYWORDS="~amd64"
+IUSE="cdinstall editor ru-gold test"
+RESTRICT="test"
DEPEND="media-libs/libsdl2[X,sound,video]
!~media-libs/libsdl2-2.0.6
>=dev-lang/rust-1.40.0
- >=dev-cpp/gtest-1.9.0_pre20190607
- >=x11-libs/fltk-1.3.5
+ >=x11-libs/fltk-1.3.5[opengl]
>=dev-cpp/string-theory-3.1
+ >=dev-games/libsmacker-1.1.1
>=dev-libs/rapidjson-1.1.0
"
+BDEPEND="
+ test? ( >=dev-cpp/gtest-1.9.0_pre20190607 )
+"
+
RDEPEND="${DEPEND}
cdinstall? ( games-strategy/ja2-stracciatella-data )
"
@@ -122,10 +128,6 @@ LANGS="l10n_de +l10n_en l10n_fr l10n_it l10n_nl l10n_pl l10n_ru"
IUSE="$IUSE $LANGS"
REQUIRED_USE="^^ ( ${LANGS//+/} )"
-PATCHES=(
- "${FILESDIR}/${P}-staticlibsmacker.patch"
-)
-
src_configure() {
local mycmakeargs=()
@@ -142,19 +144,30 @@ src_configure() {
elog "Chosen language is ${mycmakeargs# -DLNG=}"
mycmakeargs+=(
- -DLOCAL_GTEST_LIB=OFF
- -DLOCAL_RAPIDJSON_LIB=OFF
- -DLOCAL_STRING_THEORY_LIB=OFF
- -DWITH_RUST_BINARIES=OFF
- -DBUILD_LAUNCHER=OFF
- -DOPENGL_GL_PREFERENCE=GLVND
- -DEXTRA_DATA_DIR="${EPREFIX}/usr/share/ja2"
- )
+ -DLOCAL_GTEST_LIB=OFF
+ -DLOCAL_RAPIDJSON_LIB=OFF
+ -DLOCAL_STRING_THEORY_LIB=OFF
+ -DWITH_UNITTESTS=$(usex test)
+ -DWITH_RUST_BINARIES=OFF
+ -DBUILD_LAUNCHER=OFF
+ -DOPENGL_GL_PREFERENCE=GLVND
+ -DEXTRA_DATA_DIR="${EPREFIX}/usr/share/ja2"
+ )
cargo_gen_config
cmake_src_configure
}
+src_install() {
+ if use editor; then
+ insinto /usr/share/ja2
+ doins "${DISTDIR}/${P}-editor.slf"
+ dosym "${P}-editor.slf" "/usr/share/ja2/editor.slf"
+ fi
+
+ cmake_src_install
+}
+
pkg_postinst() {
elog "You need ja2 in the chosen language, otherwise set it in package.use!"