diff options
author | Hans de Graaff <graaff@gentoo.org> | 2018-08-14 06:01:30 +0200 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2018-08-14 06:01:30 +0200 |
commit | 55e9940753e59f5fe79998030923367db8140726 (patch) | |
tree | e134bcaab2253b308895cd624c1d2f79652640ef /dev-ruby | |
parent | dev-ruby/hashie: cleanup (diff) | |
download | gentoo-55e9940753e59f5fe79998030923367db8140726.tar.gz gentoo-55e9940753e59f5fe79998030923367db8140726.tar.bz2 gentoo-55e9940753e59f5fe79998030923367db8140726.zip |
dev-ruby/barby: add 0.6.6
Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'dev-ruby')
-rw-r--r-- | dev-ruby/barby/Manifest | 1 | ||||
-rw-r--r-- | dev-ruby/barby/barby-0.6.6.ebuild | 99 |
2 files changed, 100 insertions, 0 deletions
diff --git a/dev-ruby/barby/Manifest b/dev-ruby/barby/Manifest index 5ebb66b7a649..1372c2e74b16 100644 --- a/dev-ruby/barby/Manifest +++ b/dev-ruby/barby/Manifest @@ -1 +1,2 @@ DIST barby-0.6.5.tar.gz 93781 BLAKE2B 52589bd473403e6640426eeda6c5f4f9e0b070693e2a146fc077bba33e141fd73bc0ff73908f61d0efb6b8d1c5cd971527f9ae75333ecf029d44ea21135c2133 SHA512 f6101edf7a75986c55577d27dcbb0628fc7a6a4d2b8b4eab7a53e2703fbd0a1ec70a062c7a1e3d2b65db2afeecf8f0375a936c2932125b0d96647b8d24dd0e5c +DIST barby-0.6.6.tar.gz 95120 BLAKE2B e46f261eb11eb2f5b17061e6cbe04419df81d4248a9bed8a5f8f90cba9329915cacf3fa48cc922f4eac14ca7eada87e5be526d9b0d2e0bd1f443daf09af89088 SHA512 5b0a00861b9cecee153c5e1f4e1564d99021b3f7f6005efc48d666f8b4255e91f18792d19b9ae635d40f72dbb38de8db215a252b553138be737a52a8ba85c728 diff --git a/dev-ruby/barby/barby-0.6.6.ebuild b/dev-ruby/barby/barby-0.6.6.ebuild new file mode 100644 index 000000000000..935d6cd8ee35 --- /dev/null +++ b/dev-ruby/barby/barby-0.6.6.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +USE_RUBY="ruby23 ruby24" + +RUBY_FAKEGEM_TASK_TEST="test" + +RUBY_FAKEGEM_EXTRADOC="CHANGELOG README.md" + +RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec" + +inherit ruby-fakegem + +DESCRIPTION="Ruby barcode generator that doesn't rely on 3rd party libraries" +HOMEPAGE="http://toreto.re/barby/" + +GITHUB_USER="toretore" +SRC_URI="https://github.com/${GITHUB_USER}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="test qrcode rmagick prawn png cairo" + +ruby_add_rdepend " + rmagick? ( dev-ruby/rmagick ) + cairo? ( dev-ruby/rcairo )" + +ruby_add_rdepend "qrcode? ( dev-ruby/rqrcode ) + 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] )" + +# prawn breaks tests for some reasons, needs to be investigated; code +# still works though. +RESTRICT="prawn? ( test )" + +all_ruby_prepare() { + sed -i -e 's/README/README.md/' Rakefile || die + + sed -i -e '/[bB]undler/s:^:#:' test/test_helper.rb || die + + if use qrcode; then + sed -i -e '/^end/i s.add_dependency "rqrcode"' ${RUBY_FAKEGEM_GEMSPEC} + else + rm \ + lib/barby/barcode/qr_code.rb \ + test/qr_code_test.rb + fi + + if use rmagick; then + sed -i -e '/^end/i s.add_dependency "rmagick"' ${RUBY_FAKEGEM_GEMSPEC} + else + rm \ + lib/barby/outputter/rmagick_outputter.rb \ + test/outputter/rmagick_outputter_test.rb + fi + + if use prawn; then + sed -i -e '/^end/i s.add_dependency "prawn"' ${RUBY_FAKEGEM_GEMSPEC} + else + rm \ + lib/barby/outputter/prawn_outputter.rb \ + test/outputter/prawn_outputter_test.rb + fi + + if use png; then + sed -i -e '/^end/i s.add_dependency "chunky_png"' ${RUBY_FAKEGEM_GEMSPEC} + else + rm \ + lib/barby/outputter/png_outputter.rb \ + test/outputter/png_outputter_test.rb + fi + + if use cairo; then + sed -i -e '/^end/i s.add_dependency "cairo"' ${RUBY_FAKEGEM_GEMSPEC} + else + rm \ + lib/barby/outputter/cairo_outputter.rb \ + test/outputter/cairo_outputter_test.rb + fi + + 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 || die + + sed -i \ + -e '/semacode/d' \ + -e '/pdf-writer/d' \ + ${RUBY_FAKEGEM_GEMSPEC} || die +} |