aboutsummaryrefslogtreecommitdiffstats
path: root/main/ruby/APKBUILD
blob: a66b11e8cabaa670cefbfa6f77094b4e0aeb8297 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=ruby
pkgver=1.8.7_p174
_pkgver=1.8.7-p174
pkgrel=7
pkgdesc="An object-oriented language for quick and easy programming"
url="http://www.ruby-lang.org/en/"
license="Ruby"
depends=
makedepends="zlib-dev openssl-dev libiconv-dev gdbm-dev db-dev readline-dev"
subpackages="$pkgname-doc $pkgname-dev"
source="ftp://ftp.ruby-lang.org/pub/ruby/1.8/${pkgname}-${_pkgver}.tar.bz2
	ruby-openssl-1.0.0.patch"
#
# maybe its a good idea to split dep libs to seperate pkg's.
#

_builddir="$srcdir/$pkgname-${_pkgver}"
prepare() {
	cd "$_builddir"
	patch -p0 -i "$srcdir"/ruby-openssl-1.0.0.patch
}

build() {
	cd "$_builddir"

	# -fomit-frame-pointer makes ruby segfault, see gentoo bug #150413
	# In many places aliasing rules are broken; play it safe
	# as it's risky with newer compilers to leave it as it is.
	export CFLAGS="$CFLAGS -fno-omit-frame-pointer -fno-strict-aliasing"

	# turn off distcc/ccache
	# http://bugs.alpinelinux.org/issues/show/1
	export CC=gcc

	./configure --build=${CHOST:-i486-alpine-linux-uclibc} \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--enable-pthread \
		--with-sitedir='/usr/local/lib/site_ruby' \
		--with-extra-site-search-path='/usr/lib/site_ruby/$(ruby_ver)/i686-linux' \
		--enable-shared
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install

	install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}"/COPYING || return 1

}

md5sums="88c45aaf627b4404e5e4273cb03ba2ee  ruby-1.8.7-p174.tar.bz2
3361f559a6b338b792ff4946a41708dd  ruby-openssl-1.0.0.patch"