diff options
author | 2011-07-14 08:32:54 +0000 | |
---|---|---|
committer | 2011-07-14 08:32:54 +0000 | |
commit | 5b5b3f7824cf15e00dd29c3280cc3f112fadd1c7 (patch) | |
tree | 919ffb2f4433b4d3e9ff17cd2568ecea820654c1 /dev-ruby/rqr/rqr-0.2.2.ebuild | |
parent | ppc stable wrt #372983 (diff) | |
download | gentoo-2-5b5b3f7824cf15e00dd29c3280cc3f112fadd1c7.tar.gz gentoo-2-5b5b3f7824cf15e00dd29c3280cc3f112fadd1c7.tar.bz2 gentoo-2-5b5b3f7824cf15e00dd29c3280cc3f112fadd1c7.zip |
Initial import of rqr gem. Ebuild a bit custom, but works.
(Portage version: 2.2.0_alpha45/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby/rqr/rqr-0.2.2.ebuild')
-rw-r--r-- | dev-ruby/rqr/rqr-0.2.2.ebuild | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/dev-ruby/rqr/rqr-0.2.2.ebuild b/dev-ruby/rqr/rqr-0.2.2.ebuild new file mode 100644 index 000000000000..5d814b63a3f7 --- /dev/null +++ b/dev-ruby/rqr/rqr-0.2.2.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rqr/rqr-0.2.2.ebuild,v 1.1 2011/07/14 08:32:54 flameeyes Exp $ + +EAPI=4 + +# ruby19 → uses old RString interface +# jruby → native extension, unusable +USE_RUBY="ruby18 ree18" + +# do not use Rake tasks for this as it requires hoe, newgem, and is +# generally a mess. +RUBY_FAKEGEM_TASK_TEST="" +RUBY_FAKEGEM_TASK_DOC="" + +RUBY_FAKEGEM_DOCDIR="doc" +RUBY_FAKEGEM_EXTRADOC="README.txt History.txt" + +inherit ruby-fakegem flag-o-matic + +DESCRIPTION="A ruby library to create qrcode" +HOMEPAGE="http://rqr.rubyforge.org/" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="doc test +jpeg +png +tiff" + +ruby_add_bdepend "doc? ( virtual/ruby-rdoc ) + test? ( virtual/ruby-test-unit )" + +CDEPEND="jpeg? ( virtual/jpeg ) + png? ( media-libs/libpng ) + tiff? ( media-libs/tiff )" + +RDEPEND="${RDEPEND} ${CDEPEND}" +DEPEND="${DEPEND} ${CDEPEND}" + +# tests require the presence of all external formats; simply add them as +# a requirement for now. +REQUIRED_USE="test? ( jpeg png tiff )" + +each_ruby_configure() { + cd ext/rqr + ${RUBY} extconf.rb || die "extconf.rb failed" +} + +each_ruby_compile() { + # this should be handled by extconf.rb, but unfortunately it mangles + # the CFLAGS rather than doing it properly so we have to replicate + # it here until upstream makes a sense out of it. + # + # Note: you can avoid using any of those, but then it would only + # generate EPS, which might or might not be what you want. + use jpeg && append-flags -DUSE_JPG + use png && append-flags -DUSE_PNG + use tiff && append-flags -DUSE_TIFF + + # extension uses C++, so use CXXFLAGS not CFLAGS + emake -C ext/rqr \ + CFLAGS="${CXXFLAGS} -fPIC" archflag="${LDFLAGS}" || die "emake failed" + cp ext/rqr/QR.so lib/rqr || die +} + +all_ruby_compile() { + if use doc; then + ${RUBY} rdoc || die "rdoc failed" + fi +} + +each_ruby_test() { + ${RUBY} -Ilib test/test_rqr.rb || die "tests failed" +} |