X11Requirement: Recent X11 client is sufficient
This commit is contained in:
parent
0d81ad059d
commit
95ebefc1ac
@ -27,20 +27,16 @@ class X11Requirement < Requirement
|
|||||||
|
|
||||||
satisfy build_env: false do
|
satisfy build_env: false do
|
||||||
if which_xorg = which("Xorg")
|
if which_xorg = which("Xorg")
|
||||||
version = Utils.popen_read which_xorg, "-version", err: :out
|
version = Utils.popen_read(which_xorg, "-version", err: :out)[/X Server (\d+\.\d+\.\d+)/, 1]
|
||||||
next false unless $CHILD_STATUS.success?
|
next true if $CHILD_STATUS.success? && version && Version.new(version) >= min_version
|
||||||
version = version[/X Server (\d+\.\d+\.\d+)/, 1]
|
|
||||||
next false unless version
|
|
||||||
Version.new(version) >= min_version
|
|
||||||
elsif which_xdpyinfo = which("xdpyinfo")
|
|
||||||
version = Utils.popen_read which_xdpyinfo, "-version"
|
|
||||||
next false unless $CHILD_STATUS.success?
|
|
||||||
version = version[/^xdpyinfo (\d+\.\d+\.\d+)/, 1]
|
|
||||||
next false unless version
|
|
||||||
Version.new(version) >= min_xdpyinfo_version
|
|
||||||
else
|
|
||||||
false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if which_xdpyinfo = which("xdpyinfo")
|
||||||
|
version = Utils.popen_read(which_xdpyinfo, "-version")[/^xdpyinfo (\d+\.\d+\.\d+)/, 1]
|
||||||
|
next true if $CHILD_STATUS.success? && version && Version.new(version) >= min_xdpyinfo_version
|
||||||
|
end
|
||||||
|
|
||||||
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
def message
|
def message
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user