/[gentoo-x86]/www-client/elinks/elinks-0.11.2-r1.ebuild
Gentoo

Contents of /www-client/elinks/elinks-0.11.2-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Fri Jun 1 12:44:48 2007 UTC (12 years, 8 months ago) by welp
Branch: MAIN
Changes since 1.2: +2 -2 lines
Stable on amd64 wrt security bug 177512
(Portage version: 2.1.2.7)

1 spock 1.1 # Copyright 1999-2007 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 welp 1.3 # $Header: /var/cvsroot/gentoo-x86/www-client/elinks/elinks-0.11.2-r1.ebuild,v 1.2 2007/06/01 12:35:35 armin76 Exp $
4 spock 1.1
5     WANT_AUTOCONF="latest"
6     WANT_AUTOMAKE="1.4"
7    
8     inherit eutils autotools flag-o-matic
9    
10     MY_P="${P/_/}"
11     DESCRIPTION="Advanced and well-established text-mode web browser"
12     HOMEPAGE="http://elinks.or.cz/"
13     SRC_URI="http://elinks.or.cz/download/${MY_P}.tar.bz2
14     http://dev.gentoo.org/~spock/portage/distfiles/elinks-0.10.4.conf.bz2"
15    
16     LICENSE="GPL-2"
17     SLOT="0"
18 welp 1.3 KEYWORDS="alpha amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc x86 ~x86-fbsd"
19 spock 1.1 IUSE="bittorrent bzip2 debug finger ftp gopher gpm guile idn ipv6 \
20     javascript lua nls nntp perl ruby ssl unicode X zlib"
21     RESTRICT="test"
22    
23     DEPEND=">=dev-libs/expat-1.95.4
24     bzip2? ( >=app-arch/bzip2-1.0.2 )
25     ssl? ( >=dev-libs/openssl-0.9.6g )
26     X? ( || ( ( x11-libs/libX11 x11-libs/libXt )
27     virtual/x11 ) )
28     zlib? ( >=sys-libs/zlib-1.1.4 )
29     lua? ( >=dev-lang/lua-5 )
30     gpm? ( >=sys-libs/ncurses-5.2 >=sys-libs/gpm-1.20.0-r5 )
31     guile? ( >=dev-scheme/guile-1.6.4-r1 )
32     idn? ( net-dns/libidn )
33     perl? ( sys-devel/libperl )
34     ruby? ( dev-lang/ruby )
35     !hppa? ( !mips? ( !alpha? ( javascript? ( dev-lang/spidermonkey ) ) ) )"
36     RDEPEND="${DEPEND}"
37    
38     S="${WORKDIR}/${MY_P}"
39    
40     pkg_setup() {
41     if use guile && has_version ">dev-scheme/guile-1.6.8" &&
42     ! built_with_use -a dev-scheme/guile deprecated discouraged; then
43     eerror "To install elinks with the 'guile' USE flag, dev-scheme/guile has to"
44     eerror "be built with 'deprecated' and 'discouraged' USE flags."
45     die "dev-scheme/guile not built with deprecated/discouraged"
46     fi
47     }
48    
49     src_unpack() {
50     unpack ${A}
51     epatch ${FILESDIR}/${PN}-0.10.4.conf-syscharset.diff
52     mv "${PN}-0.10.4.conf" "${PN}.conf"
53     if ! use ftp ; then
54     sed -i -e 's/\(.*protocol.ftp.*\)/# \1/' ${PN}.conf
55     fi
56     sed -i -e 's/\(.*set protocol.ftp.use_epsv.*\)/# \1/' ${PN}.conf
57     cd ${S}
58     epatch ${FILESDIR}/${PN}-0.11.0-gcc4-inline.patch
59     epatch ${FILESDIR}/${PN}-0.11.0-ruby.patch
60     epatch ${FILESDIR}/${PN}-0.11.1-time.patch
61     epatch ${FILESDIR}/${PN}-0.11.2-lua-5.patch
62    
63     if use lua && has_version ">=dev-lang/lua-5.1"; then
64     epatch ${FILESDIR}/${PN}-0.11.2-lua-5.1.patch
65     fi
66    
67     if use unicode ; then
68     epatch ${FILESDIR}/elinks-0.10.1-utf_8_io-default.patch
69     fi
70    
71     epatch ${FILESDIR}/elinks-po-path.patch
72     sed -i -e 's/-Werror//' configure*
73     }
74    
75     src_compile() {
76     # NOTE about GNUTSL SSL support (from the README -- 25/12/2002)
77     # As GNUTLS is not yet 100% stable and its support in ELinks is not so well
78     # tested yet, it's recommended for users to give a strong preference to OpenSSL whenever possible.
79     local myconf=""
80    
81     eautoreconf
82    
83     if use debug ; then
84     myconf="--enable-debug"
85     else
86     myconf="--enable-fastmem"
87     fi
88    
89     if use ssl ; then
90     myconf="${myconf} --with-openssl"
91     else
92     myconf="${myconf} --without-openssl --without-gnutls"
93     fi
94    
95     econf \
96     --sysconfdir=/etc/elinks \
97     --enable-leds \
98     --enable-88-colors \
99     --enable-256-colors \
100     --enable-html-highlight \
101     $(use_with gpm) \
102     $(use_with zlib) \
103     $(use_with bzip2 bzlib) \
104     $(use_with X x) \
105     $(use_with lua) \
106     $(use_with guile) \
107     $(use_with perl) \
108     $(use_with ruby) \
109     $(use_with idn) \
110     $(use_with javascript spidermonkey) \
111     $(use_enable bittorrent) \
112     $(use_enable nls) \
113     $(use_enable ipv6) \
114     $(use_enable ftp) \
115     $(use_enable gopher) \
116     $(use_enable nntp) \
117     $(use_enable finger) \
118     ${myconf} || die
119    
120     emake || die "compile problem"
121     }
122    
123     src_install() {
124     make DESTDIR="${D}" install || die
125    
126     insopts -m 644 ; insinto /etc/elinks
127     doins "${WORKDIR}"/elinks.conf
128     newins contrib/keybind-full.conf keybind-full.sample
129     newins contrib/keybind.conf keybind.conf.sample
130    
131     dodoc AUTHORS BUGS ChangeLog INSTALL NEWS README SITES THANKS TODO doc/*.*
132     docinto contrib ; dodoc contrib/{README,colws.diff,elinks[-.]vim*}
133     insinto /usr/share/doc/${PF}/contrib/lua ; doins contrib/lua/{*.lua,elinks-remote}
134     insinto /usr/share/doc/${PF}/contrib/conv ; doins contrib/conv/*.*
135     insinto /usr/share/doc/${PF}/contrib/guile ; doins contrib/guile/*.scm
136    
137     # Remove some conflicting files on OSX. The files provided by OSX 10.4
138     # are more or less the same. -- Fabian Groffen (2005-06-30)
139     rm -f "${D}"/usr/share/locale/locale.alias "${D}"/usr/lib/charset.alias
140     }
141    
142     pkg_postinst() {
143     einfo "This ebuild provides a default config for ELinks."
144     einfo "Please check /etc/elinks/elinks.conf"
145     einfo
146     einfo "You may want to convert your html.cfg and links.cfg of"
147     einfo "Links or older ELinks versions to the new ELinks elinks.conf"
148     einfo "using /usr/share/doc/${PF}/contrib/conv/conf-links2elinks.pl"
149     einfo
150     einfo "Please have a look at /etc/elinks/keybind-full.sample and"
151     einfo "/etc/elinks/keybind.conf.sample for some bindings examples."
152     einfo
153     einfo "You will have to set your TERM variable to 'xterm-256color'"
154     einfo "to be able to use 256 colors in elinks."
155     echo
156     }

  ViewVC Help
Powered by ViewVC 1.1.20