summaryrefslogtreecommitdiff
path: root/package/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'package/ruby')
-rw-r--r--package/ruby/Makefile19
-rw-r--r--package/ruby/patches/patch-Makefile_in11
-rw-r--r--package/ruby/patches/patch-common_mk10
3 files changed, 33 insertions, 7 deletions
diff --git a/package/ruby/Makefile b/package/ruby/Makefile
index 35835b9b3..21ec52811 100644
--- a/package/ruby/Makefile
+++ b/package/ruby/Makefile
@@ -18,19 +18,24 @@ include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,RUBY,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
MAKE_FILE:= GNUmakefile
-XAKE_FLAGS+= optflags='' debugflags=''
-CONFIGURE_ARGS+= --enable-wide-getaddrinfo
+XAKE_FLAGS+= optflags='' debugflags='' BASERUBY="${WRKBUILD}/hostruby"
# uClibc setpgrp does not take arguments
CONFIGURE_ENV+= ac_cv_func_setpgrp_void=yes
INSTALL_TARGET:= install-nodoc
-# Enable some ruby extension / options
-post-configure:
- #echo "option nodynamic" >> ${WRKBUILD}/ext/Setup
- #echo "socket" >> ${WRKBUILD}/ext/Setup
+pre-configure:
+ cp ${WRKBUILD}/ext/Setup ${WRKBUILD}/ext/Setup.orig
+ echo "option nodynamic" >> ${WRKBUILD}/ext/Setup
+ (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
+ ./configure --prefix=$(STAGING_TOOLS) \
+ );
+ $(MAKE) -C ${WRKBUILD} ruby
+ cp ${WRKBUILD}/ruby ${WRKBUILD}/hostruby
+ cp ${WRKBUILD}/ext/Setup.orig ${WRKBUILD}/ext/Setup
+ $(MAKE) -C ${WRKBUILD} install-nodoc
+ $(MAKE) -C ${WRKBUILD} clean
post-install:
- rm ${WRKINST}/usr/lib/*.a
rm -rf ${WRKINST}/usr/lib/site_ruby
rm -rf ${WRKINST}/usr/include
${CP} ${WRKINST}/usr ${IDIR_RUBY}/
diff --git a/package/ruby/patches/patch-Makefile_in b/package/ruby/patches/patch-Makefile_in
new file mode 100644
index 000000000..0e1e996bc
--- /dev/null
+++ b/package/ruby/patches/patch-Makefile_in
@@ -0,0 +1,11 @@
+--- ruby-1.9.1-p378.orig/Makefile.in 2009-11-12 17:01:28.000000000 +0100
++++ ruby-1.9.1-p378/Makefile.in 2010-02-13 21:10:02.000000000 +0100
+@@ -274,7 +274,7 @@ INSNS = opt_sc.inc optinsn.inc optunifs.
+
+ $(INSNS):
+ @$(RM) $(PROGRAM)
+- $(BASERUBY) -Ks $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) $@
++ $(BASERUBY) $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) $@
+
+ node_name.inc:
+ $(BASERUBY) -n $(srcdir)/tool/node_name.rb $? > $@
diff --git a/package/ruby/patches/patch-common_mk b/package/ruby/patches/patch-common_mk
new file mode 100644
index 000000000..06a4a7e10
--- /dev/null
+++ b/package/ruby/patches/patch-common_mk
@@ -0,0 +1,10 @@
+--- ruby-1.9.1-p378.orig/common.mk 2009-11-12 17:01:28.000000000 +0100
++++ ruby-1.9.1-p378/common.mk 2010-02-13 20:20:27.000000000 +0100
+@@ -400,7 +400,7 @@ extconf: $(PREP)
+ $(RUNRUBY) -C "$(EXTCONFDIR)" $(EXTCONF) $(EXTCONFARGS)
+
+ $(RBCONFIG): $(srcdir)/mkconfig.rb config.status $(PREP)
+- @$(MINIRUBY) $(srcdir)/mkconfig.rb -timestamp=$@ \
++ $(MINIRUBY) $(srcdir)/mkconfig.rb -timestamp=$@ \
+ -install_name=$(RUBY_INSTALL_NAME) \
+ -so_name=$(RUBY_SO_NAME) rbconfig.rb