123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536 |
- # Maintainer: Luke T. Shumaker <lukeshu@parabola.nu>
- # Contributor: Omar Vega Ramos <ovruni@gnu.org.pe>
- # Contributor: Daniel Milewski <niitotantei@riseup.net>
- # Contributor: André Silva <emulatorman@hyperbola.info>
- # Contributor: fauno <fauno@parabola.nu>
- # Maintainer (arch): Anatol Pomozov <anatol.pomozov@gmail.com>
- # Maintainer (arch): Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
- # Maintainer (arch): Tim Meusel <tim@bastelfreak.de>
- # Contributor (arch): Thomas Dziedzic <gostrc@gmail.com>
- # Contributor (arch): Allan McRae <allan@archlinux.org>
- # Contributor (arch): John Proctor <jproctor@prium.net>
- # Contributor (arch): Jeramy Rutley <jrutley@gmail.com>
- # Parabola changes and rationale:
- #
- # FSDG:
- # - replace non-free 'generator.c' in bundled JSON extension
- # https://labs.parabola.nu/issues/674
- # https://bugs.ruby-lang.org/issues/11844
- # https://github.com/flori/json/issues/277
- # https://github.com/flori/json/pull/567
- # - disable default TPPM (rubygems.org, which hosts non-free
- # packages) in ruby-default-gems-bootstrap
- # https://wiki.parabola.nu/TPPM_Liberation_Project
- # Parabola policy:
- # - get check() to work without networking
- # technical:
- # - incorporate https://gitlab.archlinux.org/archlinux/packaging/packages/ruby/-/merge_requests/6
- # - incorporate https://gitlab.archlinux.org/archlinux/packaging/packages/ruby/-/merge_requests/7
- # - backport 055613fd868a8c94e43893f8c58a00cdd2a81f6d, per Arch 32
- # - disable tests that trigger qemu-arm-static bugs/limitations
- # - add replaces/conflicts for Parabola's old 'ruby-bootstraplib'
- # - set options=(!strip) to avoid creating ruby-debug, because extra/ruby-debug is the 'debug' gem
- # Do not de-vendor and create separate packages for default gems (see
- # https://stdgems.org/), leave them vendored as part of the main
- # 'ruby' package. Creating a separate package for a default gem will
- # lead to multiple problems.
- #
- # ... except for default gems that provide a tool in /usr/bin. Having
- # separate de-vendored packages for them is OK I guess. (In the code
- # below, this distinction is represented as _default_gems=() vs
- # _default_tool_gems=()).
- pkgname=(
- ruby
- ruby-docs
- ruby-default-gems
- ruby-default-gems-bootstrap
- ruby-bundled-gems
- ruby-bundled-gems-bootstrap
- ruby-stdlib
- )
- pkgver=3.2.5
- _rubyver="${pkgver%.*}.0"
- pkgrel=1
- pkgdesc='An object-oriented language for quick and easy programming'
- url='https://www.ruby-lang.org/en/'
- 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")
- # After updating pkgver, run `./updvars.sh` to update the `*sums` and `_*_gem` variables.
- sha512sums=('0321fd9303fd49ac1d36a502e66babf63df096b25750a86b905362f2529380074f875eeb78079e59a79806c7e1397c531de66cbe88a6f2ba78a8c2af776c3004'
- 'SKIP'
- '9f8ffe740cd2f218c16e85bd7329b6c7b0f58c71834f3d256a2bed90dd36d652d202dae6265d0a19eb79fbbd1909af59b94f722ec8abfa5637469e6b0e81d08d'
- 'ad0357a047b57bb0314b158f92e83485cec9fe6a3dfeb16117d57cf746ee38545f652397093448862ff36d13945bda3b26bb22b5d0d91643b16ae11548ef463b'
- '4031dc10cfd3fbdd8f023328df661159bf01d6fefac89a2750119c2dbe58ed2daf75737598002164c9760e366bdb7e5c1076430c2d67502ab0cae51ef94b5ed7'
- 'b24746c74ba6571c04ba1d95de3c557cc208870075cf7e9f603b18ac8b8dafbf5b2c8b2c58f564e91c58002947a64b5b30eed37069910e7d5bfa175faa2a58de'
- '926f6d54df2258f45ba53f8be90cb5af8a6b74634288ef82a511690ba27614bc283c4e262889e80469c8b48c2c770310402b17f1dd7bca28a24624c4a7d47de2'
- '098aae28f94124071047602e41dc76a8941a5625ea21c554c040aea9973ea285928acadf42cbf361753b84d2d5a21166da6589cf98cc0a2d3edcf0a1280df1d6'
- 'db0dd71efd6e502558b8b9eb10566783f82afcd32e779b0d45c2614c9149f28a0992843b8d2aab62640d857aea5aa8a5745377b01a098cd5da9fc8d206264c0c'
- '60403154901c774548e1e8e9e037c8294c0afe740942fe42864f4f91912bd7645de3a4d66a90bf43a4e4f4353cf0ba182513c7961343fc9ddae633d5ab94e11f'
- '490b947841884517ca9c331c0f286b8475d09206781e09f81cbe2874effff2958f6e13d8e73148b7bd13cb8e6eb6fccf78518d5c395b4683469ca65c76715aa1')
- b2sums=('a2c89de93364f29b08f5fa92295458bbe819f689134ffb2a295264372804ef4c10d23a8417a123033c14977fa1172a3c93246a91adda7eb8ad7a28e31d3b4c2a'
- 'SKIP'
- '2b1f4cb32961abf0db9875b116aa8cbf281f82406beff268111bfe6cc8e613f15c4bd3d29b2fa4f598038b66db6bbe9be5db5c6de9c7033eb3be1c59bbdc5039'
- 'a40399223c659b548e59605eb537faae8eff139cacf793fea6af1e543016f8afa80049490dccf915edb0063bd3d71705e47c6343e1f616903b8c12a6f37c8cf4'
- '41df21678a628fff7f86167bf80afcc602da2d5263c2f12e666cbce9401a51ff82887cfdf32fec85194b2511930525e2b2f1dda902437379ed45b78d99f830b2'
- '6808da5cd3bb24cd8f77d887fca9fbe7dd1759fd93b594eddc014a7183f890b0a6d943abe65d3bc14ecebe2c88630dc3ba8ec46b5326db5d363ebf0daf3d49af'
- '213877e9b9990f510c786bc06813f8747b40ff652955e8ad7343f4f462bffe308f7cd4e9b33f1f49d82337d19942bf9bf66da2642d81a8fbe45471df440df1a2'
- '3ed5fa59d88025487dd207218d6ec7d252c447fdd37c5a6e13ed3ef967de977ee80e3b31a7b6c97609c8814863b6f8738f528644f471fcd5e807cc63ebd94c30'
- 'eaf183b76fd3b7734702e48501a9dd3a8924b8e6fd7efb32acb943b8ccec121626a12db4539c73583c172be9a4b88f96492291258bd48202abfc5151418b9fe8'
- '314f95301c8359fca684b6d485a66326064b9816fd8ee0031e97f8f218d94ef870a019388e264916471f94432dcd08c6b88829eb471954259b732db727a3f9ec'
- '5e5d4ceb6f7688742ae396149430af308d73ac6744017847d67030cb40c78d2e5d6d156ecd377b2e3bcb7c6d65da8b50a92c17165be2d7a80762e313189fffa7')
- _bundled_gems=(
- debug=1.7.1
- matrix=0.4.2
- minitest=5.16.3
- net-ftp=0.2.1
- net-imap=0.3.4.1
- net-pop=0.1.2
- net-smtp=0.3.4
- power_assert=2.0.3
- prime=0.1.2
- rake=13.0.6
- rbs=2.8.2
- rexml=3.3.2
- rss=0.2.9
- test-unit=3.5.7
- typeprof=0.21.3
- )
- _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
- )
- # Parabola: Mundane packaging considerations.
- arch+=(armv7h i686)
- pkgrel+=.parabola3
- # Parabola: Disable the 'ruby-debug' package, that name is for the
- # 'debug' gem, not detatched debugging symbols for /bin/ruby. Arch
- # doesn't need to do this because Arch doesn't ship -debug packages.
- # We say !strip rather than !debug because we do want the debugging
- # symbols to be available to those who want them.
- options+=('!strip')
- # Parabola: Replace the CVTUTF code with a free implementation.
- # https://github.com/flori/json/pull/567
- # We need to do this in mksource() (not in prepare()) so that the
- # .src.pkg.tar file doesn't include nonfree sources.
- _jsonver=4bcec6c2950bdf7e1bbd086e91bdd431577f10a4
- _srcrel=1 # increment this to rebuild the sourceball (mksource, _jsonver) without bumping pkgver
- mksource=("${source[0]}"
- "ruby-json-${_jsonver}.tar.gz::https://github.com/parabola-gnulinuxlibre/ruby-json/archive/${_jsonver}.tar.gz"
- 0001-Prep-to-use-Parabola-s-patched-ruby-json.patch)
- mksha512sums=('092348b84b513aec62e63ec10b326370d0e3d1fa3126c59c03c84f28e2d7741a4772c461b077ec6a7dac3964a20f434655729e1acd50a3438755d7ad64073305'
- '3ddfc3d0a517173b4bebb3fc6709ae6f11a917fc510bba14e3263e16fb8237dba2e531db68fd4370353b2dab48781be691304ba7977429c6a194fcb3fd61a543'
- 'a627e6ddd695ac3ea54387f248a94845475a25a07e2b8de39e437b7a7c29a0b2521e7ecc956be6aab701ee7d976f5f2fb1779a84d4d188e4c0dadf8db49fe0f1')
- mkb2sums=('a37c92a0f751e81dcae328b8944c4ecf10f6aee4f4468d6d08bb924c9808c8556c5febb71a825dd62dbcccf56385138e6e306bf3efae3589bdf0512d16d99d1a'
- '2f223ba48712e519ddf9e03bc15347de1a9aa8fea3b907d2c6a95ff250986fd2a7e5bacb60fe76cafe474f5dc2678f293f42ad786b878767adb9ef49d55f659b'
- 'e35578d39808edca20b295dcfbce9b318b9b27f44d7900784cc05686585a3e127b4c92fe3be31d2e7b7e21633fb2775a1f891784684ab232223ef38e791a64d9')
- source=("https://repo.parabola.nu/other/ruby-libre/ruby-${pkgver}-libre${_srcrel}.tar.gz"{,.sig} "${source[@]:1}")
- mkdepends=(ruby git)
- mksource() {
- mkdir "$srcdir/ruby"
- mv -T "$srcdir/ruby-$pkgver" "$srcdir/ruby/ruby"
- mkdir "$srcdir/flori"
- mv -T "$srcdir/ruby-json-$_jsonver" "$srcdir/flori/json"
- pushd "$srcdir/ruby/ruby"
- git init .
- git add .
- git commit -m 'initial commit'
- patch -p1 -i ../../0001-Prep-to-use-Parabola-s-patched-ruby-json.patch
- ruby tool/sync_default_gems.rb json
- # sync_default_gems.rb does a `git checkout` to restore the
- # `ext/json{,/generator,/parser}/depend` files to the
- # properly-generated versions. If not for it also doing that for
- # `prereq.mk`, I'd drop the `git` stuff and just do `update-deps`
- # after syncing:
- #
- # ruby tool/update-deps --fix
- rm -rf .git
- popd
- mv -T "$srcdir/ruby/ruby" "$srcdir/ruby-${pkgver}"
- rm -rf -- "$srcdir/ruby" "$srcdir/flori"
- }
- # Parabola: Fix check() with networking disabled.
- _rspec_ver=3.13.0
- source+=(0001-Fix-failures-when-all-network-interfaces-are-down.patch::https://github.com/ruby/ruby/commit/94e79e4c2da8d69f45e67228a051bb1c09a367ec.patch
- "https://rubygems.org/downloads/diff-lcs-1.5.1.gem"
- "https://rubygems.org/downloads/rspec-${_rspec_ver}.gem"
- "https://rubygems.org/downloads/rspec-core-${_rspec_ver}.gem"
- "https://rubygems.org/downloads/rspec-expectations-${_rspec_ver}.gem"
- "https://rubygems.org/downloads/rspec-mocks-${_rspec_ver}.gem"
- "https://rubygems.org/downloads/rspec-support-${_rspec_ver}.gem")
- # Parabola: Fix build on i686
- source+=(0002-Fix-pointer-incompatiblity.patch::https://github.com/ruby/ruby/commit/055613fd868a8c94e43893f8c58a00cdd2a81f6d.patch)
- # Parabola: disable default TPPM
- source+=(0001-FSDG-rubygems-Have-default_sources-be-empty.patch)
- # Parabola: Apply the above patches
- prepare() {
- cd "ruby-${pkgver}"
- local patch
- for patch in ../*.patch; do
- patch -Np1 -i "$patch"
- done
- }
- build() {
- 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}"
- # I (LukeShu) can't get the tests to pass on i686 unless --disable-jit-support.
- # Yes, I tried -fno-stack-protector.
- ./configure \
- $(if [[ $CARCH == i686 ]]; then echo --disable-jit-support; fi) \
- --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --sharedstatedir=/var/lib \
- --libexecdir=/usr/lib/ruby \
- --enable-shared \
- --disable-rpath \
- --with-dbm-type=gdbm_compat
- make
- make rdoc capi
- }
- check() {
- 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}"
- # Parabola: Fix check() with networking disabled.
- #
- # This is pre-empting the `gem install` that `make
- # test-syntax-suggest-prepare` will do:
- #
- # yes-test-syntax-suggest-prepare: yes-test-syntax-suggest-precheck
- # $(XRUBY) -C "$(srcdir)" bin/gem install --no-document \
- # --install-dir .bundle --conservative "bundler" "rake" "rspec:~> 3" #"ruby-prof"
- local xruby=(./miniruby tool/runruby.rb --extout=.ext --)
- # "bundler" : just spoof the gemspec for the bundler we already have
- "${xruby[@]}" \
- -r'fileutils' \
- -r'rubygems' \
- -e'filename = "lib/bundler/bundler.gemspec"' \
- -e'spec = eval(File.read(filename, encoding: "utf-8:-"), binding, filename)' \
- -e'Gem.write_binary(".bundle/specifications/#{spec.full_name}.gemspec", spec.to_ruby)'
- # "rake" : already installed in .bundle
- # "rspec" : we downloaded rspec and deps in source=(), now we need to install them
- # `gem install` will search the current directory for dependencies
- ln -s ../*.gem .
- "${xruby[@]}" bin/gem install --no-document \
- --install-dir .bundle --conservative --local "rspec-${_rspec_ver}.gem"
- rm *.gem
- # Parabola: Disable checks that fail in cross-arch chroots.
- # These are bugs/limitations in `qemu-arm-static`.
- if grep -q [q]emu /proc/$$/cmdline; then
- # The `make test-all` suite.
- echo >>test/excludes/TestIO.rb "exclude :test_io_select_with_many_files , 'qemu-arm-static SIGABRTs instead of returning EINVAL'"
- echo >>test/excludes/TestSignal.rb "exclude :test_ignored_interrupt , 'qemu-arm-static handles the signal wrong'"
- echo >>test/excludes/TestRubyOptions.rb "exclude /test_set(proctitle|_program_name)/ , 'qemu-arm-static does not support adjusting argv at runtime'"
- # The `make test-spec` suite.
- # qemu-arm-static does not support adjusting argv at runtime
- MSPECOPT+=" --exclude='Process.setproctitle should set the process title'"
- MSPECOPT+=" --exclude='actually sets the program name'"
- export MSPECOPT
- # The `make test-syntax-suggest` suite.
- # The default timeout is 1s, bump it to 10s because emulation is slow.
- export SYNTAX_SUGGEST_TIMEOUT=10
- fi
- make check
- }
- _pick() {
- local p="$1" f d; shift
- for f; do
- [[ -e $f ]] || continue
- d="$srcdir/$p/${f#$pkgdir/}"
- mkdir -p "$(dirname "$d")"
- mv "$f" "$d"
- rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
- done
- }
- _list_bins() {
- local gemspec="${1?}"
- # Note that unlike .gemspec files in the sources, installed
- # gemspec files have been normalized, and so are much more
- # regular and easy to parse with simple expressions like this.
- cat "$gemspec" |
- # extract the `...` from `s.executables=[...]` lines
- sed -En 's/^\s*s\.executables\s*=\s*\[([^]]+)\]\s*$/\1/p' |
- # dequote; turn `"bundle".freeze, "bundler".freeze` into `bundle\nbundler`
- sed -e 's/^\s*"//' -e 's/"\.freeze,\s*"/\n/g' -e 's/"\.freeze\s*$//'
- }
- _pick_gems() {
- local typ="${1?}"
- local gems=("${@:2}")
- local dst="${typ}-gems"
- local gem bins bin
- for gem in "${gems[@]}"; do
- msg2 "removing ${typ} gem ${gem}"
- case "$typ" in
- default)
- if [[ "$gem" == rubygems ]]; then
- # For some reason ruby doesn't ship the rubygems gemspec.
- bins=(gem)
- else
- readarray -t bins < <(_list_bins "${pkgdir}/usr/lib/ruby/gems/${_rubyver}/specifications/default/${gem}"-*.gemspec)
- _pick "$dst" "${pkgdir}/usr/lib/ruby/gems/${_rubyver}/specifications/default/${gem}"-*.gemspec
- fi
- _pick "$dst" "${pkgdir}/usr/lib/ruby/${_rubyver}"/*-linux/"${gem}"
- _pick "$dst" "${pkgdir}/usr/lib/ruby/${_rubyver}/${gem}"*
- ;;
- bundled)
- readarray -t bins < <(_list_bins "${pkgdir}/usr/lib/ruby/gems/${_rubyver}/specifications/${gem}"-*.gemspec)
- _pick "$dst" "${pkgdir}/usr/lib/ruby/gems/${_rubyver}/specifications/${gem}"-*.gemspec
- _pick "$dst" "${pkgdir}/usr/lib/ruby/gems/${_rubyver}/extensions"/*-linux/"${_rubyver}/${gem}"-*
- ;;
- esac
- _pick "$dst" "${pkgdir}/usr/lib/ruby/gems/${_rubyver}/gems/${gem}"-*
- for bin in "${bins[@]}"; do
- _pick "$dst" "${pkgdir}/usr/bin/${bin}"
- _pick "$dst" "${pkgdir}/usr/share/man/man1/${bin}.1"
- done
- done
- }
- package_ruby() {
- 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=("${_default_gems[@]/#/ruby-}")
- conflicts=("${_default_gems[@]/#/ruby-}")
- 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"
- # remove de-vendored parts
- _pick_gems default "${_default_tool_gems[@]}"
- _pick_gems bundled "${_bundled_gems[@]%=*}"
- # Most of the _default_tool_gems are in optdepends via
- # ruby-default-gems, but some of them need to be non-optional.
- depends+=(
- rubygems
- )
- }
- 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-default-gems() {
- pkgdesc='Depends on gems that are a part of Ruby and you can always require directly'
- # We only need to depend on default gems that we've de-vendored, not all of the default gems.
- depends=("${_default_tool_gems[@]/#/ruby-}")
- cd "ruby-${pkgver}"
- install --verbose -D --mode=0644 BSDL COPYING --target-directory "${pkgdir}/usr/share/licenses/${pkgname}"
- }
- package_ruby-default-gems-bootstrap() {
- pkgdesc='The versions of ruby-default-gems that are distributed with the Ruby source release'
- depends=("ruby=${pkgver}")
- provides=("${_default_tool_gems[@]/#/ruby-}" rubygems)
- conflicts=("${_default_tool_gems[@]/#/ruby-}" rubygems)
- replaces+=(ruby-bootstraplib) # Parabola
- conflicts+=(ruby-bootstraplib) # Parabola
- mv -v "${srcdir}/default-gems"/* "$pkgdir"
- cd "ruby-${pkgver}"
- install --verbose -D --mode=0644 BSDL COPYING --target-directory "${pkgdir}/usr/share/licenses/${pkgname}"
- }
- package_ruby-bundled-gems() {
- pkgdesc='Depends on optional gems that are installed by default with Ruby'
- replaces=(ruby-bundledgems)
- conflicts=(ruby-bundledgems)
- # Parabola: Disable the version constraint on ruby-rexml for now,
- # because extra/ruby-rexml=3.2.6 is behind ruby-rexml>=3.3.2.
- depends=($(printf '%s\n' "${_bundled_gems[@]}" | sed -e 's/^/ruby-/' -e 's/=/>=/' -e 's/ruby-rexml>.*/ruby-rexml/'))
- cd "ruby-${pkgver}"
- install --verbose -D --mode=0644 BSDL COPYING --target-directory "${pkgdir}/usr/share/licenses/${pkgname}"
- }
- package_ruby-bundled-gems-bootstrap() {
- pkgdesc='The versions of ruby-bundled-gems that are distributed with the Ruby source release'
- depends=("ruby=${pkgver}")
- provides=("${_bundled_gems[@]/#/ruby-}")
- conflicts=("${_bundled_gems[@]/#/ruby-}")
- mv -v "${srcdir}/bundled-gems"/* "$pkgdir"
- 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:
|