pkgsrc-WIP-changes archive

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

plink2: Update to latest commit, add test script



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Sun Feb 10 16:54:44 2019 -0600
Changeset:	89d38249292607e165f7c82447e83fe65a580f50

Modified Files:
	plink2/Makefile
	plink2/PLIST
	plink2/distinfo
Added Files:
	plink2/files/plink2-test.in
Removed Files:
	plink2/patches/patch-plink2__base.h

Log Message:
plink2: Update to latest commit, add test script

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

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

diffstat:
 plink2/Makefile                     | 20 ++++++++++++++++----
 plink2/PLIST                        | 19 +++++++++++++++++++
 plink2/distinfo                     |  9 ++++-----
 plink2/files/plink2-test.in         | 23 +++++++++++++++++++++++
 plink2/patches/patch-plink2__base.h | 21 ---------------------
 5 files changed, 62 insertions(+), 30 deletions(-)

diffs:
diff --git a/plink2/Makefile b/plink2/Makefile
index eb7d21fde4..8bcafbc61a 100644
--- a/plink2/Makefile
+++ b/plink2/Makefile
@@ -5,11 +5,12 @@
 #              Thu May  3 10:32:03 CDT 2018               #
 ###########################################################
 
-DISTNAME=	plink-ng-${PORTVERSION}
+DISTNAME=	plink-ng-${PV}
+PKGNAME=	plink2-${PV}
 CATEGORIES=	biology
 MASTER_SITES=	${MASTER_SITE_GITHUB:=chrchang/}
 GITHUB_PROJECT=	plink-ng
-GITHUB_TAG=	f758bbd77e04eb0cb46fbc633be60b22b8b3cc2d
+GITHUB_TAG=	00aaeb53d3edd569c93bd60e7bcd27ced4cd8fdb
 
 MAINTAINER=	bacon%NetBSD.org@localhost
 HOMEPAGE=	http://pngu.mgh.harvard.edu/~purcell/plink/
@@ -17,7 +18,7 @@ COMMENT=	Whole genome association analysis toolset
 LICENSE=	gnu-gpl-v2
 
 USE_LANGUAGES=	c c++ fortran
-USE_TOOLS+=	gmake
+USE_TOOLS+=	gmake pax
 
 WRKSRC=		${WRKDIR}/${GITHUB_PROJECT}-${GITHUB_TAG}/2.0
 
@@ -29,11 +30,22 @@ MAKE_FLAGS+=	ZLIB=-lz BLASFLAGS64="-L${PREFIX}/lib -llapack -lcblas -lblas"
 # Keep debug info until at least next beta
 # INSTALL_TARGET=	install-strip
 
-PORTVERSION=		0.0.0.20180518
+PV=		0.0.0.20190202
 USE_BUILTIN.zlib=	no
 
 MAKE_FILE=	${FILESDIR}/Makefile.generic
 
+DATADIR=	${PREFIX}/share/plink2
+
+post-install:
+	(cd ${WRKSRC} && pax -rw Tests ${DESTDIR}${DATADIR})
+	${CHMOD} a+x \
+		${DESTDIR}${DATADIR}/Tests/run_tests.sh \
+		${DESTDIR}${DATADIR}/Tests/*/run_tests.sh
+	${SED} -e "s|%%DATADIR%%|${DATADIR}|g" ${FILESDIR}/plink2-test.in \
+		> ${WRKDIR}/plink2-test
+	${INSTALL_SCRIPT} ${WRKDIR}/plink2-test ${DESTDIR}${PREFIX}/bin
+
 # .include "../../wip/openblas/buildlink3.mk"
 .include "../../math/blas/buildlink3.mk"
 .include "../../math/lapack/buildlink3.mk"
diff --git a/plink2/PLIST b/plink2/PLIST
index d038df4f27..03ef5c60ef 100644
--- a/plink2/PLIST
+++ b/plink2/PLIST
@@ -1,3 +1,22 @@
 @comment $NetBSD$
 bin/pgen_compress
 bin/plink2
+bin/plink2-test
+share/plink2/Tests/TEST_DOSAGE_ROUND_TRIP/.gitignore
+share/plink2/Tests/TEST_DOSAGE_ROUND_TRIP/run_tests.sh
+share/plink2/Tests/TEST_EXTRACT_CHR/.gitignore
+share/plink2/Tests/TEST_EXTRACT_CHR/run_tests.sh
+share/plink2/Tests/TEST_EXTRACT_CHR/simulate.txt
+share/plink2/Tests/TEST_MAF_FILTER/.gitignore
+share/plink2/Tests/TEST_MAF_FILTER/run_tests.sh
+share/plink2/Tests/TEST_MAF_FILTER/simulate.txt
+share/plink2/Tests/TEST_PGEN_FREQ/.gitignore
+share/plink2/Tests/TEST_PGEN_FREQ/run_tests.sh
+share/plink2/Tests/TEST_PGEN_FREQ/simulate.txt
+share/plink2/Tests/TEST_PHASED_VCF/.gitignore
+share/plink2/Tests/TEST_PHASED_VCF/1kg_phase3_chr21_start.vcf.gz
+share/plink2/Tests/TEST_PHASED_VCF/pca_compare.py
+share/plink2/Tests/TEST_PHASED_VCF/run_tests.sh
+share/plink2/Tests/TEST_SAMPLE_SUBSET/.gitignore
+share/plink2/Tests/TEST_SAMPLE_SUBSET/run_tests.sh
+share/plink2/Tests/run_tests.sh
diff --git a/plink2/distinfo b/plink2/distinfo
index 3871d19c97..3bfbb64acd 100644
--- a/plink2/distinfo
+++ b/plink2/distinfo
@@ -1,7 +1,6 @@
 $NetBSD$
 
-SHA1 (plink-ng-0.0.0.20180518-f758bbd77e04eb0cb46fbc633be60b22b8b3cc2d.tar.gz) = 54d0a0dedbb9dfdd5e9be1570df9463f54f2fc3b
-RMD160 (plink-ng-0.0.0.20180518-f758bbd77e04eb0cb46fbc633be60b22b8b3cc2d.tar.gz) = 7be21109553e1a984f96e19887b5179bd6e94937
-SHA512 (plink-ng-0.0.0.20180518-f758bbd77e04eb0cb46fbc633be60b22b8b3cc2d.tar.gz) = 412f3b27b509fd731f816739a8155c77d407af6761749ce9b3eaabfa0e701426134c1bf4862101c379bbf63f97b425726b49283aa0dd96d74976c56e03a15426
-Size (plink-ng-0.0.0.20180518-f758bbd77e04eb0cb46fbc633be60b22b8b3cc2d.tar.gz) = 2392148 bytes
-SHA1 (patch-plink2__base.h) = 5261f0a92966fe51eec8f270a2a8eb81216e531a
+SHA1 (plink-ng-0.0.0.20190202-00aaeb53d3edd569c93bd60e7bcd27ced4cd8fdb.tar.gz) = d81b063f5200b40991a5e080e65342fb7e676bac
+RMD160 (plink-ng-0.0.0.20190202-00aaeb53d3edd569c93bd60e7bcd27ced4cd8fdb.tar.gz) = e5ae2e4ec8a4685e0ab6e5afa6dff5c5ed0ddb36
+SHA512 (plink-ng-0.0.0.20190202-00aaeb53d3edd569c93bd60e7bcd27ced4cd8fdb.tar.gz) = 48edbac63ebbaa1f7ee5bb287fbed43b4052c4e15a76fb2299a9dfe71a580feb6a10cf4da57d2b314af68dc1886d462476aa9d8a440c817e23be7f9a09729c65
+Size (plink-ng-0.0.0.20190202-00aaeb53d3edd569c93bd60e7bcd27ced4cd8fdb.tar.gz) = 2566557 bytes
diff --git a/plink2/files/plink2-test.in b/plink2/files/plink2-test.in
new file mode 100755
index 0000000000..e11b3c80f4
--- /dev/null
+++ b/plink2/files/plink2-test.in
@@ -0,0 +1,23 @@
+#!/bin/sh -e
+
+if ! which plink; then
+    cat << EOM
+
+You must install both plink and plink2 before running the plink2 tests.
+
+EOM
+    exit 1
+fi
+
+if [ -e plink2-Tests ]; then
+    cat << EOM
+
+plink2-Tests already exits.  Remove it first if you want to run $0.
+
+EOM
+    exit 1
+fi
+
+cp -R %%DATADIR%%/Tests plink2-Tests
+cd plink2-Tests
+./run_tests.sh
diff --git a/plink2/patches/patch-plink2__base.h b/plink2/patches/patch-plink2__base.h
deleted file mode 100644
index 79dc454985..0000000000
--- a/plink2/patches/patch-plink2__base.h
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD$
-
-# Portability
-
---- plink2_base.h.orig	2018-05-18 05:07:50.000000000 +0000
-+++ plink2_base.h
-@@ -448,10 +448,13 @@ typedef uint32_t BoolErr;
- #  define FOPEN_RB "r"
- #  define FOPEN_WB "w"
- #  define FOPEN_AB "a"
--#  ifdef __APPLE__
-+#  if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
- #    define fread_unlocked fread
- #    define fwrite_unlocked fwrite
- #  endif
-+#  if defined(__NetBSD__)
-+#    define ferror_unlocked ferror
-+#  endif
- #endif
- 
- #ifdef _WIN32


Home | Main Index | Thread Index | Old Index