CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
dillo: fixed AR usage and added ssl support (https)
[attic/ports/opt-cross.git] / ruby / Pkgfile
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
6
7 name=ruby
8 version=1.9.1-p429
9 release=1
10 source=(ftp://ftp.ruby-lang.org/pub/$name/1.9/$name-$version.tar.bz2 \
11 $name-arch.patch)
12
13 build () {
14 cd $name-$version
15
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"
21 SAVED_LD="$LD"
22 unset CC CFLAGS CXX CXXFLAGS AR RANLIB LD
23
24 patch -p0 -i $SRC/$name-arch.patch
25
26 ./configure --prefix=/usr \
27 --mandir=/usr/man \
28 --disable-install-doc \
29 --with-ruby-version=minor \
30 --with-static-linked-ext \
31 --with-search-path=$SRC/$name-$version/lib \
32 --disable-shared \
33 optflags=''
34
35 make ruby
36 mv ruby hostruby
37 make clean-ext
38 rm *.o
39
40 sed "s@-L/lib -L/usr/lib -L/usr/local/lib@-L$CLFS/usr/lib@g" -i configure.in
41
42 echo "ac_cv_func_setpgrp_void=yes" > config.cache
43 echo "ac_cv_func_getpgrp_void=yes" >> config.cache
44
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 \
49 --host=$CTARGET \
50 --prefix=/usr \
51 --mandir=/usr/man \
52 --enable-shared \
53 --disable-install-doc \
54 --with-ruby-version=minor \
55 --cache-file=config.cache \
56 --enable-wide-getaddrinfo \
57 optflags=''
58 make -j1
59 make DESTDIR=$PKG install
60 }