/[gentoo-x86]/app-text/an/an-0.95.3.ebuild
Gentoo

Contents of /app-text/an/an-0.95.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (hide annotations) (download)
Tue Jan 31 15:00:59 2006 UTC (11 years, 10 months ago) by josejx
Branch: MAIN
Changes since 1.13: +2 -2 lines
Marked ppc stable for bug #113966.
(Portage version: 2.1_pre4-r1)

1 yoswink 1.9 # Copyright 1999-2006 Gentoo Foundation
2 jer 1.1 # Distributed under the terms of the GNU General Public License v2
3 josejx 1.14 # $Header: /var/cvsroot/gentoo-x86/app-text/an/an-0.95.3.ebuild,v 1.13 2006/01/24 19:20:00 chutzpah Exp $
4 jer 1.2
5     inherit eutils toolchain-funcs versionator
6 jer 1.1
7     DESCRIPTION="Very fast anagram generator with dictionary lookup"
8     HOMEPAGE="http://packages.debian.org/stable/games/an"
9    
10     MY_PV="$(get_version_component_range 1-2)"
11 jer 1.6 SRC_URI="mirror://debian/pool/main/a/an/${PN}_${MY_PV}.orig.tar.gz"
12 jer 1.1
13     LICENSE="GPL-2 LGPL-2"
14     SLOT="0"
15 josejx 1.14 KEYWORDS="~alpha amd64 hppa ppc ppc64 x86"
16 jer 1.1 IUSE=""
17    
18     RDEPEND="sys-apps/miscfiles"
19    
20     S="${WORKDIR}/${PN}-${MY_PV}"
21    
22     src_unpack() {
23     unpack ${A}
24     cd ${S}
25    
26     # Patching to -r3:
27     MY_PL="$(replace_version_separator 2 -)"
28 jer 1.8 epatch "${FILESDIR}"/${PN}_${MY_PL}.diff
29 jer 1.1
30     ebegin "Patching an to use toolchain and custom CFLAGS"
31     sed -e "s:gcc:$(tc-getCC):" \
32     -e "s:-O2.*:${CFLAGS}:" \
33     -i Makefile lib/Makefile
34     eend ${?}
35    
36     # sys-apps/miscfiles doesn't have /usr/dict/words:
37     sed \
38     -e 's:/usr/dict/words:/usr/share/dict/words:' \
39     -i README || die
40     }
41    
42     src_install() {
43     dobin ${PN} || die
44     doman ${PN}.6 || die
45     dodoc \
46     debian/changelog \
47     debian/README.Debian \
48     DICTIONARY \
49     EXAMPLE.ANAGRAMS \
50     HINTS \
51     INSTALL \
52     README \
53     TODO || die
54     }
55    
56     pkg_postinst() {
57 jer 1.5 if has_version sys-apps/miscfiles && \
58     built_with_use sys-apps/miscfiles minimal; then
59     ewarn "If you merged sys-apps/miscfiles with USE=minimal,"
60     ewarn "an will NOT work properly, as /usr/share/dict/words"
61     ewarn "will then be a symlink to a gzipped file. an currently"
62     ewarn "does not support gzipped dictionary files and will"
63     ewarn "only produce garbage."
64     ewarn "Do 'USE=-minimal emerge sys-apps/miscfiles', or run an"
65     ewarn "with the -d /path/to/dictionary option, perhaps using"
66     ewarn "one of the files mentioned below."
67     echo
68     fi
69 jer 1.1
70     einfo "Helpful note from an's author:"
71     einfo " If you do not have a dictionary you can obtain one from the"
72     einfo " following site: ftp://ftp.funet.fi/pub/doc/dictionaries/"
73     einfo " You will find a selection of dictionaries in many different"
74     einfo " languages here."
75     }

  ViewVC Help
Powered by ViewVC 1.1.20