diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-10-11 12:27:00 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-10-15 14:22:18 +0000 |
commit | 45607bc1477202e1308cc8dcb038fe9fc67885b7 (patch) | |
tree | 98c367eea618a06e27f7d9b75b7135f3782b4614 /main/ruby/APKBUILD | |
parent | cc7048c5491d54872412bd3fc07d8497f64077b1 (diff) | |
download | aports-45607bc1477202e1308cc8dcb038fe9fc67885b7.tar.bz2 aports-45607bc1477202e1308cc8dcb038fe9fc67885b7.tar.xz |
main/ruby: upgrade to 1.9.3_p194
Diffstat (limited to 'main/ruby/APKBUILD')
-rw-r--r-- | main/ruby/APKBUILD | 130 |
1 files changed, 119 insertions, 11 deletions
diff --git a/main/ruby/APKBUILD b/main/ruby/APKBUILD index c86605d7ee..df0c454b73 100644 --- a/main/ruby/APKBUILD +++ b/main/ruby/APKBUILD @@ -1,18 +1,31 @@ # Contributor: Carlo Landmeter <clandmeter@gmail.com> -# Maintainer: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=ruby -pkgver=1.8.7_p358 +pkgver=1.9.3_p194 _pkgver=${pkgver/_/-} -pkgrel=1 +pkgrel=0 + +_abi=1.9.1 + pkgdesc="An object-oriented language for quick and easy programming" url="http://www.ruby-lang.org/en/" arch="all" license="Ruby" depends="" makedepends="zlib-dev openssl-dev libiconv-dev gdbm-dev db-dev readline-dev - valgrind-dev" -subpackages="$pkgname-doc $pkgname-dev" -source="ftp://ftp.ruby-lang.org/pub/ruby/${pkgver%.*}/${pkgname}-${_pkgver}.tar.bz2" + libffi-dev coreutils + autoconf" +subpackages="$pkgname-doc $pkgname-dev $pkgname-irb $pkgname-gems \ + $pkgname-rdoc $pkgname-rake $pkgname-bigdecimal + $pkgname-io-console:io_console $pkgname-json $pkgname-minitest + $pkgname-libs + " +patches=" + ruby-1.9.3-always-use-i386.patch + ruby-1.9.3-backport-from-trunk-rev37068.patch + " +source="ftp://ftp.ruby-lang.org/pub/ruby/${pkgver%.*}/${pkgname}-${_pkgver}.tar.bz2 + $patches" options="!fhs" # @@ -20,8 +33,16 @@ options="!fhs" # _builddir="$srcdir/$pkgname-${_pkgver}" +_gemdir="/usr/lib/ruby/gems/$_abi" +_rubydir="/usr/lib/ruby/$_abi" + prepare() { cd "$_builddir" + for i in $patches; do + msg $i + patch -p1 -i "$srcdir"/$i || return 1 + done + autoconf } build() { @@ -34,7 +55,7 @@ build() { # turn off distcc/ccache # http://bugs.alpinelinux.org/issues/show/1 - export CC=gcc +# export CC=gcc # ruby saves path to install. we want use $PATH export INSTALL=install @@ -46,10 +67,9 @@ build() { --mandir=/usr/share/man \ --infodir=/usr/share/info \ --with-sitedir='/usr/local/lib/site_ruby' \ - --with-search-path='/usr/lib/site_ruby/$(ruby_ver)/i686-linux' \ + --with-search-path='/usr/lib/site_ruby/$(ruby_ver)/i386-linux' \ --enable-pthread \ - --disable-rpath \ - --disable-versioned-paths \ + --disable-rpath \ --enable-shared \ --with-mantype=man \ || return 1 @@ -72,4 +92,92 @@ package() { "${pkgdir}/usr/share/licenses/${pkgname}"/COPYING || return 1 } -md5sums="de35f00997f4ccee3e22dff0f2d01b8a ruby-1.8.7-p358.tar.bz2" +_mv() { + local i + for i in "$@"; do + mkdir -p "$subpkgdir"/${i%/*} + mv "$pkgdir"/${i} "$subpkgdir"/${i%/*}/ || return 1 + done +} + +_mvgem() { + cd "$pkgdir" + for i in $_rubydir/${1}.rb \ + $_rubydir/${1} \ + $_rubydir/i386-linux-uclibc/${1} \ + $_gemdir/gems/${1}-* \ + $_gemdir/specifications/${1}-* ; do + [ -e "$pkgdir"/$i ] || continue + _mv "$i" + done +} + +gems() { + pkgdesc="The Ruby standard for packaging ruby libraries" + replaces="rubygems" + depends="ruby" + _mv usr/bin/gem \ + $_rubydir/rubygems \ + || return 1 +} + +rake() { + pkgdesc="Ruby based make-like utility" + depends="ruby" + _mvgem rake || return 1 + _mv usr/bin/rake +} + +irb() { + pkgdesc="The Interactive Ruby" + replaces="ruby" + depends="ruby" + cd "$pkgdir" + _mv usr/bin/irb \ + usr/lib/ruby/$_abi/irb* +} + +rdoc() { + pkgdesc="Ruby documentation tool" + depends="ruby" + _mvgem rdoc || return 1 + _mv usr/bin/ri \ + usr/bin/rdoc +} + +bigdecimal() { + pkgdesc="Ruby arbitrary-precision floating point decimal arithmetic" + depends="ruby" + _mvgem bigdecimal +} + +io_console() { + pkgdesc="Ruby simple console IO library" + depends="ruby" + _mvgem io-console + _mv $_rubydir/io \ + $_rubydir/i386-linux-uclibc/io/console.so +} + +json() { + pkgdesc="Ruby JSON library" + depends="ruby" + _mvgem json +} + +minitest() { + pkgdesc="Ruby suite of testing facilities" + depends="ruby" + _mvgem minitest +} + +libs() { + pkgdesc="Libraries necessary to run Ruby" + depends="ruby" + mkdir -p "$subpkgdir"/usr + mv "$pkgdir"/usr/lib "$subpkgdir"/usr/ +} + +md5sums="2278eff4cfed3cbc0653bc73085caa34 ruby-1.9.3-p194.tar.bz2 +8395693c99415532780605af203a102b ruby-1.9.3-always-use-i386.patch +b586536d4d196b142fd0968dac192617 ruby-1.9.3-backport-from-trunk-rev37068.patch" |