ruby: force getaddrinfo detection in cross builds to build the socket extension.

This commit is contained in:
Juan RP 2013-05-16 10:36:05 +02:00
parent 5e04435ef2
commit 7214c4ec85

View file

@ -4,7 +4,7 @@ _ruby_ver="2.0.0"
_ruby_distpatchver="p195" _ruby_distpatchver="p195"
_ruby_distver="${_ruby_ver}-${_ruby_distpatchver}" _ruby_distver="${_ruby_ver}-${_ruby_distpatchver}"
version=${_ruby_ver}${_ruby_distpatchver} version=${_ruby_ver}${_ruby_distpatchver}
revision=2 revision=3
wrksrc="${pkgname}-${_ruby_distver}" wrksrc="${pkgname}-${_ruby_distver}"
short_desc="Ruby programming language" short_desc="Ruby programming language"
homepage="http://www.ruby-lang.org/en/" homepage="http://www.ruby-lang.org/en/"
@ -26,10 +26,9 @@ makedepends="readline-devel libffi-devel openssl-devel gdbm-devel libyaml-devel
if [ "$CROSS_BUILD" ]; then if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" ruby>=${version} ruby-rdoc>=${version} ruby-ri>=${version}" hostmakedepends+=" ruby>=${version} ruby-rdoc>=${version} ruby-ri>=${version}"
configure_args+=" --with-baseruby=/usr/bin/ruby" pre_build() {
pre_install() { # Force getaddrinfo detection.
# XXX wants to use target ruby sed -e 's,\(checking_for("wide getaddrinfo") {try_\)run,\1link,' -i ext/socket/extconf.rb
sed -e 's,$(Q) $(RUBY) $(GEN),$(Q) ruby $(GEN),g' -i ext/ripper/Makefile
} }
fi fi