pkgsrc-Changes archive

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

CVS commit: pkgsrc/sysutils



Module Name:    pkgsrc
Committed By:   nikita
Date:           Tue Apr 12 22:22:26 UTC 2022

Modified Files:
        pkgsrc/sysutils: Makefile
Added Files:
        pkgsrc/sysutils/libcpuid: DESCR Makefile PLIST distinfo
        pkgsrc/sysutils/libcpuid/patches: patch-configure.ac
            patch-libcpuid_libcpuid_util.c

Log Message:
libcpuid: Add version 0.5.1

libcpuid provides CPU identification for the x86 (and x86_64). For
details about the programming API, you might want to take a look at
the project's website on sourceforge
(http://libcpuid.sourceforge.net/). There you'd find a short tutorial,
as well as the full API reference.


To generate a diff of this commit:
cvs rdiff -u -r1.1000 -r1.1001 pkgsrc/sysutils/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/libcpuid/DESCR \
    pkgsrc/sysutils/libcpuid/Makefile pkgsrc/sysutils/libcpuid/PLIST \
    pkgsrc/sysutils/libcpuid/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/libcpuid/patches/patch-configure.ac \
    pkgsrc/sysutils/libcpuid/patches/patch-libcpuid_libcpuid_util.c

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

Modified files:

Index: pkgsrc/sysutils/Makefile
diff -u pkgsrc/sysutils/Makefile:1.1000 pkgsrc/sysutils/Makefile:1.1001
--- pkgsrc/sysutils/Makefile:1.1000     Sat Mar 12 14:28:54 2022
+++ pkgsrc/sysutils/Makefile    Tue Apr 12 22:22:26 2022
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1000 2022/03/12 14:28:54 tnn Exp $
+# $NetBSD: Makefile,v 1.1001 2022/04/12 22:22:26 nikita Exp $
 #
 
 COMMENT=       System utilities
@@ -389,6 +389,7 @@ SUBDIR+=    lf
 SUBDIR+=       libbaloo4
 SUBDIR+=       libburn
 SUBDIR+=       libcap
+SUBDIR+=       libcpuid
 SUBDIR+=       libdevkit-gobject
 SUBDIR+=       libfm
 SUBDIR+=       libfm-extra

Added files:

Index: pkgsrc/sysutils/libcpuid/DESCR
diff -u /dev/null pkgsrc/sysutils/libcpuid/DESCR:1.1
--- /dev/null   Tue Apr 12 22:22:26 2022
+++ pkgsrc/sysutils/libcpuid/DESCR      Tue Apr 12 22:22:26 2022
@@ -0,0 +1,5 @@
+libcpuid provides CPU identification for the x86 (and x86_64). For
+details about the programming API, you might want to take a look at
+the project's website on sourceforge
+(http://libcpuid.sourceforge.net/). There you'd find a short tutorial,
+as well as the full API reference.
Index: pkgsrc/sysutils/libcpuid/Makefile
diff -u /dev/null pkgsrc/sysutils/libcpuid/Makefile:1.1
--- /dev/null   Tue Apr 12 22:22:26 2022
+++ pkgsrc/sysutils/libcpuid/Makefile   Tue Apr 12 22:22:26 2022
@@ -0,0 +1,27 @@
+# $NetBSD: Makefile,v 1.1 2022/04/12 22:22:26 nikita Exp $
+
+DISTNAME=              v${VERSION}
+PKGNAME=               ${GITHUB_PROJECT}-${DISTNAME:S,^v,,}
+VERSION=               0.5.1
+GITHUB_PROJECT=                libcpuid
+GITHUB_TAG=            ${DISTNAME}
+CATEGORIES=            sysutils
+MASTER_SITES=          ${MASTER_SITE_GITHUB:=anrieff/}
+DIST_SUBDIR=           ${GITHUB_PROJECT}
+
+MAINTAINER=            pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=              https://github.com/anrieff/libcpuid/
+COMMENT=               Small x86 CPU identification library
+LICENSE=               2-clause-bsd
+
+GNU_CONFIGURE=         yes
+USE_LIBTOOL=           yes
+USE_LANGUAGES=         c
+USE_TOOLS=             autoconf automake
+
+pre-configure:
+       cd ${WRKSRC} && autoreconf --install
+
+# only for a couple of archs, specify here.
+
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/sysutils/libcpuid/PLIST
diff -u /dev/null pkgsrc/sysutils/libcpuid/PLIST:1.1
--- /dev/null   Tue Apr 12 22:22:26 2022
+++ pkgsrc/sysutils/libcpuid/PLIST      Tue Apr 12 22:22:26 2022
@@ -0,0 +1,7 @@
+@comment $NetBSD: PLIST,v 1.1 2022/04/12 22:22:26 nikita Exp $
+bin/cpuid_tool
+include/libcpuid/libcpuid.h
+include/libcpuid/libcpuid_constants.h
+include/libcpuid/libcpuid_types.h
+lib/libcpuid.la
+lib/pkgconfig/libcpuid.pc
Index: pkgsrc/sysutils/libcpuid/distinfo
diff -u /dev/null pkgsrc/sysutils/libcpuid/distinfo:1.1
--- /dev/null   Tue Apr 12 22:22:26 2022
+++ pkgsrc/sysutils/libcpuid/distinfo   Tue Apr 12 22:22:26 2022
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2022/04/12 22:22:26 nikita Exp $
+
+BLAKE2s (libcpuid/v0.5.1.tar.gz) = 66c0d89cdf0350649581ff01aabaa032eafdf74f5f24d998ad4e735f81bea8cd
+SHA512 (libcpuid/v0.5.1.tar.gz) = d725bc82e5aa2db69cea7b3590afbe11d6028cf4802fde8d498b4f1cc6d823e73d71b89a453d81bf996d97b36a71f6c00d0f6e8292b72f2be8a64b5d59c01861
+Size (libcpuid/v0.5.1.tar.gz) = 166522 bytes
+SHA1 (patch-configure.ac) = 130cf88478f611b2b96f17a7040d5733eb492a5d
+SHA1 (patch-libcpuid_libcpuid_util.c) = 2b041a0829ff23acf8f6adf741d9427879cab363

Index: pkgsrc/sysutils/libcpuid/patches/patch-configure.ac
diff -u /dev/null pkgsrc/sysutils/libcpuid/patches/patch-configure.ac:1.1
--- /dev/null   Tue Apr 12 22:22:26 2022
+++ pkgsrc/sysutils/libcpuid/patches/patch-configure.ac Tue Apr 12 22:22:26 2022
@@ -0,0 +1,34 @@
+$NetBSD: patch-configure.ac,v 1.1 2022/04/12 22:22:26 nikita Exp $
+
+Upstream commit 1acaf9980b55ae180cc08db218b9face28202519
+from Alyssa Ross.
+
+Use popcount64 from libc when available
+
+Without this, we get a compiler error on NetBSD because the one in
+libc has a slightly different prototype.
+
+libcpuid_util.c:78:12: error: conflicting types for 'popcount64'
+   78 | static int popcount64(uint64_t mask)
+      |            ^~~~~~~~~~
+In file included from /nix/store/155rj8nqh3xd80vpa8hl35p3hk7pacys-include-netbsd-8.0/include/string.h:98,
+                 from libcpuid_util.c:30:
+/nix/store/155rj8nqh3xd80vpa8hl35p3hk7pacys-include-netbsd-8.0/include/strings.h:61:14: note: previous declaration of 'popcount64' was here
+   61 | unsigned int popcount64(__uint64_t) __constfunc;
+      |              ^~~~~~~~~~
+
+* Return unsigned int from popcount64
+
+Matches NetBSD libc, where popcount64 originates.
+
+--- configure.ac.orig
++++ configure.ac
+@@ -43,6 +43,8 @@ LT_INIT
+ AM_CPPFLAGS="$CPPFLAGS"
+ 
+ AC_CHECK_HEADERS([stdint.h])
++AC_CHECK_FUNCS([popcount64])
++
+ AC_CHECK_PROGS([DOXYGEN], [doxygen])
+ AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
+ 
Index: pkgsrc/sysutils/libcpuid/patches/patch-libcpuid_libcpuid_util.c
diff -u /dev/null pkgsrc/sysutils/libcpuid/patches/patch-libcpuid_libcpuid_util.c:1.1
--- /dev/null   Tue Apr 12 22:22:26 2022
+++ pkgsrc/sysutils/libcpuid/patches/patch-libcpuid_libcpuid_util.c     Tue Apr 12 22:22:26 2022
@@ -0,0 +1,56 @@
+$NetBSD: patch-libcpuid_libcpuid_util.c,v 1.1 2022/04/12 22:22:26 nikita Exp $
+
+Upstream commit 1acaf9980b55ae180cc08db218b9face28202519
+from Alyssa Ross.
+
+Use popcount64 from libc when available
+
+Without this, we get a compiler error on NetBSD because the one in
+libc has a slightly different prototype.
+
+libcpuid_util.c:78:12: error: conflicting types for 'popcount64'
+   78 | static int popcount64(uint64_t mask)
+      |            ^~~~~~~~~~
+In file included from /nix/store/155rj8nqh3xd80vpa8hl35p3hk7pacys-include-netbsd-8.0/include/string.h:98,
+                 from libcpuid_util.c:30:
+/nix/store/155rj8nqh3xd80vpa8hl35p3hk7pacys-include-netbsd-8.0/include/strings.h:61:14: note: previous declaration of 'popcount64' was here
+   61 | unsigned int popcount64(__uint64_t) __constfunc;
+      |              ^~~~~~~~~~
+
+* Return unsigned int from popcount64
+
+Matches NetBSD libc, where popcount64 originates.
+
+--- libcpuid/libcpuid_util.c.orig
++++ libcpuid/libcpuid_util.c
+@@ -29,6 +29,9 @@
+ #include <stdarg.h>
+ #include <string.h>
+ #include <ctype.h>
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
+ #include "libcpuid.h"
+ #include "libcpuid_util.h"
+ 
+@@ -74,9 +77,10 @@ void debugf(int verboselevel, const char* format, ...)
+       _warn_fun(buff);
+ }
+ 
+-static int popcount64(uint64_t mask)
++#ifndef HAVE_POPCOUNT64
++static unsigned int popcount64(uint64_t mask)
+ {
+-      int num_set_bits = 0;
++      unsigned int num_set_bits = 0;
+ 
+       while (mask) {
+               mask &= mask - 1;
+@@ -85,6 +89,7 @@ static int popcount64(uint64_t mask)
+ 
+       return num_set_bits;
+ }
++#endif
+ 
+ static int score(const struct match_entry_t* entry, const struct cpu_id_t* data,
+                  int brand_code, uint64_t bits, int model_code)



Home | Main Index | Thread Index | Old Index