summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2012-05-12 04:29:15 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2012-05-12 04:29:15 +0000
commit0751d375070cae5c7f519e0e324fe1c44061aa74 (patch)
tree461ca5ad5f26a360d976c8a784a92d06841cd87c /dev-ruby
parentAdd support for Ruby 1.9. (diff)
downloadgentoo-2-0751d375070cae5c7f519e0e324fe1c44061aa74.tar.gz
gentoo-2-0751d375070cae5c7f519e0e324fe1c44061aa74.tar.bz2
gentoo-2-0751d375070cae5c7f519e0e324fe1c44061aa74.zip
Restore prawn on Ruby 1.9 as well, use REQUIRED_USE to make that the correct ruby targets are enabled for given USE flags.
(Portage version: 2.2.0_alpha104/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby')
-rw-r--r--dev-ruby/barby/ChangeLog9
-rw-r--r--dev-ruby/barby/barby-0.5.0-r2.ebuild (renamed from dev-ruby/barby/barby-0.5.0-r1.ebuild)22
-rw-r--r--dev-ruby/barby/barby-0.5.0.ebuild122
3 files changed, 20 insertions, 133 deletions
diff --git a/dev-ruby/barby/ChangeLog b/dev-ruby/barby/ChangeLog
index d98b6fd8a577..1bd4dc6d015f 100644
--- a/dev-ruby/barby/ChangeLog
+++ b/dev-ruby/barby/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-ruby/barby
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/barby/ChangeLog,v 1.3 2012/05/12 01:55:38 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/barby/ChangeLog,v 1.4 2012/05/12 04:29:15 flameeyes Exp $
+
+*barby-0.5.0-r2 (12 May 2012)
+
+ 12 May 2012; Diego E. Pettenò <flameeyes@gentoo.org> +barby-0.5.0-r2.ebuild,
+ -barby-0.5.0-r1.ebuild, -barby-0.5.0.ebuild:
+ Restore prawn on Ruby 1.9 as well, use REQUIRED_USE to make that the correct
+ ruby targets are enabled for given USE flags.
12 May 2012; Diego E. Pettenò <flameeyes@gentoo.org> barby-0.5.0-r1.ebuild:
Add support for Ruby 1.9; add dependency over imagemagick[png] for testing.
diff --git a/dev-ruby/barby/barby-0.5.0-r1.ebuild b/dev-ruby/barby/barby-0.5.0-r2.ebuild
index bdfe7bd78f31..e56a24b39b89 100644
--- a/dev-ruby/barby/barby-0.5.0-r1.ebuild
+++ b/dev-ruby/barby/barby-0.5.0-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/barby/barby-0.5.0-r1.ebuild,v 1.2 2012/05/12 01:55:38 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/barby/barby-0.5.0-r2.ebuild,v 1.1 2012/05/12 04:29:15 flameeyes Exp $
EAPI=4
@@ -34,23 +34,28 @@ USE_RUBY="ruby18 ree18" \
datamatrix? ( dev-ruby/semacode )
pdf-writer? ( dev-ruby/pdf-writer )"
-# ruby19 as well, if it worked
USE_RUBY="ruby18 ruby19 ree18" \
ruby_add_rdepend "
rmagick? ( dev-ruby/rmagick )
cairo? ( dev-ruby/rcairo )"
-USE_RUBY="ruby18 ree18 jruby" \
- ruby_add_rdepend "prawn? ( dev-ruby/prawn )"
-
ruby_add_rdepend "qrcode? ( dev-ruby/rqrcode )
- png? ( dev-ruby/chunky_png )"
+ png? ( dev-ruby/chunky_png )
+ prawn? ( dev-ruby/prawn )"
ruby_add_bdepend "test? ( dev-ruby/minitest )"
# testing requires imagemagick capable of png output
DEPEND+=" test? ( media-gfx/imagemagick[png] )"
+# make sure that the various options require a compatible Ruby implementation
+REQUIRE_USE+="
+ datamatrix? ( || ( ruby_targets_ruby18 ruby_targets_ree18 )
+ pdf-writer? ( || ( ruby_targets_ruby18 ruby_targets_ree18 )
+ rmagick? ( || ( ruby_targets_ruby18 ruby_targets_ruby19 ruby_targets_ree18 ) )
+ cairo? ( || ( ruby_targets_ruby18 ruby_targets_ruby19 ruby_targets_ree18 ) )
+"
+
# prawn breaks tests for some reasons, needs to be investigated; code
# still works though.
RESTRICT="prawn? ( test )"
@@ -122,14 +127,11 @@ each_ruby_prepare() {
lib/barby/barcode/data_matrix.rb \
test/data_matrix_test.rb \
lib/barby/outputter/pdfwriter_outputter.rb \
- test/outputter/pdfwriter_outputter_test.rb \
- lib/barby/outputter/prawn_outputter.rb \
- test/outputter/prawn_outputter_test.rb
+ test/outputter/pdfwriter_outputter_test.rb
sed -i \
-e '/semacode/d' \
-e '/pdf-writer/d' \
- -e '/prawn/d' \
${RUBY_FAKEGEM_GEMSPEC}
;;
*/jruby)
diff --git a/dev-ruby/barby/barby-0.5.0.ebuild b/dev-ruby/barby/barby-0.5.0.ebuild
deleted file mode 100644
index fda2ab5eda34..000000000000
--- a/dev-ruby/barby/barby-0.5.0.ebuild
+++ /dev/null
@@ -1,122 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/barby/barby-0.5.0.ebuild,v 1.1 2011/09/18 13:40:41 flameeyes Exp $
-
-EAPI=4
-
-USE_RUBY="ruby18 ree18 jruby"
-
-RUBY_FAKEGEM_TASK_TEST="test"
-
-RUBY_FAKEGEM_TASK_DOC="doc"
-RUBY_FAKEGEM_DOCDIR="site"
-
-RUBY_FAKEGEM_EXTRADOC="CHANGELOG README"
-
-inherit ruby-fakegem
-
-DESCRIPTION="Ruby barcode generator that doesn't rely on 3rd party libraries."
-HOMEPAGE="http://toretore.eu/barby/"
-
-GITHUB_USER="toretore"
-SRC_URI="https://github.com/${GITHUB_USER}/${PN}/tarball/v${PV} -> ${P}.tgz"
-RUBY_S="${GITHUB_USER}-${PN}-*"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="test datamatrix pdf-writer qrcode rmagick prawn png cairo"
-
-USE_RUBY="ruby18 ree18" \
- ruby_add_rdepend "
- datamatrix? ( dev-ruby/semacode )
- pdf-writer? ( dev-ruby/pdf-writer )"
-
-# ruby19 as well, if it worked
-USE_RUBY="ruby18 ree18" \
- ruby_add_rdepend "
- rmagick? ( dev-ruby/rmagick )
- cairo? ( dev-ruby/rcairo )"
-
-USE_RUBY="ruby18 ree18 jruby" \
- ruby_add_rdepend "prawn? ( dev-ruby/prawn )"
-
-ruby_add_rdepend "qrcode? ( dev-ruby/rqrcode )
- png? ( dev-ruby/chunky_png )"
-
-ruby_add_bdepend "test? ( dev-ruby/minitest )"
-
-# prawn breaks tests for some reasons, needs to be investigated; code
-# still works though.
-RESTRICT="prawn? ( test )"
-
-all_ruby_prepare() {
- sed -i -e '/[bB]undler/s:^:#:' test/test_helper.rb
-}
-
-each_ruby_prepare() {
- if ! use datamatrix; then
- rm \
- lib/barby/barcode/data_matrix.rb \
- test/data_matrix_test.rb
- fi
-
- if ! use pdf-writer; then
- rm \
- lib/barby/outputter/pdfwriter_outputter.rb \
- test/outputter/pdfwriter_outputter_test.rb
- fi
-
- if ! use qrcode; then
- rm \
- lib/barby/barcode/qr_code.rb \
- test/qr_code_test.rb
- fi
-
- if ! use rmagick; then
- rm \
- lib/barby/outputter/rmagick_outputter.rb \
- test/outputter/rmagick_outputter_test.rb
- fi
-
- if ! use prawn; then
- rm \
- lib/barby/outputter/prawn_outputter.rb \
- test/outputter/prawn_outputter_test.rb
- fi
-
- if ! use png; then
- rm \
- lib/barby/outputter/png_outputter.rb \
- test/outputter/png_outputter_test.rb
- fi
-
- if ! use cairo; then
- rm \
- lib/barby/outputter/cairo_outputter.rb \
- test/outputter/cairo_outputter_test.rb
- fi
-
- case ${RUBY} in
- */ruby19)
- rm -f \
- lib/barby/barcode/data_matrix.rb \
- test/data_matrix_test.rb \
- lib/barby/outputter/pdfwriter_outputter.rb \
- test/outputter/pdfwriter_outputter_test.rb \
- lib/barby/outputter/prawn_outputter.rb \
- test/outputter/prawn_outputter_test.rb
- ;;
- */jruby)
- rm -f \
- lib/barby/barcode/data_matrix.rb \
- test/data_matrix_test.rb \
- lib/barby/outputter/pdfwriter_outputter.rb \
- test/outputter/pdfwriter_outputter_test.rb \
- lib/barby/outputter/rmagick_outputter.rb \
- test/outputter/rmagick_outputter_test.rb \
- lib/barby/outputter/cairo_outputter.rb \
- test/outputter/cairo_outputter_test.rb
- ;;
- esac
-}