Add an ebuild for the latest release candidate; I was unable to get 0.9.1 to work...
authorDiego Elio Pettenò <flameeyes@gentoo.org>
Mon, 5 Dec 2011 20:52:44 +0000 (20:52 +0000)
committerDiego Elio Pettenò <flameeyes@gentoo.org>
Mon, 5 Dec 2011 20:52:44 +0000 (20:52 +0000)
Package-Manager: portage-2.2.0_alpha79/cvs/Linux x86_64

dev-ruby/radiant/ChangeLog
dev-ruby/radiant/files/radiant-1.0.0_rc3-deps.patch [new file with mode: 0644]
dev-ruby/radiant/radiant-1.0.0_rc3.ebuild [new file with mode: 0644]

index 98357be3fc2e2919d2a0edfa92fc115cafe90508..0b7277cda014326f96e3c21fbc6d41ebd702e0ff 100644 (file)
@@ -1,6 +1,14 @@
 # ChangeLog for dev-ruby/radiant
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/radiant/ChangeLog,v 1.21 2010/08/14 08:05:01 graaff Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/radiant/ChangeLog,v 1.22 2011/12/05 20:52:44 flameeyes Exp $
+
+*radiant-1.0.0_rc3 (05 Dec 2011)
+
+  05 Dec 2011; Diego E. Pettenò <flameeyes@gentoo.org>
+  +files/radiant-1.0.0_rc3-deps.patch, +radiant-1.0.0_rc3.ebuild:
+  Add an ebuild for the latest release candidate; I was unable to get 0.9.1 to
+  work, and this one seem not to work with Rails 3 installed, but it can't
+  hurt.. more.
 
 *radiant-0.9.1-r3 (14 Aug 2010)
 
diff --git a/dev-ruby/radiant/files/radiant-1.0.0_rc3-deps.patch b/dev-ruby/radiant/files/radiant-1.0.0_rc3-deps.patch
new file mode 100644 (file)
index 0000000..09b72c1
--- /dev/null
@@ -0,0 +1,15 @@
+Index: radiant/Gemfile
+===================================================================
+--- radiant.orig/Gemfile
++++ radiant/Gemfile
+@@ -7,8 +7,8 @@ source :rubygems
+ # requires radiant and therefore pulls in every 
+ # dependency mentioned in radiant.gemspec.
+ #
+-gem 'rails', '2.3.14'
+-gem 'sqlite3', '1.3.4'
++gem 'rails', '~> 2.3.14'
++gem 'sqlite3', '~> 1.3.4'
+ 
+ # When radiant is installed as a gem you can run all of
+ # its tests and specs from an instance. If you're working
diff --git a/dev-ruby/radiant/radiant-1.0.0_rc3.ebuild b/dev-ruby/radiant/radiant-1.0.0_rc3.ebuild
new file mode 100644 (file)
index 0000000..9bd9983
--- /dev/null
@@ -0,0 +1,61 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/radiant/radiant-1.0.0_rc3.ebuild,v 1.1 2011/12/05 20:52:44 flameeyes Exp $
+
+EAPI="2"
+USE_RUBY="ruby18"
+
+RUBY_FAKEGEM_VERSION=${PV/_/.}
+
+RUBY_FAKEGEM_TASK_DOC=""
+RUBY_FAKEGEM_TASK_TEST="spec cucumber"
+RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md CONTRIBUTORS.md README.md"
+
+# All these files are needed because the generator expect to install them.
+RUBY_FAKEGEM_EXTRAINSTALL="CHANGELOG.md CONTRIBUTORS.md INSTALL.md LICENSE.md README.md Gemfile Gemfile.lock Rakefile app config db log public script vendor"
+
+inherit ruby-fakegem
+
+DESCRIPTION="A no-fluff, open source content management system"
+HOMEPAGE="http://radiantcms.org/"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+# Testing depends on a working database and a bundled version of Rails 2.3.8
+# Needs more work later.
+RESTRICT="test"
+
+#ruby_add_bdepend "test? ( dev-db/sqlite3-ruby  dev-ruby/rspec dev-util/cucumber )"
+
+ruby_add_rdepend ">=dev-ruby/redcloth-4.0.0
+       >=dev-ruby/rack-1.1.0
+       >=dev-ruby/rails-2.3.14:2.3
+       >=dev-ruby/highline-1.5.1
+       >=dev-ruby/radius-0.5.1
+       =dev-ruby/will_paginate-2.3*
+       dev-ruby/rack-cache
+       >=dev-ruby/sqlite3-ruby-1.3.4
+       dev-ruby/bundler"
+
+# Remove code from vendor that we support as an external dependency.
+all_ruby_prepare() {
+       rm -rf vendor/{highline,radius,rails,redcloth} Gemfile.lock
+
+       epatch "${FILESDIR}"/${P}-deps.patch
+}
+
+each_ruby_compile() {
+       # we force a lock here so that it actually works without trying to
+       # write in /usr as user.
+       bundle install --local || die
+}
+
+each_ruby_test() {
+       cp config/database.sqlite.yml config/database.yml || die "Unable to provide database.yml for testing."
+       ${RUBY} -S rake db:migrate
+       each_fakegem_test
+       rm config/database.yml || die "Unable to remove testing database.yml."
+}