Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-strategy/uqm/
Date: Wed, 02 May 2018 19:28:45
Message-Id: 1525289299.499ebd888ea5e7fed94e77167c1f517306ae4549.pacho@gentoo
1 commit: 499ebd888ea5e7fed94e77167c1f517306ae4549
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 2 19:20:03 2018 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Wed May 2 19:28:19 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=499ebd88
7
8 games-strategy/uqm: Stop using games.eclass
9
10 Package-Manager: Portage-2.3.31, Repoman-2.3.9
11
12 games-strategy/uqm/uqm-0.7.0-r4.ebuild | 115 +++++++++++++++++++++++++++++++++
13 1 file changed, 115 insertions(+)
14
15 diff --git a/games-strategy/uqm/uqm-0.7.0-r4.ebuild b/games-strategy/uqm/uqm-0.7.0-r4.ebuild
16 new file mode 100644
17 index 00000000000..f0413671633
18 --- /dev/null
19 +++ b/games-strategy/uqm/uqm-0.7.0-r4.ebuild
20 @@ -0,0 +1,115 @@
21 +# Copyright 1999-2018 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=6
25 +inherit desktop toolchain-funcs
26 +
27 +DESCRIPTION="The Ur-Quan Masters: Port of Star Control 2"
28 +HOMEPAGE="http://sc2.sourceforge.net/"
29 +SRC_URI="mirror://sourceforge/sc2/${P}-source.tgz
30 + mirror://sourceforge/sc2/${P}-content.uqm
31 + music? ( mirror://sourceforge/sc2/${P}-3domusic.uqm )
32 + voice? ( mirror://sourceforge/sc2/${P}-voice.uqm )
33 + remix? ( mirror://sourceforge/sc2/${PN}-remix-disc1.uqm \
34 + mirror://sourceforge/sc2/${PN}-remix-disc2.uqm \
35 + mirror://sourceforge/sc2/${PN}-remix-disc3.uqm \
36 + mirror://sourceforge/sc2/${PN}-remix-disc4.uqm )"
37 +
38 +LICENSE="GPL-2+"
39 +SLOT="0"
40 +KEYWORDS="~amd64 ~ppc64 ~x86"
41 +IUSE="music opengl remix voice"
42 +
43 +RDEPEND="
44 + media-libs/libmikmod
45 + media-libs/libogg
46 + >=media-libs/libpng-1.4:0=
47 + media-libs/libsdl[X,sound,joystick,video]
48 + media-libs/libvorbis
49 + media-libs/sdl-image[png]
50 + sys-libs/zlib
51 + opengl? ( virtual/opengl )
52 +"
53 +DEPEND="${RDEPEND}
54 + virtual/pkgconfig
55 +"
56 +
57 +src_prepare() {
58 + default
59 +
60 + local myopengl
61 +
62 + use opengl \
63 + && myopengl=opengl \
64 + || myopengl=pure
65 +
66 + eapply \
67 + "${FILESDIR}"/${P}-tempdir.patch \
68 + "${FILESDIR}"/${P}-warning.patch
69 +
70 + cat <<-EOF > config.state
71 + CHOICE_debug_VALUE='nodebug'
72 + CHOICE_graphics_VALUE='${myopengl}'
73 + CHOICE_sound_VALUE='mixsdl'
74 + CHOICE_accel_VALUE='plainc'
75 + INPUT_install_prefix_VALUE='/usr/share'
76 + INPUT_install_bindir_VALUE='\$prefix/bin'
77 + INPUT_install_libdir_VALUE='\$prefix/lib'
78 + INPUT_install_sharedir_VALUE='/usr/share/'
79 + EOF
80 +
81 + # Take out the read so we can be non-interactive.
82 + sed -i \
83 + -e '/read CHOICE/d' build/unix/menu_functions || die
84 +
85 + # respect CFLAGS
86 + sed -i \
87 + -e "s/-O3//" build/unix/build.config || die
88 +
89 + sed -i \
90 + -e "s:@INSTALL_LIBDIR@:/usr/$(get_libdir)/:g" \
91 + build/unix/uqm-wrapper.in || die
92 +
93 + # respect CC
94 + sed -i \
95 + -e "s/PROG_gcc_FILE=\"gcc\"/PROG_gcc_FILE=\"$(tc-getCC)\"/" \
96 + build/unix/config_proginfo_build || die
97 +}
98 +
99 +src_compile() {
100 + MAKE_VERBOSE=1 ./build.sh uqm || die
101 +}
102 +
103 +src_install() {
104 + # Using the included install scripts seems quite painful.
105 + # This manual install is totally fragile but maybe they'll
106 + # use a sane build system for the next release.
107 + newbin uqm-wrapper uqm
108 + exeinto /usr/"$(get_libdir)"/${PN}
109 + doexe uqm
110 +
111 + insinto /usr/share/${PN}/content/packages
112 + doins "${DISTDIR}"/${P}-content.uqm
113 + echo ${P} > "${ED}"/usr/share/${PN}/content/version || die
114 +
115 + insinto /usr/share/${PN}/content/addons
116 + if use music; then
117 + doins "${DISTDIR}"/${P}-3domusic.uqm
118 + fi
119 +
120 + if use voice; then
121 + doins "${DISTDIR}"/${P}-voice.uqm
122 + fi
123 +
124 + if use remix; then
125 + insinto /usr/share/${PN}/content/addons
126 + doins "${DISTDIR}"/${PN}-remix-disc{1,2,3,4}.uqm
127 + fi
128 +
129 + dodoc AUTHORS ChangeLog Contributing README WhatsNew doc/users/manual.txt
130 + docinto devel
131 + dodoc doc/devel/[!n]*
132 + docinto devel/netplay
133 + dodoc doc/devel/netplay/*
134 + make_desktop_entry uqm "The Ur-Quan Masters"
135 +}