From a962e732d2b8108a4a8a0f31aa3b9fa1ca18bd03 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Mon, 2 May 2016 02:25:38 -0400 Subject: [PATCH] ruby: Better fixup of rbconfig.rb (fixes #247) --- packages/ruby/build.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/ruby/build.sh b/packages/ruby/build.sh index 83271992a..517d36cc0 100644 --- a/packages/ruby/build.sh +++ b/packages/ruby/build.sh @@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.ruby-lang.org/ TERMUX_PKG_DESCRIPTION="Dynamic programming language with a focus on simplicity and productivity" _MAJOR_VERSION=2.3 TERMUX_PKG_VERSION=${_MAJOR_VERSION}.1 +TERMUX_PKG_BUILD_REVISION=1 TERMUX_PKG_SRCURL=http://cache.ruby-lang.org/pub/ruby/${_MAJOR_VERSION}/ruby-${TERMUX_PKG_VERSION}.tar.xz # libbffi is used by the fiddle extension module: TERMUX_PKG_DEPENDS="libffi, libgmp, readline, openssl, libutil" @@ -34,8 +35,12 @@ termux_step_make_install () { done # Fix absolute paths to executables: - perl -p -i -e 's@"/bin/mkdir@"mkdir@' $RBCONFIG - perl -p -i -e "s@/usr/bin/install@install@" $RBCONFIG + perl -p -i -e 's/^.*CONFIG\["INSTALL"\].*$/ CONFIG["INSTALL"] = "install -c"/' $RBCONFIG + perl -p -i -e 's/^.*CONFIG\["PKG_CONFIG"\].*$/ CONFIG["PKG_CONFIG"] = "pkg-config"/' $RBCONFIG + perl -p -i -e 's/^.*CONFIG\["MAKEDIRS"\].*$/ CONFIG["MAKEDIRS"] = "mkdir -p"/' $RBCONFIG + perl -p -i -e 's/^.*CONFIG\["MKDIR_P"\].*$/ CONFIG["MKDIR_P"] = "mkdir -p"/' $RBCONFIG + perl -p -i -e 's/^.*CONFIG\["EGREP"\].*$/ CONFIG["EGREP"] = "grep -E"/' $RBCONFIG + perl -p -i -e 's/^.*CONFIG\["GREP"\].*$/ CONFIG["GREP"] = "grep"/' $RBCONFIG # Make C++-using gems link against libgnustl_shared instead of the limited system libstdc++: perl -p -i -e 's/\(CXX\) -shared/\(CXX\) -shared -lgnustl_shared/' $RBCONFIG