mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
- Add Ruby 2.1
This commit is contained in:
parent
5ebd2956bc
commit
20c88bccc7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=344909
14 changed files with 1793 additions and 2 deletions
|
@ -186,6 +186,7 @@ RUBY_PATCHLEVEL= 484
|
|||
#
|
||||
RUBY19= ""
|
||||
RUBY20= "@comment "
|
||||
RUBY21= "@comment "
|
||||
|
||||
. elif ${RUBY_VER} == 2.0
|
||||
#
|
||||
|
@ -201,17 +202,39 @@ RUBY_PATCHLEVEL= 353
|
|||
#
|
||||
RUBY19= "@comment "
|
||||
RUBY20= ""
|
||||
RUBY21= "@comment "
|
||||
|
||||
. elif ${RUBY_VER} == 2.1
|
||||
#
|
||||
# Ruby 2.1
|
||||
#
|
||||
RUBY_RELVERSION= 2.1.0
|
||||
RUBY_PORTREVISION= 0
|
||||
RUBY_PORTEPOCH= 1
|
||||
RUBY_PATCHLEVEL= 0
|
||||
|
||||
#
|
||||
# PLIST_SUB helpers
|
||||
#
|
||||
RUBY19= "@comment "
|
||||
RUBY20= "@comment "
|
||||
RUBY21= ""
|
||||
|
||||
. else
|
||||
#
|
||||
# Other versions
|
||||
#
|
||||
IGNORE= Only ruby 1.9 and 2.0 are supported
|
||||
IGNORE= Only ruby 1.9, 2.0 and 2.1 are supported
|
||||
. endif
|
||||
.endif # defined(RUBY_VER)
|
||||
|
||||
.if ${RUBY_PATCHLEVEL} == 0
|
||||
RUBY_VERSION?= ${RUBY_RELVERSION}
|
||||
RUBY_DISTVERSION?= ${RUBY_RELVERSION}
|
||||
.else
|
||||
RUBY_VERSION?= ${RUBY_RELVERSION}.${RUBY_PATCHLEVEL}
|
||||
RUBY_DISTVERSION?= ${RUBY_RELVERSION}-p${RUBY_PATCHLEVEL}
|
||||
.endif
|
||||
|
||||
RUBY_WRKSRC= ${WRKDIR}/ruby-${RUBY_DISTVERSION}
|
||||
|
||||
|
@ -333,7 +356,8 @@ PLIST_SUB+= ${PLIST_RUBY_DIRS:C,DIR="(${LOCALBASE}|${PREFIX})/,DIR=",} \
|
|||
RUBY_NAME="${RUBY_NAME}" \
|
||||
RUBY_DEFAULT_SUFFIX="${RUBY_DEFAULT_SUFFIX}" \
|
||||
RUBY19=${RUBY19} \
|
||||
RUBY20=${RUBY20}
|
||||
RUBY20=${RUBY20} \
|
||||
RUBY21=${RUBY21}
|
||||
|
||||
.if defined(USE_RUBY_RDOC)
|
||||
MAKE_ENV+= RUBY_RDOC=${RUBY_RDOC}
|
||||
|
|
|
@ -299,6 +299,7 @@
|
|||
SUBDIR += ruby-usersguide
|
||||
SUBDIR += ruby19
|
||||
SUBDIR += ruby20
|
||||
SUBDIR += ruby21
|
||||
SUBDIR += runawk
|
||||
SUBDIR += rust
|
||||
SUBDIR += s9fes
|
||||
|
|
301
lang/ruby21/Makefile
Normal file
301
lang/ruby21/Makefile
Normal file
|
@ -0,0 +1,301 @@
|
|||
# Created by: Akinori MUSHA aka knu <knu@idaemons.org>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= ruby
|
||||
PORTVERSION= ${RUBY_PORTVERSION}
|
||||
PORTREVISION= ${RUBY_PORTREVISION}
|
||||
PORTEPOCH= ${RUBY_PORTEPOCH}
|
||||
CATEGORIES= lang ruby ipv6
|
||||
MASTER_SITES= ${MASTER_SITE_RUBY}
|
||||
MASTER_SITE_SUBDIR= ${MASTER_SITE_SUBDIR_RUBY}
|
||||
DISTNAME= ${RUBY_DISTNAME}
|
||||
DIST_SUBDIR= ruby
|
||||
|
||||
MAINTAINER= ruby@FreeBSD.org
|
||||
COMMENT?= Object-oriented interpreted scripting language
|
||||
|
||||
LICENSE= BSD2CLAUSE RUBY
|
||||
LICENSE_COMB= dual
|
||||
|
||||
LIB_DEPENDS= libexecinfo.so:${PORTSDIR}/devel/libexecinfo \
|
||||
libyaml.so:${PORTSDIR}/textproc/libyaml
|
||||
|
||||
# Using LIB_DEPENDS finds the libffi from gcc which causes problems
|
||||
BUILD_DEPENDS= libffi>=0:${PORTSDIR}/devel/libffi
|
||||
RUN_DEPENDS= libffi>=0:${PORTSDIR}/devel/libffi
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
WRKSRC= ${RUBY_WRKSRC}
|
||||
CONFIGURE_ARGS= ${RUBY_CONFIGURE_ARGS} \
|
||||
--enable-shared \
|
||||
--enable-pthread \
|
||||
--disable-rpath \
|
||||
--with-ruby-version=minor \
|
||||
--with-sitedir="${PREFIX}/lib/ruby/site_ruby" \
|
||||
--with-vendordir="${PREFIX}/lib/ruby/vendor_ruby"
|
||||
USE_OPENSSL= yes
|
||||
USE_LDCONFIG= yes
|
||||
USE_AUTOTOOLS= autoconf
|
||||
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}-${RUBY_DISTVERSION}
|
||||
|
||||
RUBY_VER= 2.1
|
||||
USE_BZIP2= yes
|
||||
USE_RUBY= yes
|
||||
RUBY_NO_BUILD_DEPENDS= yes
|
||||
RUBY_NO_RUN_DEPENDS= yes
|
||||
NO_LATEST_LINK= yes
|
||||
MAKE_JOBS_UNSAFE= yes
|
||||
|
||||
OPTIONS_DEFINE= RDOC DEBUG
|
||||
RDOC_DESC= Build and install Rdoc indexes
|
||||
DEBUG_DESC= Compile-in debug info
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
# PORTEPOCH/PORTREVISION hack
|
||||
|
||||
.if ${PORTEPOCH} != 0
|
||||
_SUF2= ,${PORTEPOCH}
|
||||
.endif
|
||||
|
||||
.if ${PORTREVISION} != 0
|
||||
_SUF1= _${PORTREVISION}
|
||||
.endif
|
||||
|
||||
CFLAGS+= ${PTHREAD_CFLAGS} # Keep this, else ruby will fail to load
|
||||
LDFLAGS+= ${PTHREAD_LIBS} # libraries dependent op libpthread.
|
||||
|
||||
#
|
||||
# Disable doc generation if requested or docs disabled at all
|
||||
#
|
||||
.if ${PORT_OPTIONS:MRDOC} && ${PORT_OPTIONS:MDOCS}
|
||||
CONFIGURE_ARGS+= --enable-install-doc
|
||||
.else
|
||||
CONFIGURE_ARGS+= --disable-install-doc
|
||||
.endif
|
||||
|
||||
.if ${ARCH} == "powerpc"
|
||||
CONFIGURE_ARGS+= --disable-dtrace
|
||||
.endif
|
||||
|
||||
CONFIGURE_ENV= CFLAGS="-I${LOCALBASE}/include ${CFLAGS}" \
|
||||
LIBS="-L${LOCALBASE}/lib ${LDFLAGS}" \
|
||||
debugflags=
|
||||
|
||||
.if ${RUBY_VER} == ${RUBY_DEFAULT_VER}
|
||||
MLINKS= ${RUBY_NAME}.1 ruby.1
|
||||
PLIST_SUB+= IF_DEFAULT=""
|
||||
.else
|
||||
PKGNAMESUFFIX= ${RUBY_VER:C/\.//}
|
||||
PLIST_SUB+= IF_DEFAULT="@comment "
|
||||
.endif
|
||||
|
||||
INSTALLED_SCRIPTS= irb erb rdoc ri ruby testrb
|
||||
|
||||
EXTSAMPLES= bigdecimal/sample/*.rb
|
||||
|
||||
EXTDOCS= readline/README* \
|
||||
ripper/README \
|
||||
stringio/README \
|
||||
syslog/syslog.txt
|
||||
|
||||
# Macros to change variables in rbconfig.rb
|
||||
RB_SET_CONF_VAR=${SH} -c '${REINPLACE_CMD} -E -e "s,(CONFIG\[\"$$0\"\][[:space:]]*=[[:space:]]*)(\(?)(.*)(\)?),\1\2$$1\4," ${WRKSRC}/rbconfig.rb' --
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -E \
|
||||
-e 's,-l$$pthread_lib,${PTHREAD_LIBS},g' \
|
||||
-e '/^RUBY_LIB_PATH/s,\.\$$\{TEENY\},,' \
|
||||
-e '/^RUBY_SITE_LIB_PATH2/s,\.\$$\{TEENY\},,' \
|
||||
-e '/^RUBY_VENDOR_LIB_PATH2/s,\.\$$\{TEENY\},,' \
|
||||
${WRKSRC}/configure
|
||||
|
||||
#
|
||||
# Eliminate all leftovers
|
||||
#
|
||||
@${FIND} ${WRKSRC}/ -name "*.orig" -delete
|
||||
|
||||
#
|
||||
# Remove modules we don't want
|
||||
#
|
||||
.for d in win32ole
|
||||
${RM} -rf ${BUILD_WRKSRC}/ext/${d}
|
||||
.endfor
|
||||
# We get rake from ports.
|
||||
.for d in bin/rake doc/rake lib/rake test/rake man/rake.1 lib/rake.rb
|
||||
${RM} -rf ${BUILD_WRKSRC}/${d}
|
||||
.endfor
|
||||
# We get the gem executable from ports.
|
||||
${RM} ${BUILD_WRKSRC}/bin/gem
|
||||
|
||||
#
|
||||
# Prepare modules we are wanting to build via external ports
|
||||
#
|
||||
.for d in gdbm tk
|
||||
${MV} ${BUILD_WRKSRC}/ext/${d} ${WRKDIR}/
|
||||
.endfor
|
||||
|
||||
post-build:
|
||||
#
|
||||
# Hack to allow modules to be installed into separate PREFIX and/or under user
|
||||
# privilegies
|
||||
#
|
||||
@${RB_SET_CONF_VAR} "prefix" "ENV['PREFIX'] || \3"
|
||||
@${RB_SET_CONF_VAR} "INSTALL" "ENV['RB_USER_INSTALL'] ? '/usr/bin/install -c' : '/usr/bin/install -c ${_BINOWNGRP}'"
|
||||
@${RB_SET_CONF_VAR} "INSTALL_PROGRAM" "ENV['RB_USER_INSTALL'] ? '${INSTALL} ${COPY} ${STRIP} -m ${BINMODE}' : '${INSTALL_PROGRAM}'"
|
||||
@${RB_SET_CONF_VAR} "INSTALL_SCRIPT" "ENV['RB_USER_INSTALL'] ? '${INSTALL} ${COPY} -m ${BINMODE}' : '${INSTALL_SCRIPT}'"
|
||||
@${RB_SET_CONF_VAR} "INSTALL_DATA" "ENV['RB_USER_INSTALL'] ? '${INSTALL} ${COPY} -m ${SHAREMODE}' : '${INSTALL_DATA}'"
|
||||
|
||||
pre-su-install:
|
||||
${MKDIR} ${STAGEDIR}${RUBY_DOCDIR} \
|
||||
${STAGEDIR}${RUBY_EXAMPLESDIR} \
|
||||
${STAGEDIR}${RUBY_RIDIR} \
|
||||
${STAGEDIR}${RUBY_SITERIDIR} \
|
||||
${STAGEDIR}${RUBY_SITEARCHLIBDIR} \
|
||||
${STAGEDIR}${RUBY_VENDORARCHLIBDIR}
|
||||
|
||||
${SETENV} LC_TIME=C /bin/date > ${STAGEDIR}${RUBY_RIDIR}/created.rid
|
||||
${SETENV} LC_TIME=C /bin/date > ${STAGEDIR}${RUBY_SITERIDIR}/created.rid
|
||||
${TOUCH} ${STAGEDIR}${RUBY_EXAMPLESDIR}/.keep_me
|
||||
${TOUCH} ${STAGEDIR}${RUBY_DOCDIR}/.keep_me
|
||||
${TOUCH} ${STAGEDIR}${RUBY_SITEARCHLIBDIR}/.keep_me
|
||||
${TOUCH} ${STAGEDIR}${RUBY_VENDORARCHLIBDIR}/.keep_me
|
||||
|
||||
post-install:
|
||||
#
|
||||
# XXX: hack to strip ruby binary. Ruby uses its own install script that seems
|
||||
# bogus to hack.
|
||||
#
|
||||
.if defined(STRIP) && ${STRIP} == -s
|
||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${RUBY_NAME}
|
||||
.endif
|
||||
|
||||
#
|
||||
# Link just installed "ruby" to "ruby21", etc.
|
||||
#
|
||||
.if ${RUBY_VER} == ${RUBY_DEFAULT_VER}
|
||||
. for FILE in ${INSTALLED_SCRIPTS}
|
||||
${LN} -f ${STAGEDIR}${PREFIX}/bin/${FILE}${RUBY_SUFFIX} ${STAGEDIR}${PREFIX}/bin/${FILE}
|
||||
. endfor
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
# Create all dirs required (":u" isn't avaiable in STABLE yet :-()
|
||||
${MKDIR} ${EXTSAMPLES:C,^([^/]+)/.*,\1,:S,^,${STAGEDIR}${RUBY_EXAMPLESDIR}/,}
|
||||
${MKDIR} ${EXTDOCS:C,^([^/]+)/.*,\1,:S,^,${STAGEDIR}${RUBY_DOCDIR}/,}
|
||||
.for FILE in ${EXTSAMPLES}
|
||||
${INSTALL_DATA} ${WRKSRC}/ext/${FILE} \
|
||||
${STAGEDIR}${RUBY_EXAMPLESDIR}/${FILE:C,^([^/]+)/.*,\1,}/
|
||||
.endfor
|
||||
.for FILE in ${EXTDOCS}
|
||||
${INSTALL_DATA} ${WRKSRC}/ext/${FILE} \
|
||||
${STAGEDIR}${RUBY_DOCDIR}/${FILE:C,^([^/]+)/.*,\1,}/
|
||||
.endfor
|
||||
@(cd ${WRKSRC}/sample/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${RUBY_EXAMPLESDIR}/)
|
||||
@(cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${RUBY_DOCDIR}/)
|
||||
${INSTALL_DATA} ${WRKSRC}/COPYING* \
|
||||
${WRKSRC}/ChangeLog \
|
||||
${WRKSRC}/LEGAL \
|
||||
${WRKSRC}/README* \
|
||||
${STAGEDIR}${RUBY_DOCDIR}/
|
||||
.endif
|
||||
|
||||
#
|
||||
# Add generated doxygen files to pkg-plist
|
||||
#
|
||||
@${ECHO_CMD} "@unexec rmdir %D/${RUBY_SITERIDIR:S,^${PREFIX}/,,} 2>/dev/null || true" >> ${TMPPLIST}
|
||||
@${ECHO_CMD} "@unexec rmdir %D/${RUBY_RIDIR:S,^${PREFIX}/,,} 2>/dev/null || true" >> ${TMPPLIST}
|
||||
@${ECHO_CMD} "@unexec rmdir %D/share/ri/${RUBY_VER} 2>/dev/null || true" >> ${TMPPLIST}
|
||||
@${ECHO_CMD} "@unexec rmdir %D/share/ri 2>/dev/null || true" >> ${TMPPLIST}
|
||||
@${ECHO_CMD} "@unexec rmdir %D/${RUBY_DOCDIR:S,^${PREFIX}/,,} 2>/dev/null || true" >> ${TMPPLIST}
|
||||
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
plist:
|
||||
truncate -s0 pkg-plist
|
||||
.for FILE in ${INSTALLED_SCRIPTS}
|
||||
@${ECHO_CMD} "bin/${FILE}%%RUBY_SUFFIX%%" >> pkg-plist
|
||||
@${ECHO_CMD} "%%IF_DEFAULT%%bin/${FILE}" >> pkg-plist
|
||||
.endfor
|
||||
@${ECHO_CMD} "lib/lib%%RUBY_NAME%%-static.a" >> pkg-plist
|
||||
@${ECHO_CMD} "lib/lib%%RUBY_NAME%%.so" >> pkg-plist
|
||||
@${ECHO_CMD} "lib/lib%%RUBY_NAME%%.so.%%RUBY_SHLIBVER%%" >> pkg-plist
|
||||
@${ECHO_CMD} "libdata/pkgconfig/ruby-${RUBY_VER}.pc" >> pkg-plist
|
||||
|
||||
#
|
||||
# Includes
|
||||
#
|
||||
@${FIND} -ds ${PREFIX}/include/ruby-${RUBY_VER} ! -type d | \
|
||||
${SED} 's,^${PREFIX}/*,,' >> pkg-plist
|
||||
@${FIND} -ds ${PREFIX}/include/ruby-${RUBY_VER} -type d | \
|
||||
${SED} 's,^${PREFIX}/*,@dirrm ,' >> pkg-plist
|
||||
|
||||
#
|
||||
# Vendor and site libs
|
||||
#
|
||||
@${FIND} -Eds ${RUBY_DOCDIR}/ ! -type d ! -name .keep_me | \
|
||||
${SED} 's,^${RUBY_DOCDIR},%%PORTDOCS%%%%RUBY_DOCDIR%%,' \
|
||||
>> pkg-plist
|
||||
@${FIND} -Eds ${RUBY_DOCDIR}/ -type d -mindepth 1 | ${SORT} -r | \
|
||||
${SED} -E -e \
|
||||
's,^${RUBY_DOCDIR}(.*),%%PORTDOCS%%@dirrm %%RUBY_DOCDIR%%\1,' \
|
||||
>> pkg-plist
|
||||
|
||||
@${FIND} -ds ${RUBY_EXAMPLESDIR}/ ! -type d ! -name .keep_me | \
|
||||
${SED} 's,^${RUBY_EXAMPLESDIR},%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%,' \
|
||||
>> pkg-plist
|
||||
@${FIND} -ds ${RUBY_EXAMPLESDIR}/ -type d -mindepth 1 | ${SORT} -r | \
|
||||
${SED} -E -e \
|
||||
's,^${RUBY_EXAMPLESDIR}(.*),%%PORTDOCS%%@dirrm %%RUBY_EXAMPLESDIR%%\1,' \
|
||||
>> pkg-plist
|
||||
|
||||
@${ECHO_CMD} "%%RUBY_DOCDIR%%/.keep_me" >> pkg-plist
|
||||
# @${ECHO_CMD} "@dirrmtry %%RUBY_DOCDIR%%" >> pkg-plist
|
||||
|
||||
@${ECHO_CMD} "%%RUBY_EXAMPLESDIR%%/.keep_me" >> pkg-plist
|
||||
@${ECHO_CMD} "@dirrmtry %%RUBY_EXAMPLESDIR%%" >> pkg-plist
|
||||
|
||||
@${ECHO_CMD} "@exec /bin/mkdir -p %D/%%RUBY_RIDIR%%" >> pkg-plist
|
||||
@${ECHO_CMD} "@exec env LC_TIME=C /bin/date > %D/%%RUBY_RIDIR%%/created.rid" >> pkg-plist
|
||||
@${ECHO_CMD} "@unexec /bin/rm -f %D/%%RUBY_RIDIR%%/created.rid" \
|
||||
>> pkg-plist
|
||||
|
||||
@${ECHO_CMD} "@exec /bin/mkdir -p %D/%%RUBY_SITERIDIR%%" >> pkg-plist
|
||||
@${ECHO_CMD} "@exec env LC_TIME=C /bin/date > %D/%%RUBY_SITERIDIR%%/created.rid" >> pkg-plist
|
||||
@${ECHO_CMD} "@unexec /bin/rm -f %D/%%RUBY_SITERIDIR%%/created.rid" \
|
||||
>> pkg-plist
|
||||
|
||||
@${FIND} -ds ${RUBY_LIBDIR}/ ! -type d | \
|
||||
${SED} 's,^${RUBY_LIBDIR},%%RUBY_LIBDIR%%,' >> pkg-plist
|
||||
@${FIND} -ds ${RUBY_LIBDIR}/ -type d | ${SORT} -r | \
|
||||
${SED} -E -e 's,^${RUBY_LIBDIR}(.*),@dirrm %%RUBY_LIBDIR%%\1,' >> pkg-plist
|
||||
|
||||
#
|
||||
# Find all gem files/folders
|
||||
#
|
||||
@${ECHO_CMD} "%%RUBY_SITEARCHLIBDIR%%/.keep_me" >> pkg-plist
|
||||
@${ECHO_CMD} "@dirrmtry %%RUBY_SITEARCHLIBDIR%%" >> pkg-plist
|
||||
@${ECHO_CMD} "@dirrmtry %%RUBY_SITELIBDIR%%" >> pkg-plist
|
||||
@${ECHO_CMD} "@dirrmtry lib/ruby/site_ruby" >> pkg-plist
|
||||
|
||||
@${ECHO_CMD} "%%RUBY_VENDORARCHLIBDIR%%/.keep_me" >> pkg-plist
|
||||
@${ECHO_CMD} "@dirrmtry %%RUBY_VENDORARCHLIBDIR%%" >> pkg-plist
|
||||
@${ECHO_CMD} "@dirrmtry %%RUBY_VENDORLIBDIR%%" >> pkg-plist
|
||||
@${ECHO_CMD} "@dirrmtry lib/ruby/vendor_ruby" >> pkg-plist
|
||||
|
||||
@${ECHO_CMD} "@dirrmtry lib/ruby" >> pkg-plist
|
||||
|
||||
@${SED} -i "" -E -e "s,${RUBY_ARCH},%%RUBY_ARCH%%,g" pkg-plist
|
||||
|
||||
test:
|
||||
@(cd ${WRKSRC}; ${MAKE} test)
|
||||
|
||||
validate:
|
||||
@${MKDIR} ${WRKSRC}/rubyspec
|
||||
rm -rf ${WRKSRC}/rubyspec/*
|
||||
(cd ${WRKSRC}/rubyspec && git clone git://github.com/rubyspec/rubyspec.git)
|
||||
(cd ${WRKSRC}/rubyspec && git clone git://github.com/rubyspec/mspec.git)
|
||||
(cd ${WRKSRC}/rubyspec/rubyspec && env PATH=${WRKSRC}/rubyspec/mspec/bin:${PATH} mspec -t ${STAGEDIR}${PREFIX}/bin/ruby${RUBY_SUFFIX})
|
||||
|
||||
.include <bsd.port.post.mk>
|
2
lang/ruby21/distinfo
Normal file
2
lang/ruby21/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
SHA256 (ruby/ruby-2.1.0.tar.bz2) = 1d3f4ad5f619ec15229206b6667586dcec7cc986672c8fbb8558161ecf07e277
|
||||
SIZE (ruby/ruby-2.1.0.tar.bz2) = 12007442
|
59
lang/ruby21/files/patch-configure.in
Normal file
59
lang/ruby21/files/patch-configure.in
Normal file
|
@ -0,0 +1,59 @@
|
|||
--- configure.in.orig 2014-02-17 23:26:58.602684892 +0000
|
||||
+++ configure.in 2014-02-17 23:30:59.146669242 +0000
|
||||
@@ -1072,10 +1072,10 @@
|
||||
],
|
||||
[ LIBS="-lm $LIBS"])
|
||||
|
||||
-AC_CHECK_LIB(crypt, crypt) # glibc (GNU/Linux, GNU/Hurd, GNU/kFreeBSD)
|
||||
-AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
|
||||
-AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
|
||||
-AC_CHECK_LIB(socket, shutdown) # SunOS/Solaris
|
||||
+AC_SEARCH_LIBS(crypt, crypt) # glibc (GNU/Linux, GNU/Hurd, GNU/kFreeBSD)
|
||||
+AC_SEARCH_LIBS(dlopen, dl) # Dynamic linking for SunOS/Solaris and SYSV
|
||||
+AC_SEARCH_LIBS(shl_load, dld) # Dynamic linking for HP-UX
|
||||
+AC_SEARCH_LIBS(shutdown, socket) # SunOS/Solaris
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
@@ -1970,7 +1970,7 @@
|
||||
if test x"$ac_cv_func_clock_gettime" != xyes; then
|
||||
# glibc 2.17 moves clock_* functions from librt to the main C library.
|
||||
# http://sourceware.org/ml/libc-announce/2012/msg00001.html
|
||||
- AC_CHECK_LIB(rt, clock_gettime)
|
||||
+ AC_SEARCH_LIBS(clock_gettime, rt)
|
||||
if test x"$ac_cv_lib_rt_clock_gettime" = xyes; then
|
||||
AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
|
||||
fi
|
||||
@@ -2411,7 +2411,7 @@
|
||||
fi
|
||||
|
||||
if test x"$enable_pthread" = xyes; then
|
||||
- for pthread_lib in thr pthread pthreads c c_r root; do
|
||||
+ for pthread_lib in pthread thr pthreads c c_r root; do
|
||||
AC_CHECK_LIB($pthread_lib, pthread_kill,
|
||||
rb_with_pthread=yes, rb_with_pthread=no)
|
||||
if test "$rb_with_pthread" = "yes"; then break; fi
|
||||
@@ -2419,6 +2419,7 @@
|
||||
if test x"$rb_with_pthread" = xyes; then
|
||||
AC_DEFINE(_REENTRANT)
|
||||
AC_DEFINE(_THREAD_SAFE)
|
||||
+ [pthread], [MAINLIBS="-pthread $MAINLIBS"],
|
||||
AC_DEFINE(HAVE_LIBPTHREAD)
|
||||
AC_CHECK_HEADERS(pthread_np.h, [], [], [@%:@include <pthread.h>])
|
||||
AS_CASE([$pthread_lib],
|
||||
@@ -2656,7 +2657,6 @@
|
||||
: ${LDSHARED='$(CC) -shared'}
|
||||
if test "$rb_cv_binary_elf" = yes; then
|
||||
LDFLAGS="$LDFLAGS -rdynamic"
|
||||
- DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$(.TARGET)'
|
||||
else
|
||||
test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED='$(LD) -Bshareable'
|
||||
fi
|
||||
@@ -3109,6 +3109,7 @@
|
||||
[freebsd*|dragonfly*], [
|
||||
SOLIBS='$(LIBS)'
|
||||
LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)'
|
||||
+ LIBRUBY_DLDFLAGS='-Wl,-soname,$(LIBRUBY_SO)'
|
||||
if test "$rb_cv_binary_elf" != "yes" ; then
|
||||
LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)"
|
||||
LIBRUBY_ALIASES=''
|
11
lang/ruby21/files/patch-cont.c
Normal file
11
lang/ruby21/files/patch-cont.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- cont.c.orig 2013-10-09 15:37:54.000000000 +0000
|
||||
+++ cont.c 2013-11-22 15:05:19.138396780 +0000
|
||||
@@ -44,6 +44,8 @@
|
||||
/* At least, Linux/ia64's getcontext(3) doesn't save register window.
|
||||
*/
|
||||
# define FIBER_USE_NATIVE 0
|
||||
+# elif defined(__FreeBSD__)
|
||||
+# define FIBER_USE_NATIVE 0
|
||||
# elif defined(__GNU__)
|
||||
/* GNU/Hurd doesn't fully support getcontext, setcontext, makecontext
|
||||
* and swapcontext functions. Disabling their usage till support is
|
11
lang/ruby21/files/patch-lib_mkmf.rb
Normal file
11
lang/ruby21/files/patch-lib_mkmf.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- lib/mkmf.rb.orig 2013-06-26 07:03:38.000000000 -0700
|
||||
+++ lib/mkmf.rb 2013-07-03 17:43:05.000000000 -0700
|
||||
@@ -226,7 +226,7 @@
|
||||
end
|
||||
$extmk ||= false
|
||||
if not $extmk and File.exist?(($hdrdir = RbConfig::CONFIG["rubyhdrdir"]) + "/ruby/ruby.h")
|
||||
- $topdir = $hdrdir
|
||||
+ $topdir = $hdrdir + "/" + "#{CONFIG['arch']}/ruby/"
|
||||
$top_srcdir = $hdrdir
|
||||
$arch_hdrdir = RbConfig::CONFIG["rubyarchhdrdir"]
|
||||
elsif File.exist?(($hdrdir = ($top_srcdir ||= topdir) + "/include") + "/ruby.h")
|
21
lang/ruby21/files/patch-lib_uri_generic.rb
Normal file
21
lang/ruby21/files/patch-lib_uri_generic.rb
Normal file
|
@ -0,0 +1,21 @@
|
|||
--- lib/uri/generic.rb.orig 2013-11-27 04:27:22.851503866 +0000
|
||||
+++ lib/uri/generic.rb 2013-11-27 04:27:58.130502926 +0000
|
||||
@@ -1481,7 +1481,17 @@
|
||||
end
|
||||
end
|
||||
|
||||
- str << path_query
|
||||
+ path = path_query
|
||||
+
|
||||
+ #
|
||||
+ # Add URI delimiter if the path misses it (like as in FTP)
|
||||
+ #
|
||||
+ if not path.empty? and not str.empty? and path[0, 1] != '/'
|
||||
+ path = '/' + path
|
||||
+ end
|
||||
+ str << path
|
||||
+ end
|
||||
+ if @fragment
|
||||
end
|
||||
|
||||
if @fragment
|
19
lang/ruby21/files/patch-thread_pthread.c
Normal file
19
lang/ruby21/files/patch-thread_pthread.c
Normal file
|
@ -0,0 +1,19 @@
|
|||
--- thread_pthread.c.orig 2013-05-01 15:40:57.000000000 +0000
|
||||
+++ thread_pthread.c 2014-01-25 03:00:55.044466722 +0000
|
||||
@@ -1420,13 +1420,13 @@
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
# ifdef PTHREAD_STACK_MIN
|
||||
- if (PTHREAD_STACK_MIN < 4096 * 3) {
|
||||
+ if (PTHREAD_STACK_MIN < 4096 * 4) {
|
||||
/* Allocate the machine stack for the timer thread
|
||||
- * at least 12KB (3 pages). FreeBSD 8.2 AMD64 causes
|
||||
+ * at least 16KB (4 pages). FreeBSD 8.2 AMD64 causes
|
||||
* machine stack overflow only with PTHREAD_STACK_MIN.
|
||||
*/
|
||||
pthread_attr_setstacksize(&attr,
|
||||
- 4096 * 3 + (THREAD_DEBUG ? BUFSIZ : 0));
|
||||
+ 4096 * 4 + (THREAD_DEBUG ? BUFSIZ : 0));
|
||||
}
|
||||
else {
|
||||
pthread_attr_setstacksize(&attr,
|
12
lang/ruby21/files/patch-tool_mkconfig.rb
Normal file
12
lang/ruby21/files/patch-tool_mkconfig.rb
Normal file
|
@ -0,0 +1,12 @@
|
|||
--- tool/mkconfig.rb.orig 2013-05-27 03:20:03.501815638 +0000
|
||||
+++ tool/mkconfig.rb 2013-05-27 03:20:31.093814303 +0000
|
||||
@@ -173,7 +173,8 @@
|
||||
end
|
||||
vars["prefix"] = ""
|
||||
vars["exec_prefix"] = ""
|
||||
-prefix = vars.expand(vars["rubyarchdir"])
|
||||
+major, minor, *rest = RUBY_VERSION.split('.')
|
||||
+prefix = "/lib/ruby/#{major}.#{minor}/#{arch}"
|
||||
print " TOPDIR = File.dirname(__FILE__).chomp!(#{prefix.dump})\n"
|
||||
print " DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " : ""), "'' unless defined? DESTDIR\n"
|
||||
print <<'ARCH' if universal
|
81
lang/ruby21/files/patch-tool_rbinstall.rb
Normal file
81
lang/ruby21/files/patch-tool_rbinstall.rb
Normal file
|
@ -0,0 +1,81 @@
|
|||
--- tool/rbinstall.rb.orig 2013-11-09 16:37:46.000000000 +0000
|
||||
+++ tool/rbinstall.rb 2014-02-15 19:19:08.049165962 +0000
|
||||
@@ -318,6 +318,7 @@
|
||||
libdir = CONFIG[CONFIG.fetch("libdirname", "libdir"), true]
|
||||
rubyhdrdir = CONFIG["rubyhdrdir", true]
|
||||
archhdrdir = CONFIG["rubyarchhdrdir"] || (rubyhdrdir + "/" + CONFIG['arch'])
|
||||
+libdatadir = CONFIG["prefix", true] + "/" + "libdata"
|
||||
rubylibdir = CONFIG["rubylibdir", true]
|
||||
archlibdir = CONFIG["rubyarchdir", true]
|
||||
sitelibdir = CONFIG["sitelibdir"]
|
||||
@@ -373,7 +374,7 @@
|
||||
install?(:local, :arch, :data) do
|
||||
pc = CONFIG["ruby_pc"]
|
||||
if pc and File.file?(pc) and File.size?(pc)
|
||||
- prepare "pkgconfig data", pkgconfigdir = File.join(libdir, "pkgconfig")
|
||||
+ prepare "pkgconfig data", pkgconfigdir = File.join(libdatadir, "pkgconfig")
|
||||
install pc, pkgconfigdir, :mode => $data_mode
|
||||
end
|
||||
end
|
||||
@@ -710,61 +711,6 @@
|
||||
end
|
||||
# :startdoc:
|
||||
|
||||
-install?(:ext, :comm, :gem) do
|
||||
- $:.unshift(File.join(srcdir, "lib"))
|
||||
- require("rubygems.rb")
|
||||
- gem_dir = Gem.default_dir
|
||||
- directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
|
||||
- prepare "default gems", gem_dir, directories
|
||||
-
|
||||
- spec_dir = File.join(gem_dir, directories.grep(/^spec/)[0])
|
||||
- default_spec_dir = "#{spec_dir}/default"
|
||||
- makedirs(default_spec_dir)
|
||||
-
|
||||
- gems = {}
|
||||
- File.foreach(File.join(srcdir, "defs/default_gems")) do |line|
|
||||
- line.chomp!
|
||||
- line.sub!(/\s*#.*/, '')
|
||||
- next if line.empty?
|
||||
- words = []
|
||||
- line.scan(/\G\s*([^\[\]\s]+|\[([^\[\]]*)\])/) do
|
||||
- words << ($2 ? $2.split : $1)
|
||||
- end
|
||||
- name, base_dir, src, execs = *words
|
||||
- next unless name and base_dir and src
|
||||
-
|
||||
- src = File.join(srcdir, src)
|
||||
- base_dir = File.join(srcdir, base_dir)
|
||||
- specgen = RbInstall::Specs::Generator.new(name, base_dir, src, execs || [])
|
||||
- gems[name] ||= specgen
|
||||
- end
|
||||
-
|
||||
- Dir.glob(srcdir+"/{lib,ext}/**/*.gemspec").each do |src|
|
||||
- specgen = RbInstall::Specs::Reader.new(src)
|
||||
- gems[specgen.gemspec.name] ||= specgen
|
||||
- end
|
||||
-
|
||||
- gems.sort.each do |name, specgen|
|
||||
- gemspec = specgen.gemspec
|
||||
- base_dir = specgen.src.sub(/\A#{Regexp.escape(srcdir)}\//, "")
|
||||
- full_name = "#{gemspec.name}-#{gemspec.version}"
|
||||
-
|
||||
- puts "#{" "*30}#{gemspec.name} #{gemspec.version}"
|
||||
- gemspec_path = File.join(default_spec_dir, "#{full_name}.gemspec")
|
||||
- open_for_install(gemspec_path, $data_mode) do
|
||||
- specgen.spec_source
|
||||
- end
|
||||
-
|
||||
- unless gemspec.executables.empty? then
|
||||
- bin_dir = File.join(gem_dir, 'gems', full_name, 'bin')
|
||||
- makedirs(bin_dir)
|
||||
-
|
||||
- execs = gemspec.executables.map {|exec| File.join(srcdir, 'bin', exec)}
|
||||
- install(execs, bin_dir, :mode => $prog_mode)
|
||||
- end
|
||||
- end
|
||||
-end
|
||||
-
|
||||
parse_args()
|
||||
|
||||
include FileUtils
|
19
lang/ruby21/pkg-descr
Normal file
19
lang/ruby21/pkg-descr
Normal file
|
@ -0,0 +1,19 @@
|
|||
Ruby is the interpreted scripting language for quick and
|
||||
easy object-oriented programming. It has many features to
|
||||
process text files and to do system management tasks (as in
|
||||
Perl). It is simple, straight-forward, and extensible.
|
||||
|
||||
Features of Ruby are shown below.
|
||||
|
||||
+ Simple Syntax
|
||||
+ *Normal* Object-Oriented features(ex. class, method calls)
|
||||
+ *Advanced* Object-Oriented features(ex. Mix-in, Singleton-method)
|
||||
+ Operator Overloading
|
||||
+ Exception Handling
|
||||
+ Iterators and Closures
|
||||
+ Garbage Collection
|
||||
+ Dynamic Loading of Object files(on some architecture)
|
||||
+ Highly Portable(works on many UNIX machines, and on DOS,
|
||||
Windows, Mac, BeOS etc.)
|
||||
|
||||
WWW: http://www.ruby-lang.org/en/
|
17
lang/ruby21/pkg-message
Normal file
17
lang/ruby21/pkg-message
Normal file
|
@ -0,0 +1,17 @@
|
|||
====
|
||||
Some of the standard commands are provided as separate ports for ease
|
||||
of upgrading:
|
||||
|
||||
devel/ruby-gems: gem - RubyGems package manager
|
||||
devel/rubygem-rake: rake - Ruby Make
|
||||
|
||||
And some of the standard libraries are provided as separate ports
|
||||
since they require extra dependencies:
|
||||
|
||||
databases/ruby-gdbm: GDBM module
|
||||
x11-toolkits/ruby-tk: Tcl/Tk modules
|
||||
japanese/ruby-tk: Tcl/Tk modules for Japanized Tcl/Tk
|
||||
lang/ruby-mode.el: Emacs lisp modules
|
||||
|
||||
Install them as occasion demands.
|
||||
====
|
1213
lang/ruby21/pkg-plist
Normal file
1213
lang/ruby21/pkg-plist
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue