mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-18 23:22:24 +01:00
76 lines
2.0 KiB
Plaintext
76 lines
2.0 KiB
Plaintext
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
|
|
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
|
|
pkgname=ruby
|
|
pkgver=1.8.7_p358
|
|
_pkgver=${pkgver/_/-}
|
|
pkgrel=1
|
|
pkgdesc="An object-oriented language for quick and easy programming"
|
|
url="http://www.ruby-lang.org/en/"
|
|
arch="all"
|
|
license="Ruby"
|
|
depends=""
|
|
makedepends="zlib-dev openssl-dev libiconv-dev gdbm-dev db-dev readline-dev
|
|
valgrind-dev"
|
|
subpackages="$pkgname-doc $pkgname-dev"
|
|
source="ftp://ftp.ruby-lang.org/pub/ruby/${pkgver%.*}/${pkgname}-${_pkgver}.tar.bz2"
|
|
options="!fhs"
|
|
|
|
#
|
|
# maybe its a good idea to split dep libs to seperate pkg's.
|
|
#
|
|
|
|
_builddir="$srcdir/$pkgname-${_pkgver}"
|
|
prepare() {
|
|
cd "$_builddir"
|
|
}
|
|
|
|
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
|
|
|
|
# ruby saves path to install. we want use $PATH
|
|
export INSTALL=install
|
|
|
|
./configure \
|
|
--build=${CHOST:-i486-alpine-linux-uclibc} \
|
|
--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)/i686-linux' \
|
|
--enable-pthread \
|
|
--disable-rpath \
|
|
--disable-versioned-paths \
|
|
--enable-shared \
|
|
--with-mantype=man \
|
|
|| return 1
|
|
make || return 1
|
|
make test || return 1
|
|
}
|
|
|
|
package() {
|
|
cd "$_builddir"
|
|
make DESTDIR="$pkgdir" install || return 1
|
|
if [ -d "$pkgdir"/usr/local ]; then
|
|
local f=$(cd "$pkgdir" ; find usr/local -type f)
|
|
if [ -n "$f" ]; then
|
|
error "Found files in /usr/local:"
|
|
echo "$f"
|
|
return 1
|
|
fi
|
|
fi
|
|
install -Dm644 COPYING \
|
|
"${pkgdir}/usr/share/licenses/${pkgname}"/COPYING || return 1
|
|
}
|
|
|
|
md5sums="de35f00997f4ccee3e22dff0f2d01b8a ruby-1.8.7-p358.tar.bz2"
|