summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--patches/ruby-2.3.0.local.patch38
-rw-r--r--vars/build.vars14
2 files changed, 50 insertions, 2 deletions
diff --git a/patches/ruby-2.3.0.local.patch b/patches/ruby-2.3.0.local.patch
new file mode 100644
index 00000000..c0ff9277
--- /dev/null
+++ b/patches/ruby-2.3.0.local.patch
@@ -0,0 +1,38 @@
+--- ruby-2.3.0/enc/Makefile.in.orig 2015-01-18 04:56:52.000000000 +0100
++++ ruby-2.3.0/enc/Makefile.in 2017-07-30 20:20:04.296061880 +0200
+@@ -35,6 +35,7 @@
+ empty =
+ AR = @AR@
+ CC = @CC@
++LD = @CC@
+ ARFLAGS = @ARFLAGS@$(empty)
+ RANLIB = @RANLIB@
+ OUTFLAG = @OUTFLAG@$(empty)
+@@ -48,7 +49,7 @@
+ INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(top_srcdir)
+ DEFS = @DEFS@
+ CPPFLAGS = @CPPFLAGS@ -DONIG_ENC_REGISTER=rb_enc_register
+-LDFLAGS = @LDFLAGS@
++LDFLAGS = @LDFLAGS@ -lruby-static -shared
+ LDSHARED = @LDSHARED@
+ ldflags = $(LDFLAGS)
+ dldflags = @DLDFLAGS@
+--- ruby-2.3.0/lib/mkmf.rb.orig 2015-12-16 10:25:48.000000000 +0100
++++ ruby-2.3.0/lib/mkmf.rb 2017-07-30 21:44:12.418432849 +0200
+@@ -1952,6 +1952,7 @@
+
+ CC = #{CONFIG['CC']}
+ CXX = #{CONFIG['CXX']}
++LD = #{CONFIG['CC']}
+ LIBRUBY = #{CONFIG['LIBRUBY']}
+ LIBRUBY_A = #{CONFIG['LIBRUBY_A']}
+ LIBRUBYARG_SHARED = #$LIBRUBYARG_SHARED
+@@ -1972,7 +1973,7 @@
+ DEFS = #{CONFIG['DEFS']}
+ CPPFLAGS = #{extconf_h}#{$CPPFLAGS}
+ CXXFLAGS = $(CCDLFLAGS) #$CXXFLAGS $(ARCH_FLAG)
+-ldflags = #{$LDFLAGS}
++ldflags = #{$LDFLAGS} -lruby-static -shared
+ dldflags = #{$DLDFLAGS} #{CONFIG['EXTDLDFLAGS']}
+ ARCH_FLAG = #{$ARCH_FLAG}
+ DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
diff --git a/vars/build.vars b/vars/build.vars
index c2b4b8f3..174f0a00 100644
--- a/vars/build.vars
+++ b/vars/build.vars
@@ -510,8 +510,11 @@ LEAF_PACKAGES_PACKAGES="
apk_tools bash bc bdwgc bind bison chicken clang_host coreutils cparser cron dash datamash diffutils
dos2unix ed figlet file findutils gawk git gnupg grep hexcurse htop inetutils infounzip infozip irssi
john ldns less lighttpd lynx make man_db mc mksh mtr nano netcat nginx openlitespeed openssh p7zip
-pacman patch perl procps_ng python3 qpdf rsync rxvt_unicode sed smallbasic socat tar tcsh the_silver_searcher
-tmux util_linux vim weechat wget which whois xeyes xwd zsh";
+pacman patch perl procps_ng python3 qpdf rsync ruby rxvt_unicode sed smallbasic socat tar tcsh
+the_silver_searcher tmux util_linux vim weechat wget which whois xeyes xwd zsh";
+if [ -n "$(which ruby 2>/dev/null)" ]; then
+ LEAF_PACKAGES_PACKAGES="${LEAF_PACKAGES_PACKAGES:+${LEAF_PACKAGES_PACKAGES} }ruby";
+fi;
LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}";
: ${PKG_APK_TOOLS_SHA256SUM:=def2b2c23cd12fd2a9c19be49653b0d1bf9d81a26dac5a0ee79a1351d674f93b};
: ${PKG_APK_TOOLS_VERSION:=2.6.8};
@@ -785,6 +788,13 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}";
: ${PKG_RSYNC_VERSION:=3.1.2};
: ${PKG_RSYNC_URL:=https://download.samba.org/pub/rsync/src/rsync-${PKG_RSYNC_VERSION}.tar.gz};
: ${PKG_RSYNC_CONFIGURE_ARGS_EXTRA:=--with-included-popt --with-included-zlib};
+if [ -n "$(which ruby 2>/dev/null)" ]; then
+ : ${PKG_RUBY_SHA256SUM:=ba5ba60e5f1aa21b4ef8e9bf35b9ddb57286cb546aac4b5a28c71f459467e507};
+ : ${PKG_RUBY_VERSION:=2.3.0};
+ : ${PKG_RUBY_URL:=https://cache.ruby-lang.org/pub/ruby/${PKG_RUBY_VERSION%.*}/ruby-${PKG_RUBY_VERSION}.tar.gz};
+ : ${PKG_RUBY_CONFIGURE_ARGS_EXTRA:=--with-out-ext=fiddle};
+ : ${PKG_RUBY_MAKEFLAGS_BUILD:=-j1};
+fi;
: ${PKG_RXVT_UNICODE_SHA256SUM:=e94628e9bcfa0adb1115d83649f898d6edb4baced44f5d5b769c2eeb8b95addd};
: ${PKG_RXVT_UNICODE_VERSION:=9.22};
: ${PKG_RXVT_UNICODE_URL:=http://dist.schmorp.de/rxvt-unicode/rxvt-unicode-${PKG_RXVT_UNICODE_VERSION}.tar.bz2};