Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 Sep 2000 18:00:23 +0900
From:      "Akinori -Aki- MUSHA" <knu@idaemons.org>
To:        asami@FreeBSD.ORG, freebsd-ports@FreeBSD.ORG
Subject:   Re: bsd.ruby.mk, bsd.gnome.mk, ... etc.
Message-ID:  <86d7ilj1eg.wl@archon.local.idaemons.org>
In-Reply-To: In your message of "Thu, 31 Aug 2000 20:18:40 %2B0900" <86g0nl8yr3.wl@archon.local.idaemons.org>
References:  <86g0nl8yr3.wl@archon.local.idaemons.org>

next in thread | previous in thread | raw e-mail | index | archive | help
At Thu, 31 Aug 2000 20:18:40 +0900,
I wrote:
> 
> Hi,
> 
> Now almost all Ruby related ports have many common variables, I'd
> suggest introducing Mk/bsd.ruby.mk to reduce maintenance tasks.
> 
> For the same reason, such as bsd.gnome.mk and bsd.kde.mk would be
> useful too.  I'm not sure if bsd.ports.mk should take care of them
> all, but it'd be nice enough to just put bsd.<category>.mk and let
> ports include it.
> 
> Opinions?

I am kind of disappointed that noone has replied to my post.  If my
suggestion only sounded uninteresting to you all, I would just
silently put ruby.mk under lang/ruby/files to myself.


For what it's worth, I attach what I'd like to have.  Again, any
comments are welcome.

Thanks.

-- 
                           /
                          /__  __       
                         / )  )  ) )  /
Akinori -Aki- MUSHA aka / (_ /  ( (__(  @ idaemons.org / FreeBSD.org

"We're only at home when we're on the run, on the wing, on the fly"

#
# bsd.ruby.mk - Utility definitions for Ruby related ports.
#
# Created by: Akinori MUSHA <knu@FreeBSD.org>
#
# $FreeBSD$
#

Ruby_Include=			bsd.ruby.mk
Ruby_Include_MAINTAINER=	knu@FreeBSD.org

#
# USE_RUBY		- Says that the port uses ruby for building and running.
# USE_LIBRUBY		- Says that the port uses libruby.
# USE_RUBY_EXTCONF	- Says that the port uses extconf.rb to configure.
# RUBY_EXTCONF		- Set to the alternative name of extconf.rb (default: extconf.rb).
# RUBY_EXTCONF_SUBDIRS	- Set to list of subdirectories, if multiple modules are included.
# USE_RUBY_SETUP	- Says that the port uses setup.rb to configure and build.  Implies USE_RUBY_AMSTD.
# RUBY_SETUP		- Set to the alternative name of setup.rb (default: setup.rb).
# USE_RUBY_AMSTD	- Says that the port uses amstd for building and running.
# USE_RUBY_RD		- Says that the port uses rd to generate documents.
#
# RUBY_VERSION		- Full version of ruby (see below for current value).
# RUBY_VER		- Short version of ruby (see below for current value).
# RUBY_SHLIBVER		- Major version of libruby (see below for current value).
# RUBY_ARCH		- Directory name of architecture dependent libraries.
# RUBY_SUFFIX		- Suffix for ruby binaries and directories.
#
# RUBY			- Set to full path of ruby.
# RUBY_RD		- Set to full path of rd.
#
# RUBY_PORT		- Set to port path of ruby without PORTSDIR.
# RUBY_AMSTD_PORT	- Set to port path of ruby-amstd without PORTSDIR.
# RUBY_RD_PORT		- Set to port path of rd without PORTSDIR.
#
# RUBY_LIB_DEPENDS	- Set to LIB_DEPENDS entry for libruby.
# RUBY_DEPENDS		- Set to BUILD_DEPENDS/RUN_DEPENDS entry for ruby.
# RUBY_AMSTD_DEPENDS	- Set to BUILD_DEPENDS/RUN_DEPENDS entry for ruby-amstd.
# RUBY_RD2_DEPENDS	- Set to BUILD_DEPENDS entry for rd.
#
# RUBY_LIBDIR		- Installation path for architecture independent libraries.
# RUBY_ARCHLIBDIR	- Installation path for architecture dependent libraries.
# RUBY_SITELIBDIR	- Installation path for site architecture independent libraries.
# RUBY_SITEARCHLIBDIR	- Installation path for site architecture dependent libraries.
# RUBY_DOCDIR		- Installation path for documents.
# RUBY_EXAMPLESDIR	- Installation path for examples.
#

RUBY_VERSION?=		1.4.6
RUBY_VER?=      	${RUBY_VERSION:R}
RUBY_SHLIBVER?=		${RUBY_VER:S/.//}
RUBY_ARCH?=     	${ARCH}-freebsd${OSREL}
RUBY_SUFFIX?=		# ${RUBY_VER:S/.//}

# Commands
RUBY?=          	${LOCALBASE}/bin/ruby${RUBY_SUFFIX}
RUBY_RD?=		${LOCALBASE}/bin/rd2

# Ports
RUBY_PORT?=		lang/ruby
RUBY_AMSTD_PORT?=	devel/ruby-amstd
RUBY_RD_PORT?=		textproc/ruby-rdtool

# Depends
RUBY_LIB_DEPENDS?=	ruby${RUBY_SUFFIX}.${RUBY_SHLIBVER}:${PORTSDIR}/${RUBY_PORT}
RUBY_DEPENDS?=		${RUBY}:${PORTSDIR}/${RUBY_PORT}
RUBY_AMSTD_DEPENDS?=	${RUBY_SITELIBDIR}/amstd/info.rb:${PORTSDIR}/${RUBY_AMSTD_PORT}
RUBY_RD2_DEPENDS?=	${RUBY_RD}:${PORTSDIR}/${RUBY_RD_PORT}

# Directories
RUBY_LIBDIR?=		${LOCALBASE}/lib/ruby/${RUBY_VER}
RUBY_ARCHLIBDIR?=	${RUBY_LIBDIR}/${RUBY_ARCH}
RUBY_SITELIBDIR?=	${LOCALBASE}/lib/ruby/site_ruby/${RUBY_VER}
RUBY_SITEARCHLIBDIR?=	${RUBY_SITELIBDIR}/${RUBY_ARCH}
RUBY_DOCDIR?=		${LOCALBASE}/share/doc/ruby
RUBY_EXAMPLESDIR?=	${LOCALBASE}/share/examples/ruby

# PLIST
PLIST_RUBY_DIRS=	RUBY_LIBDIR="${RUBY_LIBDIR}" \
			RUBY_ARCHLIBDIR="${RUBY_ARCHLIBDIR}" \
			RUBY_SITELIBDIR="${RUBY_SITELIBDIR}" \
			RUBY_SITEARCHLIBDIR="${RUBY_SITEARCHLIBDIR}" \
			RUBY_DOCDIR="${RUBY_DOCDIR}" \
			RUBY_EXAMPLESDIR="${RUBY_EXAMPLESDIR}"

PLIST_SUB+=		RUBY_VER="${RUBY_VER}" \
			RUBY_ARCH="${RUBY_ARCH}" \
			${PLIST_RUBY_DIRS:S,DIR="${LOCALBASE}/,DIR=",}

# extconf.rb
.if defined(USE_RUBY_EXTCONF)
USE_RUBY=		yes

RUBY_EXTCONF?=		extconf.rb

do-configure:	ruby-extconf-configure

ruby-extconf-configure:
.if defined(RUBY_EXTCONF_SUBDIRS)
.for d in ${RUBY_EXTCONF_SUBDIRS}
	@${ECHO_MSG} "===>  Running ${RUBY_EXTCONF} in ${d} to configure"
	@cd ${WRKSRC}/${d}; \
	${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_EXTCONF} ${CONFIGURE_ARGS}
.endfor
.else
	@${ECHO_MSG} "===>  Running ${RUBY_EXTCONF} to configure"
	@cd ${WRKSRC}; \

.endif
.endif

# setup.rb
.if defined(USE_RUBY_SETUP)
USE_RUBY_AMSTD=		yes

RUBY_SETUP?=		setup.rb

do-configure:	ruby-setup-configure

ruby-setup-configure:
	@${ECHO_MSG} "===>  Running ${RUBY_SETUP} to configure"
	@cd ${WRKSRC}; \
	${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_SETUP} config

do-build:	ruby-setup-build

ruby-setup-build:
	@${ECHO_MSG} "===>  Running ${RUBY_SETUP} to build"
	@cd ${WRKSRC}; \
	${SETENV} ${MAKE_ENV} ${RUBY} ${RUBY_SETUP} setup
.endif

.if defined(USE_LIBRUBY)
LIB_DEPENDS+=		${RUBY_LIB_DEPENDS}
.endif

.if defined(USE_RUBY)
BUILD_DEPENDS+=		${RUBY_DEPENDS}
RUN_DEPENDS+=		${RUBY_DEPENDS}
.endif

.if defined(USE_RUBY_AMSTD)
BUILD_DEPENDS+=		${RUBY_AMSTD_DEPENDS}
RUN_DEPENDS+=		${RUBY_AMSTD_DEPENDS}
.endif

.if defined(USE_RUBY_RD)
.if !defined(NOPORTDOCS)
BUILD_DEPENDS+=		${RUBY_RD2_DEPENDS}
.endif
.endif


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86d7ilj1eg.wl>