Skip to content

Commit

Permalink
sysutils/mstflint: Update to 4.25.0 and take maintainship
Browse files Browse the repository at this point in the history
Remove the -lite flavor.
Event:		Oslo Hackathon at Modirum
  • Loading branch information
ocochard committed Oct 5, 2023
1 parent 576415f commit 594eeba
Show file tree
Hide file tree
Showing 27 changed files with 117 additions and 382 deletions.
1 change: 1 addition & 0 deletions MOVED
Expand Up @@ -7929,3 +7929,4 @@ databases/percona57-client||2023-10-01|Has expired: Upstream EOL reaches on 2023
sysutils/nfs-over-tls||2023-10-01|Has expired: All supported releases of FreeBSD include this in base
x11/antimicro|x11/antimicrox|2023-10-01|Has expired: Replaced by x11/antimicrox upstream no longer maintained
security/krb5-appl||2023-10-01|Has expired: Desupported by upstream, uses old ciphers
sysutils/mstflint-lite|sysutils/mstflint|2023-10-05|Parent port is now lite by default
1 change: 0 additions & 1 deletion sysutils/Makefile
Expand Up @@ -792,7 +792,6 @@
SUBDIR += msiklm
SUBDIR += msktutil
SUBDIR += mstflint
SUBDIR += mstflint-lite
SUBDIR += msyslog
SUBDIR += mtm
SUBDIR += mtpfs
Expand Down
15 changes: 0 additions & 15 deletions sysutils/mstflint-lite/Makefile

This file was deleted.

7 changes: 0 additions & 7 deletions sysutils/mstflint-lite/pkg-descr

This file was deleted.

12 changes: 0 additions & 12 deletions sysutils/mstflint-lite/pkg-plist

This file was deleted.

85 changes: 19 additions & 66 deletions sysutils/mstflint/Makefile
@@ -1,103 +1,56 @@
PORTNAME= mstflint
DISTVERSIONPREFIX= v
DISTVERSION= 4.22.0-1
DISTVERSION= 4.25.0-1
CATEGORIES= sysutils

MAINTAINER= ports@FreeBSD.org
COMMENT?= Firmware Burning and Diagnostics Tools for Mellanox devices
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
USES= autoreconf gmake libtool localbase:ldflags pkgconfig ssl
USE_CXXSTD= c++14
USE_GITHUB= yes
GH_ACCOUNT= Mellanox

GNU_CONFIGURE= yes

OPTIONS_DEFINE= FWMANAGER ADAB STATIC
.if defined(LITE)
OPTIONS_SLAVE= FWMANAGER ADAB STATIC
.endif
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
FWMANAGER_CONFIGURE_ON= --enable-fw-mgr
STATIC_USES_OFF= ssl
STATIC_CONFIGURE_ON= --enable-all-static --disable-dc \
--disable-openssl --disable-inband
ADAB_BUILD_DEPENDS= ${LOCALBASE}/lib/libboost_regex.a:devel/boost-libs
ADAB_LIB_DEPENDS= libexpat.so:textproc/expat2

.include <bsd.port.options.mk>
FWMANAGER_CONFIGURE_ON= --enable-fw-mgr
FWMANAGER_BUILD_DEPENDS= ${LOCALBASE}/lib/libboost_regex.a:devel/boost-libs
FWMANAGER_LIB_DEPENDS= libcurl.so:ftp/curl \
libxml2.so.2:textproc/libxml2

pre-patch:
post-patch:
@${ECHO} '#define TOOLS_GIT_SHA "N/A"' > ${WRKSRC}/common/gitversion.h
@${MKDIR} ${WRKSRC}/config
# ADAB and FWMANAGER options depends of libboost, so statically link this
# lib to avoid installing 220MB of lib dependency.
${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
${WRKSRC}/mlxlink/Makefile.am \
${WRKSRC}/mlxarchive/Makefile.am \
${WRKSRC}/mlxreg/Makefile.am

.if ${PORT_OPTIONS:MADAB}
.if ${PORT_OPTIONS:MSTATIC}
BROKEN= does not link: expat2 no longer provides static library by default
BUILD_DEPENDS+= xmlwf:textproc/expat2 \
boost-libs>0:devel/boost-libs
.else
LIB_DEPENDS+= libexpat.so:textproc/expat2 \
libboost_regex.so:devel/boost-libs
.endif
.endif

.if ${PORT_OPTIONS:MFWMANAGER}
.if ${PORT_OPTIONS:MSTATIC}
BUILD_DEPENDS+= xmllint:textproc/libxml2 \
${LOCALBASE}/include/boost/algorithm/string/detail/formatter_regex.hpp:devel/boost-libs
EXTRA_PATCHES+= ${PATCHDIR}/extrat-patch-configure.ac \
${PATCHDIR}/extrat-patch-mlxarchive_Makefile.am \
${PATCHDIR}/extrat-patch-mlxarchive_mlxarchive_mfa2.cpp \
${PATCHDIR}/extrat-patch-mlxfwupdate_Makefile.am \
${PATCHDIR}/extrat-patch-mlxfwupdate_server_request.cpp
.else
LIB_DEPENDS+= libxml2.so:textproc/libxml2 \
libboost_regex.so:devel/boost-libs \
libcurl.so:ftp/curl
RUN_DEPENDS+= ca_root_nss>=0:security/ca_root_nss
.endif
.endif

.if defined(LITE)
LDFLAGS+= -lmd
EXTRA_PATCHES+= ${PATCHDIR}/extrat-LITE-patch-Makefile.am \
${PATCHDIR}/extrat-LITE-patch-mlxconfig_Makefile.am \
${PATCHDIR}/extrat-LITE-patch-mlxreg_Makefile.am \
${PATCHDIR}/extrat-LITE-patch-cmdif_Makefile.am \
${PATCHDIR}/extrat-LITE-patch-mtcr_freebsd_Makefile.am \
${PATCHDIR}/extrat-LITE-patch-tools_layouts_Makefile.am \
${PATCHDIR}/extrat-LITE-patch-common_Makefile.am \
${PATCHDIR}/extrat-LITE-patch-dev_mgt_Makefile.am \
${PATCHDIR}/extrat-LITE-patch-reg_access_Makefile.am
post-install:
${RM} ${STAGEDIR}${PREFIX}/lib/libadb_parser.a \
${STAGEDIR}${PREFIX}/lib/libcmdif.a \
${STAGEDIR}${PREFIX}/lib/libdev_mgt.a \
${STAGEDIR}${PREFIX}/lib/libmodules_lib.a \
${STAGEDIR}${PREFIX}/lib/libmstreg_lib.a \
${STAGEDIR}${PREFIX}/lib/libprint_util_lib.a \
${STAGEDIR}${PREFIX}/lib/libreg_access.a \
${STAGEDIR}${PREFIX}/lib/libtools_layouts.a \
${STAGEDIR}${PREFIX}/lib/libmstarchive.a \
${STAGEDIR}${PREFIX}/lib/mstflint/libmtcr_ul.a \
${STAGEDIR}${PREFIX}/bin/mstarchive
${RMDIR} ${STAGEDIR}${PREFIX}/lib/mstflint
.else
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
.endif

.include <bsd.port.mk>
6 changes: 3 additions & 3 deletions sysutils/mstflint/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1671207291
SHA256 (Mellanox-mstflint-v4.22.0-1_GH0.tar.gz) = 1403928463fe589034e0effb215bbeb18e0ffac745c197b4511782f6694fe24c
SIZE (Mellanox-mstflint-v4.22.0-1_GH0.tar.gz) = 5936816
TIMESTAMP = 1696339879
SHA256 (Mellanox-mstflint-v4.25.0-1_GH0.tar.gz) = 46f5fda9c8687bbcdae62145c17ad70f6b1725d738985eb3c8efd8c71604ddc3
SIZE (Mellanox-mstflint-v4.25.0-1_GH0.tar.gz) = 6398196
16 changes: 0 additions & 16 deletions sysutils/mstflint/files/extrat-LITE-patch-Makefile.am

This file was deleted.

23 changes: 0 additions & 23 deletions sysutils/mstflint/files/extrat-LITE-patch-cmdif_Makefile.am

This file was deleted.

11 changes: 0 additions & 11 deletions sysutils/mstflint/files/extrat-LITE-patch-common_Makefile.am

This file was deleted.

16 changes: 0 additions & 16 deletions sysutils/mstflint/files/extrat-LITE-patch-dev_mgt_Makefile.am

This file was deleted.

16 changes: 0 additions & 16 deletions sysutils/mstflint/files/extrat-LITE-patch-mlxconfig_Makefile.am

This file was deleted.

11 changes: 0 additions & 11 deletions sysutils/mstflint/files/extrat-LITE-patch-mlxreg_Makefile.am

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions sysutils/mstflint/files/extrat-LITE-patch-reg_access_Makefile.am

This file was deleted.

This file was deleted.

36 changes: 0 additions & 36 deletions sysutils/mstflint/files/extrat-patch-configure.ac

This file was deleted.

19 changes: 0 additions & 19 deletions sysutils/mstflint/files/extrat-patch-mlxarchive_Makefile.am

This file was deleted.

This file was deleted.

0 comments on commit 594eeba

Please sign in to comment.