wok-current view ruby/receipt @ rev 25717
Patch ruby to be use openssl 3.x
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Fri Jun 14 18:19:03 2024 +0000 (5 months ago) |
parents | 3ad63c8fc2f9 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="ruby"
4 VERSION="2.7.8"
5 CATEGORY="development"
6 TAGS="ruby language programming"
7 SHORT_DESC="Dynamic programming language focused on simplicity and productivity."
8 MAINTAINER="pankso@slitaz.org"
9 LICENSE="GPL2"
10 WEB_SITE="https://www.ruby-lang.org/"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="https://cache.ruby-lang.org/pub/$PACKAGE/${VERSION%.*}/$TARBALL"
15 DEPENDS="gdbm libdb libruby ncurses openssl readline zlib"
16 BUILD_DEPENDS="db-dev openssl-dev readline-dev tcl-dev zlib-dev"
18 SUGGESTED="tk"
19 RELATED="libruby libruby-extras ruby-dev"
21 HOST_ARCH="i486 arm"
23 # What is the latest version available today?
24 current_version()
25 {
26 wget -O - $WEB_SITE/en/ 2>/dev/null | \
27 sed '/eleased/!d;s|.*Ruby ||;s| .*||;q'
28 }
30 # Handle cross compilation.
31 case "$ARCH" in
32 i?86)
33 BUILD_DEPENDS="$BUILD_DEPENDS coreutils-file-output-full tk-dev " ;;
34 arm*)
35 # executable host ruby is required. use --with-baseruby option.
36 # --with-arch=arm
37 export ac_cv_func_getpgrp_void=yes
38 export ac_cv_func_setpgrp_void=yes
39 ARCH_ARGS="--with-baseruby=/usr/bin/ruby" ;;
40 esac
42 # Rules to configure and make the package.
43 compile_rules()
44 {
45 # thanks magiruuvelvet for workaround to use ruby 2.x with openssl 3.x
46 # see https://github.com/magiruuvelvet/alpine-ruby-2.7-openssl3
47 patch -Np1 < $stuff/openssl-3.0.patch
49 mkdir build && cd build
50 wget https://github.com/ruby/openssl/archive/refs/tags/v3.2.0.tar.gz
51 tar xf v3.2.0.tar.gz
52 cd ..
54 rm -rf ext/openssl test/openssl
55 mv build/openssl-3.2.0/ext/openssl ext
56 mv build/openssl-3.2.0/lib ext/openssl
57 mv build/openssl-3.2.0/History.md ext/openssl
58 mv build/openssl-3.2.0/openssl.gemspec ext/openssl
59 mv build/openssl-3.2.0/test/openssl test
61 ./configure \
62 --prefix=/usr \
63 --enable-shared \
64 $CONFIGURE_ARGS \
65 ${ARCH_ARGS} &&
66 make $MAKEFLAGS &&
67 make DESTDIR=$DESTDIR install
68 }
70 # Rules to gen a SliTaz package suitable for Tazpkg.
71 genpkg_rules()
72 {
73 mkdir -p $fs/usr
74 cp -a $install/usr/bin $fs/usr
75 }