# ChangeLog for dev-lang/ruby
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.448 2010/05/06 20:10:08 a3li Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.449 2010/05/18 22:18:31 flameeyes Exp $
+
+*ruby-1.8.7_p249-r2 (18 May 2010)
+*ruby-1.8.6_p388-r1 (18 May 2010)
+
+ 18 May 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+ +ruby-1.8.6_p388-r1.ebuild, +ruby-1.8.7_p249-r2.ebuild,
+ ruby-1.9.1_p376.ebuild, metadata.xml:
+ Add patches to build with BerkDB 5.0 (bug #319583) and OpenSSL 1.0 (bug
+ #304427) to Ruby 1.8.x. Also use --no-undefined as it's done for 1.9. Also
+ add USE flags for ncurses, readline and libedit, and properly depend on
+ zlib. Drop emacs USE flag and dependency on app-emacs/ruby-mode as the new
+ Emacs versions support ruby-mode themselves and it should be even more
+ updated.
*ruby-1.8.7_p249-r1 (06 May 2010)
DIST ruby-1.8.6-p388.tar.bz2 3973412 RMD160 9f451182ef4fb485109d96953e6af388151cadc8 SHA1 175e7f1571761e522e88cc8a8ed123f000c99c59 SHA256 8536b18413f2475698fa275b356daff6ceab5232bc503496f4afbee64e8b4abc
DIST ruby-1.8.7-p249.tar.bz2 4153461 RMD160 96b238bd7194652ec194a505c2e5911441c5c5ee SHA1 2947f21f22e9345a3e94d84e6f88e7d0fc98a871 SHA256 8b89448fc79df6862660e9f77e884f06c76da28f078d8edd2f17567a615f3af5
DIST ruby-1.9.1-p376.tar.bz2 7293106 RMD160 0aa585333d337c030c93a8b405e46d990514709d SHA1 878e18719099b742c9353e0fe054a9d602568d2e SHA256 79164e647e23bb7c705195e0075ce6020c30dd5ec4f8c8a12a100fe0eb0d6783
+DIST ruby-patches-1.8.6_p388-r1.tar.bz2 5085 RMD160 bfe19c6c9920181f1957971ea7ec8d6c62a03bf4 SHA1 5ad1ddfcb019b8cf6d46ae39ab4bcbef78737be0 SHA256 f922577613ea96fd51d5656d4ecedf46a09a835e834256a1b3272c68b83c4047
DIST ruby-patches-1.8.6_p388.tar.bz2 3137 RMD160 6c9b3099687aef29bf9881f11c2915fbd0ba8196 SHA1 7222102440156b9fd0b461bd23828301aa62a5ad SHA256 93053c8fe2e9fcf9fba714780466678c78b42be59547f76055ffea53aef4c4e5
DIST ruby-patches-1.8.7_p249-r1.tar.bz2 3186 RMD160 94ec3d9cb38cd20f7431e796da0d6ef3cef72483 SHA1 51faacfe56ca16408d99a645627f64b819cc73f7 SHA256 24658d909a86ffb986703dfea26be2a5a18715d1a8a36a1a106aae03d59c5594
+DIST ruby-patches-1.8.7_p249-r2.tar.bz2 3598 RMD160 6351f14327273702837626c4ad0cdb54bbce6181 SHA1 cafee0570901094d57e0f91141e3f166fbe946a6 SHA256 13cf40dcf3fd15c8559cad2784e129abc74b1b4c2dda7db78dc9d8da8826d27a
DIST ruby-patches-1.8.7_p249.tar.bz2 1499 RMD160 98670658db00a1c4ad563e68bf25263fd7f317fd SHA1 d371f7f25a75ac8626e2e87a570bb52a60579fb8 SHA256 b35ba05fb07c0264a9232e756cd80ff7f284fb8aa464368ce028d67fa11f31af
DIST ruby-patches-1.9.1_p376.tar.bz2 2091 RMD160 b3a899bb98481081ff2de01c5c9e89549b28ebc8 SHA1 cea557a7732b3bc7c8140c3405dd193eb1c10714 SHA256 c2de7c1c0efb7e4f22d1a771931c886e8e76011cc02aab82652b6f71f4b613c6
+EBUILD ruby-1.8.6_p388-r1.ebuild 5439 RMD160 174b3c6915ba89e0d8db2aad6f1d7f7672787c9e SHA1 2e37b6bc4aeeb08e6504a7107cc1ba55ab8f0816 SHA256 69213147628ed90d7af278c97e4d45780bcb083c54c080d5b71c82023da15d5e
EBUILD ruby-1.8.6_p388.ebuild 5329 RMD160 91d80731628a54a76254540a816b7be7cb22e91e SHA1 2bfe49e18e9c39cd2fcc79dd6aadbc678073c8b5 SHA256 92c012a949f9d274754f22d0fb80e35f0c22559b2cad2ce5d7c79ab64fa8bce7
EBUILD ruby-1.8.7_p249-r1.ebuild 5358 RMD160 7f1cab9efc8ef9a41c5c5645462358fa00c8acf4 SHA1 ba9ec839d4e42e8960f5739e5efd0c78d5987816 SHA256 9c328f8d00228d982c7b0b9294fe646f7fdfcf711a75e74a2ba316149afbc53a
+EBUILD ruby-1.8.7_p249-r2.ebuild 5451 RMD160 e83002122bdd66a4712217f05c057707b32c96c6 SHA1 663141d2f01733aef672a1ab57a7036c2b0af2b8 SHA256 2366dd2265375c73a34afc2497679f0c3e6a5a34b44ea61007ed0640e30836c3
EBUILD ruby-1.8.7_p249.ebuild 5344 RMD160 1c78a00aceb9f3ddeb6c18f4c45d289bc507b370 SHA1 34808e3e70b3c0c20f87f991ebdd9d51dd98b848 SHA256 3d2a1eb8198d65adad424198f35e42679408ffb44e5e9c281f98ee9a45c970eb
-EBUILD ruby-1.9.1_p376.ebuild 5091 RMD160 6929424fff1510ed883dc70ac968b13cc5d603de SHA1 5ff2cb4b34b5f4d26027e2f5af8f0a9b0763577b SHA256 3d6070028fd5e38c2e8cab32d8b9c41c8930019dac36cb726ac1de2d709708e7
-MISC ChangeLog 68849 RMD160 8abd50e0d77bd9d3fb94aa5807ead55f1aae93cc SHA1 d3e62da44de8d598c98debaa389f4f4bd71bf63c SHA256 2fbe3b260b83a078db5f3725381f2e520e8221e3b90cb8166f241871cd088fdc
-MISC metadata.xml 262 RMD160 f8642aa78425fe09dc0e0660cb20a5bd4233d5bb SHA1 64def0369477ecf76b9285fb9c1cf0e6a4f334e5 SHA256 5ee3c0cfedcb966505e4fafcfc5321a8ee20c128da9bbcafff5aa268df588d59
+EBUILD ruby-1.9.1_p376.ebuild 5470 RMD160 9a10d94a887b6111ecd1906960795f98b1c36343 SHA1 9a69b369eee539ea88653a211af691102c56c6cd SHA256 6d7381545394eacf5de503af16412aac36dae3950a8cc6802f903df56d104a00
+MISC ChangeLog 69464 RMD160 2f427c8627ae712c46179de14c646139dd768d72 SHA1 927443dc9af4dec2d92d2c86533fce8e9643647b SHA256 47e728f41dd6e7fab070cfaf2b0d1a8f54b227581e0ab1e39297599dcb7bb6b8
+MISC metadata.xml 1081 RMD160 77ebe9b23b118075684351f9c6443aaa81fab263 SHA1 d3d03be57aab9b84a4712b51a69eff47bc47124d SHA256 428eb9a33cba960d1d03ba6c9b4566b99f0ff8171d5d16873b600bb75837745d
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.14 (GNU/Linux)
+Version: GnuPG v2.0.15 (GNU/Linux)
-iEYEARECAAYFAkvjIiYACgkQ+tgfDpkAy6ADWwCgkKYzO1SPGOtSvKBDmYVPSeAO
-t5MAoJIkUpbba+y9ZeEvgDo4xbLlrT0k
-=QXMi
+iEYEARECAAYFAkvzEjAACgkQAiZjviIA2XhM3QCdG7L6L9Z+ND9rzokp0mY8nBkz
+OjQAoOZwwruxO5fIf/p3ofl5cB+yz1D9
+=VH2r
-----END PGP SIGNATURE-----
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<herd>ruby</herd>
-<use><flag name='rubytests'>Install ruby tests that can only be run after ruby is installed</flag></use>
+ <herd>ruby</herd>
+ <use>
+ <flag name='rubytests'>
+ Install ruby tests that can only be run after ruby is installed
+ </flag>
+
+ <flag name='libedit'>
+ Use the <pkg>dev-libs/libedit</pkg> library to provide the
+ readline extension, used for instance by the irb tool. This flag
+ will take precedence over the readline USE flag.
+
+ If neither libedit nor readline USE flags are enabled, the
+ readline extension will not be built (and irb will lose line
+ editing functionality).
+ </flag>
+
+ <flag name='readline'>
+ Use the <pkg>sys-libs/readline</pkg> library to provide the
+ readline extension, used for instance by the irb tool. This flag
+ is meaningful only if the libedit USE flag is disabled.
+
+ If neither libedit nor readline USE flags are enabled, the
+ readline extension will not be built (and irb will lose line
+ editing functionality).
+ </flag>
+ </use>
</pkgmetadata>
--- /dev/null
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ruby-1.8.6_p388-r1.ebuild,v 1.1 2010/05/18 22:18:31 flameeyes Exp $
+
+EAPI=2
+
+inherit autotools eutils flag-o-matic multilib versionator
+
+MY_P="${PN}-$(replace_version_separator 3 '-')"
+S=${WORKDIR}/${MY_P}
+
+SLOT=$(get_version_component_range 1-2)
+MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
+# 1.8 and 1.9 series disagree on this
+RUBYVERSION=$(get_version_component_range 1-2)
+
+DESCRIPTION="An object-oriented scripting language"
+HOMEPAGE="http://www.ruby-lang.org/"
+SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.bz2
+ http://www.flameeyes.eu/gentoo-distfiles/${PN}-patches-${PVR}.tar.bz2"
+
+LICENSE="|| ( Ruby GPL-2 )"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="+berkdb debug doc examples +gdbm ipv6 rubytests socks5 ssl threads tk xemacs ncurses +readline libedit"
+
+RDEPEND="
+ berkdb? ( sys-libs/db )
+ gdbm? ( sys-libs/gdbm )
+ ssl? ( >=dev-libs/openssl-0.9.8m )
+ socks5? ( >=net-proxy/dante-1.1.13 )
+ tk? ( dev-lang/tk[threads=] )
+ ncurses? ( sys-libs/ncurses )
+ libedit? ( dev-libs/libedit )
+ !libedit? ( readline? ( sys-libs/readline ) )
+ sys-libs/zlib
+ >=app-admin/eselect-ruby-20091225
+ !=dev-lang/ruby-cvs-${SLOT}*
+ !<dev-ruby/rdoc-2
+ !dev-ruby/rexml"
+DEPEND="${RDEPEND}"
+PDEPEND="xemacs? ( app-xemacs/ruby-modes )"
+
+PROVIDE="virtual/ruby"
+
+src_prepare() {
+ EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}/patches"
+
+ # Fix a hardcoded lib path in configure script
+ sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
+ configure.in || die "sed failed"
+
+ eautoreconf
+}
+
+src_configure() {
+ # -fomit-frame-pointer makes ruby segfault, see bug #150413.
+ filter-flags -fomit-frame-pointer
+ # In many places aliasing rules are broken; play it safe
+ # as it's risky with newer compilers to leave it as it is.
+ append-flags -fno-strict-aliasing
+
+ # Socks support via dante
+ if use socks5 ; then
+ # Socks support can't be disabled as long as SOCKS_SERVER is
+ # set and socks library is present, so need to unset
+ # SOCKS_SERVER in that case.
+ unset SOCKS_SERVER
+ fi
+
+ # Increase GC_MALLOC_LIMIT if set (default is 8000000)
+ if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
+ append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
+ fi
+
+ # ipv6 hack, bug 168939. Needs --enable-ipv6.
+ use ipv6 || myconf="--with-lookup-order-hack=INET"
+
+ if use libedit; then
+ einfo "Using libedit to provide readline extension"
+ myconf="${myconf} --enable-libedit --with-readline"
+ elif use readline; then
+ einfo "Using readline to provide readline extension"
+ myconf="${myconf} --with-readline"
+ else
+ myconf="${myconf} --without-readline"
+ fi
+
+ econf --program-suffix=$MY_SUFFIX --enable-shared \
+ $(use_enable socks5 socks) \
+ $(use_enable doc install-doc) \
+ $(use_enable threads pthread) \
+ --enable-ipv6 \
+ $(use_enable debug) \
+ $(use_with berkdb dbm) \
+ $(use_with gdbm) \
+ $(use_with ssl openssl) \
+ $(use_with tk) \
+ $(use_with ncurses curses) \
+ ${myconf} \
+ --with-sitedir=/usr/$(get_libdir)/ruby/site_ruby \
+ --enable-option-checking=no \
+ || die "econf failed"
+}
+
+src_compile() {
+ emake EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
+}
+
+src_test() {
+ emake -j1 test || die "make test failed"
+
+ elog "Ruby's make test has been run. Ruby also ships with a make check"
+ elog "that cannot be run until after ruby has been installed."
+ elog
+ if use rubytests; then
+ elog "You have enabled rubytests, so they will be installed to"
+ elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
+ elog "than root, and you must place them into a writeable directory."
+ elog "Then call: "
+ elog
+ elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
+ else
+ elog "Enable the rubytests USE flag to install the make check tests"
+ fi
+}
+
+src_install() {
+ # Ruby is involved in the install process, we don't want interference here.
+ unset RUBYOPT
+
+ # Creating the rubygems directories, bug #230163 once more.
+ local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
+
+ LD_LIBRARY_PATH="${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
+ RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
+ for d in $(find "${S}/ext" -type d) ; do
+ RUBYLIB="${RUBYLIB}:$d"
+ done
+ export LD_LIBRARY_PATH RUBYLIB
+
+ emake DESTDIR="${D}" install || die "make install failed"
+
+ keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitelibdir']")
+ keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitearchdir']")
+
+ if use doc; then
+ make DESTDIR="${D}" install-doc || die "make install-doc failed"
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r sample
+ fi
+
+ dosym "libruby${MY_SUFFIX}$(get_libname ${PV%_*})" \
+ "/usr/$(get_libdir)/libruby$(get_libname ${PV%.*})"
+ dosym "libruby${MY_SUFFIX}$(get_libname ${PV%_*})" \
+ "/usr/$(get_libdir)/libruby$(get_libname ${PV%_*})"
+
+ dodoc ChangeLog NEWS README* ToDo || die
+
+ if use rubytests; then
+ pushd test
+ insinto /usr/share/${PN}-${SLOT}
+ doins -r .
+ popd
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
+ eselect ruby set ruby${MY_SUFFIX}
+ fi
+
+ elog
+ elog "To switch between available Ruby profiles, execute as root:"
+ elog "\teselect ruby set ruby(18|19|...)"
+ elog
+}
+
+pkg_postrm() {
+ eselect ruby cleanup
+}
--- /dev/null
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ruby-1.8.7_p249-r2.ebuild,v 1.1 2010/05/18 22:18:31 flameeyes Exp $
+
+EAPI=2
+
+inherit autotools eutils flag-o-matic multilib versionator
+
+MY_P="${PN}-$(replace_version_separator 3 '-')"
+S=${WORKDIR}/${MY_P}
+
+SLOT=$(get_version_component_range 1-2)
+MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
+# 1.8 and 1.9 series disagree on this
+RUBYVERSION=$(get_version_component_range 1-2)
+
+DESCRIPTION="An object-oriented scripting language"
+HOMEPAGE="http://www.ruby-lang.org/"
+SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.bz2
+ http://www.flameeyes.eu/gentoo-distfiles/${PN}-patches-${PVR}.tar.bz2"
+
+LICENSE="|| ( Ruby GPL-2 )"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="+berkdb debug doc examples +gdbm ipv6 rubytests socks5 ssl threads tk xemacs ncurses +readline libedit"
+
+RDEPEND="
+ berkdb? ( sys-libs/db )
+ gdbm? ( sys-libs/gdbm )
+ ssl? ( >=dev-libs/openssl-0.9.8m )
+ socks5? ( >=net-proxy/dante-1.1.13 )
+ tk? ( dev-lang/tk[threads=] )
+ ncurses? ( sys-libs/ncurses )
+ libedit? ( dev-libs/libedit )
+ !libedit? ( readline? ( sys-libs/readline ) )
+ sys-libs/zlib
+ >=app-admin/eselect-ruby-20091225
+ !=dev-lang/ruby-cvs-${SLOT}*
+ !<dev-ruby/rdoc-2
+ !dev-ruby/rexml"
+DEPEND="${RDEPEND}"
+PDEPEND="xemacs? ( app-xemacs/ruby-modes )"
+
+PROVIDE="virtual/ruby"
+
+src_prepare() {
+ EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}/patches"
+
+ # Fix a hardcoded lib path in configure script
+ sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
+ configure.in || die "sed failed"
+
+ eautoreconf
+}
+
+src_configure() {
+ # -fomit-frame-pointer makes ruby segfault, see bug #150413.
+ filter-flags -fomit-frame-pointer
+ # In many places aliasing rules are broken; play it safe
+ # as it's risky with newer compilers to leave it as it is.
+ append-flags -fno-strict-aliasing
+
+ # Socks support via dante
+ if use socks5 ; then
+ # Socks support can't be disabled as long as SOCKS_SERVER is
+ # set and socks library is present, so need to unset
+ # SOCKS_SERVER in that case.
+ unset SOCKS_SERVER
+ fi
+
+ # Increase GC_MALLOC_LIMIT if set (default is 8000000)
+ if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
+ append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
+ fi
+
+ # ipv6 hack, bug 168939. Needs --enable-ipv6.
+ use ipv6 || myconf="--with-lookup-order-hack=INET"
+
+ if use libedit; then
+ einfo "Using libedit to provide readline extension"
+ myconf="${myconf} --enable-libedit --with-readline"
+ elif use readline; then
+ einfo "Using readline to provide readline extension"
+ myconf="${myconf} --with-readline"
+ else
+ myconf="${myconf} --without-readline"
+ fi
+
+ econf --program-suffix=$MY_SUFFIX --enable-shared \
+ $(use_enable socks5 socks) \
+ $(use_enable doc install-doc) \
+ $(use_enable threads pthread) \
+ --enable-ipv6 \
+ $(use_enable debug) \
+ $(use_with berkdb dbm) \
+ $(use_with gdbm) \
+ $(use_with ssl openssl) \
+ $(use_with tk) \
+ $(use_with ncurses curses) \
+ ${myconf} \
+ --with-sitedir=/usr/$(get_libdir)/ruby/site_ruby \
+ --enable-option-checking=no \
+ || die "econf failed"
+}
+
+src_compile() {
+ emake EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
+}
+
+src_test() {
+ emake -j1 test || die "make test failed"
+
+ elog "Ruby's make test has been run. Ruby also ships with a make check"
+ elog "that cannot be run until after ruby has been installed."
+ elog
+ if use rubytests; then
+ elog "You have enabled rubytests, so they will be installed to"
+ elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
+ elog "than root, and you must place them into a writeable directory."
+ elog "Then call: "
+ elog
+ elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
+ else
+ elog "Enable the rubytests USE flag to install the make check tests"
+ fi
+}
+
+src_install() {
+ # Ruby is involved in the install process, we don't want interference here.
+ unset RUBYOPT
+
+ # Creating the rubygems directories, bug #230163 once more.
+ local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
+
+ LD_LIBRARY_PATH="${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
+ RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
+ for d in $(find "${S}/ext" -type d) ; do
+ RUBYLIB="${RUBYLIB}:$d"
+ done
+ export LD_LIBRARY_PATH RUBYLIB
+
+ emake DESTDIR="${D}" install || die "make install failed"
+
+ keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitelibdir']")
+ keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitearchdir']")
+
+ if use doc; then
+ make DESTDIR="${D}" install-doc || die "make install-doc failed"
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r sample
+ fi
+
+ dosym "libruby${MY_SUFFIX}$(get_libname ${PV%_*})" \
+ "/usr/$(get_libdir)/libruby$(get_libname ${PV%.*})"
+ dosym "libruby${MY_SUFFIX}$(get_libname ${PV%_*})" \
+ "/usr/$(get_libdir)/libruby$(get_libname ${PV%_*})"
+
+ dodoc ChangeLog NEWS README* ToDo || die
+
+ if use rubytests; then
+ pushd test
+ insinto /usr/share/${PN}-${SLOT}
+ doins -r .
+ popd
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
+ eselect ruby set ruby${MY_SUFFIX}
+ fi
+
+ elog
+ elog "To switch between available Ruby profiles, execute as root:"
+ elog "\teselect ruby set ruby(18|19|...)"
+ elog
+}
+
+pkg_postrm() {
+ eselect ruby cleanup
+}
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ruby-1.9.1_p376.ebuild,v 1.1 2010/05/01 10:25:23 a3li Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ruby-1.9.1_p376.ebuild,v 1.2 2010/05/18 22:18:31 flameeyes Exp $
EAPI=2
inherit autotools eutils flag-o-matic multilib versionator
-# Add patchlevel
-MY_P="${P/_/-}"
+MY_P="${PN}-$(replace_version_separator 3 '-')"
+S=${WORKDIR}/${MY_P}
-# 1.9.1.0 -> 1.9
SLOT=$(get_version_component_range 1-2)
-
-# 1.9.1.0 -> 1.9.1 (used in libdirs)
-RUBYVERSION=$(get_version_component_range 1-3)
-
-# 1.9 -> 19
MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
+# 1.8 and 1.9 series disagree on this
+RUBYVERSION=$(get_version_component_range 1-3)
DESCRIPTION="An object-oriented scripting language"
HOMEPAGE="http://www.ruby-lang.org/"
LICENSE="|| ( Ruby GPL-2 )"
KEYWORDS="~amd64 ~hppa ~x86 ~x86-fbsd"
-IUSE="berkdb debug doc emacs examples gdbm ipv6 rubytests socks5 ssl tk xemacs"
+IUSE="berkdb debug doc examples gdbm ipv6 rubytests socks5 ssl tk xemacs ncurses +readline libedit"
RDEPEND="
berkdb? ( sys-libs/db )
ssl? ( dev-libs/openssl )
socks5? ( >=net-proxy/dante-1.1.13 )
tk? ( dev-lang/tk[threads] )
+ ncurses? ( sys-libs/ncurses )
+ libedit? ( dev-libs/libedit )
+ !libedit? ( readline? ( sys-libs/readline ) )
+ sys-libs/zlib
>=app-admin/eselect-ruby-20100402
!=dev-lang/ruby-cvs-${SLOT}*
!<dev-ruby/rdoc-2
!dev-ruby/rexml"
DEPEND="${RDEPEND}"
-PDEPEND="
- emacs? ( app-emacs/ruby-mode )
- xemacs? ( app-xemacs/ruby-modes )"
+PDEPEND="xemacs? ( app-xemacs/ruby-modes )"
PROVIDE="virtual/ruby"
-S="${WORKDIR}/${MY_P}"
-
src_prepare() {
- cd "${S}"
-
EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
epatch "${WORKDIR}/patches-${PVR}"
# ipv6 hack, bug 168939. Needs --enable-ipv6.
use ipv6 || myconf="--with-lookup-order-hack=INET"
+ if use libedit; then
+ einfo "Using libedit to provide readline extension"
+ myconf="${myconf} --enable-libedit --with-readline"
+ elif use readline; then
+ einfo "Using readline to provide readline extension"
+ myconf="${myconf} --with-readline"
+ else
+ myconf="${myconf} --without-readline"
+ fi
+
econf --program-suffix=${MY_SUFFIX} --enable-shared --enable-pthread \
$(use_enable socks5 socks) \
$(use_enable doc install-doc) \
$(use_with gdbm) \
$(use_with ssl openssl) \
$(use_with tk) \
+ $(use_with ncurses curses) \
${myconf} \
--enable-option-checking=no \
|| die "econf failed"
}
src_test() {
- emake test || die "make test failed"
+ emake -j1 test || die "make test failed"
elog "Ruby's make test has been run. Ruby also ships with a make check"
elog "that cannot be run until after ruby has been installed."
elog
if use rubytests; then
elog "You have enabled rubytests, so they will be installed to"
- elog "/usr/share/${PN}-${RUBYVERSION}/test. To run them you must be a user other"
+ elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
elog "than root, and you must place them into a writeable directory."
elog "Then call: "
elog
- elog "ruby19 -C /location/of/tests runner.rb"
+ elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
else
elog "Enable the rubytests USE flag to install the make check tests"
fi
fi
if use examples; then
- dodir /usr/share/doc/${PF}
- cp -pPR sample "${D}/usr/share/doc/${PF}"
+ insinto /usr/share/doc/${PF}
+ doins -r sample
fi
dosym "libruby${MY_SUFFIX}$(get_libname ${PV%_*})" \
dosym "libruby${MY_SUFFIX}$(get_libname ${PV%_*})" \
"/usr/$(get_libdir)/libruby$(get_libname ${PV%_*})"
- dodoc ChangeLog NEWS doc/NEWS-1.8.7 README* ToDo
+ dodoc ChangeLog NEWS doc/NEWS-1.8.7 README* ToDo || die
if use rubytests; then
- dodir /usr/share/${PN}-${RUBYVERSION}
- cp -pPR test "${D}/usr/share/${PN}-${RUBYVERSION}"
+ pushd test
+ insinto /usr/share/${PN}-${SLOT}
+ doins -r .
+ popd
fi
}