* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-05-22 3:39 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2010-05-22 3:39 UTC (permalink / raw
To: gentoo-commits
flameeyes 10/05/22 03:39:51
Modified: ruby-ng.eclass
Log:
Fix missing link warnings in the eclass to print the library's soname again.
Revision Changes Path
1.15 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.15&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.15&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.14&r2=1.15
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- ruby-ng.eclass 21 May 2010 23:18:46 -0000 1.14
+++ ruby-ng.eclass 22 May 2010 03:39:50 -0000 1.15
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.14 2010/05/21 23:18:46 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.15 2010/05/22 03:39:50 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -415,9 +415,9 @@
> "${T}"/ruby-ng-${_ruby_implementation}-mislink.log
if [[ -s "${T}"/ruby-ng-${_ruby_implementation}-mislink.log ]]; then
- ewarn "Extensions installed for ${_ruby_implementation} with missing links to ${libruby}"
+ ewarn "Extensions installed for ${_ruby_implementation} with missing links to ${libruby_soname}"
ewarn $(< "${T}"/ruby-ng-${_ruby_implementation}-mislink.log )
- die "Missing links to ${libruby}"
+ die "Missing links to ${libruby_soname}"
fi
}
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2013-06-23 14:56 Hans de Graaff (graaff)
0 siblings, 0 replies; 39+ messages in thread
From: Hans de Graaff (graaff) @ 2013-06-23 14:56 UTC (permalink / raw
To: gentoo-commits
graaff 13/06/23 14:56:07
Modified: ruby-ng.eclass
Log:
Add support for ruby20.
Revision Changes Path
1.52 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.52&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.52&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.51&r2=1.52
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- ruby-ng.eclass 27 Sep 2012 16:35:41 -0000 1.51
+++ ruby-ng.eclass 23 Jun 2013 14:56:07 -0000 1.52
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.51 2012/09/27 16:35:41 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.52 2013/06/23 14:56:07 graaff Exp $
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -17,6 +17,7 @@
# Currently available targets are:
# * ruby18 - Ruby (MRI) 1.8.x
# * ruby19 - Ruby (MRI) 1.9.x
+# * ruby20 - Ruby (MRI) 2.0.x
# * ree18 - Ruby Enterprise Edition 1.8.x
# * jruby - JRuby
# * rbx - Rubinius
@@ -108,6 +109,10 @@
rubypn="dev-lang/ruby"
rubyslot=":1.9"
;;
+ ruby20)
+ rubypn="dev-lang/ruby"
+ rubyslot=":2.0"
+ ;;
ree18)
rubypn="dev-lang/ruby-enterprise"
rubyslot=":1.8"
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2011-10-24 18:20 Hans de Graaff (graaff)
0 siblings, 0 replies; 39+ messages in thread
From: Hans de Graaff (graaff) @ 2011-10-24 18:20 UTC (permalink / raw
To: gentoo-commits
graaff 11/10/24 18:20:06
Modified: ruby-ng.eclass
Log:
Use RbConfig instead of Config to get ruby configuration values, since Config is now deprecated in Ruby 1.9 and all current implementations of ruby support RbConfig.
Revision Changes Path
1.43 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.43&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.43&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.42&r2=1.43
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- ruby-ng.eclass 22 Oct 2011 10:08:44 -0000 1.42
+++ ruby-ng.eclass 24 Oct 2011 18:20:05 -0000 1.43
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.42 2011/10/22 10:08:44 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.43 2011/10/24 18:20:05 graaff Exp $
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -507,10 +507,10 @@
has "${EAPI}" 2 && ! use prefix && EPREFIX=
- local libruby_basename=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["LIBRUBY_SO"]')
+ local libruby_basename=$(${RUBY} -rrbconfig -e 'puts RbConfig::CONFIG["LIBRUBY_SO"]')
local libruby_soname=$(basename $(${scancmd} -F "%S#F" -qS "${EPREFIX}/usr/$(get_libdir)/${libruby_basename}") 2>/dev/null)
- local sitedir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["sitedir"]')
- local sitelibdir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')
+ local sitedir=$(${RUBY} -rrbconfig -e 'puts RbConfig::CONFIG["sitedir"]')
+ local sitelibdir=$(${RUBY} -rrbconfig -e 'puts RbConfig::CONFIG["sitelibdir"]')
# Look for wrong files in sitedir
# if [[ -d "${D}${sitedir}" ]]; then
@@ -560,7 +560,7 @@
# @USAGE: rbconfig item
# @RETURN: Returns the value of the given rbconfig item of the Ruby interpreter in ${RUBY}.
ruby_rbconfig_value() {
- echo $(${RUBY} -rrbconfig -e "puts Config::CONFIG['$1']")
+ echo $(${RUBY} -rrbconfig -e "puts RbConfig::CONFIG['$1']")
}
# @FUNCTION: doruby
@@ -581,7 +581,7 @@
# @FUNCTION: ruby_get_libruby
# @RETURN: The location of libruby*.so belonging to the Ruby interpreter in ${RUBY}.
ruby_get_libruby() {
- ${RUBY} -rrbconfig -e 'puts File.join(Config::CONFIG["libdir"], Config::CONFIG["LIBRUBY"])'
+ ${RUBY} -rrbconfig -e 'puts File.join(RbConfig::CONFIG["libdir"], RbConfig::CONFIG["LIBRUBY"])'
}
# @FUNCTION: ruby_get_hdrdir
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2011-10-22 10:08 Tomas Chvatal (scarabeus)
0 siblings, 0 replies; 39+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2011-10-22 10:08 UTC (permalink / raw
To: gentoo-commits
scarabeus 11/10/22 10:08:44
Modified: ruby-ng.eclass
Log:
Check if the jruby is also in IUSE before checking if it is enabled.
Revision Changes Path
1.42 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.42&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.42&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.41&r2=1.42
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- ruby-ng.eclass 21 Oct 2011 06:48:24 -0000 1.41
+++ ruby-ng.eclass 22 Oct 2011 10:08:44 -0000 1.42
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.41 2011/10/21 06:48:24 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.42 2011/10/22 10:08:44 scarabeus Exp $
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -400,7 +400,7 @@
# it's a special case.
_ruby_each_implementation
- use ruby_targets_jruby && java-pkg_setup-vm
+ has ruby_targets_jruby ${IUSE} && use ruby_targets_jruby && java-pkg_setup-vm
}
# @FUNCTION: ruby-ng_src_unpack
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2011-10-21 6:48 Hans de Graaff (graaff)
0 siblings, 0 replies; 39+ messages in thread
From: Hans de Graaff (graaff) @ 2011-10-21 6:48 UTC (permalink / raw
To: gentoo-commits
graaff 11/10/21 06:48:24
Modified: ruby-ng.eclass
Log:
Add support for Rubinius (rbx) target.
Revision Changes Path
1.41 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.41&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.41&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.40&r2=1.41
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- ruby-ng.eclass 5 Oct 2011 17:46:20 -0000 1.40
+++ ruby-ng.eclass 21 Oct 2011 06:48:24 -0000 1.41
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.40 2011/10/05 17:46:20 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.41 2011/10/21 06:48:24 graaff Exp $
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -19,6 +19,7 @@
# * ruby19 - Ruby (MRI) 1.9.x
# * ree18 - Ruby Enterprise Edition 1.8.x
# * jruby - JRuby
+# * rbx - Rubinius
#
# This eclass does not define the implementation of the configure,
# compile, test, or install phases. Instead, the default phases are
@@ -115,6 +116,10 @@
rubypn="dev-java/jruby"
rubyslot=""
;;
+ rbx)
+ rubypn="dev-lang/rubinius"
+ rubyslot=""
+ ;;
*) die "$1: unknown Ruby implementation"
esac
@@ -611,6 +616,9 @@
*jruby*)
echo "jruby"
;;
+ *rubinius*)
+ echo "rbx"
+ ;;
*)
echo "mri"
;;
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2011-10-05 17:46 Hans de Graaff (graaff)
0 siblings, 0 replies; 39+ messages in thread
From: Hans de Graaff (graaff) @ 2011-10-05 17:46 UTC (permalink / raw
To: gentoo-commits
graaff 11/10/05 17:46:20
Modified: ruby-ng.eclass
Log:
Set up java vm properly when using jruby. Fixes problems reported in bug 384901. Thanks to matsuu for diagnosis and patch.
Revision Changes Path
1.40 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.40&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.40&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.39&r2=1.40
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- ruby-ng.eclass 22 Aug 2011 04:46:32 -0000 1.39
+++ ruby-ng.eclass 5 Oct 2011 17:46:20 -0000 1.40
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.39 2011/08/22 04:46:32 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.40 2011/10/05 17:46:20 graaff Exp $
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -68,7 +68,7 @@
# (e.g. selenium's firefox driver extension). When set this argument is
# passed to "grep -E" to remove reporting of these shared objects.
-inherit eutils toolchain-funcs
+inherit eutils java-utils-2 toolchain-funcs
EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_setup
@@ -394,6 +394,8 @@
# before doing anything; by leaving the parameters empty we know
# it's a special case.
_ruby_each_implementation
+
+ use ruby_targets_jruby && java-pkg_setup-vm
}
# @FUNCTION: ruby-ng_src_unpack
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2011-07-22 9:41 Hans de Graaff (graaff)
0 siblings, 0 replies; 39+ messages in thread
From: Hans de Graaff (graaff) @ 2011-07-22 9:41 UTC (permalink / raw
To: gentoo-commits
graaff 11/07/22 09:41:18
Modified: ruby-ng.eclass
Log:
Provide ruby_implementations_depend() to facilitate ebuilds with RUBY_OPTIONAL=yes. Also use it internally to avoid duplication of code. Patch by Nathan Phillip Brink in bug 373139.
Revision Changes Path
1.38 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.38&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.38&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.37&r2=1.38
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- ruby-ng.eclass 22 Jul 2011 09:10:22 -0000 1.37
+++ ruby-ng.eclass 22 Jul 2011 09:41:17 -0000 1.38
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.37 2011/07/22 09:10:22 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.38 2011/07/22 09:41:17 graaff Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -46,7 +46,9 @@
# @ECLASS-VARIABLE: RUBY_OPTIONAL
# @DESCRIPTION:
-# Set the value to "yes" to make the dependency on a Ruby interpreter optional.
+# Set the value to "yes" to make the dependency on a Ruby interpreter
+# optional and then ruby_implementations_depend() to help populate
+# DEPEND and RDEPEND.
# @ECLASS-VARIABLE: RUBY_S
# @DEFAULT_UNSET
@@ -283,16 +285,39 @@
REQUIRED_USE=" || ( $(ruby_get_use_targets) )"
fi
-for _ruby_implementation in $USE_RUBY; do
- IUSE="${IUSE} ruby_targets_${_ruby_implementation}"
+# @FUNCTION: ruby_implementations_depend
+# @RETURN: Dependencies suitable for injection into DEPEND and RDEPEND.
+# @DESCRIPTION:
+# Produces the dependency string for the various implementations of ruby
+# which the package is being built against. This should not be used when
+# RUBY_OPTIONAL is unset but must be used if RUBY_OPTIONAL=yes. Do not
+# confuse this function with ruby_implementation_depend().
+#
+# @EXAMPLE:
+# EAPI=4
+# RUBY_OPTIONAL=yes
+#
+# inherit ruby-ng
+# ...
+# DEPEND="ruby? ( $(ruby_implementations_depend) )"
+# RDEPEND="${DEPEND}"
+ruby_implementations_depend() {
+ local depend
+ for _ruby_implementation in ${USE_RUBY}; do
+ depend="${depend}${depend+ }ruby_targets_${_ruby_implementation}? ( $(ruby_implementation_depend $_ruby_implementation) )"
+ done
+ echo "${depend}"
+}
- # If you specify RUBY_OPTIONAL you also need to take care of
- # ruby useflag and dependency.
- if [[ ${RUBY_OPTIONAL} != "yes" ]]; then
- DEPEND="${DEPEND} ruby_targets_${_ruby_implementation}? ( $(ruby_implementation_depend $_ruby_implementation) )"
- RDEPEND="${RDEPEND} ruby_targets_${_ruby_implementation}? ( $(ruby_implementation_depend $_ruby_implementation) )"
- fi
+for _ruby_implementation in ${USE_RUBY}; do
+ IUSE="${IUSE} ruby_targets_${_ruby_implementation}"
done
+# If you specify RUBY_OPTIONAL you also need to take care of
+# ruby useflag and dependency.
+if [[ ${RUBY_OPTIONAL} != yes ]]; then
+ DEPEND="${DEPEND} $(ruby_implementations_depend)"
+ RDEPEND="${RDEPEND} $(ruby_implementations_depend)"
+fi
_ruby_invoke_environment() {
old_S=${S}
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2011-07-22 9:10 Hans de Graaff (graaff)
0 siblings, 0 replies; 39+ messages in thread
From: Hans de Graaff (graaff) @ 2011-07-22 9:10 UTC (permalink / raw
To: gentoo-commits
graaff 11/07/22 09:10:22
Modified: ruby-ng.eclass
Log:
Provide a convenience method to get a list of all ruby targets enabled by the user. Useful in RUBY_OPTIONAL=yes ebuilds to provide custom handling of ruby. Patch by Matthew Schultz in bug 373227.
Revision Changes Path
1.37 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.37&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.37&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.36&r2=1.37
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- ruby-ng.eclass 22 Jul 2011 09:08:59 -0000 1.36
+++ ruby-ng.eclass 22 Jul 2011 09:10:22 -0000 1.37
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.36 2011/07/22 09:08:59 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.37 2011/07/22 09:10:22 graaff Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -257,6 +257,17 @@
RDEPEND="${RDEPEND}"
}
+# @FUNCTION: ruby_get_use_implementations
+# @DESCRIPTION:
+# Gets an array of ruby use targets enabled by the user
+ruby_get_use_implementations() {
+ local i implementation
+ for implementation in ${USE_RUBY}; do
+ use ruby_targets_${implementation} && i+=" ${implementation}"
+ done
+ echo $i
+}
+
# @FUNCTION: ruby_get_use_targets
# @DESCRIPTION:
# Gets an array of ruby use targets that the ebuild sets
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2011-07-22 9:08 Hans de Graaff (graaff)
0 siblings, 0 replies; 39+ messages in thread
From: Hans de Graaff (graaff) @ 2011-07-22 9:08 UTC (permalink / raw
To: gentoo-commits
graaff 11/07/22 09:08:59
Modified: ruby-ng.eclass
Log:
Leverage the REQUIRED_USE mechanism to determine at dependency resolution time if this ebuild can satisfy RUBY_TARGETS. Patch by Matthew Schultz in bug 373227.
Revision Changes Path
1.36 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.36&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.36&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.35&r2=1.36
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- ruby-ng.eclass 19 Jul 2011 05:48:09 -0000 1.35
+++ ruby-ng.eclass 22 Jul 2011 09:08:59 -0000 1.36
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.35 2011/07/19 05:48:09 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.36 2011/07/22 09:08:59 graaff Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -257,6 +257,21 @@
RDEPEND="${RDEPEND}"
}
+# @FUNCTION: ruby_get_use_targets
+# @DESCRIPTION:
+# Gets an array of ruby use targets that the ebuild sets
+ruby_get_use_targets() {
+ local t implementation
+ for implementation in ${USE_RUBY}; do
+ t+=" ruby_targets_${implementation}"
+ done
+ echo $t
+}
+
+if [[ ${EAPI:-0} -ge 4 && ${RUBY_OPTIONAL} != "yes" ]]; then
+ REQUIRED_USE=" || ( $(ruby_get_use_targets) )"
+fi
+
for _ruby_implementation in $USE_RUBY; do
IUSE="${IUSE} ruby_targets_${_ruby_implementation}"
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2011-07-19 5:48 Hans de Graaff (graaff)
0 siblings, 0 replies; 39+ messages in thread
From: Hans de Graaff (graaff) @ 2011-07-19 5:48 UTC (permalink / raw
To: gentoo-commits
graaff 11/07/19 05:48:09
Modified: ruby-ng.eclass
Log:
Add QA warning for deprecated * expansion in S. Use RUBY_S and EAPI=4 instead.
Revision Changes Path
1.35 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.35&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.35&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.34&r2=1.35
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- ruby-ng.eclass 16 Jul 2011 09:50:05 -0000 1.34
+++ ruby-ng.eclass 19 Jul 2011 05:48:09 -0000 1.35
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.34 2011/07/16 09:50:05 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.35 2011/07/19 05:48:09 graaff Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -287,6 +287,13 @@
# we allow the star glob to just expand to whatever directory it's
# called.
if [[ ${sub_S} = *"*"* ]]; then
+ case ${EAPI} in
+ 2|3)
+ #The old method of setting S depends on undefined package
+ # manager behaviour, so encourage upgrading to EAPI=4.
+ eqawarn "Using * expansion of S is deprecated. Use EAPI and RUBY_S instead."
+ ;;
+ esac
pushd "${WORKDIR}"/all &>/dev/null
sub_S=$(eval ls -d ${sub_S} 2>/dev/null)
popd &>/dev/null
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2011-07-16 9:50 Hans de Graaff (graaff)
0 siblings, 0 replies; 39+ messages in thread
From: Hans de Graaff (graaff) @ 2011-07-16 9:50 UTC (permalink / raw
To: gentoo-commits
graaff 11/07/16 09:50:05
Modified: ruby-ng.eclass
Log:
Add RUBY_QA_ALLOWED_LIBS, bug 347433.
Revision Changes Path
1.34 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.34&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.34&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.33&r2=1.34
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- ruby-ng.eclass 8 Jul 2011 11:35:01 -0000 1.33
+++ ruby-ng.eclass 16 Jul 2011 09:50:05 -0000 1.34
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.33 2011/07/08 11:35:01 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.34 2011/07/16 09:50:05 graaff Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -56,6 +56,19 @@
# variable supports a wildcard mechanism to help with github tarballs
# that contain the commit hash as part of the directory name.
+# @ECLASS-VARIABLE: RUBY_QA_ALLOWED_LIBS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If defined this variable contains a whitelist of shared objects that
+# are allowed to exist even if they don't link to libruby. This avoids
+# the QA check that makes this mandatory. This is most likely not what
+# you are looking for if you get the related "Missing links" QA warning,
+# since the proper fix is almost always to make sure the shared object
+# is linked against libruby. There are cases were this is not the case
+# and the shared object is generic code to be used in some other way
+# (e.g. selenium's firefox driver extension). When set this argument is
+# passed to "grep -E" to remove reporting of these shared objects.
+
inherit eutils toolchain-funcs
EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_setup
@@ -456,6 +469,7 @@
# positives now that Ruby 1.9.2 installs with the same sitedir as 1.8)
${scancmd} -qnR "${D}${sitelibdir}" "${D}${sitelibdir/site_ruby/gems}" \
| fgrep -v "${libruby_soname}" \
+ | grep -E -v "${RUBY_QA_ALLOWED_LIBS}" \
> "${T}"/ruby-ng-${_ruby_implementation}-mislink.log
if [[ -s "${T}"/ruby-ng-${_ruby_implementation}-mislink.log ]]; then
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2011-04-25 8:37 Hans de Graaff (graaff)
0 siblings, 0 replies; 39+ messages in thread
From: Hans de Graaff (graaff) @ 2011-04-25 8:37 UTC (permalink / raw
To: gentoo-commits
graaff 11/04/25 08:37:26
Modified: ruby-ng.eclass
Log:
Handle case where RUBY_S is not provided.
Revision Changes Path
1.32 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.32&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.32&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.31&r2=1.32
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- ruby-ng.eclass 25 Apr 2011 06:27:22 -0000 1.31
+++ ruby-ng.eclass 25 Apr 2011 08:37:26 -0000 1.32
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.31 2011/04/25 06:27:22 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.32 2011/04/25 08:37:26 graaff Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -259,7 +259,11 @@
old_S=${S}
case ${EAPI} in
4)
- sub_S=${RUBY_S}
+ if [ -z ${RUBY_S} ]; then
+ sub_S=${P}
+ else
+ sub_S=${RUBY_S}
+ fi
;;
*)
sub_S=${S#${WORKDIR}/}
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2011-04-25 6:27 Hans de Graaff (graaff)
0 siblings, 0 replies; 39+ messages in thread
From: Hans de Graaff (graaff) @ 2011-04-25 6:27 UTC (permalink / raw
To: gentoo-commits
graaff 11/04/25 06:27:23
Modified: ruby-ng.eclass
Log:
Support EAPI=4 in ruby-ng.eclass, fixing bug 358349.
Revision Changes Path
1.31 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.31&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.31&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.30&r2=1.31
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- ruby-ng.eclass 7 Nov 2010 22:52:44 -0000 1.30
+++ ruby-ng.eclass 25 Apr 2011 06:27:22 -0000 1.31
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.30 2010/11/07 22:52:44 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.31 2011/04/25 06:27:22 graaff Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -48,6 +48,14 @@
# @DESCRIPTION:
# Set the value to "yes" to make the dependency on a Ruby interpreter optional.
+# @ECLASS-VARIABLE: RUBY_S
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If defined this variable determines the source directory name after
+# unpacking. This defaults to the name of the package. Note that this
+# variable supports a wildcard mechanism to help with github tarballs
+# that contain the commit hash as part of the directory name.
+
inherit eutils toolchain-funcs
EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_setup
@@ -56,6 +64,10 @@
0|1)
die "Unsupported EAPI=${EAPI} (too old) for ruby-ng.eclass" ;;
2|3) ;;
+ 4)
+ # S is no longer automatically assigned when it doesn't exist.
+ S="${WORKDIR}"
+ ;;
*)
die "Unknown EAPI=${EAPI} for ruby-ng.eclass"
esac
@@ -245,7 +257,14 @@
_ruby_invoke_environment() {
old_S=${S}
- sub_S=${S#${WORKDIR}/}
+ case ${EAPI} in
+ 4)
+ sub_S=${RUBY_S}
+ ;;
+ *)
+ sub_S=${S#${WORKDIR}/}
+ ;;
+ esac
# Special case, for the always-lovely GitHub fetches. With this,
# we allow the star glob to just expand to whatever directory it's
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-11-07 22:52 Christian Faulhammer (fauli)
0 siblings, 0 replies; 39+ messages in thread
From: Christian Faulhammer (fauli) @ 2010-11-07 22:52 UTC (permalink / raw
To: gentoo-commits
fauli 10/11/07 22:52:44
Modified: ruby-ng.eclass
Log:
Damn, this change was not intended
Revision Changes Path
1.30 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.30&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.30&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.29&r2=1.30
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- ruby-ng.eclass 7 Nov 2010 22:44:35 -0000 1.29
+++ ruby-ng.eclass 7 Nov 2010 22:52:44 -0000 1.30
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.29 2010/11/07 22:44:35 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.30 2010/11/07 22:52:44 fauli Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -342,7 +342,7 @@
_ruby_source_copy() {
# Until we actually find a reason not to, we use hardlinks, this
# should reduce the amount of disk space that is wasted by this.
- cp -pr all ${_ruby_implementation} \
+ cp -prl all ${_ruby_implementation} \
|| die "Unable to copy ${_ruby_implementation} environment"
}
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-09-10 13:03 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2010-09-10 13:03 UTC (permalink / raw
To: gentoo-commits
flameeyes 10/09/10 13:03:39
Modified: ruby-ng.eclass
Log:
Allow the star to be at any place of the sub_S directory.
While it only makes sense for GitHub tarballs, with Rails the star is
_not_ the last character in the string because we have to enter a
sub-directory.
Revision Changes Path
1.28 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.28&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.28&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.27&r2=1.28
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- ruby-ng.eclass 30 Aug 2010 22:08:24 -0000 1.27
+++ ruby-ng.eclass 10 Sep 2010 13:03:39 -0000 1.28
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.27 2010/08/30 22:08:24 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.28 2010/09/10 13:03:39 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -250,7 +250,7 @@
# Special case, for the always-lovely GitHub fetches. With this,
# we allow the star glob to just expand to whatever directory it's
# called.
- if [[ ${sub_S} = *"*" ]]; then
+ if [[ ${sub_S} = *"*"* ]]; then
pushd "${WORKDIR}"/all &>/dev/null
sub_S=$(eval ls -d ${sub_S} 2>/dev/null)
popd &>/dev/null
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-07-30 17:28 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2010-07-30 17:28 UTC (permalink / raw
To: gentoo-commits
flameeyes 10/07/30 17:28:53
Modified: ruby-ng.eclass
Log:
Ignore basename errors, they happen with JRuby since it lacks a soname.
Revision Changes Path
1.25 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.25&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.25&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.24&r2=1.25
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- ruby-ng.eclass 30 Jul 2010 16:56:21 -0000 1.24
+++ ruby-ng.eclass 30 Jul 2010 17:28:53 -0000 1.25
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.24 2010/07/30 16:56:21 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.25 2010/07/30 17:28:53 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -398,7 +398,7 @@
has "${EAPI}" 2 && ! use prefix && EPREFIX=
local libruby_basename=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["LIBRUBY_SO"]')
- local libruby_soname=$(basename $(${scancmd} -F "%S#F" -qS "${EPREFIX}/usr/$(get_libdir)/${libruby_basename}"))
+ local libruby_soname=$(basename $(${scancmd} -F "%S#F" -qS "${EPREFIX}/usr/$(get_libdir)/${libruby_basename}") 2>/dev/null)
local sitedir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["sitedir"]')
local sitelibdir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-07-30 16:56 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2010-07-30 16:56 UTC (permalink / raw
To: gentoo-commits
flameeyes 10/07/30 16:56:22
Modified: ruby-ng.eclass
Log:
Apply changes to the eclass for Prefix support. Thanks to Jeremy Olexa.
Closes bug #330543.
Revision Changes Path
1.24 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.24&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.24&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.23&r2=1.24
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- ruby-ng.eclass 30 Jul 2010 15:05:08 -0000 1.23
+++ ruby-ng.eclass 30 Jul 2010 16:56:21 -0000 1.24
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.23 2010/07/30 15:05:08 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.24 2010/07/30 16:56:21 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -53,7 +53,7 @@
case ${EAPI} in
0|1)
die "Unsupported EAPI=${EAPI} (too old) for ruby-ng.eclass" ;;
- 2) ;;
+ 2|3) ;;
*)
die "Unknown EAPI=${EAPI} for ruby-ng.eclass"
esac
@@ -391,8 +391,14 @@
}
_each_ruby_check_install() {
+ local scancmd=scanelf
+ # we have a Mach-O object here
+ [[ ${CHOST} == *-darwin ]] && scancmd=scanmacho
+
+ has "${EAPI}" 2 && ! use prefix && EPREFIX=
+
local libruby_basename=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["LIBRUBY_SO"]')
- local libruby_soname=$(scanelf -F "%S#F" -qS "/usr/$(get_libdir)/${libruby_basename}")
+ local libruby_soname=$(basename $(${scancmd} -F "%S#F" -qS "${EPREFIX}/usr/$(get_libdir)/${libruby_basename}"))
local sitedir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["sitedir"]')
local sitelibdir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')
@@ -413,7 +419,7 @@
# extensions via ruby-fakegem; make sure to check only in sitelibdir, since
# that's what changes between two implementations (otherwise you'd get false
# positives now that Ruby 1.9.2 installs with the same sitedir as 1.8)
- scanelf -qnR "${D}${sitelibdir}" "${D}${sitelibdir/site_ruby/gems}" \
+ ${scancmd} -qnR "${D}${sitelibdir}" "${D}${sitelibdir/site_ruby/gems}" \
| fgrep -v "${libruby_soname}" \
> "${T}"/ruby-ng-${_ruby_implementation}-mislink.log
@@ -452,8 +458,10 @@
# Installs the specified file(s) into the sitelibdir of the Ruby interpreter in ${RUBY}.
doruby() {
[[ -z ${RUBY} ]] && die "\$RUBY is not set"
+ has "${EAPI}" 2 && ! use prefix && EPREFIX=
( # don't want to pollute calling env
- insinto $(ruby_rbconfig_value 'sitelibdir')
+ sitelibdir=$(ruby_rbconfig_value 'sitelibdir')
+ insinto ${sitelibdir#${EPREFIX}}
insopts -m 0644
doins "$@"
) || die "failed to install $@"
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-07-30 15:05 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2010-07-30 15:05 UTC (permalink / raw
To: gentoo-commits
flameeyes 10/07/30 15:05:08
Modified: ruby-ng.eclass
Log:
Fix broken test for mislink with the new Ruby 1.9.2 ebuilds.
With 1.9.2 the sitedir is now the same between 1.8 and 1.9, so you
cannot just go look for all the extensions within that or you'll hit
the one for the other implementation as well. Instead use the
sitelibdir that encodes the version as well.
While at it, extend the test to the Gems-installed extensions, and
remove an awk call by using the --format option of scanelf.
Revision Changes Path
1.23 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.23&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.23&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.22&r2=1.23
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- ruby-ng.eclass 14 Jul 2010 13:11:51 -0000 1.22
+++ ruby-ng.eclass 30 Jul 2010 15:05:08 -0000 1.23
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.22 2010/07/14 13:11:51 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.23 2010/07/30 15:05:08 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -392,7 +392,7 @@
_each_ruby_check_install() {
local libruby_basename=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["LIBRUBY_SO"]')
- local libruby_soname=$(scanelf -qS "/usr/$(get_libdir)/${libruby_basename}" | awk '{ print $1 }')
+ local libruby_soname=$(scanelf -F "%S#F" -qS "/usr/$(get_libdir)/${libruby_basename}")
local sitedir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["sitedir"]')
local sitelibdir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')
@@ -409,7 +409,11 @@
# The current implementation lacks libruby (i.e.: jruby)
[[ -z ${libruby_soname} ]] && return 0
- scanelf -qnR "${D}${sitedir}" \
+ # Check also the gems directory, since we could be installing compiled
+ # extensions via ruby-fakegem; make sure to check only in sitelibdir, since
+ # that's what changes between two implementations (otherwise you'd get false
+ # positives now that Ruby 1.9.2 installs with the same sitedir as 1.8)
+ scanelf -qnR "${D}${sitelibdir}" "${D}${sitelibdir/site_ruby/gems}" \
| fgrep -v "${libruby_soname}" \
> "${T}"/ruby-ng-${_ruby_implementation}-mislink.log
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-07-14 13:11 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2010-07-14 13:11 UTC (permalink / raw
To: gentoo-commits
flameeyes 10/07/14 13:11:51
Modified: ruby-ng.eclass
Log:
Disable sitedir-not-sitelibdir test.
This needs to be turned off for the 1.9.2 series that merges back
ruby19 into ruby.
Revision Changes Path
1.22 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.22&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.22&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.21&r2=1.22
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- ruby-ng.eclass 8 Jul 2010 04:00:57 -0000 1.21
+++ ruby-ng.eclass 14 Jul 2010 13:11:51 -0000 1.22
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.21 2010/07/08 04:00:57 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.22 2010/07/14 13:11:51 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -397,14 +397,14 @@
local sitelibdir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')
# Look for wrong files in sitedir
- if [[ -d "${D}${sitedir}" ]]; then
- local f=$(find "${D}${sitedir}" -mindepth 1 -maxdepth 1 -not -wholename "${D}${sitelibdir}")
- if [[ -n ${f} ]]; then
- eerror "Found files in sitedir, outsite sitelibdir:"
- eerror "${f}"
- die "Misplaced files in sitedir"
- fi
- fi
+ # if [[ -d "${D}${sitedir}" ]]; then
+ # local f=$(find "${D}${sitedir}" -mindepth 1 -maxdepth 1 -not -wholename "${D}${sitelibdir}")
+ # if [[ -n ${f} ]]; then
+ # eerror "Found files in sitedir, outsite sitelibdir:"
+ # eerror "${f}"
+ # die "Misplaced files in sitedir"
+ # fi
+ # fi
# The current implementation lacks libruby (i.e.: jruby)
[[ -z ${libruby_soname} ]] && return 0
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-07-08 4:00 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2010-07-08 4:00 UTC (permalink / raw
To: gentoo-commits
flameeyes 10/07/08 04:00:58
Modified: ruby-ng.eclass
Log:
Implement the merge of USE based dependencies as was listed in TODO.
Please don't cry when you see the code.
Revision Changes Path
1.21 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.21&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.21&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.20&r2=1.21
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- ruby-ng.eclass 24 May 2010 07:33:35 -0000 1.20
+++ ruby-ng.eclass 8 Jul 2010 04:00:57 -0000 1.21
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.20 2010/05/24 07:33:35 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.21 2010/07/08 04:00:57 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -119,9 +119,9 @@
case "$token" in
"||" | "(" | ")" | *"?")
echo "${token}" ;;
+ *])
+ echo "${token%[*}[RUBYTARGET,${token/*[}" ;;
*)
- # TODO we need to deal with merging USE-based
- # dependencies
echo "${token}[RUBYTARGET]" ;;
esac
done
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-05-24 7:33 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2010-05-24 7:33 UTC (permalink / raw
To: gentoo-commits
flameeyes 10/05/24 07:33:35
Modified: ruby-ng.eclass
Log:
Avoid touching IUSE in _ruby_wrap_conditions; set the test USE flag
directly into the ruby_add_rdepend function to avoid subshell
handling.
Revision Changes Path
1.20 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.20&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.20&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.19&r2=1.20
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- ruby-ng.eclass 22 May 2010 13:15:40 -0000 1.19
+++ ruby-ng.eclass 24 May 2010 07:33:35 -0000 1.20
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.19 2010/05/22 13:15:40 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.20 2010/05/24 07:33:35 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -142,7 +142,6 @@
local atoms="$2"
for condition in $conditions; do
- hasq $condition "$IUSE" || IUSE="${IUSE} $condition"
atoms="${condition}? ( ${atoms} )"
done
@@ -180,7 +179,8 @@
# Add the dependency as a test-dependency since we're going to
# execute the code during test phase.
- DEPEND="${DEPEND} $(_ruby_wrap_conditions test "${dependency}")"
+ DEPEND="${DEPEND} test? ( ${dependency} )"
+ hasq test "$IUSE" || IUSE="${IUSE} test"
}
# @FUNCTION: ruby_add_bdepend
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-05-22 13:15 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2010-05-22 13:15 UTC (permalink / raw
To: gentoo-commits
flameeyes 10/05/22 13:15:40
Modified: ruby-ng.eclass
Log:
Set RDEPEND="${RDEPEND}" to avoid depend to filter through rdepend.
Revision Changes Path
1.19 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.19&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.19&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.18&r2=1.19
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ruby-ng.eclass 22 May 2010 12:45:03 -0000 1.18
+++ ruby-ng.eclass 22 May 2010 13:15:40 -0000 1.19
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.18 2010/05/22 12:45:03 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.19 2010/05/22 13:15:40 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -208,6 +208,7 @@
local dependency=$(_ruby_atoms_samelib "$1")
DEPEND="${DEPEND} $dependency"
+ RDEPEND="${RDEPEND}"
}
for _ruby_implementation in $USE_RUBY; do
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-05-22 12:45 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2010-05-22 12:45 UTC (permalink / raw
To: gentoo-commits
flameeyes 10/05/22 12:45:03
Modified: ruby-ng.eclass
Log:
Avoid globbing while parsing the dependency string.
Revision Changes Path
1.18 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.18&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.18&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.17&r2=1.18
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- ruby-ng.eclass 22 May 2010 12:31:03 -0000 1.17
+++ ruby-ng.eclass 22 May 2010 12:45:03 -0000 1.18
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.17 2010/05/22 12:31:03 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.18 2010/05/22 12:45:03 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -113,6 +113,7 @@
}
_ruby_atoms_samelib_generic() {
+ eshopts_push -o noglob
echo "RUBYTARGET? ("
for token in $*; do
case "$token" in
@@ -125,6 +126,7 @@
esac
done
echo ")"
+ eshopts_pop
}
_ruby_atoms_samelib() {
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-05-22 12:31 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2010-05-22 12:31 UTC (permalink / raw
To: gentoo-commits
flameeyes 10/05/22 12:31:03
Modified: ruby-ng.eclass
Log:
Use a slightly different syntax for expliciting implementation-dependent dependencies.
Rather than using a single, huge USE-conditional per atom, put the dependendencies under conditional
_and_ USE-dependency. This allows for syntax like:
USE_RUBY="ruby18 ruby19"
...
ruby_add_bdepend "test? ( dev-ruby/first )"
USE_RUBY="ruby18" ruby_add_bdepend "test? ( dev-ruby/second )"
USE_RUBY="ruby19" ruby_add_bdepend "test? ( dev-ruby/third )"
Revision Changes Path
1.17 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.17&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.17&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.16&r2=1.17
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ruby-ng.eclass 22 May 2010 12:18:07 -0000 1.16
+++ ruby-ng.eclass 22 May 2010 12:31:03 -0000 1.17
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.16 2010/05/22 12:18:07 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.17 2010/05/22 12:31:03 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -112,21 +112,27 @@
echo "[${res%,}]"
}
-_ruby_implementation_depend() {
- echo "ruby_targets_${1}? ( ${2}[ruby_targets_${1}] )"
-}
-
-_ruby_atoms_samelib() {
- local samelib=$(ruby_samelib)
-
+_ruby_atoms_samelib_generic() {
+ echo "RUBYTARGET? ("
for token in $*; do
case "$token" in
"||" | "(" | ")" | *"?")
echo "${token}" ;;
*)
- echo "${token}${samelib}" ;;
+ # TODO we need to deal with merging USE-based
+ # dependencies
+ echo "${token}[RUBYTARGET]" ;;
esac
done
+ echo ")"
+}
+
+_ruby_atoms_samelib() {
+ local atoms=$(_ruby_atoms_samelib_generic "$*")
+
+ for _ruby_implementation in $USE_RUBY; do
+ echo "${atoms//RUBYTARGET/ruby_targets_${_ruby_implementation}}"
+ done
}
_ruby_wrap_conditions() {
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-05-22 12:18 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2010-05-22 12:18 UTC (permalink / raw
To: gentoo-commits
flameeyes 10/05/22 12:18:07
Modified: ruby-ng.eclass
Log:
Allow for standard depend syntax in the single parameter form of ruby_add_rdepend and ruby_add_bdepend.
Make the two parameters form throw a warning for gentoo developers only (for now), and call back the
single-parameter function after wrapping. Update documentation to only suggest using the new syntax.
This allows dropping _ruby_add_rdepend and _ruby_add_bdepend convenience functions, and rather adds a
_ruby_wrap_conditions function.
Revision Changes Path
1.16 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.16&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.16&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.15&r2=1.16
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ruby-ng.eclass 22 May 2010 03:39:50 -0000 1.15
+++ ruby-ng.eclass 22 May 2010 12:18:07 -0000 1.16
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.15 2010/05/22 03:39:50 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.16 2010/05/22 12:18:07 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -116,38 +116,12 @@
echo "ruby_targets_${1}? ( ${2}[ruby_targets_${1}] )"
}
-_ruby_add_bdepend() {
- local atom=$1
- local conditions=$2
-
- for condition in $conditions; do
- hasq $condition "$IUSE" || IUSE="${IUSE} $condition"
- atom="${condition}? ( ${atom} )"
- done
-
- DEPEND="${DEPEND} ${atom}"
- RDEPEND="${RDEPEND}"
-}
-
-_ruby_add_rdepend() {
- local atom=$1
- local conditions=$2
-
- for condition in $conditions; do
- hasq $condition "$IUSE" || IUSE="${IUSE} $condition"
- atom="${condition}? ( ${atom} )"
- done
-
- RDEPEND="${RDEPEND} ${atom}"
- _ruby_add_bdepend "$atom" test
-}
-
_ruby_atoms_samelib() {
local samelib=$(ruby_samelib)
for token in $*; do
case "$token" in
- "||" | "(" | ")" )
+ "||" | "(" | ")" | *"?")
echo "${token}" ;;
*)
echo "${token}${samelib}" ;;
@@ -155,61 +129,77 @@
done
}
+_ruby_wrap_conditions() {
+ local conditions="$1"
+ local atoms="$2"
+
+ for condition in $conditions; do
+ hasq $condition "$IUSE" || IUSE="${IUSE} $condition"
+ atoms="${condition}? ( ${atoms} )"
+ done
+
+ echo "$atoms"
+}
+
# @FUNCTION: ruby_add_rdepend
-# @USAGE: [conditions] atom
+# @USAGE: dependencies
# @DESCRIPTION:
-# Adds the specified atom(s) with optional use condition(s) to
-# RDEPEND, taking the current set of ruby targets into account. This
-# makes sure that all ruby dependencies of the package are installed
-# for the same ruby targets. Use this function for all ruby
-# dependencies instead of setting RDEPEND yourself. Both atom and
-# conditions can be a space-separated list of atoms or conditions.
+# Adds the specified dependencies, with use condition(s) to RDEPEND,
+# taking the current set of ruby targets into account. This makes sure
+# that all ruby dependencies of the package are installed for the same
+# ruby targets. Use this function for all ruby dependencies instead of
+# setting RDEPEND yourself. The list of atoms uses the same syntax as
+# normal dependencies.
+#
+# Note: runtime dependencies are also added as build-time test
+# dependencies.
ruby_add_rdepend() {
- local atoms=
- local conditions=
case $# in
- 1)
- atoms=$1
- ;;
+ 1) ;;
2)
- conditions=$1
- atoms=$2
+ [[ "${GENTOO_DEV}" == "yes" ]] && eqawarn "You can now use the usual syntax in ruby_add_rdepend for $CATEGORY/$PF"
+ ruby_add_rdepend "$(_ruby_wrap_conditions "$1" "$2")"
+ return
;;
*)
die "bad number of arguments to $0"
;;
esac
- _ruby_add_rdepend "$(_ruby_atoms_samelib "${atoms}")" "$conditions"
+ local dependency=$(_ruby_atoms_samelib "$1")
+
+ RDEPEND="${RDEPEND} $dependency"
+
+ # Add the dependency as a test-dependency since we're going to
+ # execute the code during test phase.
+ DEPEND="${DEPEND} $(_ruby_wrap_conditions test "${dependency}")"
}
# @FUNCTION: ruby_add_bdepend
-# @USAGE: [conditions] atom
+# @USAGE: dependencies
# @DESCRIPTION:
-# Adds the specified atom(s) with optional use condition(s) to both
-# DEPEND and RDEPEND, taking the current set of ruby targets into
-# account. This makes sure that all ruby dependencies of the package
-# are installed for the same ruby targets. Use this function for all
-# ruby dependencies instead of setting DEPEND and RDEPEND
-# yourself. Both atom and conditions can be a space-separated list of
-# atoms or conditions.
+# Adds the specified dependencies, with use condition(s) to DEPEND,
+# taking the current set of ruby targets into account. This makes sure
+# that all ruby dependencies of the package are installed for the same
+# ruby targets. Use this function for all ruby dependencies instead of
+# setting DEPEND yourself. The list of atoms uses the same syntax as
+# normal dependencies.
ruby_add_bdepend() {
- local atoms=
- local conditions=
case $# in
- 1)
- atoms=$1
- ;;
+ 1) ;;
2)
- conditions=$1
- atoms=$2
+ [[ "${GENTOO_DEV}" == "yes" ]] && eqawarn "You can now use the usual syntax in ruby_add_bdepend for $CATEGORY/$PF"
+ ruby_add_bdepend "$(_ruby_wrap_conditions "$1" "$2")"
+ return
;;
*)
die "bad number of arguments to $0"
;;
esac
- _ruby_add_bdepend "$(_ruby_atoms_samelib "${atoms}")" "$conditions"
+ local dependency=$(_ruby_atoms_samelib "$1")
+
+ DEPEND="${DEPEND} $dependency"
}
for _ruby_implementation in $USE_RUBY; do
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-05-21 23:18 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2010-05-21 23:18 UTC (permalink / raw
To: gentoo-commits
flameeyes 10/05/21 23:18:46
Modified: ruby-ng.eclass
Log:
Change processing of atoms in ruby_add_rdepend and ruby_add_bdepend to
make it possible to process complex dependency strings, such as
|| ( virtual/ruby-test-unit dev-ruby/test-unit:2 )
which is going to be common for test-unit-2 compatible packages; to
have a proper dependency tree.
This, theorically, can also drop the need for the 2-ary calls for
ruby_add_bdepend and ruby_add_rdepend.
Revision Changes Path
1.14 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.14&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.14&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.13&r2=1.14
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ruby-ng.eclass 1 May 2010 16:05:45 -0000 1.13
+++ ruby-ng.eclass 21 May 2010 23:18:46 -0000 1.14
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.13 2010/05/01 16:05:45 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.14 2010/05/21 23:18:46 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -142,6 +142,19 @@
_ruby_add_bdepend "$atom" test
}
+_ruby_atoms_samelib() {
+ local samelib=$(ruby_samelib)
+
+ for token in $*; do
+ case "$token" in
+ "||" | "(" | ")" )
+ echo "${token}" ;;
+ *)
+ echo "${token}${samelib}" ;;
+ esac
+ done
+}
+
# @FUNCTION: ruby_add_rdepend
# @USAGE: [conditions] atom
# @DESCRIPTION:
@@ -167,9 +180,7 @@
;;
esac
- for atom in $atoms; do
- _ruby_add_rdepend "${atom}$(ruby_samelib)" "$conditions"
- done
+ _ruby_add_rdepend "$(_ruby_atoms_samelib "${atoms}")" "$conditions"
}
# @FUNCTION: ruby_add_bdepend
@@ -198,9 +209,7 @@
;;
esac
- for atom in $atoms; do
- _ruby_add_bdepend "${atom}$(ruby_samelib)" "$conditions"
- done
+ _ruby_add_bdepend "$(_ruby_atoms_samelib "${atoms}")" "$conditions"
}
for _ruby_implementation in $USE_RUBY; do
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-05-01 16:05 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2010-05-01 16:05 UTC (permalink / raw
To: gentoo-commits
flameeyes 10/05/01 16:05:45
Modified: ruby-ng.eclass
Log:
Don't print errors during unpack because the directory does not exist yet.
Revision Changes Path
1.13 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.13&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.13&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?r1=1.12&r2=1.13
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ruby-ng.eclass 30 Apr 2010 17:40:10 -0000 1.12
+++ ruby-ng.eclass 1 May 2010 16:05:45 -0000 1.13
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.12 2010/04/30 17:40:10 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.13 2010/05/01 16:05:45 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -223,7 +223,7 @@
# called.
if [[ ${sub_S} = *"*" ]]; then
pushd "${WORKDIR}"/all &>/dev/null
- sub_S=$(eval ls -d ${sub_S})
+ sub_S=$(eval ls -d ${sub_S} 2>/dev/null)
popd &>/dev/null
fi
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-04-30 17:40 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2010-04-30 17:40 UTC (permalink / raw
To: gentoo-commits
flameeyes 10/04/30 17:40:10
Modified: ruby-ng.eclass
Log:
Create a special handling of S variable for github-based packages.
Since using GitHub is widely common for Ruby packages, especially
those not packaging the tests within the gem, we would be
reimplementing this so many times that it's worth special casing here.
Revision Changes Path
1.12 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.12&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.12&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?r1=1.11&r2=1.12
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ruby-ng.eclass 26 Apr 2010 15:07:58 -0000 1.11
+++ ruby-ng.eclass 30 Apr 2010 17:40:10 -0000 1.12
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.11 2010/04/26 15:07:58 a3li Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.12 2010/04/30 17:40:10 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -216,7 +216,16 @@
_ruby_invoke_environment() {
old_S=${S}
- sub_S=${S#${WORKDIR}}
+ sub_S=${S#${WORKDIR}/}
+
+ # Special case, for the always-lovely GitHub fetches. With this,
+ # we allow the star glob to just expand to whatever directory it's
+ # called.
+ if [[ ${sub_S} = *"*" ]]; then
+ pushd "${WORKDIR}"/all &>/dev/null
+ sub_S=$(eval ls -d ${sub_S})
+ popd &>/dev/null
+ fi
environment=$1; shift
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-04-26 15:07 Alex Legler (a3li)
0 siblings, 0 replies; 39+ messages in thread
From: Alex Legler (a3li) @ 2010-04-26 15:07 UTC (permalink / raw
To: gentoo-commits
a3li 10/04/26 15:07:58
Modified: ruby-ng.eclass
Log:
Adding a ruby_rbconfig_value function to ruby-ng.eclass for easy access even to not regularly needed rbconfig data
Revision Changes Path
1.11 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.11&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.11&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?r1=1.10&r2=1.11
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ruby-ng.eclass 5 Apr 2010 07:41:09 -0000 1.10
+++ ruby-ng.eclass 26 Apr 2010 15:07:58 -0000 1.11
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.10 2010/04/05 07:41:09 a3li Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.11 2010/04/26 15:07:58 a3li Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -418,6 +418,13 @@
_ruby_each_implementation _each_ruby_check_install
}
+# @FUNCTION: ruby_rbconfig_value
+# @USAGE: rbconfig item
+# @RETURN: Returns the value of the given rbconfig item of the Ruby interpreter in ${RUBY}.
+ruby_rbconfig_value() {
+ echo $(${RUBY} -rrbconfig -e "puts Config::CONFIG['$1']")
+}
+
# @FUNCTION: doruby
# @USAGE: file [file...]
# @DESCRIPTION:
@@ -425,7 +432,7 @@
doruby() {
[[ -z ${RUBY} ]] && die "\$RUBY is not set"
( # don't want to pollute calling env
- insinto $(${RUBY} -rrbconfig -e 'print Config::CONFIG["sitelibdir"]')
+ insinto $(ruby_rbconfig_value 'sitelibdir')
insopts -m 0644
doins "$@"
) || die "failed to install $@"
@@ -440,10 +447,10 @@
# @FUNCTION: ruby_get_hdrdir
# @RETURN: The location of the header files belonging to the Ruby interpreter in ${RUBY}.
ruby_get_hdrdir() {
- local rubyhdrdir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["rubyhdrdir"]')
+ local rubyhdrdir=$(ruby_rbconfig_value 'rubyhdrdir')
if [[ "${rubyhdrdir}" = "nil" ]] ; then
- rubyhdrdir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["archdir"]')
+ rubyhdrdir=$(ruby_rbconfig_value 'archdir')
fi
echo "${rubyhdrdir}"
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-04-05 7:41 Alex Legler (a3li)
0 siblings, 0 replies; 39+ messages in thread
From: Alex Legler (a3li) @ 2010-04-05 7:41 UTC (permalink / raw
To: gentoo-commits
a3li 10/04/05 07:41:09
Modified: ruby-ng.eclass
Log:
Add ruby_get_version() and ruby_get_implementation() convenience helper functions
Revision Changes Path
1.10 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.10&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.10&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?r1=1.9&r2=1.10
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ruby-ng.eclass 2 Apr 2010 20:26:21 -0000 1.9
+++ ruby-ng.eclass 5 Apr 2010 07:41:09 -0000 1.10
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.9 2010/04/02 20:26:21 a3li Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.10 2010/04/05 07:41:09 a3li Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -448,3 +448,29 @@
echo "${rubyhdrdir}"
}
+
+# @FUNCTION: ruby_get_version
+# @RETURN: The version of the Ruby interpreter in ${RUBY}, or what 'ruby' points to.
+ruby_get_version() {
+ local ruby=${RUBY:-$(type -p ruby 2>/dev/null)}
+
+ echo $(${ruby} -e 'puts RUBY_VERSION')
+}
+
+# @FUNCTION: ruby_get_implementation
+# @RETURN: The implementation of the Ruby interpreter in ${RUBY}, or what 'ruby' points to.
+ruby_get_implementation() {
+ local ruby=${RUBY:-$(type -p ruby 2>/dev/null)}
+
+ case $(${ruby} --version) in
+ *Enterprise*)
+ echo "ree"
+ ;;
+ *jruby*)
+ echo "jruby"
+ ;;
+ *)
+ echo "mri"
+ ;;
+ esac
+}
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-04-02 20:26 Alex Legler (a3li)
0 siblings, 0 replies; 39+ messages in thread
From: Alex Legler (a3li) @ 2010-04-02 20:26 UTC (permalink / raw
To: gentoo-commits
a3li 10/04/02 20:26:21
Modified: ruby-ng.eclass
Log:
ruby-ng.eclass: Add support for targets with different flag and executable names. Implement this feature for Ruby Enterprise Edition 1.8.
Revision Changes Path
1.9 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.9&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.9&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?r1=1.8&r2=1.9
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ruby-ng.eclass 15 Jan 2010 12:58:20 -0000 1.8
+++ ruby-ng.eclass 2 Apr 2010 20:26:21 -0000 1.9
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.8 2010/01/15 12:58:20 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.9 2010/04/02 20:26:21 a3li Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -244,7 +244,16 @@
# only proceed if it's requested
use ruby_targets_${_ruby_implementation} || continue
- RUBY=$(type -p $_ruby_implementation 2>/dev/null)
+ local _ruby_name=$_ruby_implementation
+
+ # Add all USE_RUBY values where the flag name diverts from the binary here
+ case $_ruby_implementation in
+ ree18)
+ _ruby_name=rubyee18
+ ;;
+ esac
+
+ RUBY=$(type -p $_ruby_name 2>/dev/null)
invoked=yes
if [[ -n "$1" ]]; then
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2010-01-15 12:58 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2010-01-15 12:58 UTC (permalink / raw
To: gentoo-commits
flameeyes 10/01/15 12:58:20
Modified: ruby-ng.eclass
Log:
When adding a conditional dependency, make sure that the condition is in IUSE.
This in particular fixes the problem of test USE flag not declared
when adding runtime dependencies.
Revision Changes Path
1.8 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.8&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.8&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?r1=1.7&r2=1.8
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ruby-ng.eclass 25 Dec 2009 18:01:34 -0000 1.7
+++ ruby-ng.eclass 15 Jan 2010 12:58:20 -0000 1.8
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.7 2009/12/25 18:01:34 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.8 2010/01/15 12:58:20 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -121,6 +121,7 @@
local conditions=$2
for condition in $conditions; do
+ hasq $condition "$IUSE" || IUSE="${IUSE} $condition"
atom="${condition}? ( ${atom} )"
done
@@ -133,6 +134,7 @@
local conditions=$2
for condition in $conditions; do
+ hasq $condition "$IUSE" || IUSE="${IUSE} $condition"
atom="${condition}? ( ${atom} )"
done
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2009-12-25 18:01 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2009-12-25 18:01 UTC (permalink / raw
To: gentoo-commits
flameeyes 09/12/25 18:01:35
Modified: ruby-ng.eclass
Log:
Properly report the source copy phase.
Revision Changes Path
1.7 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.7&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.7&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?r1=1.6&r2=1.7
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ruby-ng.eclass 14 Dec 2009 12:25:47 -0000 1.6
+++ ruby-ng.eclass 25 Dec 2009 18:01:34 -0000 1.7
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.6 2009/12/14 12:25:47 a3li Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.7 2009/12/25 18:01:34 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -318,7 +318,8 @@
_ruby_invoke_environment all _ruby_apply_patches
- _ruby_each_implementation _ruby_source_copy
+ _PHASE="source copy" \
+ _ruby_each_implementation _ruby_source_copy
if type each_ruby_prepare &>/dev/null; then
_ruby_each_implementation each_ruby_prepare
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2009-12-14 12:25 Alex Legler (a3li)
0 siblings, 0 replies; 39+ messages in thread
From: Alex Legler (a3li) @ 2009-12-14 12:25 UTC (permalink / raw
To: gentoo-commits
a3li 09/12/14 12:25:47
Modified: ruby-ng.eclass
Log:
it's 2009
Revision Changes Path
1.6 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.6&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.6&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?r1=1.5&r2=1.6
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ruby-ng.eclass 6 Dec 2009 13:01:26 -0000 1.5
+++ ruby-ng.eclass 14 Dec 2009 12:25:47 -0000 1.6
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.5 2009/12/06 13:01:26 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.6 2009/12/14 12:25:47 a3li Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2009-12-06 13:01 Hans de Graaff (graaff)
0 siblings, 0 replies; 39+ messages in thread
From: Hans de Graaff (graaff) @ 2009-12-06 13:01 UTC (permalink / raw
To: gentoo-commits
graaff 09/12/06 13:01:26
Modified: ruby-ng.eclass
Log:
Fix minor documentation error.
Revision Changes Path
1.5 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?r1=1.4&r2=1.5
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ruby-ng.eclass 5 Dec 2009 11:33:10 -0000 1.4
+++ ruby-ng.eclass 6 Dec 2009 13:01:26 -0000 1.5
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.4 2009/12/05 11:33:10 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.5 2009/12/06 13:01:26 graaff Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -267,7 +267,7 @@
# @FUNCTION: ruby-ng_src_unpack
# @DESCRIPTION:
-# Unpack the source archive, including gems.
+# Unpack the source archive.
ruby-ng_src_unpack() {
mkdir "${WORKDIR}"/all
pushd "${WORKDIR}"/all &>/dev/null
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2009-12-05 11:33 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2009-12-05 11:33 UTC (permalink / raw
To: gentoo-commits
flameeyes 09/12/05 11:33:10
Modified: ruby-ng.eclass
Log:
Add a check for $RUBY to be set in doruby.
Revision Changes Path
1.4 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?r1=1.3&r2=1.4
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ruby-ng.eclass 5 Dec 2009 11:32:19 -0000 1.3
+++ ruby-ng.eclass 5 Dec 2009 11:33:10 -0000 1.4
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.3 2009/12/05 11:32:19 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.4 2009/12/05 11:33:10 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -411,8 +411,9 @@
# @DESCRIPTION:
# Installs the specified file(s) into the sitelibdir of the Ruby interpreter in ${RUBY}.
doruby() {
+ [[ -z ${RUBY} ]] && die "\$RUBY is not set"
( # don't want to pollute calling env
- insinto $(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitelibdir"]')
+ insinto $(${RUBY} -rrbconfig -e 'print Config::CONFIG["sitelibdir"]')
insopts -m 0644
doins "$@"
) || die "failed to install $@"
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2009-12-05 11:32 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2009-12-05 11:32 UTC (permalink / raw
To: gentoo-commits
flameeyes 09/12/05 11:32:19
Modified: ruby-ng.eclass
Log:
Avoid calling ruby twice since we already calculated that directory.
Revision Changes Path
1.3 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?r1=1.2&r2=1.3
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ruby-ng.eclass 5 Dec 2009 11:30:17 -0000 1.2
+++ ruby-ng.eclass 5 Dec 2009 11:32:19 -0000 1.3
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.2 2009/12/05 11:30:17 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.3 2009/12/05 11:32:19 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -380,7 +380,7 @@
# The current implementation lacks libruby (i.e.: jruby)
[[ -z ${libruby_soname} ]] && return 0
- scanelf -qnR "${D}"/$(dirname $(${RUBY} -rrbconfig -e 'puts Config::CONFIG["sitedir"]')) \
+ scanelf -qnR "${D}${sitedir}" \
| fgrep -v "${libruby_soname}" \
> "${T}"/ruby-ng-${_ruby_implementation}-mislink.log
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2009-12-05 11:30 Diego Petteno (flameeyes)
0 siblings, 0 replies; 39+ messages in thread
From: Diego Petteno (flameeyes) @ 2009-12-05 11:30 UTC (permalink / raw
To: gentoo-commits
flameeyes 09/12/05 11:30:17
Modified: ruby-ng.eclass
Log:
Add a further check after install for files installed in the wrong directory (sitedir rather than sitelibdir).
Revision Changes Path
1.2 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?r1=1.1&r2=1.2
Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ruby-ng.eclass 5 Dec 2009 09:35:48 -0000 1.1
+++ ruby-ng.eclass 5 Dec 2009 11:30:17 -0000 1.2
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.1 2009/12/05 09:35:48 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.2 2009/12/05 11:30:17 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -364,6 +364,18 @@
_each_ruby_check_install() {
local libruby_basename=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["LIBRUBY_SO"]')
local libruby_soname=$(scanelf -qS "/usr/$(get_libdir)/${libruby_basename}" | awk '{ print $1 }')
+ local sitedir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["sitedir"]')
+ local sitelibdir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')
+
+ # Look for wrong files in sitedir
+ if [[ -d "${D}${sitedir}" ]]; then
+ local f=$(find "${D}${sitedir}" -mindepth 1 -maxdepth 1 -not -wholename "${D}${sitelibdir}")
+ if [[ -n ${f} ]]; then
+ eerror "Found files in sitedir, outsite sitelibdir:"
+ eerror "${f}"
+ die "Misplaced files in sitedir"
+ fi
+ fi
# The current implementation lacks libruby (i.e.: jruby)
[[ -z ${libruby_soname} ]] && return 0
^ permalink raw reply [flat|nested] 39+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
@ 2009-12-05 9:35 Hans de Graaff (graaff)
0 siblings, 0 replies; 39+ messages in thread
From: Hans de Graaff (graaff) @ 2009-12-05 9:35 UTC (permalink / raw
To: gentoo-commits
graaff 09/12/05 09:35:48
Added: ruby-ng.eclass
Log:
Initial version of ruby-ng.eclass from our ruby-ng-testbed, as discussed on gentoo-dev.
Revision Changes Path
1.1 eclass/ruby-ng.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.1&content-type=text/plain
Index: ruby-ng.eclass
===================================================================
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.1 2009/12/05 09:35:48 graaff Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
# Ruby herd <ruby@gentoo.org>
#
# Author: Diego E. Pettenò <flameeyes@gentoo.org>
#
# Author: Alex Legler <a3li@gentoo.org>
#
# Author: Hans de Graaff <graaff@gentoo.org>
#
# @BLURB: An eclass for installing Ruby packages with proper support for multiple Ruby slots.
# @DESCRIPTION:
# The Ruby eclass is designed to allow an easier installation of Ruby packages
# and their incorporation into the Gentoo Linux system.
#
# Currently available targets are:
# * ruby18 - Ruby (MRI) 1.8.x
# * ruby19 - Ruby (MRI) 1.9.x
# * ree18 - Ruby Enterprise Edition 1.8.x
# * jruby - JRuby
#
# This eclass does not define the implementation of the configure,
# compile, test, or install phases. Instead, the default phases are
# used. Specific implementations of these phases can be provided in
# the ebuild either to be run for each Ruby implementation, or for all
# Ruby implementations, as follows:
#
# * each_ruby_configure
# * all_ruby_configure
# @ECLASS-VARIABLE: USE_RUBY
# @DESCRIPTION:
# This variable contains a space separated list of targets (see above) a package
# is compatible to. It must be set before the `inherit' call. There is no
# default. All ebuilds are expected to set this variable.
# @ECLASS-VARIABLE: RUBY_PATCHES
# @DESCRIPTION:
# A String or Array of filenames of patches to apply to all implementations.
# @ECLASS-VARIABLE: RUBY_OPTIONAL
# @DESCRIPTION:
# Set the value to "yes" to make the dependency on a Ruby interpreter optional.
inherit eutils toolchain-funcs
EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_setup
case ${EAPI} in
0|1)
die "Unsupported EAPI=${EAPI} (too old) for ruby-ng.eclass" ;;
2) ;;
*)
die "Unknown EAPI=${EAPI} for ruby-ng.eclass"
esac
# @FUNCTION: ruby_implementation_depend
# @USAGE: target [comparator [version]]
# @RETURN: Package atom of a Ruby implementation to be used in dependencies.
# @DESCRIPTION:
# This function returns the formal package atom for a Ruby implementation.
#
# `target' has to be one of the valid values for USE_RUBY (see above)
#
# Set `comparator' and `version' to include a comparator (=, >=, etc.) and a
# version string to the returned string
ruby_implementation_depend() {
local rubypn=
local rubyslot=
case $1 in
ruby18)
rubypn="dev-lang/ruby"
rubyslot=":1.8"
;;
ruby19)
rubypn="dev-lang/ruby"
rubyslot=":1.9"
;;
ree18)
rubypn="dev-lang/ruby-enterprise"
rubyslot=":1.8"
;;
jruby)
rubypn="dev-java/jruby"
rubyslot=""
;;
*) die "$1: unknown Ruby implementation"
esac
echo "$2${rubypn}$3${rubyslot}"
}
# @FUNCTION: ruby_samelib
# @RETURN: use flag string with current ruby implementations
# @DESCRIPTION:
# Convenience function to output the use dependency part of a
# dependency. Used as a building block for ruby_add_rdepend() and
# ruby_add_bdepend(), but may also be useful in an ebuild to specify
# more complex dependencies.
ruby_samelib() {
local res=
for _ruby_implementation in $USE_RUBY; do
has -${_ruby_implementation} $@ || \
res="${res}ruby_targets_${_ruby_implementation}?,"
done
echo "[${res%,}]"
}
_ruby_implementation_depend() {
echo "ruby_targets_${1}? ( ${2}[ruby_targets_${1}] )"
}
_ruby_add_bdepend() {
local atom=$1
local conditions=$2
for condition in $conditions; do
atom="${condition}? ( ${atom} )"
done
DEPEND="${DEPEND} ${atom}"
RDEPEND="${RDEPEND}"
}
_ruby_add_rdepend() {
local atom=$1
local conditions=$2
for condition in $conditions; do
atom="${condition}? ( ${atom} )"
done
RDEPEND="${RDEPEND} ${atom}"
_ruby_add_bdepend "$atom" test
}
# @FUNCTION: ruby_add_rdepend
# @USAGE: [conditions] atom
# @DESCRIPTION:
# Adds the specified atom(s) with optional use condition(s) to
# RDEPEND, taking the current set of ruby targets into account. This
# makes sure that all ruby dependencies of the package are installed
# for the same ruby targets. Use this function for all ruby
# dependencies instead of setting RDEPEND yourself. Both atom and
# conditions can be a space-separated list of atoms or conditions.
ruby_add_rdepend() {
local atoms=
local conditions=
case $# in
1)
atoms=$1
;;
2)
conditions=$1
atoms=$2
;;
*)
die "bad number of arguments to $0"
;;
esac
for atom in $atoms; do
_ruby_add_rdepend "${atom}$(ruby_samelib)" "$conditions"
done
}
# @FUNCTION: ruby_add_bdepend
# @USAGE: [conditions] atom
# @DESCRIPTION:
# Adds the specified atom(s) with optional use condition(s) to both
# DEPEND and RDEPEND, taking the current set of ruby targets into
# account. This makes sure that all ruby dependencies of the package
# are installed for the same ruby targets. Use this function for all
# ruby dependencies instead of setting DEPEND and RDEPEND
# yourself. Both atom and conditions can be a space-separated list of
# atoms or conditions.
ruby_add_bdepend() {
local atoms=
local conditions=
case $# in
1)
atoms=$1
;;
2)
conditions=$1
atoms=$2
;;
*)
die "bad number of arguments to $0"
;;
esac
for atom in $atoms; do
_ruby_add_bdepend "${atom}$(ruby_samelib)" "$conditions"
done
}
for _ruby_implementation in $USE_RUBY; do
IUSE="${IUSE} ruby_targets_${_ruby_implementation}"
# If you specify RUBY_OPTIONAL you also need to take care of
# ruby useflag and dependency.
if [[ ${RUBY_OPTIONAL} != "yes" ]]; then
DEPEND="${DEPEND} ruby_targets_${_ruby_implementation}? ( $(ruby_implementation_depend $_ruby_implementation) )"
RDEPEND="${RDEPEND} ruby_targets_${_ruby_implementation}? ( $(ruby_implementation_depend $_ruby_implementation) )"
fi
done
_ruby_invoke_environment() {
old_S=${S}
sub_S=${S#${WORKDIR}}
environment=$1; shift
my_WORKDIR="${WORKDIR}"/${environment}
S="${my_WORKDIR}"/"${sub_S}"
if [[ -d "${S}" ]]; then
pushd "$S" &>/dev/null
elif [[ -d "${my_WORKDIR}" ]]; then
pushd "${my_WORKDIR}" &>/dev/null
else
pushd "${WORKDIR}" &>/dev/null
fi
ebegin "Running ${_PHASE:-${EBUILD_PHASE}} phase for $environment"
"$@"
popd &>/dev/null
S=${old_S}
}
_ruby_each_implementation() {
local invoked=no
for _ruby_implementation in ${USE_RUBY}; do
# only proceed if it's requested
use ruby_targets_${_ruby_implementation} || continue
RUBY=$(type -p $_ruby_implementation 2>/dev/null)
invoked=yes
if [[ -n "$1" ]]; then
_ruby_invoke_environment $_ruby_implementation "$@"
fi
unset RUBY
done
[[ ${invoked} == "no" ]] && die "You need to select at least one Ruby implementation by setting RUBY_TARGETS in /etc/make.conf."
}
# @FUNCTION: ruby-ng_pkg_setup
# @DESCRIPTION:
# Check whether at least one ruby target implementation is present.
ruby-ng_pkg_setup() {
# This only checks that at least one implementation is present
# before doing anything; by leaving the parameters empty we know
# it's a special case.
_ruby_each_implementation
}
# @FUNCTION: ruby-ng_src_unpack
# @DESCRIPTION:
# Unpack the source archive, including gems.
ruby-ng_src_unpack() {
mkdir "${WORKDIR}"/all
pushd "${WORKDIR}"/all &>/dev/null
# We don't support an each-unpack, it's either all or nothing!
if type all_ruby_unpack &>/dev/null; then
_ruby_invoke_environment all all_ruby_unpack
else
[[ -n ${A} ]] && unpack ${A}
fi
popd &>/dev/null
}
_ruby_apply_patches() {
for patch in "${RUBY_PATCHES[@]}"; do
if [ -f "${patch}" ]; then
epatch "${patch}"
elif [ -f "${FILESDIR}/${patch}" ]; then
epatch "${FILESDIR}/${patch}"
else
die "Cannot find patch ${patch}"
fi
done
# This is a special case: instead of executing just in the special
# "all" environment, this will actually copy the effects on _all_
# the other environments, and is thus executed before the copy
type all_ruby_prepare &>/dev/null && all_ruby_prepare
}
_ruby_source_copy() {
# Until we actually find a reason not to, we use hardlinks, this
# should reduce the amount of disk space that is wasted by this.
cp -prl all ${_ruby_implementation} \
|| die "Unable to copy ${_ruby_implementation} environment"
}
# @FUNCTION: ruby-ng_src_prepare
# @DESCRIPTION:
# Apply patches and prepare versions for each ruby target
# implementation. Also carry out common clean up tasks.
ruby-ng_src_prepare() {
# Way too many Ruby packages are prepared on OSX without removing
# the extra data forks, we do it here to avoid repeating it for
# almost every other ebuild.
find . -name '._*' -delete
_ruby_invoke_environment all _ruby_apply_patches
_ruby_each_implementation _ruby_source_copy
if type each_ruby_prepare &>/dev/null; then
_ruby_each_implementation each_ruby_prepare
fi
}
# @FUNCTION: ruby-ng_src_configure
# @DESCRIPTION:
# Configure the package.
ruby-ng_src_configure() {
if type each_ruby_configure &>/dev/null; then
_ruby_each_implementation each_ruby_configure
fi
type all_ruby_configure &>/dev/null && \
_ruby_invoke_environment all all_ruby_configure
}
# @FUNCTION: ruby-ng_src_compile
# @DESCRIPTION:
# Compile the package.
ruby-ng_src_compile() {
if type each_ruby_compile &>/dev/null; then
_ruby_each_implementation each_ruby_compile
fi
type all_ruby_compile &>/dev/null && \
_ruby_invoke_environment all all_ruby_compile
}
# @FUNCTION: ruby-ng_src_test
# @DESCRIPTION:
# Run tests for the package.
ruby-ng_src_test() {
if type each_ruby_test &>/dev/null; then
_ruby_each_implementation each_ruby_test
fi
type all_ruby_test &>/dev/null && \
_ruby_invoke_environment all all_ruby_test
}
_each_ruby_check_install() {
local libruby_basename=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["LIBRUBY_SO"]')
local libruby_soname=$(scanelf -qS "/usr/$(get_libdir)/${libruby_basename}" | awk '{ print $1 }')
# The current implementation lacks libruby (i.e.: jruby)
[[ -z ${libruby_soname} ]] && return 0
scanelf -qnR "${D}"/$(dirname $(${RUBY} -rrbconfig -e 'puts Config::CONFIG["sitedir"]')) \
| fgrep -v "${libruby_soname}" \
> "${T}"/ruby-ng-${_ruby_implementation}-mislink.log
if [[ -s "${T}"/ruby-ng-${_ruby_implementation}-mislink.log ]]; then
ewarn "Extensions installed for ${_ruby_implementation} with missing links to ${libruby}"
ewarn $(< "${T}"/ruby-ng-${_ruby_implementation}-mislink.log )
die "Missing links to ${libruby}"
fi
}
# @FUNCTION: ruby-ng_src_install
# @DESCRIPTION:
# Install the package for each ruby target implementation.
ruby-ng_src_install() {
if type each_ruby_install &>/dev/null; then
_ruby_each_implementation each_ruby_install
fi
type all_ruby_install &>/dev/null && \
_ruby_invoke_environment all all_ruby_install
_PHASE="check install" \
_ruby_each_implementation _each_ruby_check_install
}
# @FUNCTION: doruby
# @USAGE: file [file...]
# @DESCRIPTION:
# Installs the specified file(s) into the sitelibdir of the Ruby interpreter in ${RUBY}.
doruby() {
( # don't want to pollute calling env
insinto $(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitelibdir"]')
insopts -m 0644
doins "$@"
) || die "failed to install $@"
}
# @FUNCTION: ruby_get_libruby
# @RETURN: The location of libruby*.so belonging to the Ruby interpreter in ${RUBY}.
ruby_get_libruby() {
${RUBY} -rrbconfig -e 'puts File.join(Config::CONFIG["libdir"], Config::CONFIG["LIBRUBY"])'
}
# @FUNCTION: ruby_get_hdrdir
# @RETURN: The location of the header files belonging to the Ruby interpreter in ${RUBY}.
ruby_get_hdrdir() {
local rubyhdrdir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["rubyhdrdir"]')
if [[ "${rubyhdrdir}" = "nil" ]] ; then
rubyhdrdir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["archdir"]')
fi
echo "${rubyhdrdir}"
}
^ permalink raw reply [flat|nested] 39+ messages in thread
end of thread, other threads:[~2013-06-23 14:56 UTC | newest]
Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-22 3:39 [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass Diego Petteno (flameeyes)
-- strict thread matches above, loose matches on Subject: below --
2013-06-23 14:56 Hans de Graaff (graaff)
2011-10-24 18:20 Hans de Graaff (graaff)
2011-10-22 10:08 Tomas Chvatal (scarabeus)
2011-10-21 6:48 Hans de Graaff (graaff)
2011-10-05 17:46 Hans de Graaff (graaff)
2011-07-22 9:41 Hans de Graaff (graaff)
2011-07-22 9:10 Hans de Graaff (graaff)
2011-07-22 9:08 Hans de Graaff (graaff)
2011-07-19 5:48 Hans de Graaff (graaff)
2011-07-16 9:50 Hans de Graaff (graaff)
2011-04-25 8:37 Hans de Graaff (graaff)
2011-04-25 6:27 Hans de Graaff (graaff)
2010-11-07 22:52 Christian Faulhammer (fauli)
2010-09-10 13:03 Diego Petteno (flameeyes)
2010-07-30 17:28 Diego Petteno (flameeyes)
2010-07-30 16:56 Diego Petteno (flameeyes)
2010-07-30 15:05 Diego Petteno (flameeyes)
2010-07-14 13:11 Diego Petteno (flameeyes)
2010-07-08 4:00 Diego Petteno (flameeyes)
2010-05-24 7:33 Diego Petteno (flameeyes)
2010-05-22 13:15 Diego Petteno (flameeyes)
2010-05-22 12:45 Diego Petteno (flameeyes)
2010-05-22 12:31 Diego Petteno (flameeyes)
2010-05-22 12:18 Diego Petteno (flameeyes)
2010-05-21 23:18 Diego Petteno (flameeyes)
2010-05-01 16:05 Diego Petteno (flameeyes)
2010-04-30 17:40 Diego Petteno (flameeyes)
2010-04-26 15:07 Alex Legler (a3li)
2010-04-05 7:41 Alex Legler (a3li)
2010-04-02 20:26 Alex Legler (a3li)
2010-01-15 12:58 Diego Petteno (flameeyes)
2009-12-25 18:01 Diego Petteno (flameeyes)
2009-12-14 12:25 Alex Legler (a3li)
2009-12-06 13:01 Hans de Graaff (graaff)
2009-12-05 11:33 Diego Petteno (flameeyes)
2009-12-05 11:32 Diego Petteno (flameeyes)
2009-12-05 11:30 Diego Petteno (flameeyes)
2009-12-05 9:35 Hans de Graaff (graaff)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox