summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2009-07-16 13:28:53 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2009-07-16 13:28:53 +0000
commita21e1020b571dbb33b5294d4e985f92e1921c028 (patch)
tree2d7849f659b8d03a7ec492b30545aa006b586a9b /dev-ruby/prawn-layout/prawn-layout-0.1.0.ebuild
parentMake sure to install the needed datafiles, and patch the code to find it in o... (diff)
downloadgentoo-2-a21e1020b571dbb33b5294d4e985f92e1921c028.tar.gz
gentoo-2-a21e1020b571dbb33b5294d4e985f92e1921c028.tar.bz2
gentoo-2-a21e1020b571dbb33b5294d4e985f92e1921c028.zip
Initial import of prawn-layout extension for prawn.
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby/prawn-layout/prawn-layout-0.1.0.ebuild')
-rw-r--r--dev-ruby/prawn-layout/prawn-layout-0.1.0.ebuild83
1 files changed, 83 insertions, 0 deletions
diff --git a/dev-ruby/prawn-layout/prawn-layout-0.1.0.ebuild b/dev-ruby/prawn-layout/prawn-layout-0.1.0.ebuild
new file mode 100644
index 000000000000..6f21793382a8
--- /dev/null
+++ b/dev-ruby/prawn-layout/prawn-layout-0.1.0.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/prawn-layout/prawn-layout-0.1.0.ebuild,v 1.1 2009/07/16 13:28:53 flameeyes Exp $
+
+EAPI=2
+
+GITHUB_USER=sandal
+
+inherit ruby
+
+DESCRIPTION="An extension to Prawn offering table support, grid layouts and other things"
+HOMEPAGE="http://github.com/${GITHUB_USER}/${PN}/tree/master"
+
+LICENSE="|| ( GPL-2 Ruby )"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc examples test"
+
+SRC_URI="http://github.com/${GITHUB_USER}/${PN}/tarball/${PV} -> ${P}.tgz"
+
+USE_RUBY="ruby18"
+
+RDEPEND="dev-ruby/prawn"
+DEPEND="doc? ( dev-ruby/rake )
+ test? (
+ dev-ruby/rake
+ dev-ruby/mocha
+ ${RDEPEND}
+ )"
+
+S="${WORKDIR}"
+
+src_compile() {
+ cd "${WORKDIR}"/${GITHUB_USER}-${PN}-*
+
+ if use doc; then
+ rake rdoc || die "rake rdoc failed"
+ fi
+}
+
+src_test() {
+ cd "${WORKDIR}"/${GITHUB_USER}-${PN}-*
+
+ rake test || die "rake test failed"
+}
+
+dofakegemspec() {
+ cat - > "${T}"/${P}.gemspec <<EOF
+Gem::Specification.new do |s|
+ s.name = "${PN}"
+ s.version = "${PV}"
+ s.summary = "${DESCRIPTION}"
+ s.homepage = "${HOMEPAGE}"
+end
+EOF
+
+ # Note: this only works with 1.8 so if you need to make it work
+ # with 1.9 you better wait for ruby-fakegem.eclass.
+ insinto $(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]')/../gems/1.8/specifications
+ doins "${T}"/${P}.gemspec || die "Unable to install fake gemspec"
+}
+
+src_install() {
+ cd "${WORKDIR}"/${GITHUB_USER}-${PN}-*
+
+ pushd lib
+ doruby -r * || die "install lib failed"
+ popd
+
+ dofakegemspec
+
+ if use doc; then
+ docinto apidocs
+ pushd doc
+ dohtml -r * || die "Installing html documentation failed."
+ popd
+ fi
+
+ if use examples; then
+ docinto examples
+ dodoc -r examples/* || die "Installing examples failes."
+ fi
+}