2006-01-23 21:21:02 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# ruby
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-07-11 16:06:06 +02:00
|
|
|
RUBY_VERSION:=1.8.2
|
|
|
|
RUBY_SOURCE:=ruby-$(RUBY_VERSION).tar.gz
|
2006-01-23 21:21:02 +01:00
|
|
|
RUBY_SITE:=ftp://ftp.ruby-lang.org/pub/ruby/1.8
|
2007-07-11 16:06:06 +02:00
|
|
|
RUBY_DIR:=$(BUILD_DIR)/ruby-$(RUBY_VERSION)
|
2006-10-01 17:17:52 +02:00
|
|
|
RUBY_CAT:=$(ZCAT)
|
2006-01-23 21:21:02 +01:00
|
|
|
RUBY_BINARY:=ruby
|
|
|
|
RUBY_TARGET_BINARY:=usr/bin/ruby
|
|
|
|
|
|
|
|
$(DL_DIR)/$(RUBY_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(RUBY_SITE),$(RUBY_SOURCE))
|
2006-01-23 21:21:02 +01:00
|
|
|
|
|
|
|
ruby-source: $(DL_DIR)/$(RUBY_SOURCE)
|
|
|
|
|
|
|
|
$(RUBY_DIR)/.unpacked: $(DL_DIR)/$(RUBY_SOURCE)
|
|
|
|
$(RUBY_CAT) $(DL_DIR)/$(RUBY_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2007-08-22 11:44:25 +02:00
|
|
|
toolchain/patch-kernel.sh $(RUBY_DIR) package/ruby/ ruby-\*.patch
|
2007-08-21 21:20:18 +02:00
|
|
|
(cd $(RUBY_DIR); autoreconf)
|
2006-01-23 21:21:02 +01:00
|
|
|
touch $(RUBY_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(RUBY_DIR)/.configured: $(RUBY_DIR)/.unpacked
|
|
|
|
(cd $(RUBY_DIR); rm -rf config.cache; \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2006-01-23 21:21:02 +01:00
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
2007-01-14 04:52:21 +01:00
|
|
|
--libdir=/lib \
|
2006-01-23 21:21:02 +01:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
|
|
|
$(DISABLE_NLS) \
|
|
|
|
$(DISABLE_LARGEFILE) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2006-01-23 21:21:02 +01:00
|
|
|
touch $(RUBY_DIR)/.configured
|
|
|
|
|
|
|
|
$(RUBY_DIR)/$(RUBY_BINARY): $(RUBY_DIR)/.configured
|
|
|
|
$(MAKE) -C $(RUBY_DIR)
|
|
|
|
|
|
|
|
$(TARGET_DIR)/$(RUBY_TARGET_BINARY): $(RUBY_DIR)/$(RUBY_BINARY)
|
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(RUBY_DIR) install
|
|
|
|
rm -rf $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
|
|
|
|
|
|
|
|
ruby: uclibc $(TARGET_DIR)/$(RUBY_TARGET_BINARY)
|
|
|
|
|
|
|
|
ruby-clean:
|
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(RUBY_DIR) uninstall
|
|
|
|
-$(MAKE) -C $(RUBY_DIR) clean
|
|
|
|
|
|
|
|
ruby-dirclean:
|
|
|
|
rm -rf $(RUBY_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_RUBY),y)
|
2006-01-23 21:21:02 +01:00
|
|
|
TARGETS+=ruby
|
|
|
|
endif
|