[libvirt] [PATCH][libvirt-ruby] Rakefile: Build on Mac OS-X cleanly

https://bugzilla.redhat.com/show_bug.cgi?id=1161338 There's this bug report, which suggests using '-arch x86_64' on Macs. Otherwise one gets unclear error messages when building. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- Rakefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Rakefile b/Rakefile index 5ea1f41..e73eaee 100644 --- a/Rakefile +++ b/Rakefile @@ -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 -- 2.0.5

When building the project from a clean repo, there are some blobs we don't want git to bother about. Just ignore them. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..68ad1d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.o +ext/ +pkg/ -- 2.0.5

On Tue, Mar 17, 2015 at 12:02:54PM +0100, Michal Privoznik wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1161338
There's this bug report, which suggests using '-arch x86_64' on Macs. Otherwise one gets unclear error messages when building.
You should give credit to the author of the patch. (And maybe cc: Chris in case he doesn't watch all the subject prefix variations - I thought [ruby PATCH] was the preferred one) Jan
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- Rakefile | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/Rakefile b/Rakefile index 5ea1f41..e73eaee 100644 --- a/Rakefile +++ b/Rakefile @@ -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 -- 2.0.5
participants (2)
-
Ján Tomko
-
Michal Privoznik