2 # Copyright (C) 2006-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
11 # - split up encodings
12 # - allow selection of either native or pure version of a library where supported
13 # +-> some native libraries are probably only supported if ruby-dl is enabled
16 include $(TOPDIR
)/rules.mk
20 PKG_VERSION
:=$(PKG_LIBVER
)-p243
23 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
24 PKG_SOURCE_URL
:=ftp
://ftp.ruby-lang.org
/pub
/ruby
/1.9/
25 PKG_MD5SUM
:=66d4f8403d13623051091347764881a0
27 PKG_BUILD_DEPENDS
:=ruby
/host
29 include $(INCLUDE_DIR
)/host-build.mk
30 include $(INCLUDE_DIR
)/package.mk
32 define Package
/ruby
/Default
36 TITLE
:=Ruby scripting language
37 URL
:=http
://www.ruby-lang.org
/
40 define Package
/ruby
/Default
/description
41 Ruby is the interpreted scripting language for quick and easy
42 object-oriented programming. It has many features to process text files
43 and to do system management tasks
(as in perl
). It is simple
,
44 straight-forward
, and extensible.
48 $(call Package
/ruby
/Default
)
53 define Package
/ruby
/description
54 $(call Package
/ruby
/Default
/description
)
57 define Package
/libruby
58 $(call Package
/ruby
/Default
)
62 TITLE
+= (shared library
)
65 # Ongoing work to break up ruby's standard library into coherent pieces
66 # with minimal dependencies between them
68 define Package
/ruby-core
69 $(call Package
/ruby
/Default
)
70 TITLE
:=Ruby standard libraries
74 define Package
/ruby-cgi
75 $(call Package
/ruby
/Default
)
76 TITLE
:=Ruby CGI support toolkit
80 define Package
/ruby-dl
81 $(call Package
/ruby
/Default
)
82 TITLE
+= (dynamic linker support
) (adds
5MB
+)
86 define Package
/ruby-enc
87 $(call Package
/ruby
/Default
)
88 TITLE
+= (character re-coding library
) (adds
2MB
+)
92 define Package
/ruby-erb
93 $(call Package
/ruby
/Default
)
94 TITLE
+= (embedded interpreter
)
98 define Package
/ruby-gdbm
99 $(call Package
/ruby
/Default
)
100 TITLE
:=Ruby support for gdbm
101 DEPENDS
:=ruby
+libgdbm
104 define Package
/ruby-gems
105 $(call Package
/ruby
/Default
)
106 TITLE
:=Ruby gems packet management
107 DEPENDS
:=ruby
+ruby-yaml
+ruby-zlib
+ruby-openssl
+ruby-webrick
+ruby-erb
110 define Package
/ruby-irb
111 $(call Package
/ruby
/Default
)
112 TITLE
+= (interactive
shell)
113 DEPENDS
:=ruby
+ruby-core
116 define Package
/ruby-json
117 $(call Package
/ruby
/Default
)
118 TITLE
:=Ruby support for JSON
122 define Package
/ruby-ncurses
123 $(call Package
/ruby
/Default
)
124 TITLE
:=Ruby support for ncurses
125 DEPENDS
:=ruby
+libncurses
128 define Package
/ruby-nkf
129 $(call Package
/ruby
/Default
)
130 TITLE
:=Ruby Network Kanji Filter
134 define Package
/ruby-openssl
135 $(call Package
/ruby
/Default
)
136 TITLE
:=Ruby support for openssl
137 DEPENDS
:=ruby
+libopenssl
140 define Package
/ruby-rdoc
141 $(call Package
/ruby
/Default
)
142 TITLE
+= (documentation generator
)
146 define Package
/ruby-rake
147 $(call Package
/ruby
/Default
)
148 TITLE
+=Ruby Rake
(make replacement
)
152 define Package
/ruby-readline
153 $(call Package
/ruby
/Default
)
154 TITLE
:=Ruby support for readline
155 DEPENDS
:=ruby
+libncurses
+libreadline
158 define Package
/ruby-rexml
159 $(call Package
/ruby
/Default
)
160 TITLE
:=Ruby XML toolkit
164 define Package
/ruby-rss
165 $(call Package
/ruby
/Default
)
166 TITLE
:=Ruby RSS toolkit
170 define Package
/ruby-unit
171 $(call Package
/ruby
/Default
)
172 TITLE
:=Ruby unit testing toolkit
176 define Package
/ruby-webrick
177 $(call Package
/ruby
/Default
)
178 TITLE
:=Ruby Web server toolkit
182 define Package
/ruby-xmlrpc
183 $(call Package
/ruby
/Default
)
184 TITLE
:=Ruby XML-RPC toolkit
188 define Package
/ruby-yaml
189 $(call Package
/ruby
/Default
)
190 TITLE
:=Ruby YAML toolkit
194 define Package
/ruby-zlib
195 $(call Package
/ruby
/Default
)
196 TITLE
:=Ruby support for zlib
206 --enable-wide-getaddrinfo \
209 ac_cv_func_setpgrp_void
=yes
211 TARGET_LDFLAGS
+= -L
$(PKG_BUILD_DIR
)
214 DESTDIR
="$(PKG_INSTALL_DIR)" \
218 define Package
/ruby
/install
219 $(INSTALL_DIR
) $(1)/usr
/bin
220 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ruby
$(1)/usr
/bin
/
223 define Package
/libruby
/install
224 $(INSTALL_DIR
) $(1)/usr
/lib
225 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libruby.so.
* $(1)/usr
/lib
/
228 define Package
/ruby-core
/install
229 $(INSTALL_DIR
) $(1)/usr
/lib
230 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
$(1)/usr
/lib
/
232 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/curses.so \
234 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/gdbm.so \
236 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/kconv.rb \
237 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/nkf.so \
239 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/digest \
240 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/digest.rb \
241 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest \
242 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest.so \
243 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl \
244 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl.rb \
245 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/openssl.so \
246 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/drb
/ssl.rb \
247 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/net
/https.rb \
248 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick
/ssl.rb \
250 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/dl.so \
252 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/enc \
254 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/readline.so \
255 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/completion.rb \
256 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/ext
/save-history.rb \
258 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/zlib.so \
260 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/erb.rb \
262 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/json.rb \
263 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/json \
264 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/json \
266 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb.rb \
267 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb \
269 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rdoc \
271 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake.rb \
272 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake \
274 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems.rb \
275 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems \
277 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi.rb \
278 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi \
280 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rexml \
282 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss \
283 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss.rb \
285 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/test \
287 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick \
288 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick.rb \
290 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/xmlrpc \
292 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml \
293 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml.rb \
294 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/syck.so \
296 find
$(1) -name
'*.h' | xargs
rm -f
299 define Package
/ruby-cgi
/install
300 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
301 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
302 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
305 define Package
/ruby-dl
/install
306 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
307 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/dl.so \
308 ) |
( cd
$(1); $(TAR
) -xf
- )
311 define Package
/ruby-enc
/install
312 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
313 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/enc \
314 ) |
( cd
$(1); $(TAR
) -xf
- )
317 define Package
/ruby-erb
/install
318 $(INSTALL_DIR
) $(1)/usr
/bin
319 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/erb
$(1)/usr
/bin
/
320 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
321 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/erb.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
324 define Package
/ruby-gdbm
/install
325 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
326 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/gdbm.so \
327 ) |
( cd
$(1); $(TAR
) -xf
- )
330 define Package
/ruby-gems
/install
331 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
332 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
333 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
336 define Package
/ruby-irb
/install
337 $(INSTALL_DIR
) $(1)/usr
/bin
338 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/irb
$(1)/usr
/bin
/
339 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
340 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
341 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
344 define Package
/ruby-json
/install
345 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
346 usr
/lib
/ruby
/$(PKG_LIBVER
)/json.rb \
347 usr
/lib
/ruby
/$(PKG_LIBVER
)/json \
348 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/json \
349 ) |
( cd
$(1); $(TAR
) -xf
- )
352 define Package
/ruby-ncurses
/install
353 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
354 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/curses.so \
355 ) |
( cd
$(1); $(TAR
) -xf
- )
358 define Package
/ruby-nkf
/install
359 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
360 usr
/lib
/ruby
/$(PKG_LIBVER
)/kconv.rb \
361 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/nkf.so \
362 ) |
( cd
$(1); $(TAR
) -xf
- )
365 define Package
/ruby-openssl
/install
366 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
367 usr
/lib
/ruby
/$(PKG_LIBVER
)/digest \
368 usr
/lib
/ruby
/$(PKG_LIBVER
)/digest.rb \
369 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest.so \
370 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest
/*.so \
371 usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl \
372 usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl.rb \
373 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/openssl.so \
374 usr
/lib
/ruby
/$(PKG_LIBVER
)/drb
/ssl.rb \
375 usr
/lib
/ruby
/$(PKG_LIBVER
)/net
/https.rb \
376 usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick
/ssl.rb \
377 ) |
( cd
$(1); $(TAR
) -xf
- )
380 define Package
/ruby-rdoc
/install
381 $(INSTALL_DIR
) $(1)/usr
/bin
382 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/rdoc
$(1)/usr
/bin
/
383 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ri
$(1)/usr
/bin
/
384 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
385 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rdoc
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
388 define Package
/ruby-rake
/install
389 $(INSTALL_DIR
) $(1)/usr
/bin
390 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/rake
$(1)/usr
/bin
/
391 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
392 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
393 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
396 define Package
/ruby-readline
/install
397 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
398 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/readline.so \
399 usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/completion.rb \
400 usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/ext
/save-history.rb \
401 ) |
( cd
$(1); $(TAR
) -xf
- )
404 define Package
/ruby-rexml
/install
405 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
406 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rexml
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
410 define Package
/ruby-rss
/install
411 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
412 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
413 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
416 define Package
/ruby-unit
/install
417 $(INSTALL_DIR
) $(1)/usr
/bin
418 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/testrb
$(1)/usr
/bin
/
419 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
420 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/test $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
423 define Package
/ruby-webrick
/install
424 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
425 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
426 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
429 define Package
/ruby-xmlrpc
/install
430 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
431 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/xmlrpc
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
434 define Package
/ruby-yaml
/install
435 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
436 usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml \
437 usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml.rb \
438 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/syck.so \
439 ) |
( cd
$(1); $(TAR
) -xf
- )
442 define Package
/ruby-zlib
/install
443 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
444 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/zlib.so \
445 ) |
( cd
$(1); $(TAR
) -xf
- )
448 define Build
/InstallDev
449 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
451 ) |
( cd
$(1); $(TAR
) -xf
- )
455 $(call Build
/Prepare
/Default
)
456 ( cd
$(PKG_BUILD_DIR
) ; \
462 $(eval
$(call BuildPackage
,ruby
))
463 $(eval
$(call BuildPackage
,libruby
))
464 $(eval
$(call BuildPackage
,ruby-core
))
465 $(eval
$(call BuildPackage
,ruby-cgi
))
466 $(eval
$(call BuildPackage
,ruby-dl
))
467 $(eval
$(call BuildPackage
,ruby-enc
))
468 $(eval
$(call BuildPackage
,ruby-erb
))
469 $(eval
$(call BuildPackage
,ruby-gdbm
))
470 $(eval
$(call BuildPackage
,ruby-gems
))
471 $(eval
$(call BuildPackage
,ruby-json
))
472 $(eval
$(call BuildPackage
,ruby-irb
))
473 $(eval
$(call BuildPackage
,ruby-ncurses
))
474 $(eval
$(call BuildPackage
,ruby-nkf
))
475 $(eval
$(call BuildPackage
,ruby-openssl
))
476 $(eval
$(call BuildPackage
,ruby-rake
))
477 $(eval
$(call BuildPackage
,ruby-rdoc
))
478 $(eval
$(call BuildPackage
,ruby-readline
))
479 $(eval
$(call BuildPackage
,ruby-rexml
))
480 $(eval
$(call BuildPackage
,ruby-rss
))
481 $(eval
$(call BuildPackage
,ruby-unit
))
482 $(eval
$(call BuildPackage
,ruby-webrick
))
483 $(eval
$(call BuildPackage
,ruby-xmlrpc
))
484 $(eval
$(call BuildPackage
,ruby-yaml
))
485 $(eval
$(call BuildPackage
,ruby-zlib
))
486 $(eval
$(call HostBuild
))