summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Brown <rbrown@gentoo.org>2007-09-24 11:36:26 +0000
committerRichard Brown <rbrown@gentoo.org>2007-09-24 11:36:26 +0000
commit0ed9c6754699253e1b2037e79dc28a55bd5aa002 (patch)
tree6e86f5ec60651bf94b7fe481bef8f2670028429e
parentAdd ruby-1.8.6-p110 (diff)
downloadrbrown-0ed9c6754699253e1b2037e79dc28a55bd5aa002.tar.gz
rbrown-0ed9c6754699253e1b2037e79dc28a55bd5aa002.tar.bz2
rbrown-0ed9c6754699253e1b2037e79dc28a55bd5aa002.zip
Changes from -dev thread
svn path=/; revision=49
-rw-r--r--dev-lang/ruby/ruby-1.8.6_p110.ebuild37
1 files changed, 19 insertions, 18 deletions
diff --git a/dev-lang/ruby/ruby-1.8.6_p110.ebuild b/dev-lang/ruby/ruby-1.8.6_p110.ebuild
index ee8b2e9..235d606 100644
--- a/dev-lang/ruby/ruby-1.8.6_p110.ebuild
+++ b/dev-lang/ruby/ruby-1.8.6_p110.ebuild
@@ -9,16 +9,18 @@ ONIGURUMA="onigd2_5_9"
inherit flag-o-matic alternatives eutils multilib autotools versionator
-MY_P="${P/_p/-p}"
+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})
+
DESCRIPTION="An object-oriented scripting language"
HOMEPAGE="http://www.ruby-lang.org/"
-SRC_URI="ftp://ftp.ruby-lang.org/pub/ruby/1.8/${MY_P}.tar.gz
+SRC_URI="ftp://ftp.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.gz
cjk? ( http://www.geocities.jp/kosako3/oniguruma/archive/${ONIGURUMA}.tar.gz )"
LICENSE="Ruby"
-SLOT="1.8"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
IUSE="cjk debug doc elibc_glibc examples ipv6 rubytests socks5 threads tk"
@@ -28,7 +30,7 @@ RDEPEND=">=sys-libs/gdbm-1.8.0
socks5? ( >=net-proxy/dante-1.1.13 )
tk? ( dev-lang/tk )
>=dev-ruby/ruby-config-0.3.1
- !=dev-lang/ruby-cvs-1.8*
+ !=dev-lang/ruby-cvs-${SLOT}*
!dev-ruby/rdoc
!dev-ruby/rexml"
DEPEND="${RDEPEND}"
@@ -40,9 +42,8 @@ src_unpack() {
if use cjk ; then
einfo "Applying ${ONIGURUMA}"
pushd ${WORKDIR}/oniguruma
- econf --with-rubydir=${S} || die "econf failed"
- MY_PV=$(get_version_component_range 1-2)
- make ${MY_PV/./}
+ econf --with-rubydir="${S}" || die "econf failed"
+ make $MY_SUFFIX
popd
fi
@@ -89,7 +90,7 @@ src_compile() {
myconf=$(use_enable ipv6)
fi
- econf --program-suffix=${SLOT/./} --enable-shared \
+ econf --program-suffix=$MY_SUFFIX --enable-shared \
$(use_enable socks5 socks) \
$(use_enable doc install-doc) \
$(use_enable threads pthread) \
@@ -121,9 +122,9 @@ src_test() {
}
src_install() {
- LD_LIBRARY_PATH=${D}/usr/$(get_libdir)
+ LD_LIBRARY_PATH="${D}/usr/$(get_libdir)"
RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${SLOT}"
- for d in $(find ${S}/ext -type d) ; do
+ for d in $(find "${S}/ext" -type d) ; do
RUBYLIB="${RUBYLIB}:$d"
done
export LD_LIBRARY_PATH RUBYLIB
@@ -140,17 +141,17 @@ src_install() {
if use examples; then
dodir /usr/share/doc/${PF}
- cp -pPR sample ${D}/usr/share/doc/${PF}
+ cp -pPR sample "${D}/usr/share/doc/${PF}"
fi
- dosym libruby${SLOT/./}$(get_libname ${PV%_*}) /usr/$(get_libdir)/libruby$(get_libname ${PV%.*})
- dosym libruby${SLOT/./}$(get_libname ${PV%_*}) /usr/$(get_libdir)/libruby$(get_libname ${PV%_*})
+ 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
if use rubytests; then
dodir /usr/share/${PN}-${SLOT}
- cp -pPR test ${D}/usr/share/${PN}-${SLOT}
+ cp -pPR test "${D}/usr/share/${PN}-${SLOT}"
fi
}
@@ -165,8 +166,8 @@ pkg_postinst() {
ewarn "you should re-emerge ruby again."
ewarn "See bug #159922 for details"
ewarn
- if [ ! -n "$(readlink ${ROOT}usr/bin/ruby)" ] ; then
- ${ROOT}usr/sbin/ruby-config ruby${SLOT/./}
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
+ "${ROOT}usr/sbin/ruby-config" ruby$MY_SUFFIX
fi
elog
elog "You can change the default ruby interpreter by ${ROOT}usr/sbin/ruby-config"
@@ -174,7 +175,7 @@ pkg_postinst() {
}
pkg_postrm() {
- if [ ! -n "$(readlink ${ROOT}usr/bin/ruby)" ] ; then
- ${ROOT}usr/sbin/ruby-config ruby${SLOT/./}
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
+ "${ROOT}usr/sbin/ruby-config" ruby$MY_SUFFIX
fi
}