[DRE-commits] [SCM] ruby-ffi.git branch, master, updated. debian/1.0.9debian-1-3-gc855747

Antonio Terceiro terceiro at softwarelivre.org
Fri Sep 16 17:51:28 UTC 2011


The following commit has been merged in the master branch:
commit e827cc4946855000de94b806b130f7de3a43020a
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date:   Fri Sep 16 10:22:57 2011 -0700

    Add patches to VCS
    
    Missed in the first upload because upstream has put *.patch in
    .gitignore!

diff --git a/debian/patches/0001-Only-load-under-MRI.patch b/debian/patches/0001-Only-load-under-MRI.patch
new file mode 100644
index 0000000..6b8ecf8
--- /dev/null
+++ b/debian/patches/0001-Only-load-under-MRI.patch
@@ -0,0 +1,32 @@
+From aa34fe0d2d572b06a79cf48d8b1bd452db0d9331 Mon Sep 17 00:00:00 2001
+From: Antonio Terceiro <terceiro at softwarelivre.org>
+Date: Wed, 14 Sep 2011 09:51:39 -0700
+Subject: [PATCH 1/2] Only load under MRI
+
+Rubinius and JRuby have their own FFI implementations.
+---
+ lib/ffi.rb |   11 ++---------
+ 1 files changed, 2 insertions(+), 9 deletions(-)
+
+diff --git a/lib/ffi.rb b/lib/ffi.rb
+index 316e39e..2e4332b 100644
+--- a/lib/ffi.rb
++++ b/lib/ffi.rb
+@@ -1,11 +1,4 @@
+-begin
+-  if RUBY_VERSION =~ /1.8/
+-    require '1.8/ffi_c'
+-  elsif RUBY_VERSION =~ /1.9/
+-    require '1.9/ffi_c'
+-  end
+-rescue Exception
++if !defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby"
+   require 'ffi_c'
++  require 'ffi/ffi'
+ end
+-
+-require 'ffi/ffi'
+\ No newline at end of file
+-- 
+1.7.6.3
+
diff --git a/debian/patches/0002-Remove-non-portable-m-32-64-compilation-flag.patch b/debian/patches/0002-Remove-non-portable-m-32-64-compilation-flag.patch
new file mode 100644
index 0000000..965fe16
--- /dev/null
+++ b/debian/patches/0002-Remove-non-portable-m-32-64-compilation-flag.patch
@@ -0,0 +1,61 @@
+From c22423f7b0af5397ddd1910ae7ae426020a350dc Mon Sep 17 00:00:00 2001
+From: Nobuhiro Iwamatsu <iwamatsu at debian.org>
+Date: Fri, 16 Sep 2011 10:00:37 -0700
+Subject: [PATCH 2/2] Remove non-portable -m{32,64} compilation flag
+
+Signed-off-by: Antonio Terceiro <terceiro at softwarelivre.org>
+---
+ libtest/GNUmakefile |   30 ------------------------------
+ 1 files changed, 0 insertions(+), 30 deletions(-)
+
+diff --git a/libtest/GNUmakefile b/libtest/GNUmakefile
+index 526575f..514327a 100644
+--- a/libtest/GNUmakefile
++++ b/libtest/GNUmakefile
+@@ -9,8 +9,6 @@ ifeq ($(CPU),)
+   CPU := $(shell uname -m | sed -e 's/i[345678]86/i386/')
+ endif
+ 
+-MODEL = 32 # Default to 32bit compiles
+-
+ PLATFORM = $(CPU)-$(OS)
+ 
+ ifeq ($(OS), sunos)
+@@ -96,34 +94,6 @@ ifneq ($(findstring bsd, $(OS)),)
+   LDFLAGS += -pthread
+ endif
+ 
+-ifeq ($(CPU), sparcv9)
+-  MODEL = 64
+-endif
+-
+-ifeq ($(CPU), amd64)
+-  MODEL = 64
+-endif
+-
+-ifeq ($(CPU), x86_64)
+-  MODEL = 64
+-endif
+-
+-ifeq ($(CPU), ppc64)
+-  MODEL = 64
+-endif
+-
+-ifeq ($(CPU), powerpc64)
+-  MODEL = 64
+-endif
+-
+-# On platforms (linux, solaris) that support both 32bit and 64bit, force building for one or the other
+-ifneq ($(or $(findstring linux, $(OS)), $(findstring solaris, $(OS))),)
+-  # Change the CC/LD instead of CFLAGS/LDFLAGS, incase other things in the flags
+-  # makes the libffi build choke
+-  CC += -m$(MODEL)
+-  LD += -m$(MODEL)
+-endif
+-
+ LIBTEST = $(BUILD_DIR)/$(LIBNAME)
+ 
+ all:	$(LIBTEST)
+-- 
+1.7.6.3
+
diff --git a/debian/patches/series b/debian/patches/series
index 840ae66..b9aa048 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 0001-Only-load-under-MRI.patch
+0002-Remove-non-portable-m-32-64-compilation-flag.patch

-- 
ruby-ffi.git



More information about the Pkg-ruby-extras-commits mailing list