create: add --perl option
This commit is contained in:
parent
e6e569fd19
commit
de4d08028e
@ -27,6 +27,8 @@ module Homebrew
|
||||
description: "Create a basic template for a Go build."
|
||||
switch "--meson",
|
||||
description: "Create a basic template for a Meson-style build."
|
||||
switch "--perl",
|
||||
description: "Create a basic template for a Perl build."
|
||||
switch "--python",
|
||||
description: "Create a basic template for a Python build."
|
||||
switch "--rust",
|
||||
@ -46,7 +48,7 @@ module Homebrew
|
||||
switch :force
|
||||
switch :verbose
|
||||
switch :debug
|
||||
conflicts "--autotools", "--cmake", "--go", "--meson", "--python", "--rust"
|
||||
conflicts "--autotools", "--cmake", "--go", "--meson", "--perl", "--python", "--rust"
|
||||
end
|
||||
end
|
||||
|
||||
@ -81,6 +83,8 @@ module Homebrew
|
||||
:meson
|
||||
elsif args.go?
|
||||
:go
|
||||
elsif args.perl?
|
||||
:perl
|
||||
elsif args.python?
|
||||
:python
|
||||
elsif args.rust?
|
||||
|
@ -108,6 +108,8 @@ module Homebrew
|
||||
<% elsif mode == :meson %>
|
||||
depends_on "meson" => :build
|
||||
depends_on "ninja" => :build
|
||||
<% elsif mode == :perl %>
|
||||
uses_from_macos "perl"
|
||||
<% elsif mode == :python %>
|
||||
depends_on "python"
|
||||
<% elsif mode == :rust %>
|
||||
@ -116,8 +118,8 @@ module Homebrew
|
||||
# depends_on "cmake" => :build
|
||||
<% end %>
|
||||
|
||||
<% if mode == :python %>
|
||||
# Additional Python dependency
|
||||
<% if mode == :perl || mode == :python %>
|
||||
# Additional dependency
|
||||
# resource "" do
|
||||
# url ""
|
||||
# sha256 ""
|
||||
@ -142,6 +144,26 @@ module Homebrew
|
||||
system "ninja", "-v"
|
||||
system "ninja", "install", "-v"
|
||||
end
|
||||
<% elsif mode == :perl %>
|
||||
ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5"
|
||||
ENV.prepend_path "PERL5LIB", libexec/"lib"
|
||||
|
||||
# Stage additional dependency (Makefile.PL style)
|
||||
# resource("").stage do
|
||||
# system "perl", "Makefile.PL", "INSTALL_BASE=\#{libexec}"
|
||||
# system "make"
|
||||
# system "make", "install"
|
||||
# end
|
||||
|
||||
# Stage additional dependency (Build.PL style)
|
||||
# resource("").stage do
|
||||
# system "perl", "Build.PL", "--install_base", libexec
|
||||
# system "./Build"
|
||||
# system "./Build", "install"
|
||||
# end
|
||||
|
||||
bin.install name
|
||||
bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"])
|
||||
<% elsif mode == :python %>
|
||||
virtualenv_install_with_resources
|
||||
<% elsif mode == :rust %>
|
||||
@ -154,7 +176,7 @@ module Homebrew
|
||||
"--prefix=\#{prefix}"
|
||||
# system "cmake", ".", *std_cmake_args
|
||||
<% end %>
|
||||
<% if mode == :autotools or mode == :cmake %>
|
||||
<% if mode == :autotools || mode == :cmake %>
|
||||
system "make", "install" # if this fails, try separate make/make install steps
|
||||
<% end %>
|
||||
end
|
||||
|
@ -805,6 +805,8 @@ a simple example. For the complete API, see:
|
||||
Create a basic template for a Go build.
|
||||
* `--meson`:
|
||||
Create a basic template for a Meson-style build.
|
||||
* `--perl`:
|
||||
Create a basic template for a Perl build.
|
||||
* `--python`:
|
||||
Create a basic template for a Python build.
|
||||
* `--rust`:
|
||||
|
@ -1028,6 +1028,10 @@ Create a basic template for a Go build\.
|
||||
Create a basic template for a Meson\-style build\.
|
||||
.
|
||||
.TP
|
||||
\fB\-\-perl\fR
|
||||
Create a basic template for a Perl build\.
|
||||
.
|
||||
.TP
|
||||
\fB\-\-python\fR
|
||||
Create a basic template for a Python build\.
|
||||
.
|
||||
|
Loading…
x
Reference in New Issue
Block a user