summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2010-07-29 02:34:32 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2010-07-29 02:34:32 +0000
commit3ec0430985cdf8359081e8b4da67fefb2fa5b549 (patch)
tree206a8d830e93cf9dafa10683f3778dfc6cb96e55 /dev-ruby
parentMove patch to dev.gentoo.org as it's quite big. (diff)
downloadgentoo-2-3ec0430985cdf8359081e8b4da67fefb2fa5b549.tar.gz
gentoo-2-3ec0430985cdf8359081e8b4da67fefb2fa5b549.tar.bz2
gentoo-2-3ec0430985cdf8359081e8b4da67fefb2fa5b549.zip
Make it install properly the binary extension on Ruby Enterprise as well. Respect CFLAGS/LDFLAGS.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby')
-rw-r--r--dev-ruby/tmail/ChangeLog9
-rw-r--r--dev-ruby/tmail/tmail-1.2.3.1.ebuild60
-rw-r--r--dev-ruby/tmail/tmail-1.2.7.1-r1.ebuild (renamed from dev-ruby/tmail/tmail-1.2.7.1.ebuild)31
3 files changed, 29 insertions, 71 deletions
diff --git a/dev-ruby/tmail/ChangeLog b/dev-ruby/tmail/ChangeLog
index d516b6a225a8..5418f9679908 100644
--- a/dev-ruby/tmail/ChangeLog
+++ b/dev-ruby/tmail/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-ruby/tmail
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/tmail/ChangeLog,v 1.12 2010/05/23 19:27:04 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/tmail/ChangeLog,v 1.13 2010/07/29 02:34:32 flameeyes Exp $
+
+*tmail-1.2.7.1-r1 (29 Jul 2010)
+
+ 29 Jul 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+ -tmail-1.2.3.1.ebuild, -tmail-1.2.7.1.ebuild, +tmail-1.2.7.1-r1.ebuild:
+ Make it install properly the binary extension on Ruby Enterprise as well.
+ Respect CFLAGS/LDFLAGS.
*tmail-1.2.7.1 (23 May 2010)
diff --git a/dev-ruby/tmail/tmail-1.2.3.1.ebuild b/dev-ruby/tmail/tmail-1.2.3.1.ebuild
deleted file mode 100644
index 24e3bf126c77..000000000000
--- a/dev-ruby/tmail/tmail-1.2.3.1.ebuild
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/tmail/tmail-1.2.3.1.ebuild,v 1.11 2010/05/22 22:40:08 a3li Exp $
-
-EAPI=2
-USE_RUBY="ruby18 ree18 ruby19 jruby"
-
-RUBY_FAKEGEM_TASK_DOC="doc"
-RUBY_FAKEGEM_DOCDIR="doc"
-RUBY_FAKEGEM_EXTRADOC="README CHANGES NOTES"
-
-inherit ruby-fakegem
-
-DESCRIPTION="An email handling library"
-HOMEPAGE="http://rubyforge.org/projects/tmail/"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~ppc-macos ~x64-solaris ~x86-solaris"
-IUSE="debug"
-
-# Tests seem to be broken with the new encoding handling from Ruby,
-# need to be verified twice; code seems to work anyway.
-RESTRICT=test
-
-ruby_add_bdepend "
- dev-ruby/racc
- test? ( >=dev-ruby/mocha-0.9.5 )"
-
-each_ruby_compile() {
- if [[ $(basename ${RUBY}) == "ruby18" ]]; then
- pushd ext/tmailscanner/tmail
- ${RUBY} extconf.rb || die "extconf failed"
- emake || die "emake extension failed"
- popd
- fi
-
- emake -C lib/tmail $(use debug && echo DEBUG=true) parser.rb || die "emake failed"
-}
-
-each_ruby_install() {
- # We cannot use the recursive install because there are
- # racc source files and a makefile.
- find lib -name '*.rb' | while read file; do
- ruby_fakegem_newins $file $file
- done
-
- if [[ $(basename ${RUBY}) == "ruby18" ]]; then
- ruby_fakegem_newins ext/tmailscanner/tmail/tmailscanner.so lib/tmail/tmailscanner.so
- fi
-
- ruby_fakegem_genspec
-}
-
-all_ruby_install() {
- all_fakegem_install
-
- docinto examples
- dodoc sample/* || die
-}
diff --git a/dev-ruby/tmail/tmail-1.2.7.1.ebuild b/dev-ruby/tmail/tmail-1.2.7.1-r1.ebuild
index aeeda203c386..829522703836 100644
--- a/dev-ruby/tmail/tmail-1.2.7.1.ebuild
+++ b/dev-ruby/tmail/tmail-1.2.7.1-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/tmail/tmail-1.2.7.1.ebuild,v 1.1 2010/05/23 19:27:04 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/tmail/tmail-1.2.7.1-r1.ebuild,v 1.1 2010/07/29 02:34:32 flameeyes Exp $
EAPI=2
USE_RUBY="ruby18 ree18 ruby19 jruby"
@@ -23,6 +23,10 @@ IUSE="debug"
# need to be verified twice; code seems to work anyway.
RESTRICT=test
+# Once it's added to portage, this should be added, right now it's
+# bundled.
+# ruby_add_rdepend dev-ruby/rchardet
+
ruby_add_bdepend "
dev-ruby/racc
test? ( >=dev-ruby/mocha-0.9.5 )"
@@ -33,15 +37,23 @@ all_ruby_prepare() {
echo "tmail" > meta/unixname || die "Failed to create unixname file."
}
-each_ruby_compile() {
- if [[ $(basename ${RUBY}) == "ruby18" ]]; then
- pushd ext/tmailscanner/tmail
- ${RUBY} extconf.rb || die "extconf failed"
- emake || die "emake extension failed"
- popd
- fi
+each_ruby_configure() {
+ case ${RUBY} in
+ *ruby18 | *rubyee18)
+ ${RUBY} -Cext/tmailscanner/tmail extconf.rb || die "extconf failed"
+ ;;
+ esac
+}
+each_ruby_compile() {
emake -C lib/tmail $(use debug && echo DEBUG=true) parser.rb || die "emake failed"
+
+ case ${RUBY} in
+ *ruby18 | *rubyee18)
+ emake -Cext/tmailscanner/tmail extconf.rb \
+ CFLAGS="${CFLAGS} -fPIC" archflag="${LDFLAGS}" || die "emake extension failed"
+ ;;
+ esac
}
each_ruby_install() {
@@ -51,9 +63,8 @@ each_ruby_install() {
ruby_fakegem_newins $file $file
done
- if [[ $(basename ${RUBY}) == "ruby18" ]]; then
+ [[ -f ext/tmailscanner/tmail/tmailscanner.so ]] && \
ruby_fakegem_newins ext/tmailscanner/tmail/tmailscanner.so lib/tmail/tmailscanner.so
- fi
ruby_fakegem_genspec
}