summaryrefslogtreecommitdiff
path: root/repo/system/ruby/ruby.xibuild
blob: 3cc7f7bdc10ef169fe52de7ee0e8bdc574953a69 (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
#!/bin/sh

NAME="ruby"
DESC="An object-oriented language for quick and easy programming"

MAKEDEPS="make "
DEPS="sbase cacerts gmp libucontext musl zlib "

PKG_VER=3.1.2
SOURCE="https://cache.ruby-lang.org/pub/ruby/${PKG_VER%.*}/ruby-$PKG_VER.tar.gz"
ADDITIONAL="dont-install-bundled-gems.patch dont-install-bundled-gems.patch test_insns-lower-recursion-depth.patch "

prepare () {
    apply_patches
}

build () {
    export CFLAGS="-O2 -fno-omit-frame-pointer -fno-strict-aliasing"
	export CPPFLAGS="-O2 -fno-omit-frame-pointer -fno-strict-aliasing"

	# Needed for coroutine stuff
	export LIBS="-lucontext"

	# ruby saves path to install. we want use $PATH
	export INSTALL=install

	# the configure script does not detect isnan/isinf as macros
	export ac_cv_func_isnan=yes
	export ac_cv_func_isinf=yes


	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--with-sitedir=/usr/local/lib/site_ruby \
		--with-search-path="/usr/lib/site_ruby/\$(ruby_ver)/x86_64-linux" \
		--enable-pthread \
		--disable-rpath \
		--enable-shared \
		--with-mantype=man
    make
}

package () {
    make DESTDIR=$PKG_DEST install
}