diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2006-05-05 19:58:41 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2006-05-05 19:58:41 +0000 |
commit | 006f493671a9ce675b91a21b5e2d1812c7bcb8bb (patch) | |
tree | 0a031d225bc8f657519f3189713dbdb55c18f2b7 /net-p2p/rtorrent | |
parent | Stable on amd64 wrt Bug #121558. (diff) | |
download | gentoo-2-006f493671a9ce675b91a21b5e2d1812c7bcb8bb.tar.gz gentoo-2-006f493671a9ce675b91a21b5e2d1812c7bcb8bb.tar.bz2 gentoo-2-006f493671a9ce675b91a21b5e2d1812c7bcb8bb.zip |
Update patch for GCC 4.1 from upstream.
(Portage version: 2.1_pre10-r2)
Diffstat (limited to 'net-p2p/rtorrent')
-rw-r--r-- | net-p2p/rtorrent/ChangeLog | 7 | ||||
-rw-r--r-- | net-p2p/rtorrent/files/rtorrent-0.5.1-template.patch | 67 | ||||
-rw-r--r-- | net-p2p/rtorrent/rtorrent-0.5.1.ebuild | 5 |
3 files changed, 75 insertions, 4 deletions
diff --git a/net-p2p/rtorrent/ChangeLog b/net-p2p/rtorrent/ChangeLog index df0511b230ee..872ca110dc90 100644 --- a/net-p2p/rtorrent/ChangeLog +++ b/net-p2p/rtorrent/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for net-p2p/rtorrent # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/ChangeLog,v 1.43 2006/05/05 09:24:37 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/ChangeLog,v 1.44 2006/05/05 19:58:41 flameeyes Exp $ + + 05 May 2006; Diego Pettenò <flameeyes@gentoo.org> + -files/rtorrent-0.5.1-build.patch, +files/rtorrent-0.5.1-template.patch, + rtorrent-0.5.1.ebuild: + Update patch for GCC 4.1 from upstream. *rtorrent-0.5.1 (05 May 2006) diff --git a/net-p2p/rtorrent/files/rtorrent-0.5.1-template.patch b/net-p2p/rtorrent/files/rtorrent-0.5.1-template.patch new file mode 100644 index 000000000000..1b17cc9a7dfd --- /dev/null +++ b/net-p2p/rtorrent/files/rtorrent-0.5.1-template.patch @@ -0,0 +1,67 @@ +Index: rtorrent/rak/functional_fun.h +=================================================================== +--- rtorrent/rak/functional_fun.h (revision 682) ++++ rtorrent/rak/functional_fun.h (working copy) +@@ -343,34 +343,44 @@ + return new value_fn0_t<Result>(val); + } + ++template <typename A, typename B> ++struct equal_types_t { ++ typedef A first_type; ++ typedef B second_type; ++ ++ const static int result = 0; ++}; ++ ++template <typename A> ++struct equal_types_t<A, A> { ++ typedef A first_type; ++ typedef A second_type; ++ ++ const static int result = 1; ++}; ++ + template <typename Result, typename SrcResult> + inline function_base0<Result>* + convert_fn(function_base0<SrcResult>* src) { +- return new convert_fn0_t<Result, SrcResult>(src); ++ if (equal_types_t<function_base0<Result>, function_base0<SrcResult> >::result) ++ // The pointer cast never gets done if the types are different, ++ // but needs to be here to pleasant the compiler. ++ return reinterpret_cast<typename equal_types_t<function_base0<Result>, function_base0<SrcResult> >::first_type*>(src); ++ else ++ return new convert_fn0_t<Result, SrcResult>(src); + } + +-// This overload ensures that if we try to convert to the same type, +-// it will optimize away the unneeded layer. +-template <typename Result> +-inline function_base0<Result>* +-convert_fn(function_base0<Result>* src) { +- return src; +-} +- + template <typename Result, typename Arg1, typename SrcResult, typename SrcArg1> + inline function_base1<Result, Arg1>* + convert_fn(function_base1<SrcResult, SrcArg1>* src) { +- return new convert_fn1_t<Result, Arg1, SrcResult, SrcArg1>(src); ++ if (equal_types_t<function_base1<Result, Arg1>, function_base1<SrcResult, SrcArg1> >::result) ++ // The pointer cast never gets done if the types are different, ++ // but needs to be here to pleasant the compiler. ++ return reinterpret_cast<typename equal_types_t<function_base1<Result, Arg1>, function_base1<SrcResult, SrcArg1> >::first_type*>(src); ++ else ++ return new convert_fn1_t<Result, Arg1, SrcResult, SrcArg1>(src); + } + +-// This overload ensures that if we try to convert to the same type, +-// it will optimize away the unneeded layer. +-template <typename Result, typename Arg1> +-inline function_base1<Result, Arg1>* +-convert_fn(function_base1<Result, Arg1>* src) { +- return src; + } + +-} +- + #endif diff --git a/net-p2p/rtorrent/rtorrent-0.5.1.ebuild b/net-p2p/rtorrent/rtorrent-0.5.1.ebuild index f4ca684133d0..682673797627 100644 --- a/net-p2p/rtorrent/rtorrent-0.5.1.ebuild +++ b/net-p2p/rtorrent/rtorrent-0.5.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/rtorrent-0.5.1.ebuild,v 1.1 2006/05/05 09:24:37 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/rtorrent-0.5.1.ebuild,v 1.2 2006/05/05 19:58:41 flameeyes Exp $ inherit eutils toolchain-funcs flag-o-matic @@ -22,8 +22,7 @@ src_unpack() { unpack ${A} cd "${S}" - [[ $(gcc-major-version)$(gcc-minor-version) -ge "41" ]] && \ - epatch "${FILESDIR}/${P}-build.patch" + epatch "${FILESDIR}/${P}-template.patch" } src_compile() { |