dev-java/jruby: Remove masked pkg

This commit is contained in:
Michał Górny
2017-05-15 15:28:09 +02:00
parent 1da72a2a5d
commit 4d2320d221
5 changed files with 0 additions and 366 deletions
-2
View File
@@ -1,2 +0,0 @@
DIST jruby-1.7.12-mvn-ant-ant.patch 210806 SHA256 3a46445615a3b4c6dcfea5e8b1cbf00177e81516c7fd70c619812be8ae0edf98 SHA512 18ab5e9a0ca04deccfe2ffaeba54c2c79c6f17fc5277bf32b800279f5a2a1c6e62ec273276b5b951d13d78b0de7b535b651a0d564b788cd972186895a3ab96ae WHIRLPOOL 23cdec09c9cae819d184676c57cc6fe2bc01b1c1a3dd574ae264e22796624beec31b2d5f8bec195594292b7dc742427c6e8f2f2bd48fad552a3fdb2cab0a2f07
DIST jruby-src-1.7.12.tar.gz 10537791 SHA256 c10c0581abe7d55519273b91bddf9d44610baf69b875473593fd739b0c059cc7 SHA512 f68e72c37543a5301041a1700b9a3ef07ea5be43b806187f49e7ef6172315c5cd2aa4d74466273122e35b1a190f9a0fb097127c9530f48740f278ff6f87704fe WHIRLPOOL 5b82c5ac00761a62c6d319dc9ff319a5036c7b30724449149595fbaac117a2dca61bc13480db79ef85f10278607556f7091698021c3a7cfd3b1359603755e01a
@@ -1,164 +0,0 @@
diff -Naur a/bin/jruby.bash b/bin/jruby.bash
--- a/bin/jruby.bash 2014-05-03 17:55:20.665665383 +0200
+++ b/bin/jruby.bash 2014-05-03 17:58:37.095630622 +0200
@@ -25,29 +25,7 @@
JAVA_VM=-client
fi
-# get the absolute path of the executable
-SELF_PATH=$(builtin cd -P -- "$(dirname -- "$0")" >/dev/null && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0")
-
-# resolve symlinks
-while [ -h $SELF_PATH ]; do
- # 1) cd to directory of the symlink
- # 2) cd to the directory of where the symlink points
- # 3) get the pwd
- # 4) append the basename
- DIR=$(dirname -- "$SELF_PATH")
- SYM=$(readlink $SELF_PATH)
- SELF_PATH=$(cd $DIR && cd $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM")
-done
-
-PRG=$SELF_PATH
-
-JRUBY_HOME_1=`dirname "$PRG"` # the ./bin dir
-if [ "$JRUBY_HOME_1" = '.' ] ; then
- cwd=`pwd`
- JRUBY_HOME=`dirname $cwd` # JRUBY-2699
-else
- JRUBY_HOME=`dirname "$JRUBY_HOME_1"` # the . dir
-fi
+JRUBY_HOME="${JRUBY_HOME:-/usr/share/jruby}"
if [ -z "$JRUBY_OPTS" ] ; then
JRUBY_OPTS=""
@@ -79,17 +57,7 @@
done
JRUBY_OPTS=${JRUBY_OPTS_TEMP}
-if [ -z "$JAVACMD" ] ; then
- if [ -z "$JAVA_HOME" ] ; then
- JAVACMD='java'
- else
- if $cygwin; then
- JAVACMD="`cygpath -u "$JAVA_HOME"`/bin/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- fi
-fi
+JAVACMD=java
if [ -z "$JAVA_MEM" ] ; then
JAVA_MEM=-Xmx500m
@@ -130,21 +98,7 @@
CP_DELIMITER=":"
-# add main jruby jar to the bootclasspath
-for j in "$JRUBY_HOME"/lib/jruby.jar "$JRUBY_HOME"/lib/jruby-complete.jar; do
- if [ ! -e "$j" ]; then
- continue
- fi
- if [ "$JRUBY_CP" ]; then
- JRUBY_CP="$JRUBY_CP$CP_DELIMITER$j"
- else
- JRUBY_CP="$j"
- fi
- if [ $JRUBY_ALREADY_ADDED ]; then
- echo "WARNING: more than one JRuby JAR found in lib directory"
- fi
- JRUBY_ALREADY_ADDED=true
-done
+JRUBY_CP="$(java-config-2 -d -p jruby)"
if $cygwin; then
JRUBY_CP=`cygpath -p -w "$JRUBY_CP"`
@@ -152,29 +106,7 @@
# ----- Set Up The System Classpath -------------------------------------------
-if [ "$JRUBY_PARENT_CLASSPATH" != "" ]; then
- # Use same classpath propagated from parent jruby
- CP=$JRUBY_PARENT_CLASSPATH
-else
- # add other jars in lib to CP for command-line execution
- for j in "$JRUBY_HOME"/lib/*.jar; do
- if [ "$j" == "$JRUBY_HOME"/lib/jruby.jar ]; then
- continue
- fi
- if [ "$j" == "$JRUBY_HOME"/lib/jruby-complete.jar ]; then
- continue
- fi
- if [ "$CP" ]; then
- CP="$CP$CP_DELIMITER$j"
- else
- CP="$j"
- fi
- done
-
- if [ "$CP" != "" ] && $cygwin; then
- CP=`cygpath -p -w "$CP"`
- fi
-fi
+CP="${JRUBY_PARENT_CLASSPATH}"
if $cygwin; then
# switch delimiter only after building Unix style classpaths
@@ -254,15 +186,7 @@
java_args=("${java_args[@]}" "-Djava.awt.headless=true") ;;
# Run under JDB
--jdb)
- if [ -z "$JAVA_HOME" ] ; then
- JAVACMD='jdb'
- else
- if $cygwin; then
- JAVACMD="`cygpath -u "$JAVA_HOME"`/bin/jdb"
- else
- JAVACMD="$JAVA_HOME/bin/jdb"
- fi
- fi
+ JAVACMD='jdb'
java_args=("${java_args[@]}" "-sourcepath" "$JRUBY_HOME/lib/ruby/1.8:.")
JRUBY_OPTS=("${JRUBY_OPTS[@]}" "-X+C") ;;
--client)
@@ -310,8 +234,6 @@
JAVA_OPTS="$JAVA_OPTS $JAVA_MEM $JAVA_MEM_MIN $JAVA_STACK"
-JFFI_OPTS="-Djffi.boot.library.path=$JRUBY_HOME/lib/jni"
-
if $cygwin; then
JRUBY_HOME=`cygpath --mixed "$JRUBY_HOME"`
JRUBY_SHELL=`cygpath --mixed "$JRUBY_SHELL"`
@@ -349,8 +271,9 @@
JRUBY_OPTS=''
fi
- "$JAVACMD" $PROFILE_ARGS $JAVA_OPTS "$JFFI_OPTS" "${java_args[@]}" -classpath "$JRUBY_CP$CP_DELIMITER$CP$CP_DELIMITER$CLASSPATH" \
+ "$JAVACMD" $PROFILE_ARGS $JAVA_OPTS "${java_args[@]}" -classpath "$JRUBY_CP$CP_DELIMITER$CP$CP_DELIMITER$CLASSPATH" \
"-Djruby.home=$JRUBY_HOME" \
+ "-Djruby.bindir=/usr/bin" \
"-Djruby.lib=$JRUBY_HOME/lib" -Djruby.script=jruby \
"-Djruby.shell=$JRUBY_SHELL" \
$java_class $JRUBY_OPTS "$@"
@@ -372,7 +295,7 @@
else
if $cygwin; then
# exec doed not work correctly with cygwin bash
- "$JAVACMD" $JAVA_OPTS "$JFFI_OPTS" "${java_args[@]}" -Xbootclasspath/a:"$JRUBY_CP" -classpath "$CP$CP_DELIMITER$CLASSPATH" \
+ "$JAVACMD" $JAVA_OPTS "${java_args[@]}" -Xbootclasspath/a:"$JRUBY_CP" -classpath "$CP$CP_DELIMITER$CLASSPATH" \
"-Djruby.home=$JRUBY_HOME" \
"-Djruby.lib=$JRUBY_HOME/lib" -Djruby.script=jruby \
"-Djruby.shell=$JRUBY_SHELL" \
@@ -385,8 +308,9 @@
exit $JRUBY_STATUS
else
- exec "$JAVACMD" $JAVA_OPTS "$JFFI_OPTS" "${java_args[@]}" -Xbootclasspath/a:"$JRUBY_CP" -classpath "$CP$CP_DELIMITER$CLASSPATH" \
+ exec "$JAVACMD" $JAVA_OPTS "${java_args[@]}" -Xbootclasspath/a:"$JRUBY_CP" -classpath "$CP$CP_DELIMITER$CLASSPATH" \
"-Djruby.home=$JRUBY_HOME" \
+ "-Djruby.bindir=/usr/bin" \
"-Djruby.lib=$JRUBY_HOME/lib" -Djruby.script=jruby \
"-Djruby.shell=$JRUBY_SHELL" \
$java_class $mode "$@"
-184
View File
@@ -1,184 +0,0 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
JAVA_PKG_IUSE="doc source test"
inherit eutils java-pkg-2 java-ant-2
DESCRIPTION="Java-based Ruby interpreter implementation"
HOMEPAGE="http://jruby.codehaus.org/"
SRC_URI="http://jruby.org.s3.amazonaws.com/downloads/${PV}/${PN}-src-${PV}.tar.gz
https://dev.gentoo.org/~tomwij/files/dist/${P}-mvn-ant-ant.patch"
LICENSE="|| ( EPL-1.0 GPL-2 LGPL-2.1 )"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
RUBY_VERSION=1.9
RUBY_REVISION=0
CDEPEND="
dev-java/ant-core:0
dev-java/asm:4
dev-java/bsf:2.3
>=dev-java/bytelist-1.0.8:0
dev-java/headius-options:0
dev-java/invokebinder:0
dev-java/jcodings:1
dev-java/jffi:1.2
dev-java/jnr-constants:0
dev-java/jnr-enxio:0
dev-java/jnr-ffi:0.7
>=dev-java/jnr-netdb-1.0:0
dev-java/jnr-posix:2.4
dev-java/jnr-unixsocket:0
dev-java/joda-time:0
dev-java/joni:2.1
dev-java/nailgun:0
dev-java/osgi-core-api:0
dev-lang/ruby:${RUBY_VERSION}
>=dev-java/snakeyaml-1.9:0
dev-java/jzlib:1.1
"
RDEPEND="${CDEPEND}
>=virtual/jre-1.8
"
DEPEND="${CDEPEND}
>=virtual/jdk-1.8
test? (
dev-java/ant-junit4:0
dev-java/ant-trax:0
dev-java/commons-logging:0
dev-java/junit:4
dev-java/xalan:0
java-virtuals/jdk-with-com-sun:0
)
"
RUBY_HOME=/usr/share/${PN}/lib/ruby
SITE_RUBY=${RUBY_HOME}/site_ruby
GEMS=${RUBY_HOME}/gems
JAVA_ANT_REWRITE_CLASSPATH="true"
JAVA_ANT_IGNORE_SYSTEM_CLASSES="true"
EANT_GENTOO_CLASSPATH="ant-core asm-4 bsf-2.3 bytelist headius-options \
invokebinder jcodings-1 jffi-1.2 jnr-constants jnr-enxio jnr-ffi-0.7 jnr-netdb \
jnr-posix-2.4 jnr-unixsocket joda-time joni-2.1 nailgun osgi-core-api snakeyaml \
jzlib-1.1"
EANT_TEST_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH} ant-junit4 ant-trax \
commons-logging junit-4 xalan jdk-with-com-sun"
EANT_BUILD_TARGET="package"
pkg_setup() {
export RUBYOPT=""
java-pkg-2_pkg_setup
local fail
for directory in "${GEMS}" "${SITE_RUBY}"; do
if [[ -L ${directory} ]]; then
eerror "${directory} is a symlink. Please do the following to resolve the situation:"
echo 'emerge -an app-portage/gentoolkit'
echo 'equery -qC b '"${directory}"' | sort | uniq | sed s/^/=/ > /tmp/jruby.fix'
echo 'emerge -1C $(< /tmp/jruby.fix)'
echo "rm ${directory}"
echo 'emerge -1 $(< /tmp/jruby.fix)'
eerror "For more information, please see https://bugs.gentoo.org/show_bug.cgi?id=302187"
fail="true"
fi
done
if [[ -n ${fail} ]]; then
die "Please address the above errors, then run emerge --resume"
fi
}
java_prepare() {
einfo "Cleaning up bash launcher ..."
epatch "${FILESDIR}"/${P}-bash-launcher.patch
# When you capture a new patch, and it misses org.jruby.runtime.Constants;
# add maven.build.resourceDir.1 as a pathelement to the javac task of the
# compilation target. Also add jruby-core-GENTOO_JRUY_VER in ext classpaths.
# Also reorder the root maven-build.xml such that core compiles before ext.
einfo "Patching build.xml ..."
epatch "${DISTDIR}"/${P}-mvn-ant-ant.patch
find . -name '*build.xml' -exec \
sed -i "s/jruby-core-GENTOO_JRUY_VER/jruby-core-${PV}/" {} \;
einfo "Removing classes and jars ..."
find . -name "*.class" -or -name "*.jar" -print -delete
einfo "Fixing up properties ..."
JRUBY_CONSTANTS="core/src/main/resources/org/jruby/runtime/Constants.java"
for repvar in $(grep "@.*@\".*;" ${JRUBY_CONSTANTS} | sed 's:.*@\(.*\)@.*:\1:') ; do
VAR=$(grep "<${repvar}>" pom.xml | sed 's/.*>\(.*\)<\/.*/\1/')
sed -i "s/@${repvar}@/${VAR}/" \
${JRUBY_CONSTANTS} || die
done
sed -i "s/String VERSION = \".*\"/String VERSION = \"${PV}\"/" \
${JRUBY_CONSTANTS} || die
einfo "Setting Ruby version to use ..."
sed -i -e "s/String jruby_revision = \"\"/String jruby_revision = \"${RUBY_REVISION}\"/" \
-e "s/String jruby_default_ruby_version = \"\"/String jruby_default_ruby_version = \"${RUBY_VERSION}\"/" \
${JRUBY_CONSTANTS} || die
}
# Java based tests return propertly, I guess that is because there are none;
# I've found an executable that can you can run, but it bails out about libyaml.
#
# $ bin/testrb test
# /usr/share/jruby/lib/ruby/1.9/yaml/store.rb:1:in `require':
# It seems your ruby installation is missing psych (for YAML output).
# To eliminate this warning, please install libyaml and reinstall your ruby.
# JRuby 1.9 mode only supports the `psych` YAML engine; ignoring `syck`
# NoMethodError: undefined method `to_yaml' for {}:Hash
# Store at /usr/share/jruby/lib/ruby/1.9/yaml/store.rb:78
# ...
RESTRICT="${RESTRICT} test"
src_test() {
export RUBYOPT=""
mv maven-build.xml build.xml || die
java-pkg-2_src_test
bin/testrb test || die ""
}
src_install() {
java-pkg_newjar core/target/${PN}-core-${PV}.jar
dodoc README.md docs/{*.txt,README.*} || die
use doc && java-pkg_dojavadoc core/target/site/apidocs
use source && java-pkg_dosrc core/src/main/java/org
newbin bin/jruby.bash jruby
dobin bin/j{irb{,_swing},rubyc}
insinto "${RUBY_HOME}"
doins -r "${S}"/lib/ruby/{1.8,1.9,2.0,shared}
# Remove all the references to RubyGems as we're just going to
# install it through dev-ruby/rubygems.
find "${ED}${RUBY_HOME}" -type f \
'(' '(' -path '*rubygems*' -not -name 'jruby.rb' ')' -or -name 'ubygems.rb' -or -name 'datadir.rb' ')' \
-delete || die
}
pkg_postinst() {
ewarn ""
ewarn "Make sure RUBYOPT is unset in the environment when using JRuby:"
ewarn ""
ewarn " export RUBYOPT=\"\""
ewarn ""
}
-12
View File
@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>java@gentoo.org</email>
<name>Java</name>
</maintainer>
<maintainer type="project">
<email>ruby@gentoo.org</email>
<name>Gentoo Ruby Project</name>
</maintainer>
</pkgmetadata>