create: add --rust option
This commit is contained in:
parent
1279bba345
commit
b4c56937b1
@ -29,6 +29,8 @@ module Homebrew
|
|||||||
description: "Create a basic template for a Meson-style build."
|
description: "Create a basic template for a Meson-style build."
|
||||||
switch "--python",
|
switch "--python",
|
||||||
description: "Create a basic template for a Python build."
|
description: "Create a basic template for a Python build."
|
||||||
|
switch "--rust",
|
||||||
|
description: "Create a basic template for a Rust build."
|
||||||
switch "--no-fetch",
|
switch "--no-fetch",
|
||||||
description: "Homebrew will not download <URL> to the cache and will thus not add its SHA-256 "\
|
description: "Homebrew will not download <URL> to the cache and will thus not add its SHA-256 "\
|
||||||
"to the formula for you, nor will it check the GitHub API for GitHub projects "\
|
"to the formula for you, nor will it check the GitHub API for GitHub projects "\
|
||||||
@ -44,7 +46,7 @@ module Homebrew
|
|||||||
switch :force
|
switch :force
|
||||||
switch :verbose
|
switch :verbose
|
||||||
switch :debug
|
switch :debug
|
||||||
conflicts "--autotools", "--cmake", "--go", "--meson", "--python"
|
conflicts "--autotools", "--cmake", "--go", "--meson", "--python", "--rust"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -81,6 +83,8 @@ module Homebrew
|
|||||||
:go
|
:go
|
||||||
elsif args.python?
|
elsif args.python?
|
||||||
:python
|
:python
|
||||||
|
elsif args.rust?
|
||||||
|
:rust
|
||||||
end
|
end
|
||||||
|
|
||||||
if fc.name.nil? || fc.name.strip.empty?
|
if fc.name.nil? || fc.name.strip.empty?
|
||||||
|
@ -110,6 +110,8 @@ module Homebrew
|
|||||||
depends_on "ninja" => :build
|
depends_on "ninja" => :build
|
||||||
<% elsif mode == :python %>
|
<% elsif mode == :python %>
|
||||||
depends_on "python"
|
depends_on "python"
|
||||||
|
<% elsif mode == :rust %>
|
||||||
|
depends_on "rust" => :build
|
||||||
<% elsif mode.nil? %>
|
<% elsif mode.nil? %>
|
||||||
# depends_on "cmake" => :build
|
# depends_on "cmake" => :build
|
||||||
<% end %>
|
<% end %>
|
||||||
@ -142,6 +144,8 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
<% elsif mode == :python %>
|
<% elsif mode == :python %>
|
||||||
virtualenv_install_with_resources
|
virtualenv_install_with_resources
|
||||||
|
<% elsif mode == :rust %>
|
||||||
|
system "cargo", "install", "--root", prefix, "--path", "."
|
||||||
<% else %>
|
<% else %>
|
||||||
# Remove unrecognized options if warned by configure
|
# Remove unrecognized options if warned by configure
|
||||||
system "./configure", "--disable-debug",
|
system "./configure", "--disable-debug",
|
||||||
|
@ -807,6 +807,8 @@ a simple example. For the complete API, see:
|
|||||||
Create a basic template for a Meson-style build.
|
Create a basic template for a Meson-style build.
|
||||||
* `--python`:
|
* `--python`:
|
||||||
Create a basic template for a Python build.
|
Create a basic template for a Python build.
|
||||||
|
* `--rust`:
|
||||||
|
Create a basic template for a Rust build.
|
||||||
* `--no-fetch`:
|
* `--no-fetch`:
|
||||||
Homebrew will not download *`URL`* to the cache and will thus not add its SHA-256 to the formula for you, nor will it check the GitHub API for GitHub projects (to fill out its description and homepage).
|
Homebrew will not download *`URL`* to the cache and will thus not add its SHA-256 to the formula for you, nor will it check the GitHub API for GitHub projects (to fill out its description and homepage).
|
||||||
* `--HEAD`:
|
* `--HEAD`:
|
||||||
|
@ -1032,6 +1032,10 @@ Create a basic template for a Meson\-style build\.
|
|||||||
Create a basic template for a Python build\.
|
Create a basic template for a Python build\.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
\fB\-\-rust\fR
|
||||||
|
Create a basic template for a Rust build\.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
\fB\-\-no\-fetch\fR
|
\fB\-\-no\-fetch\fR
|
||||||
Homebrew will not download \fIURL\fR to the cache and will thus not add its SHA\-256 to the formula for you, nor will it check the GitHub API for GitHub projects (to fill out its description and homepage)\.
|
Homebrew will not download \fIURL\fR to the cache and will thus not add its SHA\-256 to the formula for you, nor will it check the GitHub API for GitHub projects (to fill out its description and homepage)\.
|
||||||
.
|
.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user