summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-02-19 08:18:47 +0000
committerZac Medico <zmedico@gentoo.org>2012-02-19 08:18:47 +0000
commit1fc5f90f45cca8f257204e7641bee6e7581aeea5 (patch)
treef4457d9224b98579e8b78fbd2e8b6304e06fca60 /dev-vcs/monotone
parentNew ebuild (closes bug 307411). (diff)
downloadgentoo-2-1fc5f90f45cca8f257204e7641bee6e7581aeea5.tar.gz
gentoo-2-1fc5f90f45cca8f257204e7641bee6e7581aeea5.tar.bz2
gentoo-2-1fc5f90f45cca8f257204e7641bee6e7581aeea5.zip
Add patch to fix struct file_handle name collision with glibc-2.14 for bug #396651.
(Portage version: 2.2.0_alpha87/cvs/Linux i686)
Diffstat (limited to 'dev-vcs/monotone')
-rw-r--r--dev-vcs/monotone/ChangeLog7
-rw-r--r--dev-vcs/monotone/files/monotone-1.0-glibc-2.14-file-handle.patch166
-rw-r--r--dev-vcs/monotone/monotone-1.0-r3.ebuild3
3 files changed, 174 insertions, 2 deletions
diff --git a/dev-vcs/monotone/ChangeLog b/dev-vcs/monotone/ChangeLog
index 24256ee90626..87b18b0c295a 100644
--- a/dev-vcs/monotone/ChangeLog
+++ b/dev-vcs/monotone/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-vcs/monotone
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-vcs/monotone/ChangeLog,v 1.21 2012/01/01 01:13:34 idl0r Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/monotone/ChangeLog,v 1.22 2012/02/19 08:18:47 zmedico Exp $
+
+ 19 Feb 2012; Zac Medico <zmedico@gentoo.org>
+ +files/monotone-1.0-glibc-2.14-file-handle.patch, monotone-1.0-r3.ebuild:
+ Add patch to fix struct file_handle name collision with glibc-2.14 for bug
+ #396651.
*monotone-1.0-r3 (01 Jan 2012)
*monotone-1.0-r2 (01 Jan 2012)
diff --git a/dev-vcs/monotone/files/monotone-1.0-glibc-2.14-file-handle.patch b/dev-vcs/monotone/files/monotone-1.0-glibc-2.14-file-handle.patch
new file mode 100644
index 000000000000..a6e282232223
--- /dev/null
+++ b/dev-vcs/monotone/files/monotone-1.0-glibc-2.14-file-handle.patch
@@ -0,0 +1,166 @@
+Revision: da62cad10eda55aa233ac124273f3db4f541137a
+Parent: 65bcb8cf8b32f68a5b48629b328f6d65979e58df
+Author: Thomas Moschny <thomas.moschny@gmx.de>
+Date: 07.05.2011 13:32:06
+Branch: net.venge.monotone
+
+Changelog:
+
+* src/rcs_file.cc: Rename struct "file_handle" to "rcs_file_handle"
+ to avoid a name clash with a struct of same name defined by newer
+ glibc's "fcntl.h". For aesthetic reasons, also rename struct
+ "file_source".
+
+References:
+https://code.monotone.ca/p/monotone/source/commit/da62cad10eda55aa233ac124273f3db4f541137a/
+https://bugs.gentoo.org/396651
+
+============================================================
+--- src/rcs_file.cc 885b3fbe7b6cfed78816f0e57cd71d44616213c6
++++ src/rcs_file.cc 03cf68912a4a708545ebce3d415c0e970ddead0b
+@@ -42,12 +42,12 @@ struct
+
+ #ifdef HAVE_MMAP
+ struct
+-file_handle
++rcs_file_handle
+ {
+ string const & filename;
+ off_t length;
+ int fd;
+- file_handle(string const & fn) :
++ rcs_file_handle(string const & fn) :
+ filename(fn),
+ length(0),
+ fd(-1)
+@@ -60,13 +60,13 @@ file_handle
+ if (fd == -1)
+ throw oops("open of " + filename + " failed");
+ }
+- ~file_handle()
++ ~rcs_file_handle()
+ {
+ if (close(fd) == -1)
+ throw oops("close of " + filename + " failed");
+ }
+ };
+-struct file_source
++struct rcs_file_source
+ {
+ string const & filename;
+ int fd;
+@@ -91,7 +91,7 @@ struct file_source
+ ++pos;
+ return good();
+ }
+- file_source(string const & fn,
++ rcs_file_source(string const & fn,
+ int f,
+ off_t len) :
+ filename(fn),
+@@ -104,7 +104,7 @@ struct file_source
+ if (mapping == MAP_FAILED)
+ throw oops("mmap of " + filename + " failed");
+ }
+- ~file_source()
++ ~rcs_file_source()
+ {
+ if (munmap(mapping, length) == -1)
+ throw oops("munmapping " + filename + " failed, after reading RCS file");
+@@ -112,12 +112,12 @@ struct
+ };
+ #elif defined(WIN32)
+ struct
+-file_handle
++rcs_file_handle
+ {
+ string const & filename;
+ off_t length;
+ HANDLE fd;
+- file_handle(string const & fn) :
++ rcs_file_handle(string const & fn) :
+ filename(fn),
+ length(0),
+ fd(NULL)
+@@ -134,7 +134,7 @@ file_handle
+ if (fd == NULL)
+ throw oops("open of " + filename + " failed");
+ }
+- ~file_handle()
++ ~rcs_file_handle()
+ {
+ if (CloseHandle(fd)==0)
+ throw oops("close of " + filename + " failed");
+@@ -142,7 +142,7 @@ struct
+ };
+
+ struct
+-file_source
++rcs_file_source
+ {
+ string const & filename;
+ HANDLE fd,map;
+@@ -167,7 +167,7 @@ file_source
+ ++pos;
+ return good();
+ }
+- file_source(string const & fn,
++ rcs_file_source(string const & fn,
+ HANDLE f,
+ off_t len) :
+ filename(fn),
+@@ -183,7 +183,7 @@ file_source
+ if (mapping==NULL)
+ throw oops("MapViewOfFile of " + filename + " failed");
+ }
+- ~file_source()
++ ~rcs_file_source()
+ {
+ if (UnmapViewOfFile(mapping)==0)
+ throw oops("UnmapViewOfFile of " + filename + " failed");
+@@ -193,7 +193,7 @@ file_source
+ };
+ #else
+ // no mmap at all
+-typedef istream file_source;
++typedef istream rcs_file_source;
+ #endif
+
+ typedef enum
+@@ -220,7 +220,7 @@ static token_type
+ }
+
+ static token_type
+-get_token(file_source & ist,
++get_token(rcs_file_source & ist,
+ string & str,
+ size_t & line,
+ size_t & col)
+@@ -303,14 +303,14 @@ struct parser
+
+ struct parser
+ {
+- file_source & ist;
++ rcs_file_source & ist;
+ rcs_file & r;
+ string token;
+ token_type ttype;
+
+ size_t line, col;
+
+- parser(file_source & s,
++ parser(rcs_file_source & s,
+ rcs_file & r)
+ : ist(s), r(r), line(1), col(1)
+ {}
+@@ -489,8 +489,8 @@ parse_rcs_file(string const & filename,
+ parse_rcs_file(string const & filename, rcs_file & r)
+ {
+ #if defined(HAVE_MMAP) || defined(WIN32)
+- file_handle handle(filename);
+- file_source ifs(filename, handle.fd, handle.length);
++ rcs_file_handle handle(filename);
++ rcs_file_source ifs(filename, handle.fd, handle.length);
+ #else
+ ifstream ifs(filename.c_str());
+ ifs.unsetf(ios_base::skipws);
diff --git a/dev-vcs/monotone/monotone-1.0-r3.ebuild b/dev-vcs/monotone/monotone-1.0-r3.ebuild
index 1f0228dd1ae9..03314938fedb 100644
--- a/dev-vcs/monotone/monotone-1.0-r3.ebuild
+++ b/dev-vcs/monotone/monotone-1.0-r3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-vcs/monotone/monotone-1.0-r3.ebuild,v 1.1 2012/01/01 01:13:34 idl0r Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/monotone/monotone-1.0-r3.ebuild,v 1.2 2012/02/19 08:18:47 zmedico Exp $
# QA failiures reported in https://code.monotone.ca/p/monotone/issues/181/
EAPI="4"
@@ -40,6 +40,7 @@ src_prepare() {
fi
epatch "${FILESDIR}/monotone-1.0-bash-completion-tests.patch"
epatch "${FILESDIR}/monotone-1.0-botan-1.10.patch"
+ epatch "${FILESDIR}/monotone-1.0-glibc-2.14-file-handle.patch"
}
src_configure() {