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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (show annotations) (download)
Tue Feb 3 20:34:53 2015 UTC (3 months, 2 weeks ago) by tupone
Branch: MAIN
CVS Tags: HEAD
Changes since 1.12: +6 -5 lines
EAPI 5

(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 0145142D)

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-misc/fortune-mod/fortune-mod-1.99.1-r2.ebuild,v 1.12 2012/03/03 11:44:09 grobian Exp $
4
5 EAPI=5
6 inherit eutils toolchain-funcs
7
8 DESCRIPTION="The notorious fortune program"
9 HOMEPAGE="http://www.redellipse.net/code/fortune"
10 SRC_URI="http://www.redellipse.net/code/downloads/${P}.tar.gz"
11
12 LICENSE="BSD"
13 SLOT="0"
14 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
15 IUSE="offensive elibc_glibc"
16
17 DEPEND="app-text/recode"
18 RDEPEND="${DEPEND}"
19
20 src_prepare() {
21 epatch "${FILESDIR}"/${P}-gentoo.patch \
22 "${FILESDIR}"/01_all_fortune_all-fix.patch
23
24 sed -i \
25 -e 's:/games::' \
26 -e 's:/fortunes:/fortune:' \
27 -e '/^FORTDIR=/s:=.*:=$(prefix)/usr/bin:' \
28 -e '/^all:/s:$: fortune/fortune.man:' \
29 -e "/^OFFENSIVE=/s:=.*:=`use offensive && echo 1 || echo 0`:" \
30 Makefile || die "sed Makefile failed"
31
32 if ! use elibc_glibc ; then
33 [[ ${CHOST} == *-*bsd* ]] && local reglibs="-lcompat"
34 [[ ${CHOST} == *-darwin* ]] && local reglibs="-lc"
35 has_version "app-text/recode[nls]" && reglibs="${reglibs} -lintl"
36 sed -i \
37 -e "/^REGEXLIBS=/s:=.*:= ${reglibs}:" \
38 Makefile \
39 || die "sed REGEXLIBS failed"
40 fi
41 if [[ ${CHOST} == *-solaris* ]] ; then
42 sed -i -e 's:u_int:uint:g' util/strfile.h || die "sed strfile.h failed"
43 fi
44 if [[ ${CHOST} == *-darwin* ]] ; then
45 sed -i -e 's/-DBSD_REGEX/-DPOSIX_REGEX/' Makefile || die "sed Makefile failed"
46 fi
47 }
48
49 src_compile() {
50 local myrex=
51 [[ ${CHOST} == *-interix* ]] && myrex="REGEXDEFS=-DNO_REGEX"
52 emake prefix="${EPREFIX}" CC="$(tc-getCC)" $myrex
53 }
54
55 src_install() {
56 emake prefix="${ED}" install
57 dodoc ChangeLog INDEX Notes Offensive README TODO cookie-files
58 }

  ViewVC Help
Powered by ViewVC 1.1.20