ruby/rbenv: Updated for version 1.3.0.

Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Andrew Clemons 2024-07-07 12:41:22 +09:00 committed by Willy Sudiarto Raharjo
parent 2e23f19ef6
commit 611a0030e0
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 18 additions and 61 deletions

View file

@ -1,12 +0,0 @@
diff -Naur rbenv-1.0.0.orig/libexec/rbenv rbenv-1.0.0/libexec/rbenv
--- rbenv-1.0.0.orig/libexec/rbenv 2015-12-25 07:12:47.000000000 +1300
+++ rbenv-1.0.0/libexec/rbenv 2016-04-02 14:50:55.733994971 +1300
@@ -20,7 +20,7 @@
exit 1
}
-if enable -f "${BASH_SOURCE%/*}"/../libexec/rbenv-realpath.dylib realpath 2>/dev/null; then
+if enable -f /usr/lib/rbenv/libexec/rbenv-realpath.dylib realpath 2>/dev/null; then
abs_dirname() {
local path="$(realpath "$1")"
echo "${path%/*}"

View file

@ -3,6 +3,7 @@
# Slackware build script for rbenv
# Copyright 2016-2017,2019,2021 Andrew Clemons, Wellington New Zealand
# Copyright 2024 Andrew Clemons, Tokyo Japan
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -26,22 +27,13 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=rbenv
VERSION=${VERSION:-1.2.0}
VERSION=${VERSION:-1.3.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
ARCH=noarch
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@ -51,34 +43,14 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf "$CWD/$PRGNAM-$VERSION.tar.gz"
cd $PRGNAM-$VERSION
# fix finding native lib when rbenv is symlinked to /usr/bin
patch -p1 < $CWD/dylib-patch.diff
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@ -86,24 +58,21 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
(
cd src
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure
make
)
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/lib/rbenv
mv completions libexec rbenv.d $PKG/usr/lib/rbenv
cp -r rbenv.d/ $PKG/usr/lib/rbenv
mv share/man $PKG/usr/
find $PKG/usr/man -name '*.adoc' -exec rm {} \;
mkdir -p $PKG/usr/bin
ln -s /usr/lib/rbenv/libexec/rbenv $PKG/usr/bin/
install -m0755 libexec/* -t $PKG/usr/bin/
sed -i 's,#!/usr/bin/env bash,#!/bin/bash,g' $PKG/usr/bin/*
install -Dm0644 completions/rbenv.bash $PKG/usr/share/bash-completion/completions/$PRGNAM
install -Dm0644 completions/_rbenv $PKG/usr/share/zsh/site-functions/_$PRGNAM
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
# add rbenv to path
mkdir -p $PKG/etc/profile.d/

View file

@ -1,8 +1,8 @@
PRGNAM="rbenv"
VERSION="1.2.0"
VERSION="1.3.0"
HOMEPAGE="https://github.com/rbenv/rbenv"
DOWNLOAD="https://github.com/rbenv/rbenv/archive/v1.2.0/rbenv-1.2.0.tar.gz"
MD5SUM="ea260ab924cfc22c607a219d26a5a195"
DOWNLOAD="https://github.com/rbenv/rbenv/archive/v1.3.0/rbenv-1.3.0.tar.gz"
MD5SUM="e4ce1106663b713fe512082781535bd0"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""