Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-engines/devilutionx/
Date: Mon, 02 Sep 2019 11:05:56
Message-Id: 1567422205.3d49f7183d215e1eaf6328198b94b3585b136958.polynomial-c@gentoo
1 commit: 3d49f7183d215e1eaf6328198b94b3585b136958
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 2 11:02:30 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 2 11:03:25 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d49f718
7
8 games-engines/devilutionx: Initial commit
9
10 Package-Manager: Portage-2.3.75, Repoman-2.3.17
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 games-engines/devilutionx/devilutionx-9999.ebuild | 60 +++++++++++++++++++++++
14 games-engines/devilutionx/metadata.xml | 11 +++++
15 2 files changed, 71 insertions(+)
16
17 diff --git a/games-engines/devilutionx/devilutionx-9999.ebuild b/games-engines/devilutionx/devilutionx-9999.ebuild
18 new file mode 100644
19 index 00000000000..3070232b106
20 --- /dev/null
21 +++ b/games-engines/devilutionx/devilutionx-9999.ebuild
22 @@ -0,0 +1,60 @@
23 +# Copyright 1999-2019 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=7
27 +
28 +inherit cmake-utils desktop
29 +
30 +DESCRIPTION="Diablo engine for modern operating systems"
31 +HOMEPAGE="https://github.com/diasurgical/devilutionX"
32 +if [[ "${PV}" == 9999 ]] ; then
33 + inherit git-r3
34 + EGIT_REPO_URI="https://github.com/diasurgical/devilutionX.git"
35 +else
36 + SRC_URI="https://github.com/diasurgical/devilutionX/archive/${PV}.tar.gz -> ${P}.tar.gz"
37 + KEYWORDS="~amd64 ~x86"
38 +fi
39 +
40 +LICENSE="public-domain"
41 +SLOT="0"
42 +
43 +IUSE="debug"
44 +
45 +RDEPEND="
46 + dev-libs/libsodium
47 + media-libs/libsdl2[haptic]
48 + media-libs/sdl2-mixer
49 + media-libs/sdl2-ttf
50 +"
51 +DEPEND="${RDEPEND}"
52 +BDEPEND="
53 + virtual/pkgconfig
54 +"
55 +
56 +src_prepare() {
57 + # https://github.com/diasurgical/devilutionX/issues/225
58 + eapply -R "${FILESDIR}"/${PN}-facebookincubator_find_libsodium.patch
59 +
60 + cmake-utils_src_prepare
61 +}
62 +
63 +src_configure() {
64 + local mycmakeargs=(
65 + -DBINARY_RELEASE=ON
66 + -DDEBUG="$(usex debug)"
67 + )
68 + cmake-utils_src_configure
69 +}
70 +
71 +src_install() {
72 + dobin "${BUILD_DIR}/${PN}"
73 + make_desktop_entry ${PN} "Diablo devolved"
74 +}
75 +
76 +pkg_postinst() {
77 + einfo "In order to play the game you need to install the file"
78 + einfo " diabdat.mpq"
79 + einfo "from the original game CD into the following directory:"
80 + einfo " \${HOME}/.local/share/diasurgical/devilution/"
81 + einfo "and make sure it's writeable (chmod u+w)."
82 +}
83
84 diff --git a/games-engines/devilutionx/metadata.xml b/games-engines/devilutionx/metadata.xml
85 new file mode 100644
86 index 00000000000..81aca5b1e55
87 --- /dev/null
88 +++ b/games-engines/devilutionx/metadata.xml
89 @@ -0,0 +1,11 @@
90 +<?xml version="1.0" encoding="UTF-8"?>
91 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
92 +<pkgmetadata>
93 + <maintainer type="person">
94 + <email>polynomial-c@g.o</email>
95 + <name>Lars Wendler</name>
96 + </maintainer>
97 + <upstream>
98 + <remote-id type="github">diasurgical/devilutionX</remote-id>
99 + </upstream>
100 +</pkgmetadata>