1 |
commit: 21ca9b105976bce57863a5868c25d076a02b0618 |
2 |
Author: Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Sep 6 16:31:37 2011 +0000 |
4 |
Commit: Azamat H. Hackimov <winterheart <AT> gentoo <DOT> ru> |
5 |
CommitDate: Tue Sep 6 16:31:37 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gamerlay.git;a=commit;h=21ca9b10 |
7 |
|
8 |
[games-strategy/openxcom] Updated 9999 and new 0.3. |
9 |
|
10 |
(Portage version: 2.1.10.11/git/Linux x86_64, RepoMan options: --force, unsigned Manifest commit) |
11 |
|
12 |
--- |
13 |
.../openxcom/files/openxcom-0.3-makefile.patch | 24 ++++++++ |
14 |
games-strategy/openxcom/openxcom-0.3.ebuild | 56 ++++++++++++++++++++ |
15 |
games-strategy/openxcom/openxcom-9999.ebuild | 39 +++++++------- |
16 |
3 files changed, 99 insertions(+), 20 deletions(-) |
17 |
|
18 |
diff --git a/games-strategy/openxcom/files/openxcom-0.3-makefile.patch b/games-strategy/openxcom/files/openxcom-0.3-makefile.patch |
19 |
new file mode 100644 |
20 |
index 0000000..f8da2b5 |
21 |
--- /dev/null |
22 |
+++ b/games-strategy/openxcom/files/openxcom-0.3-makefile.patch |
23 |
@@ -0,0 +1,24 @@ |
24 |
+diff --git a/src/Makefile b/src/Makefile |
25 |
+index f9fcc06..b455cc2 100644 |
26 |
+--- a/src/Makefile |
27 |
++++ b/src/Makefile |
28 |
+@@ -22,16 +22,15 @@ endif |
29 |
+ # Compiler settings |
30 |
+ CXXFLAGS ?= -Wall -O2 |
31 |
+ CXXFLAGS += $(addprefix -D,$(TARGET)) |
32 |
+-CXXFLAGS += `$(PKG-CONFIG) --cflags sdl yaml-cpp` |
33 |
++CXXFLAGS += $(shell $(PKG-CONFIG) --cflags sdl yaml-cpp) |
34 |
+ |
35 |
+-LDFLAGS ?= -lSDL_gfx -lSDL_mixer |
36 |
+-LDFLAGS += `$(PKG-CONFIG) --libs sdl yaml-cpp` |
37 |
++LIBS = $(shell $(PKG-CONFIG) --libs sdl yaml-cpp) -lSDL_gfx -lSDL_mixer |
38 |
+ |
39 |
+ # Rules |
40 |
+ all: $(BINDIR)$(BIN) |
41 |
+ |
42 |
+ $(BINDIR)$(BIN): $(OBJS) |
43 |
+- $(CXX) $(OBJS) $(LDFLAGS) -o $(BINDIR)$(BIN) |
44 |
++ $(CXX) $(OBJS) $(LDFLAGS) $(LIBS) -o $(BINDIR)$(BIN) |
45 |
+ |
46 |
+ $(OBJDIR)%.o:: %.cpp |
47 |
+ $(CXX) $(CXXFLAGS) -c -o $@ $< |
48 |
|
49 |
diff --git a/games-strategy/openxcom/openxcom-0.3.ebuild b/games-strategy/openxcom/openxcom-0.3.ebuild |
50 |
new file mode 100644 |
51 |
index 0000000..fda102f |
52 |
--- /dev/null |
53 |
+++ b/games-strategy/openxcom/openxcom-0.3.ebuild |
54 |
@@ -0,0 +1,56 @@ |
55 |
+# Copyright 1999-2011 Gentoo Foundation |
56 |
+# Distributed under the terms of the GNU General Public License v2 |
57 |
+# $Header: $ |
58 |
+ |
59 |
+EAPI=3 |
60 |
+ |
61 |
+inherit eutils games |
62 |
+ |
63 |
+if [[ ${PV} == "9999" ]] ; then |
64 |
+ EGIT_REPO_URI="https://github.com/SupSuper/OpenXcom.git" |
65 |
+ inherit git-2 |
66 |
+ SRC_URI="" |
67 |
+else |
68 |
+ SRC_URI="https://github.com/SupSuper/OpenXcom/tarball/v${PV} -> ${P}.tar.gz" |
69 |
+ KEYWORDS="~amd64 ~x86" |
70 |
+ S=${WORKDIR}/SupSuper-OpenXcom-1603231 # Last digit - revision |
71 |
+fi |
72 |
+ |
73 |
+DESCRIPTION="Open-source reimplementation of the original X-Com" |
74 |
+HOMEPAGE="http://openxcom.ninex.info/" |
75 |
+ |
76 |
+LICENSE="GPL-3" |
77 |
+SLOT="0" |
78 |
+IUSE="" |
79 |
+ |
80 |
+RDEPEND=">=dev-cpp/yaml-cpp-0.2.6 |
81 |
+ media-libs/libsdl |
82 |
+ >=media-libs/sdl-gfx-2.0.22 |
83 |
+ media-libs/sdl-mixer[timidity]" |
84 |
+DEPEND="${RDEPEND}" |
85 |
+ |
86 |
+src_prepare() { |
87 |
+ epatch "${FILESDIR}"/${PN}-0.3-makefile.patch |
88 |
+ sed -i -e "s:/usr/share/openxcom:${GAMES_DATADIR}/${PN}:" \ |
89 |
+ "${S}"/src/Engine/CrossPlatform.cpp || die "sed failed" |
90 |
+} |
91 |
+ |
92 |
+src_compile() { |
93 |
+ cd src |
94 |
+ emake || die "make failed" |
95 |
+} |
96 |
+ |
97 |
+src_install() { |
98 |
+ dogamesbin bin/openxcom |
99 |
+ |
100 |
+ insinto "${GAMES_DATADIR}"/${PN} |
101 |
+ doins -r bin/DATA/* |
102 |
+ dodoc README.txt |
103 |
+ |
104 |
+ prepgamesdirs |
105 |
+} |
106 |
+ |
107 |
+pkg_postinst() { |
108 |
+ elog "Copy the data files from X-COM: Enemy Unknown to" |
109 |
+ elog "${GAMES_DATADIR}/${PN}/" |
110 |
+} |
111 |
|
112 |
diff --git a/games-strategy/openxcom/openxcom-9999.ebuild b/games-strategy/openxcom/openxcom-9999.ebuild |
113 |
index 0a6b5ed..fda102f 100644 |
114 |
--- a/games-strategy/openxcom/openxcom-9999.ebuild |
115 |
+++ b/games-strategy/openxcom/openxcom-9999.ebuild |
116 |
@@ -2,40 +2,40 @@ |
117 |
# Distributed under the terms of the GNU General Public License v2 |
118 |
# $Header: $ |
119 |
|
120 |
-EAPI="3" |
121 |
+EAPI=3 |
122 |
|
123 |
-inherit eutils games git |
124 |
+inherit eutils games |
125 |
+ |
126 |
+if [[ ${PV} == "9999" ]] ; then |
127 |
+ EGIT_REPO_URI="https://github.com/SupSuper/OpenXcom.git" |
128 |
+ inherit git-2 |
129 |
+ SRC_URI="" |
130 |
+else |
131 |
+ SRC_URI="https://github.com/SupSuper/OpenXcom/tarball/v${PV} -> ${P}.tar.gz" |
132 |
+ KEYWORDS="~amd64 ~x86" |
133 |
+ S=${WORKDIR}/SupSuper-OpenXcom-1603231 # Last digit - revision |
134 |
+fi |
135 |
|
136 |
DESCRIPTION="Open-source reimplementation of the original X-Com" |
137 |
HOMEPAGE="http://openxcom.ninex.info/" |
138 |
-EGIT_REPO_URI="https://github.com/SupSuper/OpenXcom.git" |
139 |
-#SRC_URI="" |
140 |
|
141 |
LICENSE="GPL-3" |
142 |
SLOT="0" |
143 |
-KEYWORDS="" |
144 |
IUSE="" |
145 |
|
146 |
-RDEPEND="dev-cpp/yaml-cpp |
147 |
+RDEPEND=">=dev-cpp/yaml-cpp-0.2.6 |
148 |
media-libs/libsdl |
149 |
>=media-libs/sdl-gfx-2.0.22 |
150 |
- media-libs/sdl-mixer" |
151 |
+ media-libs/sdl-mixer[timidity]" |
152 |
DEPEND="${RDEPEND}" |
153 |
|
154 |
-S=${WORKDIR}/trunk |
155 |
- |
156 |
src_prepare() { |
157 |
-# epatch "${FILESDIR}"/Makefile.pkg-config.patch |
158 |
- sed -i \ |
159 |
- -e "s:\(CXXFLAGS \)=:\1+=:" \ |
160 |
- -e "s:\(LDFLAGS \)=:\1+=:" \ |
161 |
- "${S}"/src/Makefile || die "sed failed" |
162 |
- sed -i -e "s:\(#define DATA_FOLDER \)\"./DATA/\":\1\"${GAMES_DATADIR}/${PN}/DATA/\":" \ |
163 |
- "${S}"/src/Menu/StartState.cpp || die "sed failed" |
164 |
+ epatch "${FILESDIR}"/${PN}-0.3-makefile.patch |
165 |
+ sed -i -e "s:/usr/share/openxcom:${GAMES_DATADIR}/${PN}:" \ |
166 |
+ "${S}"/src/Engine/CrossPlatform.cpp || die "sed failed" |
167 |
} |
168 |
|
169 |
src_compile() { |
170 |
- mkdir obj |
171 |
cd src |
172 |
emake || die "make failed" |
173 |
} |
174 |
@@ -43,9 +43,8 @@ src_compile() { |
175 |
src_install() { |
176 |
dogamesbin bin/openxcom |
177 |
|
178 |
- insinto "${GAMES_DATADIR}"/${PN}/DATA |
179 |
+ insinto "${GAMES_DATADIR}"/${PN} |
180 |
doins -r bin/DATA/* |
181 |
- |
182 |
dodoc README.txt |
183 |
|
184 |
prepgamesdirs |
185 |
@@ -53,5 +52,5 @@ src_install() { |
186 |
|
187 |
pkg_postinst() { |
188 |
elog "Copy the data files from X-COM: Enemy Unknown to" |
189 |
- elog "${GAMES_DATADIR}/${PN}/DATA/" |
190 |
+ elog "${GAMES_DATADIR}/${PN}/" |
191 |
} |