1 |
commit: baf6a7f2c6be28890e17269527505c8c19c9c764 |
2 |
Author: Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 3 19:27:39 2016 +0000 |
4 |
Commit: Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 3 19:57:05 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=baf6a7f2 |
7 |
|
8 |
games-strategy/s25rttr: rev bump to remove glfw support since this is the last customer in the tree for glfw-2 |
9 |
|
10 |
Package-Manager: portage-2.2.26 |
11 |
|
12 |
games-strategy/s25rttr/s25rttr-0.8.1-r2.ebuild | 110 +++++++++++++++++++++++++ |
13 |
1 file changed, 110 insertions(+) |
14 |
|
15 |
diff --git a/games-strategy/s25rttr/s25rttr-0.8.1-r2.ebuild b/games-strategy/s25rttr/s25rttr-0.8.1-r2.ebuild |
16 |
new file mode 100644 |
17 |
index 0000000..b53858b |
18 |
--- /dev/null |
19 |
+++ b/games-strategy/s25rttr/s25rttr-0.8.1-r2.ebuild |
20 |
@@ -0,0 +1,110 @@ |
21 |
+# Copyright 1999-2016 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI=5 |
26 |
+inherit eutils cmake-utils gnome2-utils games |
27 |
+ |
28 |
+DESCRIPTION="Open Source remake of The Settlers II game (needs original game files)" |
29 |
+HOMEPAGE="http://www.siedler25.org/" |
30 |
+# no upstream source tarball yet |
31 |
+# https://bugs.launchpad.net/s25rttr/+bug/1069546 |
32 |
+SRC_URI="https://dev.gentoo.org/~hasufell/distfiles/${P}.tar.xz" |
33 |
+ |
34 |
+LICENSE="GPL-3" |
35 |
+SLOT="0" |
36 |
+KEYWORDS="~amd64 ~x86" |
37 |
+IUSE="debug" |
38 |
+ |
39 |
+RDEPEND="app-arch/bzip2 |
40 |
+ media-libs/libsamplerate |
41 |
+ media-libs/libsdl[X,sound,opengl,video] |
42 |
+ media-libs/libsndfile |
43 |
+ media-libs/sdl-mixer[vorbis] |
44 |
+ net-libs/miniupnpc |
45 |
+ virtual/libiconv |
46 |
+ virtual/opengl" |
47 |
+DEPEND="${RDEPEND} |
48 |
+ sys-devel/gettext" |
49 |
+ |
50 |
+src_prepare() { |
51 |
+ epatch "${FILESDIR}"/${P}-cmake.patch \ |
52 |
+ "${FILESDIR}"/${P}-soundconverter.patch \ |
53 |
+ "${FILESDIR}"/${P}-fpic.patch \ |
54 |
+ "${FILESDIR}"/${P}-format.patch \ |
55 |
+ "${FILESDIR}"/${P}-miniupnpc-api-14.patch \ |
56 |
+ "${FILESDIR}"/${P}-cmake-3.patch |
57 |
+} |
58 |
+ |
59 |
+src_configure() { |
60 |
+ local arch |
61 |
+ case ${ARCH} in |
62 |
+ amd64) |
63 |
+ arch="x86_64" ;; |
64 |
+ x86) |
65 |
+ arch="i386" ;; |
66 |
+ *) die "Architecture ${ARCH} not yet supported" ;; |
67 |
+ esac |
68 |
+ |
69 |
+ local mycmakeargs=( |
70 |
+ -DCOMPILEFOR="linux" |
71 |
+ -DCOMPILEARCH="${arch}" |
72 |
+ -DCMAKE_SKIP_RPATH=YES |
73 |
+ -DPREFIX="${GAMES_PREFIX}" |
74 |
+ -DBINDIR="${GAMES_BINDIR}" |
75 |
+ -DDATADIR="${GAMES_DATADIR}" |
76 |
+ -DLIBDIR="$(games_get_libdir)/${PN}" |
77 |
+ -DDRIVERDIR="$(games_get_libdir)/${PN}" |
78 |
+ -DGAMEDIR="~/.${PN}/S2" |
79 |
+ -DBUILD_GLFW_DRIVER=OFF |
80 |
+ ) |
81 |
+ |
82 |
+ cmake-utils_src_configure |
83 |
+} |
84 |
+ |
85 |
+src_compile() { |
86 |
+ # work around some relative paths (CMAKE_IN_SOURCE_BUILD not supported) |
87 |
+ ln -s "${CMAKE_USE_DIR}"/RTTR "${CMAKE_BUILD_DIR}"/RTTR || die |
88 |
+ |
89 |
+ cmake-utils_src_compile |
90 |
+ |
91 |
+ mv "${CMAKE_USE_DIR}"/RTTR/{sound-convert,s-c_resample} "${T}"/ || die |
92 |
+} |
93 |
+ |
94 |
+src_install() { |
95 |
+ cd "${CMAKE_BUILD_DIR}" || die |
96 |
+ |
97 |
+ exeinto "$(games_get_libdir)"/${PN} |
98 |
+ doexe "${T}"/{sound-convert,s-c_resample} |
99 |
+ exeinto "$(games_get_libdir)"/${PN}/video |
100 |
+ doexe driver/video/SDL/src/libvideoSDL.so |
101 |
+ exeinto "$(games_get_libdir)"/${PN}/audio |
102 |
+ doexe driver/audio/SDL/src/libaudioSDL.so |
103 |
+ |
104 |
+ insinto "${GAMES_DATADIR}" |
105 |
+ doins -r "${CMAKE_USE_DIR}"/RTTR |
106 |
+ dosym ./LSTS/splash.bmp "${GAMES_DATADIR}"/RTTR/splash.bmp |
107 |
+ |
108 |
+ doicon -s 64 "${CMAKE_USE_DIR}"/debian/${PN}.png |
109 |
+ dogamesbin src/s25client |
110 |
+ make_desktop_entry "s25client" "Settlers RTTR" "${PN}" |
111 |
+ dodoc RTTR/texte/{keyboardlayout.txt,readme.txt} |
112 |
+ |
113 |
+ prepgamesdirs |
114 |
+} |
115 |
+ |
116 |
+pkg_preinst() { |
117 |
+ games_pkg_preinst |
118 |
+ gnome2_icon_savelist |
119 |
+} |
120 |
+ |
121 |
+pkg_postinst() { |
122 |
+ games_pkg_postinst |
123 |
+ elog "Copy your Settlers2 game files into ~/.${PN}/S2" |
124 |
+ |
125 |
+ gnome2_icon_cache_update |
126 |
+} |
127 |
+ |
128 |
+pkg_postrm() { |
129 |
+ gnome2_icon_cache_update |
130 |
+} |