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
/ftptls.rb \
248 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/net
/https.rb \
249 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/net
/telnets.rb \
250 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick
/ssl.rb \
252 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/dl.so \
254 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/enc \
256 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/readline.so \
257 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/completion.rb \
258 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/ext
/save-history.rb \
260 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/zlib.so \
262 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/erb.rb \
264 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/json.rb \
265 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/json \
266 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/json \
268 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb.rb \
269 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb \
271 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rdoc \
273 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake.rb \
274 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake \
276 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems.rb \
277 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems \
279 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi.rb \
280 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi \
282 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rexml \
284 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss \
285 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss.rb \
287 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/test \
289 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick \
290 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick.rb \
292 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/xmlrpc \
294 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml \
295 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml.rb \
296 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/syck.so \
298 find
$(1) -name
'*.h' | xargs
rm -f
301 define Package
/ruby-cgi
/install
302 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
303 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
304 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
307 define Package
/ruby-dl
/install
308 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
309 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/dl.so \
310 ) |
( cd
$(1); $(TAR
) -xf
- )
313 define Package
/ruby-enc
/install
314 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
315 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/enc \
316 ) |
( cd
$(1); $(TAR
) -xf
- )
319 define Package
/ruby-erb
/install
320 $(INSTALL_DIR
) $(1)/usr
/bin
321 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/erb
$(1)/usr
/bin
/
322 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
323 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/erb.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
326 define Package
/ruby-gdbm
/install
327 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
328 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/gdbm.so \
329 ) |
( cd
$(1); $(TAR
) -xf
- )
332 define Package
/ruby-gems
/install
333 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
334 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
335 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
338 define Package
/ruby-irb
/install
339 $(INSTALL_DIR
) $(1)/usr
/bin
340 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/irb
$(1)/usr
/bin
/
341 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
342 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
343 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
346 define Package
/ruby-json
/install
347 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
348 usr
/lib
/ruby
/$(PKG_LIBVER
)/json.rb \
349 usr
/lib
/ruby
/$(PKG_LIBVER
)/json \
350 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/json \
351 ) |
( cd
$(1); $(TAR
) -xf
- )
354 define Package
/ruby-ncurses
/install
355 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
356 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/curses.so \
357 ) |
( cd
$(1); $(TAR
) -xf
- )
360 define Package
/ruby-nkf
/install
361 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
362 usr
/lib
/ruby
/$(PKG_LIBVER
)/kconv.rb \
363 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/nkf.so \
364 ) |
( cd
$(1); $(TAR
) -xf
- )
367 define Package
/ruby-openssl
/install
368 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
369 usr
/lib
/ruby
/$(PKG_LIBVER
)/digest \
370 usr
/lib
/ruby
/$(PKG_LIBVER
)/digest.rb \
371 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest.so \
372 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest
/*.so \
373 usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl \
374 usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl.rb \
375 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/openssl.so \
376 usr
/lib
/ruby
/$(PKG_LIBVER
)/drb
/ssl.rb \
377 usr
/lib
/ruby
/$(PKG_LIBVER
)/net
/ftptls.rb \
378 usr
/lib
/ruby
/$(PKG_LIBVER
)/net
/https.rb \
379 usr
/lib
/ruby
/$(PKG_LIBVER
)/net
/telnets.rb \
380 usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick
/ssl.rb \
381 ) |
( cd
$(1); $(TAR
) -xf
- )
384 define Package
/ruby-rdoc
/install
385 $(INSTALL_DIR
) $(1)/usr
/bin
386 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/rdoc
$(1)/usr
/bin
/
387 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ri
$(1)/usr
/bin
/
388 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
389 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rdoc
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
392 define Package
/ruby-rake
/install
393 $(INSTALL_DIR
) $(1)/usr
/bin
394 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/rake
$(1)/usr
/bin
/
395 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
396 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
397 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
400 define Package
/ruby-readline
/install
401 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
402 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/readline.so \
403 usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/completion.rb \
404 usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/ext
/save-history.rb \
405 ) |
( cd
$(1); $(TAR
) -xf
- )
408 define Package
/ruby-rexml
/install
409 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
410 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rexml
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
414 define Package
/ruby-rss
/install
415 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
416 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
417 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
420 define Package
/ruby-unit
/install
421 $(INSTALL_DIR
) $(1)/usr
/bin
422 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/testrb
$(1)/usr
/bin
/
423 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
424 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/test $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
427 define Package
/ruby-webrick
/install
428 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
429 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
430 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
433 define Package
/ruby-xmlrpc
/install
434 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
435 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/xmlrpc
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
438 define Package
/ruby-yaml
/install
439 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
440 usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml \
441 usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml.rb \
442 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/syck.so \
443 ) |
( cd
$(1); $(TAR
) -xf
- )
446 define Package
/ruby-zlib
/install
447 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
448 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/zlib.so \
449 ) |
( cd
$(1); $(TAR
) -xf
- )
452 define Build
/InstallDev
453 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
455 ) |
( cd
$(1); $(TAR
) -xf
- )
459 $(call Build
/Prepare
/Default
)
460 ( cd
$(PKG_BUILD_DIR
) ; \
466 $(eval
$(call BuildPackage
,ruby
))
467 $(eval
$(call BuildPackage
,libruby
))
468 $(eval
$(call BuildPackage
,ruby-core
))
469 $(eval
$(call BuildPackage
,ruby-cgi
))
470 $(eval
$(call BuildPackage
,ruby-dl
))
471 $(eval
$(call BuildPackage
,ruby-enc
))
472 $(eval
$(call BuildPackage
,ruby-erb
))
473 $(eval
$(call BuildPackage
,ruby-gdbm
))
474 $(eval
$(call BuildPackage
,ruby-gems
))
475 $(eval
$(call BuildPackage
,ruby-json
))
476 $(eval
$(call BuildPackage
,ruby-irb
))
477 $(eval
$(call BuildPackage
,ruby-ncurses
))
478 $(eval
$(call BuildPackage
,ruby-nkf
))
479 $(eval
$(call BuildPackage
,ruby-openssl
))
480 $(eval
$(call BuildPackage
,ruby-rake
))
481 $(eval
$(call BuildPackage
,ruby-rdoc
))
482 $(eval
$(call BuildPackage
,ruby-readline
))
483 $(eval
$(call BuildPackage
,ruby-rexml
))
484 $(eval
$(call BuildPackage
,ruby-rss
))
485 $(eval
$(call BuildPackage
,ruby-unit
))
486 $(eval
$(call BuildPackage
,ruby-webrick
))
487 $(eval
$(call BuildPackage
,ruby-xmlrpc
))
488 $(eval
$(call BuildPackage
,ruby-yaml
))
489 $(eval
$(call BuildPackage
,ruby-zlib
))
490 $(eval
$(call HostBuild
))