diff options
author | Johann Schmitz <ercpe@gentoo.org> | 2013-10-08 16:37:35 +0000 |
---|---|---|
committer | Johann Schmitz <ercpe@gentoo.org> | 2013-10-08 16:37:35 +0000 |
commit | f0ba69371bce63397ce2820de38450322d87ff4e (patch) | |
tree | 20a5f9dfd5d3b3794aefaa40bcfbb0f52d5f4dd0 /dev-java/j2ssh | |
parent | Version bump of jmdns. (diff) | |
download | gentoo-2-f0ba69371bce63397ce2820de38450322d87ff4e.tar.gz gentoo-2-f0ba69371bce63397ce2820de38450322d87ff4e.tar.bz2 gentoo-2-f0ba69371bce63397ce2820de38450322d87ff4e.zip |
Ebuild for j2ssh-0.2.9 - a java ssh library (dependency of mucommander)
(Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key 77C501ED)
Diffstat (limited to 'dev-java/j2ssh')
-rw-r--r-- | dev-java/j2ssh/ChangeLog | 9 | ||||
-rw-r--r-- | dev-java/j2ssh/Manifest | 6 | ||||
-rw-r--r-- | dev-java/j2ssh/files/0.2.9-extras.patch | 201 | ||||
-rw-r--r-- | dev-java/j2ssh/files/0.2.9-no-versioned-jars.patch | 40 | ||||
-rw-r--r-- | dev-java/j2ssh/j2ssh-0.2.9.ebuild | 45 | ||||
-rw-r--r-- | dev-java/j2ssh/metadata.xml | 9 |
6 files changed, 310 insertions, 0 deletions
diff --git a/dev-java/j2ssh/ChangeLog b/dev-java/j2ssh/ChangeLog new file mode 100644 index 000000000000..9412db0f2b84 --- /dev/null +++ b/dev-java/j2ssh/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for dev-java/j2ssh +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/j2ssh/ChangeLog,v 1.15 2013/10/08 16:37:35 ercpe Exp $ + +*j2ssh-0.2.9 (08 Oct 2013) + + 08 Oct 2013; Johann Schmitz <ercpe@gentoo.org> +files/0.2.9-extras.patch, + +files/0.2.9-no-versioned-jars.patch, +j2ssh-0.2.9.ebuild, +metadata.xml: + Ebuild for j2ssh-0.2.9 - a java ssh library (dependency of mucommander) diff --git a/dev-java/j2ssh/Manifest b/dev-java/j2ssh/Manifest new file mode 100644 index 000000000000..99a056ce6db5 --- /dev/null +++ b/dev-java/j2ssh/Manifest @@ -0,0 +1,6 @@ +AUX 0.2.9-extras.patch 7597 SHA256 7b518b46d28d9c147599298b3fd242830462f9303b0b6808a64ba2e2a2dd6eab SHA512 e60f449e7cd39c1cc551a012c97f5b1cca229d6a08c06abfea6c47a0e2577d36887ce5e710dae2a1db5d1436b1eb0a13c5bdcef84555c678d3b54124fe6ce17d WHIRLPOOL cc31661e59521df26552d11ba749b55a9cbc9f689c53119a5ca71b97651d64cdac72bb86486022ef231e03ec998f1e200a20be8fc9bf43d5fee1a53cdc5234df +AUX 0.2.9-no-versioned-jars.patch 2187 SHA256 c81bbb752d2c211ae2d1d51e4c4c67039cef6cc7bcc747323e9176e0f7dd3e9a SHA512 5ef6e3f1f51a241f0a45810a561f4a77ddb2fe706e7ae4d0f6e36c28416435eed50cdec33debf7434f788c28f5b147987df3b1a12e59f8a0fade31183f57332f WHIRLPOOL ab7d29d5efa289d36e0f39bd541e42349e11776566bf24067fc322d6cb9cee7cccbbcecbc664469e4d95a0da6ca701a296f381bc23ddea13d67fb36ce7c97962 +DIST j2ssh-0.2.9-src.tar.gz 2182523 SHA256 9fc60e295eb7124ff2cb77a76ae6936b6583ad7dac742765cdb3f34ece70d0c9 SHA512 d7720766dcf50205089fa22d026721dc25de5def1d451fcb6680832017becc3fc8d76c2ffb5ed2e2190e08c864da24d2544515478956f78ac4d8cf4126cab6e8 WHIRLPOOL 3e039e95255f91e47c8a52ee1b4f83b8f667e1232d4649c5aeb29c9076fe92d66110bd6ec11187ed4bcf2f3987e83041d38cc1e4774bcb6b3e26adfc6feb4cec +EBUILD j2ssh-0.2.9.ebuild 1027 SHA256 368efb86cb6010ff5678b54f2e773e91af5936806b5a964625d4868c48debde4 SHA512 4e28e6a3388ffe47340526c609c991b6a4da1c0707dbb05bcbd82b10981c72d6729ef1f6f89db4f8e5368ceb83d37d10c5ac3dd1307d0e9c108a3e1566f8e3ab WHIRLPOOL e23a038813703edf3e6dae05775a27f4262d18751dd95ee8b39777dc094b3352ff93bdd95db26eb6f1ff7e1c6a768c8eeaa54a0d8478c7d371056624635a4d57 +MISC ChangeLog 369 SHA256 673e29c032324288e4f316393e06a2fb54e327475d042d731976301eb6641580 SHA512 5fdccd524dac3507cfb334ca3b3496c2a4f5669ebfe7c619e9cd184b224e9c407244222023db1992824ea316ee0c49af5b2ba8b6a5297c58b60e5ee8c7ece6bf WHIRLPOOL 2e0ab45dff4df08950514c47be503de3acc434f78c4252808657f3c4e4fe81027a59a9e2cc190cd44c98af70caa9f596ef3c118bd18bba88ea7264b6d18ff382 +MISC metadata.xml 338 SHA256 00e0160eab2ea97281087afee88309ccaa35cfc54007493c21c5f74506b0d8a4 SHA512 798e558af38f8e8d11d5925a8ae0554fb98199c53f5ea5f31d0b95c2dc12f80b6ebad255926c51693607307789376fc12584273e722dce66be6011af8768a551 WHIRLPOOL e99d29a3f8dd7fe8154c1c3e84eaf23f09410178bcccea519ace5bc7ef87f0386bc5bd839df50db11095faa2d697ef10c0216ea7fa15699360a73a3f6e059de3 diff --git a/dev-java/j2ssh/files/0.2.9-extras.patch b/dev-java/j2ssh/files/0.2.9-extras.patch new file mode 100644 index 000000000000..d958cba19b97 --- /dev/null +++ b/dev-java/j2ssh/files/0.2.9-extras.patch @@ -0,0 +1,201 @@ +diff -ur j2ssh-0.2.9/src/com/sshtools/j2ssh/io/ByteArrayReader.java j2ssh-0.2.9_patched/src/com/sshtools/j2ssh/io/ByteArrayReader.java +--- j2ssh-0.2.9/src/com/sshtools/j2ssh/io/ByteArrayReader.java 2007-04-28 21:02:54.000000000 +0200 ++++ j2ssh-0.2.9_patched/src/com/sshtools/j2ssh/io/ByteArrayReader.java 2008-01-18 19:27:38.000000000 +0100 +@@ -118,7 +118,13 @@ + byte[] chars = new byte[(int) len]; + System.arraycopy(data, start + 4, chars, 0, len); + +- return new String(chars); ++ try { ++ return new String(chars, "UTF-8"); ++ } ++ catch(java.io.UnsupportedEncodingException e) { ++ // This should never happen, UTF-8 is necessarily supported. ++ return new String(chars); ++ } + } + + /** +@@ -163,6 +169,12 @@ + byte[] raw = new byte[(int) len]; + read(raw); + +- return new String(raw); ++ try { ++ return new String(raw, "UTF-8"); ++ } ++ catch(java.io.UnsupportedEncodingException e) { ++ // This should never happen, UTF-8 is necessarily supported. ++ return new String(raw); ++ } + } + } +diff -ur j2ssh-0.2.9/src/com/sshtools/j2ssh/io/ByteArrayWriter.java j2ssh-0.2.9_patched/src/com/sshtools/j2ssh/io/ByteArrayWriter.java +--- j2ssh-0.2.9/src/com/sshtools/j2ssh/io/ByteArrayWriter.java 2007-04-29 10:54:48.000000000 +0200 ++++ j2ssh-0.2.9_patched/src/com/sshtools/j2ssh/io/ByteArrayWriter.java 2008-01-18 19:30:36.000000000 +0100 +@@ -190,15 +190,15 @@ + if (str == null) { + writeInt(0); + } else { +- /* +- writeInt(str.length()); +- // don't use US-ASCII by default! +- write(str.getBytes()); +- */ +- // patch as of version 0.2.9 +- // for UTF-8 length of string is not necessarily +- // equal to number of bytes +- byte[] strBytes = str.getBytes(); ++ byte[] strBytes; ++ try { ++ strBytes = str.getBytes("UTF-8"); ++ } ++ catch(java.io.UnsupportedEncodingException e) { ++ // This should never happen, UTF-8 is necessarily supported. ++ strBytes = str.getBytes(); ++ } ++ + writeInt(strBytes.length); + write(strBytes); + } +diff -ur j2ssh-0.2.9/src/com/sshtools/j2ssh/sftp/SftpFileInputStream.java j2ssh-0.2.9_patched/src/com/sshtools/j2ssh/sftp/SftpFileInputStream.java +--- j2ssh-0.2.9/src/com/sshtools/j2ssh/sftp/SftpFileInputStream.java 2007-04-28 21:02:54.000000000 +0200 ++++ j2ssh-0.2.9_patched/src/com/sshtools/j2ssh/sftp/SftpFileInputStream.java 2008-01-18 19:26:58.000000000 +0100 +@@ -38,7 +38,7 @@ + */ + public class SftpFileInputStream extends InputStream { + SftpFile file; +- UnsignedInteger64 position = new UnsignedInteger64("0"); ++ UnsignedInteger64 position; + + /** + * Creates a new SftpFileInputStream object. +@@ -48,16 +48,47 @@ + * @throws IOException + */ + public SftpFileInputStream(SftpFile file) throws IOException { ++ this(file, 0); ++ } ++ ++ /** ++ * Creates a new SftpFileInputStream object and sets the file offset to the specified position. ++ * ++ * @param file ++ * @param position the initial file offset, must be >=0 ++ * ++ * @throws IOException ++ */ ++ public SftpFileInputStream(SftpFile file, long position) throws IOException { + if (file.getHandle() == null) { + throw new IOException("The file does not have a valid handle!"); + } +- ++ + if (file.getSFTPSubsystem() == null) { +- throw new IOException( +- "The file is not attached to an SFTP subsystem!"); ++ throw new IOException("The file is not attached to an SFTP subsystem!"); + } +- ++ + this.file = file; ++ this.position = new UnsignedInteger64(""+position); ++ } ++ ++ /** ++ * Returns the current offset within the file. ++ * ++ * @return the current offset within the file ++ */ ++ public long getPosition() { ++ return position.longValue(); ++ } ++ ++ /** ++ * Sets the current file offset to the given position. ++ * Subsequent calls to read methods will start reading data at this position. ++ * ++ * @param position the new offset, must be >=0 ++ */ ++ public void setPosition(long position) { ++ this.position = new UnsignedInteger64(""+position); + } + + /** +diff -ur j2ssh-0.2.9/src/com/sshtools/j2ssh/sftp/SftpFileOutputStream.java j2ssh-0.2.9_patched/src/com/sshtools/j2ssh/sftp/SftpFileOutputStream.java +--- j2ssh-0.2.9/src/com/sshtools/j2ssh/sftp/SftpFileOutputStream.java 2007-04-28 21:02:54.000000000 +0200 ++++ j2ssh-0.2.9_patched/src/com/sshtools/j2ssh/sftp/SftpFileOutputStream.java 2008-01-18 19:08:55.000000000 +0100 +@@ -38,7 +38,7 @@ + */ + public class SftpFileOutputStream extends OutputStream { + SftpFile file; +- UnsignedInteger64 position = new UnsignedInteger64("0"); ++ UnsignedInteger64 position; + + /** + * Creates a new SftpFileOutputStream object. +@@ -48,6 +48,18 @@ + * @throws IOException + */ + public SftpFileOutputStream(SftpFile file) throws IOException { ++ this(file, 0); ++ } ++ ++ /** ++ * Creates a new SftpFileOutputStream object and sets the file offset to the specified position. ++ * ++ * @param file ++ * @param position the initial file offset, must be >=0 ++ * ++ * @throws IOException ++ */ ++ public SftpFileOutputStream(SftpFile file, long position) throws IOException { + if (file.getHandle() == null) { + throw new IOException("The file does not have a valid handle!"); + } +@@ -58,6 +70,7 @@ + } + + this.file = file; ++ this.position = new UnsignedInteger64(""+position); + } + + /** +diff -ur j2ssh-0.2.9/src/com/sshtools/j2ssh/sftp/SftpSubsystemClient.java j2ssh-0.2.9_patched/src/com/sshtools/j2ssh/sftp/SftpSubsystemClient.java +--- j2ssh-0.2.9/src/com/sshtools/j2ssh/sftp/SftpSubsystemClient.java 2007-04-28 21:02:54.000000000 +0200 ++++ j2ssh-0.2.9_patched/src/com/sshtools/j2ssh/sftp/SftpSubsystemClient.java 2008-01-21 17:48:06.000000000 +0100 +@@ -231,16 +231,28 @@ + } + + /** ++ * Creates the directory with the specified path. The default permissions for the directory are 0755 ("rwxr-xr-x"). + * ++ * @param path the path to the directory to create ++ * @throws IOException if an error occurs ++ */ ++ public synchronized void makeDirectory(String path) throws IOException { ++ makeDirectory(path, 0755); // default to 755 octal (493 decimal): "rwxr-xr-x" ++ } ++ ++ /** ++ * Creates the directory with the specified path and file permissions. + * +- * @param path +- * +- * @throws IOException ++ * @param path the path to the directory to create ++ * @param permissions the file permissions of the new directory ++ * @throws IOException if an error occurs + */ +- public synchronized void makeDirectory(String path) +- throws IOException { ++ public synchronized void makeDirectory(String path, int permissions) throws IOException { + UnsignedInteger32 requestId = nextRequestId(); +- SshFxpMkdir msg = new SshFxpMkdir(requestId, path, new FileAttributes()); ++ FileAttributes attrs = new FileAttributes(); ++ attrs.setPermissions(new UnsignedInteger32(permissions)); ++ ++ SshFxpMkdir msg = new SshFxpMkdir(requestId, path, attrs); + sendMessage(msg); + getOKRequestStatus(requestId); + } diff --git a/dev-java/j2ssh/files/0.2.9-no-versioned-jars.patch b/dev-java/j2ssh/files/0.2.9-no-versioned-jars.patch new file mode 100644 index 000000000000..26d7672a3414 --- /dev/null +++ b/dev-java/j2ssh/files/0.2.9-no-versioned-jars.patch @@ -0,0 +1,40 @@ +diff --git a/j2ssh/build.xml b/j2ssh/build.xml +index 2c867ee..7ba5814 100644 +--- a/j2ssh/build.xml ++++ b/j2ssh/build.xml +@@ -52,7 +52,7 @@ + <mkdir dir="${build.dist.lib}"/> + + <!-- Build the J2SSH library files --> +- <jar jarfile="${build.dist.lib}/j2ssh-core-${j2ssh.version.major}.${j2ssh.version.minor}.${j2ssh.version.build}.jar" basedir="${build.dist.classes}"> ++ <jar jarfile="${build.dist.lib}/j2ssh-core.jar" basedir="${build.dist.classes}"> + <include name="com/sshtools/j2ssh/**/*.class"/> + <manifest> + <attribute name="Product-Version" +@@ -60,7 +60,7 @@ + </manifest> + </jar> + +- <jar jarfile="${build.dist.lib}/j2ssh-ant-${j2ssh.version.major}.${j2ssh.version.minor}.${j2ssh.version.build}.jar" basedir="${build.dist.classes}"> ++ <jar jarfile="${build.dist.lib}/j2ssh-ant.jar" basedir="${build.dist.classes}"> + <include name="com/sshtools/ant/**/*.class"/> + <manifest> + <attribute name="Product-Version" +@@ -68,7 +68,7 @@ + </manifest> + </jar> + +- <jar jarfile="${build.dist.lib}/j2ssh-dameon-${j2ssh.version.major}.${j2ssh.version.minor}.${j2ssh.version.build}.jar" basedir="${build.dist.classes}"> ++ <jar jarfile="${build.dist.lib}/j2ssh-dameon.jar" basedir="${build.dist.classes}"> + <include name="com/sshtools/daemon/**/*.class"/> + <exclude name="com/sshtools/daemon/windows/**/*.*"/> + <exclude name="com/sshtools/daemon/linux/**/*.*"/> +@@ -78,7 +78,7 @@ + </manifest> + </jar> + +- <jar jarfile="${build.dist.lib}/j2ssh-common-${j2ssh.version.major}.${j2ssh.version.minor}.${j2ssh.version.build}.jar" basedir="${build.dist.classes}"> ++ <jar jarfile="${build.dist.lib}/j2ssh-common.jar" basedir="${build.dist.classes}"> + <include name="com/sshtools/common/**/*.class"/> + <include name="com/sshtools/common/**/*.png"/> + <include name="com/sshtools/common/**/*.gif"/> diff --git a/dev-java/j2ssh/j2ssh-0.2.9.ebuild b/dev-java/j2ssh/j2ssh-0.2.9.ebuild new file mode 100644 index 000000000000..7a0176a27749 --- /dev/null +++ b/dev-java/j2ssh/j2ssh-0.2.9.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/j2ssh/j2ssh-0.2.9.ebuild,v 1.1 2013/10/08 16:37:35 ercpe Exp $ + +EAPI="5" + +JAVA_PKG_IUSE="source doc examples" + +inherit eutils java-pkg-2 java-ant-2 + +DESCRIPTION="Java implementation of the SSH protocol" +HOMEPAGE="http://sourceforge.net/projects/sshtools/ http://www.sshtools.com/" +SRC_URI="mirror://sourceforge/sshtools/${P}-src.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +CDEPEND="dev-java/commons-logging:0 + dev-java/ant-core:0" + +RDEPEND="${CDEPEND} + >=virtual/jre-1.5" +DEPEND="${CDEPEND} + >=virtual/jdk-1.5" + +S="${WORKDIR}/${PN}" + +JAVA_ANT_REWRITE_CLASSPATH="yes" +EANT_BUILD_TARGET="build" +EANT_GENTOO_CLASSPATH="commons-logging,ant-core" + +src_prepare() { + epatch "${FILESDIR}/${PV}-no-versioned-jars.patch" + epatch "${FILESDIR}/${PV}-extras.patch" +} + +src_install() { + java-pkg_dojar "${S}"/dist/lib/*.jar + + use doc && java-pkg_dojavadoc docs/ + use source && java-pkg_dosrc "${S}"/src/com + use examples && java-pkg_doexamples "${S}"/examples/ +} diff --git a/dev-java/j2ssh/metadata.xml b/dev-java/j2ssh/metadata.xml new file mode 100644 index 000000000000..54da87107dd1 --- /dev/null +++ b/dev-java/j2ssh/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>java</herd> + <longdescription> + SSHTools is a suite of Java SSH applications providing a Java SSH API, + SSH Terminal, SSH secured VNC client, SFTP client and SSH Daemon. + </longdescription> +</pkgmetadata> |