/[gentoo-x86]/games-strategy/freecnc/freecnc-0.2.1.31072003.ebuild
Gentoo

Contents of /games-strategy/freecnc/freecnc-0.2.1.31072003.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.20 - (show annotations) (download)
Thu May 21 05:40:52 2015 UTC (3 years, 2 months ago) by mr_bones_
Branch: MAIN
CVS Tags: HEAD
Changes since 1.19: +1 -1 lines
FILE REMOVED
games-strategy/freecnc is gone

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/games-strategy/freecnc/freecnc-0.2.1.31072003.ebuild,v 1.19 2015/03/25 06:29:36 mr_bones_ Exp $
4
5 EAPI=5
6 inherit flag-o-matic eutils games
7
8 DESCRIPTION="SDL-rewrite of the classical real time strategy hit Command & Conquer"
9 HOMEPAGE="http://www.freecnc.org/"
10 #mirror://sourceforge/freecnc/freecnc++-${PV}-src.tar.bz2
11 SRC_URI="mirror://gentoo/freecnc++-${PV}-src.tar.bz2
12 nocd? ( ftp://ftp.westwood.com/pub/cc1/previews/demo/cc1demo1.zip
13 ftp://ftp.westwood.com/pub/cc1/previews/demo/cc1demo2.zip )"
14
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS="~ppc x86"
18 IUSE="nocd"
19
20 RDEPEND="media-libs/libsdl[sound,video]
21 media-libs/sdl-net"
22 DEPEND="${RDEPEND}
23 app-arch/unzip"
24
25 S=${WORKDIR}/freecnc++
26
27 src_unpack() {
28 unpack freecnc++-${PV}-src.tar.bz2
29 if use nocd ; then
30 mkdir data && cd data || die
31 unpack cc1demo1.zip cc1demo2.zip
32 for f in * ; do
33 mv ${f} $(echo ${f} | awk '{print tolower($1)}') || die
34 done
35 fi
36 }
37
38 src_prepare() {
39 epatch \
40 "${FILESDIR}"/${PV}-makefile-cflags.patch \
41 "${FILESDIR}"/${PV}-remove-root.patch \
42 "${FILESDIR}"/${PV}-gentoo-paths.patch \
43 "${FILESDIR}"/${P}-gcc4.patch \
44 "${FILESDIR}"/${P}-gcc42.patch \
45 "${FILESDIR}"/${P}-glibc2.10.patch \
46 "${FILESDIR}"/${P}-as-needed.patch \
47 "${FILESDIR}"/${P}-underlink.patch
48 sed -i \
49 -e "s:GENTOO_LOGDIR:${GAMES_LOGDIR}:" \
50 -e "s:GENTOO_CONFDIR:${GAMES_SYSCONFDIR}/${PN}/:" \
51 -e "s:GENTOO_DATADIR:${GAMES_DATADIR}/${PN}/:" \
52 src/{freecnc,vfs/vfs}.cpp tools/audplay/audplay.cpp || die
53 sed -i \
54 -e 's/-Werror//' \
55 -e 's/ -j2//' \
56 $(grep -rl Werror .) || die
57 sed -i \
58 -e '/^DEBUG_FLAGS/s/$/ -fPIC/' \
59 src/vfs/vfs_tgz/Makefile \
60 src/vfs/vfs_mix/Makefile || die
61 }
62
63 src_compile() {
64 emake linux EXTRACFLAGS="${CFLAGS}"
65 }
66
67 src_install() {
68 exeinto "$(games_get_libdir)"/${PN}
69 doexe freecnc *.vfs audplay shpview tmpinied
70 games_make_wrapper ${PN} ./freecnc "$(games_get_libdir)"/${PN}
71 insinto "${GAMES_DATADIR}"/${PN}/conf
72 doins conf/*
73 insinto "${GAMES_SYSCONFDIR}"/${PN}
74 doins conf/*
75 dodoc AUTHORS ChangeLog NEWS README THANKS TODO
76 if use nocd ; then
77 cd "${WORKDIR}"/data
78 insinto "${GAMES_DATADIR}"/${PN}
79 doins *.mix *.aud
80 dodoc *.txt
81 fi
82 prepgamesdirs
83 }
84
85 pkg_postinst() {
86 games_pkg_postinst
87 if ! use nocd ; then
88 elog "If you have the C&C games, then just copy the .mix"
89 elog "to ${GAMES_DATADIR}/${PN}"
90 elog "Otherwise, re-emerge freecnc with 'nocd' in your USE."
91 fi
92 }

  ViewVC Help
Powered by ViewVC 1.1.20