diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2011-03-25 03:02:12 +0000 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2011-03-25 03:02:12 +0000 |
commit | 8b446f9a7f8ef54ef93b9eb15fb5e147549e6d0c (patch) | |
tree | bd17ca90ddba4c33cca43bd4f92474976135a512 /net-misc/tor | |
parent | Version bump (diff) | |
download | gentoo-2-8b446f9a7f8ef54ef93b9eb15fb5e147549e6d0c.tar.gz gentoo-2-8b446f9a7f8ef54ef93b9eb15fb5e147549e6d0c.tar.bz2 gentoo-2-8b446f9a7f8ef54ef93b9eb15fb5e147549e6d0c.zip |
Fixed build system to fully respect CFLAGS
(Portage version: 2.1.9.42/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/tor')
-rw-r--r-- | net-misc/tor/ChangeLog | 9 | ||||
-rw-r--r-- | net-misc/tor/files/tor-0.2.2.23_alpha-respect-CFLAGS.patch | 22 | ||||
-rw-r--r-- | net-misc/tor/tor-0.2.2.23_alpha-r1.ebuild | 84 |
3 files changed, 114 insertions, 1 deletions
diff --git a/net-misc/tor/ChangeLog b/net-misc/tor/ChangeLog index 607ea3b8532d..8b435821b55e 100644 --- a/net-misc/tor/ChangeLog +++ b/net-misc/tor/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-misc/tor # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/tor/ChangeLog,v 1.245 2011/03/25 01:35:22 blueness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/tor/ChangeLog,v 1.246 2011/03/25 03:02:12 blueness Exp $ + +*tor-0.2.2.23_alpha-r1 (25 Mar 2011) + + 25 Mar 2011; Anthony G. Basile <blueness@gentoo.org> + +tor-0.2.2.23_alpha-r1.ebuild, + +files/tor-0.2.2.23_alpha-respect-CFLAGS.patch: + Fixed build system to fully respect CFLAGS 25 Mar 2011; Anthony G. Basile <blueness@gentoo.org> tor-0.2.2.23_alpha.ebuild: diff --git a/net-misc/tor/files/tor-0.2.2.23_alpha-respect-CFLAGS.patch b/net-misc/tor/files/tor-0.2.2.23_alpha-respect-CFLAGS.patch new file mode 100644 index 000000000000..0ca78a815167 --- /dev/null +++ b/net-misc/tor/files/tor-0.2.2.23_alpha-respect-CFLAGS.patch @@ -0,0 +1,22 @@ +diff -Naur tor-0.2.2.23-alpha.orig/configure.in tor-0.2.2.23-alpha/configure.in +--- tor-0.2.2.23-alpha.orig/configure.in 2011-03-08 18:38:16.000000000 -0500 ++++ tor-0.2.2.23-alpha/configure.in 2011-03-24 19:09:33.000000000 -0400 +@@ -9,6 +9,9 @@ + + AC_CANONICAL_HOST + ++GENTOO_CFLAGS="$CFLAGS" ++GENTOO_LDFLAGS="$LDFLAGS" ++ + if test -f /etc/redhat-release ; then + if test -f /usr/kerberos/include ; then + CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" +@@ -945,6 +948,8 @@ + + + CPPFLAGS="$CPPFLAGS $TOR_CPPFLAGS_libevent $TOR_CPPFLAGS_openssl $TOR_CPPFLAGS_zlib" ++CFLAGS="$CFLAGS $GENTOO_CFLAGS" ++LDFLAGS="$LDFLAGS $GENTOO_LDFLAGS" + + AC_CONFIG_FILES([Makefile tor.spec Doxyfile contrib/tor.sh contrib/torctl contrib/torify contrib/tor.logrotate contrib/Makefile src/config/torrc.sample src/Makefile doc/Makefile src/config/Makefile src/common/Makefile src/or/Makefile src/test/Makefile src/win32/Makefile src/tools/Makefile contrib/suse/Makefile contrib/suse/tor.sh]) + AC_OUTPUT diff --git a/net-misc/tor/tor-0.2.2.23_alpha-r1.ebuild b/net-misc/tor/tor-0.2.2.23_alpha-r1.ebuild new file mode 100644 index 000000000000..7131dc93733f --- /dev/null +++ b/net-misc/tor/tor-0.2.2.23_alpha-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/tor/tor-0.2.2.23_alpha-r1.ebuild,v 1.1 2011/03/25 03:02:12 blueness Exp $ + +EAPI=3 + +inherit autotools eutils flag-o-matic versionator + +MY_PV="$(replace_version_separator 4 -)" +MY_PF="${PN}-${MY_PV}" +DESCRIPTION="Anonymizing overlay network for TCP" +HOMEPAGE="http://www.torproject.org/" +SRC_URI="http://www.torproject.org/dist/${MY_PF}.tar.gz" +S="${WORKDIR}/${MY_PF}" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="" + +DEPEND="dev-libs/openssl + >=dev-libs/libevent-2.0" +# The tordns patch for tsocks avoids some leakage of information thus raising anonymity +RDEPEND="${DEPEND} + net-proxy/tsocks[tordns]" + +pkg_setup() { + enewgroup tor + enewuser tor -1 -1 /var/lib/tor tor +} + +src_prepare() { + epatch "${FILESDIR}"/torrc.sample-0.1.2.6.patch + epatch "${FILESDIR}"/${PN}-0.2.1.19-logrotate.patch + + einfo "Regenerating autotools files ..." + epatch "${FILESDIR}"/${PN}-0.2.2.23_alpha-respect-CFLAGS.patch + eautoreconf || die "eautoreconf failed" +} + +src_configure() { + # Upstream isn't sure of all the user provided CFLAGS that + # will break tor, but does recommend against -fstrict-aliasing. + # We'll filter-flags them here as we encounter them. + filter-flags -fstrict-aliasing + econf --docdir=/usr/share/doc/${PF} +} + +src_install() { + newinitd "${FILESDIR}"/tor.initd-r4 tor + emake DESTDIR="${D}" install || die + keepdir /var/{lib,log,run}/tor + + dodoc README ChangeLog ReleaseNotes \ + doc/{HACKING,TODO} \ + doc/spec/*.txt + + fperms 750 /var/lib/tor /var/log/tor + fperms 755 /var/run/tor + fowners tor:tor /var/lib/tor /var/log/tor /var/run/tor + + insinto /etc/tor/ + doins "${FILESDIR}"/torrc + + insinto /etc/logrotate.d + newins contrib/tor.logrotate tor + + # allow the tor user more open files to avoid errors, see bug 251171 + insinto /etc/security/limits.d/ + doins "${FILESDIR}"/tor.conf +} + +pkg_postinst() { + elog + elog "We created a configuration file for tor, /etc/tor/torrc, but you can" + elog "change it according to your needs. Use the torrc.sample that is in" + elog "that directory as a guide. Also, to have privoxy work with tor" + elog "just add the following line" + elog + elog "forward-socks4a / localhost:9050 ." + elog + elog "to /etc/privoxy/config. Notice the . at the end!" + elog +} |