/[gentoo-x86]/games-misc/fortune-mod/fortune-mod-1.99.1-r1.ebuild
Gentoo

Contents of /games-misc/fortune-mod/fortune-mod-1.99.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Tue Mar 20 04:20:25 2007 UTC (7 years, 3 months ago) by mr_bones_
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
FILE REMOVED
old
(Portage version: 2.1.2.2)

1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/games-misc/fortune-mod/fortune-mod-1.99.1-r1.ebuild,v 1.7 2006/07/17 04:43:55 vapier Exp $
4
5 inherit eutils toolchain-funcs
6
7 DESCRIPTION="The notorious fortune program"
8 HOMEPAGE="http://www.redellipse.net/code/fortune"
9 SRC_URI="http://www.redellipse.net/code/downloads/${P}.tar.gz"
10
11 LICENSE="BSD"
12 SLOT="0"
13 KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ~ppc-macos ppc64 s390 sh sparc x86"
14 IUSE="offensive"
15
16 DEPEND="virtual/libc
17 app-text/recode"
18
19 src_unpack() {
20 unpack ${A}
21 cd ${S}
22
23 epatch ${FILESDIR}/${P}-gentoo.patch
24
25 sed -i \
26 -e 's:/games::' \
27 -e 's:/fortunes:/fortune:' \
28 -e 's:FORTDIR=$(prefix)/usr:FORTDIR=$(prefix)/usr/bin:' \
29 -e 's:^CFLAGS=.*$:CFLAGS=$(DEFINES) $(E_CFLAGS):' \
30 -e '/^all:/s:$: fortune/fortune.man:' \
31 Makefile \
32 || die "sed Makefile failed"
33 sed -i \
34 -e 's:char a, b;:short int a, b;:' util/rot.c \
35 || die "sed util/rot.c failed"
36
37 # fixes the '-m' segfault problem on _my_ computer,
38 # it might screw something else up i don't know about.
39 sed -i \
40 -e '/if (fp->utf8_charset)/{
41 N
42 /free (output);/d
43 }' fortune/fortune.c \
44 || die "sed fortune/fortune.c failed"
45 use offensive && off=1 || off=0
46 }
47
48 src_compile() {
49 emake \
50 CC=$(tc-getCC) \
51 REGEXDEFS='-DHAVE_REGEX_H -DPOSIX_REGEX'
52 E_CFLAGS="${CFLAGS}" \
53 LDFLAGS="${LDFLAGS}" \
54 OFFENSIVE="${off}" \
55 || die "emake failed"
56 }
57
58 src_install() {
59 make \
60 OFFENSIVE="${off}" \
61 prefix="${D}" \
62 install \
63 || die "make install failed"
64
65 dodoc ChangeLog INDEX Notes Offensive README TODO cookie-files
66 }

  ViewVC Help
Powered by ViewVC 1.1.20