pkgsrc-WIP-changes archive

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

plink2: 2.00-alpha version of plink genome association analysis



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Thu May 3 11:38:22 2018 -0500
Changeset:	cd964df81a474437bf8c1bf2dbcac2c1f30b7043

Modified Files:
	Makefile
Added Files:
	plink2/DESCR
	plink2/Makefile
	plink2/PLIST
	plink2/distinfo
	plink2/patches/patch-Makefile
	plink2/patches/patch-plink2__base.h

Log Message:
plink2: 2.00-alpha version of plink genome association analysis

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

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

diffstat:
 Makefile                            |  1 +
 plink2/DESCR                        |  3 ++
 plink2/Makefile                     | 41 ++++++++++++++++
 plink2/PLIST                        |  3 ++
 plink2/distinfo                     |  8 ++++
 plink2/patches/patch-Makefile       | 93 +++++++++++++++++++++++++++++++++++++
 plink2/patches/patch-plink2__base.h | 15 ++++++
 7 files changed, 164 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 44cf2579ab..119b5924ce 100644
--- a/Makefile
+++ b/Makefile
@@ -2793,6 +2793,7 @@ SUBDIR+=	plasti
 SUBDIR+=	plconfig
 SUBDIR+=	plibsys
 SUBDIR+=	plink
+SUBDIR+=	plink2
 SUBDIR+=	plod
 SUBDIR+=	plover-git
 SUBDIR+=	plover-wxgtk
diff --git a/plink2/DESCR b/plink2/DESCR
new file mode 100644
index 0000000000..8e4e62b399
--- /dev/null
+++ b/plink2/DESCR
@@ -0,0 +1,3 @@
+PLINK is a free, open-source whole genome association analysis toolset,
+designed to perform a range of basic, large-scale analyses in a
+computationally efficient manner.
diff --git a/plink2/Makefile b/plink2/Makefile
new file mode 100644
index 0000000000..e0f37654d4
--- /dev/null
+++ b/plink2/Makefile
@@ -0,0 +1,41 @@
+# $NetBSD$
+#
+###########################################################
+#                  Generated by fbsd2pkg                  #
+#              Thu May  3 10:32:03 CDT 2018               #
+###########################################################
+
+DISTNAME=	plink-ng-${PORTVERSION}
+CATEGORIES=	wip biology
+MASTER_SITES=	${MASTER_SITE_GITHUB:=chrchang/}
+GITHUB_PROJECT=	plink-ng
+GITHUB_TAG=	d046d8dfbbba50065644bbe9647edbe94a29b1a2
+
+MAINTAINER=	bacon%NetBSD.org@localhost
+HOMEPAGE=	http://pngu.mgh.harvard.edu/~purcell/plink/
+COMMENT=	Whole genome association analysis toolset
+# Check this
+LICENSE=	gnu-gpl-v2
+
+# Test and change if necessary.
+# MAKE_JOBS_SAFE=	no
+
+# Just assuming C and C++: Adjust this!
+USE_LANGUAGES=	c c++ fortran
+USE_TOOLS+=	gmake
+
+WRKSRC=		${WRKDIR}/${GITHUB_PROJECT}-${GITHUB_TAG}/2.0
+
+CFLAGS+=	-DDYNAMIC_ZLIB -I${PREFIX}/include
+CXXFLAGS+=	-DDYNAMIC_ZLIB -I${PREFIX}/include
+
+# Check this
+MAKE_FLAGS+=	ZLIB=-lz BLASFLAGS64="-L${PREFIX}/lib -lopenblas_pthread"
+INSTALL_TARGET=	install-strip
+
+PORTVERSION=	g20180428
+
+.include "../../wip/openblas_pthread/buildlink3.mk"
+.include "../../wip/cblas/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/plink2/PLIST b/plink2/PLIST
new file mode 100644
index 0000000000..d038df4f27
--- /dev/null
+++ b/plink2/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD$
+bin/pgen_compress
+bin/plink2
diff --git a/plink2/distinfo b/plink2/distinfo
new file mode 100644
index 0000000000..3f588c4ccb
--- /dev/null
+++ b/plink2/distinfo
@@ -0,0 +1,8 @@
+$NetBSD$
+
+SHA1 (plink-ng-g20180428-d046d8dfbbba50065644bbe9647edbe94a29b1a2.tar.gz) = e8195a41e11df02d85dde78815addc292a99ccf2
+RMD160 (plink-ng-g20180428-d046d8dfbbba50065644bbe9647edbe94a29b1a2.tar.gz) = 26bd7f222afe85ff880e6bbe3e30220439c235ff
+SHA512 (plink-ng-g20180428-d046d8dfbbba50065644bbe9647edbe94a29b1a2.tar.gz) = 75faf6427c12535b180694efe89b94764f2807254f458821ef5f438762f8ded5d4b432a0534e66851ef4c4e1e5dc965bae870d1bb143ffe5c7c235854a501448
+Size (plink-ng-g20180428-d046d8dfbbba50065644bbe9647edbe94a29b1a2.tar.gz) = 2359459 bytes
+SHA1 (patch-Makefile) = 3110bb122f7992fc70723cef23e278adf19836e3
+SHA1 (patch-plink2__base.h) = edeb6ef6ca2cf4b11c7ee008ef8bbec6c979d739
diff --git a/plink2/patches/patch-Makefile b/plink2/patches/patch-Makefile
new file mode 100644
index 0000000000..b0e3d1084b
--- /dev/null
+++ b/plink2/patches/patch-Makefile
@@ -0,0 +1,93 @@
+$NetBSD$
+
+# Respect env, add install target
+
+--- Makefile.orig	2018-04-28 18:49:38 UTC
++++ Makefile
+@@ -1,43 +1,68 @@
++
+ BASEFLAGS=-Wall -Wextra -Wshadow -Wformat-security -mavx2 -mbmi -mbmi2 -mlzcnt -DNDEBUG -DZSTD_MULTITHREAD
+ # BASEFLAGS=-Wall -Wextra -Wshadow -Wformat-security -mavx2 -mbmi -mbmi2 -mlzcnt -DZSTD_MULTITHREAD
+ # BASEFLAGS=-Wall -Wextra -Wshadow -Wformat-security -msse4.2 -DNDEBUG -DZSTD_MULTITHREAD
+-CFLAGS=-O3 -std=gnu99
+-# this actually needs to be named "CXXFLAGS"
+-CXXFLAGS=-O2 -std=c++14 -Wold-style-cast
+ 
+-CFLAGS += ${BASEFLAGS}
+-CXXFLAGS += ${BASEFLAGS}
++include Makefile.src
+ 
+-ZLIB=../zlib-1.2.11/libz-64.a
+-BLASFLAGS64=-llapack -lf77blas -latlas
+-LINKFLAGS=-lm -lpthread -L. ${ZLIB}
+-ARCH32=
++# Respect the environment:
++# Use defaults below only if not set in env or make arguments
++CC		?= gcc
++CXX		?= g++
++CFLAGS		?= -O3
++CXXFLAGS	?= -O2
++ZLIB		?= ../zlib-1.2.11/libz-64.a
++BLASFLAGS64	?= -llapack -lf77blas -latlas
++ARCH32		?=
++
++# Mandatory flags added to defaults or env settings
++CFLAGS		+= -std=gnu99 $(BASEFLAGS) $(CINCLUDE) $(ZSTD_INCLUDE)
++CXXFLAGS	+= -std=c++14 -Wold-style-cast $(BASEFLAGS)
++LDFLAGS		+= -lm -lpthread -L. $(ZLIB)
++
++# Installation defaults
++MKDIR		?= mkdir
++INSTALL		?= install
++STRIP_CMD	?= strip
++PREFIX		?= /usr/local
++DESTDIR		?= .
+ 
+ UNAME := $(shell uname)
+ ifeq ($(UNAME), Darwin)
+   BLASFLAGS=-framework Accelerate
+   BLASFLAGS64=-framework Accelerate
+-  LINKFLAGS=-ldl -lpthread -lz
++  LDFLAGS=-ldl -lpthread -lz
+ endif
+ 
+-include Makefile.src
+-CFLAGS += ${CINCLUDE} ${ZSTD_INCLUDE}
+-
+ %.o: %.c
+-	gcc -c $(CFLAGS) $(ARCH32) -o $@ $<
++	$(CC) -c $(CFLAGS) $(ARCH32) -o $@ $<
++
+ %.o: %.cc
+-	g++ -c $(CXXFLAGS) $(ARCH32) -o $@ $<
++	$(CXX) -c $(CXXFLAGS) $(ARCH32) -o $@ $<
+ 
+ all: plink2 pgen_compress
+ 
+ # for clean build, "make clean" first
++# Run mkdir for both plink2 and pgen_compress as we don't know which
++# target will run first
+ plink2: $(OBJ)
+-	g++ $(ARCH32) $(OBJ) -o bin/plink2 $(BLASFLAGS64) $(LINKFLAGS)
++	$(MKDIR) -p bin
++	$(CXX) $(ARCH32) $(OBJ) -o bin/plink2 $(BLASFLAGS64) $(LDFLAGS)
+ 
+ # basic pgenlib_internal.h usage example; also needed for tests
+ pgen_compress: plink2_base.o pgenlib_internal.o pgen_compress.o
+-	g++ plink2_base.o pgenlib_internal.o pgen_compress.o -o bin/pgen_compress
++	$(MKDIR) -p bin
++	$(CXX) plink2_base.o pgenlib_internal.o pgen_compress.o \
++		-o bin/pgen_compress
++
++.PHONY: install-strip install clean
++
++install-strip: install
++	$(STRIP_CMD) $(DESTDIR)$(PREFIX)/bin/*
++
++install: all
++	$(MKDIR) -p $(DESTDIR)$(PREFIX)/bin
++	$(INSTALL) -c bin/* $(DESTDIR)$(PREFIX)/bin
+ 
+-.PHONY: clean
+ clean:
+ 	rm -f $(CLEAN)
diff --git a/plink2/patches/patch-plink2__base.h b/plink2/patches/patch-plink2__base.h
new file mode 100644
index 0000000000..580f2a87ca
--- /dev/null
+++ b/plink2/patches/patch-plink2__base.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+# Fix build error
+
+--- plink2_base.h.orig	2018-05-03 13:55:25 UTC
++++ plink2_base.h
+@@ -433,7 +433,7 @@ 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


Home | Main Index | Thread Index | Old Index