/[gentoo-x86]/net-misc/tor/tor-0.2.3.25.ebuild
Gentoo

Contents of /net-misc/tor/tor-0.2.3.25.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (hide annotations) (download)
Sun Feb 2 12:00:30 2014 UTC (6 months, 3 weeks ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -1 lines
FILE REMOVED
Cleanup vulnerable version, bug #498760

(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)

1 vapier 1.9 # Copyright 1999-2014 Gentoo Foundation
2 blueness 1.1 # Distributed under the terms of the GNU General Public License v2
3 blueness 1.10 # $Header: /var/cvsroot/gentoo-x86/net-misc/tor/tor-0.2.3.25.ebuild,v 1.9 2014/01/08 06:31:16 vapier Exp $
4 blueness 1.1
5     EAPI="4"
6    
7 vapier 1.9 inherit eutils flag-o-matic versionator toolchain-funcs user
8 blueness 1.1
9     MY_PV="$(replace_version_separator 4 -)"
10     MY_PF="${PN}-${MY_PV}"
11     DESCRIPTION="Anonymizing overlay network for TCP"
12     HOMEPAGE="http://www.torproject.org/"
13     SRC_URI="https://archive.torproject.org/tor-package-archive/${MY_PF}.tar.gz"
14     S="${WORKDIR}/${MY_PF}"
15    
16     LICENSE="BSD GPL-2"
17     SLOT="0"
18 armin76 1.6 KEYWORDS="amd64 arm ~mips ppc ppc64 sparc x86 ~x86-fbsd"
19 blueness 1.7 IUSE="-bufferevents nat-pmp tor-hardening transparent-proxy threads upnp selinux web"
20 blueness 1.1
21     DEPEND="dev-libs/openssl
22     sys-libs/zlib
23 blueness 1.5 dev-libs/libevent
24     bufferevents? ( dev-libs/libevent[ssl] )
25 blueness 1.1 nat-pmp? ( net-libs/libnatpmp )
26     upnp? ( net-libs/miniupnpc )
27     selinux? ( sec-policy/selinux-tor )"
28     RDEPEND="${DEPEND}"
29    
30     pkg_setup() {
31     enewgroup tor
32     enewuser tor -1 -1 /var/lib/tor tor
33     }
34    
35     src_prepare() {
36     epatch "${FILESDIR}"/${PN}-0.2.3.14_alpha-torrc.sample.patch
37     }
38    
39     src_configure() {
40     # Upstream isn't sure of all the user provided CFLAGS that
41     # will break tor, but does recommend against -fstrict-aliasing.
42     # We'll filter-flags them here as we encounter them.
43     filter-flags -fstrict-aliasing
44     econf \
45     --enable-asciidoc \
46     --docdir=/usr/share/doc/${PF} \
47     $(use_enable bufferevents) \
48     $(use_enable nat-pmp) \
49     $(use_enable tor-hardening gcc-hardening) \
50     $(use_enable tor-hardening linker-hardening) \
51     $(use_enable transparent-proxy transparent) \
52     $(use_enable threads) \
53     $(use_enable upnp) \
54     $(use_enable web tor2web-mode)
55     }
56    
57     src_install() {
58     newconfd "${FILESDIR}"/tor.confd tor
59     newinitd "${FILESDIR}"/tor.initd-r6 tor
60    
61     emake DESTDIR="${D}" install
62    
63     keepdir /var/lib/tor
64    
65     dodoc README ChangeLog ReleaseNotes \
66     doc/{HACKING,TODO} \
67     doc/spec/README
68    
69     fperms 750 /var/lib/tor
70     fowners tor:tor /var/lib/tor
71    
72     insinto /etc/tor/
73     newins "${FILESDIR}"/torrc-r1 torrc
74     }
75    
76     pkg_postinst() {
77     elog
78     elog "We created a configuration file for tor, /etc/tor/torrc, but you can"
79     elog "change it according to your needs. Use the torrc.sample that is in"
80     elog "that directory as a guide. Also, to have privoxy work with tor"
81     elog "just add the following line"
82     elog
83     elog "forward-socks4a / localhost:9050 ."
84     elog
85     elog "to /etc/privoxy/config. Notice the . at the end!"
86     elog
87 blueness 1.8
88     if [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -eq 8 && $(gcc-micro-version) -ge 1 ]] ; then
89     ewarn "Due to a bug in >=gcc-4.8.1, compiling ${P} with -Os leads to an infinite"
90     ewarn "loop. See:"
91     ewarn
92     ewarn " https://trac.torproject.org/projects/tor/ticket/10259"
93     ewarn " http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59358"
94     ewarn
95     fi
96 blueness 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20