Skip to content

Resolves Bug 1161338 - ruby-libvirt: FTBS on Mac OS (ruby-libvirt 0.6.0) #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ SPEC = Gem::Specification.new do |s|
s.license = "LGPLv2"
end

if RUBY_PLATFORM =~ /universal.x86_64-darwin/
ENV['ARCHFLAGS'] = '-arch x86_64'
end

Gem::PackageTask.new(SPEC) do |pkg|
pkg.need_tar = true
pkg.need_zip = true
Expand Down
4 changes: 3 additions & 1 deletion ext/libvirt/extconf.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require 'mkmf'

$defs.push("-DHAVE_VIRDOMAINQEMUMONITORCOMMAND")

RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
RbConfig::MAKEFILE_CONFIG['CCDLFLAGS'] = ENV['CFLAGS'] if ENV['CFLAGS']
RbConfig::MAKEFILE_CONFIG['EXTDLDFLAGS'] = ENV['CFLAGS'] if ENV['CFLAGS']
Expand Down Expand Up @@ -479,7 +481,7 @@ def have_const(const, headers = nil, opt = "", &b)
libvirt_consts.each { |c| have_const(c, ["libvirt/libvirt.h"]) }
virterror_consts.each { |c| have_const(c, ["libvirt/virterror.h"]) }
if find_header("libvirt/libvirt-qemu.h")
have_library("virt-qemu", "virDomainQemuMonitorCommand")
have_library("virt-qemu", "virDomainQemuMonitorCommand", "libvirt/libvirt-qemu.h")
libvirt_qemu_funcs.each { |f| have_func(f, "libvirt/libvirt-qemu.h") }
libvirt_qemu_consts.each { |c| have_const(c, ["libvirt/libvirt-qemu.h"]) }
end
Expand Down