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

Contents of /net-misc/tor/tor-0.2.5.5_alpha.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Jul 29 15:29:39 2014 UTC (5 years, 1 month ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Version bump, remove older alpha

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

1 # Copyright 1999-2014 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.5.5_alpha.ebuild,v 1.2 2014/06/20 12:57:16 blueness Exp $
4
5 EAPI="5"
6
7 inherit autotools 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 ~x86-fbsd"
20 IUSE="-bufferevents +ecc nat-pmp selinux stats tor-hardening transparent-proxy threads 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 upnp? ( net-libs/miniupnpc )
28 selinux? ( sec-policy/selinux-tor )"
29 RDEPEND="${DEPEND}"
30
31 pkg_setup() {
32 enewgroup tor
33 enewuser tor -1 -1 /var/lib/tor tor
34 }
35
36 src_prepare() {
37 epatch "${FILESDIR}"/${PN}-0.2.3.14_alpha-torrc.sample.patch
38 epatch "${FILESDIR}"/${P}-fix-bufferevent-build.patch
39 eautoreconf
40 }
41
42 src_configure() {
43 # Upstream isn't sure of all the user provided CFLAGS that
44 # will break tor, but does recommend against -fstrict-aliasing.
45 # We'll filter-flags them here as we encounter them.
46 filter-flags -fstrict-aliasing
47 econf \
48 --disable-buf-freelists \
49 --enable-asciidoc \
50 --docdir=/usr/share/doc/${PF} \
51 $(use_enable stats instrument-downloads) \
52 $(use_enable bufferevents) \
53 $(use_enable ecc curve25519) \
54 $(use_enable nat-pmp) \
55 $(use_enable tor-hardening gcc-hardening) \
56 $(use_enable tor-hardening linker-hardening) \
57 $(use_enable transparent-proxy transparent) \
58 $(use_enable threads) \
59 $(use_enable upnp) \
60 $(use_enable web tor2web-mode) \
61 $(use_enable test unittests) \
62 $(use_enable test coverage)
63 }
64
65 src_test() {
66 emake check
67 }
68
69 src_install() {
70 readme.gentoo_create_doc
71
72 newconfd "${FILESDIR}"/tor.confd tor
73 newinitd "${FILESDIR}"/tor.initd-r6 tor
74 systemd_dounit "${FILESDIR}/${PN}.service"
75 systemd_dotmpfilesd "${FILESDIR}/${PN}.conf"
76
77 emake DESTDIR="${D}" install
78
79 keepdir /var/lib/tor
80
81 dodoc README ChangeLog ReleaseNotes doc/HACKING
82
83 fperms 750 /var/lib/tor
84 fowners tor:tor /var/lib/tor
85
86 insinto /etc/tor/
87 newins "${FILESDIR}"/torrc-r1 torrc
88 }
89
90 pkg_postinst() {
91 readme.gentoo_pkg_postinst
92
93 if [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -eq 8 && $(gcc-micro-version) -ge 1 ]] ; then
94 ewarn "Due to a bug in >=gcc-4.8.1, compiling ${P} with -Os leads to an infinite"
95 ewarn "loop. See:"
96 ewarn
97 ewarn " https://trac.torproject.org/projects/tor/ticket/10259"
98 ewarn " http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59358"
99 ewarn
100 fi
101 }

  ViewVC Help
Powered by ViewVC 1.1.20