pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/openrcs Make this build on Mac OS X, which has n...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f5e2ee203b03
branches:  trunk
changeset: 378394:f5e2ee203b03
user:      hubertf <hubertf%pkgsrc.org@localhost>
date:      Fri Apr 06 22:21:42 2018 +0000

description:
Make this build on Mac OS X, which has no memrchr()

diffstat:

 devel/openrcs/distinfo                                 |   5 +-
 devel/openrcs/patches/patch-openbsd-compat_Makefile.am |  12 ++++
 devel/openrcs/patches/patch-openbsd-compat_NOTES       |   9 +++
 devel/openrcs/patches/patch-openbsd-compat_memrchr.c   |  46 ++++++++++++++++++
 4 files changed, 71 insertions(+), 1 deletions(-)

diffs (93 lines):

diff -r 1563cb67aa9c -r f5e2ee203b03 devel/openrcs/distinfo
--- a/devel/openrcs/distinfo    Fri Apr 06 21:04:34 2018 +0000
+++ b/devel/openrcs/distinfo    Fri Apr 06 22:21:42 2018 +0000
@@ -1,6 +1,9 @@
-$NetBSD: distinfo,v 1.4 2015/11/03 03:27:53 agc Exp $
+$NetBSD: distinfo,v 1.5 2018/04/06 22:21:42 hubertf Exp $
 
 SHA1 (openrcs-20110824192219.tar.gz) = 582ca78a9efcc193c18d82fae0617468bdc75b1d
 RMD160 (openrcs-20110824192219.tar.gz) = 266fd50d49da2fbacd2a7c05e2f545a3a19331ad
 SHA512 (openrcs-20110824192219.tar.gz) = 7dcc009f1c8ee0da37bc1d59ecbbf06c1338a136864358164125fa43be69ede73d47501745092266f98346cfcbb4e3d2bce6f27fe1a74b02f765872afbb85e74
 Size (openrcs-20110824192219.tar.gz) = 106878 bytes
+SHA1 (patch-openbsd-compat_Makefile.am) = f231553fb4f4fd8f6ee17cdd7c2422125869a161
+SHA1 (patch-openbsd-compat_NOTES) = bf80bdce4af14245255556434e94a420fcb39218
+SHA1 (patch-openbsd-compat_memrchr.c) = 24f52eb05159318261ebfdb8b703da909633c6f2
diff -r 1563cb67aa9c -r f5e2ee203b03 devel/openrcs/patches/patch-openbsd-compat_Makefile.am
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/openrcs/patches/patch-openbsd-compat_Makefile.am    Fri Apr 06 22:21:42 2018 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-openbsd-compat_Makefile.am,v 1.1 2018/04/06 22:21:42 hubertf Exp $
+
+--- openbsd-compat/Makefile.am.orig    2010-08-24 22:08:11.000000000 +0000
++++ openbsd-compat/Makefile.am
+@@ -1,6 +1,6 @@
+ noinst_LIBRARIES = libopenbsd-compat.a
+ 
+ libopenbsd_compat_a_SOURCES = \
+-                strlcat.c strlcpy.c strtonum.c fgetln.c getlogin.c
++                strlcat.c strlcpy.c strtonum.c fgetln.c getlogin.c memrchr.c
+ 
+ INCLUDES = -I$(top_srcdir)/src/
diff -r 1563cb67aa9c -r f5e2ee203b03 devel/openrcs/patches/patch-openbsd-compat_NOTES
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/openrcs/patches/patch-openbsd-compat_NOTES  Fri Apr 06 22:21:42 2018 +0000
@@ -0,0 +1,9 @@
+$NetBSD: patch-openbsd-compat_NOTES,v 1.1 2018/04/06 22:21:42 hubertf Exp $
+
+--- openbsd-compat/NOTES.orig  2010-08-24 22:08:11.000000000 +0000
++++ openbsd-compat/NOTES
+@@ -11,3 +11,4 @@ strtonum.c    portable openssh
+ sys-queue.h   portable openssh
+ utimes.c      http://www.sudo.ws/cgi-bin/cvsweb/~checkout~/sudo/utimes.c?rev=1.9
+ utime.h       http://www.sudo.ws/cgi-bin/cvsweb/~checkout~/sudo/emul/utime.h?rev=1.25
++memrchr.c     https://github.com/aosm/sudo/blob/master/src/memrchr.c
diff -r 1563cb67aa9c -r f5e2ee203b03 devel/openrcs/patches/patch-openbsd-compat_memrchr.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/openrcs/patches/patch-openbsd-compat_memrchr.c      Fri Apr 06 22:21:42 2018 +0000
@@ -0,0 +1,46 @@
+$NetBSD: patch-openbsd-compat_memrchr.c,v 1.1 2018/04/06 22:21:42 hubertf Exp $
+
+--- openbsd-compat/memrchr.c.orig      2018-04-05 19:37:00.000000000 +0000
++++ openbsd-compat/memrchr.c
+@@ -0,0 +1,41 @@
++/*
++ * Copyright (c) 2007 Todd C. Miller <Todd.Miller%courtesan.com@localhost>
++ *
++ * Permission to use, copy, modify, and distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ */
++
++#include <config.h>
++
++#include <sys/types.h>
++
++/*
++ * Reverse memchr()
++ * Find the last occurrence of 'c' in the buffer 's' of size 'n'.
++ */
++void *
++memrchr(s, c, n)
++    const void *s;
++    int c;
++    size_t n;
++{
++    const unsigned char *cp;
++
++    if (n != 0) {
++      cp = (unsigned char *)s + n;
++      do {
++          if (*(--cp) == (unsigned char)c)
++              return (void *)cp;
++      } while (--n != 0);
++    }
++    return (void *)0;
++}



Home | Main Index | Thread Index | Old Index