summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin English <wizardedit@gentoo.org>2016-10-17 18:53:05 -0500
committerAustin English <wizardedit@gentoo.org>2016-10-17 19:01:29 -0500
commitd419b273959e182ab438e48203fe9d81808a596d (patch)
tree98859978d653fa0219d3e84ded3e4633e3f52143 /dev-java
parentdev-java/jmh-core: initial ebuild (diff)
downloadgentoo-d419b273959e182ab438e48203fe9d81808a596d.tar.gz
gentoo-d419b273959e182ab438e48203fe9d81808a596d.tar.bz2
gentoo-d419b273959e182ab438e48203fe9d81808a596d.zip
dev-java/okio: initial ebuild
Package-Manager: portage-2.3.0
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/okio/Manifest1
-rw-r--r--dev-java/okio/files/okio-remove-maven-animal-jre.patch44
-rw-r--r--dev-java/okio/metadata.xml11
-rw-r--r--dev-java/okio/okio-1.11.0.ebuild40
4 files changed, 96 insertions, 0 deletions
diff --git a/dev-java/okio/Manifest b/dev-java/okio/Manifest
new file mode 100644
index 000000000000..485dab0eeb39
--- /dev/null
+++ b/dev-java/okio/Manifest
@@ -0,0 +1 @@
+DIST okio-1.11.0.zip 147483 SHA256 fe75d35e819e38ecf17717c6d461e6ad82ad2ee7d8f2251047389b4acc16b56e SHA512 c8f440284d683a04e3d75d6f6715e229c06caad5e7f2bc544348703cdfbd8fe5bfb19f0c316ea4cfb473a933b03bda2277de8c0b7c956b143cc04826e61cf0b6 WHIRLPOOL 39a77a7572f1996b42c10c4e158e841917234fca5e6309ef8815f90c20338c86bc457a8e469af9cd91c5953000e7df661c4c9a3d3004f72404392f0108a98034
diff --git a/dev-java/okio/files/okio-remove-maven-animal-jre.patch b/dev-java/okio/files/okio-remove-maven-animal-jre.patch
new file mode 100644
index 000000000000..0e5e5d62880e
--- /dev/null
+++ b/dev-java/okio/files/okio-remove-maven-animal-jre.patch
@@ -0,0 +1,44 @@
+--- okio/src/main/java/okio/DeflaterSink.java 2016-08-22 12:01:19.828823222 -0500
++++ okio/src/main/java/okio/DeflaterSink.java 2016-08-22 12:01:25.039823574 -0500
+@@ -17,7 +17,6 @@
+
+ import java.io.IOException;
+ import java.util.zip.Deflater;
+-import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement;
+
+ import static okio.Util.checkOffsetAndCount;
+
+@@ -79,7 +78,6 @@
+ }
+ }
+
+- @IgnoreJRERequirement
+ private void deflate(boolean syncFlush) throws IOException {
+ Buffer buffer = sink.buffer();
+ while (true) {
+--- okio/src/main/java/okio/Okio.java 2016-08-22 12:03:23.819831591 -0500
++++ okio/src/main/java/okio/Okio.java 2016-08-22 12:03:34.874832337 -0500
+@@ -30,7 +30,6 @@
+ import java.nio.file.Path;
+ import java.util.logging.Level;
+ import java.util.logging.Logger;
+-import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement;
+
+ import static okio.Util.checkOffsetAndCount;
+
+@@ -167,7 +166,6 @@
+ }
+
+ /** Returns a source that reads from {@code path}. */
+- @IgnoreJRERequirement // Should only be invoked on Java 7+.
+ public static Source source(Path path, OpenOption... options) throws IOException {
+ if (path == null) throw new IllegalArgumentException("path == null");
+ return source(Files.newInputStream(path, options));
+@@ -186,7 +184,6 @@
+ }
+
+ /** Returns a sink that writes to {@code path}. */
+- @IgnoreJRERequirement // Should only be invoked on Java 7+.
+ public static Sink sink(Path path, OpenOption... options) throws IOException {
+ if (path == null) throw new IllegalArgumentException("path == null");
+ return sink(Files.newOutputStream(path, options));
diff --git a/dev-java/okio/metadata.xml b/dev-java/okio/metadata.xml
new file mode 100644
index 000000000000..1f3df0522d64
--- /dev/null
+++ b/dev-java/okio/metadata.xml
@@ -0,0 +1,11 @@
+<?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>
+ <upstream>
+ <remote-id type="github">square/okio</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-java/okio/okio-1.11.0.ebuild b/dev-java/okio/okio-1.11.0.ebuild
new file mode 100644
index 000000000000..cca6f42c8189
--- /dev/null
+++ b/dev-java/okio/okio-1.11.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 java-pkg-simple
+
+MY_P="${PN}-parent-${PV}"
+
+DESCRIPTION="A modern I/O API for Java"
+HOMEPAGE="https://github.com/square/okio"
+SRC_URI="https://github.com/square/${PN}/archive/${MY_P}.zip -> ${P}.zip"
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ >=virtual/jre-1.7"
+
+CDEPEND="
+ source? ( app-arch/zip )
+ dev-java/jmh-core:0
+ dev-java/junit:4"
+
+DEPEND=">=virtual/jdk-1.7
+ ${CDEPEND}"
+
+RDEPEND=">=virtual/jre-1.7
+ ${CDEPEND}"
+
+S="${WORKDIR}/${PN}-${MY_P}"
+
+JAVA_GENTOO_CLASSPATH="jmh-core,junit-4"
+
+src_prepare(){
+ epatch "${FILESDIR}/okio-remove-maven-animal-jre.patch"
+}