/[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.11 - (show annotations) (download)
Tue Jan 24 18:20:53 2006 UTC (11 years, 11 months ago) by corsair
Branch: MAIN
Changes since 1.10: +2 -2 lines
Stable on ppc64; bug #113966
(Portage version: 2.0.54)

1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-text/an/an-0.95.3.ebuild,v 1.10 2006/01/24 18:09:17 jer Exp $
4
5 inherit eutils toolchain-funcs versionator
6
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 SRC_URI="mirror://debian/pool/main/a/an/${PN}_${MY_PV}.orig.tar.gz"
12
13 LICENSE="GPL-2 LGPL-2"
14 SLOT="0"
15 KEYWORDS="~alpha ~amd64 hppa ~ppc ppc64 ~x86"
16 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 epatch "${FILESDIR}"/${PN}_${MY_PL}.diff
29
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 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
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