pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/libite Added devel/libite version 1.6.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bd19d0b40149
branches:  trunk
changeset: 347789:bd19d0b40149
user:      abs <abs%pkgsrc.org@localhost>
date:      Sun May 29 22:24:33 2016 +0000

description:
Added devel/libite version 1.6.0

Libite is a lightweight library of frog DNA. It can be used to fill
the gaps in any dinosaur project. It holds useful functions and
macros developed by both Finit and the OpenBSD project. Most notably
the string functions: strlcpy(3), strlcat(3) and the highly useful
*BSD sys/queue.h and sys/tree.h API's.

Libite aims to fill in the gaps missing in GLIBC/EGLIBC. (It does
not aimo to become another GLIB though.) One such gap in GLIBC is
the missing _SAFE macros in sys/queue.h - highly recommended when
traversing lists to delete/free nodes.

diffstat:

 devel/libite/DESCR                    |  10 +++++++
 devel/libite/Makefile                 |  15 +++++++++++
 devel/libite/PLIST                    |   9 ++++++
 devel/libite/buildlink3.mk            |  12 ++++++++
 devel/libite/distinfo                 |   8 +++++
 devel/libite/patches/patch-makepath.c |  21 +++++++++++++++
 devel/libite/patches/patch-tempfile.c |  47 +++++++++++++++++++++++++++++++++++
 7 files changed, 122 insertions(+), 0 deletions(-)

diffs (150 lines):

diff -r ad14dd5a71b3 -r bd19d0b40149 devel/libite/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libite/DESCR        Sun May 29 22:24:33 2016 +0000
@@ -0,0 +1,10 @@
+Libite is a lightweight library of frog DNA. It can be used to fill
+the gaps in any dinosaur project. It holds useful functions and
+macros developed by both Finit and the OpenBSD project. Most notably
+the string functions: strlcpy(3), strlcat(3) and the highly useful
+*BSD sys/queue.h and sys/tree.h API's.
+
+Libite aims to fill in the gaps missing in GLIBC/EGLIBC. (It does
+not aimo to become another GLIB though.) One such gap in GLIBC is
+the missing _SAFE macros in sys/queue.h - highly recommended when
+traversing lists to delete/free nodes.
diff -r ad14dd5a71b3 -r bd19d0b40149 devel/libite/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libite/Makefile     Sun May 29 22:24:33 2016 +0000
@@ -0,0 +1,15 @@
+# $NetBSD: Makefile,v 1.1.1.1 2016/05/29 22:24:33 abs Exp $
+
+DISTNAME=      libite-1.6.0
+CATEGORIES=    devel
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=troglobit/libite/releases/download/v${DISTNAME:C:libite-::}/}
+EXTRACT_SUFX=  .tar.xz
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/troglobit/libite/
+COMMENT=       Useful functions developed by both Finit and the OpenBSD project
+LICENSE=       mit AND isc AND modified-bsd
+
+GNU_CONFIGURE= yes
+
+.include "../../mk/bsd.pkg.mk"
diff -r ad14dd5a71b3 -r bd19d0b40149 devel/libite/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libite/PLIST        Sun May 29 22:24:33 2016 +0000
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2016/05/29 22:24:33 abs Exp $
+include/lite/conio.h
+include/lite/lite.h
+include/lite/queue.h
+include/lite/tree.h
+lib/libite.la
+lib/pkgconfig/libite.pc
+share/doc/libite/LICENSE
+share/doc/libite/README.md
diff -r ad14dd5a71b3 -r bd19d0b40149 devel/libite/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libite/buildlink3.mk        Sun May 29 22:24:33 2016 +0000
@@ -0,0 +1,12 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2016/05/29 22:24:33 abs Exp $
+
+BUILDLINK_TREE+=       libite
+
+.if !defined(LIBITE_BUILDLINK3_MK)
+LIBITE_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.libite+= libite>=0.4.3
+BUILDLINK_PKGSRCDIR.libite?=   ../../devel/libite
+.endif # LIBITE_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -libite
diff -r ad14dd5a71b3 -r bd19d0b40149 devel/libite/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libite/distinfo     Sun May 29 22:24:33 2016 +0000
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1.1.1 2016/05/29 22:24:33 abs Exp $
+
+SHA1 (libite-1.6.0.tar.xz) = 2b8cc14acd79783cb3e08d64dcfb3eb7dd354e8b
+RMD160 (libite-1.6.0.tar.xz) = 22458633a9b0e04ea4b3565eac208f1f87b6eb7d
+SHA512 (libite-1.6.0.tar.xz) = f155bab49af6457f875561fbe4da95a133b086d4a4234cc81c9cef42f7e6dd8f7ec748d655e5cad6b8e07b30a3eab089e79dfebd156a5e62f605c899e4b02453
+Size (libite-1.6.0.tar.xz) = 248648 bytes
+SHA1 (patch-makepath.c) = 5769d96a8451ef2d92e8805d16ba260e9383fab4
+SHA1 (patch-tempfile.c) = 62c8151268d44950e3b55ed123a4a763772d9a53
diff -r ad14dd5a71b3 -r bd19d0b40149 devel/libite/patches/patch-makepath.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libite/patches/patch-makepath.c     Sun May 29 22:24:33 2016 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-makepath.c,v 1.1.1.1 2016/05/29 22:24:33 abs Exp $
+
+Do not depend on strdupa() - could make this conditional?
+
+--- makepath.c.orig    2015-08-22 21:06:22.000000000 +0000
++++ makepath.c
+@@ -33,9 +33,12 @@ int mkpath(char *dir, mode_t mode)
+       if (strlen(dir) == 1 && dir[0] == '/')
+               return 0;
+ 
+-      mkpath(dirname(strdupa(dir)), mode);
++        char *buf = strdup(dir);
++      mkpath(dirname(buf), mode);
+ 
+-      return mkdir(dir, mode);
++        int ret = mkdir(buf, mode);
++        free(buf);
++        return ret;
+ }
+ 
+ /**
diff -r ad14dd5a71b3 -r bd19d0b40149 devel/libite/patches/patch-tempfile.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libite/patches/patch-tempfile.c     Sun May 29 22:24:33 2016 +0000
@@ -0,0 +1,47 @@
+$NetBSD: patch-tempfile.c,v 1.1.1.1 2016/05/29 22:24:33 abs Exp $
+
+-- Handle the non Linux case by just wrapping tmpfile()
+-- (which may be secure on some of those systems :)
+
+--- tempfile.c.orig    2016-05-13 05:18:32.000000000 +0000
++++ tempfile.c
+@@ -17,16 +17,20 @@
+ 
+ #include <paths.h>
+ #include <fcntl.h>            /* O_TMPFILE requires -D_GNU_SOURCE */
++#ifdef __linux__ 
+ #include <linux/version.h>
++#endif
+ #include <stdlib.h>           /* mkstemp() */
+ #include <stdio.h>            /* fdopen() */
+ #include <sys/stat.h>         /* umask() */
+ 
++#ifdef __linux__ 
+ #ifndef  O_TMPFILE            /* Too old GLIBC or kernel */
+ #warning O_TMPFILE missing on your system, tempfile() may not work!
+ #define  __O_TMPFILE 020000000
+ #define  O_TMPFILE (__O_TMPFILE | O_DIRECTORY) /* Define and let it fail at runtime */
+ #endif
++#endif
+ 
+ /**
+  * tempfile - A secure tmpfile() replacement
+@@ -43,6 +47,10 @@
+  */
+ FILE *tempfile(void)
+ {
++#ifndef __linux__
++#warning Not on Linux, reverting to wrap tmpfile(), which may or may not be safe ...
++      return tmpfile();
++#else
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
+       int fd;
+       mode_t oldmask;
+@@ -58,6 +66,7 @@ FILE *tempfile(void)
+ #warning Too old kernel, reverting to wrap unsafe tmpfile() ...
+       return tmpfile();
+ #endif
++#endif
+ }
+ 
+ #ifdef UNITTEST



Home | Main Index | Thread Index | Old Index