summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2020-01-02 12:41:32 +0100
committerLars Wendler <polynomial-c@gentoo.org>2020-01-02 12:49:08 +0100
commitf8e41acbb5a2e605480755ca14abc9fdadebb392 (patch)
tree4b6618119c47592dcb345fcce342824a66b7185f /games-engines/devilutionx/devilutionx-1.0.0-r1.ebuild
parentdev-libs/qtkeychain: Version bump 0.10.0 (diff)
downloadgentoo-f8e41acbb5a2e605480755ca14abc9fdadebb392.tar.gz
gentoo-f8e41acbb5a2e605480755ca14abc9fdadebb392.tar.bz2
gentoo-f8e41acbb5a2e605480755ca14abc9fdadebb392.zip
games-engines/devilutionx: Revbump to handle build options better
Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'games-engines/devilutionx/devilutionx-1.0.0-r1.ebuild')
-rw-r--r--games-engines/devilutionx/devilutionx-1.0.0-r1.ebuild69
1 files changed, 69 insertions, 0 deletions
diff --git a/games-engines/devilutionx/devilutionx-1.0.0-r1.ebuild b/games-engines/devilutionx/devilutionx-1.0.0-r1.ebuild
new file mode 100644
index 000000000000..fb3f84ae0c42
--- /dev/null
+++ b/games-engines/devilutionx/devilutionx-1.0.0-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# Sometimes build with ninja fails.
+# Please check occasionally if we can revert back to ninja.
+# Latest known issue:
+# https://github.com/diasurgical/devilutionX/issues/490
+CMAKE_MAKEFILE_GENERATOR="emake"
+
+inherit cmake desktop
+
+DESCRIPTION="Diablo engine for modern operating systems"
+HOMEPAGE="https://github.com/diasurgical/devilutionX"
+if [[ "${PV}" == 9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/diasurgical/devilutionX.git"
+else
+ SRC_URI="https://github.com/diasurgical/devilutionX/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/devilutionX-${PV}"
+fi
+
+LICENSE="public-domain"
+SLOT="0"
+
+IUSE="debug lto"
+
+RDEPEND="
+ dev-libs/libsodium
+ media-libs/libsdl2[haptic]
+ media-libs/sdl2-mixer
+ media-libs/sdl2-ttf
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ sed "/PROJECT_VERSION/s|@PROJECT_VERSION@|${PV}|" -i SourceS/config.h.in || die
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DASAN="OFF"
+ -DDEBUG="$(usex debug)"
+ -DDIST="ON"
+ -DFASTER="OFF"
+ -DLTO="$(usex lto)"
+ -DUBSAN="OFF"
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ dobin "${BUILD_DIR}/${PN}"
+ make_desktop_entry ${PN} "Diablo devolved"
+}
+
+pkg_postinst() {
+ einfo "In order to play the game you need to install the file"
+ einfo " diabdat.mpq"
+ einfo "from the original game CD into the following directory:"
+ einfo " \${HOME}/.local/share/diasurgical/devilution/"
+ einfo "and make sure it's writeable (chmod u+w)."
+}