From eb44ea078ef89d1ced6953dd695acb233d979108 Mon Sep 17 00:00:00 2001 From: Diego Elio Pettenò Date: Tue, 14 Aug 2012 21:12:41 +0000 Subject: Initial import of ntlm-http required for mechanize. Doesn't work on JRuby but does work on Ruby 1.9 after patching. (Portage version: 2.2.0_alpha120/cvs/Linux x86_64) --- dev-ruby/ntlm-http/ChangeLog | 10 ++++++ .../ntlm-http/files/ntlm-http-0.1.1+ruby-1.9.patch | 24 ++++++++++++++ dev-ruby/ntlm-http/metadata.xml | 5 +++ dev-ruby/ntlm-http/ntlm-http-0.1.1.ebuild | 37 ++++++++++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 dev-ruby/ntlm-http/ChangeLog create mode 100644 dev-ruby/ntlm-http/files/ntlm-http-0.1.1+ruby-1.9.patch create mode 100644 dev-ruby/ntlm-http/metadata.xml create mode 100644 dev-ruby/ntlm-http/ntlm-http-0.1.1.ebuild (limited to 'dev-ruby/ntlm-http') diff --git a/dev-ruby/ntlm-http/ChangeLog b/dev-ruby/ntlm-http/ChangeLog new file mode 100644 index 000000000000..67c7cd04af25 --- /dev/null +++ b/dev-ruby/ntlm-http/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for dev-ruby/ntlm-http +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ntlm-http/ChangeLog,v 1.1 2012/08/14 21:12:41 flameeyes Exp $ + +*ntlm-http-0.1.1 (14 Aug 2012) + + 14 Aug 2012; Diego E. Pettenò + +files/ntlm-http-0.1.1+ruby-1.9.patch, +metadata.xml, +ntlm-http-0.1.1.ebuild: + Initial import of ntlm-http required for mechanize. Doesn't work on JRuby but + does work on Ruby 1.9 after patching. diff --git a/dev-ruby/ntlm-http/files/ntlm-http-0.1.1+ruby-1.9.patch b/dev-ruby/ntlm-http/files/ntlm-http-0.1.1+ruby-1.9.patch new file mode 100644 index 000000000000..b5e35a7210c5 --- /dev/null +++ b/dev-ruby/ntlm-http/files/ntlm-http-0.1.1+ruby-1.9.patch @@ -0,0 +1,24 @@ +Index: ntlm-http-0.1.1/lib/net/ntlm_http.rb +=================================================================== +--- ntlm-http-0.1.1.orig/lib/net/ntlm_http.rb ++++ ntlm-http-0.1.1/lib/net/ntlm_http.rb +@@ -45,6 +45,7 @@ + require 'base64' + require 'openssl' + require 'openssl/digest' ++require 'kconv' + + module Net #:nodoc: + module NTLM +Index: ntlm-http-0.1.1/lib/net/ntlm.rb +=================================================================== +--- ntlm-http-0.1.1.orig/lib/net/ntlm.rb ++++ ntlm-http-0.1.1/lib/net/ntlm.rb +@@ -45,6 +45,7 @@ + require 'base64' + require 'openssl' + require 'openssl/digest' ++require 'kconv' + + module Net #:nodoc: + module NTLM diff --git a/dev-ruby/ntlm-http/metadata.xml b/dev-ruby/ntlm-http/metadata.xml new file mode 100644 index 000000000000..852136183369 --- /dev/null +++ b/dev-ruby/ntlm-http/metadata.xml @@ -0,0 +1,5 @@ + + + +ruby + diff --git a/dev-ruby/ntlm-http/ntlm-http-0.1.1.ebuild b/dev-ruby/ntlm-http/ntlm-http-0.1.1.ebuild new file mode 100644 index 000000000000..8381e62ae6fd --- /dev/null +++ b/dev-ruby/ntlm-http/ntlm-http-0.1.1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ntlm-http/ntlm-http-0.1.1.ebuild,v 1.1 2012/08/14 21:12:41 flameeyes Exp $ + +EAPI=4 + +# jruby → tests fail _badly_ +USE_RUBY="ruby18 ruby19 ree18" + +RUBY_FAKEGEM_RECIPE_TEST="none" + +RUBY_FAKEGEM_RECIPE_DOC="rdoc" +RUBY_FAKEGEM_DOC_SOURCES="lib README" +RUBY_FAKEGEM_EXTRADOC="README" + +inherit ruby-fakegem eutils + +DESCRIPTION="Ruby/NTLM HTTP provides NTLM authentication over http" +HOMEPAGE="http://www.mindflowsolutions.net/" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE="test" + +ruby_add_bdepend "test? ( >=dev-ruby/test-unit-2.5.1-r1 )" + +all_ruby_prepare() { + find . -name '*.rb' -exec sed -i -e 's:\r$::' {} + + + # We can't use RUBY_PATCHES for this because we need first to convert the files + epatch "${FILESDIR}"/${P}+ruby-1.9.patch +} + +each_ruby_test() { + ruby-ng_testrb-2 test/*_test.rb +} -- cgit v1.2.3-65-gdbad