You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1380 lines
38 KiB

  1. #
  2. # Copyright (C) 2006-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. # To Do:
  8. # - dirs not removed when uninstalling!
  9. #
  10. include $(TOPDIR)/rules.mk
  11. PKG_NAME:=ruby
  12. PKG_VERSION:=2.2.2
  13. PKG_RELEASE:=3
  14. PKG_LIBVER:=2.2
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  16. PKG_SOURCE_URL:=http://cache.ruby-lang.org/pub/ruby/$(PKG_LIBVER)/
  17. PKG_MD5SUM:=af6eb4fa7247f1f7b2e19c8e6f3e3145
  18. PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
  19. PKG_LICENSE:=BSD-2-Clause
  20. PKG_LICENSE_FILES:=COPYING
  21. PKG_BUILD_DEPENDS:=ruby/host
  22. PKG_INSTALL:=1
  23. PKG_BUILD_PARALLEL:=1
  24. PKG_FIXUP:=autoreconf
  25. include $(INCLUDE_DIR)/host-build.mk
  26. include $(INCLUDE_DIR)/package.mk
  27. include $(INCLUDE_DIR)/nls.mk
  28. define Package/ruby/Default
  29. SUBMENU:=Ruby
  30. SECTION:=lang
  31. CATEGORY:=Languages
  32. TITLE:=Ruby scripting language
  33. URL:=http://www.ruby-lang.org/
  34. endef
  35. define Package/ruby/Default/description
  36. Ruby is the interpreted scripting language for quick and easy
  37. object-oriented programming. It has many features to process text files
  38. and to do system management tasks (as in perl). It is simple,
  39. straight-forward, and extensible.
  40. endef
  41. define Package/ruby
  42. $(call Package/ruby/Default)
  43. TITLE+= (interpreter)
  44. DEPENDS:=+libruby
  45. endef
  46. define Package/ruby/description
  47. $(call Package/ruby/Default/description)
  48. endef
  49. define Package/libruby
  50. $(call Package/ruby/Default)
  51. SUBMENU:=
  52. SECTION:=libs
  53. CATEGORY:=Libraries
  54. TITLE+= (shared library)
  55. DEPENDS+= +libpthread +librt +libgmp
  56. endef
  57. define Package/ruby-stdlib
  58. $(call Package/ruby/Default)
  59. TITLE:=Ruby standard libraries (metadata for all stdlib subsets)
  60. DEPENDS:=ruby +ruby-misc +ruby-bigdecimal +ruby-cgi +ruby-csv +ruby-datetime +ruby-dbm +ruby-debuglib\
  61. +ruby-digest +ruby-drb +ruby-enc +ruby-enc-extra +ruby-erb +ruby-gdbm +ruby-gems \
  62. +ruby-json +ruby-io-console +ruby-irb +ruby-fiddle +ruby-filelib +ruby-logger +ruby-math \
  63. +ruby-minitest +ruby-mkmf +ruby-multithread +ruby-nkf +ruby-net +ruby-openssl +ruby-optparse \
  64. +ruby-patterns +ruby-powerassert +ruby-prettyprint +ruby-pstore +ruby-psych +ruby-racc +ruby-rake \
  65. +ruby-rbconfig +ruby-rdoc +ruby-readline +ruby-rexml +ruby-rinda +ruby-ripper +ruby-rss +ruby-sdbm \
  66. +ruby-shell +ruby-socket +ruby-testunit +ruby-unicodenormalize +ruby-uri +ruby-webrick +ruby-xmlrpc \
  67. +ruby-yaml +ruby-zlib
  68. endef
  69. define Package/ruby-stdlib/description
  70. This metapackage currently install all ruby-* packages,
  71. providing a complete Ruby Standard Library.
  72. endef
  73. define Package/ruby-bigdecimal
  74. $(call Package/ruby/Default)
  75. TITLE:=Arbitrary-precision decimal floating-point lib for Ruby
  76. DEPENDS:=ruby
  77. endef
  78. define Package/ruby-bigdecimal/description
  79. Provides bigdecimal* files
  80. endef
  81. define Package/ruby-cgi
  82. $(call Package/ruby/Default)
  83. TITLE:=Ruby CGI support toolkit
  84. DEPENDS:=ruby +ruby-filelib +ruby-pstore
  85. endef
  86. define Package/ruby-bigdecimal/description
  87. Provides bigdecimal* files
  88. endef
  89. define Package/ruby-csv
  90. $(call Package/ruby/Default)
  91. TITLE+=CSV library
  92. DEPENDS:=ruby +ruby-patterns +ruby-datetime +ruby-enc
  93. endef
  94. define Package/ruby-csv/description
  95. Provides csv.rb file
  96. endef
  97. define Package/ruby-datetime
  98. $(call Package/ruby/Default)
  99. TITLE+= date library
  100. DEPENDS:=ruby
  101. endef
  102. define Package/ruby-datetime/description
  103. Provides date.rb and time.rb
  104. endef
  105. define Package/ruby-dbm
  106. $(call Package/ruby/Default)
  107. TITLE:=Ruby support for dbm
  108. DEPENDS:=ruby +libdb47
  109. endef
  110. define Package/ruby-dbm/description
  111. The DBM class provides a wrapper to a Unix-style dbm or Database Manager library.
  112. This package provides dbm.so file.
  113. endef
  114. define Package/ruby-debuglib
  115. $(call Package/ruby/Default)
  116. TITLE+= debug library
  117. DEPENDS:=ruby +ruby-multithread +ruby-prettyprint
  118. endef
  119. define Package/ruby-debuglib/description
  120. Provides files for debugging:
  121. - benchmark.rb
  122. - debug.rb
  123. - objspace.so
  124. - profile.rb
  125. - profiler.rb
  126. - tracer.rb
  127. endef
  128. define Package/ruby-digest
  129. $(call Package/ruby/Default)
  130. TITLE:=Ruby Digest Library
  131. DEPENDS:=ruby +RUBY_DIGEST_USE_OPENSSL:libopenssl
  132. endef
  133. define Package/ruby-digest/description
  134. Provides digest* files. Can be configured to use OpenSSL or
  135. bundled hash functions.
  136. endef
  137. define Package/ruby-digest/config
  138. config RUBY_DIGEST_USE_OPENSSL
  139. bool "Use OpenSSL functions for ruby digest hash functions"
  140. depends on PACKAGE_ruby-digest
  141. help
  142. Ruby can use OpenSSL hash functions or compile alternative implementations. Using
  143. OpenSSL saves about 30KBytes (less when compressed) but requires OpenSSL (that
  144. is way bigger than that). However, if OpenSSL is already needed by another usage,
  145. as ruby-openssl or any other non ruby package, it is better to mark this option.
  146. default n
  147. endef
  148. define Package/ruby-drb
  149. $(call Package/ruby/Default)
  150. TITLE:=Ruby distributed object system
  151. DEPENDS:=ruby +ruby-filelib +ruby-patterns +ruby-socket
  152. endef
  153. define Package/ruby-drb/description
  154. Provides drb* files
  155. endef
  156. define Package/ruby-enc
  157. $(call Package/ruby/Default)
  158. TITLE:=Ruby character re-coding library charset (small subset)
  159. DEPENDS:=ruby
  160. endef
  161. define Package/ruby-enc/description
  162. Provides ruby encoding library for encodings used directly by
  163. libraries in Ruby Standard Library:
  164. - enc/encdb.so
  165. - enc/euc_jp.so
  166. - enc/iso_8859_1.so
  167. - enc/utf_16be.so
  168. - enc/utf_16le.so
  169. - enc/utf_32be.so
  170. - enc/utf_32le.so
  171. FYI: ASCII-8BIT, UTF-7, UTF-8 and US-ASCII are already in Core.
  172. endef
  173. define Package/ruby-enc-extra
  174. $(call Package/ruby/Default)
  175. TITLE:=Ruby character re-coding library charset (extra subset)
  176. DEPENDS:=ruby +ruby-enc
  177. endef
  178. define Package/ruby-enc-extra/description
  179. Provides extra encodings not provided by ruby-enc:
  180. - enc/big5.so
  181. - enc/cp949.so
  182. - enc/emacs_mule.so
  183. - enc/euc_kr.so
  184. - enc/euc_tw.so
  185. - enc/gb18030.so
  186. - enc/gb2312.so
  187. - enc/gbk.so
  188. - enc/iso_8859_10.so
  189. - enc/iso_8859_11.so
  190. - enc/iso_8859_13.so
  191. - enc/iso_8859_14.so
  192. - enc/iso_8859_15.so
  193. - enc/iso_8859_16.so
  194. - enc/iso_8859_2.so
  195. - enc/iso_8859_3.so
  196. - enc/iso_8859_4.so
  197. - enc/iso_8859_5.so
  198. - enc/iso_8859_6.so
  199. - enc/iso_8859_7.so
  200. - enc/iso_8859_8.so
  201. - enc/iso_8859_9.so
  202. - enc/koi8_r.so
  203. - enc/koi8_u.so
  204. - enc/shift_jis.so
  205. - enc/trans/big5.so
  206. - enc/trans/chinese.so
  207. - enc/trans/emoji.so
  208. - enc/trans/emoji_iso2022_kddi.so
  209. - enc/trans/emoji_sjis_docomo.so
  210. - enc/trans/emoji_sjis_kddi.so
  211. - enc/trans/emoji_sjis_softbank.so
  212. - enc/trans/escape.so
  213. - enc/trans/gb18030.so
  214. - enc/trans/gbk.so
  215. - enc/trans/iso2022.so
  216. - enc/trans/japanese.so
  217. - enc/trans/japanese_euc.so
  218. - enc/trans/japanese_sjis.so
  219. - enc/trans/korean.so
  220. - enc/trans/single_byte.so
  221. - enc/trans/transdb.so
  222. - enc/trans/utf8_mac.so
  223. - enc/trans/utf_16_32.so
  224. - enc/windows_1251.so
  225. - enc/windows_31j.so
  226. endef
  227. define Package/ruby-erb
  228. $(call Package/ruby/Default)
  229. TITLE+= (embedded interpreter)
  230. DEPENDS:=ruby +ruby-cgi
  231. endef
  232. define Package/ruby-erb/description
  233. Provides erb* files
  234. endef
  235. define Package/ruby-fiddle
  236. $(call Package/ruby/Default)
  237. TITLE:=A libffi wrapper for Ruby
  238. DEPENDS:=ruby +libffi
  239. endef
  240. define Package/ruby-fiddle/description
  241. Provides fiddle* files
  242. endef
  243. define Package/ruby-filelib
  244. $(call Package/ruby/Default)
  245. TITLE+= File utils library
  246. DEPENDS:=ruby +ruby-enc +ruby-misc
  247. endef
  248. define Package/ruby-filelib/description
  249. Provides filesystem interaction files, including
  250. path and temp:
  251. - fileutils.rb
  252. - find.rb
  253. - pathname.rb
  254. - pathname.so
  255. - tempfile.rb
  256. - tmpdir.rb
  257. endef
  258. define Package/ruby-gdbm
  259. $(call Package/ruby/Default)
  260. TITLE:=Ruby support for gdbm
  261. DEPENDS:=ruby +libgdbm
  262. endef
  263. define Package/ruby-gdbm/description
  264. Provides gdbm* files
  265. endef
  266. define Package/ruby-gems
  267. $(call Package/ruby/Default)
  268. TITLE:=Ruby gems packet management
  269. DEPENDS:=ruby +ruby-net +ruby-rdoc
  270. endef
  271. define Package/ruby-gems/description
  272. Provides rubygems for gems usage, download and installation
  273. endef
  274. define Package/ruby-io-console
  275. $(call Package/ruby/Default)
  276. TITLE+= Console interface
  277. DEPENDS:=ruby
  278. endef
  279. define Package/ruby-io-console/description
  280. Provides io-console* files
  281. endef
  282. define Package/ruby-irb
  283. $(call Package/ruby/Default)
  284. TITLE+= (interactive shell)
  285. DEPENDS:=ruby +ruby-debuglib +ruby-filelib +ruby-math
  286. endef
  287. define Package/ruby-irb/description
  288. Provides irb* files
  289. endef
  290. define Package/ruby-json
  291. $(call Package/ruby/Default)
  292. TITLE:=Ruby support for JSON
  293. DEPENDS:=ruby +ruby-datetime +ruby-misc
  294. endef
  295. define Package/ruby-json/description
  296. Provides json* files
  297. endef
  298. define Package/ruby-logger
  299. $(call Package/ruby/Default)
  300. TITLE+= logger and syslog library
  301. DEPENDS:=ruby +ruby-multithread
  302. endef
  303. define Package/ruby-logger/description
  304. Provides log library, including syslog:
  305. - logger.rb
  306. - syslog.so
  307. - syslog/logger.rb
  308. endef
  309. define Package/ruby-math
  310. $(call Package/ruby/Default)
  311. TITLE+= math library
  312. DEPENDS:=ruby +ruby-patterns
  313. endef
  314. define Package/ruby-math/description
  315. Provides math related files:
  316. - cmath.rb
  317. - complex.rb
  318. - mathn.rb
  319. - mathn/complex.so
  320. - mathn/rational.so
  321. - matrix.rb
  322. - matrix/eigenvalue_decomposition.rb
  323. - matrix/lup_decomposition.rb
  324. - prime.rb
  325. - rational.rb
  326. endef
  327. define Package/ruby-minitest
  328. $(call Package/ruby/Default)
  329. TITLE:=Gem minitest shipped with Ruby
  330. DEPENDS:=ruby +ruby-gems
  331. endef
  332. define Package/ruby-minitest/description
  333. Provides minitest gem
  334. endef
  335. define Package/ruby-misc
  336. $(call Package/ruby/Default)
  337. TITLE:=Ruby standard libraries subset (miscelaneous files)
  338. DEPENDS:=ruby
  339. endef
  340. define Package/ruby-misc/description
  341. This package contains miscellaneous files from stdlib
  342. not splitted in other ruby packages like stringio:
  343. - English.rb
  344. - abbrev.rb
  345. - base64.rb
  346. - continuation.so
  347. - coverage.so
  348. - delegate.rb
  349. - e2mmap.rb
  350. - etc.so
  351. - expect.rb
  352. - fcntl.so
  353. - fiber.so
  354. - getoptlong.rb
  355. - open3.rb
  356. - ostruct.rb
  357. - pty.so
  358. - scanf.rb
  359. - securerandom.rb
  360. - set.rb
  361. - shellwords.rb
  362. - stringio.so
  363. - strscan.so
  364. - tsort.rb
  365. - weakref.rb
  366. endef
  367. define Package/ruby-mkmf
  368. $(call Package/ruby/Default)
  369. TITLE+= makefile library
  370. DEPENDS:=ruby +ruby-filelib +ruby-optparse +ruby-rbconfig
  371. endef
  372. define Package/ruby-mkmf/description
  373. Provides mkmf* files
  374. endef
  375. define Package/ruby-multithread
  376. $(call Package/ruby/Default)
  377. TITLE+= multithread library
  378. DEPENDS:=ruby +ruby-misc
  379. endef
  380. define Package/ruby-multithread/description
  381. Provides files for multithread usage:
  382. - io/nonblock.so
  383. - io/wait.so
  384. - thread.so (FYI, Thread is a core class)
  385. - monitor.rb
  386. - mutex_m.rb
  387. - sync.rb
  388. - thwait.rb
  389. - timeout.rb
  390. endef
  391. define Package/ruby-net
  392. $(call Package/ruby/Default)
  393. TITLE:=Ruby Network Protocols Library
  394. DEPENDS:=ruby +ruby-datetime +ruby-digest +ruby-filelib +ruby-uri
  395. endef
  396. define Package/ruby-net/description
  397. Provides net* files
  398. endef
  399. define Package/ruby-nkf
  400. $(call Package/ruby/Default)
  401. TITLE:=Ruby Network Kanji Filter
  402. DEPENDS:=ruby +ruby-enc
  403. endef
  404. define Package/ruby-nkf/description
  405. Provides nkf* files
  406. endef
  407. define Package/ruby-openssl
  408. $(call Package/ruby/Default)
  409. TITLE:=Ruby support for openssl
  410. DEPENDS:=ruby +ruby-enc +libopenssl +ruby-misc
  411. endef
  412. define Package/ruby-openssl/description
  413. Provides openssl* files
  414. endef
  415. define Package/ruby-optparse
  416. $(call Package/ruby/Default)
  417. TITLE:=Ruby command-line option analysis
  418. DEPENDS:=ruby +ruby-misc
  419. endef
  420. define Package/ruby-optparse/description
  421. Provides optparse* files
  422. endef
  423. define Package/ruby-patterns
  424. $(call Package/ruby/Default)
  425. TITLE:=Ruby design patterns implementation
  426. DEPENDS:=ruby +ruby-multithread
  427. endef
  428. define Package/ruby-patterns/description
  429. Provides design patterns helpers files:
  430. - forwardable.rb
  431. - observer.rb
  432. - singleton.rb
  433. endef
  434. define Package/ruby-powerassert
  435. $(call Package/ruby/Default)
  436. TITLE:=Gem power_assert shipped with Ruby
  437. DEPENDS:=ruby +ruby-ripper
  438. endef
  439. define Package/ruby-powerassert/description
  440. Power Assert gem for Ruby. Power Assert shows each value of variables
  441. and method calls in the expression. It is useful for testing, providing
  442. which value wasn't correct when the condition is not satisfied
  443. endef
  444. define Package/ruby-prettyprint
  445. $(call Package/ruby/Default)
  446. TITLE:=Ruby PrettyPrint librart
  447. DEPENDS:=ruby +ruby-misc
  448. endef
  449. define Package/ruby-prettyprint/description
  450. Provides Pretty Print library:
  451. - pp.rb
  452. - prettyprint.rb
  453. endef
  454. define Package/ruby-pstore
  455. $(call Package/ruby/Default)
  456. TITLE+=file based persistence
  457. DEPENDS:=ruby +ruby-digest +ruby-enc
  458. endef
  459. define Package/ruby-pstore/description
  460. Provides pstore.rb file
  461. endef
  462. define Package/ruby-psych
  463. $(call Package/ruby/Default)
  464. TITLE+=YAML parser and emitter
  465. DEPENDS:=ruby +ruby-bigdecimal +ruby-datetime +ruby-misc +ruby-enc +libyaml
  466. endef
  467. define Package/ruby-psych/description
  468. Provides psych* files
  469. endef
  470. define Package/ruby-racc
  471. $(call Package/ruby/Default)
  472. TITLE:=LALR parser generator in Ruby
  473. DEPENDS:=ruby
  474. endef
  475. define Package/ruby-racc/description
  476. Provides racc* files
  477. endef
  478. define Package/ruby-rake
  479. $(call Package/ruby/Default)
  480. TITLE+=Ruby Rake (make replacement)
  481. DEPENDS:=ruby +ruby-datetime +ruby-filelib +ruby-optparse +ruby-patterns +ruby-rbconfig
  482. endef
  483. define Package/ruby-rake/description
  484. Provides rake* files
  485. endef
  486. define Package/ruby-rbconfig
  487. $(call Package/ruby/Default)
  488. TITLE+=Ruby RbConfig
  489. DEPENDS:=ruby
  490. endef
  491. define Package/ruby-rbconfig/description
  492. Provides rbconfig file
  493. endef
  494. define Package/ruby-rdoc
  495. $(call Package/ruby/Default)
  496. TITLE+= (documentation generator)
  497. DEPENDS:=ruby +ruby-erb +ruby-irb +ruby-json +ruby-racc +ruby-rake +ruby-yaml +ruby-zlib
  498. endef
  499. define Package/ruby-rdoc/description
  500. Provides rdoc* and ri files
  501. endef
  502. define Package/ruby-readline
  503. $(call Package/ruby/Default)
  504. TITLE:=Ruby support for readline
  505. DEPENDS:=ruby +libncurses +libreadline
  506. endef
  507. define Package/ruby-readline/description
  508. Provides readline* files
  509. endef
  510. define Package/ruby-rexml
  511. $(call Package/ruby/Default)
  512. TITLE:=Ruby XML toolkit
  513. DEPENDS:=ruby +ruby-patterns +ruby-enc
  514. endef
  515. define Package/ruby-rexml/description
  516. Provides rexml* files
  517. endef
  518. define Package/ruby-rinda
  519. $(call Package/ruby/Default)
  520. TITLE:=Ruby Linda paradigm implementation
  521. DEPENDS:=ruby +ruby-drb
  522. endef
  523. define Package/ruby-rinda/description
  524. Provides rinda* files
  525. endef
  526. define Package/ruby-ripper
  527. $(call Package/ruby/Default)
  528. TITLE:=Ruby script parser
  529. DEPENDS:=ruby
  530. endef
  531. define Package/ruby-ripper/description
  532. Provides ripper* files
  533. endef
  534. define Package/ruby-rss
  535. $(call Package/ruby/Default)
  536. TITLE:=Ruby RSS toolkit
  537. DEPENDS:=ruby +ruby-net +ruby-nkf +ruby-rexml
  538. endef
  539. define Package/ruby-rss/description
  540. Provides rss* files
  541. endef
  542. define Package/ruby-sdbm
  543. $(call Package/ruby/Default)
  544. TITLE:=Ruby simple file-based key-value dbm implementation
  545. DEPENDS:=ruby
  546. endef
  547. define Package/ruby-sdbm/description
  548. Provides sdbm* files
  549. endef
  550. define Package/ruby-shell
  551. $(call Package/ruby/Default)
  552. TITLE:=Ruby idiomatic Ruby interface
  553. DEPENDS:=ruby +ruby-patterns
  554. endef
  555. define Package/ruby-shell/description
  556. Provides shell* files
  557. endef
  558. define Package/ruby-socket
  559. $(call Package/ruby/Default)
  560. TITLE+= socket support
  561. DEPENDS:=ruby +ruby-multithread
  562. endef
  563. define Package/ruby-socket/description
  564. Provides socket-related files:
  565. - gserver.rb
  566. - ipaddr.rb
  567. - resolv-replace.rb
  568. - resolv.rb
  569. - socket.rb
  570. - socket.so
  571. endef
  572. define Package/ruby-testunit
  573. $(call Package/ruby/Default)
  574. TITLE:=Gem test-unit shipped with Ruby
  575. DEPENDS:=ruby +ruby-csv +ruby-erb +ruby-optparse +ruby-powerassert +ruby-prettyprint +ruby-rexml +ruby-yaml
  576. endef
  577. define Package/ruby-testunit/description
  578. Provides test/unit* files
  579. endef
  580. define Package/ruby-unicodenormalize
  581. $(call Package/ruby/Default)
  582. TITLE:=Ruby String additions for Unicode normalization
  583. DEPENDS:=ruby +ruby-enc +ruby-enc-extra
  584. endef
  585. define Package/ruby-unicodenormalize/description
  586. Additions to class String for Unicode normalization
  587. endef
  588. define Package/ruby-uri
  589. $(call Package/ruby/Default)
  590. TITLE:=Ruby library to handle URI
  591. DEPENDS:=ruby +ruby-socket +ruby-enc
  592. endef
  593. define Package/ruby-uri/description
  594. Provides uri* files
  595. endef
  596. define Package/ruby-webrick
  597. $(call Package/ruby/Default)
  598. TITLE:=Ruby Web server toolkit
  599. DEPENDS:=ruby +ruby-erb +ruby-net +ruby-patterns +ruby-rbconfig
  600. endef
  601. define Package/ruby-webrick/description
  602. Provides webrick* files
  603. endef
  604. define Package/ruby-xmlrpc
  605. $(call Package/ruby/Default)
  606. TITLE:=Ruby XML-RPC toolkit
  607. DEPENDS:=ruby +ruby-rexml +ruby-webrick
  608. endef
  609. define Package/ruby-xmlrpc/description
  610. Provides xmlrpc* files
  611. endef
  612. define Package/ruby-yaml
  613. $(call Package/ruby/Default)
  614. TITLE:=Ruby YAML toolkit
  615. DEPENDS:=ruby +ruby-dbm +ruby-pstore +ruby-psych
  616. endef
  617. define Package/ruby-yaml/description
  618. Provides yaml* files
  619. endef
  620. define Package/ruby-zlib
  621. $(call Package/ruby/Default)
  622. TITLE:=Ruby support for zlib
  623. DEPENDS:=ruby +zlib
  624. endef
  625. define Package/ruby-zlib/description
  626. Provides zlib* files
  627. endef
  628. HOST_CONFIGURE_ARGS += \
  629. --disable-install-doc \
  630. --disable-install-rdoc \
  631. --disable-install-capi \
  632. --with-static-linked-ext \
  633. --with-out-ext=tk,tk/tkutil,win32,win32ole,dbm,gdbm,readline \
  634. # even not used, host build with restricted exts results in gems not being
  635. # compiling for target (probably some cross compiling problem like checking
  636. # host for selecting target features)
  637. # --with-out-ext \
  638. # --with-ext=thread,stringio \
  639. CONFIGURE_ARGS += \
  640. --enable-shared \
  641. --enable-static \
  642. --disable-rpath \
  643. $(call autoconf_bool,CONFIG_IPV6,ipv6) \
  644. --disable-install-doc \
  645. --disable-install-capi \
  646. --with-ruby-version=minor \
  647. --with-iconv-dir=$(ICONV_PREFIX) \
  648. --with-out-ext=tk,tk/tkutil,win32,win32ole
  649. ifndef CONFIG_RUBY_DIGEST_USE_OPENSSL
  650. CONFIGURE_ARGS += \
  651. --with-bundled-sha1\
  652. --with-bundled-md5\
  653. --with-bundled-rmd160\
  654. --with-bundled-sha2 \
  655. endif
  656. TARGET_LDFLAGS += -L$(PKG_BUILD_DIR)
  657. MAKE_FLAGS += \
  658. DESTDIR="$(PKG_INSTALL_DIR)" \
  659. SHELL="/bin/bash"
  660. define Package/ruby/install
  661. $(INSTALL_DIR) $(1)/usr/bin
  662. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  663. $(INSTALL_DIR) $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)
  664. $(INSTALL_DIR) $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)
  665. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/lib/ruby/ruby$(PKG_LIBVER)-bin
  666. $(INSTALL_BIN) ./files/ruby $(1)/usr/bin/ruby
  667. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/
  668. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/
  669. sed -i -e "s%@RUBY_LIBPATH@%/usr/lib/ruby/$(PKG_LIBVER)%" $(1)/usr/bin/ruby
  670. sed -i -e "s%@RUBY_BINPATH@%/usr/lib/ruby/ruby$(PKG_LIBVER)-bin%" $(1)/usr/bin/ruby
  671. endef
  672. define Package/libruby/install
  673. $(INSTALL_DIR) $(1)/usr/lib
  674. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so.* $(1)/usr/lib/
  675. endef
  676. define Package/ruby-stdlib/install
  677. # nothing to do
  678. endef
  679. define Package/ruby-bigdecimal/install
  680. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  681. usr/lib/ruby/$(PKG_LIBVER)/*/bigdecimal.so \
  682. usr/lib/ruby/$(PKG_LIBVER)/bigdecimal/ \
  683. usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/bigdecimal-*.gemspec \
  684. ) | ( cd $(1); $(TAR) -xf - )
  685. endef
  686. define Package/ruby-cgi/install
  687. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  688. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  689. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  690. endef
  691. define Package/ruby-csv/install
  692. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  693. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/csv.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  694. endef
  695. define Package/ruby-datetime/install
  696. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  697. usr/lib/ruby/$(PKG_LIBVER)/time.rb \
  698. usr/lib/ruby/$(PKG_LIBVER)/date.rb \
  699. usr/lib/ruby/$(PKG_LIBVER)/*/date_core.so \
  700. ) | ( cd $(1); $(TAR) -xf - )
  701. endef
  702. define Package/ruby-dbm/install
  703. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  704. usr/lib/ruby/$(PKG_LIBVER)/*/dbm.so \
  705. ) | ( cd $(1); $(TAR) -xf - )
  706. endef
  707. define Package/ruby-debuglib/install
  708. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  709. usr/lib/ruby/$(PKG_LIBVER)/profile.rb \
  710. usr/lib/ruby/$(PKG_LIBVER)/profiler.rb \
  711. usr/lib/ruby/$(PKG_LIBVER)/debug.rb \
  712. usr/lib/ruby/$(PKG_LIBVER)/tracer.rb \
  713. usr/lib/ruby/$(PKG_LIBVER)/benchmark.rb \
  714. usr/lib/ruby/$(PKG_LIBVER)/*/objspace.so \
  715. ) | ( cd $(1); $(TAR) -xf - )
  716. endef
  717. define Package/ruby-digest/install
  718. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  719. usr/lib/ruby/$(PKG_LIBVER)/digest \
  720. usr/lib/ruby/$(PKG_LIBVER)/digest.rb \
  721. usr/lib/ruby/$(PKG_LIBVER)/*/digest.so \
  722. usr/lib/ruby/$(PKG_LIBVER)/*/digest/* \
  723. ) | ( cd $(1); $(TAR) -xf - )
  724. endef
  725. define Package/ruby-drb/install
  726. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  727. usr/lib/ruby/$(PKG_LIBVER)/drb.rb \
  728. usr/lib/ruby/$(PKG_LIBVER)/drb \
  729. ) | ( cd $(1); $(TAR) -xf - )
  730. endef
  731. define Package/ruby-enc/install
  732. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  733. usr/lib/ruby/$(PKG_LIBVER)/*/enc/encdb.so \
  734. usr/lib/ruby/$(PKG_LIBVER)/*/enc/iso_8859_1.so \
  735. usr/lib/ruby/$(PKG_LIBVER)/*/enc/utf_* \
  736. usr/lib/ruby/$(PKG_LIBVER)/*/enc/euc_jp.so \
  737. ) | ( cd $(1); $(TAR) -xf - )
  738. endef
  739. define Package/ruby-enc-extra/install
  740. ( cd $(PKG_INSTALL_DIR); $(TAR) \
  741. --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/encdb.so \
  742. --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/iso_8859_1.so \
  743. --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/utf_* \
  744. --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/euc_jp.so \
  745. -cf - \
  746. usr/lib/ruby/$(PKG_LIBVER)/*/enc \
  747. ) | ( cd $(1); $(TAR) -xf - )
  748. endef
  749. define Package/ruby-erb/install
  750. $(INSTALL_DIR) $(1)/usr/bin
  751. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/erb $(1)/usr/bin/
  752. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  753. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/erb.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  754. endef
  755. define Package/ruby-fiddle/install
  756. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  757. usr/lib/ruby/$(PKG_LIBVER)/fiddle.rb \
  758. usr/lib/ruby/$(PKG_LIBVER)/fiddle/ \
  759. usr/lib/ruby/$(PKG_LIBVER)/*/fiddle.so \
  760. ) | ( cd $(1); $(TAR) -xf - )
  761. endef
  762. define Package/ruby-filelib/install
  763. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  764. usr/lib/ruby/$(PKG_LIBVER)/tmpdir.rb \
  765. usr/lib/ruby/$(PKG_LIBVER)/tempfile.rb \
  766. usr/lib/ruby/$(PKG_LIBVER)/pathname.rb \
  767. usr/lib/ruby/$(PKG_LIBVER)/*/pathname.so \
  768. usr/lib/ruby/$(PKG_LIBVER)/find.rb \
  769. usr/lib/ruby/$(PKG_LIBVER)/fileutils.rb \
  770. ) | ( cd $(1); $(TAR) -xf - )
  771. endef
  772. define Package/ruby-gdbm/install
  773. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  774. usr/lib/ruby/$(PKG_LIBVER)/*/gdbm.so \
  775. ) | ( cd $(1); $(TAR) -xf - )
  776. endef
  777. define Package/ruby-gems/install
  778. $(INSTALL_DIR) $(1)/usr/bin
  779. $(CP) $(PKG_INSTALL_DIR)/usr/bin/gem $(1)/usr/bin/
  780. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  781. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/ubygems.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  782. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  783. # Remove tests (avoids extra deps)
  784. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/test_case.rb
  785. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/package/tar_test_case.rb
  786. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/installer_test_case.rb
  787. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  788. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
  789. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
  790. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/doc
  791. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/cache
  792. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/extensions
  793. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/build_info
  794. endef
  795. define Package/ruby-io-console/install
  796. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  797. usr/lib/ruby/$(PKG_LIBVER)/*/io/console.so \
  798. usr/lib/ruby/$(PKG_LIBVER)/io/console/ \
  799. usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/io-console-*.gemspec \
  800. ) | ( cd $(1); $(TAR) -xf - )
  801. endef
  802. define Package/ruby-irb/install
  803. $(INSTALL_DIR) $(1)/usr/bin
  804. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/irb $(1)/usr/bin/
  805. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  806. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/irb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  807. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/irb.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  808. endef
  809. define Package/ruby-json/install
  810. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  811. usr/lib/ruby/$(PKG_LIBVER)/json.rb \
  812. usr/lib/ruby/$(PKG_LIBVER)/json \
  813. usr/lib/ruby/$(PKG_LIBVER)/*/json \
  814. usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/json-*.gemspec \
  815. ) | ( cd $(1); $(TAR) -xf - )
  816. rm -rf \
  817. $(1)/usr/lib/ruby/$(PKG_LIBVER)/psych/json
  818. endef
  819. define Package/ruby-logger/install
  820. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  821. usr/lib/ruby/$(PKG_LIBVER)/logger.rb \
  822. usr/lib/ruby/$(PKG_LIBVER)/syslog/logger.rb \
  823. usr/lib/ruby/$(PKG_LIBVER)/*/syslog.so \
  824. ) | ( cd $(1); $(TAR) -xf - )
  825. endef
  826. define Package/ruby-math/install
  827. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  828. usr/lib/ruby/$(PKG_LIBVER)/prime.rb \
  829. usr/lib/ruby/$(PKG_LIBVER)/mathn.rb \
  830. usr/lib/ruby/$(PKG_LIBVER)/cmath.rb \
  831. usr/lib/ruby/$(PKG_LIBVER)/*/mathn \
  832. usr/lib/ruby/$(PKG_LIBVER)/matrix.rb \
  833. usr/lib/ruby/$(PKG_LIBVER)/matrix \
  834. ) | ( cd $(1); $(TAR) -xf - )
  835. endef
  836. define Package/ruby-minitest/install
  837. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
  838. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
  839. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/minitest-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
  840. # Remove tests (avoids extra deps)
  841. $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/test
  842. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
  843. endef
  844. define Package/ruby-misc/install
  845. $(INSTALL_DIR) $(1)/usr/lib
  846. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  847. usr/lib/ruby/$(PKG_LIBVER)/English.rb \
  848. usr/lib/ruby/$(PKG_LIBVER)/abbrev.rb \
  849. usr/lib/ruby/$(PKG_LIBVER)/base64.rb \
  850. usr/lib/ruby/$(PKG_LIBVER)/delegate.rb \
  851. usr/lib/ruby/$(PKG_LIBVER)/e2mmap.rb \
  852. usr/lib/ruby/$(PKG_LIBVER)/expect.rb \
  853. usr/lib/ruby/$(PKG_LIBVER)/getoptlong.rb \
  854. usr/lib/ruby/$(PKG_LIBVER)/open3.rb \
  855. usr/lib/ruby/$(PKG_LIBVER)/ostruct.rb \
  856. usr/lib/ruby/$(PKG_LIBVER)/scanf.rb \
  857. usr/lib/ruby/$(PKG_LIBVER)/securerandom.rb \
  858. usr/lib/ruby/$(PKG_LIBVER)/set.rb \
  859. usr/lib/ruby/$(PKG_LIBVER)/shellwords.rb \
  860. usr/lib/ruby/$(PKG_LIBVER)/tsort.rb \
  861. usr/lib/ruby/$(PKG_LIBVER)/weakref.rb \
  862. usr/lib/ruby/$(PKG_LIBVER)/*/continuation.so \
  863. usr/lib/ruby/$(PKG_LIBVER)/*/coverage.so \
  864. usr/lib/ruby/$(PKG_LIBVER)/*/etc.so \
  865. usr/lib/ruby/$(PKG_LIBVER)/*/fcntl.so \
  866. usr/lib/ruby/$(PKG_LIBVER)/*/fiber.so \
  867. usr/lib/ruby/$(PKG_LIBVER)/*/pty.so \
  868. usr/lib/ruby/$(PKG_LIBVER)/*/stringio.so \
  869. usr/lib/ruby/$(PKG_LIBVER)/*/strscan.so \
  870. ) | ( cd $(1); $(TAR) -xf - )
  871. endef
  872. define Package/ruby-mkmf/install
  873. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  874. usr/lib/ruby/$(PKG_LIBVER)/mkmf.rb \
  875. usr/lib/ruby/$(PKG_LIBVER)/un.rb \
  876. ) | ( cd $(1); $(TAR) -xf - )
  877. endef
  878. define Package/ruby-multithread/install
  879. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  880. usr/lib/ruby/$(PKG_LIBVER)/monitor.rb \
  881. usr/lib/ruby/$(PKG_LIBVER)/timeout.rb \
  882. usr/lib/ruby/$(PKG_LIBVER)/thwait.rb \
  883. usr/lib/ruby/$(PKG_LIBVER)/mutex_m.rb \
  884. usr/lib/ruby/$(PKG_LIBVER)/sync.rb \
  885. usr/lib/ruby/$(PKG_LIBVER)/*/thread.so \
  886. usr/lib/ruby/$(PKG_LIBVER)/*/io/wait.so \
  887. usr/lib/ruby/$(PKG_LIBVER)/*/io/nonblock.so \
  888. ) | ( cd $(1); $(TAR) -xf - )
  889. endef
  890. define Package/ruby-net/install
  891. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  892. usr/lib/ruby/$(PKG_LIBVER)/open-uri.rb \
  893. usr/lib/ruby/$(PKG_LIBVER)/net/* \
  894. ) | ( cd $(1); $(TAR) -xf - )
  895. endef
  896. define Package/ruby-nkf/install
  897. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  898. usr/lib/ruby/$(PKG_LIBVER)/kconv.rb \
  899. usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so \
  900. ) | ( cd $(1); $(TAR) -xf - )
  901. endef
  902. define Package/ruby-openssl/install
  903. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  904. usr/lib/ruby/$(PKG_LIBVER)/openssl \
  905. usr/lib/ruby/$(PKG_LIBVER)/openssl.rb \
  906. usr/lib/ruby/$(PKG_LIBVER)/*/openssl.so \
  907. ) | ( cd $(1); $(TAR) -xf - )
  908. endef
  909. define Package/ruby-optparse/install
  910. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  911. usr/lib/ruby/$(PKG_LIBVER)/optparse.rb \
  912. usr/lib/ruby/$(PKG_LIBVER)/optionparser.rb \
  913. usr/lib/ruby/$(PKG_LIBVER)/optparse \
  914. ) | ( cd $(1); $(TAR) -xf - )
  915. endef
  916. define Package/ruby-patterns/install
  917. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  918. usr/lib/ruby/$(PKG_LIBVER)/observer.rb \
  919. usr/lib/ruby/$(PKG_LIBVER)/singleton.rb \
  920. usr/lib/ruby/$(PKG_LIBVER)/forwardable.rb \
  921. ) | ( cd $(1); $(TAR) -xf - )
  922. endef
  923. define Package/ruby-powerassert/install
  924. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
  925. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
  926. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/power_assert-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
  927. # Remove tests (avoids extra deps)
  928. $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-*/test
  929. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
  930. endef
  931. define Package/ruby-prettyprint/install
  932. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  933. usr/lib/ruby/$(PKG_LIBVER)/pp.rb \
  934. usr/lib/ruby/$(PKG_LIBVER)/prettyprint.rb \
  935. ) | ( cd $(1); $(TAR) -xf - )
  936. endef
  937. define Package/ruby-pstore/install
  938. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  939. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/pstore.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  940. endef
  941. define Package/ruby-psych/install
  942. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  943. usr/lib/ruby/$(PKG_LIBVER)/psych \
  944. usr/lib/ruby/$(PKG_LIBVER)/psych.rb \
  945. usr/lib/ruby/$(PKG_LIBVER)/*/psych.so \
  946. usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/psych-*.gemspec \
  947. ) | ( cd $(1); $(TAR) -xf - )
  948. endef
  949. define Package/ruby-racc/install
  950. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  951. usr/lib/ruby/$(PKG_LIBVER)/racc \
  952. usr/lib/ruby/$(PKG_LIBVER)/*/racc/*.so \
  953. ) | ( cd $(1); $(TAR) -xf - )
  954. endef
  955. define Package/ruby-rake/install
  956. $(INSTALL_DIR) $(1)/usr/bin
  957. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rake $(1)/usr/bin/
  958. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  959. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  960. # Remove tests (avoids extra deps)
  961. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake/runtest.rb
  962. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  963. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
  964. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
  965. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rake-*.gemspec \
  966. $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/
  967. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
  968. endef
  969. define Package/ruby-rbconfig/install
  970. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  971. usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig.rb \
  972. usr/lib/ruby/$(PKG_LIBVER)/rbconfig/* \
  973. usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig/*.so \
  974. ) | ( cd $(1); $(TAR) -xf - )
  975. endef
  976. define Package/ruby-rdoc/install
  977. $(INSTALL_DIR) $(1)/usr/bin
  978. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdoc $(1)/usr/bin/
  979. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ri $(1)/usr/bin/
  980. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  981. # Remove tests (avoids extra deps)
  982. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/test_case.rb
  983. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/formatter_test_case.rb
  984. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/text_formatter_test_case.rb
  985. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  986. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  987. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
  988. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
  989. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rdoc-*.gemspec \
  990. $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/
  991. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rdoc-* \
  992. $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
  993. endef
  994. define Package/ruby-readline/install
  995. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  996. usr/lib/ruby/$(PKG_LIBVER)/*/readline.so \
  997. ) | ( cd $(1); $(TAR) -xf - )
  998. endef
  999. define Package/ruby-rexml/install
  1000. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  1001. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rexml $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1002. endef
  1003. define Package/ruby-rinda/install
  1004. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1005. usr/lib/ruby/$(PKG_LIBVER)/rinda \
  1006. ) | ( cd $(1); $(TAR) -xf - )
  1007. endef
  1008. define Package/ruby-ripper/install
  1009. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1010. usr/lib/ruby/$(PKG_LIBVER)/ripper.rb \
  1011. usr/lib/ruby/$(PKG_LIBVER)/ripper \
  1012. usr/lib/ruby/$(PKG_LIBVER)/*/ripper.so \
  1013. ) | ( cd $(1); $(TAR) -xf - )
  1014. endef
  1015. define Package/ruby-rss/install
  1016. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  1017. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rss $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1018. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rss.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1019. endef
  1020. define Package/ruby-sdbm/install
  1021. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1022. usr/lib/ruby/$(PKG_LIBVER)/*/sdbm.so \
  1023. ) | ( cd $(1); $(TAR) -xf - )
  1024. endef
  1025. define Package/ruby-shell/install
  1026. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1027. usr/lib/ruby/$(PKG_LIBVER)/shell.rb \
  1028. usr/lib/ruby/$(PKG_LIBVER)/shell \
  1029. ) | ( cd $(1); $(TAR) -xf - )
  1030. endef
  1031. define Package/ruby-socket/install
  1032. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1033. usr/lib/ruby/$(PKG_LIBVER)/ipaddr.rb \
  1034. usr/lib/ruby/$(PKG_LIBVER)/resolv-replace.rb \
  1035. usr/lib/ruby/$(PKG_LIBVER)/resolv.rb \
  1036. usr/lib/ruby/$(PKG_LIBVER)/socket.rb \
  1037. usr/lib/ruby/$(PKG_LIBVER)/*/socket.so \
  1038. ) | ( cd $(1); $(TAR) -xf - )
  1039. endef
  1040. define Package/ruby-testunit/install
  1041. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
  1042. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
  1043. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/test-unit-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
  1044. # Remove tests (avoids extra deps)
  1045. $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/test
  1046. $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/sample
  1047. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
  1048. endef
  1049. define Package/ruby-unicodenormalize/install
  1050. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1051. usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize.rb \
  1052. usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize \
  1053. ) | ( cd $(1); $(TAR) -xf - )
  1054. endef
  1055. define Package/ruby-uri/install
  1056. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1057. usr/lib/ruby/$(PKG_LIBVER)/uri.rb \
  1058. usr/lib/ruby/$(PKG_LIBVER)/uri \
  1059. ) | ( cd $(1); $(TAR) -xf - )
  1060. endef
  1061. define Package/ruby-webrick/install
  1062. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  1063. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/webrick $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1064. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/webrick.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1065. endef
  1066. define Package/ruby-xmlrpc/install
  1067. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  1068. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1069. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1070. endef
  1071. define Package/ruby-yaml/install
  1072. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1073. usr/lib/ruby/$(PKG_LIBVER)/yaml \
  1074. usr/lib/ruby/$(PKG_LIBVER)/yaml.rb \
  1075. ) | ( cd $(1); $(TAR) -xf - )
  1076. endef
  1077. define Package/ruby-zlib/install
  1078. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1079. usr/lib/ruby/$(PKG_LIBVER)/*/zlib.so \
  1080. ) | ( cd $(1); $(TAR) -xf - )
  1081. endef
  1082. define Build/InstallDev
  1083. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1084. . \
  1085. ) | ( cd $(1); $(TAR) -xf - )
  1086. endef
  1087. $(eval $(call BuildPackage,ruby))
  1088. $(eval $(call BuildPackage,libruby))
  1089. $(eval $(call BuildPackage,ruby-stdlib))
  1090. $(eval $(call BuildPackage,ruby-bigdecimal))
  1091. $(eval $(call BuildPackage,ruby-cgi))
  1092. $(eval $(call BuildPackage,ruby-csv))
  1093. $(eval $(call BuildPackage,ruby-datetime))
  1094. $(eval $(call BuildPackage,ruby-dbm))
  1095. $(eval $(call BuildPackage,ruby-debuglib))
  1096. $(eval $(call BuildPackage,ruby-digest))
  1097. $(eval $(call BuildPackage,ruby-drb))
  1098. $(eval $(call BuildPackage,ruby-enc))
  1099. $(eval $(call BuildPackage,ruby-enc-extra))
  1100. $(eval $(call BuildPackage,ruby-erb))
  1101. $(eval $(call BuildPackage,ruby-fiddle))
  1102. $(eval $(call BuildPackage,ruby-filelib))
  1103. $(eval $(call BuildPackage,ruby-gdbm))
  1104. $(eval $(call BuildPackage,ruby-gems))
  1105. $(eval $(call BuildPackage,ruby-io-console))
  1106. $(eval $(call BuildPackage,ruby-irb))
  1107. $(eval $(call BuildPackage,ruby-json))
  1108. $(eval $(call BuildPackage,ruby-logger))
  1109. $(eval $(call BuildPackage,ruby-math))
  1110. $(eval $(call BuildPackage,ruby-minitest))
  1111. $(eval $(call BuildPackage,ruby-misc))
  1112. $(eval $(call BuildPackage,ruby-mkmf))
  1113. $(eval $(call BuildPackage,ruby-multithread))
  1114. $(eval $(call BuildPackage,ruby-net))
  1115. $(eval $(call BuildPackage,ruby-nkf))
  1116. $(eval $(call BuildPackage,ruby-openssl))
  1117. $(eval $(call BuildPackage,ruby-optparse))
  1118. $(eval $(call BuildPackage,ruby-patterns))
  1119. $(eval $(call BuildPackage,ruby-powerassert))
  1120. $(eval $(call BuildPackage,ruby-prettyprint))
  1121. $(eval $(call BuildPackage,ruby-pstore))
  1122. $(eval $(call BuildPackage,ruby-psych))
  1123. $(eval $(call BuildPackage,ruby-racc))
  1124. $(eval $(call BuildPackage,ruby-rake))
  1125. $(eval $(call BuildPackage,ruby-rbconfig))
  1126. $(eval $(call BuildPackage,ruby-rdoc))
  1127. $(eval $(call BuildPackage,ruby-readline))
  1128. $(eval $(call BuildPackage,ruby-rexml))
  1129. $(eval $(call BuildPackage,ruby-rinda))
  1130. $(eval $(call BuildPackage,ruby-ripper))
  1131. $(eval $(call BuildPackage,ruby-rss))
  1132. $(eval $(call BuildPackage,ruby-sdbm))
  1133. $(eval $(call BuildPackage,ruby-shell))
  1134. $(eval $(call BuildPackage,ruby-socket))
  1135. $(eval $(call BuildPackage,ruby-testunit))
  1136. $(eval $(call BuildPackage,ruby-unicodenormalize))
  1137. $(eval $(call BuildPackage,ruby-uri))
  1138. $(eval $(call BuildPackage,ruby-webrick))
  1139. $(eval $(call BuildPackage,ruby-xmlrpc))
  1140. $(eval $(call BuildPackage,ruby-yaml))
  1141. $(eval $(call BuildPackage,ruby-zlib))
  1142. $(eval $(call HostBuild))