1 # Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>
2 # Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
3 # Maintainer: Tim Meusel <tim@bastelfreak.de>
4 # Contributor: Thomas Dziedzic <gostrc@gmail.com>
5 # Contributor: Allan McRae <allan@archlinux.org>
6 # Contributor: John Proctor <jproctor@prium.net>
7 # Contributor: Jeramy Rutley <jrutley@gmail.com>
9 pkgname=(ruby ruby-docs ruby-stdlib ruby-bundledgems)
13 url='https://www.ruby-lang.org/en/'
15 makedepends=(doxygen gdbm graphviz libffi libyaml openssl ttf-dejavu tk)
16 options=(!emptydirs !lto) # Disable LTO until fixes for https://bugs.ruby-lang.org/issues/18062 released
18 source=(https://cache.ruby-lang.org/pub/ruby/${pkgver:0:3}/ruby-${pkgver}.tar.xz
19 ruby-openssl-$_osslver.tar.xz::https://github.com/ruby/openssl/archive/refs/tags/v$_osslver.tar.gz)
20 sha512sums=('1c69d18210a2156f7696c678a8d54bf05c4dc49a1401c1ecc5760b1c23fb6ac14053873a225564664d6a327cda274ce72f47d112a6ad8d378f978de4e507e9a0'
21 '076d2924b61c4f7704b47718a33732fb5285a3af39f328ed9e83add36589da99dfae73b3e893398fc3f2a74dcbead0b66edc682040fa1b48f9530894c7187f95')
22 b2sums=('581aa202f6b1b5c72bb18d486c4f74ec87a6c2dd38166c4841b75dba891aabd72c3889b158134b04763cddb22c0f60015f4d21c5130077053e1fcb13e28a8024'
23 '2eeb64caf188d79137686a8c5f0aa9d27860b3a3da8e0d4082f749beaa600928d814fe8cd70a6921358066603ce453d92838c1bce32509574ea333b6ca567fc8')
27 rm -rf ext/openssl test/openssl
28 mv ../openssl-$_osslver/ext/openssl ext
29 mv ../openssl-$_osslver/lib ext/openssl
30 mv ../openssl-$_osslver/{History.md,openssl.gemspec} ext/openssl
31 mv ../openssl-$_osslver/test/openssl test
40 --localstatedir=/var \
41 --sharedstatedir=/var/lib \
42 --libexecdir=/usr/lib/ruby \
45 --with-dbm-type=gdbm_compat
57 pkgdesc='An object-oriented language for quick and easy programming'
58 depends=(gdbm openssl libffi libyaml libxcrypt gmp zlib rubygems ruby-stdlib ruby-bundledgems)
60 'ruby-docs: Ruby documentation'
66 make DESTDIR="${pkgdir}" install-nodoc
68 install -D -m644 COPYING "${pkgdir}/usr/share/licenses/ruby/LICENSE"
69 install -D -m644 BSDL "${pkgdir}/usr/share/licenses/ruby/BSDL"
71 rubyver=${pkgver:0:3}.0
73 # remove rubygems as it shipped as a separate package
74 rm -r "${pkgdir}"/usr/lib/ruby/${rubyver}/{rubygems,rubygems.rb}
75 rm "${pkgdir}"/usr/bin/gem
77 # remove bundler as it shipped as a separate package
78 rm "${pkgdir}"/usr/bin/{bundle,bundler}
80 # remove bundled rdoc gem
81 rm "${pkgdir}"/usr/bin/{rdoc,ri}
82 rm "${pkgdir}"/usr/share/man/man1/ri.1
84 # remove irb as it is a separate package now
85 rm "${pkgdir}"/usr/bin/irb
86 rm "${pkgdir}"/usr/share/man/man1/irb.1
88 # remove other binaries that are shipped as separate packages
89 rm "${pkgdir}"/usr/bin/{rake,rbs,typeprof,erb,racc}
90 rm "${pkgdir}"/usr/share/man/man1/erb.1
92 # remove all bundled gems to avoid conflicts with ruby-* Arch packages
93 rm -r "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/gems/*
94 rm "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/specifications/*.gemspec
95 rm "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/cache/*.gem
97 # remove already packaged stdlib gems (needs to be as dependency in ruby-stdlib)
140 for stdlib_gem in "${stdlib_gems[@]}"; do
141 rm --force --recursive --verbose \
142 "${pkgdir}"/usr/lib/ruby/${rubyver}/${stdlib_gem} \
143 "${pkgdir}"/usr/lib/ruby/${rubyver}/${stdlib_gem}.rb \
144 "${pkgdir}"/usr/lib/ruby/${rubyver}/x86_64-linux/${stdlib_gem}.so \
145 "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/specifications/default/${stdlib_gem}-*.gemspec
148 rm --recursive --verbose \
149 "${pkgdir}"/usr/lib/ruby/${rubyver}/English.rb \
150 "${pkgdir}"/usr/lib/ruby/${rubyver}/io/console \
151 "${pkgdir}"/usr/lib/ruby/${rubyver}/net/http \
152 "${pkgdir}"/usr/lib/ruby/${rubyver}/net/http.rb \
153 "${pkgdir}"/usr/lib/ruby/${rubyver}/net/https.rb \
154 "${pkgdir}"/usr/lib/ruby/${rubyver}/x86_64-linux/cgi \
155 "${pkgdir}"/usr/lib/ruby/${rubyver}/x86_64-linux/date_core.so \
156 "${pkgdir}"/usr/lib/ruby/${rubyver}/x86_64-linux/digest \
157 "${pkgdir}"/usr/lib/ruby/${rubyver}/x86_64-linux/io/console.so \
158 "${pkgdir}"/usr/lib/ruby/${rubyver}/x86_64-linux/io/nonblock.so \
159 "${pkgdir}"/usr/lib/ruby/${rubyver}/x86_64-linux/io/wait.so \
160 "${pkgdir}"/usr/lib/ruby/${rubyver}/x86_64-linux/json \
161 "${pkgdir}"/usr/lib/ruby/${rubyver}/x86_64-linux/racc
164 package_ruby-docs() {
165 pkgdesc='Documentation files for ruby'
169 make DESTDIR="${pkgdir}" install-doc install-capi
171 install -D -m644 COPYING "${pkgdir}/usr/share/licenses/ruby-docs/LICENSE"
172 install -D -m644 BSDL "${pkgdir}/usr/share/licenses/ruby-docs/BSDL"
175 package_ruby-stdlib() {
176 # upstream list of gems contained in stdlib ( https://github.com/ruby/ruby/tree/master/{ext,lib} )
177 pkgdesc='A vast collection of classes and modules that you can require in your code for additional features'
188 #ruby-dbm # removed in 3.1.2
189 #ruby-debug # removed in 3.1.2
202 #ruby-gdbm # removed in 3.1.2
211 #ruby-matrix # removed in 3.1.2
213 #ruby-net-ftp # removed in 3.1.2
215 #ruby-net-imap # removed in 3.1.2
216 #ruby-net-pop # removed in 3.1.2
218 #ruby-net-smtp # removed in 3.1.2
229 #ruby-prime # removed in 3.1.2
251 #ruby-tracer # removed in 3.1.2
259 #ruby-error_highlight # new in 3.2.1
260 #ruby2_keywords # new in 3.1.2 - already exists in [community]
264 package_ruby-bundledgems() {
265 # upstream list of bundled gems ( https://github.com/ruby/ruby/blob/master/gems/bundled_gems )
266 pkgdesc='Ruby Gems (third-party libraries) that are installed by default when Ruby is installed'
289 # vim: tabstop=2 shiftwidth=2 expandtab: