PORTNAME=	mummer
DISTVERSIONPREFIX=	v
DISTVERSION=	4.0.0rc1.20240427
CATEGORIES=	biology

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Modular system for rapid whole genome alignment
WWW=		https://mummer.sourceforge.net/ \
		https://github.com/mummer4/mummer

LICENSE=	ART10
LICENSE_FILE=	${WRKSRC}/LICENSE.md

BUILD_DEPENDS=	yaggo:devel/yaggo

USES=		autoreconf compiler:c++11-lang gmake libtool perl5 shebangfix
GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--disable-static
USE_LDCONFIG=	yes

USE_GITHUB=	yes
GH_ACCOUNT=	${PORTNAME}4
GH_TAGNAME=	7198b08 # devel branch since release is 4 years old

INSTALL_TARGET=install-strip

SHEBANG_FILES=	scripts/*.pl
perl_OLD_CMD=	__PERL_PATH
_SHEBANG_REINPLACE_ARGS+=	-e "s|__BIN_DIR|${PREFIX}/bin|g;s|__AUX_BIN_DIR|${PREFIX}/libexec/mummer|g;s|__SCRIPT_DIR|${PREFIX}/libexec/mummer|g"

post-install:
	# fix conflict with libgd
	@${MV} ${STAGEDIR}${PREFIX}/bin/annotate ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-annotate

.include <bsd.port.mk>
