-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: add cmake install using pipi port * wip: wip cmake port * wip: cmake port * fix: remove example and add test * fix: bad test on cmake * chore: refactor test & add version on cmake port * refactor: add code comments --------- Co-authored-by: Yohe-Am <[email protected]>
- Loading branch information
Showing
4 changed files
with
60 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { InstallConfigFat, InstallConfigSimple } from "../port.ts"; | ||
import { AsdfInstallConf } from "./asdf.ts"; | ||
import { PipiInstallConf } from "./pipi.ts"; | ||
import * as ports from "./mod.ts"; | ||
|
||
/** | ||
* Port to install cmake | ||
* | ||
* For macOS users, you need to add python as allowed build dependencies | ||
* as cmake is downladed via pip install. | ||
* | ||
* Example: | ||
* ```typescript | ||
* const installs = { | ||
python_latest: ports.cpy_bs({ version: "3.12.2", releaseTag: "20240224" }), | ||
}; | ||
* config({ | ||
stdDeps: true, | ||
allowedBuildDeps: [ | ||
installs.python_latest | ||
], | ||
enableRuntimes: true | ||
}); | ||
* ``` | ||
* | ||
*/ | ||
export default function conf( | ||
config: InstallConfigSimple, | ||
): InstallConfigFat[] { | ||
/* | ||
The universal macOS cmake build downloaded by asdf crashes | ||
due to security restrictions in macOS, so it's installed using pipi port instead, which runs with no problems. | ||
*/ | ||
if (Deno.build.os === "darwin") { | ||
const pipiConfig: PipiInstallConf = { | ||
packageName: "cmake", | ||
version: config.version, | ||
}; | ||
return ports.pipi(pipiConfig); | ||
} | ||
const asdfConfig: AsdfInstallConf = { | ||
...config, | ||
pluginRepo: "https://github.com/asdf-community/asdf-cmake", | ||
installType: "version", | ||
version: config.version, | ||
}; | ||
|
||
return [ports.asdf(asdfConfig)]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters