summaryrefslogtreecommitdiff
path: root/biology/ncbi-entrez-direct/Makefile
blob: 109f8ee76515d68d4dca26879604c238744ccec3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
PORTNAME=	ncbi-entrez-direct
DISTVERSION=	14.9.20210423
PORTREVISION=	5
CATEGORIES=	biology perl5
MASTER_SITES=	ftp://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/${PORTVERSION}/
DISTFILES=	edirect.tar.gz
DIST_SUBDIR=	edirect-${PORTVERSION}

MAINTAINER=	jwb@FreeBSD.org
COMMENT=	Access to the NCBI's suite of interconnected databases

LICENSE=	PD

BUILD_DEPENDS=	bash:shells/bash
RUN_DEPENDS=	p5-libwww>=0:www/p5-libwww \
		p5-LWP-Protocol-https>=0:www/p5-LWP-Protocol-https \
		p5-XML-Simple>=0:textproc/p5-XML-Simple \
		curl:ftp/curl

USES=		go:modules perl5 shebangfix
USE_GITHUB=	nodefault

CONFLICTS_INSTALL=	ebook-tools p5-XML-Compile # bin/einfo bin/xml2json

# Dependency versions:
#	make clean extract
# 	cd ${WRKSRC}/cmd
#	rm -r vendor
#	../../../files/build-cmd
# files/modules.txt: cd ${WRKSRC}/cmd && go mod vendor
GHSD=		vendor/github.com
GLSD=		vendor/golang.org
GH_TUPLE=	fatih:color:v1.10.0:a/${GHSD}/fatih/color \
		surgebase:porter2:56e4718818e8:b/${GHSD}/surgebase/porter2 \
		gedex:inflector:16278e9db813:c/${GHSD}/gedex/inflector \
		klauspost:cpuid:v1.3.1:d/${GHSD}/klauspost/cpuid \
		pbnjay:memory:b12e5d931931:e/${GHSD}/pbnjay/memory \
		mattn:go-colorable:v0.1.8:f/${GHSD}/mattn/go-colorable \
		mattn:go-isatty:v0.0.12:g/${GHSD}/mattn/go-isatty \
		fiam:gounidecode:8deddbd03fec:h/${GHSD}/fiam/gounidecode \
		golang:text:v0.3.5:i/${GLSD}/x/text \
		golang:sys:d5e6a3e2c0ae:j/${GLSD}/x/sys

SHEBANG_FILES=	nquire edirect.pl word-at-a-time accn-at-a-time \
		amino-acid-composition between-two-genes exclude-uid-lists \
		filter-stop-words intersect-uid-lists phrase-search \
		skip-if-file-exists theme-aliases test-edirect hgvs2spdi 

PSCRIPTS=	efetch efilter einfo elink epost esearch esummary nquire
SCRIPTS=	accn-at-a-time amino-acid-composition archive-pubmed \
		between-two-genes download-ncbi-data download-pubmed \
		download-sequence efetch efilter einfo elink epost \
		esample esearch esummary exclude-uid-lists expand-current \
		fetch-pubmed filter-stop-words gbf2xml index-extras \
		index-pubmed intersect-uid-lists join-into-groups-of \
		nquire phrase-search pm-collect pm-index pm-invert pm-merge \
		pm-prepare pm-promote pm-refresh pm-stash rchive \
		reorder-columns run-ncbi-converter skip-if-file-exists \
		ecommon.sh sort-uniq-count sort-uniq-count-rank stream-pubmed \
		theme-aliases transmute word-at-a-time xml2tbl xtract xy-plot \
		hlp-xtract.txt transmute xml2json xtract test-edirect \
		align-columns hgvs2spdi sort-table print-columns

post-extract:
	@${MV} ${WRKDIR}/edirect/* ${WRKSRC}
	@${RMDIR} ${WRKDIR}/edirect
	@${MV} ${WRKSRC}/vendor ${WRKSRC}/cmd

pre-configure:
	@cd ${WRKSRC} && ${REINPLACE_CMD} \
		-e 's|$$PATH:$$pth|$$PATH:${PREFIX}/bin|g' \
		-e 's|"$$pth"|${PREFIX}/bin|g' \
		${PSCRIPTS}

do-build:
	@${CP} ${FILESDIR}/modules.txt ${WRKSRC}/cmd/vendor
	@${CP} -R ${WRKSRC}/eutils ${WRKSRC}/cmd/vendor
	@cd ${WRKSRC}/cmd && ${SETENV} ${MAKE_ENV} ${FILESDIR}/build-cmd

do-install:
	cd ${WRKSRC} && ${INSTALL_SCRIPT} ${SCRIPTS} ${STAGEDIR}${PREFIX}/bin
	${INSTALL_SCRIPT} ${WRKSRC}/edirect.pl ${STAGEDIR}${PREFIX}/bin
	${INSTALL_PROGRAM} ${WRKSRC}/cmd/*.FreeBSD ${STAGEDIR}${PREFIX}/bin

.include <bsd.port.mk>