pkgsrc-WIP-changes archive

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

openblas: Enabling building single-threaded variant on NetBSD



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Tue Oct 27 09:30:55 2020 -0500
Changeset:	140de9cee36004c4ca66984f7dc60b9c013423f4

Modified Files:
	openblas/Makefile.common

Log Message:
openblas: Enabling building single-threaded variant on NetBSD

openmp and pthreads variants will require patching for NetBSD cpuset

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

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

diffstat:
 openblas/Makefile.common | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diffs:
diff --git a/openblas/Makefile.common b/openblas/Makefile.common
index a71b888989..95b7a0f1c4 100644
--- a/openblas/Makefile.common
+++ b/openblas/Makefile.common
@@ -10,8 +10,6 @@
 
 DISTNAME=	OpenBLAS-${OPENBLAS_VERSION}
 PKGNAME=	${OPENBLAS_VARIANT}-${OPENBLAS_VERSION}
-# ThOr: I do not like that. Can we rather rename the benchmark files
-# to be unique?
 DIST_SUBDIR=	openblas-${OPENBLAS_VERSION}
 CATEGORIES=	math
 MASTER_SITES=	${MASTER_SITE_GITHUB:=xianyi/} \
@@ -24,16 +22,16 @@ GITHUB_TAG=	v${OPENBLAS_VERSION}
 
 DISTINFO_FILE=	${.CURDIR}/../../wip/openblas/distinfo
 PATCHDIR=	${.CURDIR}/../../wip/openblas/patches
-PLIST_SRC=	${.CURDIR}/../../wip/openblas/PLIST
-PLIST_SUBST+=	OPENBLAS_VARIANT=${OPENBLAS_VARIANT}
 
 HOMEPAGE=	https://github.com/xianyi/OpenBLAS
 COMMENT=	Optimized BLAS library based on GotoBLAS2
 # Check this
 LICENSE=	modified-bsd
 
-# Test and change if necessary.
-# MAKE_JOBS_SAFE=	no
+.if ${OPENBLAS_VARIANT} != openblas
+# Multicore variants use Linux-specific cpu_set interface
+ONLY_FOR_PLATFORM=	Linux-*-*
+.endif
 
 USE_LANGUAGES=	c fortran
 USE_TOOLS+=	gmake perl:build
@@ -58,6 +56,11 @@ BUILD_DEFS+=	OPENBLAS_THREAD_LIMIT
 
 .include "../../mk/bsd.prefs.mk"
 
+# Builds with patched gcc 4.8 on CentOS 7, but not base gcc 5 on NetBSD 8
+.if ${OPSYS} == "NetBSD"
+GCC_REQD+=	7
+.endif
+
 # Default checks number of cores of build host.
 # Do we want a pkgsrc-wide default?
 OPENBLAS_THREAD_LIMIT?=	# empty
@@ -124,12 +127,17 @@ SUBST_SED.pc+=		-e 's+-lopenblas+-l${OPENBLAS_VARIANT}+'
 SUBST_SED.pc+=		-e 's+openblas.pc"+${OPENBLAS_VARIANT}.pc"+'
 SUBST_FILES.pc+=	Makefile.install openblas.pc.in
 
+PLIST_SRC=	${.CURDIR}/../../wip/openblas/PLIST
+PLIST_SUBST+=	OPENBLAS_VARIANT=${OPENBLAS_VARIANT}
+
 post-extract:
 	(cd ${DISTDIR}/${DIST_SUBDIR} && \
 		${CP} ${LARGE_FILE} ${TIMING_FILE} ${WRKSRC})
 
 # This builds some benchmark programs you can call
 # from ${WRKSRC} afterwards.
+# ThOr: I do not like that. Can we rather rename the benchmark files
+# to be unique?
 .PHONY: benchmark
 benchmark: build
 	(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${BENCHMARK_ENV} \


Home | Main Index | Thread Index | Old Index