[DRE-commits] [ruby-rugged] 02/04: preliminary patch to build against system libgit2

Cédric Boutillier boutil at moszumanska.debian.org
Fri Apr 3 12:31:31 UTC 2015


This is an automated email from the git hooks/post-receive script.

boutil pushed a commit to branch master
in repository ruby-rugged.

commit ef138a235aaa90e87b875eb726a08d86bb40af41
Author: Cédric Boutillier <boutil at debian.org>
Date:   Mon Sep 8 15:46:10 2014 +0200

    preliminary patch to build against system libgit2
---
 debian/patches/build_with_system_libgit2.patch | 38 ++++++++++++++++++++++++++
 debian/patches/series                          |  1 +
 2 files changed, 39 insertions(+)

diff --git a/debian/patches/build_with_system_libgit2.patch b/debian/patches/build_with_system_libgit2.patch
new file mode 100644
index 0000000..0d33e60
--- /dev/null
+++ b/debian/patches/build_with_system_libgit2.patch
@@ -0,0 +1,38 @@
+--- a/ext/rugged/extconf.rb
++++ b/ext/rugged/extconf.rb
+@@ -25,32 +25,9 @@
+   exit(1)
+ end
+ 
+-if p = ENV['LIBGIT2_PATH']
+-  $INCFLAGS[0,0] = " -I#{File.join(p, 'include')} "
+-  $LDFLAGS << " -L#{p} "
+-  unless have_library 'git2' and have_header 'git2.h'
+-    STDERR.puts "ERROR: Invalid `LIBGIT2_PATH` environment"
+-    exit(1)
+-  end
+-else
+-  CWD = File.expand_path(File.dirname(__FILE__))
+-  LIBGIT2_DIR = File.join(CWD, '..', '..', 'vendor', 'libgit2')
+-  LIBGIT2_LIB_PATH = "#{CWD}/libgit2_embed.a"
+-
+-  if !File.exists?(LIBGIT2_LIB_PATH)
+-    Dir.chdir(LIBGIT2_DIR) do
+-      sys("#{MAKE_PROGRAM} -f Makefile.embed")
+-      FileUtils.cp 'libgit2.a', LIBGIT2_LIB_PATH
+-    end
+-  end
+-
+-  $INCFLAGS[0,0] = " -I#{LIBGIT2_DIR}/include "
+-  $LDFLAGS << " -L#{CWD} "
+-
+-  unless have_library 'git2_embed' and have_header 'git2.h'
+-    STDERR.puts "ERROR: Failed to build libgit2"
+-    exit(1)
+-  end
++unless have_library 'git2' and have_header 'git2.h'
++  STDERR.puts "ERROR: Invalid `LIBGIT2_PATH` environment"
++  exit(1)
+ end
+ 
+ create_makefile("rugged/rugged")
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..d4045c5
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+build_with_system_libgit2.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rugged.git



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