diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2011-09-18 13:40:41 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2011-09-18 13:40:41 +0000 |
commit | e7165d5b9e978bb7439e84454401b7391e276f15 (patch) | |
tree | 32109d0747e6b70195bc132d06e24cf9f49ea91a /dev-ruby/barby | |
parent | Add support for ree18. (diff) | |
download | gentoo-2-e7165d5b9e978bb7439e84454401b7391e276f15.tar.gz gentoo-2-e7165d5b9e978bb7439e84454401b7391e276f15.tar.bz2 gentoo-2-e7165d5b9e978bb7439e84454401b7391e276f15.zip |
Initial import of the barby library and tool to generate barcodes in different formats with Ruby. Note that outputters and external dependencies are all configured by USE flags, and that testing only works if prawn is disabled, for now.
(Portage version: 2.2.0_alpha58/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby/barby')
-rw-r--r-- | dev-ruby/barby/ChangeLog | 13 | ||||
-rw-r--r-- | dev-ruby/barby/barby-0.5.0.ebuild | 122 | ||||
-rw-r--r-- | dev-ruby/barby/metadata.xml | 43 |
3 files changed, 178 insertions, 0 deletions
diff --git a/dev-ruby/barby/ChangeLog b/dev-ruby/barby/ChangeLog new file mode 100644 index 000000000000..59bb867a08e3 --- /dev/null +++ b/dev-ruby/barby/ChangeLog @@ -0,0 +1,13 @@ +# ChangeLog for dev-ruby/barby +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/barby/ChangeLog,v 1.1 2011/09/18 13:40:41 flameeyes Exp $ + +*barby-0.5.0 (18 Sep 2011) + + 18 Sep 2011; Diego E. Pettenò <flameeyes@gentoo.org> +barby-0.5.0.ebuild, + +metadata.xml: + Initial import of the barby library and tool to generate barcodes in + different formats with Ruby. Note that outputters and external dependencies + are all configured by USE flags, and that testing only works if prawn is + disabled, for now. + diff --git a/dev-ruby/barby/barby-0.5.0.ebuild b/dev-ruby/barby/barby-0.5.0.ebuild new file mode 100644 index 000000000000..fda2ab5eda34 --- /dev/null +++ b/dev-ruby/barby/barby-0.5.0.ebuild @@ -0,0 +1,122 @@ +# 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 +} diff --git a/dev-ruby/barby/metadata.xml b/dev-ruby/barby/metadata.xml new file mode 100644 index 000000000000..c80d25c46209 --- /dev/null +++ b/dev-ruby/barby/metadata.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>ruby</herd> + + <use> + <flag name="datamatrix"> + Add support for datamatrix 2D codes using + <pkg>dev-ruby/semacode</pkg>. + </flag> + + <flag name="qrcode"> + Add support for QRCode 2D codes using + <pkg>dev-ruby/rqrcode</pkg>. + </flag> + + <flag name="pdf-writer"> + Add support for writing PDF documents using + <pkg>dev-ruby/pdf-writer</pkg>. + </flag> + + <flag name="prawn"> + Add support for writing PDF documents using + <pkg>dev-ruby/prawn</pkg>. + </flag> + + <flag name="png"> + Add support for writing PNG images using + <pkg>dev-ruby/chunky_png</pkg>. + </flag> + + <flag name="rmagick"> + Add support for writing images (among others PNG, GIF and JPEG) + using <pkg>dev-ruby/rmagick</pkg>. Not available on JRuby. + </flag> + + <flag name="cairo"> + Add support for writing images (PNG, PS, EPS and, if supported, + PDF and SVG) using <pkg>dev-ruby/rcairo</pkg>. Not available on + JRuby. + </flag> + </use> +</pkgmetadata> |