1 |
commit: a76031ef5eb04f381ef4acd506c606877f2c2a9a |
2 |
Author: Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed May 4 12:56:22 2011 +0000 |
4 |
Commit: Azamat H. Hackimov <winterheart <AT> gentoo <DOT> ru> |
5 |
CommitDate: Wed May 4 12:56:22 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gamerlay.git;a=commit;h=a76031ef |
7 |
|
8 |
[games-strategy/ja2-stracciatella] Jagged Alliance 2, Stracciatella port |
9 |
Latest trunk snapshot from svn. |
10 |
|
11 |
(Portage version: 2.1.9.42/git/Linux x86_64, unsigned Manifest commit) |
12 |
|
13 |
--- |
14 |
games-strategy/ja2-stracciatella/files/jagged2.png | Bin 0 -> 1299 bytes |
15 |
.../ja2-stracciatella-0.12.1_p7072.ebuild | 100 ++++++++++++++++++++ |
16 |
games-strategy/ja2-stracciatella/metadata.xml | 16 +++ |
17 |
3 files changed, 116 insertions(+), 0 deletions(-) |
18 |
|
19 |
diff --git a/games-strategy/ja2-stracciatella/files/jagged2.png b/games-strategy/ja2-stracciatella/files/jagged2.png |
20 |
new file mode 100644 |
21 |
index 0000000..808e6c4 |
22 |
Binary files /dev/null and b/games-strategy/ja2-stracciatella/files/jagged2.png differ |
23 |
|
24 |
diff --git a/games-strategy/ja2-stracciatella/ja2-stracciatella-0.12.1_p7072.ebuild b/games-strategy/ja2-stracciatella/ja2-stracciatella-0.12.1_p7072.ebuild |
25 |
new file mode 100644 |
26 |
index 0000000..b1b69d5 |
27 |
--- /dev/null |
28 |
+++ b/games-strategy/ja2-stracciatella/ja2-stracciatella-0.12.1_p7072.ebuild |
29 |
@@ -0,0 +1,100 @@ |
30 |
+# Copyright 1999-2011 Gentoo Foundation |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+# $Header: $ |
33 |
+ |
34 |
+EAPI=3 |
35 |
+ |
36 |
+inherit games |
37 |
+ |
38 |
+DESCRIPTION="A port of Jagged Alliance 2 to SDL." |
39 |
+HOMEPAGE="http://tron.homeunix.org/ja2/" |
40 |
+SRC_URI="http://ftp.gentoo.ru/people/winterheart/distfiles/ja2-${PV}-source.tar.bz2 |
41 |
+ editor? ( http://tron.homeunix.org/ja2/editor.slf.gz )" |
42 |
+ |
43 |
+LICENSE="SFI-SCLA" |
44 |
+SLOT="0" |
45 |
+KEYWORDS="~amd64 ~x86" |
46 |
+IUSE="debug editor linguas_nl linguas_en linguas_fr linguas_de linguas_it linguas_pl |
47 |
+linguas_ru linguas_ru_gold zlib" |
48 |
+ |
49 |
+RDEPEND="media-libs/libsdl |
50 |
+ zlib? ( sys-libs/zlib )" |
51 |
+DEPEND="${RDEPEND}" |
52 |
+ |
53 |
+S="${WORKDIR}/ja2-${PV}-source" |
54 |
+ |
55 |
+src_prepare() { |
56 |
+ |
57 |
+ myconf="" |
58 |
+ for i in ${LINGUAS}; do |
59 |
+ ewarn "${i} is chosen for primary language" |
60 |
+ case ${i} in |
61 |
+ de) myconf="LNG=GERMAN" ;; |
62 |
+ nl) myconf="LNG=DUTCH" ;; |
63 |
+ fr) myconf="LNG=FRENCH" ;; |
64 |
+ it) myconf="LNG=ITALIAN" ;; |
65 |
+ pl) myconf="LNG=POLISH" ;; |
66 |
+ ru) myconf="LNG=RUSSIAN" ;; |
67 |
+ ru_gold) myconf="LNG=RUSSIAN_GOLD" ;; |
68 |
+ *) myconf="LNG=ENGLISH" ;; |
69 |
+ esac |
70 |
+ break |
71 |
+ done |
72 |
+ |
73 |
+ sed -i \ |
74 |
+ -e "s:\(CFLAGS += \$(CFLAGS_SDL)\):\1 ${CFLAGS}:" \ |
75 |
+ -e "s:\(LDFLAGS += \$(LDFLAGS_SDL)\):\1 ${LDFLAGS}:" \ |
76 |
+ Makefile || die "sed failed" |
77 |
+ sed -ie "s:\(Icon=jagged2\).ico:\1:" ${PN}.desktop || die "sed failed" |
78 |
+ |
79 |
+ sed -ie "s:/some/place/where/the/data/is:${GAMES_DATADIR}/ja2:" \ |
80 |
+ sgp/FileMan.cc || die "sed failed" |
81 |
+ |
82 |
+ use editor && myconf="${myconf} JA2EDITOR=yes JA2BETAVERSION=yes" |
83 |
+ use zlib && myconf="${myconf} WITH_ZLIB=yes" |
84 |
+} |
85 |
+ |
86 |
+src_compile() { |
87 |
+ emake ${myconf} || die |
88 |
+} |
89 |
+ |
90 |
+src_install() { |
91 |
+ dogamesbin ja2 || die |
92 |
+ doman ja2.6 |
93 |
+ doicon "${FILESDIR}"/jagged2.png |
94 |
+ insinto /usr/share/applications |
95 |
+ doins ${PN}.desktop |
96 |
+ |
97 |
+ if use editor; then |
98 |
+ insinto "${GAMES_DATADIR}"/ja2/data |
99 |
+ doins "${WORKDIR}"/editor.slf |
100 |
+ fi |
101 |
+ |
102 |
+ prepgamesdirs |
103 |
+} |
104 |
+ |
105 |
+pkg_postinst() { |
106 |
+ einfo |
107 |
+ elog "Copy all files from Data directory of Jagged Alliance 2 installation to" |
108 |
+ elog "${GAMES_DATADIR}/ja2/data and then run" |
109 |
+ elog |
110 |
+ elog "# emerge --config \"=${CATEGORY}/${PF}\"" |
111 |
+ elog |
112 |
+ einfo |
113 |
+} |
114 |
+ |
115 |
+pkg_config() { |
116 |
+ einfo |
117 |
+ einfo "Convert names of data-files to lower-case" |
118 |
+ einfo |
119 |
+ for i in \ |
120 |
+ "${GAMES_DATADIR}"/ja2/data/*.[Ss][Ll][Ff] \ |
121 |
+ "${GAMES_DATADIR}"/ja2/data/[Tt][Ii][Ll][Ee][Cc][Aa][Cc][Hh][Ee]/*.[Jj][Ss][Dd] \ |
122 |
+ "${GAMES_DATADIR}"/ja2/data/[Tt][Ii][Ll][Ee][Cc][Aa][Cc][Hh][Ee]/*.[Ss][Tt][Ii]; \ |
123 |
+ do |
124 |
+ einfo "$i" |
125 |
+ lower="`echo "$i" | LANG=C tr '[A-Z]' '[a-z]'`" |
126 |
+ [ -d `dirname "$lower"` ] || mkdir `dirname $lower` |
127 |
+ [ "$i" = "$lower" ] || mv "$i" "$lower" |
128 |
+ done |
129 |
+} |
130 |
|
131 |
diff --git a/games-strategy/ja2-stracciatella/metadata.xml b/games-strategy/ja2-stracciatella/metadata.xml |
132 |
new file mode 100644 |
133 |
index 0000000..fe2be3c |
134 |
--- /dev/null |
135 |
+++ b/games-strategy/ja2-stracciatella/metadata.xml |
136 |
@@ -0,0 +1,16 @@ |
137 |
+<?xml version="1.0" encoding="UTF-8"?> |
138 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
139 |
+<pkgmetadata> |
140 |
+<herd>no-herd</herd> |
141 |
+<maintainer> |
142 |
+<email>azamat.hackimov@×××××.com</email> |
143 |
+<name>Azamat H. Hackimov</name> |
144 |
+</maintainer> |
145 |
+<longdescription lang="en"> |
146 |
+A port of Jagged Alliance 2 to SDL. |
147 |
+</longdescription> |
148 |
+<use> |
149 |
+<flag name='editor'>Enable editor support</flag> |
150 |
+<flag name='linguas_ru_gold'>Use Russian localization from Jagged Alliance 2: Gold edition</flag> |
151 |
+</use> |
152 |
+</pkgmetadata> |