1 | # Copyright 1999-2009 Gentoo Foundation |
1 | # Copyright 1999-2009 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.33 2011/07/08 11:35:01 ssuominen Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.34 2011/07/16 09:50: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 | # |
8 | # |
… | |
… | |
53 | # @DESCRIPTION: |
53 | # @DESCRIPTION: |
54 | # If defined this variable determines the source directory name after |
54 | # If defined this variable determines the source directory name after |
55 | # unpacking. This defaults to the name of the package. Note that this |
55 | # unpacking. This defaults to the name of the package. Note that this |
56 | # variable supports a wildcard mechanism to help with github tarballs |
56 | # variable supports a wildcard mechanism to help with github tarballs |
57 | # that contain the commit hash as part of the directory name. |
57 | # that contain the commit hash as part of the directory name. |
|
|
58 | |
|
|
59 | # @ECLASS-VARIABLE: RUBY_QA_ALLOWED_LIBS |
|
|
60 | # @DEFAULT_UNSET |
|
|
61 | # @DESCRIPTION: |
|
|
62 | # If defined this variable contains a whitelist of shared objects that |
|
|
63 | # are allowed to exist even if they don't link to libruby. This avoids |
|
|
64 | # the QA check that makes this mandatory. This is most likely not what |
|
|
65 | # you are looking for if you get the related "Missing links" QA warning, |
|
|
66 | # since the proper fix is almost always to make sure the shared object |
|
|
67 | # is linked against libruby. There are cases were this is not the case |
|
|
68 | # and the shared object is generic code to be used in some other way |
|
|
69 | # (e.g. selenium's firefox driver extension). When set this argument is |
|
|
70 | # passed to "grep -E" to remove reporting of these shared objects. |
58 | |
71 | |
59 | inherit eutils toolchain-funcs |
72 | inherit eutils toolchain-funcs |
60 | |
73 | |
61 | EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_setup |
74 | EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_setup |
62 | |
75 | |
… | |
… | |
454 | # extensions via ruby-fakegem; make sure to check only in sitelibdir, since |
467 | # extensions via ruby-fakegem; make sure to check only in sitelibdir, since |
455 | # that's what changes between two implementations (otherwise you'd get false |
468 | # that's what changes between two implementations (otherwise you'd get false |
456 | # positives now that Ruby 1.9.2 installs with the same sitedir as 1.8) |
469 | # positives now that Ruby 1.9.2 installs with the same sitedir as 1.8) |
457 | ${scancmd} -qnR "${D}${sitelibdir}" "${D}${sitelibdir/site_ruby/gems}" \ |
470 | ${scancmd} -qnR "${D}${sitelibdir}" "${D}${sitelibdir/site_ruby/gems}" \ |
458 | | fgrep -v "${libruby_soname}" \ |
471 | | fgrep -v "${libruby_soname}" \ |
|
|
472 | | grep -E -v "${RUBY_QA_ALLOWED_LIBS}" \ |
459 | > "${T}"/ruby-ng-${_ruby_implementation}-mislink.log |
473 | > "${T}"/ruby-ng-${_ruby_implementation}-mislink.log |
460 | |
474 | |
461 | if [[ -s "${T}"/ruby-ng-${_ruby_implementation}-mislink.log ]]; then |
475 | if [[ -s "${T}"/ruby-ng-${_ruby_implementation}-mislink.log ]]; then |
462 | ewarn "Extensions installed for ${_ruby_implementation} with missing links to ${libruby_soname}" |
476 | ewarn "Extensions installed for ${_ruby_implementation} with missing links to ${libruby_soname}" |
463 | ewarn $(< "${T}"/ruby-ng-${_ruby_implementation}-mislink.log ) |
477 | ewarn $(< "${T}"/ruby-ng-${_ruby_implementation}-mislink.log ) |