/[gentoo-x86]/dev-java/jruby/jruby-1.2.0-r1.ebuild
Gentoo

Diff of /dev-java/jruby/jruby-1.2.0-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.2
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/Attic/jruby-1.2.0-r1.ebuild,v 1.1 2009/05/23 08:03:46 caster Exp $ 3# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/Attic/jruby-1.2.0-r1.ebuild,v 1.2 2009/05/23 23:02:21 caster Exp $
4 4
5EAPI="2" 5EAPI="2"
6JAVA_PKG_IUSE="doc source test" 6JAVA_PKG_IUSE="doc source test"
7inherit eutils java-pkg-2 java-ant-2 7inherit eutils java-pkg-2 java-ant-2
8 8
58 58
59pkg_setup() { 59pkg_setup() {
60 java-pkg-2_pkg_setup 60 java-pkg-2_pkg_setup
61 use java6 || EANT_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH} backport-util-concurrent" 61 use java6 || EANT_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH} backport-util-concurrent"
62 62
63 local fail
64
63 if [[ -d "${GEMS}" && ! -L "${GEMS}" ]]; then 65 if [[ -d "${GEMS}" && ! -L "${GEMS}" ]]; then
64 ewarn "dev-java/jruby now uses dev-lang/ruby's gems directory by creating symlinks." 66 eerror "${GEMS} is a directory. Please remove this directory."
65 ewarn "${GEMS} is a directory right now, which will cause problems when being merged onto the filesystem." 67 fail="true"
68 fi
69
70 # the symlink creates a collision with rubygems, bug #270953
71 # cannot be currently solved by removing in pkg_preinst, bug #233278
72 if [[ -L "${SITE_RUBY}" ]]; then
73 eerror "${SITE_RUBY} is a symlink. Please remove this symlink."
74 fail="true"
75 fi
76
77 if [[ -n ${fail} ]]; then
78 eerror "Unmerging the old jruby version should also fix the problem(s)."
79 die "Please address the above errors, then run emerge --resume"
66 fi 80 fi
67} 81}
68 82
69java_prepare() { 83java_prepare() {
70 epatch "${FILESDIR}/ftype-test-fixes.patch" 84 epatch "${FILESDIR}/ftype-test-fixes.patch"
147 insinto "${SITE_RUBY}" 161 insinto "${SITE_RUBY}"
148 doins "${FILESDIR}/gentoo.rb" || die 162 doins "${FILESDIR}/gentoo.rb" || die
149 doenvd "${FILESDIR}/10jruby" || die 163 doenvd "${FILESDIR}/10jruby" || die
150} 164}
151 165
152pkg_preinst() {
153 if [[ -d "${GEMS}" && ! -L "${GEMS}" ]]; then
154 eerror "${GEMS} is a directory. Please move this directory out of the way, and then emerge --resume."
155 die "Please address the above errors, then emerge --resume."
156 fi
157
158 # Delete site_ruby if it is a symlink.
159 [[ -L "${SITE_RUBY}" ]] && rm -f "${SITE_RUBY}"
160}

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20