1 |
commit: 15e0ad0a370365647e9fe619349ed1357f51ffca |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 2 19:03:01 2018 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 2 19:28:12 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15e0ad0a |
7 |
|
8 |
games-strategy/s25rttr: Stop using games.eclass |
9 |
|
10 |
Package-Manager: Portage-2.3.31, Repoman-2.3.9 |
11 |
|
12 |
games-strategy/s25rttr/s25rttr-0.8.1-r3.ebuild | 112 +++++++++++++++++++++++++ |
13 |
1 file changed, 112 insertions(+) |
14 |
|
15 |
diff --git a/games-strategy/s25rttr/s25rttr-0.8.1-r3.ebuild b/games-strategy/s25rttr/s25rttr-0.8.1-r3.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000000..ac9ed2e6c5f |
18 |
--- /dev/null |
19 |
+++ b/games-strategy/s25rttr/s25rttr-0.8.1-r3.ebuild |
20 |
@@ -0,0 +1,112 @@ |
21 |
+# Copyright 1999-2018 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=5 |
25 |
+inherit eutils cmake-utils gnome2-utils readme.gentoo-r1 |
26 |
+ |
27 |
+DESCRIPTION="Open Source remake of The Settlers II game (needs original game files)" |
28 |
+HOMEPAGE="http://www.siedler25.org/" |
29 |
+# no upstream source tarball yet |
30 |
+# https://bugs.launchpad.net/s25rttr/+bug/1069546 |
31 |
+SRC_URI="https://dev.gentoo.org/~hasufell/distfiles/${P}.tar.xz" |
32 |
+ |
33 |
+LICENSE="GPL-3" |
34 |
+SLOT="0" |
35 |
+KEYWORDS="~amd64 ~x86" |
36 |
+IUSE="debug" |
37 |
+ |
38 |
+RDEPEND=" |
39 |
+ 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 |
+" |
48 |
+DEPEND="${RDEPEND} |
49 |
+ sys-devel/gettext |
50 |
+" |
51 |
+ |
52 |
+PATCHES=( |
53 |
+ "${FILESDIR}"/${P}-cmake.patch |
54 |
+ "${FILESDIR}"/${P}-soundconverter.patch |
55 |
+ "${FILESDIR}"/${P}-fpic.patch |
56 |
+ "${FILESDIR}"/${P}-format.patch |
57 |
+ "${FILESDIR}"/${P}-miniupnpc-api-14.patch |
58 |
+ "${FILESDIR}"/${P}-cmake-3.patch |
59 |
+ "${FILESDIR}"/${P}-gcc6.patch |
60 |
+) |
61 |
+ |
62 |
+DOC_CONTENTS="Copy your Settlers2 game files into ~/.${PN}/S2" |
63 |
+ |
64 |
+src_configure() { |
65 |
+ local arch |
66 |
+ case ${ARCH} in |
67 |
+ amd64) |
68 |
+ arch="x86_64" ;; |
69 |
+ x86) |
70 |
+ arch="i386" ;; |
71 |
+ *) die "Architecture ${ARCH} not yet supported" ;; |
72 |
+ esac |
73 |
+ |
74 |
+ local mycmakeargs=( |
75 |
+ -DCOMPILEFOR="linux" |
76 |
+ -DCOMPILEARCH="${arch}" |
77 |
+ -DCMAKE_SKIP_RPATH=YES |
78 |
+ -DPREFIX="/usr/" |
79 |
+ -DBINDIR="/usr/bin" |
80 |
+ -DDATADIR="/usr/share" |
81 |
+ -DLIBDIR="/usr/$(get_libdir)/${PN}" |
82 |
+ -DDRIVERDIR="/usr/$(get_libdir)/${PN}" |
83 |
+ -DGAMEDIR="~/.${PN}/S2" |
84 |
+ -DBUILD_GLFW_DRIVER=OFF |
85 |
+ ) |
86 |
+ |
87 |
+ cmake-utils_src_configure |
88 |
+} |
89 |
+ |
90 |
+src_compile() { |
91 |
+ # work around some relative paths (CMAKE_IN_SOURCE_BUILD not supported) |
92 |
+ ln -s "${CMAKE_USE_DIR}"/RTTR "${CMAKE_BUILD_DIR}"/RTTR || die |
93 |
+ |
94 |
+ cmake-utils_src_compile |
95 |
+ |
96 |
+ mv "${CMAKE_USE_DIR}"/RTTR/{sound-convert,s-c_resample} "${T}"/ || die |
97 |
+} |
98 |
+ |
99 |
+src_install() { |
100 |
+ cd "${CMAKE_BUILD_DIR}" || die |
101 |
+ |
102 |
+ exeinto /usr/"$(get_libdir)"/${PN} |
103 |
+ doexe "${T}"/{sound-convert,s-c_resample} |
104 |
+ exeinto /usr/"$(get_libdir)"/${PN}/video |
105 |
+ doexe driver/video/SDL/src/libvideoSDL.so |
106 |
+ exeinto /usr/"$(get_libdir)"/${PN}/audio |
107 |
+ doexe driver/audio/SDL/src/libaudioSDL.so |
108 |
+ |
109 |
+ insinto /usr/share |
110 |
+ doins -r "${CMAKE_USE_DIR}"/RTTR |
111 |
+ dosym ./LSTS/splash.bmp /usr/share/RTTR/splash.bmp |
112 |
+ |
113 |
+ doicon -s 64 "${CMAKE_USE_DIR}"/debian/${PN}.png |
114 |
+ dobin src/s25client |
115 |
+ make_desktop_entry "s25client" "Settlers RTTR" "${PN}" |
116 |
+ |
117 |
+ dodoc RTTR/texte/{keyboardlayout.txt,readme.txt} |
118 |
+ readme.gentoo_create_doc |
119 |
+} |
120 |
+ |
121 |
+pkg_preinst() { |
122 |
+ gnome2_icon_savelist |
123 |
+} |
124 |
+ |
125 |
+pkg_postinst() { |
126 |
+ gnome2_icon_cache_update |
127 |
+ readme.gentoo_print_elog |
128 |
+} |
129 |
+ |
130 |
+pkg_postrm() { |
131 |
+ gnome2_icon_cache_update |
132 |
+} |