diff options
author | Tom Wijsman <tomwij@gentoo.org> | 2014-05-03 21:31:53 +0000 |
---|---|---|
committer | Tom Wijsman <tomwij@gentoo.org> | 2014-05-03 21:31:53 +0000 |
commit | e8cde50ef42f91d0f3b5caee371b2ddadcec8be7 (patch) | |
tree | eff3709359e8960911dc1da1f5ef07db459e8b9a /dev-java | |
parent | Do not generate and install certificates. Disable parallel make install (bug ... (diff) | |
download | historical-e8cde50ef42f91d0f3b5caee371b2ddadcec8be7.tar.gz historical-e8cde50ef42f91d0f3b5caee371b2ddadcec8be7.tar.bz2 historical-e8cde50ef42f91d0f3b5caee371b2ddadcec8be7.zip |
Version bump to 1.7.12, masked as it is pending review by the Java and Ruby herds; for bug #442230, reported by Gian and in cooperation with mrueg and others.
Package-Manager: portage-HEAD/cvs/Linux x86_64
Manifest-Sign-Key: 0x6D34E57D
Diffstat (limited to 'dev-java')
-rw-r--r-- | dev-java/jruby/ChangeLog | 11 | ||||
-rw-r--r-- | dev-java/jruby/Manifest | 18 | ||||
-rw-r--r-- | dev-java/jruby/files/jruby-1.7.12-bash-launcher.patch | 164 | ||||
-rw-r--r-- | dev-java/jruby/jruby-1.6.5.1.ebuild | 4 | ||||
-rw-r--r-- | dev-java/jruby/jruby-1.7.12.ebuild | 185 |
5 files changed, 374 insertions, 8 deletions
diff --git a/dev-java/jruby/ChangeLog b/dev-java/jruby/ChangeLog index 4dd1cbce3eaa..dca0aaa8ae45 100644 --- a/dev-java/jruby/ChangeLog +++ b/dev-java/jruby/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for dev-java/jruby # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v 1.95 2014/03/03 23:39:57 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v 1.96 2014/05/03 21:31:48 tomwij Exp $ + +*jruby-1.7.12 (03 May 2014) + + 03 May 2014; Tom Wijsman <TomWij@gentoo.org> + +files/jruby-1.7.12-bash-launcher.patch, +jruby-1.7.12.ebuild, + jruby-1.6.5.1.ebuild: + Version bump to 1.7.12, masked as it is pending review by the Java and Ruby + herds; for bug #442230, reported by Gian and in cooperation with mrueg and + others. 03 Mar 2014; Pacho Ramos <pacho@gentoo.org> jruby-1.6.8-r1.ebuild: amd64 stable, bug #495016 diff --git a/dev-java/jruby/Manifest b/dev-java/jruby/Manifest index 7d2cead393cc..780302910bed 100644 --- a/dev-java/jruby/Manifest +++ b/dev-java/jruby/Manifest @@ -12,18 +12,26 @@ AUX jruby-1.4.0-system-jars-r2.patch 8332 SHA256 92f67d30f0be4ff029d3045e9446b51 AUX jruby-1.5.0-system-jars.patch 8113 SHA256 8c386f1d0e08b75a9f986e317d822c393231316d46eca0030ed67fe40dfbe3b5 SHA512 2847200766063fc256bcca1d7b86488fb2f8ddef9ae54004b91d45427e08cec10748acb1684be399fff99fb8b7192fdda509f68e0635e3cc9d34a551abc4bdeb WHIRLPOOL ba7318be5684bd597c2ec94b617809f311440a724bf41cc17d7ee46ce12cc130c7fc29686118006a942d9eaf7957b8af396861d4fcbbb514b8429db30193046e AUX jruby-1.5.6-rubygems-1.8.x.patch 815 SHA256 cb003cceee89149074c422c53cfaf7b49341bff8f2faf7aa70173fc954ccddd2 SHA512 eca0008b7ad1f26dfb6558d163c11e6f4ca21923f70c787ba21de59a3a7f56f7e8c7cbe6fb6a572a01ec6df4d7b28ad3645101496081bc2920d40aa7af4ba5a1 WHIRLPOOL d6dc9b651fa4df8d71be92a1259e75eec60e4595945265399231e59443c183ed465b1de7004f264d867980ea421b08cf3ae5773c078be58d67c5bfb414976afd AUX jruby-1.6.8-bash-launcher.patch 5524 SHA256 cc58b2031adac2dbe849e39a1c910b40596c581b36405865a510777aceaab86f SHA512 aeb088f8ebef122515efe6a3e6e8f76ba87f145d7f67bb016d875b61f02a772fd3678cbf62d7e28a552ded7fe2c49e5f0f9746a4cb8edccb14c97491f053a4d1 WHIRLPOOL f44a6899e92b54fafab01cfdf69215038f42f8e8317bebbec5a65acd6f69b88740ab6b4a32d71ad9eb9ef4b442b0e17de3629192d36cbfa159968587685b27b9 +AUX jruby-1.7.12-bash-launcher.patch 5158 SHA256 de07a6e67ed80dccb6e14c9d429eaa1045bf38e45d822bbfd34714a52a1055a9 SHA512 b51db965233226c805eafb0d071fec6827d36660c9a0075ec0f4e36845f37269258d188d504ec9db0257e8671cea19cc493ae71a1ef658ad4ec7da6aefcb3184 WHIRLPOOL 26b8519e9a4a004574bc4a763b789a685e8aff2f220b20bb6eb0cf6af68a980d419c80b6ca695a85f2b13f70174e03c957dabd07ee5fc936a49b4cd0876c8d78 AUX jruby-bash-launcher.patch 5505 SHA256 e0997049a7bb829c06178cbbab4c5281ec9dac2e1ee8f018613cf9ddc35aea3e SHA512 d03a4eb7cba95da9da93696ef76dc452606f199c91da703da4d23bf048eb495db5ce6c2bd079d33a7428955379217b642af8924acab231fc087caf46ba0a6cd8 WHIRLPOOL e6b0f6ff6ec7c2f0cd6436262f7d6f931535d8aaf87327ea7e0e432600c046a9ced97d5774c6be46888856dd9fba8458eff9d5197b2cffde39ed2b38ce4b75f7 AUX user-test-fixes.patch 5147 SHA256 f21469d41de9f9b5fb1682596f64899a71c92332db24bf27e8c50dbb1896a92e SHA512 7e5a0342d42abe8af6b7e98edc9e2d1d52dfe1dc3852704931d67ff29bc1e499ba88be19dedee57173571311b7549ded43f39f9edca559e3706ef5e99d0e3cbd WHIRLPOOL cc00358195398194db2c7b678147fee36f54be5c3edff5dcc348ba357ed46131e858166819f2e2fae93385ec8398fa9efb32d2a07ae40164ab243dfac55cc1d1 +DIST jruby-1.7.12-mvn-ant-ant.patch 210806 SHA256 3a46445615a3b4c6dcfea5e8b1cbf00177e81516c7fd70c619812be8ae0edf98 SHA512 18ab5e9a0ca04deccfe2ffaeba54c2c79c6f17fc5277bf32b800279f5a2a1c6e62ec273276b5b951d13d78b0de7b535b651a0d564b788cd972186895a3ab96ae WHIRLPOOL 23cdec09c9cae819d184676c57cc6fe2bc01b1c1a3dd574ae264e22796624beec31b2d5f8bec195594292b7dc742427c6e8f2f2bd48fad552a3fdb2cab0a2f07 DIST jruby-src-1.6.5.1.tar.gz 14284770 SHA256 1126f29b888b5427c2d416042a6c010849ab1d29ee9be97e592caf6859921be5 SHA512 f777e8c09e1f3e2be42a2043cf189496f826158769c0fd82a4bc6912fdbc63905905a4a32534adc156efe0c3cbb4e198077c61262fad0463b42515b8e2f96821 WHIRLPOOL 440c2a36c9862819956afbefc2e1c6af060526bf80fd31c5551cb4ab3d74f366eb95af19fd2e40208527d8d66382ea9dd80f16c165d48f3924cd8de5a850a82b DIST jruby-src-1.6.8.tar.gz 14709528 SHA256 7832053682bf791de7a5b062b5c8a3521ad5d6468141238551a9959649df973a SHA512 924114149bd7ce81b15c71e80cf53f4b50eb8d5220098e5ead2b447b96a6a405d93a219fb19fb7a0b9e4dc6798fd99b547b2352aabe4f84b5a694fe6760fd24d WHIRLPOOL 1f21b0899ac6c37b1e3e94aa7ef0927a720092f3a8687ba476cc70d8cd58228dbfdf1e2ea3e29414c14c329f1b6f61178ae34dd40bdf8a4c39cae5251849ac6c -EBUILD jruby-1.6.5.1.ebuild 6169 SHA256 a18f03300b26e65673ede85d281f82101af8b433ae1a85f8661465a086d5ea8b SHA512 f95371cb4d47698f8bd7bd5c9fde2f81adf23b4a3a6f915b43b2de6716da58d06dfee0e7d333535594be73bbe966e27b11182545f047a80bb9bbb2fa41e0b964 WHIRLPOOL 82206f9712a2e7fb207b708e539cc0bf3d33be3871047b7c5178fa1fc514a270eab90c34737af853bb7aeef33aa57c3a48027c8d41a0dc40f8e3b25663ed95bc +DIST jruby-src-1.7.12.tar.gz 10537791 SHA256 c10c0581abe7d55519273b91bddf9d44610baf69b875473593fd739b0c059cc7 SHA512 f68e72c37543a5301041a1700b9a3ef07ea5be43b806187f49e7ef6172315c5cd2aa4d74466273122e35b1a190f9a0fb097127c9530f48740f278ff6f87704fe WHIRLPOOL 5b82c5ac00761a62c6d319dc9ff319a5036c7b30724449149595fbaac117a2dca61bc13480db79ef85f10278607556f7091698021c3a7cfd3b1359603755e01a +EBUILD jruby-1.6.5.1.ebuild 6166 SHA256 0226625830fd1bd91108abe111e253d694c596e55e53f18991ebfec20f4109d7 SHA512 0f9fecd1dcc4036f9667ecfa5b614eddbe7a9139eed878ca48794d39655c03e639000d2a2ab70fdc794aaa2cdeab4b54dacc4f500b1944b5316b3abe06d160aa WHIRLPOOL 8412d6e039e49baf356e2f4d2890901fb322c397bbd29a27ea8dadd9cc4baf1d3448cd293559957ef1c01b3dbe9f1eddf630c106644b8da78682b848b16997a5 EBUILD jruby-1.6.8-r1.ebuild 6241 SHA256 629c8b241ee5dd32c42cf0a86d93fa3d1e77f9b00b0cd18d4a3262db2cf2703b SHA512 e58d4de4b9dabb5fdb5705d34d04fb97469a3aa0880df2446fec5f7f617f400e1a119153bc2fdee60f6d44a79f837b6bf3c2fb76ba92fbf3aa9961686f921732 WHIRLPOOL dd0f72f218ffa32c451b723f398bd4b359c5a994ee68a3f95cedcf0b5fc282b11c77e1eb3962ea514719802b7e41404aefaf89855a68617ba772eb29acec5b73 -MISC ChangeLog 17073 SHA256 d406e3df86391e728a2a5ea1f157562e90dd7d0e6d7278f9aa6264bf9f8e2e9e SHA512 4c7b57e5cc2649af04dcef2b1f38e699d68d5987c3f7b5a60b17e34494877955c4538dba6e7c1529b581b8ceb1105cd54cc7d9a840d976bf59f8ba526a0568b3 WHIRLPOOL f81a98c451927b50f6fecb8f81acf68efb336b631851e1294dc657f0429b776004f8dfebce3b7a6eccab3c30192a30c2485dcb50dad512e789047ebedf59fdb0 +EBUILD jruby-1.7.12.ebuild 5601 SHA256 7ea327ded51905130305d24a6101283f8691769cb05fb1be3b5be84fbee26e2f SHA512 ad5012ba09b5ae1ef54e665864a17c8ba04c413d872fb7133a37e4e96a8d64112153fb0853224efca87b76b626af888f9de2a30eb1195b37a1516edcc75f30ae WHIRLPOOL 283700b993952385d9b1f6547db53da66728dce12f19de9981491bf5f1d78e897a29b5fff386165267afb3e753342e6086e87fe6cd02ca4e3e255ad52f1af080 +MISC ChangeLog 17405 SHA256 913a0e427153364bc968bc42ae6afba069afb9a9306a265025bd5cf50b9d5980 SHA512 1364f612e6a1b8883f954423a5c9eb27e20e51f7e0601e464a0d96e692932a4a608bc7074c133e18404083015d050d1122908a9009a3622f2f4ff5da737c2239 WHIRLPOOL dd1ba338784500d46414d751b3fcc88170cbf6bbaecd8c375fae5f8f816b234a5520232045baecde4f4a3e61aac91ef6ca78e8c41a13a175505f1b764c8fcbd9 MISC metadata.xml 179 SHA256 0df27adc265ef6596f973641d25b64b7291c87f1b114d6895f69d222049bed1b SHA512 d6f0a7b7511f9d016fa3464817f8921b958ba50a25eb834c453a9ab937d0f12f7ca418fb70c3c847568da1e48aecb10f7e0fa2898bb956e9cd9b60886033725c WHIRLPOOL d6f2832d5f7db39b2ca75bacd4c3b1b9d854c3404d1ad405f9befe8e34c86a155cb6dda3eb1b93b30d8d35b83accf4567079f4d13c1a1a06e19078afe2e81ea5 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) -iEYEAREIAAYFAlMVEs4ACgkQCaWpQKGI+9QwPgCeM2H3BGmKONk8r5ka8Mcm9QxY -Dk4An2CpbH4mzWGS3JJ+sNB/U3fQfUFG -=hfml +iQEcBAEBCAAGBQJTZV/1AAoJEJWyH81tNOV9CKoH/AjjsF2oJtqFLmp2cUuJPmN8 +Lp/kWJlBG/agWp+y9x6noIsHgw6cAgfi7v2or2izNu9IyRPZaOIWN+V/p6lEHi8z +D7LzrPdCUNfF5V0gqcHKT30nA0qne9BifxFxGnz5WLSYa2a2Zb9cxg/pmW01TOxd +xYggRyooTPKixwRNxFcmvcwJ/xHpMSgEh6ZGu0D/LMQxvvDZ69jBn9mU7iM8IMHO +TxdsQp+/6Rp267Zlh2Hz7R27YJYRAcDUQUhcv3MLOd8/qUKF7SSn6IeneCFrW3Cj ++2AN07cYvcHIVOgpXqhprB6LoNOS5NsQt3IwC81HCewWXtZ9wZF9jlndZcs0ir0= +=Ui+Q -----END PGP SIGNATURE----- diff --git a/dev-java/jruby/files/jruby-1.7.12-bash-launcher.patch b/dev-java/jruby/files/jruby-1.7.12-bash-launcher.patch new file mode 100644 index 000000000000..2fe9eb457de0 --- /dev/null +++ b/dev-java/jruby/files/jruby-1.7.12-bash-launcher.patch @@ -0,0 +1,164 @@ +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 "$@" diff --git a/dev-java/jruby/jruby-1.6.5.1.ebuild b/dev-java/jruby/jruby-1.6.5.1.ebuild index effe497f8f4d..54a2cc0ec6f0 100644 --- a/dev-java/jruby/jruby-1.6.5.1.ebuild +++ b/dev-java/jruby/jruby-1.6.5.1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.6.5.1.ebuild,v 1.4 2012/06/25 07:43:03 nativemad Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.6.5.1.ebuild,v 1.5 2014/05/03 21:31:48 tomwij Exp $ EAPI="4" JAVA_PKG_IUSE="doc source test" diff --git a/dev-java/jruby/jruby-1.7.12.ebuild b/dev-java/jruby/jruby-1.7.12.ebuild new file mode 100644 index 000000000000..0df28319a703 --- /dev/null +++ b/dev-java/jruby/jruby-1.7.12.ebuild @@ -0,0 +1,185 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.7.12.ebuild,v 1.1 2014/05/03 21:31:48 tomwij Exp $ + +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 + http://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 http://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 "" +} |