summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatsuu Takuto <matsuu@gentoo.org>2010-06-11 00:41:41 +0000
committerMatsuu Takuto <matsuu@gentoo.org>2010-06-11 00:41:41 +0000
commita059265159e44515f126ec7fd9df272ebd047dcb (patch)
tree7dc09bd0a25ebc94aff21991a05aaf05263446a3 /dev-ruby/facter
parentVersion bump (diff)
downloadgentoo-2-a059265159e44515f126ec7fd9df272ebd047dcb.tar.gz
gentoo-2-a059265159e44515f126ec7fd9df272ebd047dcb.tar.bz2
gentoo-2-a059265159e44515f126ec7fd9df272ebd047dcb.zip
Convert to ruby-fakegem. Fixed to work with ruby19.
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby/facter')
-rw-r--r--dev-ruby/facter/ChangeLog8
-rw-r--r--dev-ruby/facter/facter-1.5.7-r2.ebuild26
-rw-r--r--dev-ruby/facter/files/facter-1.5.7-ruby19.patch61
3 files changed, 94 insertions, 1 deletions
diff --git a/dev-ruby/facter/ChangeLog b/dev-ruby/facter/ChangeLog
index 8dc53f4bd5a7..b0836799fc5f 100644
--- a/dev-ruby/facter/ChangeLog
+++ b/dev-ruby/facter/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-ruby/facter
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/facter/ChangeLog,v 1.25 2010/04/30 07:16:17 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/facter/ChangeLog,v 1.26 2010/06/11 00:41:41 matsuu Exp $
+
+*facter-1.5.7-r2 (11 Jun 2010)
+
+ 11 Jun 2010; MATSUU Takuto <matsuu@gentoo.org> +facter-1.5.7-r2.ebuild,
+ +files/facter-1.5.7-ruby19.patch:
+ Convert to ruby-fakegem. Fixed to work with ruby19.
30 Apr 2010; Hans de Graaff <graaff@gentoo.org> facter-1.5.7-r1.ebuild:
Update HOMEPAGE.
diff --git a/dev-ruby/facter/facter-1.5.7-r2.ebuild b/dev-ruby/facter/facter-1.5.7-r2.ebuild
new file mode 100644
index 000000000000..bd2c60b1dd52
--- /dev/null
+++ b/dev-ruby/facter/facter-1.5.7-r2.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/facter/facter-1.5.7-r2.ebuild,v 1.1 2010/06/11 00:41:41 matsuu Exp $
+
+EAPI="2"
+# jruby failed to install
+USE_RUBY="ruby18 ruby19 ree18"
+RUBY_FAKEGEM_TASK_TEST=""
+RUBY_FAKEGEM_EXTRADOC="CHANGELOG ChangeLog README* TODO"
+RUBY_FAKEGEM_BINWRAP="facter"
+
+inherit ruby-fakegem
+
+DESCRIPTION="A cross-platform Ruby library for retrieving facts from operating systems"
+HOMEPAGE="http://www.puppetlabs.com/puppet/related-projects/facter/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+
+RUBY_PATCHES=(
+ "${FILESDIR}/${P}-fqdn.patch"
+ "${FILESDIR}/${P}-virtual.patch"
+ "${FILESDIR}/${P}-ruby19.patch"
+)
diff --git a/dev-ruby/facter/files/facter-1.5.7-ruby19.patch b/dev-ruby/facter/files/facter-1.5.7-ruby19.patch
new file mode 100644
index 000000000000..9bba6ebb2919
--- /dev/null
+++ b/dev-ruby/facter/files/facter-1.5.7-ruby19.patch
@@ -0,0 +1,61 @@
+diff -Naur facter-1.5.7.orig/install.rb facter-1.5.7/install.rb
+--- facter-1.5.7.orig/install.rb 2009-09-11 13:26:07.000000000 +0900
++++ facter-1.5.7/install.rb 2010-06-05 12:32:12.000000000 +0900
+@@ -35,11 +35,18 @@
+ require 'rbconfig'
+ require 'find'
+ require 'fileutils'
+-require 'ftools' # apparently on some system ftools doesn't get loaded
+ require 'optparse'
+ require 'ostruct'
+
+ begin
++ require 'ftools' # apparently on some system ftools doesn't get loaded
++ $haveftools = true
++rescue LoadError
++ puts "ftools not found. Using FileUtils instead.."
++ $haveftools = false
++end
++
++begin
+ require 'rdoc/rdoc'
+ $haverdoc = true
+ rescue LoadError
+@@ -91,9 +98,15 @@
+ libs.each do |lf|
+ olf = File.join(InstallOptions.site_dir, lf.gsub(/#{strip}/, ''))
+ op = File.dirname(olf)
+- File.makedirs(op, true)
+- File.chmod(0755, op)
+- File.install(lf, olf, 0644, true)
++ if $haveftools
++ File.makedirs(op, true)
++ File.chmod(0755, op)
++ File.install(lf, olf, 0644, true)
++ else
++ FileUtils.makedirs(op, {:mode => 0755, :verbose => true})
++ FileUtils.chmod(0755, op)
++ FileUtils.install(lf, olf, {:mode => 0644, :verbose => true})
++ end
+ end
+ end
+
+@@ -101,9 +114,15 @@
+ man.each do |mf|
+ omf = File.join(InstallOptions.man_dir, mf.gsub(/#{strip}/, ''))
+ om = File.dirname(omf)
+- File.makedirs(om, true)
+- File.chmod(0644, om)
+- File.install(mf, omf, 0644, true)
++ if $haveftools
++ File.makedirs(om, true)
++ File.chmod(0644, om)
++ File.install(mf, omf, 0644, true)
++ else
++ FileUtils.makedirs(om, {:mode => 0755, :verbose => true})
++ FileUtils.chmod(0755, om)
++ FileUtils.install(mf, omf, {:mode => 0644, :verbose => true})
++ end
+ gzip = %x{which gzip}
+ gzip.chomp!
+ %x{#{gzip} -f #{omf}}