summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2010-05-18 23:10:00 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2010-05-18 23:10:00 +0000
commit129993cea38b2be30b61c2aefefad9fd9bef3f6c (patch)
tree50d04ac617974e17d3e2d74f4e60f7250a65ba8b /dev-lang
parentUpdate ebuilds to be consistent with ruby-enterprise; patches are moved to de... (diff)
downloadgentoo-2-129993cea38b2be30b61c2aefefad9fd9bef3f6c.tar.gz
gentoo-2-129993cea38b2be30b61c2aefefad9fd9bef3f6c.tar.bz2
gentoo-2-129993cea38b2be30b61c2aefefad9fd9bef3f6c.zip
Make ebuild consistent with Ruby (MRI) 1.8 and 1.9; add patch to build with BerkDB 5.0 (bug #319583) and add --no-undefined as well.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/ruby-enterprise/ChangeLog10
-rw-r--r--dev-lang/ruby-enterprise/metadata.xml35
-rw-r--r--dev-lang/ruby-enterprise/ruby-enterprise-1.8.7.2010.01-r2.ebuild (renamed from dev-lang/ruby-enterprise/ruby-enterprise-1.8.7.2010.01.ebuild)108
3 files changed, 89 insertions, 64 deletions
diff --git a/dev-lang/ruby-enterprise/ChangeLog b/dev-lang/ruby-enterprise/ChangeLog
index cb2e160e0072..7a42e2e96ca7 100644
--- a/dev-lang/ruby-enterprise/ChangeLog
+++ b/dev-lang/ruby-enterprise/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-lang/ruby-enterprise
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby-enterprise/ChangeLog,v 1.2 2010/05/13 16:31:19 a3li Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby-enterprise/ChangeLog,v 1.3 2010/05/18 23:10:00 flameeyes Exp $
+
+*ruby-enterprise-1.8.7.2010.01-r2 (18 May 2010)
+
+ 18 May 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+ -ruby-enterprise-1.8.7.2010.01.ebuild,
+ +ruby-enterprise-1.8.7.2010.01-r2.ebuild, metadata.xml:
+ Make ebuild consistent with Ruby (MRI) 1.8 and 1.9; add patch to build
+ with BerkDB 5.0 (bug #319583) and add --no-undefined as well.
*ruby-enterprise-1.8.7.2010.01-r1 (13 May 2010)
diff --git a/dev-lang/ruby-enterprise/metadata.xml b/dev-lang/ruby-enterprise/metadata.xml
index f59d4743a649..0b08f2909351 100644
--- a/dev-lang/ruby-enterprise/metadata.xml
+++ b/dev-lang/ruby-enterprise/metadata.xml
@@ -1,9 +1,34 @@
<?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>
- <flag name="tcmalloc">Add support for TCMalloc provided by dev-util/google-perftools</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>
+
+ <flag name="tcmalloc">
+ Add support for TCMalloc provided by <pkg>dev-util/google-perftools</pkg>
+ </flag>
+ </use>
</pkgmetadata>
diff --git a/dev-lang/ruby-enterprise/ruby-enterprise-1.8.7.2010.01.ebuild b/dev-lang/ruby-enterprise/ruby-enterprise-1.8.7.2010.01-r2.ebuild
index 239299338a82..ef6681a15534 100644
--- a/dev-lang/ruby-enterprise/ruby-enterprise-1.8.7.2010.01.ebuild
+++ b/dev-lang/ruby-enterprise/ruby-enterprise-1.8.7.2010.01-r2.ebuild
@@ -1,63 +1,48 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby-enterprise/ruby-enterprise-1.8.7.2010.01.ebuild,v 1.1 2010/04/03 06:39:01 a3li Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby-enterprise/ruby-enterprise-1.8.7.2010.01-r2.ebuild,v 1.1 2010/05/18 23:10:00 flameeyes Exp $
+
+EAPI=2
-EAPI="2"
inherit autotools eutils flag-o-matic multilib versionator
-MY_PV=$(replace_version_separator 3 '-')
-S="${WORKDIR}/${PN}-${MY_PV}/source"
+MY_P="${PN}-$(replace_version_separator 3 '-')"
+S="${WORKDIR}/${MY_P}/source"
SLOT=$(get_version_component_range 1-2)
-MY_VSUFFIX="ee$(delete_version_separator 1 ${SLOT})"
-MY_SUFFIX="ee"
+MY_SUFFIX="ee$(delete_version_separator 1 ${SLOT})"
+# 1.8 and 1.9 series disagree on this
+RUBYVERSION=$(get_version_component_range 1-2)
DESCRIPTION="Ruby Enterprise Edition is a branch of Ruby including various enhancements"
HOMEPAGE="http://www.rubyenterpriseedition.com/"
-SRC_URI="mirror://rubyforge/emm-ruby/${PN}-${MY_PV}.tar.gz
- http://dev.a3li.li/gentoo/distfiles/ruby-patches-ee-${PV}.tar.bz2"
+SRC_URI="mirror://rubyforge/emm-ruby/${MY_P}.tar.gz
+ http://www.flameeyes.eu/gentoo-distfiles/${PN}-patches-${PVR}.tar.bz2"
LICENSE="|| ( Ruby GPL-2 )"
KEYWORDS="~amd64 ~x86"
-IUSE="+berkdb debug doc emacs examples +gdbm ipv6 rubytests socks5 ssl tcmalloc
-threads tk xemacs"
+IUSE="tcmalloc +berkdb debug doc examples +gdbm ipv6 rubytests ssl threads tk xemacs ncurses +readline libedit"
RDEPEND="
berkdb? ( sys-libs/db )
gdbm? ( sys-libs/gdbm )
- ssl? ( dev-libs/openssl )
- socks5? ( >=net-proxy/dante-1.1.13 )
- tk? ( dev-lang/tk )
+ ssl? ( >=dev-libs/openssl-0.9.8m )
+ 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
tcmalloc? ( dev-util/google-perftools )"
-DEPEND="${REPEND}"
+DEPEND="${RDEPEND}"
# TODO rubygems
-PDEPEND="emacs? ( app-emacs/ruby-mode )
- xemacs? ( app-xemacs/ruby-modes )"
+PDEPEND="xemacs? ( app-xemacs/ruby-modes )"
PROVIDE="virtual/ruby"
-pkg_setup() {
- use tk || return
-
- # Note for EAPI-2 lovers: We'd like to show that custom message.
- # *If* you can make USE dependencies show that, too, feel free to migrate.
- if (use threads && ! built_with_use dev-lang/tk threads) \
- || (! use threads && built_with_use dev-lang/tk threads) ; then
- eerror
- eerror "You have Tk support enabled."
- eerror
- eerror "Ruby and Tk need the same 'threads' USE flag settings."
- eerror "Either change the USE flag on dev-lang/ruby or on dev-lang/tk"
- eerror "and recompile tk."
-
- die "threads USE flag mismatch"
- fi
-}
-
src_prepare() {
EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
- epatch "${WORKDIR}/patches-ee-${PV}"
+ epatch "${WORKDIR}/patches"
if use tcmalloc ; then
sed -i 's:^EXTLIBS.*:EXTLIBS = -ltcmalloc_minimal:' Makefile.in
@@ -65,7 +50,7 @@ src_prepare() {
# 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"
+ configure.in || die "sed failed"
eautoreconf
}
@@ -79,24 +64,26 @@ src_configure() {
# 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"
+ use ipv6 || myconf="${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_VSUFFIX}" \
+ --program-suffix="${MY_SUFFIX}" \
--enable-shared \
$(use_enable doc install-doc) \
$(use_enable threads pthread) \
@@ -106,9 +93,10 @@ src_configure() {
$(use_with gdbm) \
$(use_with ssl openssl) \
$(use_with tk) \
+ $(use_with ncurses curses) \
${myconf} \
- --with-sitedir=/usr/$(get_libdir)/ruby${MY_SUFFIX}/site_ruby \
- --with-vendordir=/usr/$(get_libdir)/ruby${MY_SUFFIX}/vendor_ruby \
+ --with-sitedir=/usr/$(get_libdir)/rubyee/site_ruby \
+ --with-vendordir=/usr/$(get_libdir)/rubyee/vendor_ruby \
--enable-option-checking=no \
|| die "econf failed"
}
@@ -129,7 +117,7 @@ src_test() {
elog "than root, and you must place them into a writeable directory."
elog "Then call: "
elog
- elog "ruby${MY_VSUFFIX} -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
@@ -139,8 +127,11 @@ src_install() {
# Ruby is involved in the install process, we don't want interference here.
unset RUBYOPT
- LD_LIBRARY_PATH="${D}/usr/$(get_libdir)"
- RUBYLIB="${S}:${D}/usr/$(get_libdir)/rubyee/${SLOT}"
+ # 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)/rubyee/${RUBYVERSION}"
for d in $(find "${S}/ext" -type d) ; do
RUBYLIB="${RUBYLIB}:$d"
done
@@ -148,7 +139,6 @@ src_install() {
emake DESTDIR="${D}" install || die "make install failed"
- MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)' | make -f - getminiruby)
keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitelibdir']")
keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitearchdir']")
@@ -157,21 +147,23 @@ src_install() {
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
- dodoc ChangeLog NEWS README* ToDo
+ dodoc ChangeLog NEWS README* ToDo || die
if use rubytests; then
- dodir /usr/share/${PN}-${SLOT}
- cp -pPR test "${D}/usr/share/${PN}-${SLOT}"
+ 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_VSUFFIX}
+ eselect ruby set ruby${MY_SUFFIX}
fi
ewarn