git: ca588bf0791c - main - devel/vite-plus: build and install binding libraries

From: Matthias Fechner <mfechner_at_FreeBSD.org>
Date: Tue, 15 Sep 2026 15:18:13 UTC
The branch main has been updated by mfechner:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ca588bf0791c1a5285215770db01be47f5074592

commit ca588bf0791c1a5285215770db01be47f5074592
Author:     Martin Matuska <mm@FreeBSD.org>
AuthorDate: 2026-09-15 15:09:16 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2026-09-15 15:17:56 +0000

    devel/vite-plus: build and install binding libraries
    
    That should make it possible to build new version for www/evcc.
    
    PR:             298305
---
 devel/vite-plus/Makefile | 28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/devel/vite-plus/Makefile b/devel/vite-plus/Makefile
index 817a11bae504..a3aae2ef9554 100644
--- a/devel/vite-plus/Makefile
+++ b/devel/vite-plus/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	vite-plus
 DISTVERSIONPREFIX=v
 DISTVERSION=	0.2.9
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	devel
 
 # rolldown is a PATH dependency (~48 `path = "./rolldown/crates/*"` entries in
@@ -24,12 +24,9 @@ WWW=		https://github.com/voidzero-dev/vite-plus \
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		cargo ssl
+LIB_DEPENDS=	libzstd.so:archivers/zstd
 
-# Single-binary port: the `vp` executable is the only file the cargo
-# framework installs (LICENSE files are auto-handled by the license machinery
-# and appear under usr/local/share/licenses/ in the stage).
-PLIST_FILES=	bin/vp
+USES=		cargo ssl
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	voidzero-dev
@@ -51,9 +48,21 @@ CARGO_INSTALL_PATH=crates/vp_global_cli
 #     `-Z bindeps` build arg) so it also survives the framework's `cargo update`
 #     configure step, which needs the `artifact = "cdylib"` dep syntax.
 #   - WORKSPACE_DIR=rolldown is read by the rolldown_workspace crate via env!
+#   - RELEASE_BUILD=1 build binding libraries
 CARGO_ENV+=	RUSTC_BOOTSTRAP=1
 CARGO_ENV+=	CARGO_UNSTABLE_BINDEPS=true
 CARGO_ENV+=	WORKSPACE_DIR=rolldown
+CARGO_ENV+=	RELEASE_BUILD=1
+
+PLIST_FILES=	bin/vp \
+		lib/${PORTNAME}/libvite_plus_cli.so \
+		lib/${PORTNAME}/librolldown_binding.so \
+		lib/${PORTNAME}/libvp_pm_cli_macros.so
+
+VITE_RELEASE_LIBS=	libvite_plus_cli.so \
+			librolldown_binding.so \
+			libvp_pm_cli_macros.so
+
 
 # The framework auto-extracts every DISTFILE into ${WRKDIR}; move the rolldown
 # tree to ${WRKSRC}/rolldown so the ./rolldown/crates/* path deps resolve.
@@ -77,6 +86,13 @@ post-patch:
 	     fi; \
 	   done)
 
+post-install:
+	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
+.for f in ${VITE_RELEASE_LIBS}
+	@${INSTALL_LIB} ${CARGO_TARGET_DIR}/release/${f} \
+		${STAGEDIR}${PREFIX}/lib/${PORTNAME}/
+.endfor
+
 # To update Makefile.crates execute: make cargo-crates > Makefile.crates
 
 .include <bsd.port.mk>