2017-01-15 23:42:04 +00:00
|
|
|
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
|
|
|
|
# Contributor: Sergey Shatunov <me@prok.pw>
|
|
|
|
# Contributor: Jonne Haß <me@jhass.eu>
|
|
|
|
# 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 v5 (#705)
|
|
|
|
|
|
|
|
_rubyver=2.3
|
|
|
|
pkgname=ruby2.3
|
2017-04-24 18:59:26 +00:00
|
|
|
pkgver=${_rubyver}.4
|
2017-01-15 23:42:04 +00:00
|
|
|
pkgdesc='An object-oriented language for quick and easy programming'
|
2017-04-24 18:59:26 +00:00
|
|
|
pkgrel=2
|
2017-01-15 23:42:04 +00:00
|
|
|
arch=(i686 x86_64)
|
|
|
|
url='http://www.ruby-lang.org/en/'
|
|
|
|
license=(BSD custom)
|
2017-04-24 18:59:26 +00:00
|
|
|
depends=(gdbm openssl-1.0 libffi libyaml gmp zlib)
|
2017-01-15 23:42:04 +00:00
|
|
|
optdepends=('tk: for Ruby/TK')
|
2017-04-24 18:59:26 +00:00
|
|
|
makedepends=(gdbm openssl-1.0 libffi doxygen graphviz libyaml ttf-dejavu tk)
|
2017-01-15 23:42:04 +00:00
|
|
|
options=(!emptydirs)
|
|
|
|
source=(https://cache.ruby-lang.org/pub/ruby/${pkgver:0:3}/ruby-${pkgver}.tar.xz
|
|
|
|
0002-Use-only-unsigned-long-for-rb_serial_t.patch)
|
2017-04-24 18:59:26 +00:00
|
|
|
sha512sums=('9e3adc2de6703e50e75db37db2981006d4c69759929d61db6a0d63627cfe5977d0ad66d2c69d7161cfc0c0d1c2cb38e5181a06ccd2790df2f72ec25c2ad01e02'
|
|
|
|
'5b3a73b66ed35eb25997109076ec3146ff5f7f843b2e39e7a15b32349c3b38c6035668e8b5d6dd94d97030dea52187e481e8ccdcb6bfc7a79bb12043a322711e')
|
2017-01-15 23:42:04 +00:00
|
|
|
|
|
|
|
build() {
|
|
|
|
cd ruby-${pkgver}
|
|
|
|
|
2017-04-24 18:59:26 +00:00
|
|
|
export PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig
|
2017-03-16 18:54:57 +00:00
|
|
|
|
2017-01-15 23:42:04 +00:00
|
|
|
# fixes https://bugs.ruby-lang.org/issues/9507
|
|
|
|
[[ $CARCH == 'arm' ]] && patch -Np1 -i ../0002-Use-only-unsigned-long-for-rb_serial_t.patch
|
|
|
|
|
|
|
|
PKG_CONFIG=/usr/bin/pkg-config ./configure \
|
|
|
|
--prefix=/opt/ruby${_rubyver} \
|
|
|
|
--program-suffix=-${_rubyver} \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--sharedstatedir=/var/lib \
|
|
|
|
--libexecdir=/usr/lib/ruby \
|
|
|
|
--enable-shared \
|
|
|
|
--disable-rpath \
|
|
|
|
--with-dbm-type=gdbm_compat
|
|
|
|
|
|
|
|
make ruby
|
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
|
|
|
cd ruby-${pkgver}
|
|
|
|
|
|
|
|
make test
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd ruby-${pkgver}
|
|
|
|
|
|
|
|
make DESTDIR="${pkgdir}" install-nodoc
|
|
|
|
|
|
|
|
install -dm755 $pkgdir/usr/bin
|
|
|
|
install -dm755 $pkgdir/usr/lib
|
|
|
|
|
|
|
|
for i in erb irb rdoc ri ruby testrb rake gem; do
|
|
|
|
ln -s /opt/$pkgname/bin/$i-${_rubyver} $pkgdir/usr/bin/$i-${_rubyver}
|
|
|
|
ln -s /opt/$pkgname/bin/$i-${_rubyver} $pkgdir/opt/$pkgname/bin/$i
|
|
|
|
done
|
|
|
|
|
|
|
|
ln -s /opt/$pkgname/lib/libruby.so.${_rubyver} $pkgdir/usr/lib/libruby.so.${_rubyver}
|
|
|
|
|
|
|
|
install -D -m644 COPYING "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
|
|
|
|
install -D -m644 BSDL "${pkgdir}/usr/share/licenses/$pkgname/BSDL"
|
|
|
|
}
|