# Description: Ruby interpreter # URL: http://www.ruby-lang.org # Maintainer: Juergen Daubert, juergen dot daubert at t-online dot de # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu # Depends on: db gdbm ncurses openssl readline zlib name=ruby version=1.9.1-p429 release=1 source=(ftp://ftp.ruby-lang.org/pub/$name/1.9/$name-$version.tar.bz2 \ $name-arch.patch) build () { cd $name-$version # http://redmine.ruby-lang.org/issues/show/3528 # http://redmine.ruby-lang.org/issues/show/2727 SAVED_CFLAGS=$(sed 's/-O[1-9]*/-O0/' <<<$CFLAGS) SAVED_CXXFLAGS=$(sed 's/-O[1-9]*/-O0/' <<<$CXXFLAGS) SAVED_AR="$AR" SAVED_RANLIB="$RANLIB" SAVED_LD="$LD" unset CC CFLAGS CXX CXXFLAGS AR RANLIB LD patch -p0 -i $SRC/$name-arch.patch ./configure --prefix=/usr \ --mandir=/usr/man \ --disable-install-doc \ --with-ruby-version=minor \ --with-static-linked-ext \ --with-search-path=$SRC/$name-$version/lib \ --disable-shared \ optflags='' make ruby mv ruby hostruby make clean-ext rm *.o sed "s@-L/lib -L/usr/lib -L/usr/local/lib@-L$CLFS/usr/lib@g" -i configure.in echo "ac_cv_func_setpgrp_void=yes" > config.cache echo "ac_cv_func_getpgrp_void=yes" >> config.cache CC="$CTARGET-gcc" CXX="$CTARGET-g++" LD="$SAVED_LD" \ CFLAGS="$SAVED_CFLAGS -I$CLFS/usr/include" CXXFLAGS="$CFLAGS" \ AR="$SAVED_AR" RANLIB="$SAVED_RANLIB" MINIRUBY=./hostruby \ ./configure --build=$CHOST \ --host=$CTARGET \ --prefix=/usr \ --mandir=/usr/man \ --enable-shared \ --disable-install-doc \ --with-ruby-version=minor \ --cache-file=config.cache \ --enable-wide-getaddrinfo \ optflags='' make -j1 make DESTDIR=$PKG install }