# $NetBSD$
#
###########################################################
#                  Generated by fbsd2pkg                  #
#              Tue Jul 31 09:11:25 CDT 2018               #
###########################################################

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

## $FreeBSD$
# LIB_DEPENDS=	libboost_iostreams.so:devel/boost-libs
# RUN_DEPENDS=	uchime>=0:wip/uchime
# Unknown tool: USE_TOOLS=	readline
##MAKEFILE=	makefile
#PLIST_FILES=	bin/mothur

DISTNAME=	mothur-${PORTVERSION}
CATEGORIES=	wip
MASTER_SITES=	${MASTER_SITE_GITHUB:=mothur/}
GITHUB_PROJECT=	mothur
GITHUB_TAG=	v${PORTVERSION}

MAINTAINER=	dsiercks@uwm.edu
HOMEPAGE=	http://www.mothur.org/
COMMENT=	Bioinformatics tool for the microbial ecology community
# Check this
LICENSE=	gnu-gpl-v3

# Test and change if necessary.
# MAKE_JOBS_SAFE=	no

# Just assuming C and C++: Adjust this!
USE_LANGUAGES=	c c++
USE_TOOLS+=	gmake
BUILD_TARGET=	 mothur

PORTVERSION=	1.40.5	
DATADIR=	${PREFIX}/share/mothur
DOCSDIR=	${PREFIX}/share/doc/mothur
EXAMPLESDIR=	${PREFIX}/share/examples/mothur

DEPENDS+=	vsearch>=0:../../wip/vsearch


SUBST_CLASSES+=                thread1
SUBST_STAGE.thread1= post-patch
SUBST_SED.thread1=  -e "s|thread[*]|std::thread*|g"
SUBST_FILES.thread1=        ${WRKSRC}/source/*.cpp
SUBST_FILES.thread1+=		${WRKSRC}/source/*/*.cpp

SUBST_CLASSES+=                thread2
SUBST_STAGE.thread2= post-patch
SUBST_SED.thread2=  -e "s|new thread(|new std::thread(|g"
SUBST_FILES.thread2=        ${WRKSRC}/source/*.cpp
SUBST_FILES.thread2+=           ${WRKSRC}/source/*/*.cpp


# Sets OPSYS, OS_VERSION, MACHINE_ARCH, etc..
# .include "../../mk/bsd.prefs.mk"

# Keep this if there are user-selectable options.
# .include "options.mk"

# Specify which directories to create before install.
# You should only need this if using your own install target.
INSTALLATION_DIRS=	bin include lib ${PKGMANDIR}/man1 share/doc share/examples

# Guess based on USES=
.include "../../devel/ncurses/buildlink3.mk"
.include "../../devel/boost-libs/buildlink3.mk"
.include "../../devel/readline/buildlink3.mk"
# Convert any _DEPENDS above that have a buildlink3.mk
# .include "../..///buildlink3.mk"
# Linux doesn't have zlib in the base, so just in case...
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
