mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
extra/ruby to 3.2.4-1
This commit is contained in:
parent
946c0dc190
commit
212d2be0f8
4 changed files with 580 additions and 212 deletions
189
extra/ruby/.SRCINFO
Normal file
189
extra/ruby/.SRCINFO
Normal file
|
@ -0,0 +1,189 @@
|
|||
pkgbase = ruby
|
||||
pkgdesc = An object-oriented language for quick and easy programming
|
||||
pkgver = 3.2.4
|
||||
pkgrel = 1
|
||||
url = https://www.ruby-lang.org/en/
|
||||
arch = x86_64
|
||||
license = BSD-2-Clause
|
||||
checkdepends = inetutils
|
||||
checkdepends = procps-ng
|
||||
makedepends = doxygen
|
||||
makedepends = gcc-libs
|
||||
makedepends = gdbm
|
||||
makedepends = glibc
|
||||
makedepends = gmp
|
||||
makedepends = graphviz
|
||||
makedepends = libffi
|
||||
makedepends = libxcrypt
|
||||
makedepends = libyaml
|
||||
makedepends = openssl
|
||||
makedepends = readline
|
||||
makedepends = rust
|
||||
makedepends = tk
|
||||
makedepends = zlib
|
||||
options = !emptydirs
|
||||
source = https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.4.tar.xz
|
||||
source = ruby-3.2-openssl-3.3-fix.patch::https://github.com/ruby/ruby/commit/dd5e625d7bcb7dc849fdbc2ad8053f9c2724efb4.patch
|
||||
sha512sums = fb0af37be4b6ad7b98ab9f8a508952238ee68b5828e3926331e4db52e2ebc1e6046f31114069322db0cd3bea7c9b82ace91c8564573ddcfa1f960877b237dbff
|
||||
sha512sums = 52351374fc9aa9c3576bfb4b62df1d1d8dbe7327270a4d1c5777d247a33d6e6528b08a537fc4c87d9d0cc54b4b9183848f6c54d54fc727871b3e511b7a73ddb7
|
||||
b2sums = 9c2300a958b03528d51f0d74a069c8c538ca4009835d55377509a000bcfb43893a8a80d8fda57011e77c72e6283cb259281d5ba7b37444546e49f2a9ad515cf3
|
||||
b2sums = 1ee662e57f9f29b4ab29b391b38b988a8b5c199e62c815353c3a47e6eceea910344c7d9a00512916e05b6404efddf941313dfdcb0bec027f7f668443309228b9
|
||||
|
||||
pkgname = ruby
|
||||
depends = gcc-libs
|
||||
depends = gdbm
|
||||
depends = glibc
|
||||
depends = gmp
|
||||
depends = libffi
|
||||
depends = libxcrypt
|
||||
depends = libyaml
|
||||
depends = openssl
|
||||
depends = readline
|
||||
depends = zlib
|
||||
depends = rubygems
|
||||
optdepends = tk: for Ruby/TK
|
||||
optdepends = ruby-docs: Documentation for Ruby
|
||||
optdepends = ruby-default-gems: Default gems which are part of Ruby StdLib
|
||||
optdepends = ruby-bundled-gems: Bundled gems which are part of Ruby StdLib
|
||||
optdepends = ruby-stdlib: Full Ruby StdLib including default gems, bundled gems and tools
|
||||
provides = libruby.so
|
||||
provides = ruby-abbrev
|
||||
provides = ruby-base64
|
||||
provides = ruby-benchmark
|
||||
provides = ruby-bigdecimal
|
||||
provides = ruby-cgi
|
||||
provides = ruby-csv
|
||||
provides = ruby-date
|
||||
provides = ruby-delegate
|
||||
provides = ruby-did_you_mean
|
||||
provides = ruby-digest
|
||||
provides = ruby-drb
|
||||
provides = ruby-english
|
||||
provides = ruby-error_highlight
|
||||
provides = ruby-etc
|
||||
provides = ruby-fcntl
|
||||
provides = ruby-fiddle
|
||||
provides = ruby-fileutils
|
||||
provides = ruby-find
|
||||
provides = ruby-forwardable
|
||||
provides = ruby-getoptlong
|
||||
provides = ruby-io-console
|
||||
provides = ruby-io-nonblock
|
||||
provides = ruby-io-wait
|
||||
provides = ruby-ipaddr
|
||||
provides = ruby-json
|
||||
provides = ruby-logger
|
||||
provides = ruby-mutex_m
|
||||
provides = ruby-net-http
|
||||
provides = ruby-net-protocol
|
||||
provides = ruby-nkf
|
||||
provides = ruby-observer
|
||||
provides = ruby-open-uri
|
||||
provides = ruby-open3
|
||||
provides = ruby-openssl
|
||||
provides = ruby-optparse
|
||||
provides = ruby-ostruct
|
||||
provides = ruby-pathname
|
||||
provides = ruby-pp
|
||||
provides = ruby-prettyprint
|
||||
provides = ruby-pstore
|
||||
provides = ruby-psych
|
||||
provides = ruby-readline
|
||||
provides = ruby-readline-ext
|
||||
provides = ruby-reline
|
||||
provides = ruby-resolv
|
||||
provides = ruby-resolv-replace
|
||||
provides = ruby-rinda
|
||||
provides = ruby-ruby2_keywords
|
||||
provides = ruby-securerandom
|
||||
provides = ruby-set
|
||||
provides = ruby-shellwords
|
||||
provides = ruby-singleton
|
||||
provides = ruby-stringio
|
||||
provides = ruby-strscan
|
||||
provides = ruby-syntax_suggest
|
||||
provides = ruby-syslog
|
||||
provides = ruby-tempfile
|
||||
provides = ruby-time
|
||||
provides = ruby-timeout
|
||||
provides = ruby-tmpdir
|
||||
provides = ruby-tsort
|
||||
provides = ruby-un
|
||||
provides = ruby-uri
|
||||
provides = ruby-weakref
|
||||
provides = ruby-yaml
|
||||
provides = ruby-zlib
|
||||
conflicts =
|
||||
replaces = ruby-abbrev
|
||||
replaces = ruby-base64
|
||||
replaces = ruby-benchmark
|
||||
replaces = ruby-bigdecimal
|
||||
replaces = ruby-cgi
|
||||
replaces = ruby-csv
|
||||
replaces = ruby-date
|
||||
replaces = ruby-delegate
|
||||
replaces = ruby-did_you_mean
|
||||
replaces = ruby-digest
|
||||
replaces = ruby-drb
|
||||
replaces = ruby-english
|
||||
replaces = ruby-etc
|
||||
replaces = ruby-fcntl
|
||||
replaces = ruby-fiddle
|
||||
replaces = ruby-fileutils
|
||||
replaces = ruby-find
|
||||
replaces = ruby-forwardable
|
||||
replaces = ruby-getoptlong
|
||||
replaces = ruby-io-console
|
||||
replaces = ruby-io-nonblock
|
||||
replaces = ruby-io-wait
|
||||
replaces = ruby-ipaddr
|
||||
replaces = ruby-json
|
||||
replaces = ruby-logger
|
||||
replaces = ruby-mutex_m
|
||||
replaces = ruby-net-http
|
||||
replaces = ruby-open-uri
|
||||
replaces = ruby-psych
|
||||
replaces = ruby-reline
|
||||
replaces = ruby-ruby2_keywords
|
||||
replaces = ruby-set
|
||||
replaces = ruby-stringio
|
||||
replaces = ruby-time
|
||||
replaces = ruby-tmpdir
|
||||
replaces = ruby-uri
|
||||
|
||||
pkgname = ruby-docs
|
||||
pkgdesc = Documentation files for Ruby
|
||||
|
||||
pkgname = ruby-default-gems
|
||||
pkgdesc = Default gems which are part of Ruby StdLib
|
||||
depends = ruby-bundler
|
||||
depends = ruby-erb
|
||||
depends = ruby-irb
|
||||
depends = ruby-racc
|
||||
depends = ruby-rdoc
|
||||
depends = ruby-rubygems
|
||||
|
||||
pkgname = ruby-bundled-gems
|
||||
pkgdesc = Bundled gems which are part of Ruby StdLib
|
||||
depends = ruby-debug
|
||||
depends = ruby-matrix
|
||||
depends = ruby-minitest
|
||||
depends = ruby-net-ftp
|
||||
depends = ruby-net-imap
|
||||
depends = ruby-net-pop
|
||||
depends = ruby-net-smtp
|
||||
depends = ruby-power_assert
|
||||
depends = ruby-prime
|
||||
depends = ruby-rake
|
||||
depends = ruby-rbs
|
||||
depends = ruby-rexml
|
||||
depends = ruby-rss
|
||||
depends = ruby-test-unit
|
||||
depends = ruby-typeprof
|
||||
conflicts = ruby-bundledgems
|
||||
replaces = ruby-bundledgems
|
||||
|
||||
pkgname = ruby-stdlib
|
||||
pkgdesc = Full Ruby StdLib including default gems, bundled gems and tools
|
||||
depends = ruby-default-gems
|
||||
depends = ruby-bundled-gems
|
7
extra/ruby/.nvchecker.toml
Normal file
7
extra/ruby/.nvchecker.toml
Normal file
|
@ -0,0 +1,7 @@
|
|||
[ruby]
|
||||
source = "git"
|
||||
git = "https://github.com/ruby/ruby.git"
|
||||
prefix = "v"
|
||||
from_pattern = "([0-9]+)_([0-9]+)_([0-9]+)"
|
||||
to_pattern = "\\1.\\2.\\3"
|
||||
exclude_regex = ".+(rc|preview).+"
|
|
@ -6,36 +6,181 @@
|
|||
# Contributor: John Proctor <jproctor@prium.net>
|
||||
# Contributor: Jeramy Rutley <jrutley@gmail.com>
|
||||
|
||||
# Do not re-package default gems (see https://stdgems.org/). Trying to do that will lead to multiple problems
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - generalize arch-dependent removal of gem remains
|
||||
|
||||
pkgname=(ruby ruby-docs ruby-stdlib ruby-bundledgems)
|
||||
pkgver=3.0.6
|
||||
pkgname=(
|
||||
ruby
|
||||
ruby-docs
|
||||
ruby-default-gems
|
||||
ruby-bundled-gems
|
||||
ruby-stdlib
|
||||
)
|
||||
pkgver=3.2.4
|
||||
pkgrel=1
|
||||
arch=(x86_64)
|
||||
pkgdesc='An object-oriented language for quick and easy programming'
|
||||
url='https://www.ruby-lang.org/en/'
|
||||
license=(BSD custom)
|
||||
makedepends=(doxygen gdbm graphviz libffi libyaml openssl ttf-dejavu tk)
|
||||
options=(!emptydirs !lto) # Disable LTO until fixes for https://bugs.ruby-lang.org/issues/18062 released
|
||||
_osslver=3.0.0
|
||||
source=(https://cache.ruby-lang.org/pub/ruby/${pkgver:0:3}/ruby-${pkgver}.tar.xz
|
||||
ruby-openssl-$_osslver.tar.xz::https://github.com/ruby/openssl/archive/refs/tags/v$_osslver.tar.gz)
|
||||
sha512sums=('abbf883cd9f3ddbd171df8f8c3cd35d930623c4c01a5e01387de0aee9811cca7604b82163e18e04f809773bf1ca5a450f13f62f3db14f191f610e116ae4fa6f8'
|
||||
'076d2924b61c4f7704b47718a33732fb5285a3af39f328ed9e83add36589da99dfae73b3e893398fc3f2a74dcbead0b66edc682040fa1b48f9530894c7187f95')
|
||||
b2sums=('e1fca86cdf267fc2289ef4d605fdf0023265c3a291ca4088361c0acd64310a7c41bf0750b4ac762157c20ceaa5df8bdc0a67374bcad9654bca5c3fc8630ff89c'
|
||||
'2eeb64caf188d79137686a8c5f0aa9d27860b3a3da8e0d4082f749beaa600928d814fe8cd70a6921358066603ce453d92838c1bce32509574ea333b6ca567fc8')
|
||||
arch=(x86_64)
|
||||
license=(BSD-2-Clause)
|
||||
makedepends=(
|
||||
doxygen
|
||||
gcc-libs
|
||||
gdbm
|
||||
glibc
|
||||
gmp
|
||||
graphviz
|
||||
libffi
|
||||
libxcrypt
|
||||
libyaml
|
||||
openssl
|
||||
readline
|
||||
rust
|
||||
tk
|
||||
zlib
|
||||
)
|
||||
checkdepends=(
|
||||
inetutils
|
||||
procps-ng
|
||||
)
|
||||
options=('!emptydirs')
|
||||
source=(
|
||||
"https://cache.ruby-lang.org/pub/ruby/${pkgver:0:3}/ruby-${pkgver}.tar.xz"
|
||||
ruby-3.2-openssl-3.3-fix.patch::https://github.com/ruby/ruby/commit/dd5e625d7bcb7dc849fdbc2ad8053f9c2724efb4.patch
|
||||
)
|
||||
sha512sums=('fb0af37be4b6ad7b98ab9f8a508952238ee68b5828e3926331e4db52e2ebc1e6046f31114069322db0cd3bea7c9b82ace91c8564573ddcfa1f960877b237dbff'
|
||||
'52351374fc9aa9c3576bfb4b62df1d1d8dbe7327270a4d1c5777d247a33d6e6528b08a537fc4c87d9d0cc54b4b9183848f6c54d54fc727871b3e511b7a73ddb7')
|
||||
b2sums=('9c2300a958b03528d51f0d74a069c8c538ca4009835d55377509a000bcfb43893a8a80d8fda57011e77c72e6283cb259281d5ba7b37444546e49f2a9ad515cf3'
|
||||
'1ee662e57f9f29b4ab29b391b38b988a8b5c199e62c815353c3a47e6eceea910344c7d9a00512916e05b6404efddf941313dfdcb0bec027f7f668443309228b9')
|
||||
|
||||
_bootstrap=0
|
||||
_rubyver="${pkgver:0:3}.0"
|
||||
_bundled_gems=(
|
||||
debug
|
||||
matrix
|
||||
minitest
|
||||
net-ftp
|
||||
net-imap
|
||||
net-pop
|
||||
net-smtp
|
||||
power_assert
|
||||
prime
|
||||
rake
|
||||
rbs
|
||||
rexml
|
||||
rss
|
||||
test-unit
|
||||
typeprof
|
||||
)
|
||||
_bundled_gems_bins=(
|
||||
rake
|
||||
rbs
|
||||
rdbg
|
||||
typeprof
|
||||
)
|
||||
_default_gems=(
|
||||
abbrev
|
||||
base64
|
||||
benchmark
|
||||
bigdecimal
|
||||
cgi
|
||||
csv
|
||||
date
|
||||
delegate
|
||||
did_you_mean
|
||||
digest
|
||||
drb
|
||||
english
|
||||
error_highlight
|
||||
etc
|
||||
fcntl
|
||||
fiddle
|
||||
fileutils
|
||||
find
|
||||
forwardable
|
||||
getoptlong
|
||||
io-console
|
||||
io-nonblock
|
||||
io-wait
|
||||
ipaddr
|
||||
json
|
||||
logger
|
||||
mutex_m
|
||||
net-http
|
||||
net-protocol
|
||||
nkf
|
||||
observer
|
||||
open-uri
|
||||
open3
|
||||
openssl
|
||||
optparse
|
||||
ostruct
|
||||
pathname
|
||||
pp
|
||||
prettyprint
|
||||
pstore
|
||||
psych
|
||||
readline
|
||||
readline-ext
|
||||
reline
|
||||
resolv
|
||||
resolv-replace
|
||||
rinda
|
||||
ruby2_keywords
|
||||
securerandom
|
||||
set
|
||||
shellwords
|
||||
singleton
|
||||
stringio
|
||||
strscan
|
||||
syntax_suggest
|
||||
syslog
|
||||
tempfile
|
||||
time
|
||||
timeout
|
||||
tmpdir
|
||||
tsort
|
||||
un
|
||||
uri
|
||||
weakref
|
||||
yaml
|
||||
zlib
|
||||
)
|
||||
_default_tool_gems=(
|
||||
bundler
|
||||
erb
|
||||
irb
|
||||
racc
|
||||
rdoc
|
||||
rubygems
|
||||
)
|
||||
_default_tool_gems_bins=(
|
||||
bundle
|
||||
bundler
|
||||
erb
|
||||
gem
|
||||
irb
|
||||
racc
|
||||
rdoc
|
||||
ri
|
||||
)
|
||||
|
||||
prepare() {
|
||||
cd ruby-${pkgver}
|
||||
rm -rf ext/openssl test/openssl
|
||||
mv ../openssl-$_osslver/ext/openssl ext
|
||||
mv ../openssl-$_osslver/lib ext/openssl
|
||||
mv ../openssl-$_osslver/{History.md,openssl.gemspec} ext/openssl
|
||||
mv ../openssl-$_osslver/test/openssl test
|
||||
cd "ruby-${pkgver}"
|
||||
|
||||
# ignore test_session_reuse_but_expire test for openssl version 3.3
|
||||
sed -i "s/3.2./3.3./g" test/net/http/test_https.rb
|
||||
|
||||
patch -Np1 < ../ruby-3.2-openssl-3.3-fix.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ruby-${pkgver}
|
||||
cd "ruby-${pkgver}"
|
||||
|
||||
# this uses malloc_usable_size, which is incompatible with fortification level 3
|
||||
export CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
|
||||
export CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
|
||||
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
|
@ -51,242 +196,182 @@ build() {
|
|||
}
|
||||
|
||||
check() {
|
||||
cd ruby-${pkgver}
|
||||
cd "ruby-${pkgver}"
|
||||
|
||||
make test
|
||||
# this uses malloc_usable_size, which is incompatible with fortification level 3
|
||||
export CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
|
||||
export CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
|
||||
|
||||
make check
|
||||
}
|
||||
|
||||
package_ruby() {
|
||||
pkgdesc='An object-oriented language for quick and easy programming'
|
||||
depends=(gdbm openssl libffi libyaml libxcrypt gmp zlib rubygems ruby-stdlib ruby-bundledgems)
|
||||
optdepends=(
|
||||
'ruby-docs: Ruby documentation'
|
||||
'tk: for Ruby/TK'
|
||||
)
|
||||
|
||||
cd ruby-${pkgver}
|
||||
|
||||
make DESTDIR="${pkgdir}" install-nodoc
|
||||
|
||||
install -D -m644 COPYING "${pkgdir}/usr/share/licenses/ruby/LICENSE"
|
||||
install -D -m644 BSDL "${pkgdir}/usr/share/licenses/ruby/BSDL"
|
||||
|
||||
rubyver=${pkgver:0:3}.0
|
||||
|
||||
# remove rubygems as it shipped as a separate package
|
||||
rm -r "${pkgdir}"/usr/lib/ruby/${rubyver}/{rubygems,rubygems.rb}
|
||||
rm "${pkgdir}"/usr/bin/gem
|
||||
|
||||
# remove bundler as it shipped as a separate package
|
||||
rm "${pkgdir}"/usr/bin/{bundle,bundler}
|
||||
|
||||
# remove bundled rdoc gem
|
||||
rm "${pkgdir}"/usr/bin/{rdoc,ri}
|
||||
rm "${pkgdir}"/usr/share/man/man1/ri.1
|
||||
|
||||
# remove irb as it is a separate package now
|
||||
rm "${pkgdir}"/usr/bin/irb
|
||||
rm "${pkgdir}"/usr/share/man/man1/irb.1
|
||||
|
||||
# remove other binaries that are shipped as separate packages
|
||||
rm "${pkgdir}"/usr/bin/{rake,rbs,typeprof,erb,racc}
|
||||
rm "${pkgdir}"/usr/share/man/man1/erb.1
|
||||
|
||||
# remove all bundled gems to avoid conflicts with ruby-* Arch packages
|
||||
rm -r "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/gems/*
|
||||
rm "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/specifications/*.gemspec
|
||||
rm "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/cache/*.gem
|
||||
|
||||
# remove already packaged stdlib gems (needs to be as dependency in ruby-stdlib)
|
||||
local stdlib_gems=(
|
||||
abbrev
|
||||
base64
|
||||
benchmark
|
||||
bigdecimal
|
||||
bundler
|
||||
cgi
|
||||
csv
|
||||
date
|
||||
delegate
|
||||
did_you_mean
|
||||
digest
|
||||
drb
|
||||
english
|
||||
erb
|
||||
etc
|
||||
fcntl
|
||||
fiddle
|
||||
fileutils
|
||||
find
|
||||
forwardable
|
||||
getoptlong
|
||||
io-console
|
||||
io-nonblock
|
||||
io-wait
|
||||
ipaddr
|
||||
irb
|
||||
json
|
||||
logger
|
||||
mutex_m
|
||||
net-http
|
||||
open-uri
|
||||
psych
|
||||
racc
|
||||
rdoc
|
||||
reline
|
||||
stringio
|
||||
time
|
||||
tmpdir
|
||||
uri
|
||||
)
|
||||
|
||||
for stdlib_gem in "${stdlib_gems[@]}"; do
|
||||
rm --force --recursive --verbose \
|
||||
"${pkgdir}"/usr/lib/ruby/${rubyver}/${stdlib_gem} \
|
||||
"${pkgdir}"/usr/lib/ruby/${rubyver}/${stdlib_gem}.rb \
|
||||
"${pkgdir}"/usr/lib/ruby/${rubyver}/*-linux*/${stdlib_gem}.so \
|
||||
"${pkgdir}"/usr/lib/ruby/gems/${rubyver}/specifications/default/${stdlib_gem}-*.gemspec
|
||||
done
|
||||
|
||||
rm --recursive --verbose \
|
||||
"${pkgdir}"/usr/lib/ruby/${rubyver}/English.rb \
|
||||
"${pkgdir}"/usr/lib/ruby/${rubyver}/io/console \
|
||||
"${pkgdir}"/usr/lib/ruby/${rubyver}/net/http \
|
||||
"${pkgdir}"/usr/lib/ruby/${rubyver}/net/http.rb \
|
||||
"${pkgdir}"/usr/lib/ruby/${rubyver}/net/https.rb \
|
||||
"${pkgdir}"/usr/lib/ruby/${rubyver}/*-linux*/cgi \
|
||||
"${pkgdir}"/usr/lib/ruby/${rubyver}/*-linux*/date_core.so \
|
||||
"${pkgdir}"/usr/lib/ruby/${rubyver}/*-linux*/digest \
|
||||
"${pkgdir}"/usr/lib/ruby/${rubyver}/*-linux*/io/console.so \
|
||||
"${pkgdir}"/usr/lib/ruby/${rubyver}/*-linux*/io/nonblock.so \
|
||||
"${pkgdir}"/usr/lib/ruby/${rubyver}/*-linux*/io/wait.so \
|
||||
"${pkgdir}"/usr/lib/ruby/${rubyver}/*-linux*/json \
|
||||
"${pkgdir}"/usr/lib/ruby/${rubyver}/*-linux*/racc
|
||||
}
|
||||
|
||||
package_ruby-docs() {
|
||||
pkgdesc='Documentation files for ruby'
|
||||
|
||||
cd ruby-${pkgver}
|
||||
|
||||
make DESTDIR="${pkgdir}" install-doc install-capi
|
||||
|
||||
install -D -m644 COPYING "${pkgdir}/usr/share/licenses/ruby-docs/LICENSE"
|
||||
install -D -m644 BSDL "${pkgdir}/usr/share/licenses/ruby-docs/BSDL"
|
||||
}
|
||||
|
||||
package_ruby-stdlib() {
|
||||
# upstream list of gems contained in stdlib ( https://github.com/ruby/ruby/tree/master/{ext,lib} )
|
||||
pkgdesc='A vast collection of classes and modules that you can require in your code for additional features'
|
||||
|
||||
depends=(
|
||||
gcc-libs
|
||||
gdbm
|
||||
glibc
|
||||
gmp
|
||||
libffi
|
||||
libxcrypt
|
||||
libyaml
|
||||
openssl
|
||||
readline
|
||||
zlib
|
||||
)
|
||||
optdepends=(
|
||||
'tk: for Ruby/TK'
|
||||
'ruby-docs: Documentation for Ruby'
|
||||
'ruby-default-gems: Default gems which are part of Ruby StdLib'
|
||||
'ruby-bundled-gems: Bundled gems which are part of Ruby StdLib'
|
||||
'ruby-stdlib: Full Ruby StdLib including default gems, bundled gems and tools'
|
||||
)
|
||||
provides=(
|
||||
libruby.so
|
||||
)
|
||||
replaces=(
|
||||
ruby-abbrev
|
||||
ruby-base64
|
||||
ruby-benchmark
|
||||
ruby-bigdecimal
|
||||
ruby-bundler
|
||||
ruby-cgi
|
||||
ruby-csv
|
||||
ruby-date
|
||||
#ruby-dbm # removed in 3.1.2
|
||||
#ruby-debug # removed in 3.1.2
|
||||
ruby-delegate
|
||||
ruby-did_you_mean
|
||||
ruby-digest
|
||||
ruby-drb
|
||||
ruby-english
|
||||
ruby-erb
|
||||
ruby-etc
|
||||
ruby-fcntl
|
||||
ruby-fiddle
|
||||
ruby-fileutils
|
||||
ruby-find
|
||||
ruby-forwardable
|
||||
#ruby-gdbm # removed in 3.1.2
|
||||
ruby-getoptlong
|
||||
ruby-io-console
|
||||
ruby-io-nonblock
|
||||
ruby-io-wait
|
||||
ruby-ipaddr
|
||||
ruby-irb
|
||||
ruby-json
|
||||
ruby-logger
|
||||
#ruby-matrix # removed in 3.1.2
|
||||
ruby-mutex_m
|
||||
#ruby-net-ftp # removed in 3.1.2
|
||||
ruby-net-http
|
||||
#ruby-net-imap # removed in 3.1.2
|
||||
#ruby-net-pop # removed in 3.1.2
|
||||
#ruby-net-protocol
|
||||
#ruby-net-smtp # removed in 3.1.2
|
||||
#ruby-nkf
|
||||
#ruby-observer
|
||||
ruby-open-uri
|
||||
#ruby-open3
|
||||
#ruby-openssl
|
||||
#ruby-optparse
|
||||
#ruby-ostruct
|
||||
#ruby-pathname
|
||||
#ruby-pp
|
||||
#ruby-prettyprint
|
||||
#ruby-prime # removed in 3.1.2
|
||||
#ruby-pstore
|
||||
ruby-psych
|
||||
ruby-racc
|
||||
ruby-rdoc
|
||||
#ruby-readline
|
||||
#ruby-readline-ext
|
||||
ruby-reline
|
||||
#ruby-resolv
|
||||
#ruby-resolv-replace
|
||||
#ruby-rinda
|
||||
#ruby-securerandom
|
||||
#ruby-set
|
||||
#ruby-shellwords
|
||||
#ruby-singleton
|
||||
ruby-ruby2_keywords
|
||||
ruby-set
|
||||
ruby-stringio
|
||||
#ruby-strscan
|
||||
#ruby-syslog
|
||||
#ruby-tempfile
|
||||
ruby-time
|
||||
#ruby-timeout
|
||||
ruby-tmpdir
|
||||
#ruby-tracer # removed in 3.1.2
|
||||
#ruby-tsort
|
||||
#ruby-un
|
||||
ruby-uri
|
||||
#ruby-weakref
|
||||
#ruby-yaml
|
||||
#ruby-zlib
|
||||
|
||||
#ruby-error_highlight # new in 3.2.1
|
||||
#ruby2_keywords # new in 3.1.2 - already exists in [community]
|
||||
)
|
||||
conflicts=("${replaces[@]}")
|
||||
provides+=("${_default_gems[@]/#/ruby-}")
|
||||
|
||||
cd "ruby-${pkgver}"
|
||||
|
||||
make DESTDIR="${pkgdir}" install-nodoc
|
||||
|
||||
install --verbose -D --mode=0644 BSDL COPYING --target-directory "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
install --verbose -D --mode=0644 *.md --target-directory "${pkgdir}/usr/share/doc/${pkgname}"
|
||||
|
||||
# remove unrepreducible files
|
||||
rm --recursive --verbose \
|
||||
"${pkgdir}/usr/lib/ruby/gems/${_rubyver}/cache"
|
||||
|
||||
# bootstrap switch
|
||||
if (( _bootstrap )); then
|
||||
# provide everything for a bootstrap build
|
||||
# use a reference to provides to srcinfo generation isn't confused
|
||||
declare -n bootstrap_provides=provides
|
||||
bootstrap_provides+=("${_default_tool_gems[@]/#/ruby-}" rubygems)
|
||||
bootstrap_provides+=("${_bundled_gems[@]/#/ruby-}")
|
||||
declare -n bootstrap_conflicts=conflicts
|
||||
bootstrap_conflicts+=("${_default_tool_gems[@]/#/ruby-}" rubygems)
|
||||
bootstrap_conflicts+=("${_bundled_gems[@]/#/ruby-}")
|
||||
else
|
||||
# remove de-vendored parts
|
||||
_remove_default_tool_gems
|
||||
_remove_bundled_gems
|
||||
# add standard dependencies
|
||||
depends+=(
|
||||
rubygems
|
||||
)
|
||||
fi
|
||||
}
|
||||
|
||||
package_ruby-bundledgems() {
|
||||
# upstream list of bundled gems ( https://github.com/ruby/ruby/blob/master/gems/bundled_gems )
|
||||
pkgdesc='Ruby Gems (third-party libraries) that are installed by default when Ruby is installed'
|
||||
# remove bundled gems - they are provided as dedicated packages
|
||||
_remove_bundled_gems() {
|
||||
local gem bin
|
||||
for gem in "${_bundled_gems[@]}"; do
|
||||
msg2 "removing bundled gem ${gem}"
|
||||
rm --recursive --verbose \
|
||||
"${pkgdir}/usr/lib/ruby/gems/${_rubyver}/gems/${gem}"-* \
|
||||
"${pkgdir}/usr/lib/ruby/gems/${_rubyver}/specifications/${gem}"-*.gemspec
|
||||
rm --recursive --verbose --force \
|
||||
"${pkgdir}/usr/lib/ruby/gems/${_rubyver}/extensions"/*-linux*/"${_rubyver}/${gem}"-*
|
||||
done
|
||||
for bin in "${_bundled_gems_bins[@]}"; do
|
||||
rm --recursive --verbose "${pkgdir}/usr/bin/${bin}"
|
||||
rm --recursive --verbose --force "${pkgdir}/usr/share/man/man1/${bin}.1"
|
||||
done
|
||||
|
||||
depends=(
|
||||
ruby-minitest
|
||||
ruby-power_assert
|
||||
ruby-rake
|
||||
#ruby-rbs
|
||||
ruby-rexml
|
||||
#ruby-rss
|
||||
ruby-test-unit
|
||||
#ruby-typeprof
|
||||
}
|
||||
|
||||
# --- new in 3.1.2
|
||||
#ruby-debug
|
||||
#ruby-matrix
|
||||
#ruby-net-ftp
|
||||
#ruby-net-imap
|
||||
#ruby-net-pop
|
||||
#ruby-net-smtp
|
||||
#ruby-prime
|
||||
)
|
||||
# remove default tool gems - they are provided as dedicated packages
|
||||
_remove_default_tool_gems() {
|
||||
local gem bin
|
||||
for gem in "${_default_tool_gems[@]}"; do
|
||||
msg2 "removing default gem ${gem}"
|
||||
rm --recursive --verbose \
|
||||
"${pkgdir}/usr/lib/ruby/${_rubyver}/${gem}"*
|
||||
if [[ ${gem} != rubygems ]]; then
|
||||
rm --recursive --verbose \
|
||||
"${pkgdir}/usr/lib/ruby/gems/${_rubyver}/gems/${gem}"-* \
|
||||
"${pkgdir}/usr/lib/ruby/gems/${_rubyver}/specifications/default/${gem}"-*.gemspec
|
||||
fi
|
||||
rm --recursive --verbose --force \
|
||||
"${pkgdir}/usr/lib/ruby/${_rubyver}"/*-linux*/"${gem}"
|
||||
done
|
||||
for bin in "${_default_tool_gems_bins[@]}"; do
|
||||
rm --recursive --verbose "${pkgdir}/usr/bin/${bin}"
|
||||
rm --recursive --verbose --force "${pkgdir}/usr/share/man/man1/${bin}.1"
|
||||
done
|
||||
}
|
||||
|
||||
package_ruby-docs() {
|
||||
pkgdesc='Documentation files for Ruby'
|
||||
|
||||
cd "ruby-${pkgver}"
|
||||
make DESTDIR="${pkgdir}" install-doc install-capi
|
||||
install --verbose -D --mode=0644 BSDL COPYING --target-directory "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
}
|
||||
|
||||
package_ruby-bundled-gems() {
|
||||
pkgdesc='Bundled gems which are part of Ruby StdLib'
|
||||
replaces=(ruby-bundledgems)
|
||||
conflicts=(ruby-bundledgems)
|
||||
depends=("${_bundled_gems[@]/#/ruby-}")
|
||||
|
||||
cd "ruby-${pkgver}"
|
||||
install --verbose -D --mode=0644 BSDL COPYING --target-directory "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
}
|
||||
|
||||
package_ruby-default-gems() {
|
||||
pkgdesc='Default gems which are part of Ruby StdLib'
|
||||
depends=("${_default_tool_gems[@]/#/ruby-}")
|
||||
|
||||
cd "ruby-${pkgver}"
|
||||
install --verbose -D --mode=0644 BSDL COPYING --target-directory "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
}
|
||||
|
||||
package_ruby-stdlib() {
|
||||
pkgdesc='Full Ruby StdLib including default gems, bundled gems and tools'
|
||||
depends=(ruby-default-gems ruby-bundled-gems)
|
||||
|
||||
cd "ruby-${pkgver}"
|
||||
install --verbose -D --mode=0644 BSDL COPYING --target-directory "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
}
|
||||
|
||||
# vim: tabstop=2 shiftwidth=2 expandtab:
|
||||
|
|
87
extra/ruby/README.md
Normal file
87
extra/ruby/README.md
Normal file
|
@ -0,0 +1,87 @@
|
|||
# Ruby Packaging
|
||||
|
||||
## Bootstrap
|
||||
|
||||
To transition to a new language version of Ruby like 3.2 to 3.3, the process
|
||||
involves three main phases: initial bootstrapping with a non-de-vendored Ruby,
|
||||
rebuilding a base set of Ruby packages using a production build, and finally, a
|
||||
comprehensive rebuild of all existing Ruby-dependent packages in the correct
|
||||
sequence.
|
||||
|
||||
### bundled gem compatibility
|
||||
|
||||
A list of compatible bundled gem versions for packaging can be found at
|
||||
<https://stdgems.org>. The de-vendored packages should make sure to be
|
||||
compatible to the ruby version.
|
||||
|
||||
### bootstrap packages
|
||||
|
||||
The bootstrapping phase starts with the creation of a minimal set of bootstrap
|
||||
packages, crucially including a non-de-vendored version of Ruby. This step aims
|
||||
to establish a foundational Ruby environment that is capable of supporting the
|
||||
compilation and installation of more complex Ruby applications and libraries.
|
||||
It’s essential that this version of Ruby is non-de-vendored to ensure that all
|
||||
components required for further package dependencies are available and
|
||||
functional.
|
||||
|
||||
Build the following packages in the given order:
|
||||
|
||||
- ruby `_bootstrap=1 pkgrel=0`
|
||||
- rubygems `--nocheck`
|
||||
- ruby-rake
|
||||
- ruby-hoe
|
||||
- ruby-kpeg
|
||||
- ruby-rdoc
|
||||
- ruby-irb
|
||||
- ruby-power_assert `--nocheck`
|
||||
- ruby-test-unit
|
||||
- ruby-webrick
|
||||
- ruby-erb `--nocheck`
|
||||
|
||||
### base set
|
||||
|
||||
Following the initial setup, the next step involves the rebuilding of a
|
||||
specific chain of Ruby packages using a production build of Ruby. This
|
||||
production build should be a de-vendored version of Ruby, intended for
|
||||
deployment. The purpose of this phase is to compile a full base set of Ruby
|
||||
packages that are ready for consumption. This includes key libraries and tools
|
||||
necessary for the broader Ruby ecosystem.
|
||||
|
||||
Build the following packages in the given order:
|
||||
|
||||
- ruby `_bootstrap=0`
|
||||
- rubygems
|
||||
- ruby-rake
|
||||
- ruby-bundler
|
||||
- ruby-webrick
|
||||
- ruby-rake-compiler
|
||||
- ruby-erb
|
||||
- ruby-power_assert
|
||||
- ruby-test-unit
|
||||
- ruby-diff-lcs
|
||||
- ruby-rspec-support
|
||||
- ruby-rspec-core
|
||||
- ruby-rspec-expectations
|
||||
- ruby-rspec-mocks
|
||||
- ruby-rspec
|
||||
- ruby-rr `--nocheck`
|
||||
- ruby-test-unit-rr
|
||||
- ruby-rr
|
||||
- ruby-debug
|
||||
- ruby-irb
|
||||
- ruby-minitest
|
||||
- ruby-hoe
|
||||
- ruby-kpeg
|
||||
- ruby-racc
|
||||
- ruby-rdoc
|
||||
- ruby-typeprof
|
||||
|
||||
### rebuild all packages
|
||||
|
||||
The final step in upgrading to a new language version of Ruby is the comprehensive
|
||||
rebuild of all existing packages that depend on Ruby, in their appropriate
|
||||
sequential order. This step is critical to ensure that all applications and
|
||||
libraries are compatible with the new Ruby version. This rebuild must be
|
||||
carefully managed to maintain dependency integrity.
|
||||
|
||||
- rebuild all packages in order
|
Loading…
Reference in a new issue