summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Olexa <darkside@gentoo.org>2010-01-22 20:15:55 +0000
committerJeremy Olexa <darkside@gentoo.org>2010-01-22 20:15:55 +0000
commit716a2a84f2b060966db256d142be5c5c9a7477dd (patch)
tree4d2c8de5dd1ff40f8e72cde37bf7e1be8e95a1f2 /sys-devel/patch
parentstable ppc, bug 285406 (diff)
downloadhistorical-716a2a84f2b060966db256d142be5c5c9a7477dd.tar.gz
historical-716a2a84f2b060966db256d142be5c5c9a7477dd.tar.bz2
historical-716a2a84f2b060966db256d142be5c5c9a7477dd.zip
Add missing strnlen implementation that upstream apparently forgot to include, bug #300845
Package-Manager: portage-2.1.6.13/cvs/Linux x86_64
Diffstat (limited to 'sys-devel/patch')
-rw-r--r--sys-devel/patch/ChangeLog7
-rw-r--r--sys-devel/patch/Manifest5
-rw-r--r--sys-devel/patch/files/gnulib_strnlen.c31
-rw-r--r--sys-devel/patch/patch-2.6.1.ebuild9
4 files changed, 48 insertions, 4 deletions
diff --git a/sys-devel/patch/ChangeLog b/sys-devel/patch/ChangeLog
index e74c8f030733..c908e2b5d726 100644
--- a/sys-devel/patch/ChangeLog
+++ b/sys-devel/patch/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-devel/patch
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/patch/ChangeLog,v 1.44 2010/01/02 03:35:04 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/patch/ChangeLog,v 1.45 2010/01/22 20:15:54 darkside Exp $
+
+ 22 Jan 2010; Jeremy Olexa <darkside@gentoo.org> patch-2.6.1.ebuild,
+ +files/gnulib_strnlen.c:
+ Add missing strnlen implementation that upstream apparently forgot to
+ include, bug #300845
02 Jan 2010; Mike Frysinger <vapier@gentoo.org> patch-2.6.1.ebuild:
Pull in ed for tests #299270 by Patrick Lauer.
diff --git a/sys-devel/patch/Manifest b/sys-devel/patch/Manifest
index c30ec80815b8..585d8ff824fe 100644
--- a/sys-devel/patch/Manifest
+++ b/sys-devel/patch/Manifest
@@ -1,8 +1,9 @@
+AUX gnulib_strnlen.c 1221 RMD160 4261987c13c30efd63ba6f9b69ce7e42fd3d6a58 SHA1 31cae0bada098aa76f4faf7c65fb56d1957f01cc SHA256 12b0328a3d341cb1bad06d84b50b05d28ad44ca6644c62cf52e63d2c3c12f981
AUX patch-2.5.9-cr-stripping.patch 1355 RMD160 96fe7ef1a14e5ea5f4af9fab2a4b7118e9f82853 SHA1 b4848b09af0a2d6dc715cc607703e0fdc052895c SHA256 d148aa25b3fd9059d04b7d40061c13145fd6fc561bd2ccaefa2a4ccf5b9786b9
DIST patch-2.5.9.tar.gz 201926 RMD160 4b739ecabba45733f3b2e405d1de99a32b916c0f SHA1 9a69f7191576549255f046487da420989d2834a6 SHA256 ecb5c6469d732bcf01d6ec1afe9e64f1668caba5bfdb103c28d7f537ba3cdb8a
DIST patch-2.6.1.tar.bz2 253719 RMD160 5af3acb89cc9ce5484c9a9dce6e39fb04dbe5e2e SHA1 105f313d14b5458e0aa229c518bda9ebdf921a1b SHA256 1d1441380c92ed8572049411406964a0a987aefd228be3abb8623eca1f3ced8a
EBUILD patch-2.5.9-r1.ebuild 1158 RMD160 5891370594222c89687feb3d23a655e3fc485ee6 SHA1 3a16b19ff8974bd41d3574629e3f63d5d8dc40f0 SHA256 a5a3d19cbf56ee7f212f9186a4dc684104644d74f695b81e140e5855107e0820
EBUILD patch-2.5.9.ebuild 971 RMD160 bea31d8895aac6ccf444fac3d1495a6c392248c9 SHA1 6f0e0065827575b3e77d5dd4bdac785efb5504bc SHA256 7338124b7743d63b62cdb60ba662e6932a4b13a2bd6d64563035d446cfdb518f
-EBUILD patch-2.6.1.ebuild 874 RMD160 29dadc35df4152dc6a59798e84d93a0597f10108 SHA1 395f838dad1ae154802b13ebee3a2ee05e65086a SHA256 f723f532b77051935bd047292dda4b14ff5e64e1fae23e85f1b261d8d06200fd
-MISC ChangeLog 4552 RMD160 7dad7ac0296e628f1398849759af5959ac5f7656 SHA1 5f59a20cae9c6969e5e06b93a6f3784662215c1e SHA256 e313dbb199dcb854c3d80a7c305645ade3fdc78c53a7a5242dde685749cd3ef4
+EBUILD patch-2.6.1.ebuild 1030 RMD160 4ac0187587f3e837979f971e6b449f75a063fbee SHA1 deb763679df77e27a56f2b03ca96f1e4f6561b70 SHA256 dabc49673a24615d029782bda0df945f7c3c7c0215ad3ee6da9a95048b693b61
+MISC ChangeLog 4747 RMD160 23a7bf5f2de29c43db7948e90cb4c85b3bba6f48 SHA1 ffbb0446da4e1ace8773e0a5cc01f462b64bbc71 SHA256 96f1e39125a0e9810afbff0e5a3e0d08f5cc5bd26863f36e0151d3b85f9e6fba
MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92
diff --git a/sys-devel/patch/files/gnulib_strnlen.c b/sys-devel/patch/files/gnulib_strnlen.c
new file mode 100644
index 000000000000..112df49ab48d
--- /dev/null
+++ b/sys-devel/patch/files/gnulib_strnlen.c
@@ -0,0 +1,31 @@
+/* Find the length of STRING, but scan at most MAXLEN characters.
+ Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
+ Written by Simon Josefsson.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+#include <string.h>
+
+/* Find the length of STRING, but scan at most MAXLEN characters.
+ If no '\0' terminator is found in that many characters, return MAXLEN. */
+
+size_t
+strnlen (const char *string, size_t maxlen)
+{
+ const char *end = memchr (string, '\0', maxlen);
+ return end ? (size_t) (end - string) : maxlen;
+}
diff --git a/sys-devel/patch/patch-2.6.1.ebuild b/sys-devel/patch/patch-2.6.1.ebuild
index 9ca75c025b7a..b3ce5e507662 100644
--- a/sys-devel/patch/patch-2.6.1.ebuild
+++ b/sys-devel/patch/patch-2.6.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/patch/patch-2.6.1.ebuild,v 1.2 2010/01/02 03:35:04 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/patch/patch-2.6.1.ebuild,v 1.3 2010/01/22 20:15:54 darkside Exp $
inherit flag-o-matic
@@ -17,6 +17,13 @@ RDEPEND=""
DEPEND="${RDEPEND}
test? ( sys-apps/ed )"
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ # this file is missing from the tarball bug #300845
+ cp "${FILESDIR}"/gnulib_strnlen.c gl/lib/strnlen.c || die
+}
+
src_compile() {
use static && append-ldflags -static