diff --git a/ports-mgmt/appstream-generator/Makefile b/ports-mgmt/appstream-generator/Makefile index a8d0b26d435c..d52b76e5a107 100644 --- a/ports-mgmt/appstream-generator/Makefile +++ b/ports-mgmt/appstream-generator/Makefile @@ -1,50 +1,59 @@ PORTNAME= appstream-generator DISTVERSIONPREFIX= v DISTVERSION= 0.10.1 +PORTREVISION= 1 CATEGORIES= ports-mgmt MAINTAINER= arrowd@FreeBSD.org COMMENT= Fast AppStream metadata generator WWW= https://github.com/ximion/appstream-generator LICENSE= LGPL3 LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= nlohmann-json>=3:devel/nlohmann-json \ inja>=3:devel/inja \ catch2>0:devel/catch2 \ ${LOCALBASE}/include/__generator.hpp:devel/stdgenerator \ ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:textproc/docbook-xsl LIB_DEPENDS= libappstream.so:devel/appstream \ libappstream-compose.so:devel/appstream-compose \ libCatch2.so:devel/catch2 \ libcurl.so:ftp/curl \ liblmdb.so:databases/lmdb \ libicuuc.so:devel/icu \ libtbb.so:devel/onetbb \ libfyaml.so:textproc/libfyaml USES= compiler:c++23-lang gnome libarchive meson pkgconfig USE_GNOME= glib20 libxml2 libxslt:build USE_CXXSTD= c++23 USE_GITHUB= yes GH_ACCOUNT= ximion OPTIONS_DEFINE= MANPAGES MANPAGES_BUILD_DEPENDS= xsltproc:textproc/libxslt MESON_ARGS= -Ddownload-js=false -Dbackward=false CFLAGS+= -fexperimental-library DATADIR= ${PREFIX}/share/appstream OPTIONS_SUB= yes +.include + +.if ${ARCH} == i386 || ${ARCH} == powerpc || ${ARCH:Marmv?} +post-patch: + @${REINPLACE_CMD} -e "/tbb_dep/s|'tbb'|'tbb32'|" \ + ${WRKSRC}/meson.build +.endif + post-install: cd ${WRKSRC}/data && \ ${COPYTREE_SHARE} templates ${STAGEDIR}${DATADIR} ${INSTALL_SCRIPT} ${PATCHDIR}/poudriere-hook-bulk.sh ${STAGEDIR}${DATADIR} -.include +.include diff --git a/ports-mgmt/appstream-generator/files/patch-src_config.h b/ports-mgmt/appstream-generator/files/patch-src_config.h new file mode 100644 index 000000000000..f53b0ebb8062 --- /dev/null +++ b/ports-mgmt/appstream-generator/files/patch-src_config.h @@ -0,0 +1,11 @@ +--- src/config.h.orig 2025-10-02 19:33:23 UTC ++++ src/config.h +@@ -44,7 +44,7 @@ inline constexpr std::array AllowedIconS + /** + * Fake package name AppStream Generator uses internally to inject additional metainfo on users' request + */ +-inline constexpr std::string EXTRA_METAINFO_FAKE_PKGNAME = "+extra-metainfo"; ++inline const std::string EXTRA_METAINFO_FAKE_PKGNAME = "+extra-metainfo"; + + /** + * Describes a suite in a software repository. diff --git a/ports-mgmt/appstream-generator/files/patch-src_engine.cpp b/ports-mgmt/appstream-generator/files/patch-src_engine.cpp index 5bf92fa33c1a..d99f8a59a7e8 100644 --- a/ports-mgmt/appstream-generator/files/patch-src_engine.cpp +++ b/ports-mgmt/appstream-generator/files/patch-src_engine.cpp @@ -1,10 +1,19 @@ ---- src/engine.cpp.orig 2025-09-25 21:14:13 UTC +--- src/engine.cpp.orig 2025-10-02 19:33:23 UTC +++ src/engine.cpp @@ -35,6 +35,7 @@ #include #include +#include #include #include #include +@@ -68,7 +69,7 @@ Engine::Engine() + // Configure a TBB task arena to limit parallelism a little (use half the available CPU cores, or at least 6 + // threads) This avoids having too many parallel downloads on high-core-count machines, and also leaves some room + // for additional parallelism of the used libraries, e.g. for image processing. +- const auto numCPU = std::thread::hardware_concurrency(); ++ std::int32_t const numCPU = std::thread::hardware_concurrency(); + const auto maxThreads = std::max(numCPU > 6 ? 6L : numCPU, std::lround(numCPU * 0.60)); + m_taskArena = std::make_unique(maxThreads); +