mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
74 lines
2.8 KiB
Bash
74 lines
2.8 KiB
Bash
# 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
|
|
pkgver=2.7.7
|
|
pkgrel=1
|
|
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)
|
|
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
|
|
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
|
|
0001-Use-only-unsigned-long-for-rb_serial_t.patch)
|
|
sha512sums=('a19be3f0dfce040fe79f439e606f179d6750d2cc6e7b64fd65933edd487f5995573f7d0730beec9d3edadf942f8e9216f01ab3fff189d6cbe9d46a9add3e2683'
|
|
'914dec716bbc9d0e7c7e7f76e599fc545f4adcc7f84a16c31e6b8badc3556dfa1c21c4a5fe1d04cf3fc2d3930cc769c34f4b5f638404f7c023bffdb49a33bef0'
|
|
'076d2924b61c4f7704b47718a33732fb5285a3af39f328ed9e83add36589da99dfae73b3e893398fc3f2a74dcbead0b66edc682040fa1b48f9530894c7187f95'
|
|
'ae1a9e00ab3bfb1bf29cda872ddf6d64dd6ec5745bd25f00e3692a1d769dd81bbce8921ed63e0f5776ec3e610655087b739fde26ede9649c6c2e095b27381926')
|
|
|
|
prepare() {
|
|
cd ruby-${pkgver}
|
|
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
|
|
|
|
# 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/
|
|
}
|