diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2008-12-01 09:10:22 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2008-12-01 09:10:22 +0000 |
commit | d64a502569cb54ab279e64558795b563ce3f7e96 (patch) | |
tree | a2813ebed2f7a79ef999b5b7345354a5cf82f3b4 /dev-ruby/ruby-prof | |
parent | Keyword ~x86. (diff) | |
download | gentoo-2-d64a502569cb54ab279e64558795b563ce3f7e96.tar.gz gentoo-2-d64a502569cb54ab279e64558795b563ce3f7e96.tar.bz2 gentoo-2-d64a502569cb54ab279e64558795b563ce3f7e96.zip |
Version bump, with patch to work on x86-64.
(Portage version: 2.2_rc16/cvs/Linux 2.6.27-gentoo-r4 x86_64)
Diffstat (limited to 'dev-ruby/ruby-prof')
-rw-r--r-- | dev-ruby/ruby-prof/ChangeLog | 8 | ||||
-rw-r--r-- | dev-ruby/ruby-prof/files/ruby-prof-0.7.1-fix-amd64.patch | 24 | ||||
-rw-r--r-- | dev-ruby/ruby-prof/ruby-prof-0.7.1.ebuild | 73 |
3 files changed, 104 insertions, 1 deletions
diff --git a/dev-ruby/ruby-prof/ChangeLog b/dev-ruby/ruby-prof/ChangeLog index 37bae872d2d2..98579d0c421b 100644 --- a/dev-ruby/ruby-prof/ChangeLog +++ b/dev-ruby/ruby-prof/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-ruby/ruby-prof # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-prof/ChangeLog,v 1.9 2008/11/13 13:10:04 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-prof/ChangeLog,v 1.10 2008/12/01 09:10:22 flameeyes Exp $ + +*ruby-prof-0.7.1 (01 Dec 2008) + + 01 Dec 2008; Diego E. Pettenò <flameeyes@gentoo.org> + +files/ruby-prof-0.7.1-fix-amd64.patch, +ruby-prof-0.7.1.ebuild: + Version bump, with patch to work on x86-64. 13 Nov 2008; Diego Pettenò <flameeyes@gentoo.org> ruby-prof-0.7.0.ebuild: Only disable the thread test instead of restricting tests, upstream is diff --git a/dev-ruby/ruby-prof/files/ruby-prof-0.7.1-fix-amd64.patch b/dev-ruby/ruby-prof/files/ruby-prof-0.7.1-fix-amd64.patch new file mode 100644 index 000000000000..bb2908d2d8ca --- /dev/null +++ b/dev-ruby/ruby-prof/files/ruby-prof-0.7.1-fix-amd64.patch @@ -0,0 +1,24 @@ +Index: ruby-prof-0.7.1/ext/measure_cpu_time.h +=================================================================== +--- ruby-prof-0.7.1.orig/ext/measure_cpu_time.h ++++ ruby-prof-0.7.1/ext/measure_cpu_time.h +@@ -33,13 +33,16 @@ static unsigned long long cpu_frequency; + + #if defined(__GNUC__) + ++#include <stdint.h> ++ + static prof_measure_t + measure_cpu_time() + { + #if defined(__i386__) || defined(__x86_64__) +- unsigned long long x; +- __asm__ __volatile__ ("rdtsc" : "=A" (x)); +- return x; ++ uint32_t a, d; ++ __asm__ volatile("rdtsc\n\t" ++ : "=a" (a), "=d" (d)); ++ return ((uint64_t)d << 32) + a; + #elif defined(__powerpc__) || defined(__ppc__) + unsigned long long x, y; + diff --git a/dev-ruby/ruby-prof/ruby-prof-0.7.1.ebuild b/dev-ruby/ruby-prof/ruby-prof-0.7.1.ebuild new file mode 100644 index 000000000000..9805e156b6b2 --- /dev/null +++ b/dev-ruby/ruby-prof/ruby-prof-0.7.1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-prof/ruby-prof-0.7.1.ebuild,v 1.1 2008/12/01 09:10:22 flameeyes Exp $ + +inherit ruby + +DESCRIPTION="A module for profiling Ruby code" +HOMEPAGE="http://rubyforge.org/projects/ruby-prof/" +SRC_URI="mirror://rubyforge/${PN}/${P}.tgz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="doc" + +RDEPEND="virtual/ruby" +DEPEND="${RDEPEND} + test? ( dev-ruby/rake ) + doc? ( dev-ruby/rake )" + +USE_RUBY="ruby18" + +src_unpack() { + ruby_src_unpack + + # The thread testing in 0.7.1 and earlier versions is broken, it + # has to be tested for the next versions, since upstream is + # looking for a solution. + rm "${S}"/test/thread_test.rb \ + || die "unable to remove broken test unit" + sed -i -e '/thread_test/d' \ + test/test_suite.rb || die "unable to remove broken test reference" + + epatch "${FILESDIR}/${P}-fix-amd64.patch" +} + +src_compile() { + cd "${S}/ext" + ruby_econf || die "ruby_econf failed" + ruby_emake || die "ruby_emake failed" + + if use doc; then + rake rdoc || die "rake rdoc failed" + fi +} + +src_test() { + rake test || die "rake test failed" +} + +src_install() { + dobin bin/ruby-prof || die "dobin failed" + + cd "${S}"/lib + doruby -r * || die "doruby failed" + + cd "${S}"/ext + ruby_einstall || die "ruby_einstall failed" + + cd "${S}" + + dodoc README CHANGES || die "dodoc failed" + + if use doc; then + dohtml -r doc/* || die "dohtml failed" + fi + + + for dir in examples rails rails/example rails/environment; do + docinto "$dir" + dodoc "$dir"/* || die "dodoc $dir failed" + done +} |