k4be 9 小时之前
父节点
当前提交
91b84c98f1

+ 10 - 3
dev-util/openclaude/openclaude-0.2.3.ebuild

@@ -14,15 +14,22 @@ SLOT="0"
 KEYWORDS="~amd64"
 
 RDEPEND=">=net-libs/nodejs-20"
+BDEPEND="net-libs/nodejs"
+
+# npm tarball contains prebuilt dist/cli.mjs; we still need npm install to
+# fetch the packages kept external during bundling (@aws-sdk/*, @opentelemetry/*,
+# sharp, google-auth-library, etc.) so Node can resolve them at runtime.
+RESTRICT="network-sandbox"
 
-# npm tarball already contains prebuilt dist/cli.mjs — no build step needed
 S="${WORKDIR}/package"
 
-src_compile() { :; }
+src_compile() {
+	npm install --production || die "npm install failed"
+}
 
 src_install() {
 	insinto /usr/lib/${PN}
-	doins -r dist/
+	doins -r dist/ node_modules/
 
 	exeinto /usr/lib/${PN}/bin
 	doexe bin/${PN}

+ 10 - 3
dev-util/openclaude/openclaude-0.3.0.ebuild

@@ -14,15 +14,22 @@ SLOT="0"
 KEYWORDS="~amd64"
 
 RDEPEND=">=net-libs/nodejs-20"
+BDEPEND="net-libs/nodejs"
+
+# npm tarball contains prebuilt dist/cli.mjs; we still need npm install to
+# fetch the packages kept external during bundling (@aws-sdk/*, @opentelemetry/*,
+# sharp, google-auth-library, etc.) so Node can resolve them at runtime.
+RESTRICT="network-sandbox"
 
-# npm tarball already contains prebuilt dist/cli.mjs — no build step needed
 S="${WORKDIR}/package"
 
-src_compile() { :; }
+src_compile() {
+	npm install --production || die "npm install failed"
+}
 
 src_install() {
 	insinto /usr/lib/${PN}
-	doins -r dist/
+	doins -r dist/ node_modules/
 
 	exeinto /usr/lib/${PN}/bin
 	doexe bin/${PN}

+ 1 - 1
dev-util/openclaude/openclaude-9999.ebuild

@@ -30,7 +30,7 @@ src_compile() {
 
 src_install() {
 	insinto /usr/lib/${PN}
-	doins -r dist/
+	doins -r dist/ node_modules/
 
 	exeinto /usr/lib/${PN}/bin
 	doexe bin/${PN}