diff --git a/ports-mgmt/appstream-generator/Makefile b/ports-mgmt/appstream-generator/Makefile index 30af516c742d..10a455c7e34f 100644 --- a/ports-mgmt/appstream-generator/Makefile +++ b/ports-mgmt/appstream-generator/Makefile @@ -1,59 +1,75 @@ PORTNAME= appstream-generator DISTVERSIONPREFIX= v DISTVERSION= 0.10.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= ports-mgmt +MASTER_SITES= LOCAL/arrowd/:assets +DISTFILES= ${_ASSETS_DISTNAME}${EXTRACT_SUFX}:assets 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 +MESON_ARGS= -Dbackward=false CFLAGS+= -fexperimental-library DATADIR= ${PREFIX}/share/appstream OPTIONS_SUB= yes +# only needed to fool meson +BINARY_ALIAS= npm=true + +_ASSETS_DISTNAME=${PORTNAME}-js-assets-${_ASSETS_VERSION} +_ASSETS_VERSION=${PORTVERSION} .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} +repackage-js: + pkg info npm > /dev/null + cd ${WRKSRC}/contrib/setup && ./build_js.sh + cd ${WRKDIR} && ${TAR} -czf /tmp/${_ASSETS_DISTNAME}${EXTRACT_SUFX} \ + ${WRKSRC:T}/data/templates/default/static/js + @cd /tmp && sha256 ${_ASSETS_DISTNAME}${EXTRACT_SUFX} \ + && ${ECHO_CMD} -n "SIZE (${_ASSETS_DISTNAME}${EXTRACT_SUFX}) = " \ + && ${STAT} -f %z ${_ASSETS_DISTNAME}${EXTRACT_SUFX} \ + .include diff --git a/ports-mgmt/appstream-generator/distinfo b/ports-mgmt/appstream-generator/distinfo index af96c572670d..da39fd9e1659 100644 --- a/ports-mgmt/appstream-generator/distinfo +++ b/ports-mgmt/appstream-generator/distinfo @@ -1,3 +1,5 @@ -TIMESTAMP = 1770817726 +TIMESTAMP = 1775749894 +SHA256 (appstream-generator-js-assets-0.10.2.tar.gz) = 43ae30af71ccffa12bc679e3003004b7671cca2976e553b78f852d71ee86076d +SIZE (appstream-generator-js-assets-0.10.2.tar.gz) = 680623 SHA256 (ximion-appstream-generator-v0.10.2_GH0.tar.gz) = cfafd3de39e124208123591e83f3165e40196edb9aa6acc536dc2cea5662ec81 SIZE (ximion-appstream-generator-v0.10.2_GH0.tar.gz) = 583256 diff --git a/ports-mgmt/appstream-generator/files/patch-contrib_setup_build__js.sh b/ports-mgmt/appstream-generator/files/patch-contrib_setup_build__js.sh new file mode 100644 index 000000000000..a5a9a63b7787 --- /dev/null +++ b/ports-mgmt/appstream-generator/files/patch-contrib_setup_build__js.sh @@ -0,0 +1,16 @@ +--- contrib/setup/build_js.sh.orig 2026-02-10 19:57:51 UTC ++++ contrib/setup/build_js.sh +@@ -17,10 +17,10 @@ JS_TARGET=../../data/templates/default/static/js + [ ! -d "$JS_TARGET" ] && mkdir $JS_TARGET + + [ ! -d "$JS_TARGET/jquery" ] && mkdir $JS_TARGET/jquery +-install node_modules/jquery/dist/*.min.js -t $JS_TARGET/jquery ++install node_modules/jquery/dist/*.min.js $JS_TARGET/jquery + + [ ! -d "$JS_TARGET/flot" ] && mkdir $JS_TARGET/flot +-install node_modules/jquery-flot/jquery.flot*.js -t $JS_TARGET/flot ++install node_modules/jquery-flot/jquery.flot*.js $JS_TARGET/flot + + [ ! -d "$JS_TARGET/highlight" ] && mkdir $JS_TARGET/highlight +-install node_modules/highlightjs/*.js -t $JS_TARGET/highlight ++install node_modules/highlightjs/*.js $JS_TARGET/highlight diff --git a/ports-mgmt/appstream-generator/pkg-plist b/ports-mgmt/appstream-generator/pkg-plist index bc5426035f66..3a3c23ae6832 100644 --- a/ports-mgmt/appstream-generator/pkg-plist +++ b/ports-mgmt/appstream-generator/pkg-plist @@ -1,27 +1,46 @@ bin/appstream-generator %%DATADIR%%/asgen-hints.json %%DATADIR%%/hicolor-theme-index.theme %%DATADIR%%/poudriere-hook-bulk.sh %%DATADIR%%/templates/debian/base.html %%DATADIR%%/templates/debian/main.html %%DATADIR%%/templates/debian/static/css/highlight.css %%DATADIR%%/templates/debian/static/css/style.css %%DATADIR%%/templates/debian/static/img %%DATADIR%%/templates/debian/static/js %%DATADIR%%/templates/default/base.html %%DATADIR%%/templates/default/issues_index.html %%DATADIR%%/templates/default/issues_page.html %%DATADIR%%/templates/default/main.html %%DATADIR%%/templates/default/metainfo_index.html %%DATADIR%%/templates/default/metainfo_page.html %%DATADIR%%/templates/default/section_page.html %%DATADIR%%/templates/default/sections_index.html %%DATADIR%%/templates/default/static/css/highlight.css %%DATADIR%%/templates/default/static/css/style.css %%DATADIR%%/templates/default/static/img/asgen.png %%DATADIR%%/templates/default/static/img/cpt-nogui.png %%DATADIR%%/templates/default/static/img/favicon.png %%DATADIR%%/templates/default/static/img/no-image.png +%%DATADIR%%/templates/default/static/js/flot/jquery.flot.canvas.js +%%DATADIR%%/templates/default/static/js/flot/jquery.flot.categories.js +%%DATADIR%%/templates/default/static/js/flot/jquery.flot.crosshair.js +%%DATADIR%%/templates/default/static/js/flot/jquery.flot.errorbars.js +%%DATADIR%%/templates/default/static/js/flot/jquery.flot.fillbetween.js +%%DATADIR%%/templates/default/static/js/flot/jquery.flot.image.js +%%DATADIR%%/templates/default/static/js/flot/jquery.flot.js +%%DATADIR%%/templates/default/static/js/flot/jquery.flot.navigate.js +%%DATADIR%%/templates/default/static/js/flot/jquery.flot.pie.js +%%DATADIR%%/templates/default/static/js/flot/jquery.flot.resize.js +%%DATADIR%%/templates/default/static/js/flot/jquery.flot.selection.js +%%DATADIR%%/templates/default/static/js/flot/jquery.flot.stack.js +%%DATADIR%%/templates/default/static/js/flot/jquery.flot.symbol.js +%%DATADIR%%/templates/default/static/js/flot/jquery.flot.threshold.js +%%DATADIR%%/templates/default/static/js/flot/jquery.flot.time.js +%%DATADIR%%/templates/default/static/js/highlight/highlight.pack.js +%%DATADIR%%/templates/default/static/js/highlight/highlight.pack.min.js +%%DATADIR%%/templates/default/static/js/jquery/jquery.min.js +%%DATADIR%%/templates/default/static/js/jquery/jquery.slim.min.js %%DATADIR%%/templates/ubuntu %%MANPAGES%%share/man/man1/appstream-generator.1.gz share/metainfo/org.freedesktop.appstream.generator.metainfo.xml