2001-05-05 23:20:12 +00:00
# New ports collection makefile for: ruby-devel
# Date created: 6 May 2001
# Whom: Akinori MUSHA aka knu <knu@idaemons.org>
#
# $FreeBSD$
#
2001-06-04 14:54:32 +00:00
PORTNAME = ruby${ RUBY_R }
2001-05-05 23:20:12 +00:00
PORTVERSION = ${ RUBY_PORTVERSION }
CATEGORIES = lang ruby ipv6
2003-02-04 13:13:05 +00:00
MASTER_SITES = ${ MASTER_SITE_RUBY }
MASTER_SITE_SUBDIR = ${ MASTER_SITE_SUBDIR_RUBY }
2003-06-23 10:16:13 +00:00
DISTFILES = ${ RUBY_DISTNAME } ${ EXTRACT_SUFX }
2001-05-05 23:20:12 +00:00
DIST_SUBDIR = ruby
2001-09-03 13:00:01 +00:00
PATCH_SITES = ${ MASTER_SITE_RUBY }
PATCH_SITE_SUBDIR = snapshots
2001-10-07 19:30:39 +00:00
PATCHFILES = ${ RUBY_PATCHFILES }
2001-09-03 13:00:01 +00:00
PATCH_DIST_STRIP = -p1
2001-05-05 23:20:12 +00:00
MAINTAINER = knu@FreeBSD.org
2003-02-18 05:42:05 +00:00
COMMENT = An object-oriented interpreted scripting language
2001-05-05 23:20:12 +00:00
2002-03-26 22:20:00 +00:00
. i f d e f i n e d ( W I T H _ O N I G U R U M A )
2003-02-04 13:13:05 +00:00
PKGNAMESUFFIX = +oniguruma
BUILD_DEPENDS += ${ NONEXISTENT } :${ ONIGURUMA_PORTDIR } :patch
ONIGURUMA_PORTDIR = ${ PORTSDIR } /devel/oniguruma
ONIGURUMA_WRKSRC = ` cd ${ ONIGURUMA_PORTDIR } ; ${ MAKE } -V WRKSRC`
2002-08-03 12:36:22 +00:00
PLIST_SUB += ONIGURUMA = ""
. e l s e
PLIST_SUB += ONIGURUMA = "@comment "
2002-03-26 22:20:00 +00:00
. e n d i f
2003-01-11 10:16:22 +00:00
# Ruby 1.8 does not support IA64 yet.
2003-06-26 03:25:13 +00:00
ONLY_FOR_ARCHS = i386 alpha sparc64
2003-01-11 10:16:22 +00:00
2002-12-24 18:12:20 +00:00
#USE_BZIP2= yes
2001-07-31 16:46:55 +00:00
2002-12-24 18:12:20 +00:00
RUBY_VER = 1.8
2001-05-05 23:20:12 +00:00
USE_RUBY = yes
RUBY_NO_BUILD_DEPENDS = yes
RUBY_NO_RUN_DEPENDS = yes
2002-03-26 22:20:00 +00:00
#USE_AUTOCONF= yes # does not work with 2.13; requires 2.53 or later
GNU_CONFIGURE = yes
2001-05-05 23:20:12 +00:00
WRKSRC = ${ RUBY_WRKSRC }
2001-06-04 14:54:32 +00:00
CONFIGURE_ARGS = ${ RUBY_CONFIGURE_ARGS } \
--enable-shared
2002-11-22 12:49:49 +00:00
. i f d e f i n e d ( D E B U G )
CFLAGS += -g
STRIP = # none
. e n d i f
2002-09-27 13:55:41 +00:00
INSTALLS_SHLIB = yes
2001-05-05 23:20:12 +00:00
MAN1 = ruby${ _RUBY_SUFFIX } .1
2001-05-29 21:16:54 +00:00
2001-11-06 19:58:44 +00:00
LATEST_LINK = ruby-devel
2001-05-05 23:20:12 +00:00
. i n c l u d e < b s d . p o r t . p r e . m k >
2003-01-16 05:39:55 +00:00
MAKE_ARGS = -j3
2001-05-05 23:20:12 +00:00
. i f $ { O S V E R S I O N } > = 4 0 0 0 1 4
CONFIGURE_ARGS += --enable-ipv6
. e n d i f
2001-06-04 14:54:32 +00:00
. i f ${RUBY_VER} = = ${ RUBY_DEFAULT_VER }
MLINKS = ruby${ _RUBY_SUFFIX } .1 ruby${ RUBY_R } .1
IF_DEFAULT = ""
. e l s e
IF_DEFAULT = "@comment "
. e n d i f
. i f d e f i n e d ( N O R U B Y L I B )
RUBYLIB = "@comment "
. e l s e
RUBYLIB = ""
. e n d i f
PLIST_SUB += IF_DEFAULT = ${ IF_DEFAULT } \
RUBYLIB = ${ RUBYLIB }
2002-04-14 12:36:47 +00:00
INSTALLED_SCRIPTS = ${ PREFIX } /bin/irb \
2002-11-22 12:49:49 +00:00
${ PREFIX } /bin/erb \
2002-04-14 12:36:47 +00:00
${ PREFIX } /bin/h2rb
2001-05-05 23:20:12 +00:00
2003-04-19 15:57:37 +00:00
OBSOLETED_MODULES = bigfloat \
2003-06-23 10:16:13 +00:00
csv \
2003-04-19 15:57:37 +00:00
dl \
2003-06-23 10:16:13 +00:00
drb \
2003-02-12 16:12:00 +00:00
erb \
2002-03-26 22:20:00 +00:00
fileutils \
2002-07-15 11:26:49 +00:00
optparse \
2002-03-26 22:20:00 +00:00
racc-runtime \
2003-06-23 10:16:13 +00:00
rexml \
2002-03-26 22:20:00 +00:00
sha1 \
shell \
strscan \
syslog \
2003-03-03 16:47:14 +00:00
testunit \
2002-03-26 22:20:00 +00:00
timex \
urb \
2003-04-19 15:57:37 +00:00
uri \
2003-06-23 10:16:13 +00:00
yaml \
2003-04-19 15:57:37 +00:00
zlib
2002-03-26 22:20:00 +00:00
post-extract :
2002-11-22 12:49:49 +00:00
${ MV } ${ WRKSRC } /ext/dl/h2rb ${ WRKSRC } /bin/
2002-01-29 09:14:09 +00:00
2001-05-05 23:20:12 +00:00
post-patch :
2003-02-18 11:24:59 +00:00
${ FIND } ${ PATCH_WRKSRC } -name '*.orig' -delete
2001-05-05 23:20:12 +00:00
. f o r d i n W i n 3 2 A P I
2003-02-18 11:24:59 +00:00
${ RM } -rf ${ BUILD_WRKSRC } /ext/${ d }
2001-05-05 23:20:12 +00:00
. e n d f o r
2002-03-26 22:20:00 +00:00
. f o r d i n g d b m i c o n v t c l t k l i b t k
2003-02-18 11:24:59 +00:00
${ MV } ${ BUILD_WRKSRC } /ext/${ d } ${ WRKDIR } /
2001-05-05 23:20:12 +00:00
. e n d f o r
2003-01-11 08:46:30 +00:00
pre-configure :
. i f d e f i n e d ( W I T H _ O N I G U R U M A )
2003-02-04 13:13:05 +00:00
cd ${ ONIGURUMA_WRKSRC } ; \
./configure; \
${ MAKE } -f Makefile ${ RUBY_VER : S /.// } RUBYDIR = ${ WRKSRC }
2003-01-11 08:46:30 +00:00
. e n d i f
2003-02-18 11:24:59 +00:00
${ TOUCH } ${ CONFIGURE_WRKSRC } /${ CONFIGURE_SCRIPT }
2003-01-11 08:46:30 +00:00
2001-05-05 23:20:12 +00:00
post-install :
2002-05-25 00:30:24 +00:00
. i f d e f i n e d ( S T R I P ) & & ${STRIP} = = -s
2002-11-22 12:49:49 +00:00
${ STRIP_CMD } ${ RUBY }
2001-05-05 23:20:12 +00:00
. e n d i f
2001-06-04 14:54:32 +00:00
. i f ${RUBY_VER} = = ${ RUBY_DEFAULT_VER }
2002-12-24 18:12:20 +00:00
# Link just installed "ruby" to "ruby18", etc.
2002-12-12 12:53:03 +00:00
${ LN } -f ${ RUBY_WITHOUT_SUFFIX } ${ RUBY_R } ${ RUBY_WITH_SUFFIX }
${ LN } -f ${ PREFIX } /man/man1/ruby${ RUBY_R } .1 ${ PREFIX } /man/man1/ruby${ _RUBY_SUFFIX } .1
for f in ${ INSTALLED_SCRIPTS } ; do \
${ LN } -f $$ { f} ${ RUBY_R } $$ { f} ${ _RUBY_SUFFIX } ; \
done
2001-06-04 14:54:32 +00:00
. e n d i f
2002-04-14 12:36:47 +00:00
${ LDCONFIG } -m ${ PREFIX } /lib
2001-06-09 02:33:13 +00:00
${ MKDIR } ${ RUBY_ELISPDIR }
2003-04-05 11:37:55 +00:00
${ TOUCH } ${ RUBY_ELISPDIR } /.keep_me.${ RUBY_NAME }
2001-05-05 23:20:12 +00:00
${ MKDIR } ${ RUBY_EXAMPLESDIR }
2001-06-16 08:46:37 +00:00
${ TOUCH } ${ RUBY_EXAMPLESDIR } /.keep_me
2001-06-09 01:43:01 +00:00
${ MKDIR } ${ RUBY_DOCDIR }
2001-06-16 08:46:37 +00:00
${ TOUCH } ${ RUBY_DOCDIR } /.keep_me
2001-06-09 01:43:01 +00:00
. i f ! d e f i n e d ( N O P O R T D O C S )
2001-05-05 23:20:12 +00:00
${ INSTALL_DATA } ${ WRKSRC } /sample/* ${ RUBY_EXAMPLESDIR }
${ MKDIR } ${ RUBY_EXAMPLESDIR } /curses
${ INSTALL_DATA } ${ WRKSRC } /ext/curses/hello.rb ${ WRKSRC } /ext/curses/rain.rb ${ WRKSRC } /ext/curses/view.rb ${ RUBY_EXAMPLESDIR } /curses
2002-04-14 12:36:47 +00:00
${ MKDIR } ${ RUBY_EXAMPLESDIR } /dl
2002-05-03 19:05:25 +00:00
${ INSTALL_DATA } ${ WRKSRC } /ext/dl/sample/*.C ${ WRKSRC } /ext/dl/sample/*.rb ${ RUBY_EXAMPLESDIR } /dl
2001-05-05 23:20:12 +00:00
${ MKDIR } ${ RUBY_EXAMPLESDIR } /pty
${ INSTALL_DATA } ${ WRKSRC } /ext/pty/expect_sample.rb ${ WRKSRC } /ext/pty/script.rb ${ WRKSRC } /ext/pty/shl.rb ${ RUBY_EXAMPLESDIR } /pty
2001-07-31 16:46:55 +00:00
${ INSTALL_DATA } ${ WRKSRC } /COPYING* ${ RUBY_DOCDIR }
2002-07-24 10:56:42 +00:00
${ INSTALL_DATA } ${ WRKSRC } /ChangeLog ${ RUBY_DOCDIR }
2001-07-31 16:46:55 +00:00
${ INSTALL_DATA } ${ WRKSRC } /LEGAL ${ RUBY_DOCDIR }
2001-05-05 23:20:12 +00:00
${ INSTALL_DATA } ${ WRKSRC } /README* ${ RUBY_DOCDIR }
2003-04-19 15:57:37 +00:00
${ INSTALL_DATA } ${ WRKSRC } /ext/bigdecimal/bigdecimal_*.html ${ RUBY_DOCDIR }
${ INSTALL_DATA } ${ WRKSRC } /ext/digest/digest.txt* ${ RUBY_DOCDIR }
${ INSTALL_DATA } ${ WRKSRC } /ext/dl/doc/dl.txt ${ RUBY_DOCDIR }
${ INSTALL_DATA } ${ WRKSRC } /ext/etc/etc.txt* ${ RUBY_DOCDIR }
2001-05-05 23:20:12 +00:00
${ MKDIR } ${ RUBY_DOCDIR } /pty
${ INSTALL_DATA } ${ WRKSRC } /ext/pty/README* ${ RUBY_DOCDIR } /pty
${ MKDIR } ${ RUBY_DOCDIR } /readline
2001-07-31 16:46:55 +00:00
${ INSTALL_DATA } ${ WRKSRC } /ext/readline/README* ${ RUBY_DOCDIR } /readline
2003-04-19 15:57:37 +00:00
${ INSTALL_DATA } ${ WRKSRC } /ext/syslog/syslog.txt ${ RUBY_DOCDIR }
${ INSTALL_DATA } ${ WRKSRC } /ext/zlib/doc/zlib.rd ${ RUBY_DOCDIR }
2001-05-11 18:22:57 +00:00
${ CP } -R ${ WRKSRC } /doc/* ${ RUBY_DOCDIR } /
2001-05-05 23:20:12 +00:00
. e n d i f
2002-01-29 09:14:09 +00:00
@${ ECHO } "Deinstalling obsoleted packages that are now part of ruby..."
@cd ${ PKG_DBDIR } ; for portname in ${ OBSOLETED_MODULES } ; do \
for pkg in ${ RUBY_PKGNAMEPREFIX } $$ portname-*; do \
if [ -d $$ pkg ] ; then \
${ ECHO } " ---> $$ pkg " ; \
${ PKG_DELETE } -f $$ pkg; \
fi ; \
done ; \
done
@${ ECHO_CMD } " @exec ${ ECHO_CMD } \"Deinstalling obsoleted packages that are now part of ruby...\" " >> ${ TMPPLIST }
@${ ECHO_CMD } " @exec cd ${ PKG_DBDIR } && for portname in ${ OBSOLETED_MODULES } ; do for pkg in ${ RUBY_PKGNAMEPREFIX } \$ $portname -*; do if [ -d \$ $pkg ]; then ${ ECHO_CMD } \"---> \$ $pkg \"; ${ PKG_DELETE } -f \$ $pkg ; fi; done; done " >> ${ TMPPLIST }
2001-05-05 23:20:12 +00:00
@${ CAT } ${ PKGMESSAGE }
test :
@( cd ${ WRKSRC } ; ${ MAKE } test )
. i n c l u d e < b s d . p o r t . p o s t . m k >