diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-java/fec/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-java/fec/files')
-rw-r--r-- | dev-java/fec/files/fec-1.0.4-build.patch | 30 | ||||
-rw-r--r-- | dev-java/fec/files/fec-1.0.4-libfec8path.patch | 30 | ||||
-rw-r--r-- | dev-java/fec/files/fec-1.0.4-remove-concurrent-util-imports.patch | 101 | ||||
-rw-r--r-- | dev-java/fec/files/fec-1.0.4-soname.patch | 22 |
4 files changed, 183 insertions, 0 deletions
diff --git a/dev-java/fec/files/fec-1.0.4-build.patch b/dev-java/fec/files/fec-1.0.4-build.patch new file mode 100644 index 000000000000..c47eb5459045 --- /dev/null +++ b/dev-java/fec/files/fec-1.0.4-build.patch @@ -0,0 +1,30 @@ +--- src/csrc/Makefile.orig 2015-10-18 14:31:56.752486000 +0000 ++++ src/csrc/Makefile 2015-10-18 14:33:11.502486000 +0000 +@@ -28,11 +28,8 @@ + -I$(JAVA_HOME)/include/linux fec-jinterf.c \ + -o fec8-jinterf.o + +-fec8.o: fec.h fec8.S +- $(CC) $(CFLAGS) -DGF_BITS=8 -c -o fec8.o fec8.S +- +-fec8.S: fec.c Makefile +- $(CC) $(CFLAGS) -DGF_BITS=8 -S -o fec8.S fec.c ++fec8.o: fec.h fec.c ++ $(CC) $(CFLAGS) -DGF_BITS=8 -c -o fec8.o fec.c + + libfec16.so: fec16.o fec16-jinterf.o + $(CC) $(LDFLAGS) -shared fec16-jinterf.o fec16.o -o libfec16.so +@@ -42,11 +39,8 @@ + -I$(JAVA_HOME)/include/linux fec-jinterf.c \ + -o fec16-jinterf.o + +-fec16.o: fec.h fec16.S +- $(CC) $(CFLAGS) -DGF_BITS=16 -c -o fec16.o fec16.S +- +-fec16.S: fec.c Makefile +- $(CC) $(CFLAGS) -DGF_BITS=16 -S -o fec16.S fec.c ++fec16.o: fec.h fec.c ++ $(CC) $(CFLAGS) -DGF_BITS=16 -c -o fec16.o fec.c + + clean: + - rm -f *.o *.S fec *.so diff --git a/dev-java/fec/files/fec-1.0.4-libfec8path.patch b/dev-java/fec/files/fec-1.0.4-libfec8path.patch new file mode 100644 index 000000000000..58eb89efb730 --- /dev/null +++ b/dev-java/fec/files/fec-1.0.4-libfec8path.patch @@ -0,0 +1,30 @@ +--- src/com/onionnetworks/fec/Native8Code.java.orig 2015-10-18 14:27:06.160486000 +0000 ++++ src/com/onionnetworks/fec/Native8Code.java 2015-10-18 14:30:32.557486000 +0000 +@@ -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,15 +22,10 @@ + final private long code; + + static { +- String path = NativeDeployer.getLibraryPath +- (Native8Code.class.getClassLoader(),"fec8"); +- if (path != null) { +- System.load(path); +- initFEC(); +- } else { +- System.out.println("Unable to find native library for fec8 for platform "+NativeDeployer.OS_ARCH); +- System.out.println(path); +- } ++ File path = new File("/usr/lib/libfec8.so"); ++ System.out.println("Loading FEC lib ["+path.getAbsolutePath()+']'); ++ System.load(path.getAbsolutePath()); ++ initFEC(); + } + + public Native8Code(int k, int n) { diff --git a/dev-java/fec/files/fec-1.0.4-remove-concurrent-util-imports.patch b/dev-java/fec/files/fec-1.0.4-remove-concurrent-util-imports.patch new file mode 100644 index 000000000000..87a9473ed937 --- /dev/null +++ b/dev-java/fec/files/fec-1.0.4-remove-concurrent-util-imports.patch @@ -0,0 +1,101 @@ +--- src/com/onionnetworks/fec/io/FECFile.java.orig 2015-10-18 15:38:26.000000000 +0000 ++++ src/com/onionnetworks/fec/io/FECFile.java 2015-10-18 16:06:51.159486000 +0000 +@@ -10,7 +10,9 @@ + import com.onionnetworks.fec.FECCodeFactory; + import com.onionnetworks.io.RAF; + import com.onionnetworks.util.*; +-import EDU.oswego.cs.dl.util.concurrent.*; ++ ++import java.util.concurrent.locks.ReadWriteLock; ++import java.util.concurrent.locks.ReentrantReadWriteLock; + + /** + * This class provides the necessary file IO routines to go along with the raw +@@ -129,9 +131,9 @@ + this.raf = new RAF(f,mode); // synched RandomAccessFile + + // Create the locks. +- locks = new ReadWriteLock[blockCount]; ++ locks = new ReentrantReadWriteLock[blockCount]; + for (int i=0;i<locks.length;i++) { +- locks[i] = new ReentrantWriterPreferenceReadWriteLock(); ++ locks[i] = new ReentrantReadWriteLock(); + } + + // add the default exception handler. +@@ -258,7 +260,7 @@ + byte[] b = null; + + try { +- locks[blockNum].readLock().acquire(); ++ locks[blockNum].readLock().lock(); + try { + + // This raf check then pp access is safe because all +@@ -296,9 +298,9 @@ + return; + } + } finally { +- locks[blockNum].readLock().release(); ++ locks[blockNum].readLock().unlock(); + } +- } catch (InterruptedException e) { ++ } catch (Exception e) { + throw new InterruptedIOException(e.toString()); + } + +@@ -342,13 +344,13 @@ + + int result = -1; + try { +- locks[blockNum].writeLock().acquire(); ++ locks[blockNum].writeLock().lock(); + try { + result = write0(pkt,blockNum,stripeNum); + } finally { +- locks[blockNum].writeLock().release(); ++ locks[blockNum].writeLock().unlock(); + } +- } catch (InterruptedException e) { ++ } catch (Exception e) { + throw new InterruptedIOException(e.toString()); + } + +@@ -444,16 +446,16 @@ + } + + try { +- locks[blockNum].writeLock().acquire(); ++ locks[blockNum].writeLock().lock(); + try { + // seek and write the decoded block. + raf.seekAndWrite(blockNum*blockSize,b,0,b.length); + // Update the placement to show decoded entries. + pp.setBlockDecoded(blockNum); + } finally { +- locks[blockNum].writeLock().release(); ++ locks[blockNum].writeLock().unlock(); + } +- } catch (InterruptedException e) { ++ } catch (Exception e) { + throw new InterruptedIOException(e.toString()); + } + +@@ -468,7 +470,7 @@ + */ + public void acquireAllWriteLocks() throws InterruptedException { + for (int i=0;i<locks.length;i++) { +- locks[i].writeLock().acquire(); ++ locks[i].writeLock().lock(); + } + } + +@@ -479,7 +481,7 @@ + */ + public void releaseAllWriteLocks() throws InterruptedException { + for (int i=0;i<locks.length;i++) { +- locks[i].writeLock().release(); ++ locks[i].writeLock().unlock(); + } + } + diff --git a/dev-java/fec/files/fec-1.0.4-soname.patch b/dev-java/fec/files/fec-1.0.4-soname.patch new file mode 100644 index 000000000000..ae00449ced40 --- /dev/null +++ b/dev-java/fec/files/fec-1.0.4-soname.patch @@ -0,0 +1,22 @@ +--- src/csrc/Makefile.bak 2010-02-27 00:51:38.000000000 +1300 ++++ src/csrc/Makefile 2010-02-27 00:56:06.000000000 +1300 +@@ -21,7 +21,8 @@ + $(CC) $(CFLAGS) -DGF_BITS=8 -o fec fec8.o test.c + + libfec8.so: fec8.o fec8-jinterf.o +- $(CC) $(LDFLAGS) -shared fec8-jinterf.o fec8.o -o libfec8.so ++ $(CC) $(LDFLAGS) -shared fec8-jinterf.o fec8.o -o libfec8.so \ ++ -Wl,-soname=libfec8.so + + fec8-jinterf.o: fec-jinterf.c + $(CC) $(CFLAGS) -DGF_BITS=8 -c \ +@@ -35,7 +36,8 @@ + $(CC) $(CFLAGS) -DGF_BITS=8 -S -o fec8.S fec.c + + libfec16.so: fec16.o fec16-jinterf.o +- $(CC) $(LDFLAGS) -shared fec16-jinterf.o fec16.o -o libfec16.so ++ $(CC) $(LDFLAGS) -shared fec16-jinterf.o fec16.o -o libfec16.so \ ++ -Wl,-soname=libfec16.so + + fec16-jinterf.o: fec-jinterf.c + $(CC) $(CFLAGS) -DGF_BITS=16 -c \ |