Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-ruby/prawn-layout: metadata.xml ChangeLog prawn-layout-0.1.0.ebuild
Date: Thu, 16 Jul 2009 13:29:56
Message-Id: E1MRR13-0006AL-9L@stork.gentoo.org
1 flameeyes 09/07/16 13:28:53
2
3 Added: metadata.xml ChangeLog prawn-layout-0.1.0.ebuild
4 Log:
5 Initial import of prawn-layout extension for prawn.
6 (Portage version: 2.2_rc33/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 dev-ruby/prawn-layout/metadata.xml
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/prawn-layout/metadata.xml?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/prawn-layout/metadata.xml?rev=1.1&content-type=text/plain
13
14 Index: metadata.xml
15 ===================================================================
16 <?xml version="1.0" encoding="UTF-8"?>
17 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
18 <pkgmetadata>
19 <herd>ruby</herd>
20 </pkgmetadata>
21
22
23
24 1.1 dev-ruby/prawn-layout/ChangeLog
25
26 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/prawn-layout/ChangeLog?rev=1.1&view=markup
27 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/prawn-layout/ChangeLog?rev=1.1&content-type=text/plain
28
29 Index: ChangeLog
30 ===================================================================
31 # ChangeLog for dev-ruby/prawn-layout
32 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
33 # $Header: /var/cvsroot/gentoo-x86/dev-ruby/prawn-layout/ChangeLog,v 1.1 2009/07/16 13:28:53 flameeyes Exp $
34
35 *prawn-layout-0.1.0 (16 Jul 2009)
36
37 16 Jul 2009; Diego E. Pettenò <flameeyes@g.o>
38 +prawn-layout-0.1.0.ebuild, +metadata.xml:
39 Initial import of prawn-layout extension for prawn.
40
41
42
43
44 1.1 dev-ruby/prawn-layout/prawn-layout-0.1.0.ebuild
45
46 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/prawn-layout/prawn-layout-0.1.0.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/prawn-layout/prawn-layout-0.1.0.ebuild?rev=1.1&content-type=text/plain
48
49 Index: prawn-layout-0.1.0.ebuild
50 ===================================================================
51 # Copyright 1999-2009 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $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 $
54
55 EAPI=2
56
57 GITHUB_USER=sandal
58
59 inherit ruby
60
61 DESCRIPTION="An extension to Prawn offering table support, grid layouts and other things"
62 HOMEPAGE="http://github.com/${GITHUB_USER}/${PN}/tree/master"
63
64 LICENSE="|| ( GPL-2 Ruby )"
65 SLOT="0"
66 KEYWORDS="~amd64"
67 IUSE="doc examples test"
68
69 SRC_URI="http://github.com/${GITHUB_USER}/${PN}/tarball/${PV} -> ${P}.tgz"
70
71 USE_RUBY="ruby18"
72
73 RDEPEND="dev-ruby/prawn"
74 DEPEND="doc? ( dev-ruby/rake )
75 test? (
76 dev-ruby/rake
77 dev-ruby/mocha
78 ${RDEPEND}
79 )"
80
81 S="${WORKDIR}"
82
83 src_compile() {
84 cd "${WORKDIR}"/${GITHUB_USER}-${PN}-*
85
86 if use doc; then
87 rake rdoc || die "rake rdoc failed"
88 fi
89 }
90
91 src_test() {
92 cd "${WORKDIR}"/${GITHUB_USER}-${PN}-*
93
94 rake test || die "rake test failed"
95 }
96
97 dofakegemspec() {
98 cat - > "${T}"/${P}.gemspec <<EOF
99 Gem::Specification.new do |s|
100 s.name = "${PN}"
101 s.version = "${PV}"
102 s.summary = "${DESCRIPTION}"
103 s.homepage = "${HOMEPAGE}"
104 end
105 EOF
106
107 # Note: this only works with 1.8 so if you need to make it work
108 # with 1.9 you better wait for ruby-fakegem.eclass.
109 insinto $(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]')/../gems/1.8/specifications
110 doins "${T}"/${P}.gemspec || die "Unable to install fake gemspec"
111 }
112
113 src_install() {
114 cd "${WORKDIR}"/${GITHUB_USER}-${PN}-*
115
116 pushd lib
117 doruby -r * || die "install lib failed"
118 popd
119
120 dofakegemspec
121
122 if use doc; then
123 docinto apidocs
124 pushd doc
125 dohtml -r * || die "Installing html documentation failed."
126 popd
127 fi
128
129 if use examples; then
130 docinto examples
131 dodoc -r examples/* || die "Installing examples failes."
132 fi
133 }