/[gentoo-x86]/dev-ruby/system_timer/system_timer-1.2.4.ebuild
Gentoo

Contents of /dev-ruby/system_timer/system_timer-1.2.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Fri Apr 18 17:12:31 2014 UTC (5 months, 2 weeks ago) by mrueg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
FILE REMOVED
dev-ruby/system_timer removal. Supports ruby-1.8 only See bug #434064.

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-ruby/system_timer/system_timer-1.2.4.ebuild,v 1.3 2014/02/25 08:28:45 graaff Exp $
4
5 EAPI="4"
6
7 USE_RUBY="ruby18 ree18"
8
9 RUBY_FAKEGEM_TASK_TEST="test"
10
11 RUBY_FAKEGEM_TASK_DOC="rdoc"
12 RUBY_FAKEGEM_DOCDIR="rdoc"
13 RUBY_FAKEGEM_EXTRADOC="README.markdown ChangeLog"
14
15 GITHUB_USER="ph7"
16 GITHUB_PROJECT="${PN/_/-}"
17
18 inherit ruby-fakegem eutils
19
20 DESCRIPTION="Signal-based timer for Ruby 1.8 (and RubyEE 1.8)"
21 HOMEPAGE="http://ph7spot.com/musings/system-timer"
22 SRC_URI="https://github.com/${GITHUB_USER}/${GITHUB_PROJECT}/tarball/${PV} -> ${P}.tar.gz"
23 RUBY_S="${GITHUB_USER}-${GITHUB_PROJECT}-*"
24
25 LICENSE="|| ( Ruby GPL-2 )"
26 SLOT="0"
27 KEYWORDS="~amd64 ~x86"
28 IUSE=""
29
30 ruby_add_bdepend "
31 test? (
32 dev-ruby/mocha
33 dev-ruby/dust
34 )"
35
36 each_ruby_configure() {
37 ${RUBY} -C ext/${PN} extconf.rb || die
38 }
39
40 each_ruby_compile() {
41 emake -C ext/${PN} CFLAGS="${CFLAGS} -fPIC" archflag="${LDFLAGS}"
42 cp ext/${PN}/*.so lib || die
43 }
44
45 each_ruby_install() {
46 each_fakegem_install
47
48 # and now... since the gem was renamed from SystemTimer, create a
49 # fake SystemTimer gem...
50 cat - <<EOF > "${T}/SystemTimer.gemspec"
51 # generated by ebuild
52 # $Header: /var/cvsroot/gentoo-x86/dev-ruby/system_timer/system_timer-1.2.4.ebuild,v 1.3 2014/02/25 08:28:45 graaff Exp $
53 Gem::Specification.new do |s|
54 s.name = "SystemTimer"
55 s.version = "${RUBY_FAKEGEM_VERSION}"
56 s.summary = "Fake gem to load system_timer"
57 s.homepage = "${HOMEPAGE}"
58 s.require_paths = ["lib"]
59 s.specification_version = 3
60 s.add_runtime_dependency("${RUBY_FAKEGEM_NAME}", ["= ${RUBY_FAKEGEM_VERSION}"])
61 end
62 EOF
63 RUBY_FAKEGEM_NAME=SystemTimer \
64 RUBY_FAKEGEM_GEMSPEC="${T}/SystemTimer.gemspec" \
65 ruby_fakegem_install_gemspec
66
67 dodir $(ruby_fakegem_gemsdir)/gems/SystemTimer-${PV}/lib
68 cat - <<EOF > "${D}/$(ruby_fakegem_gemsdir)/gems/SystemTimer-${PV}/lib/SystemTimer.rb"
69 require 'system_timer'
70 EOF
71 }

  ViewVC Help
Powered by ViewVC 1.1.20