Version bump, avoid double-build, avoid forced rspec dependency.
authorDiego Elio Pettenò <flameeyes@gentoo.org>
Sat, 1 May 2010 16:58:30 +0000 (16:58 +0000)
committerDiego Elio Pettenò <flameeyes@gentoo.org>
Sat, 1 May 2010 16:58:30 +0000 (16:58 +0000)
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64

dev-ruby/redcloth/ChangeLog
dev-ruby/redcloth/files/redcloth-4.2.3-gentoo.patch [new file with mode: 0644]
dev-ruby/redcloth/redcloth-4.2.2.ebuild [deleted file]
dev-ruby/redcloth/redcloth-4.2.3.ebuild [new file with mode: 0644]

index 50ee2db2130e38a688070e20eb0968b5ee61ba98..9ff69eee4932dad712bcc68355f29e8dbbfd8380 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for dev-ruby/redcloth
 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/redcloth/ChangeLog,v 1.41 2010/02/13 20:17:41 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/redcloth/ChangeLog,v 1.42 2010/05/01 16:58:30 flameeyes Exp $
+
+*redcloth-4.2.3 (01 May 2010)
+
+  01 May 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+  -redcloth-4.2.2.ebuild, +redcloth-4.2.3.ebuild,
+  +files/redcloth-4.2.3-gentoo.patch:
+  Version bump, avoid double-build, avoid forced rspec dependency.
 
   13 Feb 2010; Raúl Porcel <armin76@gentoo.org> redcloth-4.1.9.ebuild,
   redcloth-4.2.2.ebuild, redcloth-4.2.2-r3.ebuild:
diff --git a/dev-ruby/redcloth/files/redcloth-4.2.3-gentoo.patch b/dev-ruby/redcloth/files/redcloth-4.2.3-gentoo.patch
new file mode 100644 (file)
index 0000000..c8f70dd
--- /dev/null
@@ -0,0 +1,22 @@
+diff --git a/Rakefile b/Rakefile
+index fb71b42..f643cb1 100644
+--- a/Rakefile
++++ b/Rakefile
+@@ -217,6 +217,7 @@ end
+ 
+ #### Custom testing tasks
+ 
++begin
+ require 'rubygems' 
+ require 'spec/rake/spectask'
+ Rake::Task[:default].prerequisites.clear
+@@ -241,6 +242,9 @@ task :ensure_diff_lcs do
+     end
+   end
+ end
++rescue LoadError
++  $stderr.puts "RSpec not found, tests won't be available. Please install rspec with gem install rspec"
++end
+ 
+ task :remove_other_platforms do
+   Dir["lib/redcloth_scan.{bundle,so,jar,rb}"].each { |file| rm file }
diff --git a/dev-ruby/redcloth/redcloth-4.2.2.ebuild b/dev-ruby/redcloth/redcloth-4.2.2.ebuild
deleted file mode 100644 (file)
index 2ee242e..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/redcloth/redcloth-4.2.2.ebuild,v 1.2 2010/02/13 20:17:41 armin76 Exp $
-
-inherit ruby gems
-
-MY_P="RedCloth-${PV}"
-DESCRIPTION="A module for using Textile in Ruby"
-HOMEPAGE="http://www.whytheluckystiff.net/ruby/redcloth/"
-SRC_URI="http://gems.rubyforge.org/gems/${MY_P}.gem"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-IUSE=""
-
-USE_RUBY="ruby18 ruby19"
-
-S=${WORKDIR}/${MY_P}
diff --git a/dev-ruby/redcloth/redcloth-4.2.3.ebuild b/dev-ruby/redcloth/redcloth-4.2.3.ebuild
new file mode 100644 (file)
index 0000000..6920446
--- /dev/null
@@ -0,0 +1,61 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/redcloth/redcloth-4.2.3.ebuild,v 1.1 2010/05/01 16:58:30 flameeyes Exp $
+
+EAPI=2
+
+# jruby → tests still fail with UTF-8 characters
+USE_RUBY="ruby18 ruby19"
+
+RUBY_FAKEGEM_NAME="RedCloth"
+
+RUBY_FAKEGEM_TASK_TEST="spec"
+RUBY_FAKEGEM_TASK_DOC="docs"
+
+RUBY_FAKEGEM_DOCDIR="doc"
+
+RUBY_FAKEGEM_EXTRADOC="README CHANGELOG"
+
+RUBY_FAKEGEM_REQUIRE_PATHS="lib/case_sensitive_require"
+
+inherit ruby-fakegem versionator
+
+DESCRIPTION="A module for using Textile in Ruby"
+HOMEPAGE="http://redcloth.org/"
+
+SRC_URI="http://github.com/jgarber/redcloth/tarball/RELEASE_$(replace_all_version_separators _) -> ${RUBY_FAKEGEM_NAME}-git-${PV}.tgz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE=""
+
+DEPEND="$DEPEND
+       dev-util/ragel"
+RDEPEND="$RDEPEND"
+
+S="${WORKDIR}/jgarber-${PN}-*"
+
+ruby_add_bdepend 'dev-ruby/rake >=dev-ruby/echoe-3.0.1'
+ruby_add_bdepend test "dev-ruby/rspec dev-ruby/diff-lcs"
+
+pkg_setup() {
+       # Export the VERBOSE variable to avoid remapping of stdout and
+       # stderr, and that breaks because of bad interactions between
+       # echoe, Ruby and Gentoo.
+       export VERBOSE=1
+}
+
+all_ruby_prepare() {
+       epatch "${FILESDIR}"/${P}-gentoo.patch
+}
+
+each_ruby_compile() {
+       # We cannot run this manually easily, because Ragel re-generation
+       # is a mess
+       ${RUBY} -S rake compile || die "rake compile failed"
+}
+
+each_ruby_test() {
+       find spec -name '*_spec.rb' -print0 | xargs -0 ${RUBY} -I lib -S spec -Du -fs
+}