summaryrefslogtreecommitdiff
path: root/sysutils/mstflint/Makefile
blob: df99ef589e3c18f570e275a6f8c8d75e6c3fcc1c (plain) (blame)
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
PORTNAME=	mstflint
DISTVERSIONPREFIX=	v
DISTVERSION=	4.28.0-1
CATEGORIES=	sysutils

MAINTAINER=	olivier@FreeBSD.org
COMMENT=	Firmware Burning and Diagnostics Tools for Mellanox devices
WWW=		https://github.com/Mellanox/mstflint

LICENSE=	BSD2CLAUSE GPLv2
LICENSE_COMB=	dual
LICENSE_FILE_BSD2CLAUSE=	${WRKSRC}/LICENSE
LICENSE_FILE_GPLv2=	${WRKSRC}/LICENSE

USES=		autoreconf gmake libtool localbase:ldflags pkgconfig ssl
USE_CXXSTD=	c++14
USE_GITHUB=	yes
GH_ACCOUNT=	Mellanox

GNU_CONFIGURE=	yes
GNU_CONFIGURE_MANPREFIX=${PREFIX}/share

OPTIONS_DEFINE=	FWMANAGER ADAB
OPTIONS_SUB=	yes

ADAB_DESC=	Build with mstreg and mstlink
FWMANAGER_DESC=	Build with mstfwmanager and mstarchive
STATIC_DESC=	Static binary (disable curl support)

ADAB_CONFIGURE_ON=	--enable-adb-generic-tools
ADAB_LIB_DEPENDS=	libexpat.so:textproc/expat2

FWMANAGER_CONFIGURE_ON=	--enable-fw-mgr
FWMANAGER_LIB_DEPENDS=	libcurl.so:ftp/curl \
			libxml2.so.2:textproc/libxml2

post-patch:
	@${ECHO} '#define TOOLS_GIT_SHA "N/A"' >  ${WRKSRC}/common/gitversion.h
	@${MKDIR} ${WRKSRC}/config

post-install:
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/mstflint/python_tools/rreg_access.so
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/mstflint/python_tools/ccmdif.so
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/mstflint/python_tools/cmtcr.so
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/mstflint/python_tools/c_dev_mgt.so
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/mstflint/sdk/libresource_dump_sdk.so

.include <bsd.port.mk>