1 |
flameeyes 11/12/28 23:47:54 |
2 |
|
3 |
Added: metadata.xml bson-1.5.2.ebuild ChangeLog |
4 |
Log: |
5 |
Initial import of ebuild for bson (and bson_ext). |
6 |
|
7 |
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-ruby/bson/metadata.xml |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/bson/metadata.xml?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/bson/metadata.xml?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: metadata.xml |
16 |
=================================================================== |
17 |
<?xml version="1.0" encoding="UTF-8"?> |
18 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
19 |
<pkgmetadata> |
20 |
<herd>ruby</herd> |
21 |
</pkgmetadata> |
22 |
|
23 |
|
24 |
|
25 |
1.1 dev-ruby/bson/bson-1.5.2.ebuild |
26 |
|
27 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/bson/bson-1.5.2.ebuild?rev=1.1&view=markup |
28 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/bson/bson-1.5.2.ebuild?rev=1.1&content-type=text/plain |
29 |
|
30 |
Index: bson-1.5.2.ebuild |
31 |
=================================================================== |
32 |
# Copyright 1999-2011 Gentoo Foundation |
33 |
# Distributed under the terms of the GNU General Public License v2 |
34 |
# $Header: /var/cvsroot/gentoo-x86/dev-ruby/bson/bson-1.5.2.ebuild,v 1.1 2011/12/28 23:47:54 flameeyes Exp $ |
35 |
|
36 |
EAPI=4 |
37 |
# ruby19 → test_exeption_on_using_unsupported_date_class fails |
38 |
# jruby → support needs to be written properly |
39 |
USE_RUBY="ruby18 ree18" |
40 |
|
41 |
RUBY_FAKEGEM_TASK_DOC="moot" # we do it manually, but still declare it |
42 |
RUBY_FAKEGEM_DOCDIR="html" |
43 |
RUBY_FAKEGEM_EXTRADOC="" |
44 |
|
45 |
RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec" |
46 |
|
47 |
GITHUB_USER="mongodb" |
48 |
GITHUB_PROJECT="mongo-ruby-driver" |
49 |
RUBY_S="${GITHUB_USER}-${GITHUB_PROJECT}-*" |
50 |
|
51 |
inherit ruby-fakegem |
52 |
|
53 |
DESCRIPTION="A Ruby BSON implementation for MongoDB. (Includes binary C-based extension.)" |
54 |
HOMEPAGE="http://www.mongodb.org/" |
55 |
SRC_URI="https://github.com/${GITHUB_USER}/${GITHUB_PROJECT}/tarball/${PV} -> ${GITHUB_PROJECT}-${PV}.tar.gz" |
56 |
|
57 |
LICENSE="APSL-2" |
58 |
SLOT="0" |
59 |
KEYWORDS="~amd64" |
60 |
IUSE="test" |
61 |
|
62 |
ruby_add_bdepend \ |
63 |
"test? ( |
64 |
dev-ruby/rake |
65 |
dev-ruby/shoulda |
66 |
dev-ruby/mocha |
67 |
) |
68 |
doc? ( virtual/ruby-rdoc )" |
69 |
|
70 |
all_ruby_prepare() { |
71 |
# remove the stuff that is actually part of dev-ruby/mongo |
72 |
rm -rf {lib,bin}/mongo* |
73 |
} |
74 |
|
75 |
each_ruby_configure() { |
76 |
case ${RUBY} in |
77 |
*/ruby18|*/ruby19|*/rubyee18) |
78 |
${RUBY} -C ext/cbson extconf.rb || die "extconf.rb failed" |
79 |
;; |
80 |
*/jruby) |
81 |
${RUBY} -S rake build:java || die "rake build:java failed" |
82 |
;; |
83 |
esac |
84 |
} |
85 |
|
86 |
each_ruby_compile() { |
87 |
case ${RUBY} in |
88 |
*/ruby18|*/ruby19|*/rubyee18) |
89 |
emake -C ext/cbson CFLAGS="${CFLAGS} -fPIC" archflag="${LDFLAGS}" |
90 |
mkdir lib/bson_ext |
91 |
cp ext/cbson/*.so lib/bson_ext || die |
92 |
;; |
93 |
*/jruby) |
94 |
die "missing in ebuild" |
95 |
;; |
96 |
esac |
97 |
} |
98 |
|
99 |
all_ruby_compile() { |
100 |
# Trying to get the Rakefile to build the sources is more trouble |
101 |
# than it's worth, do it manually instead. |
102 |
rdoc --op html --inline-source lib/**/*.rb || die "rdoc failed" |
103 |
} |
104 |
|
105 |
each_ruby_test() { |
106 |
case ${RUBY} in |
107 |
*/ruby18|*/ruby19|*/rubyee18) |
108 |
C_EXT=true ${RUBY} -S rake test:bson || die "tests failed" |
109 |
;; |
110 |
esac |
111 |
|
112 |
${RUBY} -S rake test:bson || die "tests failed" |
113 |
} |
114 |
|
115 |
each_ruby_install() { |
116 |
# we have to set the library path here because the gemspec tries to |
117 |
# load bson itself, and would fail without that. |
118 |
RUBYLIB="lib" \ |
119 |
each_fakegem_install |
120 |
|
121 |
# and now we create the simulated gem for bson_ext; we create a file |
122 |
# bson_ext.rb within ext so that we don't have to change the |
123 |
# bson_ext.gemspec file, and at the same time we ensure that bson |
124 |
# gem is loaded when loading bson_ext. |
125 |
dodir $(ruby_fakegem_gemsdir)/gems/bson_ext-${PV}/ext |
126 |
cat - <<EOF > "${D}/$(ruby_fakegem_gemsdir)/gems/bson_ext-${PV}/ext/bson_ext.rb" |
127 |
require 'bson' |
128 |
EOF |
129 |
|
130 |
RUBYLIB="lib" \ |
131 |
RUBY_FAKEGEM_NAME=bson_ext \ |
132 |
RUBY_FAKEGEM_GEMSPEC=bson_ext.gemspec \ |
133 |
ruby_fakegem_install_gemspec |
134 |
} |
135 |
|
136 |
pkg_postinst() { |
137 |
elog "Unlike upstream setup, we do not split bson and bson_ext gem." |
138 |
elog "This means that for all the supported targets, the C-based extension" |
139 |
elog "is installed by this package, and is available transparently." |
140 |
} |
141 |
|
142 |
|
143 |
|
144 |
1.1 dev-ruby/bson/ChangeLog |
145 |
|
146 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/bson/ChangeLog?rev=1.1&view=markup |
147 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/bson/ChangeLog?rev=1.1&content-type=text/plain |
148 |
|
149 |
Index: ChangeLog |
150 |
=================================================================== |
151 |
# ChangeLog for dev-ruby/bson |
152 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
153 |
# $Header: /var/cvsroot/gentoo-x86/dev-ruby/bson/ChangeLog,v 1.1 2011/12/28 23:47:54 flameeyes Exp $ |
154 |
|
155 |
*bson-1.5.2 (28 Dec 2011) |
156 |
|
157 |
28 Dec 2011; Diego E. Pettenò <flameeyes@g.o> +bson-1.5.2.ebuild, |
158 |
+metadata.xml: |
159 |
Initial import of ebuild for bson (and bson_ext). |