pkgsrc-Changes archive

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

CVS commit: pkgsrc/net/freerdp2



Module Name:    pkgsrc
Committed By:   jdolecek
Date:           Sun May  2 08:26:50 UTC 2021

Modified Files:
        pkgsrc/net/freerdp2: Makefile distinfo
        pkgsrc/net/freerdp2/patches: patch-winpr_libwinpr_sysinfo_sysinfo.c

Log Message:
simplify the conditional for getting number of CPUs - simply use
_SC_NPROCESSORS_ONLN whenever available, this covers also NetBSD; change
the #ifdef conditional for HW_NCPU to check for HW_NCPU rather than
explicit list of FreeBSD/OpenBSD


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 pkgsrc/net/freerdp2/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/net/freerdp2/distinfo
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/net/freerdp2/patches/patch-winpr_libwinpr_sysinfo_sysinfo.c

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

Modified files:

Index: pkgsrc/net/freerdp2/Makefile
diff -u pkgsrc/net/freerdp2/Makefile:1.17 pkgsrc/net/freerdp2/Makefile:1.18
--- pkgsrc/net/freerdp2/Makefile:1.17   Wed Apr 21 13:25:08 2021
+++ pkgsrc/net/freerdp2/Makefile        Sun May  2 08:26:49 2021
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.17 2021/04/21 13:25:08 adam Exp $
+# $NetBSD: Makefile,v 1.18 2021/05/02 08:26:49 jdolecek Exp $
 
 DISTNAME=      freerdp-2.1.2
 PKGNAME=       ${DISTNAME:S/freerdp-/freerdp2-/1}
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    net
 MASTER_SITES=  https://pub.freerdp.com/releases/
 

Index: pkgsrc/net/freerdp2/distinfo
diff -u pkgsrc/net/freerdp2/distinfo:1.4 pkgsrc/net/freerdp2/distinfo:1.5
--- pkgsrc/net/freerdp2/distinfo:1.4    Sun Nov  1 00:20:05 2020
+++ pkgsrc/net/freerdp2/distinfo        Sun May  2 08:26:49 2021
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.4 2020/11/01 00:20:05 markd Exp $
+$NetBSD: distinfo,v 1.5 2021/05/02 08:26:49 jdolecek Exp $
 
 SHA1 (freerdp-2.1.2.tar.gz) = e9b82c39080c69686a82db99a27cdeee1cfe4e5e
 RMD160 (freerdp-2.1.2.tar.gz) = 7b0d340ed9f5f6d549ce6ac790190ce84a690f0c
 SHA512 (freerdp-2.1.2.tar.gz) = 6d72b9138b4a4ae6a0a092371624b5a9b73ff914a4c42c73ace63e3f794f6bbca9a84e03d5e92c89bdb945ba2cc8200b4790b685f59d115d67b78a87a6ecab96
 Size (freerdp-2.1.2.tar.gz) = 6877052 bytes
 SHA1 (patch-channels_rdpdr_client_rdpdr__main.c) = 4358d4cd4b9293a27f3edafb94e7759e133ecd5f
-SHA1 (patch-winpr_libwinpr_sysinfo_sysinfo.c) = 858cfba03a902e1e6900a2d1ee2bcf7429227d3d
+SHA1 (patch-winpr_libwinpr_sysinfo_sysinfo.c) = b0fc583b02c3f416eb9d0f7cb140c4c69b3bdaef

Index: pkgsrc/net/freerdp2/patches/patch-winpr_libwinpr_sysinfo_sysinfo.c
diff -u pkgsrc/net/freerdp2/patches/patch-winpr_libwinpr_sysinfo_sysinfo.c:1.1 pkgsrc/net/freerdp2/patches/patch-winpr_libwinpr_sysinfo_sysinfo.c:1.2
--- pkgsrc/net/freerdp2/patches/patch-winpr_libwinpr_sysinfo_sysinfo.c:1.1      Sun Sep 15 12:55:14 2019
+++ pkgsrc/net/freerdp2/patches/patch-winpr_libwinpr_sysinfo_sysinfo.c  Sun May  2 08:26:49 2021
@@ -1,15 +1,26 @@
-$NetBSD: patch-winpr_libwinpr_sysinfo_sysinfo.c,v 1.1 2019/09/15 12:55:14 nia Exp $
+$NetBSD: patch-winpr_libwinpr_sysinfo_sysinfo.c,v 1.2 2021/05/02 08:26:49 jdolecek Exp $
 
-Support NetBSD.
+Use _SC_NPROCESSORS_ONLN if available, remove OS-specific ifdef for it,
+and also for HW_NCPU. Technically NetBSD would need to be added to the HW_NCPU
+#idef, but no longer needed since it has _SC_NPROCESSORS_ONLN.
 
---- winpr/libwinpr/sysinfo/sysinfo.c.orig      2018-11-20 10:43:51.000000000 +0000
+--- winpr/libwinpr/sysinfo/sysinfo.c.orig      2021-05-01 22:46:16.616257099 +0000
 +++ winpr/libwinpr/sysinfo/sysinfo.c
-@@ -142,7 +142,7 @@ static DWORD GetNumberOfProcessors(void)
+@@ -132,7 +132,7 @@ static DWORD GetNumberOfProcessors(void)
+ #if defined(ANDROID)
+       return android_getCpuCount();
+       /* TODO: iOS */
+-#elif defined(__linux__) || defined(__sun) || defined(_AIX)
++#elif defined(_SC_NPROCESSORS_ONLN)
+       numCPUs = (DWORD)sysconf(_SC_NPROCESSORS_ONLN);
+ #elif defined(__MACOSX__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
+     defined(__OpenBSD__) || defined(__DragonFly__)
+@@ -140,7 +140,7 @@ static DWORD GetNumberOfProcessors(void)
                int mib[4];
                size_t length = sizeof(numCPUs);
                mib[0] = CTL_HW;
 -#if defined(__FreeBSD__) || defined(__OpenBSD__)
-+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
++#if defined(HW_NCPU)
                mib[1] = HW_NCPU;
  #else
                mib[1] = HW_AVAILCPU;



Home | Main Index | Thread Index | Old Index