brew create - warn if version cannot be determined from URL.
This commit is contained in:
parent
d84b1711d0
commit
ff03763931
@ -37,6 +37,14 @@ def __make url, name
|
|||||||
puts "Please check if you are creating a duplicate."
|
puts "Please check if you are creating a duplicate."
|
||||||
end
|
end
|
||||||
|
|
||||||
|
version = Pathname.new(url).version
|
||||||
|
if version == nil
|
||||||
|
opoo "Version cannot be determined from URL."
|
||||||
|
puts "You'll need to add an explicit 'version' to the formula."
|
||||||
|
else
|
||||||
|
puts "Version detected as #{version}."
|
||||||
|
end
|
||||||
|
|
||||||
template=<<-EOS
|
template=<<-EOS
|
||||||
require 'formula'
|
require 'formula'
|
||||||
|
|
||||||
@ -48,7 +56,7 @@ def __make url, name
|
|||||||
cmake depends_on 'cmake'
|
cmake depends_on 'cmake'
|
||||||
|
|
||||||
def install
|
def install
|
||||||
autotools system "./configure", "--prefix=\#{prefix}", "--disable-debug", "--disable-dependency-tracking"
|
autotools system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=\#{prefix}"
|
||||||
cmake system "cmake . \#{std_cmake_parameters}"
|
cmake system "cmake . \#{std_cmake_parameters}"
|
||||||
system "make install"
|
system "make install"
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user