2001-05-06 01:20:12 +02: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 16:54:32 +02:00
PORTNAME = ruby${ RUBY_R }
2001-05-06 01:20:12 +02:00
PORTVERSION = ${ RUBY_PORTVERSION }
CATEGORIES = lang ruby ipv6
2003-02-04 14:13:05 +01:00
MASTER_SITES = ${ MASTER_SITE_RUBY }
MASTER_SITE_SUBDIR = ${ MASTER_SITE_SUBDIR_RUBY }
2003-06-23 12:16:13 +02:00
DISTFILES = ${ RUBY_DISTNAME } ${ EXTRACT_SUFX }
2001-05-06 01:20:12 +02:00
DIST_SUBDIR = ruby
2001-09-03 15:00:01 +02:00
PATCH_SITES = ${ MASTER_SITE_RUBY }
PATCH_SITE_SUBDIR = snapshots
2001-10-07 21:30:39 +02:00
PATCHFILES = ${ RUBY_PATCHFILES }
2001-09-03 15:00:01 +02:00
PATCH_DIST_STRIP = -p1
2001-05-06 01:20:12 +02:00
MAINTAINER = knu@FreeBSD.org
2003-02-18 06:42:05 +01:00
COMMENT = An object-oriented interpreted scripting language
2001-05-06 01:20:12 +02:00
2002-03-26 23:20:00 +01: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 14:13:05 +01: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 14:36:22 +02:00
PLIST_SUB += ONIGURUMA = ""
. e l s e
PLIST_SUB += ONIGURUMA = "@comment "
2002-03-26 23:20:00 +01:00
. e n d i f
2004-08-12 10:57:52 +02:00
#USE_BZIP2= yes
2003-10-31 13:33:35 +01:00
USE_OPENSSL = yes
2001-07-31 18:46:55 +02:00
2002-12-24 19:12:20 +01:00
RUBY_VER = 1.8
2001-05-06 01:20:12 +02:00
USE_RUBY = yes
RUBY_NO_BUILD_DEPENDS = yes
RUBY_NO_RUN_DEPENDS = yes
2002-03-26 23:20:00 +01:00
#USE_AUTOCONF= yes # does not work with 2.13; requires 2.53 or later
GNU_CONFIGURE = yes
2001-05-06 01:20:12 +02:00
WRKSRC = ${ RUBY_WRKSRC }
2001-06-04 16:54:32 +02:00
CONFIGURE_ARGS = ${ RUBY_CONFIGURE_ARGS } \
--enable-shared
2002-11-22 13:49:49 +01: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 15:55:41 +02:00
INSTALLS_SHLIB = yes
2004-02-26 20:20:09 +01:00
MAN1 = ${ RUBY_NAME } .1
2001-05-29 23:16:54 +02:00
2001-11-06 20:58:44 +01:00
LATEST_LINK = ruby-devel
2001-05-06 01:20:12 +02:00
. i n c l u d e < b s d . p o r t . p r e . m k >
2004-03-14 01:18:21 +01:00
. i f ${ARCH} = = "ia64"
BROKEN = "Segfault during build on ia64"
. e n d i f
2003-01-16 06:39:55 +01:00
MAKE_ARGS = -j3
2001-05-06 01:20:12 +02: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 16:54:32 +02:00
. i f ${RUBY_VER} = = ${ RUBY_DEFAULT_VER }
2004-02-26 20:20:09 +01:00
MLINKS = ${ RUBY_NAME } .1 ruby${ RUBY_R } .1
2001-06-04 16:54:32 +02:00
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 14:36:47 +02:00
INSTALLED_SCRIPTS = ${ PREFIX } /bin/irb \
2002-11-22 13:49:49 +01:00
${ PREFIX } /bin/erb \
2003-12-15 07:35:48 +01:00
${ PREFIX } /bin/h2rb \
${ PREFIX } /bin/rdoc \
2003-12-22 11:08:34 +01:00
${ PREFIX } /bin/ri \
2003-12-15 07:35:48 +01:00
${ PREFIX } /bin/testrb
2001-05-06 01:20:12 +02:00
2003-04-19 17:57:37 +02:00
OBSOLETED_MODULES = bigfloat \
2003-06-23 12:16:13 +02:00
csv \
2003-04-19 17:57:37 +02:00
dl \
2003-06-23 12:16:13 +02:00
drb \
2003-02-12 17:12:00 +01:00
erb \
2002-03-26 23:20:00 +01:00
fileutils \
2003-10-31 13:33:35 +01:00
gserver \
2003-08-04 13:15:05 +02:00
openssl \
2002-07-15 13:26:49 +02:00
optparse \
2002-03-26 23:20:00 +01:00
racc-runtime \
2003-12-15 07:35:48 +01:00
rdoc \
2003-06-23 12:16:13 +02:00
rexml \
2003-12-22 11:08:34 +01:00
ri \
2002-03-26 23:20:00 +01:00
sha1 \
shell \
2003-10-31 13:33:35 +01:00
soap \
2002-03-26 23:20:00 +01:00
strscan \
syslog \
2003-03-03 17:47:14 +01:00
testunit \
2002-03-26 23:20:00 +01:00
timex \
urb \
2003-04-19 17:57:37 +02:00
uri \
2003-08-04 13:15:05 +02:00
webrick \
xmlrpc \
2003-06-23 12:16:13 +02:00
yaml \
2003-04-19 17:57:37 +02:00
zlib
2002-03-26 23:20:00 +01:00
post-extract :
2002-11-22 13:49:49 +01:00
${ MV } ${ WRKSRC } /ext/dl/h2rb ${ WRKSRC } /bin/
2002-01-29 10:14:09 +01:00
2001-05-06 01:20:12 +02:00
post-patch :
2003-02-18 12:24:59 +01:00
${ FIND } ${ PATCH_WRKSRC } -name '*.orig' -delete
2001-05-06 01:20:12 +02:00
. f o r d i n W i n 3 2 A P I
2003-02-18 12:24:59 +01:00
${ RM } -rf ${ BUILD_WRKSRC } /ext/${ d }
2001-05-06 01:20:12 +02:00
. e n d f o r
2002-03-26 23:20:00 +01: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 12:24:59 +01:00
${ MV } ${ BUILD_WRKSRC } /ext/${ d } ${ WRKDIR } /
2001-05-06 01:20:12 +02:00
. e n d f o r
2003-01-11 09:46:30 +01: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 14:13:05 +01:00
cd ${ ONIGURUMA_WRKSRC } ; \
./configure; \
${ MAKE } -f Makefile ${ RUBY_VER : S /.// } RUBYDIR = ${ WRKSRC }
2003-01-11 09:46:30 +01:00
. e n d i f
2003-02-18 12:24:59 +01:00
${ TOUCH } ${ CONFIGURE_WRKSRC } /${ CONFIGURE_SCRIPT }
2003-01-11 09:46:30 +01:00
2001-05-06 01:20:12 +02:00
post-install :
2002-05-25 02:30:24 +02:00
. i f d e f i n e d ( S T R I P ) & & ${STRIP} = = -s
2002-11-22 13:49:49 +01:00
${ STRIP_CMD } ${ RUBY }
2001-05-06 01:20:12 +02:00
. e n d i f
2001-06-04 16:54:32 +02:00
. i f ${RUBY_VER} = = ${ RUBY_DEFAULT_VER }
2002-12-24 19:12:20 +01:00
# Link just installed "ruby" to "ruby18", etc.
2004-02-26 20:20:09 +01:00
${ LN } -f ${ RUBY_WITH_SUFFIX } ${ RUBY_WITHOUT_SUFFIX } ${ RUBY_R }
${ LN } -f ${ PREFIX } /man/man1/${ RUBY_NAME } .1 ${ PREFIX } /man/man1/ruby${ RUBY_R } .1
2002-12-12 13:53:03 +01:00
for f in ${ INSTALLED_SCRIPTS } ; do \
2004-02-26 20:20:09 +01:00
${ LN } -f $$ { f} ${ RUBY_SUFFIX } $$ { f} ${ RUBY_R } ; \
2002-12-12 13:53:03 +01:00
done
2001-06-04 16:54:32 +02:00
. e n d i f
2002-04-14 14:36:47 +02:00
${ LDCONFIG } -m ${ PREFIX } /lib
2001-06-09 04:33:13 +02:00
${ MKDIR } ${ RUBY_ELISPDIR }
2003-04-05 13:37:55 +02:00
${ TOUCH } ${ RUBY_ELISPDIR } /.keep_me.${ RUBY_NAME }
2001-05-06 01:20:12 +02:00
${ MKDIR } ${ RUBY_EXAMPLESDIR }
2001-06-16 10:46:37 +02:00
${ TOUCH } ${ RUBY_EXAMPLESDIR } /.keep_me
2001-06-09 03:43:01 +02:00
${ MKDIR } ${ RUBY_DOCDIR }
2001-06-16 10:46:37 +02:00
${ TOUCH } ${ RUBY_DOCDIR } /.keep_me
2001-06-09 03:43:01 +02:00
. i f ! d e f i n e d ( N O P O R T D O C S )
2003-09-10 09:33:57 +02:00
${ CP } -R ${ WRKSRC } /sample/* ${ RUBY_EXAMPLESDIR } /
2001-05-06 01:20:12 +02:00
${ 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 14:36:47 +02:00
${ MKDIR } ${ RUBY_EXAMPLESDIR } /dl
2002-05-03 21:05:25 +02:00
${ INSTALL_DATA } ${ WRKSRC } /ext/dl/sample/*.C ${ WRKSRC } /ext/dl/sample/*.rb ${ RUBY_EXAMPLESDIR } /dl
2001-05-06 01:20:12 +02: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 18:46:55 +02:00
${ INSTALL_DATA } ${ WRKSRC } /COPYING* ${ RUBY_DOCDIR }
2002-07-24 12:56:42 +02:00
${ INSTALL_DATA } ${ WRKSRC } /ChangeLog ${ RUBY_DOCDIR }
2001-07-31 18:46:55 +02:00
${ INSTALL_DATA } ${ WRKSRC } /LEGAL ${ RUBY_DOCDIR }
2001-05-06 01:20:12 +02:00
${ INSTALL_DATA } ${ WRKSRC } /README* ${ RUBY_DOCDIR }
2003-04-19 17:57:37 +02: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 }
2003-12-15 07:35:48 +01:00
${ INSTALL_DATA } ${ WRKSRC } /ext/enumerator/enumerator.txt ${ RUBY_DOCDIR }
2003-04-19 17:57:37 +02:00
${ INSTALL_DATA } ${ WRKSRC } /ext/etc/etc.txt* ${ RUBY_DOCDIR }
2001-05-06 01:20:12 +02:00
${ MKDIR } ${ RUBY_DOCDIR } /pty
${ INSTALL_DATA } ${ WRKSRC } /ext/pty/README* ${ RUBY_DOCDIR } /pty
${ MKDIR } ${ RUBY_DOCDIR } /readline
2001-07-31 18:46:55 +02:00
${ INSTALL_DATA } ${ WRKSRC } /ext/readline/README* ${ RUBY_DOCDIR } /readline
2003-04-19 17:57:37 +02:00
${ INSTALL_DATA } ${ WRKSRC } /ext/syslog/syslog.txt ${ RUBY_DOCDIR }
${ INSTALL_DATA } ${ WRKSRC } /ext/zlib/doc/zlib.rd ${ RUBY_DOCDIR }
2001-05-11 20:22:57 +02:00
${ CP } -R ${ WRKSRC } /doc/* ${ RUBY_DOCDIR } /
2004-08-12 10:57:52 +02:00
cd ${ INSTALL_WRKSRC } ; \
${ SETENV } ${ MAKE_ENV } ${ MAKE } ${ MAKE_FLAGS } ${ MAKEFILE } ${ MAKE_ARGS } install-doc
2001-05-06 01:20:12 +02:00
. e n d i f
2002-01-29 10:14:09 +01: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-06 01:20:12 +02: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 >