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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Fri Apr 10 09:53:47 2015 UTC (3 years, 2 months ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -2 lines
Stable for amd64/x86/sparc, wrt bug #545940

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

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/tor/tor-0.2.6.7.ebuild,v 1.2 2015/04/09 17:03:04 blueness Exp $
4
5 EAPI="5"
6
7 inherit eutils flag-o-matic readme.gentoo systemd toolchain-funcs versionator user
8
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://www.torproject.org/dist/${MY_PF}.tar.gz
14 https://archive.torproject.org/tor-package-archive/${MY_PF}.tar.gz"
15 S="${WORKDIR}/${MY_PF}"
16
17 LICENSE="BSD GPL-2"
18 SLOT="0"
19 KEYWORDS="amd64 arm ~mips ppc ppc64 sparc x86"
20 IUSE="-bufferevents nat-pmp scrypt seccomp selinux stats systemd tor-hardening transparent-proxy test upnp web"
21
22 DEPEND="dev-libs/openssl
23 sys-libs/zlib
24 dev-libs/libevent
25 bufferevents? ( dev-libs/libevent[ssl] )
26 nat-pmp? ( net-libs/libnatpmp )
27 scrypt? ( app-crypt/libscrypt )
28 seccomp? ( sys-libs/libseccomp )
29 upnp? ( net-libs/miniupnpc )"
30 RDEPEND="${DEPEND}
31 selinux? ( sec-policy/selinux-tor )"
32
33 pkg_setup() {
34 enewgroup tor
35 enewuser tor -1 -1 /var/lib/tor tor
36 }
37
38 src_prepare() {
39 epatch "${FILESDIR}"/${PN}-0.2.3.14_alpha-torrc.sample.patch
40 epatch_user
41 }
42
43 src_configure() {
44 # Upstream isn't sure of all the user provided CFLAGS that
45 # will break tor, but does recommend against -fstrict-aliasing.
46 # We'll filter-flags them here as we encounter them.
47 filter-flags -fstrict-aliasing
48
49 econf \
50 --enable-system-torrc \
51 --enable-asciidoc \
52 --docdir=/usr/share/doc/${PF} \
53 $(use_enable stats instrument-downloads) \
54 $(use_enable bufferevents) \
55 $(use_enable nat-pmp) \
56 $(use_enable scrypt libscrypt) \
57 $(use_enable seccomp) \
58 $(use_enable systemd) \
59 $(use_enable tor-hardening gcc-hardening) \
60 $(use_enable tor-hardening linker-hardening) \
61 $(use_enable transparent-proxy transparent) \
62 $(use_enable upnp) \
63 $(use_enable web tor2web-mode) \
64 $(use_enable test unittests) \
65 $(use_enable test coverage)
66 }
67
68 src_install() {
69 readme.gentoo_create_doc
70
71 newconfd "${FILESDIR}"/tor.confd tor
72 newinitd "${FILESDIR}"/tor.initd-r7 tor
73 systemd_dounit "${FILESDIR}/${PN}.service"
74 systemd_dotmpfilesd "${FILESDIR}/${PN}.conf"
75
76 emake DESTDIR="${D}" install
77
78 keepdir /var/lib/tor
79
80 dodoc README ChangeLog ReleaseNotes doc/HACKING
81
82 fperms 750 /var/lib/tor
83 fowners tor:tor /var/lib/tor
84
85 insinto /etc/tor/
86 newins "${FILESDIR}"/torrc-r1 torrc
87 }
88
89 pkg_postinst() {
90 readme.gentoo_pkg_postinst
91
92 if [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -eq 8 && $(gcc-micro-version) -ge 1 ]] ; then
93 ewarn "Due to a bug in >=gcc-4.8.1, compiling ${P} with -Os leads to an infinite"
94 ewarn "loop. See:"
95 ewarn
96 ewarn " https://trac.torproject.org/projects/tor/ticket/10259"
97 ewarn " http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59358"
98 ewarn
99 fi
100 }

  ViewVC Help
Powered by ViewVC 1.1.20