pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/ghc90
Module Name: pkgsrc
Committed By: pho
Date: Thu Apr 22 14:20:24 UTC 2021
Modified Files:
pkgsrc/lang/ghc90: Makefile bootstrap.mk distinfo
pkgsrc/lang/ghc90/patches: patch-rts_ProfHeap.c
Added Files:
pkgsrc/lang/ghc90/patches: patch-rts_posix_OSThreads.c
Log Message:
Implement getNumberOfProcessors() for NetBSD
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/ghc90/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/ghc90/bootstrap.mk \
pkgsrc/lang/ghc90/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/ghc90/patches/patch-rts_ProfHeap.c
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/ghc90/patches/patch-rts_posix_OSThreads.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/ghc90/Makefile
diff -u pkgsrc/lang/ghc90/Makefile:1.2 pkgsrc/lang/ghc90/Makefile:1.3
--- pkgsrc/lang/ghc90/Makefile:1.2 Tue Feb 16 15:41:36 2021
+++ pkgsrc/lang/ghc90/Makefile Thu Apr 22 14:20:23 2021
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.2 2021/02/16 15:41:36 ryoon Exp $
+# $NetBSD: Makefile,v 1.3 2021/04/22 14:20:23 pho Exp $
# -----------------------------------------------------------------------------
# Package metadata
#
DISTNAME= ghc-9.0.1-src
+PKGREVISION= 1
PKGNAME= ${DISTNAME:S/-src$//}
CATEGORIES= lang
MASTER_SITES= https://downloads.haskell.org/~ghc/${PKGVERSION_NOREV}/
Index: pkgsrc/lang/ghc90/bootstrap.mk
diff -u pkgsrc/lang/ghc90/bootstrap.mk:1.1 pkgsrc/lang/ghc90/bootstrap.mk:1.2
--- pkgsrc/lang/ghc90/bootstrap.mk:1.1 Tue Feb 9 13:18:36 2021
+++ pkgsrc/lang/ghc90/bootstrap.mk Thu Apr 22 14:20:23 2021
@@ -1,4 +1,4 @@
-# $NetBSD: bootstrap.mk,v 1.1 2021/02/09 13:18:36 ryoon Exp $
+# $NetBSD: bootstrap.mk,v 1.2 2021/04/22 14:20:23 pho Exp $
# -----------------------------------------------------------------------------
# Select a bindist of bootstrapping compiler on a per-platform basis.
#
@@ -13,6 +13,7 @@
.include "../../mk/bsd.prefs.mk"
# Notes on version dependencies:
+# * GHC 9.0.1 requires 8.8 or later to bootstrap.
# * GHC 8.8.1 requires 8.4 or later to bootstrap.
# * GHC 8.4.4 requires 8.0 or later to bootstrap.
# * GHC 8.0.2 requires 7.8 or later to bootstrap.
@@ -54,7 +55,9 @@
BOOT_VERSION:= 8.10.4
BOOT_ARCHIVE:= ghc-${BOOT_VERSION}-boot-x86_64-unknown-netbsd.tar.xz
DISTFILES:= ${DISTFILES} ${BOOT_ARCHIVE} # Available in LOCAL_PORTS
-. if !empty(MACHINE_PLATFORM:MNetBSD-9.99*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
+. if !empty(MACHINE_PLATFORM:MNetBSD-9.99.*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
+# XXX: What is this used for? Does extracting libterminfo.so in
+# ${WRKSRC} do anything useful?
DISTFILES+= netbsd-9.0-amd64-libterminfo.tar.gz
EXTRACT_ONLY+= netbsd-9.0-amd64-libterminfo.tar.gz
. endif
Index: pkgsrc/lang/ghc90/distinfo
diff -u pkgsrc/lang/ghc90/distinfo:1.1 pkgsrc/lang/ghc90/distinfo:1.2
--- pkgsrc/lang/ghc90/distinfo:1.1 Tue Feb 9 13:18:36 2021
+++ pkgsrc/lang/ghc90/distinfo Thu Apr 22 14:20:23 2021
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2021/02/09 13:18:36 ryoon Exp $
+$NetBSD: distinfo,v 1.2 2021/04/22 14:20:23 pho Exp $
SHA1 (ghc-8.10.4-boot-x86_64-unknown-netbsd.tar.xz) = 3ff01d768393b3866e7a7543f9f55646aaffce7a
RMD160 (ghc-8.10.4-boot-x86_64-unknown-netbsd.tar.xz) = 39bf10b13054a6316c8477609fb98abe4277fa6c
@@ -26,4 +26,5 @@ SHA1 (patch-libraries_unix_System_Posix_
SHA1 (patch-libraries_unix_System_Posix_Files_Common.hsc) = 6efef280832d376915a8987e4e8aac283408f607
SHA1 (patch-libraries_unix_System_Posix_Signals.hsc) = 49215dce493a6bbc440f91a3959e592f86fc779b
SHA1 (patch-libraries_unix_include_execvpe.h) = 67dd9720a71a6a55bbe2b50e61621ca60187ef00
-SHA1 (patch-rts_ProfHeap.c) = 32182bbde0453b60745663d3ae2a3cd54fab85c1
+SHA1 (patch-rts_ProfHeap.c) = ef3d773387efd297830a54102e368ea96b7b0adf
+SHA1 (patch-rts_posix_OSThreads.c) = d5873aad8836067b5f29b37250666e37db67a4be
Index: pkgsrc/lang/ghc90/patches/patch-rts_ProfHeap.c
diff -u pkgsrc/lang/ghc90/patches/patch-rts_ProfHeap.c:1.1 pkgsrc/lang/ghc90/patches/patch-rts_ProfHeap.c:1.2
--- pkgsrc/lang/ghc90/patches/patch-rts_ProfHeap.c:1.1 Tue Feb 9 13:18:36 2021
+++ pkgsrc/lang/ghc90/patches/patch-rts_ProfHeap.c Thu Apr 22 14:20:24 2021
@@ -1,4 +1,6 @@
-$NetBSD: patch-rts_ProfHeap.c,v 1.1 2021/02/09 13:18:36 ryoon Exp $
+$NetBSD: patch-rts_ProfHeap.c,v 1.2 2021/04/22 14:20:24 pho Exp $
+
+NetBSD does not have uselocale(3).
--- rts/ProfHeap.c.orig 2021-01-25 16:30:28.000000000 +0000
+++ rts/ProfHeap.c
Added files:
Index: pkgsrc/lang/ghc90/patches/patch-rts_posix_OSThreads.c
diff -u /dev/null pkgsrc/lang/ghc90/patches/patch-rts_posix_OSThreads.c:1.1
--- /dev/null Thu Apr 22 14:20:24 2021
+++ pkgsrc/lang/ghc90/patches/patch-rts_posix_OSThreads.c Thu Apr 22 14:20:24 2021
@@ -0,0 +1,43 @@
+$NetBSD: patch-rts_posix_OSThreads.c,v 1.1 2021/04/22 14:20:24 pho Exp $
+
+Implementation of getNumberOfProcessors() for NetBSD
+
+TODO: Send this to the upstream.
+
+--- rts/posix/OSThreads.c.orig 2021-04-22 12:36:33.476115260 +0000
++++ rts/posix/OSThreads.c
+@@ -14,6 +14,11 @@
+ * DragonflyBSD, because of some specific types, like u_char, u_int, etc. */
+ #define __BSD_VISIBLE 1
+ #endif
++#if defined(netbsd_HOST_OS)
++/* Inclusion of system headers usually requires _NETBSD_SOURCE on NetBSD,
++ * because of some specific types, like u_char, u_int, etc. */
++#define _NETBSD_SOURCE 1
++#endif
+ #if defined(darwin_HOST_OS)
+ /* Inclusion of system headers usually requires _DARWIN_C_SOURCE on Mac OS X
+ * because of some specific types like u_char, u_int, etc. */
+@@ -42,7 +47,7 @@
+ #include <string.h>
+ #endif
+
+-#if defined(darwin_HOST_OS) || defined(freebsd_HOST_OS)
++#if defined(darwin_HOST_OS) || defined(freebsd_HOST_OS) || defined(netbsd_HOST_OS)
+ #include <sys/types.h>
+ #include <sys/sysctl.h>
+ #endif
+@@ -279,6 +284,13 @@ getNumberOfProcessors (void)
+ if(sysctlbyname("hw.ncpu",&nproc,&size,NULL,0) != 0)
+ nproc = 1;
+ }
++#elif defined(netbsd_HOST_OS)
++ size_t size = sizeof(uint32_t);
++ if (sysctlbyname("hw.ncpuonline", &nproc, &size, NULL, 0) != 0) {
++ if (sysctlbyname("hw.ncpu", &nproc, &size, NULL, 0) != 0) {
++ nproc = 1;
++ }
++ }
+ #elif defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_ONLN)
+ // N.B. This is the number of physical processors.
+ nproc = sysconf(_SC_NPROCESSORS_ONLN);
Home |
Main Index |
Thread Index |
Old Index