pkgsrc-WIP-changes archive

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

libsysinfo: First attempt to port from FreeBSD



Module Name:	pkgsrc-wip
Committed By:	Jason W. Bacon <jtocino%gmx.com@localhost>
Pushed By:	outpaddling
Date:		Mon Jan 20 10:48:23 2025 -0600
Changeset:	e35492ddc4a75719c700a8084bfc99fb77ec0b8f

Modified Files:
	Makefile
Added Files:
	libsysinfo/DESCR
	libsysinfo/Makefile
	libsysinfo/PLIST
	libsysinfo/distinfo
	libsysinfo/files/libsysinfo.pc.in
	libsysinfo/patches/patch-sysinfo.c

Log Message:
libsysinfo: First attempt to port from FreeBSD

Needs work:
NetBSD is missing some kvm and clock_gettime functionality

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e35492ddc4a75719c700a8084bfc99fb77ec0b8f

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                           |  1 +
 libsysinfo/DESCR                   |  3 +++
 libsysinfo/Makefile                | 36 ++++++++++++++++++++++++++++++++++++
 libsysinfo/PLIST                   |  1 +
 libsysinfo/distinfo                |  6 ++++++
 libsysinfo/files/libsysinfo.pc.in  | 11 +++++++++++
 libsysinfo/patches/patch-sysinfo.c | 17 +++++++++++++++++
 7 files changed, 75 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index c0a1f86b9c..c5d7e15cc7 100644
--- a/Makefile
+++ b/Makefile
@@ -2137,6 +2137,7 @@ SUBDIR+=	libspt
 SUBDIR+=	libsquish
 SUBDIR+=	libstacktrace
 SUBDIR+=	libstrophe
+SUBDIR+=	libsysinfo
 SUBDIR+=	libtextcat
 SUBDIR+=	libtheorafile
 SUBDIR+=	libtirpc
diff --git a/libsysinfo/DESCR b/libsysinfo/DESCR
new file mode 100644
index 0000000000..21672a547f
--- /dev/null
+++ b/libsysinfo/DESCR
@@ -0,0 +1,3 @@
+The sysinfo(3) function is a GNU interface for retrieving common information
+about the configuration and state of the system, such as is returned by
+sysctl(3) and sysconf(3).
diff --git a/libsysinfo/Makefile b/libsysinfo/Makefile
new file mode 100644
index 0000000000..f44f409fd9
--- /dev/null
+++ b/libsysinfo/Makefile
@@ -0,0 +1,36 @@
+# $NetBSD$
+#
+###########################################################
+#                  Generated by fbsd2pkg                  #
+#              Mon Jan 20 10:37:16 CST 2025               #
+###########################################################
+
+###########################################################
+# Unconverted and partially converted FreeBSD port syntax:
+
+# Unknown tool: USE_TOOLS=	uidfix
+#USE_LDCONFIG=	yes
+#SUB_FILES=	libsysinfo.pc
+#SUB_LIST=	PREFIX="${PREFIX}" PV="${PV}" COMMENT="${COMMENT}"
+#post-install:
+#	${INSTALL_DATA} ${WRKDIR}/libsysinfo.pc ${DESTDIR}${PREFIX}/libdata/pkgconfig/
+
+DISTNAME=	libsysinfo-0.0.3
+PKGNAME=	${DISTNAME}
+CATEGORIES=	devel
+MASTER_SITES=	${MASTER_SITE_GITHUB:=bsdimp/}
+GITHUB_TAG=	v${PKGVERSION_NOREV}
+
+MAINTAINER=	bacon%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/bsdimp/libsysinfo
+COMMENT=	GNU libc's sysinfo port for \${OPSYS}
+LICENSE=	modified-bsd
+
+ONLY_FOR_PLATFORM+=	FreeBSD-*-* NetBSD-*-*
+
+SUBST_CLASSES+=		man
+SUBST_STAGE.man=	pre-configure
+SUBST_SED.man+=		-e 's|man/man|${PKGMANPREFIX}/man|g'
+SUBST_FILES.man+=	${WRKSRC}/Makefile
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/libsysinfo/PLIST b/libsysinfo/PLIST
new file mode 100644
index 0000000000..48d96a5493
--- /dev/null
+++ b/libsysinfo/PLIST
@@ -0,0 +1 @@
+@comment $NetBSD$
diff --git a/libsysinfo/distinfo b/libsysinfo/distinfo
new file mode 100644
index 0000000000..db4f27f93e
--- /dev/null
+++ b/libsysinfo/distinfo
@@ -0,0 +1,6 @@
+$NetBSD$
+
+BLAKE2s (libsysinfo-0.0.3.tar.gz) = a4c2ed965e88a17c2499175bdb6e4bfb5d123fad7f493ca4496e9e85d2b3aff9
+SHA512 (libsysinfo-0.0.3.tar.gz) = 757123f7433d5d94def0103d79a6a4d5d58c0b19941968dd715aa4cbb701186e980c3155522979b0aeee9462c3edf14e77d72b8450618a4c555cf97533319fc7
+Size (libsysinfo-0.0.3.tar.gz) = 3623 bytes
+SHA1 (patch-sysinfo.c) = a6ab878e0c9e7992f9923e781120add3c4f52101
diff --git a/libsysinfo/files/libsysinfo.pc.in b/libsysinfo/files/libsysinfo.pc.in
new file mode 100644
index 0000000000..9b8803dc9b
--- /dev/null
+++ b/libsysinfo/files/libsysinfo.pc.in
@@ -0,0 +1,11 @@
+prefix=%%PREFIX%%
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: libsysinfo
+Description: %%COMMENT%%
+Version: %%PORTVERSION%%
+Libs: -L${libdir} -lsysinfo
+Libs.private:
+Cflags: -I${includedir}
diff --git a/libsysinfo/patches/patch-sysinfo.c b/libsysinfo/patches/patch-sysinfo.c
new file mode 100644
index 0000000000..51fd194d73
--- /dev/null
+++ b/libsysinfo/patches/patch-sysinfo.c
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- sysinfo.c.orig	2025-01-20 16:40:33.164730511 +0000
++++ sysinfo.c
+@@ -30,9 +30,12 @@
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <sys/sysctl.h>
++#ifndef __NetBSD__
+ #include <sys/user.h>
++#endif
+ #include <sys/sysctl.h>
+ 
++#include <time.h>
+ #include <limits.h>
+ #include <kvm.h>
+ #include <string.h>


Home | Main Index | Thread Index | Old Index