# $NetBSD$
#
###########################################################
#               Generated by fbsd2pkg                     #
###########################################################

###########################################################
# Unconverted and partially converted FreeBSD port syntax:

# Unknown tool: USE_TOOLS=	cmake:outsource
# CMAKE_ARGS+=	-DLIB_DIR=${PREFIX}/lib
# # Just for speed: Recent compilers have better optimizers
# Unknown tool: USE_TOOLS=	compiler:c++11-lang
# .if ${ARCH} == i386
# MAKE_ENV+=	POPCNT_CAPABILITY=0
# .endif
# post-patch:
# 	${REINPLACE_CMD} -e 's|lib/bamtools|lib|g' \
# 		work/bamtools-2.4.0/src/api/CMakeLists.txt

DISTNAME=	bamtools-${PORTVERSION}
CATEGORIES=	biology
MASTER_SITES=	${MASTER_SITE_GITHUB:=pezmaster31/}
GITHUB_TAG=	v${PORTVERSION}

MAINTAINER=	dsiercks@uwm.edu
HOMEPAGE=	https://github.com/pezmaster31/bamtools
COMMENT=	API and toolkit for handling BAM files
# Double-check this
LICENSE=	mit

# Just assuming C and C++: Adjust this!
USE_CMAKE=	yes
USE_LANGUAGES=	c c++
CMAKE_ARG_PATH=	..
CONFIGURE_DIRS=	_build

pre-configure:
	${MKDIR} ${WRKSRC}/_build

WRKSRC=		${WRKDIR}/bamtools-${PORTVERSION}

SUBST_CLASSES+=			bamtools_lib
SUBST_STAGE.bamtools_lib=	post-patch
SUBST_FILES.bamtools_lib=	${WRKSRC}/src/api/CMakeLists.txt
SUBST_SED.bamtools_lib=		-e 's|lib/bamtools|lib|g'

#SUBST_CLASSES+=		bluetooth
#SUBST_STAGE.bluetooth=	post-patch
#SUBST_FILES.bluetooth=	${WRKSRC}/Commands/Legoctl/Makefile
#SUBST_SED.bluetooth=	-e 's|-lbluetooth||g'

PORTVERSION=	2.4.0

.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
