1 # Description: Ruby interpreter
2 # URL: http://www.ruby-lang.org
3 # Maintainer: Juergen Daubert, juergen dot daubert at t-online dot de
4 # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
5 # Depends on: db gdbm ncurses openssl readline zlib
10 source=(ftp://ftp.ruby-lang.org/pub/$name/1.9/$name-$version.tar.bz2 \
16 # http://redmine.ruby-lang.org/issues/show/3528
17 # http://redmine.ruby-lang.org/issues/show/2727
18 SAVED_CFLAGS=$(sed 's/-O[1-9]*/-O0/' <<<$CFLAGS)
19 SAVED_CXXFLAGS=$(sed 's/-O[1-9]*/-O0/' <<<$CXXFLAGS)
20 SAVED_AR="$AR" SAVED_RANLIB="$RANLIB"
22 unset CC CFLAGS CXX CXXFLAGS AR RANLIB LD
24 patch -p0 -i $SRC/$name-arch.patch
26 ./configure --prefix=/usr \
28 --disable-install-doc \
29 --with-ruby-version=minor \
30 --with-static-linked-ext \
31 --with-search-path=$SRC/$name-$version/lib \
40 sed "s@-L/lib -L/usr/lib -L/usr/local/lib@-L$CLFS/usr/lib@g" -i configure.in
42 echo "ac_cv_func_setpgrp_void=yes" > config.cache
43 echo "ac_cv_func_getpgrp_void=yes" >> config.cache
45 CC="$CTARGET-gcc" CXX="$CTARGET-g++" LD="$SAVED_LD" \
46 CFLAGS="$SAVED_CFLAGS -I$CLFS/usr/include" CXXFLAGS="$CFLAGS" \
47 AR="$SAVED_AR" RANLIB="$SAVED_RANLIB" MINIRUBY=./hostruby \
48 ./configure --build=$CHOST \
53 --disable-install-doc \
54 --with-ruby-version=minor \
55 --cache-file=config.cache \
56 --enable-wide-getaddrinfo \
59 make DESTDIR=$PKG install