/[gentoo-x86]/games-puzzle/sgt-puzzles/sgt-puzzles-9861.ebuild
Gentoo

Contents of /games-puzzle/sgt-puzzles/sgt-puzzles-9861.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sun Apr 26 16:00:09 2015 UTC (4 years, 5 months ago) by pacho
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -2 lines
x86 stable wrt bug #547136

(Portage version: 2.2.18/cvs/Linux x86_64, RepoMan options: --include-arches="x86", signed Manifest commit with key A188FBD4)

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-puzzle/sgt-puzzles/sgt-puzzles-9861.ebuild,v 1.2 2015/04/20 07:38:29 ago Exp $
4
5 EAPI=5
6 inherit eutils gnome2-utils toolchain-funcs games
7 if [[ ${PV} == "99999999" ]] ; then
8 ESVN_REPO_URI="svn://svn.tartarus.org/sgt/puzzles"
9 inherit subversion
10 SRC_URI=""
11 KEYWORDS=""
12 else
13 SRC_URI="http://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles-r${PV}.tar.gz"
14 S=${WORKDIR}/puzzles-r${PV}
15 KEYWORDS="amd64 x86"
16 fi
17
18 DESCRIPTION="Simon Tatham's Portable Puzzle Collection"
19 HOMEPAGE="http://www.chiark.greenend.org.uk/~sgtatham/puzzles/"
20
21 LICENSE="MIT"
22 SLOT="0"
23 IUSE="doc"
24
25 RDEPEND="x11-libs/gtk+:2"
26 DEPEND="${RDEPEND}
27 dev-lang/perl
28 virtual/pkgconfig
29 doc? ( >=app-doc/halibut-1.0 )"
30
31 src_prepare() {
32 epatch "${FILESDIR}"/${P}-gentoo.patch
33 ./mkfiles.pl
34 sed -i \
35 -e 's:= -O2 -Wall -Werror -ansi -pedantic -g:= $(CPPFLAGS):' \
36 -e '/LDFLAGS/s:=:=$(LDFLAGS) :' \
37 Makefile || die
38 }
39
40 src_compile() {
41 emake CC="$(tc-getCC)"
42 if use doc ; then
43 halibut --text --html --info --pdf --ps puzzles.but
44 fi
45 }
46
47 src_install() {
48 dodir "${GAMES_BINDIR}"
49 emake DESTDIR="${D}" gamesdir="${GAMES_BINDIR}" install
50 dodoc README HACKING
51
52 local file name
53 for file in *.R ; do
54 [[ ${file} == "nullgame.R" ]] && continue
55 name=$(awk -F: '/exe:/ { print $3 }' "${file}")
56 file=${file%.R}
57 if [[ ${PV} -lt 99999999 ]] ; then
58 newicon -s 48 icons/${file}-48d24.png ${PN}-${file}.png
59 make_desktop_entry "${GAMES_BINDIR}/${file}" "${name}" "${PN}-${file}"
60 else
61 # No icons with the live version
62 make_desktop_entry "${GAMES_BINDIR}/${file}" "${name}"
63 fi
64 done
65
66 dodoc puzzles.txt puzzles.chm
67 if use doc ; then
68 dohtml *.html
69 doinfo puzzles.info
70 dodoc puzzles.pdf puzzles.ps
71 fi
72
73 prepgamesdirs
74 }
75
76 pkg_preinst() {
77 games_pkg_preinst
78 [[ ${PV} -lt 99999999 ]] && gnome2_icon_savelist
79 }
80
81 pkg_postinst() {
82 games_pkg_postinst
83 [[ ${PV} -lt 99999999 ]] && gnome2_icon_cache_update
84 }
85
86 pkg_postrm() {
87 [[ ${PV} -lt 99999999 ]] && gnome2_icon_cache_update
88 }

  ViewVC Help
Powered by ViewVC 1.1.20