Skip to content

Commit

Permalink
Use cmake-fetch for dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperisager committed Nov 10, 2024
1 parent ea18b99 commit ba866c7
Show file tree
Hide file tree
Showing 7 changed files with 286 additions and 297 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/prebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ jobs:
name: ${{ matrix.platform }}-${{ matrix.arch }}${{ matrix.tags }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: lts/*
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

555 changes: 279 additions & 276 deletions CMakeLists.txt

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@
"extensions",
"scripts",
"prebuilds",
"CMakeLists.txt",
"vendor/libsodium/src/**/*.c",
"vendor/libsodium/src/**/*.h",
"vendor/libsodium/src/**/*.h.in",
"vendor/libsodium/src/**/*.S"
"CMakeLists.txt"
],
"addon": true,
"dependencies": {
Expand All @@ -23,6 +19,7 @@
"devDependencies": {
"brittle": "^3.5.0",
"cmake-bare": "^1.1.10",
"cmake-fetch": "^1.0.1",
"cmake-napi": "^1.0.5",
"standard": "^17.1.0"
},
Expand Down
12 changes: 5 additions & 7 deletions scripts/version.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
const path = require('path')
const fs = require('fs')

const root = path.join(__dirname, '..')

const libsodium = path.join(root, 'vendor/libsodium/src/libsodium')
const [sodium] = process.argv.slice(2)

const version = '1.0.18'

const file = fs.readFileSync(path.join(libsodium, 'include/sodium/version.h.in'), 'utf-8')
const file = fs.readFileSync(path.join(sodium, 'src/libsodium/include/sodium/version.h.in'), 'utf-8')
.replace('@VERSION@', version)
.replace('@SODIUM_LIBRARY_VERSION_MAJOR@', 10)
.replace('@SODIUM_LIBRARY_VERSION_MINOR@', 3)
.replace('@SODIUM_LIBRARY_VERSION_MAJOR@', 26)
.replace('@SODIUM_LIBRARY_VERSION_MINOR@', 2)
.replace('@SODIUM_LIBRARY_MINIMAL_DEF@', '')

fs.writeFileSync(path.join(libsodium, 'include/sodium/version.h'), file)
fs.writeFileSync(path.join(sodium, 'src/libsodium/include/sodium/version.h'), file)

process.stdout.write(version)
1 change: 0 additions & 1 deletion vendor/libsodium
Submodule libsodium deleted from 8855e8

0 comments on commit ba866c7

Please sign in to comment.