pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/got devel/got: import got-0.48
details: https://anonhg.NetBSD.org/pkgsrc/rev/6c99b5e859fd
branches: trunk
changeset: 445816:6c99b5e859fd
user: ryoon <ryoon%pkgsrc.org@localhost>
date: Fri Jan 29 20:35:11 2021 +0000
description:
devel/got: import got-0.48
Game of Trees (Got) is a version control system which prioritizes ease
of use and simplicity over flexibility.
diffstat:
devel/got/DESCR | 2 +
devel/got/Makefile | 44 ++
devel/got/PLIST | 18 +
devel/got/distinfo | 20 +
devel/got/files/openbsd-compat/Makefile | 14 +
devel/got/files/openbsd-compat/endian.h | 6 +
devel/got/files/openbsd-compat/freezero.c | 29 +
devel/got/files/openbsd-compat/getdtablecount.c | 68 ++++
devel/got/files/openbsd-compat/imsg-buffer.c | 311 ++++++++++++++++++++
devel/got/files/openbsd-compat/imsg.c | 304 +++++++++++++++++++
devel/got/files/openbsd-compat/imsg.h | 113 +++++++
devel/got/files/openbsd-compat/open.c | 65 ++++
devel/got/files/openbsd-compat/openbsd-compat.h | 89 +++++
devel/got/files/openbsd-compat/recallocarray.c | 84 +++++
devel/got/files/openbsd-compat/sha1.h | 14 +
devel/got/files/openbsd-compat/util.h | 21 +
devel/got/patches/patch-Makefile | 10 +
devel/got/patches/patch-Makefile.inc | 24 +
devel/got/patches/patch-got_Makefile | 15 +
devel/got/patches/patch-libexec_Makefile.inc | 14 +
devel/got/patches/patch-regress_Makefile | 10 +
devel/got/patches/patch-regress_cmdline_Makefile | 12 +
devel/got/patches/patch-regress_cmdline_common.sh | 25 +
devel/got/patches/patch-regress_cmdline_histedit.sh | 22 +
devel/got/patches/patch-regress_delta_Makefile | 14 +
devel/got/patches/patch-regress_fetch_Makefile | 14 +
devel/got/patches/patch-regress_idset_Makefile | 14 +
devel/got/patches/patch-regress_path_Makefile | 14 +
devel/got/patches/patch-tog_Makefile | 13 +
devel/got/patches/patch-tog_tog.c | 30 +
30 files changed, 1433 insertions(+), 0 deletions(-)
diffs (truncated from 1553 to 300 lines):
diff -r 1e59296b7b2c -r 6c99b5e859fd devel/got/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/got/DESCR Fri Jan 29 20:35:11 2021 +0000
@@ -0,0 +1,2 @@
+Game of Trees (Got) is a version control system which prioritizes ease
+of use and simplicity over flexibility.
diff -r 1e59296b7b2c -r 6c99b5e859fd devel/got/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/got/Makefile Fri Jan 29 20:35:11 2021 +0000
@@ -0,0 +1,44 @@
+# $NetBSD: Makefile,v 1.1 2021/01/29 20:35:11 ryoon Exp $
+
+DISTNAME= got-0.48
+CATEGORIES= devel
+MASTER_SITES= https://gameoftrees.org/releases/
+
+MAINTAINER= ryoon%NetBSD.org@localhost
+HOMEPAGE= https://gameoftrees.org/
+COMMENT= Game of Trees version control system manipurating Git repo
+LICENSE= isc
+
+USE_TOOLS+= awk find
+
+INSTALLATION_DIRS= bin libexec ${PKGMANDIR}/man1 ${PKGMANDIR}/man5
+
+MAKE_FLAGS+= BINOWN=${BINOWN}
+MAKE_FLAGS+= BINGRP=${BINGRP}
+MAKE_FLAGS+= MANOWN=${MANOWN}
+MAKE_FLAGS+= MANGRP=${MANGRP}
+MAKE_FLAGS+= MANDIR=${PREFIX}/${PKGMANDIR}
+MAKE_FLAGS+= MKHTML=no
+
+.include "../../mk/bsd.prefs.mk"
+
+post-patch:
+ ${FIND} ${WRKSRC} -name '*.[cy]' -exec \
+ ${AWK} '/^#include /{c += 1;} \
+ c == 1 { \
+ gsub("(^#include )", "#include \"openbsd-compat.h\"\n&", $$0) \
+ } \
+ {print $$0 > "{}.back"} \
+ ' \
+ {} \;
+ ${FIND} ${WRKSRC} -name '*.[cy]' -exec \
+ cp {}.back {} \;
+ ${CP} -r ${FILESDIR}/openbsd-compat ${WRKSRC}/
+.if ${OPSYS} == "NetBSD"
+ # NetBSD has sha1.h.
+ ${RM} -f ${WRKSRC}/openbsd-compat/sha1.h
+.endif
+
+# For set_panel_userptr(3)'s second argument and waddwstr(3).
+.include "../../devel/ncursesw/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 1e59296b7b2c -r 6c99b5e859fd devel/got/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/got/PLIST Fri Jan 29 20:35:11 2021 +0000
@@ -0,0 +1,18 @@
+@comment $NetBSD: PLIST,v 1.1 2021/01/29 20:35:11 ryoon Exp $
+bin/got
+bin/tog
+libexec/got-fetch-pack
+libexec/got-index-pack
+libexec/got-read-blob
+libexec/got-read-commit
+libexec/got-read-gitconfig
+libexec/got-read-gotconfig
+libexec/got-read-object
+libexec/got-read-pack
+libexec/got-read-tag
+libexec/got-read-tree
+man/man1/got.1
+man/man1/tog.1
+man/man5/git-repository.5
+man/man5/got-worktree.5
+man/man5/got.conf.5
diff -r 1e59296b7b2c -r 6c99b5e859fd devel/got/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/got/distinfo Fri Jan 29 20:35:11 2021 +0000
@@ -0,0 +1,20 @@
+$NetBSD: distinfo,v 1.1 2021/01/29 20:35:11 ryoon Exp $
+
+SHA1 (got-0.48.tar.gz) = a5524ef970650c749e85dca15e755edec06494df
+RMD160 (got-0.48.tar.gz) = 798c0e6d6c40c9ff90bfd30d11880387adc16fee
+SHA512 (got-0.48.tar.gz) = 55ea20ee6f7c34610ef37c8f93b2ed3c71547711358bb7d88e187fd5e5d820e6ce352bfe54d35342d6e5eb1bd4c7e741bf232b1c3405d5dbcc99ca9a87226984
+Size (got-0.48.tar.gz) = 483588 bytes
+SHA1 (patch-Makefile) = b6787de1a7b505b44f29cbc697201511f521cd78
+SHA1 (patch-Makefile.inc) = 28ab688bf6ddfaf51bcf92a933864f8e89c548ff
+SHA1 (patch-got_Makefile) = e61bc61a1cbe9055e755ec42ac04d3246190da7d
+SHA1 (patch-libexec_Makefile.inc) = c56eb1aea447f65f42682a07225e81d187dc2072
+SHA1 (patch-regress_Makefile) = bc19146d5b4bb56baf849a0b38313c13c843675b
+SHA1 (patch-regress_cmdline_Makefile) = 79a6727cb0963b6ac12f1efe7c0873436f291bbc
+SHA1 (patch-regress_cmdline_common.sh) = df6011b7811e70600ad03701f4304f4b8978a077
+SHA1 (patch-regress_cmdline_histedit.sh) = 7fd4f2cdd13456fd14a2ec19630bb0db693d2616
+SHA1 (patch-regress_delta_Makefile) = 7b71d20428468de65313dda4fcfe1dba44cbbbff
+SHA1 (patch-regress_fetch_Makefile) = 33dafea0b53ce9fc096b57acb10541ae95c48561
+SHA1 (patch-regress_idset_Makefile) = 18639cc0c3a59a0da1775ea84cc7e47b1ee5b464
+SHA1 (patch-regress_path_Makefile) = 958100601458203cef4b387f63035826d9a449e8
+SHA1 (patch-tog_Makefile) = ca149a6c1d92e0ea9960e035eb761098e6e8255f
+SHA1 (patch-tog_tog.c) = f3b4d76b9fa0f706584575f96d90ead4439ba669
diff -r 1e59296b7b2c -r 6c99b5e859fd devel/got/files/openbsd-compat/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/got/files/openbsd-compat/Makefile Fri Jan 29 20:35:11 2021 +0000
@@ -0,0 +1,14 @@
+LIB= openbsd-compat
+INTERNALLIB=
+LIBISPRIVATE= yes
+
+SRCS= freezero.c \
+ getdtablecount.c \
+ imsg.c \
+ imsg-buffer.c \
+ open.c \
+ recallocarray.c
+
+CFLAGS+= -I${.CURDIR}
+
+.include <bsd.lib.mk>
diff -r 1e59296b7b2c -r 6c99b5e859fd devel/got/files/openbsd-compat/endian.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/got/files/openbsd-compat/endian.h Fri Jan 29 20:35:11 2021 +0000
@@ -0,0 +1,6 @@
+#ifndef _OPENBSD_COMPAT_ENDIAN_H_
+#define _OPENBSD_COMPAT_ENDIAN_H_
+
+#include <sys/endian.h>
+
+#endif
diff -r 1e59296b7b2c -r 6c99b5e859fd devel/got/files/openbsd-compat/freezero.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/got/files/openbsd-compat/freezero.c Fri Jan 29 20:35:11 2021 +0000
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek <otto%drijf.net@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 <stdlib.h>
+#include <string.h>
+
+void
+freezero(void *ptr, size_t sz)
+{
+#if defined(__FreeBSD__)
+ explicit_bzero(ptr, sz);
+#else /* NetBSD case */
+ bzero(ptr, sz);
+#endif
+ free(ptr);
+}
diff -r 1e59296b7b2c -r 6c99b5e859fd devel/got/files/openbsd-compat/getdtablecount.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/got/files/openbsd-compat/getdtablecount.c Fri Jan 29 20:35:11 2021 +0000
@@ -0,0 +1,68 @@
+/*-
+ * Copyright (c) 2015 Craig Rodrigues
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+/*
+__FBSDID("$FreeBSD: head/devel/got/files/openbsd-compat/getdtablecount.c 548853 2020-09-17 19:36:47Z naddy $");
+*/
+
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#include <stddef.h>
+
+int getdtablecount(void);
+
+#if defined(KERN_PROC_NFDS)
+/*
+ * Return the count of open file descriptors for this process.
+ *
+ */
+int
+getdtablecount(void)
+{
+ int mib[4];
+ int error;
+ int nfds;
+ size_t len;
+
+ len = sizeof(nfds);
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_NFDS;
+ mib[3] = 0;
+
+ error = sysctl(mib, 4, &nfds, &len, NULL, 0);
+ if (error)
+ return (-1);
+ return (nfds);
+}
+#else
+int
+getdtablecount(void)
+{
+ return 0;
+}
+#endif
diff -r 1e59296b7b2c -r 6c99b5e859fd devel/got/files/openbsd-compat/imsg-buffer.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/got/files/openbsd-compat/imsg-buffer.c Fri Jan 29 20:35:11 2021 +0000
@@ -0,0 +1,311 @@
+/* $OpenBSD: imsg-buffer.c,v 1.12 2019/01/20 02:50:03 bcook Exp $ */
+
+/*
+ * Copyright (c) 2003, 2004 Henning Brauer <henning%openbsd.org@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 <sys/types.h>
+#include <sys/queue.h>
+#include <sys/socket.h>
+#include <sys/uio.h>
+
+#include <limits.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <openbsd-compat.h>
+
+#include "imsg.h"
+
+static int ibuf_realloc(struct ibuf *, size_t);
+static void ibuf_enqueue(struct msgbuf *, struct ibuf *);
+static void ibuf_dequeue(struct msgbuf *, struct ibuf *);
+
+struct ibuf *
+ibuf_open(size_t len)
+{
+ struct ibuf *buf;
+
+ if ((buf = calloc(1, sizeof(struct ibuf))) == NULL)
+ return (NULL);
+ if ((buf->buf = malloc(len)) == NULL) {
+ free(buf);
+ return (NULL);
+ }
+ buf->size = buf->max = len;
+ buf->fd = -1;
+
+ return (buf);
+}
+
+struct ibuf *
+ibuf_dynamic(size_t len, size_t max)
+{
+ struct ibuf *buf;
+
+ if (max < len)
+ return (NULL);
+
+ if ((buf = ibuf_open(len)) == NULL)
Home |
Main Index |
Thread Index |
Old Index