2000-09-06 16:06:58 -04:00
#
# bsd.ruby.mk - Utility definitions for Ruby related ports.
#
# Created by: Akinori MUSHA <knu@FreeBSD.org>
#
# $FreeBSD$
#
2000-09-16 07:37:37 -04:00
. i f ! d e f i n e d ( R u b y _ I n c l u d e )
2000-09-06 16:06:58 -04:00
Ruby_Include = bsd.ruby.mk
Ruby_Include_MAINTAINER = knu@FreeBSD.org
#
2000-09-06 18:40:09 -04:00
# [variables that each port can define]
2000-09-06 16:06:58 -04:00
#
Allow users to define RUBY variable to utilize ruby ports with
custom-installed Ruby. :)
For instance, if you have built Ruby from the latest snapshot and
installed, you can install ruby modules from ports only by typing
"make RUBY=/usr/local/bin/ruby install". bsd.ruby.mk will take care
of everything including RUBY_VER, RUBY_LIBDIR, CONFIGURE_TARGET, etc.
Introduce version requirement checking mechanism. You can set
RUBY_REQUIRE to any ruby expression(s) to check Ruby's version (or
other modules' versions, in future). The result will be set in
RUBY_PROVIDED.
Define RUBY_VERSION_CODE which holds full integer version of Ruby.
Define RUBY_PORTVERSION, RUBY_DISTNAME and RUBY_WRKSRC for the
standard ruby ports so as not to change PORTVERSION, DISTNAME and
RUBY_WRKSRC of ruby, ruby-gdbm, ruby-tcltklib, ruby-tk, etc. everytime
Ruby is updated.
Rename RUBY_DEPENDS to DEPEND_RUBY, etc. for a cosmetic reason.
2000-10-20 15:43:58 -04:00
# RUBY - Set to full path of ruby. If you set this, the values of the following variables are automatically obtained from the ruby executable: RUBY_VER, RUBY_VERSION, RUBY_NAME, RUBY_ARCH, RUBY_LIBDIR, RUBY_ARCHLIBDIR, RUBY_SITELIBDIR, and RUBY_SITEARCHLIBDIR.
# RUBY_VER - Set to the alternative short version of ruby in the form of `x.y' (see below for current value).
2000-09-06 16:06:58 -04:00
# USE_RUBY - Says that the port uses ruby for building and running.
2000-09-16 07:37:37 -04:00
# RUBY_NO_BUILD_DEPENDS - Says that the port should not build-depend on ruby.
# RUBY_NO_RUN_DEPENDS - Says that the port should not run-depend on ruby.
2000-09-06 16:06:58 -04:00
# USE_LIBRUBY - Says that the port uses libruby.
2001-04-06 05:19:22 -04:00
# RUBY_WITH_PTHREAD - Says that the port needs to be compiled with pthread.
2000-09-16 07:37:37 -04:00
# USE_RUBY_EXTCONF - Says that the port uses extconf.rb to configure. Implies USE_RUBY.
2000-09-06 16:06:58 -04:00
# RUBY_EXTCONF - Set to the alternative name of extconf.rb (default: extconf.rb).
# RUBY_EXTCONF_SUBDIRS - Set to list of subdirectories, if multiple modules are included.
# USE_RUBY_SETUP - Says that the port uses setup.rb to configure and build. Implies USE_RUBY_AMSTD.
# RUBY_SETUP - Set to the alternative name of setup.rb (default: setup.rb).
# USE_RUBY_AMSTD - Says that the port uses amstd for building and running.
# USE_RUBY_RD - Says that the port uses rd to generate documents.
Allow users to define RUBY variable to utilize ruby ports with
custom-installed Ruby. :)
For instance, if you have built Ruby from the latest snapshot and
installed, you can install ruby modules from ports only by typing
"make RUBY=/usr/local/bin/ruby install". bsd.ruby.mk will take care
of everything including RUBY_VER, RUBY_LIBDIR, CONFIGURE_TARGET, etc.
Introduce version requirement checking mechanism. You can set
RUBY_REQUIRE to any ruby expression(s) to check Ruby's version (or
other modules' versions, in future). The result will be set in
RUBY_PROVIDED.
Define RUBY_VERSION_CODE which holds full integer version of Ruby.
Define RUBY_PORTVERSION, RUBY_DISTNAME and RUBY_WRKSRC for the
standard ruby ports so as not to change PORTVERSION, DISTNAME and
RUBY_WRKSRC of ruby, ruby-gdbm, ruby-tcltklib, ruby-tk, etc. everytime
Ruby is updated.
Rename RUBY_DEPENDS to DEPEND_RUBY, etc. for a cosmetic reason.
2000-10-20 15:43:58 -04:00
# RUBY_REQUIRE - Set to a Ruby expression to evaluate before building the port. The constant "Ruby" is set to the integer version number of ruby, and the result of the expression will be set to RUBY_PROVIDED, which is left undefined if the result is nil, false or a zero-length string. Implies USE_RUBY.
2000-09-30 13:34:44 -04:00
# RUBY_SHEBANG_FILES - Specify the files which shebang lines you want to fix.
2000-09-06 16:06:58 -04:00
#
2000-09-06 18:40:09 -04:00
# [variables that each port should not define]
2000-09-06 16:06:58 -04:00
#
# RUBY_PKGNAMEPREFIX - Common PKGNAMEPREFIX for ruby ports (default: ruby${RUBY_SUFFIX}-)
Allow users to define RUBY variable to utilize ruby ports with
custom-installed Ruby. :)
For instance, if you have built Ruby from the latest snapshot and
installed, you can install ruby modules from ports only by typing
"make RUBY=/usr/local/bin/ruby install". bsd.ruby.mk will take care
of everything including RUBY_VER, RUBY_LIBDIR, CONFIGURE_TARGET, etc.
Introduce version requirement checking mechanism. You can set
RUBY_REQUIRE to any ruby expression(s) to check Ruby's version (or
other modules' versions, in future). The result will be set in
RUBY_PROVIDED.
Define RUBY_VERSION_CODE which holds full integer version of Ruby.
Define RUBY_PORTVERSION, RUBY_DISTNAME and RUBY_WRKSRC for the
standard ruby ports so as not to change PORTVERSION, DISTNAME and
RUBY_WRKSRC of ruby, ruby-gdbm, ruby-tcltklib, ruby-tk, etc. everytime
Ruby is updated.
Rename RUBY_DEPENDS to DEPEND_RUBY, etc. for a cosmetic reason.
2000-10-20 15:43:58 -04:00
# RUBY_VERSION - Full version of ruby without preview/beta suffix in the form of `x.y.z' (see below for current value).
# RUBY_VERSION_CODE - Full integer version of ruby without preview/beta suffix in the form of `xyz'.
# RUBY_PORTVERSION - PORTVERSION for the standard ruby ports (ruby, ruby-gdbm, etc.).
# RUBY_DISTNAME - DISTNAME for the standard ruby ports, i.e. the basename of the ruby distribution tarball.
# RUBY_WRKSRC - WRKSRC for the ruby port.
#
2000-09-06 16:06:58 -04:00
# RUBY_SHLIBVER - Major version of libruby (see below for current value).
# RUBY_ARCH - Directory name of architecture dependent libraries.
# RUBY_SUFFIX - Suffix for ruby binaries and directories.
2000-09-06 18:40:09 -04:00
# _RUBY_SUFFIX - String to be used as RUBY_SUFFIX. Always ${RUBY_VER:S/.//}.
2000-09-06 16:06:58 -04:00
# RUBY_NAME - Ruby's name with trailing suffix.
#
# RUBY_RD - Set to full path of rd.
#
# RUBY_PORT - Set to port path of ruby without PORTSDIR.
# RUBY_AMSTD_PORT - Set to port path of ruby-amstd without PORTSDIR.
# RUBY_RD_PORT - Set to port path of rd without PORTSDIR.
#
Allow users to define RUBY variable to utilize ruby ports with
custom-installed Ruby. :)
For instance, if you have built Ruby from the latest snapshot and
installed, you can install ruby modules from ports only by typing
"make RUBY=/usr/local/bin/ruby install". bsd.ruby.mk will take care
of everything including RUBY_VER, RUBY_LIBDIR, CONFIGURE_TARGET, etc.
Introduce version requirement checking mechanism. You can set
RUBY_REQUIRE to any ruby expression(s) to check Ruby's version (or
other modules' versions, in future). The result will be set in
RUBY_PROVIDED.
Define RUBY_VERSION_CODE which holds full integer version of Ruby.
Define RUBY_PORTVERSION, RUBY_DISTNAME and RUBY_WRKSRC for the
standard ruby ports so as not to change PORTVERSION, DISTNAME and
RUBY_WRKSRC of ruby, ruby-gdbm, ruby-tcltklib, ruby-tk, etc. everytime
Ruby is updated.
Rename RUBY_DEPENDS to DEPEND_RUBY, etc. for a cosmetic reason.
2000-10-20 15:43:58 -04:00
# DEPEND_LIBRUBY - Set to LIB_DEPENDS entry for libruby.
# DEPEND_RUBY - Set to BUILD_DEPENDS/RUN_DEPENDS entry for ruby.
# DEPEND_RUBY_AMSTD - Set to BUILD_DEPENDS/RUN_DEPENDS entry for ruby-amstd.
# DEPEND_RUBY_RD2 - Set to BUILD_DEPENDS entry for rd.
2000-09-06 16:06:58 -04:00
#
# RUBY_LIBDIR - Installation path for architecture independent libraries.
# RUBY_ARCHLIBDIR - Installation path for architecture dependent libraries.
# RUBY_SITELIBDIR - Installation path for site architecture independent libraries.
# RUBY_SITEARCHLIBDIR - Installation path for site architecture dependent libraries.
# RUBY_DOCDIR - Installation path for documents.
# RUBY_EXAMPLESDIR - Installation path for examples.
#
Allow users to define RUBY variable to utilize ruby ports with
custom-installed Ruby. :)
For instance, if you have built Ruby from the latest snapshot and
installed, you can install ruby modules from ports only by typing
"make RUBY=/usr/local/bin/ruby install". bsd.ruby.mk will take care
of everything including RUBY_VER, RUBY_LIBDIR, CONFIGURE_TARGET, etc.
Introduce version requirement checking mechanism. You can set
RUBY_REQUIRE to any ruby expression(s) to check Ruby's version (or
other modules' versions, in future). The result will be set in
RUBY_PROVIDED.
Define RUBY_VERSION_CODE which holds full integer version of Ruby.
Define RUBY_PORTVERSION, RUBY_DISTNAME and RUBY_WRKSRC for the
standard ruby ports so as not to change PORTVERSION, DISTNAME and
RUBY_WRKSRC of ruby, ruby-gdbm, ruby-tcltklib, ruby-tk, etc. everytime
Ruby is updated.
Rename RUBY_DEPENDS to DEPEND_RUBY, etc. for a cosmetic reason.
2000-10-20 15:43:58 -04:00
. i f d e f i n e d ( R U B Y )
. i f ! e x i s t s ( $ { R U B Y } )
. e r r o r Y o u s e t t h e v a r i a b l e R U B Y t o "${RUBY}" , b u t i t d o e s n o t s e e m t o e x i s t . P l e a s e s p e c i f y a n a l r e a d y i n s t a l l e d r u b y e x e c u t a b l e .
. e n d i f
2000-09-06 16:06:58 -04:00
Allow users to define RUBY variable to utilize ruby ports with
custom-installed Ruby. :)
For instance, if you have built Ruby from the latest snapshot and
installed, you can install ruby modules from ports only by typing
"make RUBY=/usr/local/bin/ruby install". bsd.ruby.mk will take care
of everything including RUBY_VER, RUBY_LIBDIR, CONFIGURE_TARGET, etc.
Introduce version requirement checking mechanism. You can set
RUBY_REQUIRE to any ruby expression(s) to check Ruby's version (or
other modules' versions, in future). The result will be set in
RUBY_PROVIDED.
Define RUBY_VERSION_CODE which holds full integer version of Ruby.
Define RUBY_PORTVERSION, RUBY_DISTNAME and RUBY_WRKSRC for the
standard ruby ports so as not to change PORTVERSION, DISTNAME and
RUBY_WRKSRC of ruby, ruby-gdbm, ruby-tcltklib, ruby-tk, etc. everytime
Ruby is updated.
Rename RUBY_DEPENDS to DEPEND_RUBY, etc. for a cosmetic reason.
2000-10-20 15:43:58 -04:00
_RUBY_TEST != ${ RUBY } -e 'begin; require "rbconfig"; rescue LoadError; puts "error"; end'
. i f ! e m p t y ( _ R U B Y _ T E S T )
. e r r o r Y o u s e t t h e v a r i a b l e R U B Y t o "${RUBY}" , b u t i t f a i l e d t o i n c l u d e r b c o n f i g . P l e a s e s p e c i f y a p r o p e r l y i n s t a l l e d r u b y e x e c u t a b l e .
. e n d i f
_RUBY_CONFIG = ${ RUBY } -r rbconfig -e 'C = Config::CONFIG' -e
RUBY_VERSION != ${ _RUBY_CONFIG } 'puts VERSION'
RUBY_SUFFIX ?= # empty
RUBY_ARCH != ${ _RUBY_CONFIG } 'puts C["target"]'
RUBY_NAME != ${ _RUBY_CONFIG } 'puts C["ruby_install_name"]'
_RUBY_SYSLIBDIR != ${ _RUBY_CONFIG } 'puts C["libdir"]'
_RUBY_SITEDIR != ${ _RUBY_CONFIG } 'puts C["sitedir"]'
. e l s e
RUBY ?= ${ LOCALBASE } /bin/${ RUBY_NAME }
. i f d e f i n e d ( R U B Y _ V E R ) & & ${RUBY_VER} = = 1.4
2000-09-06 18:40:09 -04:00
RUBY_VERSION ?= 1.4.6
RUBY_SUFFIX ?= ${ _RUBY_SUFFIX }
2000-09-06 16:06:58 -04:00
. e l s e
2001-03-19 05:51:53 -05:00
RUBY_VERSION ?= 1.6.3
2000-09-06 18:40:09 -04:00
RUBY_SUFFIX ?= # empty
2000-09-06 16:06:58 -04:00
. e n d i f
2001-04-01 13:52:01 -04:00
RUBY_SNAPSHOTDATE = 2001.04.01
2001-01-18 14:53:38 -05:00
2001-03-19 05:51:53 -05:00
. i f d e f i n e d ( R U B Y _ S N A P S H O T D A T E ) & & ! e m p t y ( R U B Y _ S N A P S H O T D A T E )
2001-01-18 14:53:38 -05:00
RUBY_PORTVERSION = ${ RUBY_VERSION } .${ RUBY_SNAPSHOTDATE }
2001-03-19 05:51:53 -05:00
. e l s e
RUBY_PORTVERSION = ${ RUBY_VERSION }
. e n d i f
2000-12-25 09:07:57 -05:00
RUBY_DISTNAME ?= ruby-${ RUBY_VERSION }
RUBY_WRKSRC ?= ${ WRKDIR } /${ RUBY_DISTNAME }
Allow users to define RUBY variable to utilize ruby ports with
custom-installed Ruby. :)
For instance, if you have built Ruby from the latest snapshot and
installed, you can install ruby modules from ports only by typing
"make RUBY=/usr/local/bin/ruby install". bsd.ruby.mk will take care
of everything including RUBY_VER, RUBY_LIBDIR, CONFIGURE_TARGET, etc.
Introduce version requirement checking mechanism. You can set
RUBY_REQUIRE to any ruby expression(s) to check Ruby's version (or
other modules' versions, in future). The result will be set in
RUBY_PROVIDED.
Define RUBY_VERSION_CODE which holds full integer version of Ruby.
Define RUBY_PORTVERSION, RUBY_DISTNAME and RUBY_WRKSRC for the
standard ruby ports so as not to change PORTVERSION, DISTNAME and
RUBY_WRKSRC of ruby, ruby-gdbm, ruby-tcltklib, ruby-tk, etc. everytime
Ruby is updated.
Rename RUBY_DEPENDS to DEPEND_RUBY, etc. for a cosmetic reason.
2000-10-20 15:43:58 -04:00
RUBY_ARCH ?= ${ ARCH } -freebsd${ OSREL }
RUBY_NAME ?= ruby${ RUBY_SUFFIX }
_RUBY_SYSLIBDIR ?= ${ LOCALBASE } /lib
_RUBY_SITEDIR ?= ${ _RUBY_SYSLIBDIR } /ruby/site_ruby
. e n d i f
RUBY_VERSION_CODE ?= ${ RUBY_VERSION : S /.//g }
RUBY_VER = ${ RUBY_VERSION : R }
_RUBY_SUFFIX = ${ RUBY_VER : S /.// }
2000-09-06 16:06:58 -04:00
RUBY_PKGNAMEPREFIX ?= ruby${ RUBY_SUFFIX } - # could be rb${RUBY_SUFFIX}-
2000-09-06 18:40:09 -04:00
RUBY_SHLIBVER ?= ${ _RUBY_SUFFIX }
Allow users to define RUBY variable to utilize ruby ports with
custom-installed Ruby. :)
For instance, if you have built Ruby from the latest snapshot and
installed, you can install ruby modules from ports only by typing
"make RUBY=/usr/local/bin/ruby install". bsd.ruby.mk will take care
of everything including RUBY_VER, RUBY_LIBDIR, CONFIGURE_TARGET, etc.
Introduce version requirement checking mechanism. You can set
RUBY_REQUIRE to any ruby expression(s) to check Ruby's version (or
other modules' versions, in future). The result will be set in
RUBY_PROVIDED.
Define RUBY_VERSION_CODE which holds full integer version of Ruby.
Define RUBY_PORTVERSION, RUBY_DISTNAME and RUBY_WRKSRC for the
standard ruby ports so as not to change PORTVERSION, DISTNAME and
RUBY_WRKSRC of ruby, ruby-gdbm, ruby-tcltklib, ruby-tk, etc. everytime
Ruby is updated.
Rename RUBY_DEPENDS to DEPEND_RUBY, etc. for a cosmetic reason.
2000-10-20 15:43:58 -04:00
CONFIGURE_TARGET ?= ${ RUBY_ARCH }
2000-09-06 16:06:58 -04:00
# Commands
RUBY_RD ?= ${ LOCALBASE } /bin/rd2
# Ports
RUBY_PORT ?= lang/ruby${ RUBY_SUFFIX }
RUBY_AMSTD_PORT ?= devel/ruby-amstd
RUBY_RD_PORT ?= textproc/ruby-rdtool
# Depends
Allow users to define RUBY variable to utilize ruby ports with
custom-installed Ruby. :)
For instance, if you have built Ruby from the latest snapshot and
installed, you can install ruby modules from ports only by typing
"make RUBY=/usr/local/bin/ruby install". bsd.ruby.mk will take care
of everything including RUBY_VER, RUBY_LIBDIR, CONFIGURE_TARGET, etc.
Introduce version requirement checking mechanism. You can set
RUBY_REQUIRE to any ruby expression(s) to check Ruby's version (or
other modules' versions, in future). The result will be set in
RUBY_PROVIDED.
Define RUBY_VERSION_CODE which holds full integer version of Ruby.
Define RUBY_PORTVERSION, RUBY_DISTNAME and RUBY_WRKSRC for the
standard ruby ports so as not to change PORTVERSION, DISTNAME and
RUBY_WRKSRC of ruby, ruby-gdbm, ruby-tcltklib, ruby-tk, etc. everytime
Ruby is updated.
Rename RUBY_DEPENDS to DEPEND_RUBY, etc. for a cosmetic reason.
2000-10-20 15:43:58 -04:00
DEPEND_LIBRUBY ?= ${ RUBY_NAME } .${ RUBY_SHLIBVER } :${ PORTSDIR } /${ RUBY_PORT }
DEPEND_RUBY ?= ${ RUBY } :${ PORTSDIR } /${ RUBY_PORT }
DEPEND_RUBY_AMSTD ?= ${ RUBY_SITELIBDIR } /amstd/info.rb:${ PORTSDIR } /${ RUBY_AMSTD_PORT }
DEPEND_RUBY_RD2 ?= ${ RUBY_RD } :${ PORTSDIR } /${ RUBY_RD_PORT }
2000-09-06 16:06:58 -04:00
# Directories
Allow users to define RUBY variable to utilize ruby ports with
custom-installed Ruby. :)
For instance, if you have built Ruby from the latest snapshot and
installed, you can install ruby modules from ports only by typing
"make RUBY=/usr/local/bin/ruby install". bsd.ruby.mk will take care
of everything including RUBY_VER, RUBY_LIBDIR, CONFIGURE_TARGET, etc.
Introduce version requirement checking mechanism. You can set
RUBY_REQUIRE to any ruby expression(s) to check Ruby's version (or
other modules' versions, in future). The result will be set in
RUBY_PROVIDED.
Define RUBY_VERSION_CODE which holds full integer version of Ruby.
Define RUBY_PORTVERSION, RUBY_DISTNAME and RUBY_WRKSRC for the
standard ruby ports so as not to change PORTVERSION, DISTNAME and
RUBY_WRKSRC of ruby, ruby-gdbm, ruby-tcltklib, ruby-tk, etc. everytime
Ruby is updated.
Rename RUBY_DEPENDS to DEPEND_RUBY, etc. for a cosmetic reason.
2000-10-20 15:43:58 -04:00
RUBY_LIBDIR ?= ${ _RUBY_SYSLIBDIR } /ruby/${ RUBY_VER }
2000-09-06 16:06:58 -04:00
RUBY_ARCHLIBDIR ?= ${ RUBY_LIBDIR } /${ RUBY_ARCH }
Allow users to define RUBY variable to utilize ruby ports with
custom-installed Ruby. :)
For instance, if you have built Ruby from the latest snapshot and
installed, you can install ruby modules from ports only by typing
"make RUBY=/usr/local/bin/ruby install". bsd.ruby.mk will take care
of everything including RUBY_VER, RUBY_LIBDIR, CONFIGURE_TARGET, etc.
Introduce version requirement checking mechanism. You can set
RUBY_REQUIRE to any ruby expression(s) to check Ruby's version (or
other modules' versions, in future). The result will be set in
RUBY_PROVIDED.
Define RUBY_VERSION_CODE which holds full integer version of Ruby.
Define RUBY_PORTVERSION, RUBY_DISTNAME and RUBY_WRKSRC for the
standard ruby ports so as not to change PORTVERSION, DISTNAME and
RUBY_WRKSRC of ruby, ruby-gdbm, ruby-tcltklib, ruby-tk, etc. everytime
Ruby is updated.
Rename RUBY_DEPENDS to DEPEND_RUBY, etc. for a cosmetic reason.
2000-10-20 15:43:58 -04:00
RUBY_SITELIBDIR ?= ${ _RUBY_SITEDIR } /${ RUBY_VER }
2000-09-06 16:06:58 -04:00
RUBY_SITEARCHLIBDIR ?= ${ RUBY_SITELIBDIR } /${ RUBY_ARCH }
RUBY_DOCDIR ?= ${ LOCALBASE } /share/doc/${ RUBY_NAME }
RUBY_EXAMPLESDIR ?= ${ LOCALBASE } /share/examples/${ RUBY_NAME }
# PLIST
PLIST_RUBY_DIRS = RUBY_LIBDIR = " ${ RUBY_LIBDIR } " \
RUBY_ARCHLIBDIR = " ${ RUBY_ARCHLIBDIR } " \
RUBY_SITELIBDIR = " ${ RUBY_SITELIBDIR } " \
RUBY_SITEARCHLIBDIR = " ${ RUBY_SITEARCHLIBDIR } " \
RUBY_DOCDIR = " ${ RUBY_DOCDIR } " \
RUBY_EXAMPLESDIR = " ${ RUBY_EXAMPLESDIR } "
PLIST_SUB += RUBY_VERSION = " ${ RUBY_VERSION } " \
RUBY_VER = " ${ RUBY_VER } " \
RUBY_SHLIBVER = " ${ RUBY_SHLIBVER } " \
RUBY_ARCH = " ${ RUBY_ARCH } " \
2000-09-06 18:40:09 -04:00
_RUBY_SUFFIX = " ${ _RUBY_SUFFIX } " \
2000-09-06 16:06:58 -04:00
RUBY_SUFFIX = " ${ RUBY_SUFFIX } " \
RUBY_NAME = " ${ RUBY_NAME } " \
${ PLIST_RUBY_DIRS : S ,DIR= " ${ LOCALBASE } /,DIR= " , }
Allow users to define RUBY variable to utilize ruby ports with
custom-installed Ruby. :)
For instance, if you have built Ruby from the latest snapshot and
installed, you can install ruby modules from ports only by typing
"make RUBY=/usr/local/bin/ruby install". bsd.ruby.mk will take care
of everything including RUBY_VER, RUBY_LIBDIR, CONFIGURE_TARGET, etc.
Introduce version requirement checking mechanism. You can set
RUBY_REQUIRE to any ruby expression(s) to check Ruby's version (or
other modules' versions, in future). The result will be set in
RUBY_PROVIDED.
Define RUBY_VERSION_CODE which holds full integer version of Ruby.
Define RUBY_PORTVERSION, RUBY_DISTNAME and RUBY_WRKSRC for the
standard ruby ports so as not to change PORTVERSION, DISTNAME and
RUBY_WRKSRC of ruby, ruby-gdbm, ruby-tcltklib, ruby-tk, etc. everytime
Ruby is updated.
Rename RUBY_DEPENDS to DEPEND_RUBY, etc. for a cosmetic reason.
2000-10-20 15:43:58 -04:00
# require check
. i f d e f i n e d ( R U B Y _ R E Q U I R E )
USE_RUBY = yes
2000-10-21 15:57:53 -04:00
. i f e x i s t s ( $ { R U B Y } )
Allow users to define RUBY variable to utilize ruby ports with
custom-installed Ruby. :)
For instance, if you have built Ruby from the latest snapshot and
installed, you can install ruby modules from ports only by typing
"make RUBY=/usr/local/bin/ruby install". bsd.ruby.mk will take care
of everything including RUBY_VER, RUBY_LIBDIR, CONFIGURE_TARGET, etc.
Introduce version requirement checking mechanism. You can set
RUBY_REQUIRE to any ruby expression(s) to check Ruby's version (or
other modules' versions, in future). The result will be set in
RUBY_PROVIDED.
Define RUBY_VERSION_CODE which holds full integer version of Ruby.
Define RUBY_PORTVERSION, RUBY_DISTNAME and RUBY_WRKSRC for the
standard ruby ports so as not to change PORTVERSION, DISTNAME and
RUBY_WRKSRC of ruby, ruby-gdbm, ruby-tcltklib, ruby-tk, etc. everytime
Ruby is updated.
Rename RUBY_DEPENDS to DEPEND_RUBY, etc. for a cosmetic reason.
2000-10-20 15:43:58 -04:00
RUBY_PROVIDED != ${ RUBY } -e ' \
Ruby = ${ RUBY_VERSION_CODE } ; \
value = begin; ${ RUBY_REQUIRE } ; end and puts value'
2000-10-21 15:57:53 -04:00
. e l s e
RUBY_PROVIDED = "should be" # the latest version is going to be installed
. e n d i f
Allow users to define RUBY variable to utilize ruby ports with
custom-installed Ruby. :)
For instance, if you have built Ruby from the latest snapshot and
installed, you can install ruby modules from ports only by typing
"make RUBY=/usr/local/bin/ruby install". bsd.ruby.mk will take care
of everything including RUBY_VER, RUBY_LIBDIR, CONFIGURE_TARGET, etc.
Introduce version requirement checking mechanism. You can set
RUBY_REQUIRE to any ruby expression(s) to check Ruby's version (or
other modules' versions, in future). The result will be set in
RUBY_PROVIDED.
Define RUBY_VERSION_CODE which holds full integer version of Ruby.
Define RUBY_PORTVERSION, RUBY_DISTNAME and RUBY_WRKSRC for the
standard ruby ports so as not to change PORTVERSION, DISTNAME and
RUBY_WRKSRC of ruby, ruby-gdbm, ruby-tcltklib, ruby-tk, etc. everytime
Ruby is updated.
Rename RUBY_DEPENDS to DEPEND_RUBY, etc. for a cosmetic reason.
2000-10-20 15:43:58 -04:00
. i f e m p t y ( R U B Y _ P R O V I D E D )
. u n d e f R U B Y _ P R O V I D E D
. e n d i f
. e n d i f
2000-09-30 13:34:44 -04:00
# fix shebang lines
. i f d e f i n e d ( R U B Y _ S H E B A N G _ F I L E S ) & & ! e m p t y ( R U B Y _ S H E B A N G _ F I L E S )
USE_RUBY = yes
post-patch : ruby -shebang -patch
ruby-shebang-patch :
@for f in ${ RUBY_SHEBANG_FILES } ; do \
${ ECHO_MSG } " ===> Fixing the #! line of $$ f " ; \
2001-04-02 00:36:09 -04:00
${ RUBY } ${ RUBY_FLAGS } -i -p \
-e 'if $$. == 1; ' \
2001-03-11 12:39:28 -05:00
-e ' if /^#!/; ' \
-e ' sub /^#!\s*\S*(\benv\s+)?\bruby/, "#!${RUBY}";' \
-e ' else;' \
-e ' $$_ = "#!${RUBY}\n" + $$_;' \
-e ' end;' \
-e 'end' \
$$ f; \
2000-09-30 13:34:44 -04:00
done
. e n d i f
2001-04-02 00:36:09 -04:00
. i f d e f i n e d ( D E B U G )
RUBY_FLAGS += -d
. e n d i f
2000-09-06 16:06:58 -04:00
# extconf.rb
. i f d e f i n e d ( U S E _ R U B Y _ E X T C O N F )
USE_RUBY = yes
RUBY_EXTCONF ?= extconf.rb
2001-04-06 06:11:41 -04:00
CONFIGURE_ARGS += --with-opt-dir= " ${ LOCALBASE } " \
--with-pthread-cflags= " ${ PTHREAD_CFLAGS } " \
--with-pthread-libs= " ${ PTHREAD_LIBS } "
2000-09-06 16:06:58 -04:00
do-configure : ruby -extconf -configure
ruby-extconf-configure :
. i f d e f i n e d ( R U B Y _ E X T C O N F _ S U B D I R S )
. f o r d i n $ { R U B Y _ E X T C O N F _ S U B D I R S }
@${ ECHO_MSG } " ===> Running ${ RUBY_EXTCONF } in ${ d } to configure "
2001-04-06 05:19:22 -04:00
. i f d e f i n e d ( R U B Y _ W I T H _ P T H R E A D )
cd ${ WRKSRC } /${ d } ; \
2001-04-06 06:11:41 -04:00
${ RUBY } ${ RUBY_FLAGS } -i -pe ' ~ /\b require\s +[ \0 47"]mkmf[\047" ] / \
and $$ _ += %Q| \
$$ libs.sub!( /-lc\\ b/, "" ) \n \
$$ libs += " " + with_config( "pthread-libs" ) + " " \n \
$$ CFLAGS += " " + with_config( "pthread-cflags" ) + " " \n \
| ' ${ RUBY_EXTCONF }
2001-04-06 05:19:22 -04:00
. e n d i f
2000-09-06 16:06:58 -04:00
@cd ${ WRKSRC } /${ d } ; \
2001-04-02 00:36:09 -04:00
${ SETENV } ${ CONFIGURE_ENV } ${ RUBY } ${ RUBY_FLAGS } ${ RUBY_EXTCONF } ${ CONFIGURE_ARGS }
2000-09-06 16:06:58 -04:00
. e n d f o r
. e l s e
@${ ECHO_MSG } " ===> Running ${ RUBY_EXTCONF } to configure "
2001-04-06 05:19:22 -04:00
. i f d e f i n e d ( R U B Y _ W I T H _ P T H R E A D )
cd ${ WRKSRC } ; \
2001-04-06 06:11:41 -04:00
${ RUBY } ${ RUBY_FLAGS } -i -pe ' ~ /\b require\s +[ \0 47"]mkmf[\047" ] / \
and $$ _ += %Q| \
$$ libs.sub!( /-lc\\ b/, "" ) \n \
$$ libs += " " + with_config( "pthread-libs" ) + " " \n \
$$ CFLAGS += " " + with_config( "pthread-cflags" ) + " " \n \
| ' ${ RUBY_EXTCONF }
2001-04-06 05:19:22 -04:00
. e n d i f
2000-09-06 16:06:58 -04:00
@cd ${ WRKSRC } ; \
2001-04-02 00:36:09 -04:00
${ SETENV } ${ CONFIGURE_ENV } ${ RUBY } ${ RUBY_FLAGS } ${ RUBY_EXTCONF } ${ CONFIGURE_ARGS }
2000-09-06 16:06:58 -04:00
. e n d i f
. e n d i f
# setup.rb
. i f d e f i n e d ( U S E _ R U B Y _ S E T U P )
USE_RUBY_AMSTD = yes
RUBY_SETUP ?= setup.rb
do-configure : ruby -setup -configure
ruby-setup-configure :
@${ ECHO_MSG } " ===> Running ${ RUBY_SETUP } to configure "
@cd ${ WRKSRC } ; \
2001-04-02 00:36:09 -04:00
${ SETENV } ${ CONFIGURE_ENV } ${ RUBY } ${ RUBY_FLAGS } ${ RUBY_SETUP } config ${ CONFIGURE_ARGS }
2000-09-06 16:06:58 -04:00
do-build : ruby -setup -build
ruby-setup-build :
@${ ECHO_MSG } " ===> Running ${ RUBY_SETUP } to build "
@cd ${ WRKSRC } ; \
2001-04-02 00:36:09 -04:00
${ SETENV } ${ MAKE_ENV } ${ RUBY } ${ RUBY_FLAGS } ${ RUBY_SETUP } setup
2000-09-07 03:20:02 -04:00
do-install : ruby -setup -install
ruby-setup-install :
@${ ECHO_MSG } " ===> Running ${ RUBY_SETUP } to install "
cd ${ WRKSRC } ; \
2001-04-02 00:36:09 -04:00
${ SETENV } ${ MAKE_ENV } ${ RUBY } ${ RUBY_FLAGS } ${ RUBY_SETUP } install
2000-09-06 16:06:58 -04:00
. e n d i f
. i f d e f i n e d ( U S E _ L I B R U B Y )
Allow users to define RUBY variable to utilize ruby ports with
custom-installed Ruby. :)
For instance, if you have built Ruby from the latest snapshot and
installed, you can install ruby modules from ports only by typing
"make RUBY=/usr/local/bin/ruby install". bsd.ruby.mk will take care
of everything including RUBY_VER, RUBY_LIBDIR, CONFIGURE_TARGET, etc.
Introduce version requirement checking mechanism. You can set
RUBY_REQUIRE to any ruby expression(s) to check Ruby's version (or
other modules' versions, in future). The result will be set in
RUBY_PROVIDED.
Define RUBY_VERSION_CODE which holds full integer version of Ruby.
Define RUBY_PORTVERSION, RUBY_DISTNAME and RUBY_WRKSRC for the
standard ruby ports so as not to change PORTVERSION, DISTNAME and
RUBY_WRKSRC of ruby, ruby-gdbm, ruby-tcltklib, ruby-tk, etc. everytime
Ruby is updated.
Rename RUBY_DEPENDS to DEPEND_RUBY, etc. for a cosmetic reason.
2000-10-20 15:43:58 -04:00
LIB_DEPENDS += ${ DEPEND_LIBRUBY }
2000-09-06 16:06:58 -04:00
. e n d i f
. i f d e f i n e d ( U S E _ R U B Y )
2000-09-16 07:37:37 -04:00
. i f ! d e f i n e d ( R U B Y _ N O _ B U I L D _ D E P E N D S )
Allow users to define RUBY variable to utilize ruby ports with
custom-installed Ruby. :)
For instance, if you have built Ruby from the latest snapshot and
installed, you can install ruby modules from ports only by typing
"make RUBY=/usr/local/bin/ruby install". bsd.ruby.mk will take care
of everything including RUBY_VER, RUBY_LIBDIR, CONFIGURE_TARGET, etc.
Introduce version requirement checking mechanism. You can set
RUBY_REQUIRE to any ruby expression(s) to check Ruby's version (or
other modules' versions, in future). The result will be set in
RUBY_PROVIDED.
Define RUBY_VERSION_CODE which holds full integer version of Ruby.
Define RUBY_PORTVERSION, RUBY_DISTNAME and RUBY_WRKSRC for the
standard ruby ports so as not to change PORTVERSION, DISTNAME and
RUBY_WRKSRC of ruby, ruby-gdbm, ruby-tcltklib, ruby-tk, etc. everytime
Ruby is updated.
Rename RUBY_DEPENDS to DEPEND_RUBY, etc. for a cosmetic reason.
2000-10-20 15:43:58 -04:00
BUILD_DEPENDS += ${ DEPEND_RUBY }
2000-09-16 07:37:37 -04:00
. e n d i f
. i f ! d e f i n e d ( R U B Y _ N O _ R U N _ D E P E N D S )
Allow users to define RUBY variable to utilize ruby ports with
custom-installed Ruby. :)
For instance, if you have built Ruby from the latest snapshot and
installed, you can install ruby modules from ports only by typing
"make RUBY=/usr/local/bin/ruby install". bsd.ruby.mk will take care
of everything including RUBY_VER, RUBY_LIBDIR, CONFIGURE_TARGET, etc.
Introduce version requirement checking mechanism. You can set
RUBY_REQUIRE to any ruby expression(s) to check Ruby's version (or
other modules' versions, in future). The result will be set in
RUBY_PROVIDED.
Define RUBY_VERSION_CODE which holds full integer version of Ruby.
Define RUBY_PORTVERSION, RUBY_DISTNAME and RUBY_WRKSRC for the
standard ruby ports so as not to change PORTVERSION, DISTNAME and
RUBY_WRKSRC of ruby, ruby-gdbm, ruby-tcltklib, ruby-tk, etc. everytime
Ruby is updated.
Rename RUBY_DEPENDS to DEPEND_RUBY, etc. for a cosmetic reason.
2000-10-20 15:43:58 -04:00
RUN_DEPENDS += ${ DEPEND_RUBY }
2000-09-06 16:06:58 -04:00
. e n d i f
2000-09-16 07:37:37 -04:00
. e n d i f
2000-09-06 16:06:58 -04:00
. i f d e f i n e d ( U S E _ R U B Y _ A M S T D )
Allow users to define RUBY variable to utilize ruby ports with
custom-installed Ruby. :)
For instance, if you have built Ruby from the latest snapshot and
installed, you can install ruby modules from ports only by typing
"make RUBY=/usr/local/bin/ruby install". bsd.ruby.mk will take care
of everything including RUBY_VER, RUBY_LIBDIR, CONFIGURE_TARGET, etc.
Introduce version requirement checking mechanism. You can set
RUBY_REQUIRE to any ruby expression(s) to check Ruby's version (or
other modules' versions, in future). The result will be set in
RUBY_PROVIDED.
Define RUBY_VERSION_CODE which holds full integer version of Ruby.
Define RUBY_PORTVERSION, RUBY_DISTNAME and RUBY_WRKSRC for the
standard ruby ports so as not to change PORTVERSION, DISTNAME and
RUBY_WRKSRC of ruby, ruby-gdbm, ruby-tcltklib, ruby-tk, etc. everytime
Ruby is updated.
Rename RUBY_DEPENDS to DEPEND_RUBY, etc. for a cosmetic reason.
2000-10-20 15:43:58 -04:00
BUILD_DEPENDS += ${ DEPEND_RUBY_AMSTD }
RUN_DEPENDS += ${ DEPEND_RUBY_AMSTD }
2000-09-06 16:06:58 -04:00
. e n d i f
. i f d e f i n e d ( U S E _ R U B Y _ R D ) & & ! d e f i n e d ( N O P O R T D O C S )
Allow users to define RUBY variable to utilize ruby ports with
custom-installed Ruby. :)
For instance, if you have built Ruby from the latest snapshot and
installed, you can install ruby modules from ports only by typing
"make RUBY=/usr/local/bin/ruby install". bsd.ruby.mk will take care
of everything including RUBY_VER, RUBY_LIBDIR, CONFIGURE_TARGET, etc.
Introduce version requirement checking mechanism. You can set
RUBY_REQUIRE to any ruby expression(s) to check Ruby's version (or
other modules' versions, in future). The result will be set in
RUBY_PROVIDED.
Define RUBY_VERSION_CODE which holds full integer version of Ruby.
Define RUBY_PORTVERSION, RUBY_DISTNAME and RUBY_WRKSRC for the
standard ruby ports so as not to change PORTVERSION, DISTNAME and
RUBY_WRKSRC of ruby, ruby-gdbm, ruby-tcltklib, ruby-tk, etc. everytime
Ruby is updated.
Rename RUBY_DEPENDS to DEPEND_RUBY, etc. for a cosmetic reason.
2000-10-20 15:43:58 -04:00
BUILD_DEPENDS += ${ DEPEND_RUBY_RD2 }
2000-09-06 16:06:58 -04:00
. e n d i f
2000-09-16 07:37:37 -04:00
. e n d i f