Adjust XQuartz/X11 module naming scheme
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
3ea35f3351
commit
7488b9844b
@ -60,7 +60,7 @@ module Homebrew extend self
|
|||||||
|
|
||||||
def describe_x11
|
def describe_x11
|
||||||
return "N/A" unless MacOS::XQuartz.installed?
|
return "N/A" unless MacOS::XQuartz.installed?
|
||||||
return "#{MacOS::XQuartz.version} @ " + describe_path(MacOS::XQuartz.prefix)
|
return "XQuartz #{MacOS::XQuartz.version} in " + describe_path(MacOS::XQuartz.prefix)
|
||||||
end
|
end
|
||||||
|
|
||||||
def describe_perl
|
def describe_perl
|
||||||
|
|||||||
@ -34,7 +34,7 @@ def llvm_build
|
|||||||
end
|
end
|
||||||
|
|
||||||
def x11_installed?
|
def x11_installed?
|
||||||
MacOS::XQuartz.installed?
|
MacOS::X11.installed?
|
||||||
end
|
end
|
||||||
|
|
||||||
def macports_or_fink_installed?
|
def macports_or_fink_installed?
|
||||||
@ -191,10 +191,10 @@ module MacOS extend self
|
|||||||
end
|
end
|
||||||
|
|
||||||
def x11_installed?
|
def x11_installed?
|
||||||
XQuartz.installed?
|
X11.installed?
|
||||||
end
|
end
|
||||||
|
|
||||||
def x11_prefix
|
def x11_prefix
|
||||||
XQuartz.prefix
|
X11.prefix
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -314,26 +314,26 @@ Please take one of the following actions:
|
|||||||
end
|
end
|
||||||
|
|
||||||
def x11
|
def x11
|
||||||
unless MacOS::XQuartz.installed?
|
unless MacOS::X11.installed?
|
||||||
opoo "You do not have X11 installed, this formula may not build."
|
opoo "You do not have X11 installed, this formula may not build."
|
||||||
end
|
end
|
||||||
|
|
||||||
# There are some config scripts here that should go in the PATH
|
# There are some config scripts here that should go in the PATH
|
||||||
prepend 'PATH', MacOS::XQuartz.bin, ':'
|
prepend 'PATH', MacOS::X11.bin, ':'
|
||||||
|
|
||||||
prepend 'PKG_CONFIG_PATH', MacOS::XQuartz.lib/'pkgconfig', ':'
|
prepend 'PKG_CONFIG_PATH', MacOS::X11.lib/'pkgconfig', ':'
|
||||||
prepend 'PKG_CONFIG_PATH', MacOS::XQuartz.share/'pkgconfig', ':'
|
prepend 'PKG_CONFIG_PATH', MacOS::X11.share/'pkgconfig', ':'
|
||||||
|
|
||||||
append 'LDFLAGS', "-L#{MacOS::XQuartz.lib}"
|
append 'LDFLAGS', "-L#{MacOS::X11.lib}"
|
||||||
append 'CMAKE_PREFIX_PATH', MacOS::XQuartz.prefix, ':'
|
append 'CMAKE_PREFIX_PATH', MacOS::X11.prefix, ':'
|
||||||
append 'CMAKE_INCLUDE_PATH', MacOS::XQuartz.include, ':'
|
append 'CMAKE_INCLUDE_PATH', MacOS::X11.include, ':'
|
||||||
|
|
||||||
append 'CPPFLAGS', "-I#{MacOS::XQuartz.include}"
|
append 'CPPFLAGS', "-I#{MacOS::X11.include}"
|
||||||
|
|
||||||
unless MacOS::CLT.installed?
|
unless MacOS::CLT.installed?
|
||||||
append 'CMAKE_PREFIX_PATH', MacOS.sdk_path/'usr/X11', ':'
|
append 'CMAKE_PREFIX_PATH', MacOS.sdk_path/'usr/X11', ':'
|
||||||
append 'CPPFLAGS', "-I#{MacOS::XQuartz.include}/freetype2"
|
append 'CPPFLAGS', "-I#{MacOS::X11.include}/freetype2"
|
||||||
append 'CFLAGS', "-I#{MacOS::XQuartz.include}"
|
append 'CFLAGS', "-I#{MacOS::X11.include}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
alias_method :libpng, :x11
|
alias_method :libpng, :x11
|
||||||
|
|||||||
@ -26,6 +26,16 @@ module MacOS::XQuartz extend self
|
|||||||
def installed?
|
def installed?
|
||||||
not prefix.nil?
|
not prefix.nil?
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
module MacOS::X11 extend self
|
||||||
|
def prefix
|
||||||
|
MacOS::XQuartz.prefix
|
||||||
|
end
|
||||||
|
|
||||||
|
def installed?
|
||||||
|
MacOS::XQuartz.installed?
|
||||||
|
end
|
||||||
|
|
||||||
# If XQuartz and/or the CLT are installed, headers will be found under
|
# If XQuartz and/or the CLT are installed, headers will be found under
|
||||||
# /opt/X11/include or /usr/X11/include. For Xcode-only systems, they are
|
# /opt/X11/include or /usr/X11/include. For Xcode-only systems, they are
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user