6.14. Using Ruby

表格 6.20. Useful variables for ports that use Ruby
VariableDescription
USE_RUBYThe port requires Ruby.
USE_RUBY_EXTCONFThe port uses extconf.rb to configure.
USE_RUBY_SETUPThe port uses setup.rb to configure.
RUBY_SETUPSet to the alternative name of setup.rb. Common value is install.rb.

The following table shows the selected variables available to port authors via the ports infrastructure. These variables should be used to install files into their proper locations. Use them in pkg-plist as much as possible. These variables should not be redefined in the port.

表格 6.21. Selected read-only variables for ports that use Ruby
VariableDescriptionExample value
RUBY_PKGNAMEPREFIXUsed as a PKGNAMEPREFIX to distinguish packages for different Ruby versions.ruby18-
RUBY_VERSIONFull version of Ruby in the form of x.y.z.1.8.2
RUBY_SITELIBDIRArchitecture independent libraries installation path./usr/local/lib/ruby/site_ruby/1.8
RUBY_SITEARCHLIBDIRArchitecture dependent libraries installation path./usr/local/lib/ruby/site_ruby/1.8/amd64-freebsd6
RUBY_MODDOCDIRModule documentation installation path./usr/local/share/doc/ruby18/patsy
RUBY_MODEXAMPLESDIRModule examples installation path./usr/local/share/examples/ruby18/patsy

A complete list of available variables can be found in /usr/ports/Mk/bsd.ruby.mk.

本文及其他文件,可由此下載: ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/

若有 FreeBSD 方面疑問,請先閱讀 FreeBSD 相關文件,如不能解決的話,再洽詢 <questions@FreeBSD.org>。

關於本文件的問題,請洽詢 <doc@FreeBSD.org>。