SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "ruby"

# SliTaz package receipt.

PACKAGE="ruby"
VERSION="2.7.8"
CATEGORY="development"
TAGS="ruby language programming"
SHORT_DESC="Dynamic programming language focused on simplicity and productivity."
MAINTAINER="pankso@slitaz.org"
LICENSE="GPL2"
WEB_SITE="https://www.ruby-lang.org/"

TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="https://cache.ruby-lang.org/pub/$PACKAGE/${VERSION%.*}/$TARBALL"

DEPENDS="gdbm libdb libruby ncurses openssl readline zlib"
BUILD_DEPENDS="db-dev openssl-dev readline-dev tcl-dev zlib-dev"

SUGGESTED="tk"
RELATED="libruby libruby-extras ruby-dev"

HOST_ARCH="i486 arm"

# What is the latest version available today?
current_version()
{
    wget -O - $WEB_SITE/en/ 2>/dev/null | \
    sed '/eleased/!d;s|.*Ruby ||;s| .*||;q'
}

# Handle cross compilation.
case "$ARCH" in
    i?86) 
        BUILD_DEPENDS="$BUILD_DEPENDS coreutils-file-output-full tk-dev " ;;
    arm*)
        # executable host ruby is required. use --with-baseruby option.
        # --with-arch=arm 
        export ac_cv_func_getpgrp_void=yes
        export ac_cv_func_setpgrp_void=yes 
        ARCH_ARGS="--with-baseruby=/usr/bin/ruby" ;;
esac

# Rules to configure and make the package.
compile_rules()
{
    # thanks magiruuvelvet for workaround to use ruby 2.x with openssl 3.x
    # see https://github.com/magiruuvelvet/alpine-ruby-2.7-openssl3
    patch -Np1 < $stuff/openssl-3.0.patch

    mkdir build && cd build
    wget https://github.com/ruby/openssl/archive/refs/tags/v3.2.0.tar.gz
    tar xf v3.2.0.tar.gz
    cd ..

    rm -rf ext/openssl test/openssl
    mv build/openssl-3.2.0/ext/openssl ext
    mv build/openssl-3.2.0/lib ext/openssl
    mv build/openssl-3.2.0/History.md ext/openssl
    mv build/openssl-3.2.0/openssl.gemspec ext/openssl
    mv build/openssl-3.2.0/test/openssl test

    ./configure            \
        --prefix=/usr        \
        --enable-shared        \
        $CONFIGURE_ARGS        \
        ${ARCH_ARGS} &&
    make $MAKEFLAGS &&
    make DESTDIR=$DESTDIR install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr
    cp -a $install/usr/bin    $fs/usr
}
6047 packages and 209931 files in current database (Wed Jun 26 15:35:30 2024)