summaryrefslogtreecommitdiff
path: root/biology/gatk/Makefile
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2021-01-22 02:50:38 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2021-01-22 02:50:38 +0000
commit9607e839e297087b0c2a6e2db3e9fabc8d0a4982 (patch)
tree7fb9468711663be5a084af27b628ce49753f3ea7 /biology/gatk/Makefile
parent- Update to 2.89.0 (diff)
biology/gatk: Add the WITH_LARGE_FILES option.
Notes
Notes: svn path=/head/; revision=562270
Diffstat (limited to 'biology/gatk/Makefile')
-rw-r--r--biology/gatk/Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/biology/gatk/Makefile b/biology/gatk/Makefile
index ef0a4d73c111..8e7ea5531409 100644
--- a/biology/gatk/Makefile
+++ b/biology/gatk/Makefile
@@ -2,6 +2,7 @@
PORTNAME= gatk
DISTVERSION= 4.1.9.0
+PORTREVISION= 1
CATEGORIES= biology java
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
@@ -41,6 +42,35 @@ PLIST_FILES= bin/${PORTNAME} \
DEV_UPDATE_MODE= no
+OPTIONS_DEFINE= WITH_LARGE_FILES # probably should be default for tests, but the build doesn't seem to be affected contrary to what README says
+
+WITH_LARGE_FILES_DESC= Download large LFS files needed for build and tests
+WITH_LARGE_FILES_FETCH_DEPENDS= git:devel/git \
+ git-lfs:devel/git-lfs
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MWITH_LARGE_FILES}
+do-fetch:
+ @if [ "${FORCE_FETCH_ALL}" = "true" ] || ! [ -f "${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}${EXTRACT_SUFX}" ]; then \
+ ${MKDIR} ${DISTDIR}/${DIST_SUBDIR} && \
+ cd ${DISTDIR}/${DIST_SUBDIR} && \
+ ${ECHO} "==> Fetching ${PORTNAME} including large LFS files" && \
+ ( \
+ ${MKDIR} ${WRKDIR}; \
+ HOME=${WRKDIR}; \
+ git config --global filter.lfs.smudge "git-lfs smudge -- %f" && \
+ git clone -q https://github.com/broadinstitute/gatk.git ${PORTNAME}-${DISTVERSION} && \
+ (cd ${PORTNAME}-${DISTVERSION} && git reset -q --hard ${DISTVERSION} && ${RM} -r .git) && \
+ ${RM} -r ${WRKDIR} \
+ ) && \
+ ${FIND} ${PORTNAME}-${DISTVERSION} -and -exec ${TOUCH} -h -d 1970-01-01T00:00:00Z {} \; && \
+ ${FIND} ${PORTNAME}-${DISTVERSION} -print0 | LC_ALL=C ${SORT} -z | \
+ ${TAR} czf ${DISTNAME}${EXTRACT_SUFX} --format=bsdtar --gid 0 --uid 0 --options gzip:!timestamp --no-recursion --null -T - && \
+ ${RM} -r ${PORTNAME}-${DISTVERSION}; \
+ fi
+.endif
+
.if (${DEV_UPDATE_MODE} == "yes")
post-build:
@cd ${DEPS_CACHE_DIR} && ${TAR} czf ${DISTDIR}/${PORTNAME}-${DISTVERSION}-deps${EXTRACT_SUFX} gradle-${PORTNAME}