openbsd-ports/lang/ruby/ruby.port.mk

372 lines
12 KiB
Makefile
Raw Normal View History

2010-11-17 03:05:12 -05:00
# $OpenBSD: ruby.port.mk,v 1.37 2010/11/17 08:05:18 espie Exp $
2002-03-17 17:29:02 -05:00
# ruby module
CATEGORIES+= lang/ruby
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
# This allows you to build ruby 1.8, ruby 1.9, and jruby packages using
# the same port directory for gem and extconf based ports. It does this
# by adding FLAVORS automatically, unless FLAVORS are already defined
# or the port defines MODRUBY_REV to tie the port to a specific ruby
# version. For example, JDBC gem ports want to set MODRUBY_REV=jruby,
# since they don't work on ruby 1.8 or ruby 1.9.
.if !defined(MODRUBY_REV)
. if ${CONFIGURE_STYLE:L:Mgem} || ${CONFIGURE_STYLE:L:Mextconf}
. if !defined(FLAVORS)
FLAVORS?= ruby18 ruby19
. if !${CONFIGURE_STYLE:L:Mext} && !${CONFIGURE_STYLE:L:Mextconf}
FLAVORS+= jruby
. endif
. endif
# Instead of adding flavors to the end of the package name, we use
# different package stems for ruby 1.8, ruby 1.9, and jruby packages.
# ruby 1.8 uses the historical ruby-* package stem, ruby 1.9 uses
# ruby19-* and jruby uses jruby-*. In most cases, PKGNAME in the port
# should be set to the same as DISTNAME, and this will insert the
# correct package prefix.
FULLPKGNAME?= ${MODRUBY_PKG_PREFIX}-${PKGNAME}
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
# If the port can work on both ruby 1.9 and another version of ruby,
# and gem installs binaries for it, the binaries on ruby 1.9 are installed
# with a 19 suffix. GEM_BIN_SUFFIX should be added after such a filename
# in the PLIST so that the gem will correctly package on all supported
# versions of ruby.
SUBST_VARS+= GEM_BIN_SUFFIX
# The unset flavor is the same as the ruby18 FLAVOR, but the FLAVOR is
# not set by default, as otherwise it breaks pkg_add -u for previously
# installed ports.
FLAVOR?=
. if empty(FLAVOR)
MODRUBY_REV= 1.8
# Check for conflicting FLAVORs and set MODRUBY_REV appropriately based
# on the FLAVOR.
. elif ${FLAVOR:L:Mruby18}
. if ${FLAVOR:L:Mruby19} || ${FLAVOR:L:Mjruby}
ERRORS+= "Fatal: Conflicting flavors used: ${FLAVOR}"
. endif
FLAVOR= ${FLAVOR:L:Nruby18}
MODRUBY_REV= 1.8
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
. elif ${FLAVOR:L:Mruby19}
. if ${FLAVOR:L:Mruby18} || ${FLAVOR:L:Mjruby}
ERRORS+= "Fatal: Conflicting flavors used: ${FLAVOR}"
. endif
MODRUBY_REV= 1.9
. elif ${FLAVOR:L:Mjruby}
. if ${FLAVOR:L:Mruby18} || ${FLAVOR:L:Mruby19}
ERRORS+= "Fatal: Conflicting flavors used: ${FLAVOR}"
. endif
MODRUBY_REV= jruby
. endif
. endif
.endif
# Other non-gem and non-extconf based ruby ports should default to
# using ruby 1.8. Ports that require a different ruby version such
# set MODRUBY_REV in their makefile with either 1.9 or jruby to
# build on ruby 1.9 or jruby respectively.
MODRUBY_REV?= 1.8
GEM_BIN_SUFFIX=
.if ${MODRUBY_REV} == 1.8
MODRUBY_LIBREV= 1.8
MODRUBY_BINREV= 18
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
MODRUBY_PKGSPEC= ruby->=1.8,<=1.9
MODRUBY_PKG_PREFIX= ruby
MODRUBY_FLAVOR =
.elif ${MODRUBY_REV} == 1.9
MODRUBY_LIBREV= 1.9.1
MODRUBY_BINREV= 19
MODRUBY_PKGSPEC= ruby->=1.9,<=1.10
MODRUBY_PKG_PREFIX= ruby19
MODRUBY_FLAVOR = ruby19
GEM_BIN_SUFFIX= 19
.elif ${MODRUBY_REV} == jruby
MODRUBY_LIBREV= 1.8
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
# Set these during development of ruby.port.mk to make sure
# nothing is broken. However, turn them off before committing,
# since they result in bad error messages when, for example, an
# invalid flavor is used.
#.poison MODRUBY_BINREV
#.poison MODRUBY_PKGSPEC
#.poison MODRUBY_WANTLIB
MODRUBY_PKG_PREFIX= jruby
MODRUBY_FLAVOR = jruby
.endif
MODRUBY_RAKE_DEPENDS =
MODRUBY_RSPEC_DEPENDS =
# Set the path for the ruby interpreter and the rake and rspec
# commands used by MODRUBY_REGRESS and manually in some port
# targets.
.if ${MODRUBY_REV} == jruby
RUBY= ${LOCALBASE}/jruby/bin/jruby
RAKE= ${RUBY} -S rake
RSPEC= ${RUBY} -S spec
# Without this, JRuby often fails with a memory error.
MAKE_ENV+= JAVA_MEM='-Xms256m -Xmx256m'
.else
RUBY= ${LOCALBASE}/bin/ruby${MODRUBY_BINREV}
RAKE= ${LOCALBASE}/bin/rake${MODRUBY_BINREV}
2010-11-17 03:05:12 -05:00
MODRUBY_RSPEC_DEPENDS = devel/ruby-rspec,${MODRUBY_FLAVOR}
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
. if ${MODRUBY_REV} == 1.8
2010-11-17 03:05:12 -05:00
MODRUBY_RAKE_DEPENDS = devel/ruby-rake
RSPEC= ${LOCALBASE}/bin/spec
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
. else
RSPEC= ${LOCALBASE}/bin/spec${MODRUBY_BINREV}
. endif
.endif
MODRUBY_REGRESS?=
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
.if ${MODRUBY_REV} == jruby
2010-11-17 03:05:12 -05:00
MODRUBY_RUN_DEPENDS= lang/jruby
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
.else
MODRUBY_WANTLIB= ruby${MODRUBY_BINREV}
2010-11-17 03:05:12 -05:00
MODRUBY_RUN_DEPENDS= ${MODRUBY_PKGSPEC}:lang/ruby/${MODRUBY_REV}
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
.endif
MODRUBY_LIB_DEPENDS= ${MODRUBY_RUN_DEPENDS}
MODRUBY_BUILD_DEPENDS= ${MODRUBY_RUN_DEPENDS}
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
.if ${MODRUBY_REV} == 1.8
2010-11-17 03:05:12 -05:00
MODRUBY_ICONV_DEPENDS= ruby-iconv->=1.8,<=1.9:lang/ruby/${MODRUBY_REV},-iconv
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
.else
MODRUBY_ICONV_DEPENDS= ${MODRUBY_RUN_DEPENDS}
.endif
2002-12-09 16:04:08 -05:00
# location of ruby libraries
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
.if ${MODRUBY_REV} == jruby
MODRUBY_LIBDIR= ${LOCALBASE}/jruby/lib/ruby
.else
2002-12-09 15:26:36 -05:00
MODRUBY_LIBDIR= ${LOCALBASE}/lib/ruby
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
.endif
2002-12-09 16:04:08 -05:00
# common directories for ruby extensions
# used to create docs and examples install path
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
MODRUBY_RELDOCDIR= share/doc/${MODRUBY_PKG_PREFIX}
MODRUBY_RELEXAMPLEDIR= share/examples/${MODRUBY_PKG_PREFIX}
MODRUBY_DOCDIR= ${PREFIX}/${MODRUBY_RELDOCDIR}
MODRUBY_EXAMPLEDIR= ${PREFIX}/${MODRUBY_RELEXAMPLEDIR}
SUBST_VARS += ^MODRUBY_RELDOCDIR ^MODRUBY_RELEXAMPLEDIR
.if ${MODRUBY_REV} == jruby
MODRUBY_ARCH= ${MACHINE_ARCH:S/amd64/x86_64/}-java
.else
MODRUBY_ARCH= ${MACHINE_ARCH:S/amd64/x86_64/}-openbsd${OSREV}
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
.endif
2002-03-17 17:29:02 -05:00
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
# Assume that we want to automatically add ruby to BUILD_DEPENDS
# and RUN_DEPENDS unless the port specifically requests not to.
MODRUBY_BUILDDEP?= Yes
MODRUBY_RUNDEP?= Yes
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
.if ${NO_BUILD:L} == no && ${MODRUBY_BUILDDEP:L} == yes
BUILD_DEPENDS+= ${MODRUBY_BUILD_DEPENDS}
.endif
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
.if ${MODRUBY_RUNDEP:L} == yes
RUN_DEPENDS+= ${MODRUBY_RUN_DEPENDS}
.endif
.if ${MODRUBY_REGRESS:L:Mrake}
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
REGRESS_DEPENDS+= ${MODRUBY_RAKE_DEPENDS}
.endif
.if ${MODRUBY_REGRESS:L:Mrspec}
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
REGRESS_DEPENDS+= ${MODRUBY_RSPEC_DEPENDS}
.endif
MODRUBY_RUBY_ADJ= perl -pi -e 's,/usr/bin/env ruby,${RUBY},'
MODRUBY_ADJ_FILES?=
.if !empty(MODRUBY_ADJ_FILES)
MODRUBY_ADJ_REPLACE= for pat in ${MODRUBY_ADJ_FILES:QL}; do \
find ${WRKSRC} -type f -name "$$pat" -print0 | \
xargs -0r ${MODRUBY_RUBY_ADJ} ; \
done
. if !target(pre-configure)
pre-configure:
${MODRUBY_ADJ_REPLACE}
. endif
.endif
MODRUBY_EXTRACT_COOKIE = ${WRKDIR}/.modruby_extract_done
MODRUBY_BUILD_COOKIE = ${WRKBUILD}/.modruby_build_done
MODRUBY_INSTALL_COOKIE = ${WRKINST}/.modruby_install_done
.if ${CONFIGURE_STYLE:L:Mext} || ${CONFIGURE_STYLE:L:Mextconf}
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
# Ruby C exensions are specific to an arch and are loaded as
# shared libraries (not compiled into ruby), so set SHARED_ONLY
# and make sure PKG_ARCH=* is not set.
. if defined(PKG_ARCH) && ${PKG_ARCH} == *
ERRORS+= "Fatal: Should not have PKG_ARCH=* when compiling extensions"
. endif
SHARED_ONLY= Yes
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
# All ruby C extensions are dependent on libc and ruby's library, and almost
# all are also dependment on libm, so include c, m, and ruby's library by
# default, but let the port maintainer opt out of libm by setting
# MODRUBY_WANTLIB_m=No.
WANTLIB+= c ${MODRUBY_WANTLIB}
MODRUBY_WANTLIB_m?= Yes
. if ${MODRUBY_WANTLIB_m:L:Myes}
WANTLIB+= m
. endif
LIB_DEPENDS+= ${MODRUBY_LIB_DEPENDS}
.endif
.if ${CONFIGURE_STYLE:L:Mextconf}
CONFIGURE_STYLE= simple
CONFIGURE_SCRIPT= ${RUBY} extconf.rb
.elif ${CONFIGURE_STYLE:L:Mgem}
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
# All gems should be in the same directory on rubygems.org.
MASTER_SITES?= ${MASTER_SITE_RUBYGEMS}
EXTRACT_SUFX= .gem
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
# Ruby 1.9 and JRuby ship with ruby-gems
. if ${MODRUBY_REV} == 1.8
2010-11-17 03:05:12 -05:00
BUILD_DEPENDS+= devel/ruby-gems>=1.3.7p0
RUN_DEPENDS+= devel/ruby-gems>=1.3.7p0
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
. endif
# Just like all ruby C extensions should set SHARED_ONLY,
# pure ruby gem ports without C extensions should definitely not
# set SHARED_ONLY, and they are arch-independent.
. if !${CONFIGURE_STYLE:L:Mext}
. if defined(SHARED_ONLY) && ${SHARED_ONLY:L:Myes}
ERRORS+= "Fatal: Pure ruby gems without ext CONFIGURE_STYLE should not \
have SHARED_ONLY=Yes"
. endif
PKG_ARCH= *
. endif
# PLIST magic. Set variables so that the same PLIST will work for
# both ruby 1.8, ruby 1.9, and jruby.
SUBST_VARS+= ^GEM_LIB ^GEM_BIN DISTNAME
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
. if ${MODRUBY_REV} == jruby
GEM= ${RUBY} -S gem
# GEM_REL includes a slash so it can be used transparently when building
# a package for JRuby by holding everything in /usr/local/jruby. It's
# empty for ruby 1.8 and ruby 1.9, which install into /usr/local.
GEM_REL= jruby/
GEM_BASE_LIB= ${GEM_BASE}/jruby/${MODRUBY_LIBREV}
. else
GEM= ${LOCALBASE}/bin/gem${MODRUBY_BINREV}
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
GEM_REL=
GEM_BASE_LIB= ${GEM_BASE}/ruby/${MODRUBY_LIBREV}
. endif
GEM_BASE= ${WRKDIR}/gem-tmp/.gem
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
GEM_BIN= ${GEM_REL}bin
GEM_LIB= ${GEM_REL}lib/ruby/gems/${MODRUBY_LIBREV}
GEM_ABS_PATH= ${PREFIX}/${GEM_LIB}
GEM_BASE_BIN= ${GEM_BASE_LIB}/bin
# We purposely do not install documentation for ruby gems, because
# the filenames are generated differently on different ruby versions,
# and most use 1 file per method, which is insane.
GEM_FLAGS= --local --no-rdoc --no-ri --no-force --verbose --backtrace \
--user-install
_GEM_CONTENT= ${WRKDIR}/gem-content
_GEM_DATAFILE= ${_GEM_CONTENT}/data.tar.gz
_GEM_PATCHED= ${DISTNAME}${EXTRACT_SUFX}
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
. if ${CONFIGURE_STYLE:L:Mformat-executable}
GEM_FLAGS+= --format-executable
. endif
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
# Unpack the gem into WRKDIST so it can be patched. Include the gem metadata
# under WRKDIST so it can be patched easily to remove or change dependencies.
# Remove any signing of packages, as patching the gem could then break the
# signatures.
${MODRUBY_EXTRACT_COOKIE}:
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
mkdir -p ${WRKDIST} ${_GEM_CONTENT}
cd ${_GEM_CONTENT} && tar -xf ${FULLDISTDIR}/${DISTNAME}${EXTRACT_SUFX}
cd ${WRKDIST} && tar -xzf ${_GEM_DATAFILE} && rm ${_GEM_DATAFILE}
cd ${_GEM_CONTENT} && gunzip metadata.gz && \
mv metadata ${WRKDIST}/.metadata
rm -f ${_GEM_CONTENT}/*.gz.sig
# Rebuild the gem manually after possible patching, then install it to a
# temporary directory (not the final directory under fake, since that would
# require root access and building C extensions as root).
${MODRUBY_BUILD_COOKIE}:
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
cd ${WRKDIST} && gzip .metadata && \
mv .metadata.gz ${_GEM_CONTENT}/metadata.gz
cd ${WRKDIST} && find . -type f \! -name '*.orig' -print | \
pax -wz -s '/^\.\///' -f ${_GEM_DATAFILE}
cd ${_GEM_CONTENT} && tar -cf ${WRKDIR}/${_GEM_PATCHED} *.gz
mkdir -p ${GEM_BASE}
env -i ${MAKE_ENV} HOME=${GEM_BASE}/.. GEM_HOME=${GEM_BASE} \
${GEM} install ${GEM_FLAGS} ${WRKDIR}/${_GEM_PATCHED}
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
# Take the temporary gem directory, install the binary stub files to
# the appropriate directory, and move and fix ownership the gem library
# files.
${MODRUBY_INSTALL_COOKIE}:
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
if [ -d ${GEM_BASE_BIN} ]; then \
${INSTALL_DATA_DIR} ${PREFIX}/${GEM_BIN}; \
for f in ${GEM_BASE_BIN}/*; do \
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
${INSTALL_SCRIPT} $$f ${PREFIX}/${GEM_BIN}; \
done; \
rm -r ${GEM_BASE_BIN}; \
fi
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
${INSTALL_DATA_DIR} ${GEM_ABS_PATH}
cd ${GEM_BASE_LIB} && mv * ${GEM_ABS_PATH}
chown -R ${SHAREOWN}:${SHAREGRP} ${GEM_ABS_PATH}
. if !target(do-extract)
do-extract: ${MODRUBY_EXTRACT_COOKIE}
. endif
. if !target(do-build)
do-build: ${MODRUBY_BUILD_COOKIE}
. endif
. if !target(do-install)
do-install: ${MODRUBY_INSTALL_COOKIE}
. endif
.elif ${CONFIGURE_STYLE:L:Msetup}
MODRUBY_configure= \
cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${RUBY} setup.rb config \
--prefix=${PREFIX} ${CONFIGURE_ARGS};
${MODRUBY_BUILD_COOKIE}:
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${RUBY} setup.rb setup
${MODRUBY_INSTALL_COOKIE}:
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${RUBY} setup.rb install \
--prefix=${DESTDIR}
. if !target(do-build)
do-build: ${MODRUBY_BUILD_COOKIE}
. endif
. if !target(do-install)
do-install: ${MODRUBY_INSTALL_COOKIE}
. endif
.endif
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
# These are mostly used by the non-gem ports.
SUBST_VARS+= MODRUBY_LIBREV MODRUBY_ARCH
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
# regression stuff
.if !target(do-regress)
. if ${MODRUBY_REGRESS:L:Mrspec}
. if ${MODRUBY_REGRESS:L:Mrake}
RAKE_REGRESS_TARGET?= ${RSPEC_REGRESS_TARGET}
. else
RSPEC_REGRESS_TARGET?= spec
do-regress:
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
cd ${WRKSRC} && ${RSPEC} ${RSPEC_REGRESS_TARGET}
. endif
. endif
. if ${MODRUBY_REGRESS:L:Mrake}
RAKE_REGRESS_TARGET?= test
do-regress:
Major changes to allow the same port directory to build ports for both ruby 1.8, ruby 1.9, and jruby. One major change for all ports is that RDoc documentation is no longer going to be installed by default for gem ports. For ruby 1.8, it used a separate documentation file per method, and the file names created weren't consistent across ruby versions (1.8.6 differed from 1.8.7, and 1.8.7 differs from 1.9.2 and jruby). It made reviewing diffs very painful, and since most ruby developers do not use the documentation (preferring web documentation), it doesn't make sense to include them. For most gem ports, a ruby 1.9 version can be built by using the ruby19 FLAVOR, and a jruby version can be build using the jruby FLAVOR. These flavors modify the FULLPKGNAME to use either the ruby19- or jruby- package stem, so you don't need to worry about the ruby 1.8 package conflicting. In most cases, you no longer need the PKGNAME set in the port Makefile, as the FULLPKGNAME handling will take care of that for you. Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added automatically. Changes to all dependent ports will be committed shortly. For new ruby ports, you need to make sure that gem dependencies are specified like this (assuming they depend on the hoe gem): :${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR} MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby 1.9 ports, and jruby for jruby ports. The ,${FLAVOR} part at the end makes sure that dependencies use the same version of ruby that the current port uses. PLISTs are going to become a lot smaller with this. However, any binaries installed by the gem need to have a special string added. For example, the minitar binary installed by archivers/ruby-archive-tar-minitar looks like this in the PLIST: ${GEM_BIN}/minitar${GEM_BIN_SUFFIX} The ${GEM_BIN_SUFFIX} needs to be added manually so the package works on ruby 1.9, which installs the binaries with a 19 suffix. GEM_SKIPDEPENDS has been removed and related support will be removed from devel/ruby-gems. To modify dependencies inside the gem, the gem metadata is placed under WRKDIST and can be modified with the standard patching procedure. OK landry@
2010-11-08 18:20:43 -05:00
cd ${WRKSRC} && ${RAKE} ${RAKE_REGRESS_TARGET}
. endif
. if !${MODRUBY_REGRESS:L:Mrspec} && !${MODRUBY_REGRESS:L:Mrake}
NO_REGRESS=YES
. endif
.endif