summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Sachau <tommy@gentoo.org>2008-03-30 15:50:11 +0000
committerThomas Sachau <tommy@gentoo.org>2008-03-30 15:50:11 +0000
commited7f12eb9199fefec1217036848b0d9e2ff7b34a (patch)
tree69d60c4cd863cbe4ab0282136cfc14259904ff4c /dev-java
parentdev-java/db-je: New ebuild for bug 128783 (Dependency for >=net-p2p/freenet-0... (diff)
downloadsunrise-ed7f12eb9199fefec1217036848b0d9e2ff7b34a.tar.gz
sunrise-ed7f12eb9199fefec1217036848b0d9e2ff7b34a.tar.bz2
sunrise-ed7f12eb9199fefec1217036848b0d9e2ff7b34a.zip
dev-java/fec: New ebuild for bug 128783 (Dependency for >=net-p2p/freenet-0.7_beta_pre1130)
svn path=/sunrise/; revision=5934
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/fec/ChangeLog9
-rw-r--r--dev-java/fec/Manifest6
-rw-r--r--dev-java/fec/fec-1.0.3.ebuild56
-rw-r--r--dev-java/fec/files/build.xml30
-rw-r--r--dev-java/fec/files/libfec8path.patch27
-rw-r--r--dev-java/fec/metadata.xml5
6 files changed, 133 insertions, 0 deletions
diff --git a/dev-java/fec/ChangeLog b/dev-java/fec/ChangeLog
new file mode 100644
index 000000000..964a67900
--- /dev/null
+++ b/dev-java/fec/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for dev-java/fec
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 30 Mar 2008; Thomas Sachau (Tommy[D]) tommy@gentoo.org
+ +files/libfec8path.patch, +fec-1.0.3.ebuild, +files/build.xml,
+ +metadata.xml:
+ New ebuild for bug 128783 (Dependency for >=net-p2p/freenet-0.7_beta_pre1130)
+
diff --git a/dev-java/fec/Manifest b/dev-java/fec/Manifest
new file mode 100644
index 000000000..c91bce7c7
--- /dev/null
+++ b/dev-java/fec/Manifest
@@ -0,0 +1,6 @@
+AUX build.xml 1201 SHA1 92e1fd88c98e90ae289c41fb61321c46257da80b
+AUX libfec8path.patch 945 SHA1 a61787fa299076bcfefc2b8bfad9a78c32be236f
+DIST fec-1.0.3.zip 745195 SHA1 35de94815de1a132bc0aa991dcfffd5547226ff4
+EBUILD fec-1.0.3.ebuild 1160 SHA1 912c7f4f8f96b9f1dc26672d106282e3dff405ed
+MISC ChangeLog 333 SHA1 d064afa431788810d686baa726ef850ce91d9131
+MISC metadata.xml 170 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4
diff --git a/dev-java/fec/fec-1.0.3.ebuild b/dev-java/fec/fec-1.0.3.ebuild
new file mode 100644
index 000000000..fb9657c8c
--- /dev/null
+++ b/dev-java/fec/fec-1.0.3.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="Forword error correction libs"
+HOMEPAGE="http://www.onionnetworks.com/developers/"
+SRC_URI="http://www.onionnetworks.com/downloads/${P}.zip"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+
+RDEPEND=">=virtual/jre-1.4"
+DEPEND=">=virtual/jdk-1.4
+ app-arch/unzip
+ dev-java/log4j
+ dev-java/concurrent-util"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/libfec8path.patch
+ cp "${FILESDIR}"/build.xml src/
+ sed -i -e 's/build.compiler=jikes/#build.compiler=jikes/g' build.properties
+ cd lib
+ rm -rf *
+ java-pkg_jar-from --build-only log4j
+ java-pkg_jar-from --build-only concurrent-util
+ mv concurrent.jar concurrent-jaxed.jar
+
+ cd "${S}"
+ unzip -q common-20020926.zip
+ cd common-20020926
+ sed -i -e 's/build.compiler=jikes/#build.compiler=jikes/g' build.properties
+ cd lib
+ rm -f *jar
+}
+
+src_compile() {
+ cd common-20020926
+ eant clean jars
+ cp lib/onion-common.jar "${S}"/lib/
+ cd "${S}"
+ eant clean jars
+ cd src
+ eant
+}
+
+src_install() {
+ java-pkg_dojar src/"${PN}".jar
+}
+
diff --git a/dev-java/fec/files/build.xml b/dev-java/fec/files/build.xml
new file mode 100644
index 000000000..aa5056fb1
--- /dev/null
+++ b/dev-java/fec/files/build.xml
@@ -0,0 +1,30 @@
+<project name="fec" default="jar">
+ <property name="build" location="build_dir"/>
+ <property name="jar.location" location="fec.jar"/>
+
+ <target name="init" description="Create build directory">
+ <mkdir dir="${build}"/>
+ </target>
+
+ <target name="fec" depends="init" description="build the fecencoder/decoder plugins for fproxy.">
+ <javac destdir="${build}" optimize="on" source="1.4">
+ <src path="."/>
+ <classpath path="../lib/onion-common.jar"/>
+ <classpath path="../lib/log4j.jar"/>
+ <classpath path="../lib/concurrent-jaxed.jar"/>
+ </javac>
+
+ <copy todir="${build}">
+ <fileset dir=".">
+ <include name="**/*.properties"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="jar" depends="fec" description="Create the jar file">
+ <jar jarfile="${jar.location}" basedir="${build}" includes="**">
+ <zipfileset src="../lib/onion-common.jar"/>
+ <zipfileset src="../lib/onion-fec.jar"/>
+ </jar>
+ </target>
+</project>
diff --git a/dev-java/fec/files/libfec8path.patch b/dev-java/fec/files/libfec8path.patch
new file mode 100644
index 000000000..9e76139b8
--- /dev/null
+++ b/dev-java/fec/files/libfec8path.patch
@@ -0,0 +1,27 @@
+--- src/com/onionnetworks/fec/Native8Code.java 2002-09-30 20:19:24.000000000 +0200
++++ src/com/onionnetworks/fec/Native8Code.java.new 2008-03-24 01:38:35.000000000 +0100
+@@ -3,6 +3,7 @@
+ //import java.security.AccessController;
+ //import sun.security.action.*;
+ import com.onionnetworks.util.*;
++import java.io.File;
+
+ /**
+ * This class is the frontend for the JNI wrapper for the C implementation of
+@@ -21,13 +22,9 @@
+ private int code;
+
+ static {
+- String path = NativeDeployer.getLibraryPath
+- (Native8Code.class.getClassLoader(),"fec8");
+- if (path != null) {
+- System.load(path);
+- } else {
+- System.out.println("Unable to find native library for fec8");
+- }
++ File path = new File("lib/libfec8.so");
++ System.out.println("Loading FEC lib ["+path.getAbsolutePath()+']');
++ System.load(path.getAbsolutePath());
+ }
+
+ public Native8Code(int k, int n) {
diff --git a/dev-java/fec/metadata.xml b/dev-java/fec/metadata.xml
new file mode 100644
index 000000000..7e3286984
--- /dev/null
+++ b/dev-java/fec/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>maintainer-wanted</herd>
+</pkgmetadata>