pkgsrc-WIP-changes archive

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

bolt-lmm: Clean up and convert to use blas.buildlink.mk



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Fri May 24 11:06:08 2019 -0500
Changeset:	e0ee2dcb5878e58f3b3512484b79e35d5ffcde15

Modified Files:
	bolt-lmm/Makefile
	bolt-lmm/PLIST
	bolt-lmm/distinfo
	bolt-lmm/patches/patch-example_run__example__reml2.sh
	bolt-lmm/patches/patch-src_Makefile
	bolt-lmm/patches/patch-src_StringUtils.cpp
Removed Files:
	bolt-lmm/patches/patch-src_FileUtils.cpp

Log Message:
bolt-lmm: Clean up and convert to use blas.buildlink.mk

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

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

diffstat:
 bolt-lmm/Makefile                                  | 19 ++++-----
 bolt-lmm/PLIST                                     |  2 +
 bolt-lmm/distinfo                                  | 15 ++++----
 .../patches/patch-example_run__example__reml2.sh   |  9 +++--
 bolt-lmm/patches/patch-src_FileUtils.cpp           | 14 -------
 bolt-lmm/patches/patch-src_Makefile                | 45 +++++++++++-----------
 bolt-lmm/patches/patch-src_StringUtils.cpp         |  5 ++-
 7 files changed, 48 insertions(+), 61 deletions(-)

diffs:
diff --git a/bolt-lmm/Makefile b/bolt-lmm/Makefile
index 79a2a50777..9053557556 100644
--- a/bolt-lmm/Makefile
+++ b/bolt-lmm/Makefile
@@ -5,8 +5,8 @@
 #              Wed Sep 20 05:34:25 CDT 2017               #
 ###########################################################
 
-DISTNAME=	BOLT-LMM_v${PORTVERSION}
-PKGNAME=	bolt-lmm-${PORTVERSION}
+PKGNAME=	bolt-lmm-2.3.2
+DISTNAME=	BOLT-LMM_v${PKGVERSION_NOREV}
 CATEGORIES=	biology
 MASTER_SITES=	https://data.broadinstitute.org/alkesgroup/BOLT-LMM/downloads/ \
 		https://data.broadinstitute.org/alkesgroup/BOLT-LMM/downloads/old/
@@ -14,15 +14,15 @@ MASTER_SITES=	https://data.broadinstitute.org/alkesgroup/BOLT-LMM/downloads/ \
 MAINTAINER=	bacon%NetBSD.org@localhost
 HOMEPAGE=	https://data.broadinstitute.org/alkesgroup/BOLT-LMM/
 COMMENT=	Statistics for testing association between phenotype and genotypes
-# Check this
 LICENSE=	gnu-gpl-v3
 
 USE_LANGUAGES=	c c++ fortran
 USE_TOOLS+=	gmake pax
 
-CXXFLAGS=	-fopenmp
+MAKE_FILE=	${FILESDIR}/Makefile
+MAKE_ENV+=	BLAS_LIBS=${BLAS_LIBS} LAPACK_LIBS=${LAPACK_LIBS}
+CXXFLAGS+=	-fopenmp
 
-PORTVERSION=	2.3
 DATADIR=	share/bolt-lmm
 EXAMPLESDIR=	share/examples/bolt-lmm
 
@@ -31,18 +31,15 @@ INSTALLATION_DIRS=	bin ${DATADIR} ${EXAMPLESDIR}
 post-patch:
 	${RM} ${WRKSRC}/example/*.orig
 
-pre-build:
-	${CP} ${FILESDIR}/Makefile ${WRKSRC}
-
-post-install:
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/bolt ${DESTDIR}${PREFIX}/bin
 	cd ${WRKSRC} && pax -rw tables ${DESTDIR}${PREFIX}/${DATADIR}
 	cd ${WRKSRC}/example && pax -rw * ${DESTDIR}${PREFIX}/${EXAMPLESDIR}
 	${CHMOD} a+x ${DESTDIR}${PREFIX}/${EXAMPLESDIR}/*.sh
 	${CHMOD} g-w ${DESTDIR}${PREFIX}/${EXAMPLESDIR}/*
 
+.include "../../wip/mk/blas.buildlink3.mk"
 .include "../../math/nlopt/buildlink3.mk"
-.include "../../wip/openblas/buildlink3.mk"
-.include "../../math/lapack/buildlink3.mk"
 .include "../../devel/boost-libs/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/bolt-lmm/PLIST b/bolt-lmm/PLIST
index 3a59534188..e82e15151e 100644
--- a/bolt-lmm/PLIST
+++ b/bolt-lmm/PLIST
@@ -18,6 +18,7 @@ share/examples/bolt-lmm/EUR_subset.dosage2.chr22last100.gz
 share/examples/bolt-lmm/EUR_subset.dosage2.chr22last100.map
 share/examples/bolt-lmm/EUR_subset.dosage2FileList.txt
 share/examples/bolt-lmm/EUR_subset.exclude
+share/examples/bolt-lmm/EUR_subset.exclude2
 share/examples/bolt-lmm/EUR_subset.fam
 share/examples/bolt-lmm/EUR_subset.impute2.chr17first100.gz
 share/examples/bolt-lmm/EUR_subset.impute2.chr17second100
@@ -27,6 +28,7 @@ share/examples/bolt-lmm/EUR_subset.impute2FileList.txt
 share/examples/bolt-lmm/EUR_subset.modelSnps
 share/examples/bolt-lmm/EUR_subset.modelSnps2
 share/examples/bolt-lmm/EUR_subset.pheno.covars
+share/examples/bolt-lmm/EUR_subset.pheno2.covars
 share/examples/bolt-lmm/EUR_subset.remove
 share/examples/bolt-lmm/example.dosage2Snps.stats
 share/examples/bolt-lmm/example.dosageSnps.stats
diff --git a/bolt-lmm/distinfo b/bolt-lmm/distinfo
index 61d390929a..00735ac506 100644
--- a/bolt-lmm/distinfo
+++ b/bolt-lmm/distinfo
@@ -1,11 +1,10 @@
 $NetBSD$
 
-SHA1 (BOLT-LMM_v2.3.tar.gz) = 4f2caf427cbcbe58175e6e5c711c3d8b0c66a9d6
-RMD160 (BOLT-LMM_v2.3.tar.gz) = d0d207f2993d00607f256edb0e9cda57aa0bd800
-SHA512 (BOLT-LMM_v2.3.tar.gz) = a396bb6699fbb87327901a8db46faa45705405160f318796f887b8cd6edd495f10fa460201a4eead57b2bc34adb45f44d26dd59ae12ed2240d4d46b6b6e959e6
-Size (BOLT-LMM_v2.3.tar.gz) = 336986328 bytes
+SHA1 (BOLT-LMM_v2.3.2.tar.gz) = cd6c5acd879dc480437d43bc2f0f33b5add006e4
+RMD160 (BOLT-LMM_v2.3.2.tar.gz) = 25f18d8186390304bd2605a69d8960f76ee46931
+SHA512 (BOLT-LMM_v2.3.2.tar.gz) = 07364e9664c51c866f5c17158a3dd6518fb4063831b54f95fd76bc26f5dd6786541c050522ccc03fe20df7c0bae796c0324580193044d654fa942f86063ccc99
+Size (BOLT-LMM_v2.3.2.tar.gz) = 335057533 bytes
 SHA1 (patch-example_run__example.sh) = e75940a782efd6003a21df0ac2f33a87e6fd18e0
-SHA1 (patch-example_run__example__reml2.sh) = 783c9bbbbc2da7e5f2e17782648da82bb4bfd232
-SHA1 (patch-src_FileUtils.cpp) = d4404507f52d7c2c7a6a50336e7045d3b80b3cc4
-SHA1 (patch-src_Makefile) = e53762b5ca6e8a4d4cf35c5293d3a3bd42efff1f
-SHA1 (patch-src_StringUtils.cpp) = 846adf026fb0485d7393dd9ffa1aec8707d3a5f8
+SHA1 (patch-example_run__example__reml2.sh) = 38295a174999b4be946efd9a97a3be06c5564cee
+SHA1 (patch-src_Makefile) = 84826dcdb8baaca8bd80fa2ad3eb11b19a75d7cf
+SHA1 (patch-src_StringUtils.cpp) = 619a74c6f6b54fde58c8adeff6229d5155827e7f
diff --git a/bolt-lmm/patches/patch-example_run__example__reml2.sh b/bolt-lmm/patches/patch-example_run__example__reml2.sh
index da24a40967..8b72eeed77 100644
--- a/bolt-lmm/patches/patch-example_run__example__reml2.sh
+++ b/bolt-lmm/patches/patch-example_run__example__reml2.sh
@@ -1,7 +1,8 @@
 $NetBSD$
 
-# Use PATH
---- example/run_example_reml2.sh.orig	2017-11-11 20:04:45.202815471 +0000
+# Run from installation instead of build dir
+
+--- example/run_example_reml2.sh.orig	2019-05-24 15:12:23.021935693 +0000
 +++ example/run_example_reml2.sh
 @@ -1,4 +1,6 @@
 -../bolt \
@@ -9,5 +10,5 @@ $NetBSD$
 +
 +bolt \
      --bfile=EUR_subset \
-     --phenoFile=EUR_subset.pheno.covars \
-     --phenoCol=PHENO \
+     --phenoFile=EUR_subset.pheno2.covars \
+     --exclude=EUR_subset.exclude2 \
diff --git a/bolt-lmm/patches/patch-src_FileUtils.cpp b/bolt-lmm/patches/patch-src_FileUtils.cpp
deleted file mode 100644
index b76542db3c..0000000000
--- a/bolt-lmm/patches/patch-src_FileUtils.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
-# Temporary fix
---- src/FileUtils.cpp.orig	2017-08-02 23:43:24.000000000 +0000
-+++ src/FileUtils.cpp
-@@ -275,7 +275,7 @@ namespace FileUtils {
-     uint Layout = (flags>>2)&0xf; cout << "Layout: " << Layout << endl;
-     assert(Layout==1 || Layout==2); // REQUIRE Layout==1 or Layout==2
- 
--    uint SampleIdentifiers = flags>>31; //cout << "SampleIdentifiers: " << SampleIdentifiers << endl;
-+    // uint SampleIdentifiers = flags>>31; cout << "SampleIdentifiers: " << SampleIdentifiers << endl;
-     fseek(fin, offset+4, SEEK_SET);
- 
-     // check first SNP
diff --git a/bolt-lmm/patches/patch-src_Makefile b/bolt-lmm/patches/patch-src_Makefile
index 614d76a3b5..86b1df84ad 100644
--- a/bolt-lmm/patches/patch-src_Makefile
+++ b/bolt-lmm/patches/patch-src_Makefile
@@ -1,25 +1,27 @@
 $NetBSD$
 
-# Standardize make vars
---- src/Makefile.orig	2017-08-03 00:14:08.000000000 +0000
+# Respect build env
+
+--- src/Makefile.orig	2018-03-13 02:44:52.000000000 +0000
 +++ src/Makefile
-@@ -1,28 +1,33 @@
+@@ -1,29 +1,34 @@
  ### modify these paths to local Boost and NLopt install directories
 -BOOST_INSTALL_DIR = /home/pl88/boost_1_58_0/install
--NLOPT_INSTALL_DIR = /groups/price/poru/HSPH_SVN/src/BOLT-LMM/nlopt-2.4.2
-+BOOST_INSTALL_DIR ?= ${LOCALBASE}
-+# NLOPT_INSTALL_DIR ?= ${LOCALBASE}
+-NLOPT_INSTALL_DIR = /n/groups/price/poru/HSPH_SVN/src/BOLT-LMM/nlopt-2.4.2
++BOOST_INSTALL_DIR ?= ${PREFIX}
++NLOPT_INSTALL_DIR ?= ${PREFIX}
 +
 +MKDIR ?=	mkdir
 +DESTDIR ?=	.
 +PREFIX ?=	/usr/local
 +INSTALL ?=	install
  
- MKLROOT = /groups/price/poru/external_software/intel/mkl
- INTELROOT = /groups/price/poru/external_software/intel
--ZLIB_STATIC_DIR = /opt/zlib-1.2.8/lib # probably unnecessary on most systems
+ INTELROOT = /n/groups/price/poru/external_software/intel_mkl_2018
+ MKLROOT = ${INTELROOT}/mkl
+-ZLIB_STATIC_DIR = /n/groups/price/poru/external_software/zlib/zlib-1.2.11 # probably unnecessary on most systems
++ZLIB_STATIC_DIR ?= ${PREFIX}
+ LIBSTDCXX_STATIC_DIR = /n/groups/price/poru/external_software/libstdc++/usr/lib/gcc/x86_64-redhat-linux/4.8.5/
 -GLIBC_STATIC_DIR = /home/pl88/glibc-static/usr/lib64
-+ZLIB_STATIC_DIR ?= /usr/lib
 +GLIBC_STATIC_DIR ?= /home/pl88/glibc-static/usr/lib64
  
  ifeq ($(strip ${linking}),)
@@ -27,9 +29,9 @@ $NetBSD$
  endif
  
 -# CC = g++
--CC = /groups/price/poru/external_software/intel/bin/icpc
+-CC = icpc
 +# CXX = g++
-+CXX ?= /groups/price/poru/external_software/intel/bin/icpc
++CXX ?= icpc
  
  ifeq (${debug},true)
 -	CFLAGS += -g
@@ -48,7 +50,7 @@ $NetBSD$
  
  
  # add Boost include and lib paths
-@@ -51,7 +56,7 @@ ifneq ($(strip ${ZLIB_STATIC_DIR}),)
+@@ -52,7 +57,7 @@ ifneq ($(strip ${ZLIB_STATIC_DIR}),)
  endif
  
  # add MKL paths (if not compiling with g++, i.e., compiling with icpc)
@@ -57,7 +59,7 @@ $NetBSD$
  	CPATHS += -I${MKLROOT}/include
  	ifeq (${linking},dynamic)
  		LPATHS += -L${MKLROOT}/lib/intel64 -Wl,-rpath,${MKLROOT}/lib/intel64 # for libmkl*
-@@ -60,28 +65,28 @@ ifneq (${CC},g++)
+@@ -61,28 +66,28 @@ ifneq (${CC},g++)
  endif
  
  # add flags for static linking; build LAPACK/MKL component of link line
@@ -68,7 +70,7 @@ $NetBSD$
 +ifeq (${CXX},${CXX})
 +	CXXFLAGS += -fopenmp
 +	LDFLAGS += -fopenmp
-+	LLAPACK = -llapack -lopenblas -lgfortran
++	LLAPACK = ${BLAS_LIBS} ${LAPACK_LIBS} -lgfortran
  	ifeq (${linking},static)
 -		LFLAGS += -static
 +		LDFLAGS += -static
@@ -98,8 +100,12 @@ $NetBSD$
  		LPATHS += -L${ZLIB_STATIC_DIR}
  		LLAPACK = -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_intel_thread.a -Wl,--end-group
  	else
-@@ -107,14 +112,20 @@ T = bolt
- O = Bolt.o BoltParams.o BoltParEstCV.o BoltReml.o CovariateBasis.o DataMatrix.o FileUtils.o Jackknife.o LDscoreCalibration.o MapInterpolater.o MatrixUtils.o MemoryUtils.o NonlinearOptMulti.o NumericUtils.o PhenoBuilder.o RestrictSnpSet.o SnpData.o SnpInfo.o SpectrumTools.o StatsUtils.o StringUtils.o Timer.o
+@@ -105,16 +110,18 @@ endif
+ 
+ 
+ T = bolt
+-O = Bolt.o BoltParams.o BoltParEstCV.o BoltReml.o CovariateBasis.o DataMatrix.o FileUtils.o Jackknife.o LDscoreCalibration.o MapInterpolater.o MatrixUtils.o MemoryUtils.o NonlinearOptMulti.o NumericUtils.o PhenoBuilder.o RestrictSnpSet.o SnpData.o SnpInfo.o SpectrumTools.o StatsUtils.o StringUtils.o Timer.o memcpy.o
++O = Bolt.o BoltParams.o BoltParEstCV.o BoltReml.o CovariateBasis.o DataMatrix.o FileUtils.o Jackknife.o LDscoreCalibration.o MapInterpolater.o MatrixUtils.o MemoryUtils.o NonlinearOptMulti.o NumericUtils.o PhenoBuilder.o RestrictSnpSet.o SnpData.o SnpInfo.o SpectrumTools.o StatsUtils.o StringUtils.o Timer.o
  OMAIN = BoltMain.o $O
  
 -.PHONY: clean
@@ -117,8 +123,3 @@ $NetBSD$
  
  clean:
  	rm -f *.o
- 	rm -f $T
-+
-+install:
-+	${MKDIR} ${DESTDIR}${PREFIX}/bin
-+	${INSTALL} -c -s $T ${DESTDIR}${PREFIX}/bin
diff --git a/bolt-lmm/patches/patch-src_StringUtils.cpp b/bolt-lmm/patches/patch-src_StringUtils.cpp
index 8266b7077c..6de1eaea24 100644
--- a/bolt-lmm/patches/patch-src_StringUtils.cpp
+++ b/bolt-lmm/patches/patch-src_StringUtils.cpp
@@ -1,7 +1,8 @@
 $NetBSD$
 
-# Missing header
---- src/StringUtils.cpp.orig	2017-08-02 23:43:24.000000000 +0000
+# Portability
+
+--- src/StringUtils.cpp.orig	2019-05-24 15:09:56.720778471 +0000
 +++ src/StringUtils.cpp
 @@ -22,6 +22,7 @@
  #include <cstdio>


Home | Main Index | Thread Index | Old Index