2 # Copyright (C) 2006-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
10 # - split up encodings
11 # - allow selection of either native or pure version of a library where supported
12 # +-> some native libraries are probably only supported if ruby-dl is enabled
15 include $(TOPDIR
)/rules.mk
19 PKG_VERSION
:=$(PKG_LIBVER
)-p376
22 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
23 PKG_SOURCE_URL
:=ftp
://ftp.ruby-lang.org
/pub
/ruby
/1.9/
24 PKG_MD5SUM
:=ebb20550a11e7f1a2fbd6fdec2a3e0a3
26 PKG_BUILD_DEPENDS
:=ruby
/host
28 include $(INCLUDE_DIR
)/host-build.mk
29 include $(INCLUDE_DIR
)/package.mk
31 define Package
/ruby
/Default
35 TITLE
:=Ruby scripting language
36 URL
:=http
://www.ruby-lang.org
/
39 define Package
/ruby
/Default
/description
40 Ruby is the interpreted scripting language for quick and easy
41 object-oriented programming. It has many features to process text files
42 and to do system management tasks
(as in perl
). It is simple
,
43 straight-forward
, and extensible.
47 $(call Package
/ruby
/Default
)
52 define Package
/ruby
/description
53 $(call Package
/ruby
/Default
/description
)
56 define Package
/libruby
57 $(call Package
/ruby
/Default
)
61 TITLE
+= (shared library
)
64 # Ongoing work to break up ruby's standard library into coherent pieces
65 # with minimal dependencies between them
67 define Package
/ruby-core
68 $(call Package
/ruby
/Default
)
69 TITLE
:=Ruby standard libraries
73 define Package
/ruby-cgi
74 $(call Package
/ruby
/Default
)
75 TITLE
:=Ruby CGI support toolkit
79 define Package
/ruby-dl
80 $(call Package
/ruby
/Default
)
81 TITLE
+= (dynamic linker support
) (adds
5MB
+)
85 define Package
/ruby-enc
86 $(call Package
/ruby
/Default
)
87 TITLE
+= (character re-coding library
) (adds
2MB
+)
91 define Package
/ruby-erb
92 $(call Package
/ruby
/Default
)
93 TITLE
+= (embedded interpreter
)
97 define Package
/ruby-gdbm
98 $(call Package
/ruby
/Default
)
99 TITLE
:=Ruby support for gdbm
100 DEPENDS
:=ruby
+libgdbm
103 define Package
/ruby-gems
104 $(call Package
/ruby
/Default
)
105 TITLE
:=Ruby gems packet management
106 DEPENDS
:=ruby
+ruby-yaml
+ruby-zlib
+ruby-openssl
+ruby-webrick
+ruby-erb
109 define Package
/ruby-irb
110 $(call Package
/ruby
/Default
)
111 TITLE
+= (interactive
shell)
112 DEPENDS
:=ruby
+ruby-core
115 define Package
/ruby-json
116 $(call Package
/ruby
/Default
)
117 TITLE
:=Ruby support for JSON
121 define Package
/ruby-ncurses
122 $(call Package
/ruby
/Default
)
123 TITLE
:=Ruby support for ncurses
124 DEPENDS
:=ruby
+libncurses
127 define Package
/ruby-nkf
128 $(call Package
/ruby
/Default
)
129 TITLE
:=Ruby Network Kanji Filter
133 define Package
/ruby-openssl
134 $(call Package
/ruby
/Default
)
135 TITLE
:=Ruby support for openssl
136 DEPENDS
:=ruby
+libopenssl
139 define Package
/ruby-rdoc
140 $(call Package
/ruby
/Default
)
141 TITLE
+= (documentation generator
)
145 define Package
/ruby-rake
146 $(call Package
/ruby
/Default
)
147 TITLE
+=Ruby Rake
(make replacement
)
151 define Package
/ruby-readline
152 $(call Package
/ruby
/Default
)
153 TITLE
:=Ruby support for readline
154 DEPENDS
:=ruby
+libncurses
+libreadline
157 define Package
/ruby-rexml
158 $(call Package
/ruby
/Default
)
159 TITLE
:=Ruby XML toolkit
163 define Package
/ruby-rss
164 $(call Package
/ruby
/Default
)
165 TITLE
:=Ruby RSS toolkit
169 define Package
/ruby-unit
170 $(call Package
/ruby
/Default
)
171 TITLE
:=Ruby unit testing toolkit
175 define Package
/ruby-webrick
176 $(call Package
/ruby
/Default
)
177 TITLE
:=Ruby Web server toolkit
181 define Package
/ruby-xmlrpc
182 $(call Package
/ruby
/Default
)
183 TITLE
:=Ruby XML-RPC toolkit
187 define Package
/ruby-yaml
188 $(call Package
/ruby
/Default
)
189 TITLE
:=Ruby YAML toolkit
193 define Package
/ruby-zlib
194 $(call Package
/ruby
/Default
)
195 TITLE
:=Ruby support for zlib
205 --enable-wide-getaddrinfo \
208 ac_cv_func_setpgrp_void
=yes
210 TARGET_LDFLAGS
+= -L
$(PKG_BUILD_DIR
)
213 DESTDIR
="$(PKG_INSTALL_DIR)" \
218 $(call Build
/Prepare
/Default
)
219 ( cd
$(PKG_BUILD_DIR
) ; \
224 define Package
/ruby
/install
225 $(INSTALL_DIR
) $(1)/usr
/bin
226 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ruby
$(1)/usr
/bin
/
229 define Package
/libruby
/install
230 $(INSTALL_DIR
) $(1)/usr
/lib
231 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libruby.so.
* $(1)/usr
/lib
/
234 define Package
/ruby-core
/install
235 $(INSTALL_DIR
) $(1)/usr
/lib
236 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
$(1)/usr
/lib
/
238 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/curses.so \
240 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/gdbm.so \
242 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/kconv.rb \
243 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/nkf.so \
245 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/digest \
246 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/digest.rb \
247 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest \
248 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest.so \
249 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl \
250 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl.rb \
251 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/openssl.so \
252 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/drb
/ssl.rb \
253 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/net
/https.rb \
254 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick
/ssl.rb \
256 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/dl.so \
258 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/enc \
260 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/readline.so \
261 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/completion.rb \
262 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/ext
/save-history.rb \
264 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/zlib.so \
266 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/erb.rb \
268 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/json.rb \
269 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/json \
270 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/json \
272 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb.rb \
273 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb \
275 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rdoc \
277 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake.rb \
278 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake \
280 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems.rb \
281 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems \
283 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi.rb \
284 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi \
286 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rexml \
288 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss \
289 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss.rb \
291 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/test \
293 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick \
294 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick.rb \
296 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/xmlrpc \
298 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml \
299 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml.rb \
300 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/syck.so \
302 find
$(1) -name
'*.h' | xargs
rm -f
305 define Package
/ruby-cgi
/install
306 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
307 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
308 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
311 define Package
/ruby-dl
/install
312 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
313 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/dl.so \
314 ) |
( cd
$(1); $(TAR
) -xf
- )
317 define Package
/ruby-enc
/install
318 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
319 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/enc \
320 ) |
( cd
$(1); $(TAR
) -xf
- )
323 define Package
/ruby-erb
/install
324 $(INSTALL_DIR
) $(1)/usr
/bin
325 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/erb
$(1)/usr
/bin
/
326 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
327 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/erb.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
330 define Package
/ruby-gdbm
/install
331 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
332 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/gdbm.so \
333 ) |
( cd
$(1); $(TAR
) -xf
- )
336 define Package
/ruby-gems
/install
337 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
338 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
339 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
342 define Package
/ruby-irb
/install
343 $(INSTALL_DIR
) $(1)/usr
/bin
344 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/irb
$(1)/usr
/bin
/
345 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
346 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
347 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
350 define Package
/ruby-json
/install
351 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
352 usr
/lib
/ruby
/$(PKG_LIBVER
)/json.rb \
353 usr
/lib
/ruby
/$(PKG_LIBVER
)/json \
354 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/json \
355 ) |
( cd
$(1); $(TAR
) -xf
- )
358 define Package
/ruby-ncurses
/install
359 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
360 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/curses.so \
361 ) |
( cd
$(1); $(TAR
) -xf
- )
364 define Package
/ruby-nkf
/install
365 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
366 usr
/lib
/ruby
/$(PKG_LIBVER
)/kconv.rb \
367 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/nkf.so \
368 ) |
( cd
$(1); $(TAR
) -xf
- )
371 define Package
/ruby-openssl
/install
372 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
373 usr
/lib
/ruby
/$(PKG_LIBVER
)/digest \
374 usr
/lib
/ruby
/$(PKG_LIBVER
)/digest.rb \
375 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest.so \
376 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest
/*.so \
377 usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl \
378 usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl.rb \
379 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/openssl.so \
380 usr
/lib
/ruby
/$(PKG_LIBVER
)/drb
/ssl.rb \
381 usr
/lib
/ruby
/$(PKG_LIBVER
)/net
/https.rb \
382 usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick
/ssl.rb \
383 ) |
( cd
$(1); $(TAR
) -xf
- )
386 define Package
/ruby-rdoc
/install
387 $(INSTALL_DIR
) $(1)/usr
/bin
388 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/rdoc
$(1)/usr
/bin
/
389 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ri
$(1)/usr
/bin
/
390 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
391 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rdoc
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
394 define Package
/ruby-rake
/install
395 $(INSTALL_DIR
) $(1)/usr
/bin
396 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/rake
$(1)/usr
/bin
/
397 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
398 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
399 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
402 define Package
/ruby-readline
/install
403 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
404 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/readline.so \
405 usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/completion.rb \
406 usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/ext
/save-history.rb \
407 ) |
( cd
$(1); $(TAR
) -xf
- )
410 define Package
/ruby-rexml
/install
411 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
412 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rexml
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
416 define Package
/ruby-rss
/install
417 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
418 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
419 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
422 define Package
/ruby-unit
/install
423 $(INSTALL_DIR
) $(1)/usr
/bin
424 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/testrb
$(1)/usr
/bin
/
425 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
426 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/test $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
429 define Package
/ruby-webrick
/install
430 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
431 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
432 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
435 define Package
/ruby-xmlrpc
/install
436 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
437 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/xmlrpc
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
440 define Package
/ruby-yaml
/install
441 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
442 usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml \
443 usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml.rb \
444 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/syck.so \
445 ) |
( cd
$(1); $(TAR
) -xf
- )
448 define Package
/ruby-zlib
/install
449 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
450 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/zlib.so \
451 ) |
( cd
$(1); $(TAR
) -xf
- )
454 define Build
/InstallDev
455 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
457 ) |
( cd
$(1); $(TAR
) -xf
- )
460 $(eval
$(call BuildPackage
,ruby
))
461 $(eval
$(call BuildPackage
,libruby
))
462 $(eval
$(call BuildPackage
,ruby-core
))
463 $(eval
$(call BuildPackage
,ruby-cgi
))
464 $(eval
$(call BuildPackage
,ruby-dl
))
465 $(eval
$(call BuildPackage
,ruby-enc
))
466 $(eval
$(call BuildPackage
,ruby-erb
))
467 $(eval
$(call BuildPackage
,ruby-gdbm
))
468 $(eval
$(call BuildPackage
,ruby-gems
))
469 $(eval
$(call BuildPackage
,ruby-json
))
470 $(eval
$(call BuildPackage
,ruby-irb
))
471 $(eval
$(call BuildPackage
,ruby-ncurses
))
472 $(eval
$(call BuildPackage
,ruby-nkf
))
473 $(eval
$(call BuildPackage
,ruby-openssl
))
474 $(eval
$(call BuildPackage
,ruby-rake
))
475 $(eval
$(call BuildPackage
,ruby-rdoc
))
476 $(eval
$(call BuildPackage
,ruby-readline
))
477 $(eval
$(call BuildPackage
,ruby-rexml
))
478 $(eval
$(call BuildPackage
,ruby-rss
))
479 $(eval
$(call BuildPackage
,ruby-unit
))
480 $(eval
$(call BuildPackage
,ruby-webrick
))
481 $(eval
$(call BuildPackage
,ruby-xmlrpc
))
482 $(eval
$(call BuildPackage
,ruby-yaml
))
483 $(eval
$(call BuildPackage
,ruby-zlib
))
484 $(eval
$(call HostBuild
))