PKGBUILDs/community/ruby2.7/PKGBUILD

75 lines
2.8 KiB
Bash
Raw Normal View History

2021-04-14 18:45:15 +00:00
# Contributor: Thomas Dziedzic <gostrc@gmail.com>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: John Proctor <jproctor@prium.net>
# Contributor: Jeramy Rutley <jrutley@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - patch to fix running ruby on 32-bit ARM
pkgname=ruby2.7
2023-01-07 21:36:37 +00:00
pkgver=2.7.7
pkgrel=1
2021-04-14 18:45:15 +00:00
arch=(x86_64)
pkgdesc='An object-oriented language for quick and easy programming, version 2.7'
url='https://www.ruby-lang.org/en/'
license=(BSD custom)
depends=(libxcrypt gdbm openssl libffi libyaml gmp zlib)
optdepends=(
'tk: for Ruby/TK'
)
makedepends=(tk)
2022-04-13 00:24:44 +00:00
options=(!emptydirs !lto) # Disable LTO until fixes for https://bugs.ruby-lang.org/issues/18062 released
2022-11-05 02:40:50 +00:00
_osslver=3.0.0
2021-04-14 18:45:15 +00:00
source=(https://cache.ruby-lang.org/pub/ruby/${pkgver:0:3}/ruby-${pkgver}.tar.xz
2022-11-05 02:40:50 +00:00
ruby2.7-do-not-depend-on-ext-openssl-deprecation-rb.patch::https://github.com/ruby/ruby/commit/28f3e038805a4f396f228c6884c531677c075867.patch
ruby-openssl-$_osslver.tar.xz::https://github.com/ruby/openssl/archive/refs/tags/v$_osslver.tar.gz
2021-04-14 18:45:15 +00:00
0001-Use-only-unsigned-long-for-rb_serial_t.patch)
2023-01-07 21:36:37 +00:00
sha512sums=('a19be3f0dfce040fe79f439e606f179d6750d2cc6e7b64fd65933edd487f5995573f7d0730beec9d3edadf942f8e9216f01ab3fff189d6cbe9d46a9add3e2683'
2022-11-05 02:40:50 +00:00
'914dec716bbc9d0e7c7e7f76e599fc545f4adcc7f84a16c31e6b8badc3556dfa1c21c4a5fe1d04cf3fc2d3930cc769c34f4b5f638404f7c023bffdb49a33bef0'
'076d2924b61c4f7704b47718a33732fb5285a3af39f328ed9e83add36589da99dfae73b3e893398fc3f2a74dcbead0b66edc682040fa1b48f9530894c7187f95'
2021-04-14 18:45:15 +00:00
'ae1a9e00ab3bfb1bf29cda872ddf6d64dd6ec5745bd25f00e3692a1d769dd81bbce8921ed63e0f5776ec3e610655087b739fde26ede9649c6c2e095b27381926')
prepare() {
cd ruby-${pkgver}
2022-11-05 02:40:50 +00:00
patch -Np1 -i ../ruby2.7-do-not-depend-on-ext-openssl-deprecation-rb.patch
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
2021-04-14 18:45:15 +00:00
# fixes https://bugs.ruby-lang.org/issues/9507
[[ $CARCH == 'arm' ]] && patch -Np1 -i ../0001-Use-only-unsigned-long-for-rb_serial_t.patch || true
}
build() {
cd ruby-${pkgver}
./configure \
--prefix=/usr \
--program-suffix=-2.7 \
--with-soname=ruby-2.7 \
--sysconfdir=/etc \
--localstatedir=/var \
--sharedstatedir=/var/lib \
--libexecdir=/usr/lib/ruby \
--enable-shared \
--disable-rpath \
--with-dbm-type=gdbm_compat \
--disable-install-doc
make
}
package() {
cd ruby-${pkgver}
make DESTDIR="${pkgdir}" install-nodoc
install -D -m644 COPYING "${pkgdir}/usr/share/licenses/ruby2.7/LICENSE"
install -D -m644 BSDL "${pkgdir}/usr/share/licenses/ruby2.7/BSDL"
# remove files conflicting with 'ruby' package
rm -r "$pkgdir"/usr/share/man/
}