Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-fps/freedm-data/files/, games-fps/freedm-data/
Date: Sat, 07 Sep 2019 17:47:02
Message-Id: 1567878395.0d0e63e4915907d850af231c41c990e959805c82.chewi@gentoo
1 commit: 0d0e63e4915907d850af231c41c990e959805c82
2 Author: William Breathitt Gray <vilhelm.gray <AT> gmail <DOT> com>
3 AuthorDate: Fri Sep 6 07:45:19 2019 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 7 17:46:35 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d0e63e4
7
8 games-fps/freedm-data: Set DOOMWADPATH in freedoom launch script
9
10 Package-Manager: Portage-2.3.73, Repoman-2.3.17
11 Signed-off-by: William Breathitt Gray <vilhelm.gray <AT> gmail.com>
12 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
13
14 .../files/freedm-data-0.11.3-Set-DOOMWADPATH.patch | 38 ++++++++++++++
15 games-fps/freedm-data/freedm-data-0.11.3-r2.ebuild | 61 ++++++++++++++++++++++
16 2 files changed, 99 insertions(+)
17
18 diff --git a/games-fps/freedm-data/files/freedm-data-0.11.3-Set-DOOMWADPATH.patch b/games-fps/freedm-data/files/freedm-data-0.11.3-Set-DOOMWADPATH.patch
19 new file mode 100644
20 index 00000000000..0998cc45ebd
21 --- /dev/null
22 +++ b/games-fps/freedm-data/files/freedm-data-0.11.3-Set-DOOMWADPATH.patch
23 @@ -0,0 +1,38 @@
24 +From 19b8fe33843b1e431fb0737a57087f58c168952c Mon Sep 17 00:00:00 2001
25 +From: William Breathitt Gray <vilhelm.gray@×××××.com>
26 +Date: Fri, 6 Sep 2019 16:20:49 +0900
27 +Subject: [PATCH] dist/freedoom: Set DOOMWADPATH with sensible default value if
28 + unset
29 +
30 +Engines such as Odamex may not have a default search path and simply
31 +search for freedoom1.wad relative to the current directory. This can
32 +cause an unexpected WAD file not found error when executing the freedoom
33 +script.
34 +
35 +This issue is mitigated by setting a default DOOMWADPATH environment
36 +variable with sensible search paths, if it is not already set. All
37 +engines listed in the PORTS variable support the DOOMWADPATH environment
38 +variable, which makes it a simple and convenient way of helping prevent
39 +this error.
40 +---
41 + dist/freedoom | 4 ++++
42 + 1 file changed, 4 insertions(+)
43 +
44 +diff --git a/dist/freedoom b/dist/freedoom
45 +index 62e3c4d5..0c0961a5 100755
46 +--- a/dist/freedoom
47 ++++ b/dist/freedoom
48 +@@ -31,6 +31,10 @@ case "$(basename "$0")" in
49 + ;;
50 + esac
51 +
52 ++if [ -z "$DOOMWADPATH" ]; then
53 ++ export DOOMWADPATH="/usr/share/doom:/usr/share/games/doom:/usr/local/share/doom:/usr/local/share/games/doom"
54 ++fi
55 ++
56 + if [ -z "$PORT" ] && [ -h "$HOME"/.doomport ]; then
57 + if [ -f "$(readlink -f "$HOME"/.doomport)" ] \
58 + && [ -x "$(readlink -f "$HOME"/.doomport)" ]; then
59 +--
60 +2.23.0
61 +
62
63 diff --git a/games-fps/freedm-data/freedm-data-0.11.3-r2.ebuild b/games-fps/freedm-data/freedm-data-0.11.3-r2.ebuild
64 new file mode 100644
65 index 00000000000..29e3894685d
66 --- /dev/null
67 +++ b/games-fps/freedm-data/freedm-data-0.11.3-r2.ebuild
68 @@ -0,0 +1,61 @@
69 +# Copyright 1999-2019 Gentoo Authors
70 +# Distributed under the terms of the GNU General Public License v2
71 +
72 +EAPI=7
73 +
74 +PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
75 +
76 +inherit prefix python-any-r1 xdg
77 +
78 +DESCRIPTION="Game resources for FreeDM"
79 +HOMEPAGE="https://freedoom.github.io"
80 +SRC_URI="https://github.com/freedoom/freedoom/archive/v${PV}.tar.gz -> freedoom-${PV}.tar.gz"
81 +
82 +LICENSE="BSD"
83 +SLOT="0"
84 +KEYWORDS="~amd64 ~x86"
85 +
86 +BDEPEND="
87 + $(python_gen_any_dep 'dev-python/pillow[${PYTHON_USEDEP}]')
88 + app-text/asciidoc
89 + games-util/deutex
90 + virtual/imagemagick-tools[png]"
91 +
92 +S="${WORKDIR}/freedoom-${PV}"
93 +
94 +PATCHES="${FILESDIR}/${P}-Set-DOOMWADPATH.patch"
95 +
96 +DOOMWADPATH=share/doom
97 +
98 +python_check_deps() {
99 + has_version -b "dev-python/pillow[${PYTHON_USEDEP}]"
100 +}
101 +
102 +src_prepare() {
103 + # This is to enable usage of the 'PS' coder, which is
104 + # disabled by default (https://bugs.gentoo.org/664236)
105 + install -D -t ~/.config/ImageMagick "${FILESDIR}"/ImageMagick/policy.xml || die
106 +
107 + xdg_src_prepare
108 + eapply_user
109 +
110 + hprefixify dist/freedoom
111 +}
112 +
113 +src_compile() {
114 + emake wads/freedm.wad
115 +}
116 +
117 +src_install() {
118 + emake install-freedm \
119 + prefix="${ED}/usr/" \
120 + bindir="bin/" \
121 + mandir="share/man/" \
122 + waddir="${DOOMWADPATH}/"
123 +}
124 +
125 +pkg_postinst() {
126 + xdg_pkg_postinst
127 +
128 + elog "FreeDM WAD file installed into ${EPREFIX}/usr/${DOOMWADPATH} directory."
129 +}