summaryrefslogtreecommitdiff
path: root/net-libs/nativebiginteger/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-libs/nativebiginteger/files
reinit the tree, so we can have metadata
Diffstat (limited to 'net-libs/nativebiginteger/files')
-rw-r--r--net-libs/nativebiginteger/files/nativebiginteger-0.6.4-asmfix.patch31
-rw-r--r--net-libs/nativebiginteger/files/nativebiginteger-0.6.4-ldflags.patch17
-rw-r--r--net-libs/nativebiginteger/files/nativebiginteger-0.8.7-asmfix.patch31
-rw-r--r--net-libs/nativebiginteger/files/nativebiginteger-0.8.7-build-system.patch22
-rw-r--r--net-libs/nativebiginteger/files/nativebiginteger-0.8.7-debug-all.patch35
-rw-r--r--net-libs/nativebiginteger/files/nativebiginteger-0.8.7-jcpuid-build-system.patch23
-rw-r--r--net-libs/nativebiginteger/files/nativebiginteger-0.8.7-non-android-warnings.patch11
7 files changed, 170 insertions, 0 deletions
diff --git a/net-libs/nativebiginteger/files/nativebiginteger-0.6.4-asmfix.patch b/net-libs/nativebiginteger/files/nativebiginteger-0.6.4-asmfix.patch
new file mode 100644
index 000000000000..04cfa599413a
--- /dev/null
+++ b/net-libs/nativebiginteger/files/nativebiginteger-0.6.4-asmfix.patch
@@ -0,0 +1,31 @@
+--- jcpuid/src/jcpuid.c 2008-10-06 09:44:53.000000000 -0400
++++ jcpuid/src/jcpuid.c.new2 2010-12-27 09:41:53.000000000 -0500
+@@ -19,6 +19,7 @@
+ mov d, edx
+ }
+ #else
++ #ifdef _LP64
+ //Use GCC assembler notation
+ asm
+ (
+@@ -29,6 +30,20 @@
+ "=d"(d)
+ :"a"(iFunction)
+ );
++ #elif defined(__i386__)
++ asm
++ (
++ "pushl %%ebx\n\t"
++ "cpuid\n\t"
++ "movl %%ebx, %%edi\n\t"
++ "popl %%ebx"
++ : "=a" (a),
++ "=D" (b),
++ "=c" (c),
++ "=d" (d)
++ :"a"(iFunction)
++ );
++ #endif
+ #endif
+ return (*env)->NewObject(env, clsResult,constructor,a,b,c,d);
+ }
diff --git a/net-libs/nativebiginteger/files/nativebiginteger-0.6.4-ldflags.patch b/net-libs/nativebiginteger/files/nativebiginteger-0.6.4-ldflags.patch
new file mode 100644
index 000000000000..5d3c84cd641e
--- /dev/null
+++ b/net-libs/nativebiginteger/files/nativebiginteger-0.6.4-ldflags.patch
@@ -0,0 +1,17 @@
+--- Makefile 2008-11-06 21:09:54.000000000 +0100
++++ Makefile.new 2010-12-27 14:26:45.000000000 +0100
+@@ -1,11 +1,11 @@
+ libjbigi:
+ cd jbigi && rm -f jbigi.o libjbigi.so && $(CC) $(CFLAGS) -c -I. -Ijbigi/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux \
+- jbigi/src/jbigi.c && $(CC) -shared -Wl,-soname,libjbigi.so -I. -Ijbigi/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -lgmp \
+- -o libjbigi.so jbigi.o
++ jbigi/src/jbigi.c && $(CC) ${LDFLAGS} -shared -Wl,-soname,libjbigi.so jbigi.o -I. -Ijbigi/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -lgmp \
++ -o libjbigi.so
+
+
+ libjcpuid:
+- cd jcpuid && $(CC) $(CFLAGS) -shared -Wl,-soname,libjbigi-x86-linux.so -I. -Iinclude -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux \
++ cd jcpuid && $(CC) $(CFLAGS) ${LDFLAGS} -shared -Wl,-soname,libjbigi-x86-linux.so -I. -Iinclude -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux \
+ src/*.c -o libjcpuid-x86-linux.so
+
+ install:
diff --git a/net-libs/nativebiginteger/files/nativebiginteger-0.8.7-asmfix.patch b/net-libs/nativebiginteger/files/nativebiginteger-0.8.7-asmfix.patch
new file mode 100644
index 000000000000..3443a91c288b
--- /dev/null
+++ b/net-libs/nativebiginteger/files/nativebiginteger-0.8.7-asmfix.patch
@@ -0,0 +1,31 @@
+--- c/jcpuid/src/jcpuid.c 2008-10-06 09:44:53.000000000 -0400
++++ c/jcpuid/src/jcpuid.c.new2 2010-12-27 09:41:53.000000000 -0500
+@@ -19,6 +19,7 @@
+ mov d, edx
+ }
+ #else
++ #ifdef _LP64
+ //Use GCC assembler notation
+ asm
+ (
+@@ -29,6 +30,20 @@
+ "=d"(d)
+ :"a"(iFunction)
+ );
++ #elif defined(__i386__)
++ asm
++ (
++ "pushl %%ebx\n\t"
++ "cpuid\n\t"
++ "movl %%ebx, %%edi\n\t"
++ "popl %%ebx"
++ : "=a" (a),
++ "=D" (b),
++ "=c" (c),
++ "=d" (d)
++ :"a"(iFunction)
++ );
++ #endif
+ #endif
+ return (*env)->NewObject(env, clsResult,constructor,a,b,c,d);
+ }
diff --git a/net-libs/nativebiginteger/files/nativebiginteger-0.8.7-build-system.patch b/net-libs/nativebiginteger/files/nativebiginteger-0.8.7-build-system.patch
new file mode 100644
index 000000000000..ea298b5d0358
--- /dev/null
+++ b/net-libs/nativebiginteger/files/nativebiginteger-0.8.7-build-system.patch
@@ -0,0 +1,22 @@
+--- i2p-0.8.7/core/c/jbigi/build_jbigi.sh.orig 2011-07-29 11:52:43.000000000 +0200
++++ i2p-0.8.7/core/c/jbigi/build_jbigi.sh 2011-07-29 11:53:43.000000000 +0200
+@@ -3,8 +3,8 @@
+ # When executed in Linux/FreeBSD: Produces an libjbigi.so
+ # Darwin produces libjbigi.jnilib, right?
+
+-CC="gcc"
++test -z "$CC" && CC="gcc"
+
+ case `uname -sr` in
+ MINGW*)
+ JAVA_HOME="c:/software/j2sdk1.4.2_05"
+@@ -57,5 +55,7 @@
+
+ echo "Compiling C code..."
+ rm -f jbigi.o $LIBFILE
+-$CC -c $COMPILEFLAGS $INCLUDES ../../jbigi/src/jbigi.c
+-$CC $LINKFLAGS $INCLUDES $INCLUDELIBS -o $LIBFILE jbigi.o $STATICLIBS
++echo $CC -c $COMPILEFLAGS $CFLAGS $CPPFLAGS $INCLUDES ../../jbigi/src/jbigi.c
++$CC -c $COMPILEFLAGS $CFLAGS $CPPFLAGS $INCLUDES ../../jbigi/src/jbigi.c
++echo $CC $LINKFLAGS $LDFLAGS $INCLUDES -o $LIBFILE jbigi.o $STATICLIBS $INCLUDELIBS
++$CC $LINKFLAGS $LDFLAGS $INCLUDES -o $LIBFILE jbigi.o $STATICLIBS $INCLUDELIBS
diff --git a/net-libs/nativebiginteger/files/nativebiginteger-0.8.7-debug-all.patch b/net-libs/nativebiginteger/files/nativebiginteger-0.8.7-debug-all.patch
new file mode 100644
index 000000000000..07dd05227582
--- /dev/null
+++ b/net-libs/nativebiginteger/files/nativebiginteger-0.8.7-debug-all.patch
@@ -0,0 +1,35 @@
+--- core/java/src/net/i2p/util/NativeBigInteger.java.orig 2011-07-29 13:14:05.000000000 +0200
++++ core/java/src/net/i2p/util/NativeBigInteger.java 2011-07-29 13:15:16.000000000 +0200
+@@ -481,14 +481,12 @@
+
+ /** @since 0.8.7 */
+ private static void debug(String s) {
+- I2PAppContext.getGlobalContext().logManager().getLog(NativeBigInteger.class).debug(s);
++ System.err.println("DEBUG: " + s);
+ }
+
+
+ private static void info(String s) {
+- if(_doLog)
+- System.err.println("INFO: " + s);
+- I2PAppContext.getGlobalContext().logManager().getLog(NativeBigInteger.class).info(s);
++ System.err.println("INFO: " + s);
+ _loadStatus = s;
+ }
+
+@@ -496,12 +496,9 @@
+
+ /** @since 0.8.7 */
+ private static void warn(String s, Throwable t) {
+- if(_doLog) {
+- System.err.println("WARNING: " + s);
+- if (t != null)
+- t.printStackTrace();
+- }
+- I2PAppContext.getGlobalContext().logManager().getLog(NativeBigInteger.class).warn(s, t);
++ System.err.println("WARNING: " + s);
++ if (t != null)
++ t.printStackTrace();
+ if (t != null)
+ _loadStatus = s + ' ' + t;
+ else
diff --git a/net-libs/nativebiginteger/files/nativebiginteger-0.8.7-jcpuid-build-system.patch b/net-libs/nativebiginteger/files/nativebiginteger-0.8.7-jcpuid-build-system.patch
new file mode 100644
index 000000000000..a4020a012b98
--- /dev/null
+++ b/net-libs/nativebiginteger/files/nativebiginteger-0.8.7-jcpuid-build-system.patch
@@ -0,0 +1,23 @@
+--- i2p-0.8.7/core/c/jcpuid/build.sh.orig 2011-07-29 18:38:44.554000219 +0200
++++ i2p-0.8.7/core/c/jcpuid/build.sh 2011-07-29 18:38:13.789000172 +0200
+@@ -24,8 +24,8 @@
+ mkdir lib/freenet/support
+ mkdir lib/freenet/support/CPUInformation
+
+-CC="gcc"
++test -z "$CC" && CC="gcc"
+
+ case `uname -sr` in
+ MINGW*)
+ JAVA_HOME="/c/software/j2sdk1.4.2_05"
+@@ -50,8 +52,8 @@
+
+ echo "Compiling C code..."
+ rm -f $LIBFILE
+-$CC $COMPILEFLAGS $LINKFLAGS $INCLUDES src/*.c -o $LIBFILE
+-strip $LIBFILE
++echo $CC $COMPILEFLAGS $CPPFLAGS $CFLAGS $LINKFLAGS $LDFLAGS $INCLUDES src/*.c -o $LIBFILE
++$CC $COMPILEFLAGS $CPPFLAGS $CFLAGS $LINKFLAGS $LDFLAGS $INCLUDES src/*.c -o $LIBFILE
+ echo Built $LIBFILE
+
+ #g++ -shared -static -static-libgcc -Iinclude -I$JAVA_HOME/include \
diff --git a/net-libs/nativebiginteger/files/nativebiginteger-0.8.7-non-android-warnings.patch b/net-libs/nativebiginteger/files/nativebiginteger-0.8.7-non-android-warnings.patch
new file mode 100644
index 000000000000..6240d25bcd9b
--- /dev/null
+++ b/net-libs/nativebiginteger/files/nativebiginteger-0.8.7-non-android-warnings.patch
@@ -0,0 +1,11 @@
+--- core/java/src/net/i2p/util/NativeBigInteger.java.orig 2011-07-29 13:22:39.000000000 +0200
++++ core/java/src/net/i2p/util/NativeBigInteger.java 2011-07-29 13:22:55.000000000 +0200
+@@ -526,7 +526,7 @@
+ System.loadLibrary(name);
+ return true;
+ } catch (UnsatisfiedLinkError ule) {
+- if (_isAndroid) {
++ if (!_isAndroid) {
+ // Unfortunately,
+ // this is not interesting on Android, it says "file not found"
+ // on link errors too.