Skip to content

Commit

Permalink
Merge pull request #172575 from branchvincent/joplin-cli
Browse files Browse the repository at this point in the history
joplin-cli: fix build
  • Loading branch information
carlocab committed May 23, 2024
2 parents 92ae9e2 + fb06771 commit 6eef452
Showing 1 changed file with 2 additions and 33 deletions.
35 changes: 2 additions & 33 deletions Formula/j/joplin-cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ class JoplinCli < Formula
depends_on "libsecret"
end

# need node-addon-api v7+, see https://github.com/lovell/sharp/issues/3920
patch :DATA

def install
# Need node-addon-api v7+: https://github.com/lovell/sharp/issues/3920
system "npm", "add", "node-addon-api@8.0.0"
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
bin.install_symlink Dir["#{libexec}/bin/*"]

Expand All @@ -50,15 +49,6 @@ def install
terminal_notifier_app = Formula["terminal-notifier"].opt_prefix/"terminal-notifier.app"
ln_sf terminal_notifier_app.relative_path_from(terminal_notifier_dir), terminal_notifier_dir
end

if OS.linux?
node_modules = libexec/"lib/node_modules/joplin/node_modules"
(node_modules/"@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.42").unlink
(node_modules/"@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node").unlink
end

# Replace universal binaries with their native slices
deuniversalize_machos libexec/"lib/node_modules/joplin/node_modules/fsevents/fsevents.node"
end

# All joplin commands rely on the system keychain and so they cannot run
Expand All @@ -69,24 +59,3 @@ def install
assert_match "joplin #{version}", shell_output("#{bin}/joplin version")
end
end

__END__
diff --git a/package.json b/package.json
index cad3df9..5d033d4 100644
--- a/package.json
+++ b/package.json
@@ -51,6 +51,7 @@
"image-type": "3.1.0",
"keytar": "7.9.0",
"md5": "2.3.0",
+ "node-addon-api": "^7.1.0",
"node-rsa": "1.1.1",
"open": "8.4.2",
"proper-lockfile": "4.1.2",
@@ -79,4 +80,4 @@
"temp": "0.9.4",
"typescript": "5.2.2"
}
-}
\ No newline at end of file
+}

0 comments on commit 6eef452

Please sign in to comment.