sysutils/mstflint: Fix build

Pushed the wrong patch

Pointy hat:	olivier
This commit is contained in:
Olivier Cochard 2024-05-08 17:43:40 +02:00
parent dbfc2c000f
commit 6edb540010
8 changed files with 69 additions and 181 deletions

View file

@ -28,28 +28,21 @@ FWMANAGER_DESC= Build with mstfwmanager and mstarchive
STATIC_DESC= Static binary (disable curl support)
ADAB_CONFIGURE_ON= --enable-adb-generic-tools
ADAB_BUILD_DEPENDS= ${LOCALBASE}/lib/libboost_regex.a:devel/boost-libs
ADAB_LIB_DEPENDS= libexpat.so:textproc/expat2
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
libxml2.so.2:textproc/libxml2
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
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>

View file

@ -1,19 +0,0 @@
--- configure.ac.orig 2023-10-04 13:13:00 UTC
+++ configure.ac
@@ -146,7 +146,6 @@ if test "x$enable_fw_mgr" = "xyes"; then
AC_CHECK_HEADER(zlib.h,,AC_MSG_ERROR([cannot find zlib.h . this header is needed for compiling fw manager tool]))
AC_CHECK_LIB(z, uncompress,, AC_MSG_ERROR([cannot find zlib uncompress() function.]))
AC_CHECK_HEADER(lzma.h,,AC_MSG_ERROR([Cannot find lzma.h.]))
- AC_CHECK_LIB(boost_regex, regcompA,, AC_MSG_ERROR([cannot find boost_regex regcompA() function. Try re-installing the library...]))
CURL_INC_DIR=/usr/include/curl/
fi
@@ -174,8 +173,6 @@ if test "x$enable_adb_generic_tools" = "xyes"; then
AC_MSG_ERROR([Expat library is missing, please install expat xml parser to continue: expat-devel.]
[http://expat.sourceforge.net/])
fi
- AC_CHECK_HEADERS([boost/foreach.hpp], [],
- [AC_MSG_ERROR([Boost libraries are missing, please install boost to continue.])])
AC_LANG_POP([C++])
fi

View file

@ -1,11 +0,0 @@
--- mflash/Makefile.am.orig 2023-10-04 10:11:20 UTC
+++ mflash/Makefile.am
@@ -34,7 +34,7 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/include/mtcr_ul -I$(
AM_CPPFLAGS = -I. -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common -I$(top_srcdir)/tools_layouts -I$(top_srcdir)/reg_access \
-I$(top_srcdir)/cmdif -I$(top_srcdir)/tools_res_mgmt $(COMPILER_FPIC)
-AM_CFLAGS = -MD -pipe -Wall -W -DMST_UL -g ${MFLASH_INBAND_FLAG} $(COMPILER_FPIC)
+AM_CFLAGS = -MD -pipe -Wall -W -DMST_UL -g ${MFLASH_INBAND_FLAG} $(COMPILER_FPIC) -Wno-error=int-conversion
noinst_LTLIBRARIES = libmflash.a

View file

@ -1,18 +0,0 @@
--- mlxarchive/Makefile.am.orig 2023-08-10 20:28:55 UTC
+++ mlxarchive/Makefile.am
@@ -64,6 +64,7 @@ AM_CXXFLAGS = -Wall -W -g -MP -MD -pipe $(INCLUDES) $(
mfa2_buff.h mfa2_buff.cpp
AM_CXXFLAGS = -Wall -W -g -MP -MD -pipe $(INCLUDES) $(COMPILER_FPIC)
+AM_LDFLAGS = %%PREFIX%%/lib/libboost_regex.a %%PREFIX%%/lib/libboost_filesystem.a %%PREFIX%%/lib/libboost_system.a
bin_PROGRAMS = mstarchive
mstarchive_SOURCES = mlxarchive.cpp mlxarchive.h
@@ -86,7 +87,6 @@ mstarchive_LDADD = libmstarchive.a\
$(USER_DIR)/ext_libs/minixz/libminixz.a\
$(USER_DIR)/xz_utils/libxz_utils.a \
$(CURL_LIBS)\
- -lboost_regex -lboost_filesystem -lboost_system \
-llzma -lm $(LIBSTD_CPP) ${LDL}
if ENABLE_OPENSSL

View file

@ -1,11 +1,11 @@
--- mlxfwupdate/Makefile.am.orig 2019-11-15 19:39:03 UTC
--- mlxfwupdate/Makefile.am.orig 2024-05-08 15:02:33 UTC
+++ mlxfwupdate/Makefile.am
@@ -37,7 +37,7 @@ MTCR_DIR = $(USER_DIR)/${MTCR_CONFIG_DIR}
bin_PROGRAMS = mstfwmanager
@@ -31,7 +31,7 @@ docdir = $(INSTALL_BASEDIR)/etc/mstflint
# Makefile.am -- Process this file with automake to produce Makefile.in
docdir=$(INSTALL_BASEDIR)/etc/mstflint
-dist_doc_DATA=certificate/ca-bundle.crt
+#dist_doc_DATA=certificate/ca-bundle.crt
docdir = $(INSTALL_BASEDIR)/etc/mstflint
-dist_doc_DATA = certificate/ca-bundle.crt
+#dist_doc_DATA = certificate/ca-bundle.crt
MTCR_UL_DIR = $(USER_DIR)/${MTCR_CONF_DIR}
MTCR_UL_LIB = $(MTCR_UL_DIR)/libmtcr_ul.a
AM_CPPFLAGS = \
-I$(srcdir) \

View file

@ -1,18 +0,0 @@
--- mlxlink/Makefile.am.orig 2023-10-04 13:58:41 UTC
+++ mlxlink/Makefile.am
@@ -49,6 +49,7 @@ AM_CPPFLAGS = $(AM_CXXFLAGS)
AM_CXXFLAGS = -Wall -W -DMST_UL -g -MP -MD -pipe -std=c++11
AM_CPPFLAGS = $(AM_CXXFLAGS)
+AM_LDFLAGS = %%PREFIX%%/lib/libboost_regex.a %%PREFIX%%/lib/libboost_filesystem.a %%PREFIX%%/lib/libboost_system.a
bin_PROGRAMS = mstlink
@@ -68,7 +69,6 @@ mstlink_DEPENDENCIES = modules/libmodules_lib.a \
$(LAYOUTS_DIR)/libtools_layouts.a \
$(USER_DIR)/xz_utils/libxz_utils.a \
$(USER_DIR)/ext_libs/minixz/libminixz.a \
- -lboost_regex -lboost_filesystem -lboost_system \
-llzma $(LIBSTD_CPP) ${LDL} -lexpat \
$(JSON_LIBS)

View file

@ -1,19 +0,0 @@
--- mlxreg/Makefile.am.orig 2023-10-04 14:00:05 UTC
+++ mlxreg/Makefile.am
@@ -48,8 +48,8 @@ INCLUDES = -I. -I$(USER_DIR) -I$(MTCR_DIR) -I$(MFT_EXT
INCLUDES = -I. -I$(USER_DIR) -I$(MTCR_DIR) -I$(MFT_EXT_LIBS_INC_DIR) -I$(UTILS_DIR) -I$(MTCR_INC_DIR) -I$(MLXREG_DIR)
-AM_CXXFLAGS = -Wall -W -DMST_UL -g -MP -MD -pipe
-
+AM_CXXFLAGS = -Wall -W -DMST_UL -g -MP -MD -pipe
+AM_LDFLAGS = %%PREFIX%%/lib/libboost_regex.a %%PREFIX%%/lib/libboost_filesystem.a %%PREFIX%%/lib/libboost_system.a
mstreg_SOURCES = mlxreg_ui.cpp mlxreg_ui.h
bin_PROGRAMS = mstreg
@@ -65,5 +65,4 @@ mstreg_LDADD = $(MLXREG_DIR)/mlxreg_lib/libmstreg_lib
$(LAYOUTS_DIR)/libtools_layouts.a \
$(USER_DIR)/xz_utils/libxz_utils.a \
$(USER_DIR)/ext_libs/minixz/libminixz.a \
- -lboost_regex -lboost_filesystem -lboost_system \
-llzma $(LIBSTD_CPP) ${LDL} -lexpat

View file

@ -21,23 +21,14 @@ include/mstflint/cmdif/icmd_cif_open.h
include/mstflint/common/compatibility.h
include/mstflint/mtcr.h
include/mstflint/mtcr_com_defs.h
include/mstflint/sdk/resource_dump_sdk.h
include/mstflint/sdk/resource_dump_segments.h
include/mstflint/sdk/resource_dump_segments_be.h
include/mstflint/sdk/resource_dump_segments_le.h
include/mstflint/sdk/resource_dump_types.h
include/mstflint/tools_layouts/adb_to_c_utils.h
include/mstflint/tools_layouts/icmd_layouts.h
include/mstflint/tools_layouts/icmd_hca_layouts.h
%%ADAB%%lib/libadb_parser.a
lib/libcmdif.a
lib/libdev_mgt.a
%%ADAB%%lib/libmodules_lib.a
%%FWMANAGER%%lib/libmstarchive.a
%%ADAB%%lib/libmstreg_lib.a
%%ADAB%%lib/libprint_util_lib.a
lib/libreg_access.a
lib/libtools_layouts.a
lib/libadb_utils.a
lib/libmlxarchive_layouts.a
lib/libmlxconfig_4th_gen_layouts.a
lib/libmlxconfig_4th_gen_regsiters.a
lib/mstflint/libmtcr_ul.a
lib/mstflint/python_tools/c_dev_mgt.so
lib/mstflint/python_tools/ccmdif.so
lib/mstflint/python_tools/cmdif.py
@ -50,6 +41,7 @@ lib/mstflint/python_tools/mstfwreset/mlxfwresetlib/__init__.py
lib/mstflint/python_tools/mstfwreset/mlxfwresetlib/cmd_reg_mcam.py
lib/mstflint/python_tools/mstfwreset/mlxfwresetlib/cmd_reg_mfrl.py
lib/mstflint/python_tools/mstfwreset/mlxfwresetlib/cmd_reg_mpcir.py
lib/mstflint/python_tools/mstfwreset/mlxfwresetlib/cmd_reg_mrsi.py
lib/mstflint/python_tools/mstfwreset/mlxfwresetlib/logger.py
lib/mstflint/python_tools/mstfwreset/mlxfwresetlib/mcra.py
lib/mstflint/python_tools/mstfwreset/mlxfwresetlib/mlnx_peripheral_components.py
@ -62,75 +54,63 @@ lib/mstflint/python_tools/mstfwtrace/fw_trace_utilities.py
lib/mstflint/python_tools/mstfwtrace/mstfwtrace.py
lib/mstflint/python_tools/mstfwtrace/secure_fw_trace.py
lib/mstflint/python_tools/mstprivhost/mstprivhost.py
lib/mstflint/python_tools/mstresourcedump/__init__.py
lib/mstflint/python_tools/mstresourcedump/commands/CommandFactory.py
lib/mstflint/python_tools/mstresourcedump/commands/DumpCommand.py
lib/mstflint/python_tools/mstresourcedump/commands/QueryCommand.py
lib/mstflint/python_tools/mstresourcedump/commands/ResDumpCommand.py
lib/mstflint/python_tools/mstresourcedump/commands/__init__.py
lib/mstflint/python_tools/mstresourcedump/fetchers/CapabilityFetcher.py
lib/mstflint/python_tools/mstresourcedump/fetchers/ResourceDumpFetcher.py
lib/mstflint/python_tools/mstresourcedump/fetchers/__init__.py
lib/mstflint/python_tools/mstresourcedump/filters/SegmentsFilter.py
lib/mstflint/python_tools/mstresourcedump/filters/__init__.py
lib/mstflint/python_tools/mstresourcedump/mstresourcedump.py
lib/mstflint/python_tools/mstresourcedump/resource_data/DataPrinter.py
lib/mstflint/python_tools/mstresourcedump/resource_data/DumpData.py
lib/mstflint/python_tools/mstresourcedump/resource_data/QueryData.py
lib/mstflint/python_tools/mstresourcedump/resource_data/__init__.py
lib/mstflint/python_tools/mstresourcedump/segments/CommandSegment.py
lib/mstflint/python_tools/mstresourcedump/segments/ErrorSegment.py
lib/mstflint/python_tools/mstresourcedump/segments/InfoSegment.py
lib/mstflint/python_tools/mstresourcedump/segments/MenuRecord.py
lib/mstflint/python_tools/mstresourcedump/segments/MenuSegment.py
lib/mstflint/python_tools/mstresourcedump/segments/NoticeSegment.py
lib/mstflint/python_tools/mstresourcedump/segments/RefSegment.py
lib/mstflint/python_tools/mstresourcedump/segments/ResourceSegment.py
lib/mstflint/python_tools/mstresourcedump/segments/Segment.py
lib/mstflint/python_tools/mstresourcedump/segments/SegmentCreator.py
lib/mstflint/python_tools/mstresourcedump/segments/SegmentFactory.py
lib/mstflint/python_tools/mstresourcedump/segments/TerminateSegment.py
lib/mstflint/python_tools/mstresourcedump/segments/__init__.py
lib/mstflint/python_tools/mstresourcedump/utils/__init__.py
lib/mstflint/python_tools/mstresourcedump/utils/Exceptions.py
lib/mstflint/python_tools/mstresourcedump/utils/constants.py
lib/mstflint/python_tools/mstresourcedump/validation/ArgToMenuVerifier.py
lib/mstflint/python_tools/mstresourcedump/validation/CapabilityValidator.py
lib/mstflint/python_tools/mstresourcedump/validation/__init__.py
lib/mstflint/python_tools/regaccess_structs.py
lib/mstflint/python_tools/mstresourceparse/ResourceParseManager.py
lib/mstflint/python_tools/mstresourceparse/parsers/AdbResourceParser.py
lib/mstflint/python_tools/mstresourceparse/parsers/AddressValueParser.py
lib/mstflint/python_tools/mstresourceparse/parsers/ResourceParser.py
lib/mstflint/python_tools/mstresourceparse/utils/common_functions.py
lib/mstflint/python_tools/mstresourceparse/__init__.py
lib/mstflint/python_tools/mstresourceparse/mstresourceparse.py
lib/mstflint/python_tools/mstresourceparse/parsers/AdbParser.py
lib/mstflint/python_tools/mstresourceparse/parsers/__init__.py
lib/mstflint/python_tools/mstresourceparse/resource_data/AdbData.py
lib/mstflint/python_tools/mstresourceparse/resource_data/DataPrinter.py
lib/mstflint/python_tools/mstresourceparse/resource_data/RawData.py
lib/mstflint/python_tools/mstresourceparse/resource_data/__init__.py
lib/mstflint/python_tools/mstresourceparse/segments/CommandSegment.py
lib/mstflint/python_tools/mstresourceparse/segments/ErrorSegment.py
lib/mstflint/python_tools/mstresourceparse/segments/InfoSegment.py
lib/mstflint/python_tools/mstresourceparse/segments/MenuRecord.py
lib/mstflint/python_tools/mstresourceparse/segments/MenuSegment.py
lib/mstflint/python_tools/mstresourceparse/segments/NoticeSegment.py
lib/mstflint/python_tools/mstresourceparse/segments/RefSegment.py
lib/mstflint/python_tools/mstresourceparse/segments/ResourceSegment.py
lib/mstflint/python_tools/mstresourceparse/segments/Segment.py
lib/mstflint/python_tools/mstresourceparse/segments/SegmentCreator.py
lib/mstflint/python_tools/mstresourceparse/segments/SegmentFactory.py
lib/mstflint/python_tools/mstresourceparse/segments/TerminateSegment.py
lib/mstflint/python_tools/mstresourceparse/segments/__init__.py
lib/mstflint/python_tools/mstresourceparse/utils/Exceptions.py
lib/mstflint/python_tools/mstresourceparse/utils/__init__.py
lib/mstflint/python_tools/mstresourceparse/utils/constants.py
lib/mstflint/python_tools/regaccess_hca_ext_structs.py
lib/mstflint/python_tools/regaccess_switch_ext_structs.py
lib/mstflint/python_tools/resourcetools/mstresourcedump.py
lib/mstflint/python_tools/resourcetools/mstresourceparse.py
lib/mstflint/python_tools/resourcetools/resourcedump_lib/__init__.py
lib/mstflint/python_tools/resourcetools/resourcedump_lib/commands/CommandFactory.py
lib/mstflint/python_tools/resourcetools/resourcedump_lib/commands/DumpCommand.py
lib/mstflint/python_tools/resourcetools/resourcedump_lib/commands/QueryCommand.py
lib/mstflint/python_tools/resourcetools/resourcedump_lib/commands/ResDumpCommand.py
lib/mstflint/python_tools/resourcetools/resourcedump_lib/commands/__init__.py
lib/mstflint/python_tools/resourcetools/resourcedump_lib/fetchers/CapabilityFetcher.py
lib/mstflint/python_tools/resourcetools/resourcedump_lib/fetchers/__init__.py
lib/mstflint/python_tools/resourcetools/resourcedump_lib/filters/SegmentsFilter.py
lib/mstflint/python_tools/resourcetools/resourcedump_lib/filters/__init__.py
lib/mstflint/python_tools/resourcetools/resourcedump_lib/utils/__init__.py
lib/mstflint/python_tools/resourcetools/resourcedump_lib/utils/Exceptions.py
lib/mstflint/python_tools/resourcetools/resourcedump_lib/utils/constants.py
lib/mstflint/python_tools/resourcetools/resourcedump_lib/validation/CapabilityValidator.py
lib/mstflint/python_tools/resourcetools/resourcedump_lib/validation/__init__.py
lib/mstflint/python_tools/resourcetools/resourceparse_lib/ResourceParseManager.py
lib/mstflint/python_tools/resourcetools/resourceparse_lib/parsers/AdbResourceParser.py
lib/mstflint/python_tools/resourcetools/resourceparse_lib/parsers/AddressValueParser.py
lib/mstflint/python_tools/resourcetools/resourceparse_lib/parsers/ResourceParser.py
lib/mstflint/python_tools/resourcetools/resourceparse_lib/utils/common_functions.py
lib/mstflint/python_tools/resourcetools/resourceparse_lib/__init__.py
lib/mstflint/python_tools/resourcetools/resourceparse_lib/parsers/AdbParser.py
lib/mstflint/python_tools/resourcetools/resourceparse_lib/parsers/__init__.py
lib/mstflint/python_tools/resourcetools/resourceparse_lib/resource_data/AdbData.py
lib/mstflint/python_tools/resourcetools/resourceparse_lib/resource_data/DataPrinter.py
lib/mstflint/python_tools/resourcetools/resourceparse_lib/resource_data/RawData.py
lib/mstflint/python_tools/resourcetools/resourceparse_lib/resource_data/__init__.py
lib/mstflint/python_tools/resourcetools/resourceparse_lib/utils/Exceptions.py
lib/mstflint/python_tools/resourcetools/resourceparse_lib/utils/__init__.py
lib/mstflint/python_tools/resourcetools/resourceparse_lib/utils/constants.py
lib/mstflint/python_tools/resourcetools/resourcedump_lib/cresourcedump/CResourceDump.py
lib/mstflint/python_tools/resourcetools/resourcedump_lib/cresourcedump/__init__.py
lib/mstflint/python_tools/resourcetools/resourcedump_lib/cresourcedump/cresourcedump_types.py
lib/mstflint/python_tools/resourcetools/resourceparse_lib/parsers/MenuParser.py
lib/mstflint/python_tools/resourcetools/resourceparse_lib/parsers/RawParser.py
lib/mstflint/python_tools/resourcetools/segments/CommandSegment.py
lib/mstflint/python_tools/resourcetools/segments/ErrorSegment.py
lib/mstflint/python_tools/resourcetools/segments/InfoSegment.py
lib/mstflint/python_tools/resourcetools/segments/MenuRecord.py
lib/mstflint/python_tools/resourcetools/segments/MenuSegment.py
lib/mstflint/python_tools/resourcetools/segments/NoticeSegment.py
lib/mstflint/python_tools/resourcetools/segments/RefSegment.py
lib/mstflint/python_tools/resourcetools/segments/ResourceSegment.py
lib/mstflint/python_tools/resourcetools/segments/Segment.py
lib/mstflint/python_tools/resourcetools/segments/SegmentCreator.py
lib/mstflint/python_tools/resourcetools/segments/SegmentFactory.py
lib/mstflint/python_tools/resourcetools/segments/TerminateSegment.py
lib/mstflint/python_tools/resourcetools/segments/__init__.py
lib/mstflint/python_tools/mtcr.py
lib/mstflint/python_tools/regaccess.py
lib/mstflint/python_tools/rreg_access.so
lib/mstflint/python_tools/tools_version.py
lib/mstflint/sdk/libresource_dump_sdk.so
share/man/man1/mstarchive.1.gz
share/man/man1/mstcongestion.1.gz
share/man/man1/mstconfig.1.gz