2 # Copyright (C) 2006-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 # - dirs not removed when uninstalling!
10 include $(TOPDIR)/rules.mk
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
19 PKG_SOURCE_URL:=http://cache.ruby-lang.org/pub/ruby/$(PKG_LIBVER)/
20 PKG_MD5SUM:=882e6146ed26c6e78c02342835f5d46b86de95f0dc4e16543294bc656594cc5b
21 PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
22 PKG_LICENSE:=BSD-2-Clause
23 PKG_LICENSE_FILES:=COPYING
25 PKG_BUILD_DEPENDS:=ruby/host
30 include $(INCLUDE_DIR)/host-build.mk
31 include $(INCLUDE_DIR)/package.mk
32 include $(INCLUDE_DIR)/nls.mk
34 HOST_CONFIGURE_ARGS += \
35 --disable-install-doc \
36 --disable-install-rdoc \
37 --disable-install-capi \
39 --with-out-ext=tk,tk/tkutil,win32,win32ole,dbm,gdbm,readline \
41 # Does not compile with this. Workaround is --without-gmp
42 # https://bugs.ruby-lang.org/issues/11940
43 #--with-static-linked-ext \
45 # even not used, host build with restricted exts results in gems not being
46 # compiled for target (probably some cross compiling problem like checking
47 # host for selecting target features)
49 # --with-ext=thread,stringio \
55 $(call autoconf_bool,CONFIG_IPV6,ipv6) \
56 --disable-install-doc \
57 --disable-install-capi \
58 --with-ruby-version=minor \
59 --with-iconv-dir=$(ICONV_PREFIX) \
60 --with-out-ext=tk,tk/tkutil,win32,win32ole
62 ifndef CONFIG_RUBY_DIGEST_USE_OPENSSL
66 --with-bundled-rmd160\
71 TARGET_LDFLAGS += -L$(PKG_BUILD_DIR)
73 # Ruby uses DLDFLAGS and not LDFLAGS for libraries. LDFLAGS is only for execs.
74 # However, DLDFLAGS from configure is not passed to Makefile when target is linux.
75 # XLDFLAGS is used by both libraries and execs. This is somehow brute force but
76 # if will fix when some LD_FLAGS is needef for libraries. As side effect, it will
77 # duplicate ld args for binaries.
78 CONFIGURE_VARS += XLDFLAGS="$(TARGET_LDFLAGS)"
81 DESTDIR="$(PKG_INSTALL_DIR)" \
84 define Build/InstallDev
85 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
87 ) | ( cd $(1); $(TAR) -xf - )
91 # When ruby version is updated, make install asks in some cases before replace
92 # an existing different file. Remove them before install and avoid the interaction
93 rm -f $(HOST_BUILD_PREFIX)/bin/rake
94 $(call Host/Install/Default)
97 define Package/ruby/Default
101 TITLE:=Ruby scripting language
102 URL:=http://www.ruby-lang.org/
105 define Package/ruby/Default/description
106 Ruby is the interpreted scripting language for quick and easy
107 object-oriented programming. It has many features to process text files
108 and to do system management tasks (as in perl). It is simple,
109 straight-forward, and extensible.
114 $(call Package/ruby/Default)
115 TITLE+= (interpreter)
119 define Package/ruby/description
120 $(call Package/ruby/Default/description)
123 define RubyDependency
125 $(call Package/Default)
126 $(call Package/ruby-$(1))
127 FILTER_CONFIG:=$$(strip \
128 $$(foreach config_dep, \
132 $$(if $$(findstring :,$$v),,$$v) \
135 $$(subst @,,$$(config_dep)) \
138 ifneq (,$$(FILTER_CONFIG))
139 FILTER_CONFIG:=($$(subst $$(space),&&,$$(FILTER_CONFIG))):
142 +$(FILTER_CONFIG)ruby-$(1)
145 define Package/ruby/config
146 comment "Standard Library"
147 depends on PACKAGE_ruby
149 config PACKAGE_ruby-stdlib
150 depends on PACKAGE_ruby
152 prompt "Select Ruby Complete Standard Library (ruby-stdlib)"
156 define Package/ruby/install
157 $(INSTALL_DIR) $(1)/usr/bin
158 $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
159 $(INSTALL_DIR) $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)
160 $(INSTALL_DIR) $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)
161 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/lib/ruby/ruby$(PKG_LIBVER)-bin
162 $(INSTALL_BIN) ./files/ruby $(1)/usr/bin/ruby
163 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/
164 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/
165 $(SED) "s%@RUBY_LIBPATH@%/usr/lib/ruby/$(PKG_LIBVER)%" $(1)/usr/bin/ruby
166 $(SED) "s%@RUBY_BINPATH@%/usr/lib/ruby/ruby$(PKG_LIBVER)-bin%" $(1)/usr/bin/ruby
169 define Package/libruby
170 $(call Package/ruby/Default)
174 TITLE+= (shared library)
175 DEPENDS+= +libpthread +librt +libgmp
176 ABI_VERSION:=$(PKG_LIBVER)
178 define Package/libruby/install
179 $(INSTALL_DIR) $(1)/usr/lib
180 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so.* $(1)/usr/lib/
184 define Package/ruby-stdlib
185 $(call Package/ruby/Default)
186 TITLE:=Ruby standard libraries (metadata for all stdlib subsets)
187 DEPENDS:=ruby $(foreach subpackage,$(RUBY_STDLIB),$(strip $(call RubyDependency,$(subpackage))))
191 define Package/ruby-stdlib/description
192 This metapackage currently install all ruby-* packages,
193 providing a complete Ruby Standard Library.
198 define Package/ruby-stdlib/install
202 define Package/ruby-bigdecimal/files
203 /usr/lib/ruby/$(PKG_LIBVER)/*/bigdecimal.so
204 /usr/lib/ruby/$(PKG_LIBVER)/bigdecimal/
205 /usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/bigdecimal-*.gemspec
208 define Package/ruby-cgi/files
209 /usr/lib/ruby/$(PKG_LIBVER)/cgi
210 /usr/lib/ruby/$(PKG_LIBVER)/cgi.rb
211 /usr/lib/ruby/$(PKG_LIBVER)/*/cgi/escape.so
214 define Package/ruby-csv/files
215 /usr/lib/ruby/$(PKG_LIBVER)/csv.rb
218 define Package/ruby-datetime/files
219 /usr/lib/ruby/$(PKG_LIBVER)/time.rb
220 /usr/lib/ruby/$(PKG_LIBVER)/date.rb
221 /usr/lib/ruby/$(PKG_LIBVER)/*/date_core.so
224 define Package/ruby-dbm/description
225 The DBM class provides a wrapper to a Unix-style dbm or Database Manager library.
226 This package provides dbm.so file.
229 define Package/ruby-dbm/files
230 /usr/lib/ruby/$(PKG_LIBVER)/*/dbm.so
233 define Package/ruby-debuglib/files
234 /usr/lib/ruby/$(PKG_LIBVER)/profile.rb
235 /usr/lib/ruby/$(PKG_LIBVER)/profiler.rb
236 /usr/lib/ruby/$(PKG_LIBVER)/debug.rb
237 /usr/lib/ruby/$(PKG_LIBVER)/tracer.rb
238 /usr/lib/ruby/$(PKG_LIBVER)/benchmark.rb
239 /usr/lib/ruby/$(PKG_LIBVER)/*/objspace.so
242 define Package/ruby-did-you-mean/files
243 /usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/did_you_mean-*.gemspec
244 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/
246 define Package/ruby-did-you-mean/files-excluded
247 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/benchmark
248 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/doc
249 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/evaluation
250 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/test
251 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/*.md
254 define Package/ruby-digest/description
255 Provides digest* files. Can be configured to use OpenSSL or
256 bundled hash functions.
259 define Package/ruby-digest/config
261 config RUBY_DIGEST_USE_OPENSSL
262 bool "Use OpenSSL functions for ruby digest hash functions"
263 depends on PACKAGE_ruby-digest
265 Ruby can use OpenSSL hash functions or compile alternative implementations. Using
266 OpenSSL saves about 30KBytes (less when compressed) but requires OpenSSL (that
267 is way bigger than that). However, if OpenSSL is already needed by another usage,
268 as ruby-openssl or any other non ruby package, it is better to mark this option.
272 define Package/ruby-digest/files
273 /usr/lib/ruby/$(PKG_LIBVER)/digest
274 /usr/lib/ruby/$(PKG_LIBVER)/digest.rb
275 /usr/lib/ruby/$(PKG_LIBVER)/*/digest.so
276 /usr/lib/ruby/$(PKG_LIBVER)/*/digest/*
279 define Package/ruby-drb/files
280 /usr/lib/ruby/$(PKG_LIBVER)/drb.rb
281 /usr/lib/ruby/$(PKG_LIBVER)/drb
284 define Package/ruby-enc/files
285 /usr/lib/ruby/$(PKG_LIBVER)/*/enc/encdb.so
286 /usr/lib/ruby/$(PKG_LIBVER)/*/enc/iso_8859_1.so
287 /usr/lib/ruby/$(PKG_LIBVER)/*/enc/utf_*.so
288 /usr/lib/ruby/$(PKG_LIBVER)/*/enc/euc_jp.so
291 define Package/ruby-enc-extra/files
292 /usr/lib/ruby/$(PKG_LIBVER)/*/enc
294 define Package/ruby-enc-extra/files-excluded
295 $(call Package/ruby-enc/files)
298 define Package/ruby-erb/files
300 /usr/lib/ruby/$(PKG_LIBVER)/erb.rb
303 define Package/ruby-fiddle/files
304 /usr/lib/ruby/$(PKG_LIBVER)/fiddle.rb
305 /usr/lib/ruby/$(PKG_LIBVER)/fiddle/
306 /usr/lib/ruby/$(PKG_LIBVER)/*/fiddle.so
309 define Package/ruby-filelib/files
310 /usr/lib/ruby/$(PKG_LIBVER)/tmpdir.rb
311 /usr/lib/ruby/$(PKG_LIBVER)/tempfile.rb
312 /usr/lib/ruby/$(PKG_LIBVER)/pathname.rb
313 /usr/lib/ruby/$(PKG_LIBVER)/*/pathname.so
314 /usr/lib/ruby/$(PKG_LIBVER)/find.rb
315 /usr/lib/ruby/$(PKG_LIBVER)/fileutils.rb
318 define Package/ruby-gdbm/files
319 /usr/lib/ruby/$(PKG_LIBVER)/*/gdbm.so
322 define Package/ruby-gems/files
323 /usr/lib/ruby/$(PKG_LIBVER)/ubygems.rb
324 /usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb
325 /usr/lib/ruby/$(PKG_LIBVER)/rubygems
327 define Package/ruby-gems/files-excluded
328 /usr/lib/ruby/$(PKG_LIBVER)/rubygems/test_case.rb
329 /usr/lib/ruby/$(PKG_LIBVER)/rubygems/package/tar_test_case.rb
330 /usr/lib/ruby/$(PKG_LIBVER)/rubygems/installer_test_case.rb
332 define Package/ruby-gems/install
333 $(INSTALL_DIR) $(1)/usr/bin
334 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gem $(1)/usr/bin/
335 $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
336 $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
337 $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/doc
338 $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/cache
339 $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/extensions
340 $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/build_info
341 $(call RubyBuildPackage/install,gems,$(1))
344 define Package/ruby-io-console/files
345 /usr/lib/ruby/$(PKG_LIBVER)/*/io/console.so
346 /usr/lib/ruby/$(PKG_LIBVER)/io/console/
347 /usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/io-console-*.gemspec
350 define Package/ruby-irb/files
351 /usr/lib/ruby/$(PKG_LIBVER)/irb
352 /usr/lib/ruby/$(PKG_LIBVER)/irb.rb
354 define Package/ruby-irb/install
355 $(INSTALL_DIR) $(1)/usr/bin
356 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/irb $(1)/usr/bin/
357 $(call RubyBuildPackage/install,irb,$(1))
360 define Package/ruby-json/files
361 /usr/lib/ruby/$(PKG_LIBVER)/json.rb
362 /usr/lib/ruby/$(PKG_LIBVER)/json
363 /usr/lib/ruby/$(PKG_LIBVER)/*/json
364 /usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/json-*.gemspec
366 define Package/ruby-json/files-excluded
367 $(call Package/ruby-psych/files)
370 define Package/ruby-logger/files
371 /usr/lib/ruby/$(PKG_LIBVER)/logger.rb
372 /usr/lib/ruby/$(PKG_LIBVER)/syslog/logger.rb
373 /usr/lib/ruby/$(PKG_LIBVER)/*/syslog.so
376 define Package/ruby-math/files
377 /usr/lib/ruby/$(PKG_LIBVER)/prime.rb
378 /usr/lib/ruby/$(PKG_LIBVER)/mathn.rb
379 /usr/lib/ruby/$(PKG_LIBVER)/cmath.rb
380 /usr/lib/ruby/$(PKG_LIBVER)/*/mathn
381 /usr/lib/ruby/$(PKG_LIBVER)/matrix.rb
382 /usr/lib/ruby/$(PKG_LIBVER)/matrix
385 define Package/ruby-minitest/files
386 /usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/minitest-*.gemspec
387 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*
389 define Package/ruby-minitest/files-excluded
390 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/test
391 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/*.rdoc
392 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/*.txt
395 define Package/ruby-misc/files
396 /usr/lib/ruby/$(PKG_LIBVER)/English.rb
397 /usr/lib/ruby/$(PKG_LIBVER)/abbrev.rb
398 /usr/lib/ruby/$(PKG_LIBVER)/base64.rb
399 /usr/lib/ruby/$(PKG_LIBVER)/delegate.rb
400 /usr/lib/ruby/$(PKG_LIBVER)/e2mmap.rb
401 /usr/lib/ruby/$(PKG_LIBVER)/expect.rb
402 /usr/lib/ruby/$(PKG_LIBVER)/getoptlong.rb
403 /usr/lib/ruby/$(PKG_LIBVER)/open3.rb
404 /usr/lib/ruby/$(PKG_LIBVER)/ostruct.rb
405 /usr/lib/ruby/$(PKG_LIBVER)/scanf.rb
406 /usr/lib/ruby/$(PKG_LIBVER)/securerandom.rb
407 /usr/lib/ruby/$(PKG_LIBVER)/set.rb
408 /usr/lib/ruby/$(PKG_LIBVER)/shellwords.rb
409 /usr/lib/ruby/$(PKG_LIBVER)/tsort.rb
410 /usr/lib/ruby/$(PKG_LIBVER)/weakref.rb
411 /usr/lib/ruby/$(PKG_LIBVER)/*/continuation.so
412 /usr/lib/ruby/$(PKG_LIBVER)/*/coverage.so
413 /usr/lib/ruby/$(PKG_LIBVER)/*/etc.so
414 /usr/lib/ruby/$(PKG_LIBVER)/*/fcntl.so
415 /usr/lib/ruby/$(PKG_LIBVER)/*/fiber.so
416 /usr/lib/ruby/$(PKG_LIBVER)/*/pty.so
417 /usr/lib/ruby/$(PKG_LIBVER)/*/stringio.so
418 /usr/lib/ruby/$(PKG_LIBVER)/*/strscan.so
421 define Package/ruby-mkmf/files
422 /usr/lib/ruby/$(PKG_LIBVER)/mkmf.rb
423 /usr/lib/ruby/$(PKG_LIBVER)/un.rb
426 define Package/ruby-multithread/files
427 /usr/lib/ruby/$(PKG_LIBVER)/monitor.rb
428 /usr/lib/ruby/$(PKG_LIBVER)/timeout.rb
429 /usr/lib/ruby/$(PKG_LIBVER)/thwait.rb
430 /usr/lib/ruby/$(PKG_LIBVER)/mutex_m.rb
431 /usr/lib/ruby/$(PKG_LIBVER)/sync.rb
432 /usr/lib/ruby/$(PKG_LIBVER)/*/thread.so
433 /usr/lib/ruby/$(PKG_LIBVER)/*/io/wait.so
434 /usr/lib/ruby/$(PKG_LIBVER)/*/io/nonblock.so
437 define Package/ruby-net/files
438 /usr/lib/ruby/$(PKG_LIBVER)/open-uri.rb
439 /usr/lib/ruby/$(PKG_LIBVER)/net/*
442 define Package/ruby-net-telnet/files
443 /usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/net-telnet-*.gemspec
444 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/net-telnet-*/
446 define Package/ruby-net-telnet/files-excluded
447 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/net-telnet-*/*.md
448 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/net-telnet-*/*.txt
451 define Package/ruby-nkf/files
452 /usr/lib/ruby/$(PKG_LIBVER)/kconv.rb
453 /usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so
456 define Package/ruby-openssl/files
457 /usr/lib/ruby/$(PKG_LIBVER)/openssl
458 /usr/lib/ruby/$(PKG_LIBVER)/openssl.rb
459 /usr/lib/ruby/$(PKG_LIBVER)/*/openssl.so
462 define Package/ruby-optparse/files
463 /usr/lib/ruby/$(PKG_LIBVER)/optparse.rb
464 /usr/lib/ruby/$(PKG_LIBVER)/optionparser.rb
465 /usr/lib/ruby/$(PKG_LIBVER)/optparse
468 define Package/ruby-patterns/files
469 /usr/lib/ruby/$(PKG_LIBVER)/observer.rb
470 /usr/lib/ruby/$(PKG_LIBVER)/singleton.rb
471 /usr/lib/ruby/$(PKG_LIBVER)/forwardable.rb
474 define Package/ruby-powerassert/files
475 /usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/power_assert-*.gemspec
476 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-*
478 define Package/ruby-powerassert/files-excluded
479 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-*/test
482 define Package/ruby-prettyprint/files
483 /usr/lib/ruby/$(PKG_LIBVER)/pp.rb
484 /usr/lib/ruby/$(PKG_LIBVER)/prettyprint.rb
487 define Package/ruby-pstore/files
488 /usr/lib/ruby/$(PKG_LIBVER)/pstore.rb
491 define Package/ruby-psych/files
492 /usr/lib/ruby/$(PKG_LIBVER)/psych
493 /usr/lib/ruby/$(PKG_LIBVER)/psych.rb
494 /usr/lib/ruby/$(PKG_LIBVER)/psych_jars.rb
495 /usr/lib/ruby/$(PKG_LIBVER)/*/psych.so
496 /usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/psych-*.gemspec
499 define Package/ruby-racc/files
500 /usr/lib/ruby/$(PKG_LIBVER)/racc
501 /usr/lib/ruby/$(PKG_LIBVER)/*/racc/*.so
504 define Package/ruby-rake/files
505 /usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/rake-*.gemspec
506 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/
508 define Package/ruby-rake/files-excluded
509 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/doc
510 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/test
511 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/*.rdoc
512 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/*.txt
513 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-10.4.2/lib/rake/runtest.rb
515 define Package/ruby-rake/install
516 $(INSTALL_DIR) $(1)/usr/bin
517 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rake $(1)/usr/bin/;
518 $(call RubyBuildPackage/install,rake,$(1))
521 define Package/ruby-rbconfig/files
522 /usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig.rb
523 /usr/lib/ruby/$(PKG_LIBVER)/rbconfig/*
524 /usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig/*.so
527 define Package/ruby-rdoc/files
528 /usr/lib/ruby/$(PKG_LIBVER)/rdoc.rb
529 /usr/lib/ruby/$(PKG_LIBVER)/rdoc
530 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rdoc-*
531 /usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rdoc-*.gemspec
533 define Package/ruby-rdoc/files-excluded
534 /usr/lib/ruby/$(PKG_LIBVER)/rdoc/test_case.rb
535 /usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/formatter_test_case.rb
536 /usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/text_formatter_test_case.rb
538 define Package/ruby-rdoc/install
539 $(INSTALL_DIR) $(1)/usr/bin
540 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdoc $(1)/usr/bin/
541 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ri $(1)/usr/bin/
542 $(call RubyBuildPackage/install,rdoc,$(1))
545 define Package/ruby-readline/files
546 /usr/lib/ruby/$(PKG_LIBVER)/*/readline.so
549 define Package/ruby-rexml/files
550 /usr/lib/ruby/$(PKG_LIBVER)/rexml
553 define Package/ruby-rinda/files
554 /usr/lib/ruby/$(PKG_LIBVER)/rinda
557 define Package/ruby-ripper/files
558 /usr/lib/ruby/$(PKG_LIBVER)/ripper.rb
559 /usr/lib/ruby/$(PKG_LIBVER)/ripper
560 /usr/lib/ruby/$(PKG_LIBVER)/*/ripper.so
563 define Package/ruby-rss/files
564 /usr/lib/ruby/$(PKG_LIBVER)/rss
565 /usr/lib/ruby/$(PKG_LIBVER)/rss.rb
568 define Package/ruby-sdbm/files
569 /usr/lib/ruby/$(PKG_LIBVER)/*/sdbm.so
572 define Package/ruby-shell/files
573 /usr/lib/ruby/$(PKG_LIBVER)/shell.rb
574 /usr/lib/ruby/$(PKG_LIBVER)/shell
577 define Package/ruby-socket/files
578 /usr/lib/ruby/$(PKG_LIBVER)/ipaddr.rb
579 /usr/lib/ruby/$(PKG_LIBVER)/resolv-replace.rb
580 /usr/lib/ruby/$(PKG_LIBVER)/resolv.rb
581 /usr/lib/ruby/$(PKG_LIBVER)/socket.rb
582 /usr/lib/ruby/$(PKG_LIBVER)/*/socket.so
585 define Package/ruby-testunit/files
586 /usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/test-unit-*.gemspec
587 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*
589 define Package/ruby-testunit/files-excluded
590 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/doc
591 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/test
592 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/sample
593 /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/*.md
596 define Package/ruby-unicodenormalize/files
597 /usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize.rb
598 /usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize
601 define Package/ruby-uri/files
602 /usr/lib/ruby/$(PKG_LIBVER)/uri.rb
603 /usr/lib/ruby/$(PKG_LIBVER)/uri
606 define Package/ruby-webrick/files
607 /usr/lib/ruby/$(PKG_LIBVER)/webrick
608 /usr/lib/ruby/$(PKG_LIBVER)/webrick.rb
611 define Package/ruby-xmlrpc/files
612 /usr/lib/ruby/$(PKG_LIBVER)/xmlrpc
613 /usr/lib/ruby/$(PKG_LIBVER)/xmlrpc.rb
616 define Package/ruby-yaml/files
617 /usr/lib/ruby/$(PKG_LIBVER)/yaml
618 /usr/lib/ruby/$(PKG_LIBVER)/yaml.rb
621 define Package/ruby-zlib/files
622 /usr/lib/ruby/$(PKG_LIBVER)/*/zlib.so
625 RUBY_FILES = $(strip $(call Package/ruby-$(1)/files))
626 RUBY_FILES_EXCLUDED = $(strip $(call Package/ruby-$(1)/files-excluded))
630 define RubyBuildPackage/install
632 cd $(PKG_INSTALL_DIR) && \
634 $(if $(RUBY_FILES_EXCLUDED),--exclude-from <(ls -1d $(patsubst /%,%,$(RUBY_FILES_EXCLUDED)))) \
635 --files-from <(ls -1d $(patsubst /%,%,$(RUBY_FILES))) \
637 [ -n "$(2)" ] && cd $(2) && $(TAR) -xf - \
643 # 3: dependencies on other packages
644 define RubyBuildPackage
648 ifndef Package/ruby-$(1)
649 define Package/ruby-$(1)
650 $(call Package/ruby/Default)
656 ifndef Package/ruby-$(1)/description
657 define Package/ruby-$(1)/description
658 This package contains the ruby $(2).
664 ifndef Package/ruby-$(1)/install
665 ifndef Package/ruby-$(1)/files
666 $$(error It must exists either a Package/ruby-$(1)/install or Package/ruby-$(1)/files)
669 define Package/ruby-$(1)/description +=
677 ifneq ($(RUBY_FILES_EXCLUDED),)
678 define Package/ruby-$(1)/description +=
682 - /%,$(RUBY_FILES_EXCLUDED))
687 Package/ruby-$(1)/install=$(call RubyBuildPackage/install,$(1),$$(1))
690 $$(eval $$(call BuildPackage,ruby-$(1)))
693 $(eval $(call BuildPackage,ruby))
694 $(eval $(call BuildPackage,libruby))
695 $(eval $(call RubyBuildPackage,bigdecimal,Arbitrary-precision decimal floating-point library,))
696 $(eval $(call RubyBuildPackage,cgi,CGI support toolkit,+ruby-filelib +ruby-pstore))
697 $(eval $(call RubyBuildPackage,csv,CSV library,+ruby-patterns +ruby-datetime +ruby-enc))
698 $(eval $(call RubyBuildPackage,datetime,date library))
699 $(eval $(call RubyBuildPackage,dbm,support for dbm,+libdb47))
700 $(eval $(call RubyBuildPackage,debuglib,debug library,+ruby-multithread +ruby-prettyprint))
701 $(eval $(call RubyBuildPackage,did-you-mean,did you mean? experience,+ruby-misc))
702 $(eval $(call RubyBuildPackage,digest,Digest Library,+RUBY_DIGEST_USE_OPENSSL:libopenssl))
703 $(eval $(call RubyBuildPackage,drb,distributed object system,+ruby-filelib +ruby-patterns +ruby-socket))
704 $(eval $(call RubyBuildPackage,enc,character re-coding library charset (small subset),))
705 $(eval $(call RubyBuildPackage,enc-extra,character re-coding library charset (extra subset),+ruby-enc))
706 $(eval $(call RubyBuildPackage,erb,(embedded interpreter),+ruby-cgi))
707 $(eval $(call RubyBuildPackage,fiddle,libffi wrapper,+libffi))
708 $(eval $(call RubyBuildPackage,filelib,file utils library,+ruby-enc +ruby-misc))
709 $(eval $(call RubyBuildPackage,gdbm,support for gdbm,+libgdbm))
710 $(eval $(call RubyBuildPackage,gems,gems packet management,+ruby-net +ruby-rdoc))
711 $(eval $(call RubyBuildPackage,io-console,Console interface,))
712 $(eval $(call RubyBuildPackage,irb,(interactive shell),+ruby-debuglib +ruby-filelib +ruby-math))
713 $(eval $(call RubyBuildPackage,json,support for JSON,+ruby-datetime +ruby-misc))
714 $(eval $(call RubyBuildPackage,logger,logger and syslog library,+ruby-multithread))
715 $(eval $(call RubyBuildPackage,math,math library,+ruby-patterns))
716 $(eval $(call RubyBuildPackage,minitest,Gem minitest,+ruby-gems))
717 $(eval $(call RubyBuildPackage,misc,standard libraries subset (miscellaneous files),))
718 $(eval $(call RubyBuildPackage,mkmf,makefile library,+ruby-filelib +ruby-optparse +ruby-rbconfig))
719 $(eval $(call RubyBuildPackage,multithread,multithread library,+ruby-misc))
720 $(eval $(call RubyBuildPackage,net,Network Protocols Library,+ruby-datetime +ruby-digest +ruby-filelib +ruby-uri))
721 $(eval $(call RubyBuildPackage,net-telnet,telnet client,+ruby-net))
722 $(eval $(call RubyBuildPackage,nkf,Network Kanji Filter,+ruby-enc))
723 $(eval $(call RubyBuildPackage,openssl,support for openssl,+ruby-enc +ruby-multithread +libopenssl))
724 $(eval $(call RubyBuildPackage,optparse,command-line option analysis,+ruby-misc))
725 $(eval $(call RubyBuildPackage,patterns,design patterns implementation,+ruby-multithread))
726 $(eval $(call RubyBuildPackage,powerassert,Gem power_assert,+ruby-ripper))
727 $(eval $(call RubyBuildPackage,prettyprint,PrettyPrint library,+ruby-misc))
728 $(eval $(call RubyBuildPackage,pstore,file based persistence,+ruby-digest +ruby-enc))
729 $(eval $(call RubyBuildPackage,psych,YAML parser and emitter,+ruby-bigdecimal +ruby-datetime +ruby-misc +ruby-enc +libyaml))
730 $(eval $(call RubyBuildPackage,racc,LALR parser generator,))
731 $(eval $(call RubyBuildPackage,rake,Rake (make replacement),+ruby-datetime +ruby-filelib +ruby-optparse +ruby-patterns +ruby-rbconfig))
732 $(eval $(call RubyBuildPackage,rbconfig,RbConfig,))
733 $(eval $(call RubyBuildPackage,rdoc,documentation generator,+ruby-erb +ruby-irb +ruby-json +ruby-racc +ruby-rake +ruby-yaml +ruby-zlib))
734 $(eval $(call RubyBuildPackage,readline,support for readline,+libncurses +libreadline))
735 $(eval $(call RubyBuildPackage,rexml,XML toolkit,+ruby-patterns +ruby-enc))
736 $(eval $(call RubyBuildPackage,rinda,Linda paradigm implementation,+ruby-drb))
737 $(eval $(call RubyBuildPackage,ripper,script parser,))
738 $(eval $(call RubyBuildPackage,rss,RSS toolkit,+ruby-net +ruby-nkf +ruby-rexml))
739 $(eval $(call RubyBuildPackage,sdbm,simple file-based key-value dbm implementation,))
740 $(eval $(call RubyBuildPackage,shell,idiomatic Ruby interface,+ruby-patterns))
741 $(eval $(call RubyBuildPackage,socket,socket support,+ruby-multithread))
742 $(eval $(call RubyBuildPackage,testunit,Gem test-unit,+ruby-csv +ruby-erb +ruby-optparse +ruby-powerassert +ruby-prettyprint +ruby-rexml +ruby-yaml))
743 $(eval $(call RubyBuildPackage,unicodenormalize,String additions for Unicode normalization,+ruby-enc +ruby-enc-extra))
744 $(eval $(call RubyBuildPackage,uri,library to handle URI,+ruby-socket +ruby-enc))
745 $(eval $(call RubyBuildPackage,webrick,Web server toolkit,+ruby-erb +ruby-net +ruby-patterns +ruby-rbconfig))
746 $(eval $(call RubyBuildPackage,xmlrpc,XML-RPC toolkit,+ruby-rexml +ruby-webrick))
747 $(eval $(call RubyBuildPackage,yaml,YAML toolkit,+ruby-dbm +ruby-pstore +ruby-psych))
748 $(eval $(call RubyBuildPackage,zlib,support for zlib,+zlib))
749 $(eval $(call BuildPackage,ruby-stdlib))
750 $(eval $(call HostBuild))