summaryrefslogtreecommitdiff
path: root/source/d/ruby/ruby.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/ruby/ruby.SlackBuild')
-rwxr-xr-xsource/d/ruby/ruby.SlackBuild18
1 files changed, 13 insertions, 5 deletions
diff --git a/source/d/ruby/ruby.SlackBuild b/source/d/ruby/ruby.SlackBuild
index 9a70d962..51e9edaf 100755
--- a/source/d/ruby/ruby.SlackBuild
+++ b/source/d/ruby/ruby.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,13 +22,21 @@
PKGNAM=ruby
-VERSION=$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1,2 -d - | rev)
+
+if echo $PKGNAM-*.tar.?z* | grep -q p ; then
+ # With patchlevel in tarball name:
+ VERSION=$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1,2 -d - | rev)
+else
+ # Without patchlevel in tarball name:
+ VERSION=$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+fi
+
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -41,12 +49,12 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-ruby
-if [ "$ARCH" = "i486" ]; then
+if [ "$ARCH" = "i586" ]; then
# -O3 works around a compile failure due to a miniruby segfault
# when trying to build ruby with gcc-4.4 or newer. Evidently
# -O0 also works, but...
# other distributions also use -fno-strict-aliasing which helps stability
- SLKCFLAGS="-march=i486 -mtune=i686 -O3 -fno-strict-aliasing"
+ SLKCFLAGS="-march=i586 -mtune=i686 -O3 -fno-strict-aliasing"
OPTFLAGS=-O3
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then