1 |
commit: ed8288fa26345cfe211c76786991f505d0007239 |
2 |
Author: Vadim A. Misbakh-Soloviov <git <AT> mva <DOT> name> |
3 |
AuthorDate: Wed Oct 5 07:07:35 2016 +0000 |
4 |
Commit: Vadim A. Misbakh-Soloviov <mva <AT> mva <DOT> name> |
5 |
CommitDate: Wed Oct 5 07:07:35 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gamerlay.git/commit/?id=ed8288fa |
7 |
|
8 |
dex: added |
9 |
|
10 |
games-action/dex/dex-2.1.0.2.ebuild | 113 ++++++++++++++++++++++++++++++++++++ |
11 |
1 file changed, 113 insertions(+) |
12 |
|
13 |
diff --git a/games-action/dex/dex-2.1.0.2.ebuild b/games-action/dex/dex-2.1.0.2.ebuild |
14 |
new file mode 100644 |
15 |
index 0000000..972db97 |
16 |
--- /dev/null |
17 |
+++ b/games-action/dex/dex-2.1.0.2.ebuild |
18 |
@@ -0,0 +1,113 @@ |
19 |
+# Copyright 1999-2016 Gentoo Foundation |
20 |
+# Distributed under the terms of the GNU General Public License v2 |
21 |
+# $Header: $ |
22 |
+ |
23 |
+EAPI=6 |
24 |
+ |
25 |
+inherit eutils unpacker |
26 |
+ |
27 |
+GOG_PATCH_PV="2.0.1.2" |
28 |
+ |
29 |
+DESCRIPTION="2D Action-RPG with a rich cyberpunk world" |
30 |
+HOMEPAGE="http://en.dreadlocks.cz/games/dex/" |
31 |
+SRC_URI=" |
32 |
+ gog? ( |
33 |
+ gog_${PN}_${PV}.sh |
34 |
+ patch_${PN}_${GOG_PATCH_PV}.sh |
35 |
+ ) |
36 |
+" |
37 |
+ |
38 |
+RESTRICT="fetch strip" |
39 |
+LICENSE="EULA" |
40 |
+ |
41 |
+SLOT="0" |
42 |
+KEYWORDS="amd64 x86" |
43 |
+IUSE="+gog" |
44 |
+ |
45 |
+DEPEND=" |
46 |
+ app-arch/unzip |
47 |
+ dev-util/xdelta3 |
48 |
+" |
49 |
+RDEPEND=" |
50 |
+ dev-libs/glib |
51 |
+ media-libs/mesa |
52 |
+ virtual/libc |
53 |
+ x11-libs/gdk-pixbuf |
54 |
+ x11-libs/gtk+ |
55 |
+ x11-libs/libX11 |
56 |
+ x11-libs/libXcursor |
57 |
+ x11-libs/libXrandr |
58 |
+" |
59 |
+ |
60 |
+S="${WORKDIR}" |
61 |
+ |
62 |
+pkg_nofetch() { |
63 |
+ einfo "" |
64 |
+ einfo "Please open ${HOMEPAGE}, choose a place to buy it," |
65 |
+ einfo "then download \"${SRC_URI}\", and move/link it to \"${DISTDIR}\"" |
66 |
+ einfo "" |
67 |
+ einfo "P.S.: I've only gog version. So, if you have Humble Store version" |
68 |
+ einfo "and want this ebuild to also cover it — please contact me." |
69 |
+} |
70 |
+ |
71 |
+src_unpack() { |
72 |
+ for f in ${A[@]}; do |
73 |
+ unzip -qn "${DISTDIR}/${f}" |
74 |
+ done |
75 |
+} |
76 |
+ |
77 |
+src_prepare() { |
78 |
+ rm -r meta scripts |
79 |
+ default |
80 |
+ while read Line # -- patch files |
81 |
+ do |
82 |
+ Line2=$(echo $Line | cut -d " " -f 2-) |
83 |
+ xdelta3 -v -d -s "${Line2}" patch/"${Line2}".delta patch/"${Line2}".tmp || die "ERROR (patching): File version mismatch, quitting" |
84 |
+ done < patch/files_to_patch.list |
85 |
+ |
86 |
+ while read Line # -- move patched files to the right place |
87 |
+ do |
88 |
+ Line2=$(echo $Line | cut -d " " -f 2-) |
89 |
+ chmod $(stat -c%a "${Line2}") patch/"${Line2}".tmp |
90 |
+ mv -vf patch/"${Line2}".tmp "${Line2}" |
91 |
+ done < patch/files_to_patch.list |
92 |
+ |
93 |
+ while read Line # -- remove patch files |
94 |
+ do |
95 |
+ Line2=$(echo $Line | cut -d " " -f 2-) |
96 |
+ rm -vfr "patch/${Line2}".delta |
97 |
+ done < patch/files_to_patch.list |
98 |
+} |
99 |
+ |
100 |
+src_install() { |
101 |
+ local dir="/opt/${PN}" arch="x86" exe modexe; |
102 |
+ |
103 |
+# use amd64 && arch="x86_64"; |
104 |
+ exe="${PN^}.x86"; # fixme when gog'll release x86_64 version |
105 |
+ cfgexe="GamepadConfigTool.x86" #.${arch}"; |
106 |
+ |
107 |
+ insinto "${dir}"; |
108 |
+ exeinto "${dir}"; |
109 |
+ |
110 |
+ cd data/noarch; |
111 |
+ |
112 |
+ doins -r game/* |
113 |
+ doexe "game/${exe}" "game/${cfgexe}" "support/gog-system-report.sh" |
114 |
+ |
115 |
+ touch "${D}/${dir}/controller.config" |
116 |
+ fperms 666 "${dir}/controller.config" # so, gamepad config tool will be able to save content to it, even if runs under unpriv. user |
117 |
+ |
118 |
+ make_wrapper "${PN}" "./${exe}" "${dir}" |
119 |
+ make_wrapper "${PN}-gog-system-report" "./gog-system-report.sh" "${dir}" |
120 |
+ make_wrapper "${PN}-gc" "./${cfgexe}" "${dir}" |
121 |
+ newicon "support/icon.png" "${PN}.png" |
122 |
+ make_desktop_entry "${PN}" "${PN^}: Play" "${PN}" |
123 |
+ make_desktop_entry "${PN}-gc" "${PN^}: Gamepad Configuration tool" "${PN}" |
124 |
+} |
125 |
+ |
126 |
+pkg_postinst() { |
127 |
+ einfo 'If game badly detects your gamepad (i.e. some keys is not working),' |
128 |
+ einfo 'you can run `dex-gc` tool (Gamepad Configuration tool)' |
129 |
+ einfo 'It will calibrate your gamepad and save configuration so Dex game' |
130 |
+ einfo 'will be able to load it and work normally with your gamepad' |
131 |
+} |