1 | # Copyright 1999-2011 Gentoo Foundation |
1 | # Copyright 1999-2011 Gentoo Foundation |
2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.42 2011/10/22 10:08:44 scarabeus Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.43 2011/10/24 18:20:05 graaff Exp $ |
4 | |
4 | |
5 | # @ECLASS: ruby-ng.eclass |
5 | # @ECLASS: ruby-ng.eclass |
6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
7 | # Ruby herd <ruby@gentoo.org> |
7 | # Ruby herd <ruby@gentoo.org> |
8 | # @AUTHOR: |
8 | # @AUTHOR: |
… | |
… | |
505 | # we have a Mach-O object here |
505 | # we have a Mach-O object here |
506 | [[ ${CHOST} == *-darwin ]] && scancmd=scanmacho |
506 | [[ ${CHOST} == *-darwin ]] && scancmd=scanmacho |
507 | |
507 | |
508 | has "${EAPI}" 2 && ! use prefix && EPREFIX= |
508 | has "${EAPI}" 2 && ! use prefix && EPREFIX= |
509 | |
509 | |
510 | local libruby_basename=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["LIBRUBY_SO"]') |
510 | local libruby_basename=$(${RUBY} -rrbconfig -e 'puts RbConfig::CONFIG["LIBRUBY_SO"]') |
511 | local libruby_soname=$(basename $(${scancmd} -F "%S#F" -qS "${EPREFIX}/usr/$(get_libdir)/${libruby_basename}") 2>/dev/null) |
511 | local libruby_soname=$(basename $(${scancmd} -F "%S#F" -qS "${EPREFIX}/usr/$(get_libdir)/${libruby_basename}") 2>/dev/null) |
512 | local sitedir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["sitedir"]') |
512 | local sitedir=$(${RUBY} -rrbconfig -e 'puts RbConfig::CONFIG["sitedir"]') |
513 | local sitelibdir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]') |
513 | local sitelibdir=$(${RUBY} -rrbconfig -e 'puts RbConfig::CONFIG["sitelibdir"]') |
514 | |
514 | |
515 | # Look for wrong files in sitedir |
515 | # Look for wrong files in sitedir |
516 | # if [[ -d "${D}${sitedir}" ]]; then |
516 | # if [[ -d "${D}${sitedir}" ]]; then |
517 | # local f=$(find "${D}${sitedir}" -mindepth 1 -maxdepth 1 -not -wholename "${D}${sitelibdir}") |
517 | # local f=$(find "${D}${sitedir}" -mindepth 1 -maxdepth 1 -not -wholename "${D}${sitelibdir}") |
518 | # if [[ -n ${f} ]]; then |
518 | # if [[ -n ${f} ]]; then |
… | |
… | |
558 | |
558 | |
559 | # @FUNCTION: ruby_rbconfig_value |
559 | # @FUNCTION: ruby_rbconfig_value |
560 | # @USAGE: rbconfig item |
560 | # @USAGE: rbconfig item |
561 | # @RETURN: Returns the value of the given rbconfig item of the Ruby interpreter in ${RUBY}. |
561 | # @RETURN: Returns the value of the given rbconfig item of the Ruby interpreter in ${RUBY}. |
562 | ruby_rbconfig_value() { |
562 | ruby_rbconfig_value() { |
563 | echo $(${RUBY} -rrbconfig -e "puts Config::CONFIG['$1']") |
563 | echo $(${RUBY} -rrbconfig -e "puts RbConfig::CONFIG['$1']") |
564 | } |
564 | } |
565 | |
565 | |
566 | # @FUNCTION: doruby |
566 | # @FUNCTION: doruby |
567 | # @USAGE: file [file...] |
567 | # @USAGE: file [file...] |
568 | # @DESCRIPTION: |
568 | # @DESCRIPTION: |
… | |
… | |
579 | } |
579 | } |
580 | |
580 | |
581 | # @FUNCTION: ruby_get_libruby |
581 | # @FUNCTION: ruby_get_libruby |
582 | # @RETURN: The location of libruby*.so belonging to the Ruby interpreter in ${RUBY}. |
582 | # @RETURN: The location of libruby*.so belonging to the Ruby interpreter in ${RUBY}. |
583 | ruby_get_libruby() { |
583 | ruby_get_libruby() { |
584 | ${RUBY} -rrbconfig -e 'puts File.join(Config::CONFIG["libdir"], Config::CONFIG["LIBRUBY"])' |
584 | ${RUBY} -rrbconfig -e 'puts File.join(RbConfig::CONFIG["libdir"], RbConfig::CONFIG["LIBRUBY"])' |
585 | } |
585 | } |
586 | |
586 | |
587 | # @FUNCTION: ruby_get_hdrdir |
587 | # @FUNCTION: ruby_get_hdrdir |
588 | # @RETURN: The location of the header files belonging to the Ruby interpreter in ${RUBY}. |
588 | # @RETURN: The location of the header files belonging to the Ruby interpreter in ${RUBY}. |
589 | ruby_get_hdrdir() { |
589 | ruby_get_hdrdir() { |