summaryrefslogtreecommitdiff
path: root/community/rubinius
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-10-19 01:18:21 -0700
committerroot <root@rshg054.dnsready.net>2013-10-19 01:18:21 -0700
commitd509ac9685f4ab9eda997553a8cf4131befab417 (patch)
tree3653bd6752f910cde3329ba6cd783c6e8e311d15 /community/rubinius
parentcc1dbaab9d968ae5ace1956c3662b8b492694800 (diff)
Sat Oct 19 01:17:18 PDT 2013
Diffstat (limited to 'community/rubinius')
-rw-r--r--community/rubinius/PKGBUILD105
-rw-r--r--community/rubinius/gemrc5
2 files changed, 110 insertions, 0 deletions
diff --git a/community/rubinius/PKGBUILD b/community/rubinius/PKGBUILD
new file mode 100644
index 000000000..e51cf9e29
--- /dev/null
+++ b/community/rubinius/PKGBUILD
@@ -0,0 +1,105 @@
+# $Id: PKGBUILD 98780 2013-10-18 13:13:13Z heftig $
+# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
+
+pkgbase=rubinius
+pkgname=(rubinius rubinius-ruby)
+pkgver=2.1.0
+pkgrel=1
+pkgdesc="Ruby runtime written in Ruby, designed for concurrency"
+arch=(i686 x86_64)
+url="http://rubini.us"
+license=(custom)
+depends=(llvm-libs libffi openssl libyaml)
+makedepends=(llvm ruby chrpath)
+options=(!emptydirs)
+
+_gems=(bundler-1.3.5.gem
+ daedalus-core-0.0.1.gem
+ gems-0.8.3.gem
+ redcard-1.1.0.gem
+ rubinius-bridge-1.0.3.gem)
+
+source=(http://releases.rubini.us/${pkgbase}-${pkgver}.tar.bz2
+ gemrc)
+
+for _i in "${_gems[@]}"; do
+ source+=( http://rubygems.org/downloads/${_i} )
+done
+
+sha256sums=('78d7c2af7ebdf9b477a682cf4793e56e4139abed3cd752282e422d56e63b65b6'
+ '4bb7eb2fe66e396ed16b589cdb656831407b39ad4e138d88536754c0448ac614'
+ '08b89047f7b829f3e197a28fb1bde74c3f5cfea1552f99dfba237fee30eaffe4'
+ 'baa2a27713fac17ca21bc2515a227cde4b10aa1a01e1365e1ee5372c72816ff0'
+ '2bcf69bb8fb90dd1f926fb7d8f2d8c9857540e04385ac742999a05c74fe24a05'
+ '60c73d440f29fc3577eec86de00d55ee5351647d2d450ea48bc6d2ae5a62b8fc'
+ '246ba09a6506e1c380acccc0e3058e83fec89904572d3214f797ccb604453981')
+
+prepare() {
+ export GEM_HOME="$srcdir/gemdir"
+
+ mkdir -p "$GEM_HOME"
+ gem install --no-user-install -N bundler-1.3.5.gem
+ cp -n "${_gems[@]}" $pkgbase-$pkgver/vendor/cache
+
+ cd $pkgbase-$pkgver
+ "$GEM_HOME/bin/bundle" install --local
+}
+
+build() {
+ export GEM_HOME="$srcdir/gemdir"
+ cd $pkgbase-$pkgver
+
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --includedir=/usr/include/rubinius \
+ --appdir=/usr/lib/rubinius \
+ --gemsdir=/usr/lib/rubinius/gems \
+ --preserve-prefix \
+ --llvm-shared
+ rake build
+}
+
+check() {
+ export GEM_HOME="$srcdir/gemdir"
+ cd $pkgbase-$pkgver
+
+ rake vm:test || :
+}
+
+package_rubinius() {
+ optdepends=('rubinius-docs: Rubinius documentation'
+ 'ruby-docs: Ruby documentation')
+
+ export GEM_HOME="$srcdir/gemdir"
+ cd $pkgbase-$pkgver
+
+ DESTDIR="$pkgdir" rake install
+
+ find "$pkgdir" -name "*.so" -exec chrpath -d {} +
+ chrpath -d "$pkgdir/usr/bin/rbx"
+
+ mkdir -p "$pkgdir/usr/share/ri"
+ ln -s 2.0.0 "$pkgdir/usr/share/ri/2.1"
+
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/rubinius/LICENSE"
+
+### Split rubinius-ruby
+ mkdir -p "$srcdir/ruby/usr/bin"
+ for _f in "$pkgdir"/usr/bin/*; do
+ [[ $_f == */rbx ]] && continue
+ mv $_f "$srcdir/ruby/usr/bin"
+ done
+}
+
+package_rubinius-ruby() {
+ pkgdesc="Ruby compat for Rubinius"
+ depends=(rubinius)
+ provides=(ruby)
+ conflicts=(ruby)
+ backup=(etc/gemrc)
+
+ mv ruby/* "$pkgdir"
+ install -Dm644 gemrc "$pkgdir/etc/gemrc"
+ install -d "$pkgdir/usr/share/licenses/rubinius-ruby"
+ ln -s ../rubinius/LICENSE "$pkgdir/usr/share/licenses/rubinius-ruby/LICENSE"
+}
diff --git a/community/rubinius/gemrc b/community/rubinius/gemrc
new file mode 100644
index 000000000..3d11de1ec
--- /dev/null
+++ b/community/rubinius/gemrc
@@ -0,0 +1,5 @@
+# Read about the gemrc format at http://docs.rubygems.org/read/chapter/11
+
+# --user-install is used to install to $HOME/.gem/ by default since we want to separate
+# pacman installed gems and gem installed gems
+gem: --user-install