Sponge fixes and additions patch:
* 3 New jbigi build scripts and old ones fixed to work properly. * Some trivial BOB work.
This commit is contained in:
@ -7,7 +7,7 @@ i2cp.tcp.port=7654
|
||||
BOB.host=localhost
|
||||
inbound.lengthVariance=0
|
||||
i2cp.messageReliability=BestEffort
|
||||
BOB.port=45067
|
||||
BOB.port=45678
|
||||
outbound.length=1
|
||||
inbound.length=1
|
||||
outbound.lengthVariance=0
|
||||
|
@ -152,7 +152,7 @@ is divided into following sections:
|
||||
<attribute default="${includes}" name="includes"/>
|
||||
<attribute default="${excludes}" name="excludes"/>
|
||||
<attribute default="${javac.debug}" name="debug"/>
|
||||
<attribute default="" name="sourcepath"/>
|
||||
<attribute default="/does/not/exist" name="sourcepath"/>
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
|
||||
|
@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=958a1d3e
|
||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||
nbproject/build-impl.xml.data.CRC32=209349b6
|
||||
nbproject/build-impl.xml.script.CRC32=75fac64c
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=e55b27f5
|
||||
nbproject/build-impl.xml.script.CRC32=c51e188e
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=65b8de21
|
||||
|
@ -24,18 +24,22 @@ dist.dir=dist
|
||||
dist.jar=${dist.dir}/BOB.jar
|
||||
dist.javadoc.dir=${dist.dir}/javadoc
|
||||
excludes=
|
||||
file.reference.build-javadoc=../../../i2p.i2p/build/javadoc
|
||||
file.reference.core.jar=../i2p.i2p/core/dist/core.jar
|
||||
file.reference.i2p.jar=../../bob/i2p/i2p.i2p/build/i2p.jar
|
||||
file.reference.i2p.jar-1=../../core/java/build/i2p.jar
|
||||
file.reference.i2p.jar-1=../../build/i2p.jar
|
||||
file.reference.i2p.jar-2=../i2p.i2p/core/java/build/i2p.jar
|
||||
file.reference.i2ptunnel.jar=../i2ptunnel/java/build/i2ptunnel.jar
|
||||
file.reference.i2p.jar-3=../../../i2p.i2p/build/i2p.jar
|
||||
file.reference.i2ptunnel.jar=../../../i2p.i2p/build/i2ptunnel.jar
|
||||
file.reference.java-src=../i2p.i2p/core/java/src/
|
||||
file.reference.jbigi.jar=../../bob/i2p/i2p.i2p/build/jbigi.jar
|
||||
file.reference.mstreaming.jar=../../bob/i2p/i2p.i2p/build/mstreaming.jar
|
||||
file.reference.mstreaming.jar-1=../ministreaming/java/build/mstreaming.jar
|
||||
file.reference.mstreaming.jar-1=../../build/mstreaming.jar
|
||||
file.reference.mstreaming.jar-2=../../../i2p.i2p/build/mstreaming.jar
|
||||
file.reference.NetBeansProjects-i2p.i2p=../i2p.i2p/
|
||||
file.reference.router.jar=../../build/router.jar
|
||||
file.reference.streaming.jar=../../bob/i2p/i2p.i2p/build/streaming.jar
|
||||
file.reference.streaming.jar-1=../streaming/java/build/streaming.jar
|
||||
file.reference.streaming.jar-1=../../../i2p.i2p/build/streaming.jar
|
||||
file.reference.wrapper-freebsd=../../installer/lib/wrapper/freebsd/
|
||||
file.reference.wrapper-linux=../../installer/lib/wrapper/linux/
|
||||
file.reference.wrapper-linux64=../../installer/lib/wrapper/linux64/
|
||||
@ -43,24 +47,17 @@ file.reference.wrapper-macosx=../../installer/lib/wrapper/macosx/
|
||||
file.reference.wrapper-solaris=../../installer/lib/wrapper/solaris/
|
||||
file.reference.wrapper-win32=../../installer/lib/wrapper/win32/
|
||||
file.reference.wrapper.jar=../../installer/lib/wrapper/linux/wrapper.jar
|
||||
file.reference.wrapper.jar-1=../../installer/lib/wrapper/freebsd/wrapper.jar
|
||||
file.reference.wrapper.jar-2=../../installer/lib/wrapper/linux64/wrapper.jar
|
||||
file.reference.wrapper.jar-3=../../installer/lib/wrapper/macosx/wrapper.jar
|
||||
file.reference.wrapper.jar-4=../../installer/lib/wrapper/solaris/wrapper.jar
|
||||
file.reference.wrapper.jar-5=../../installer/lib/wrapper/win32/wrapper.jar
|
||||
includes=**
|
||||
jar.compress=false
|
||||
javac.classpath=\
|
||||
${file.reference.i2p.jar-1}:\
|
||||
${file.reference.i2ptunnel.jar}:\
|
||||
${file.reference.mstreaming.jar-1}:\
|
||||
${file.reference.streaming.jar-1}:\
|
||||
${file.reference.wrapper.jar-1}:\
|
||||
${file.reference.wrapper.jar}:\
|
||||
${file.reference.wrapper.jar-2}:\
|
||||
${file.reference.wrapper.jar-3}:\
|
||||
${file.reference.wrapper.jar-4}:\
|
||||
${file.reference.wrapper.jar-5}
|
||||
${file.reference.streaming.jar-1}:\
|
||||
${file.reference.i2ptunnel.jar}:\
|
||||
${file.reference.i2p.jar-1}:\
|
||||
${file.reference.router.jar}:\
|
||||
${file.reference.mstreaming.jar-1}:\
|
||||
${file.reference.mstreaming.jar-2}:\
|
||||
${file.reference.i2p.jar-3}
|
||||
# Space-separated list of extra javac options
|
||||
javac.compilerargs=
|
||||
javac.deprecation=false
|
||||
|
@ -76,6 +76,9 @@ public class TCPio implements Runnable {
|
||||
*
|
||||
* --Sponge
|
||||
*
|
||||
* Tested with 128 bytes, and there was no performance gain.
|
||||
*
|
||||
* --Sponge
|
||||
*/
|
||||
|
||||
int b;
|
||||
|
@ -12,7 +12,7 @@ FreeBSD*)
|
||||
exit;;
|
||||
esac
|
||||
|
||||
VER=4.2.2
|
||||
VER=4.2.4
|
||||
echo "Extracting GMP Version $VER ..."
|
||||
tar -xjf gmp-$VER.tar.bz2
|
||||
echo "Building..."
|
||||
@ -21,7 +21,8 @@ mkdir lib
|
||||
mkdir lib/net
|
||||
mkdir lib/net/i2p
|
||||
mkdir lib/net/i2p/util
|
||||
for x in none pentium pentiummmx pentium2 pentium3 pentium4 k6 k62 k63 athlon
|
||||
|
||||
for x in none pentium pentiummmx pentium2 pentium3 pentium4 k6 k62 k63 athlon geode pentiumm core2
|
||||
do
|
||||
mkdir bin/$x
|
||||
cd bin/$x
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
mkdir -p lib/
|
||||
mkdir -p bin/local
|
||||
VER=4.2.2
|
||||
VER=4.2.4
|
||||
|
||||
if [ "$1" != "dynamic" -a ! -d gmp-$VER ]
|
||||
then
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
# When executed in Mingw: Produces an jbigi.dll
|
||||
# When executed in Linux: Produces an libjbigi.so
|
||||
# When executed in Linux/FreeBSD: Produces an libjbigi.so
|
||||
# Darwin produces libjbigi.jnilib, right?
|
||||
|
||||
CC="gcc"
|
||||
|
||||
@ -32,7 +33,8 @@ esac
|
||||
|
||||
#To link dynamically to GMP (use libgmp.so or gmp.lib), uncomment the first line below
|
||||
#To link statically to GMP, uncomment the second line below
|
||||
if test $1 = "dynamic"
|
||||
# Bug!!! Quote *BOTH* or neither! --Sponge
|
||||
if test "$1" = "dynamic"
|
||||
then
|
||||
echo "Building jbigi lib that is dynamically linked to GMP"
|
||||
LIBPATH="-L.libs"
|
||||
|
140
core/c/jbigi/mbuild-all.sh
Executable file
140
core/c/jbigi/mbuild-all.sh
Executable file
@ -0,0 +1,140 @@
|
||||
#/bin/bash
|
||||
|
||||
# TO-DO: Darwin.
|
||||
|
||||
# Note: You will have to add the CPU ID for the platform in the CPU ID code
|
||||
# for a new CPU. Just adding them here won't let I2P use the code!
|
||||
|
||||
#
|
||||
# If you know of other platforms i2p on linux works on,
|
||||
# please add them here.
|
||||
# Do NOT add any X86 platforms, do that below in the x86 platform list.
|
||||
#
|
||||
MISC_LINUX_PLATFORMS="hppa2.0 alphaev56 armv5tel mips64el itanium itanium2 ultrasparc2 ultrasparc2i alphaev6 powerpc970 powerpc7455 powerpc7447 atom"
|
||||
|
||||
#
|
||||
# If you know of other platforms i2p on FREEBSD works on,
|
||||
# please add them here.
|
||||
# Do NOT add any X86 platforms, do that below in the x86 platform list.
|
||||
#
|
||||
MISC_FREEBSD_PLATFORMS="atom alphaev56 ultrasparc2i"
|
||||
|
||||
#
|
||||
# MINGW/Windows??
|
||||
#
|
||||
MISC_MINGW_PLATFORMS=""
|
||||
|
||||
#
|
||||
# Are there any other X86 platforms that work on i2p? Add them here.
|
||||
#
|
||||
# Oddly athlon64 builds.... I wonder what others can :-)
|
||||
#
|
||||
X86_PLATFORMS="pentium pentiummmx pentium2 pentium3 pentium4 k6 k62 k63 athlon pentiumm core2 athlon64 geode"
|
||||
|
||||
|
||||
#
|
||||
# You should not need to edit anything below this comment.
|
||||
#
|
||||
|
||||
MINGW_PLATFORMS="${X86_PLATFORMS} ${MISC_MINGW_PLATFORMS}"
|
||||
LINUX_PLATFORMS="${X86_PLATFORMS} ${MISC_LINUX_PLATFORMS}"
|
||||
FREEBSD_PLATFORMS="${X86_PLATFORMS} ${MISC_FREEBSD_PLATFORMS}"
|
||||
|
||||
VER=$(echo gmp-*.tar.bz2 | sed -re "s/(.*-)(.*)(.*.tar.bz2)$/\2/" | tail --lines=1)
|
||||
if [ "$VER" == "" ] ; then
|
||||
echo "ERROR! Can't find gmp source tarball."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
case `uname -sr` in
|
||||
MINGW*)
|
||||
PLATFORM_LIST="${MINGW_PLATFORMS}"
|
||||
NAME="jbigi"
|
||||
TYPE="dll"
|
||||
TARGET="-windows-"
|
||||
echo "Building windows .dlls for all architectures";;
|
||||
Linux*)
|
||||
PLATFORM_LIST="${LINUX_PLATFORMS}"
|
||||
NAME="libjbigi"
|
||||
TYPE="so"
|
||||
TARGET="-linux-"
|
||||
echo "Building linux .sos for all architectures";;
|
||||
FreeBSD*)
|
||||
PLATFORM_LIST="${FREEBSD_PLATFORMS}"
|
||||
NAME="libjbigi"
|
||||
TYPE="so"
|
||||
TARGET="-freebsd-"
|
||||
echo "Building freebsd .sos for all architectures";;
|
||||
*)
|
||||
echo "Unsupported build environment"
|
||||
exit;;
|
||||
esac
|
||||
|
||||
function make_static {
|
||||
echo "Attempting .${4} creation for ${3}${5}${2}"
|
||||
../../mbuild_jbigi.sh static || return 1
|
||||
cp ${3}.${4} ../../lib/net/i2p/util/${3}${5}${2}.${4}
|
||||
return 0
|
||||
}
|
||||
|
||||
function make_file {
|
||||
# Nonfatal bail out on Failed build.
|
||||
echo "Attempting build for ${3}${5}${2}"
|
||||
make && return 0
|
||||
cd ..
|
||||
rm -R "$2"
|
||||
echo -e "\n\nFAILED! ${3}${5}${2} not made.\a"
|
||||
sleep 10
|
||||
return 1
|
||||
}
|
||||
|
||||
function configure_file {
|
||||
echo -e "\n\n\nAttempting configure for ${3}${5}${2}\n\n\n"
|
||||
sleep 10
|
||||
# Nonfatal bail out on unsupported platform.
|
||||
../../gmp-${1}/configure --build=${2} && return 0
|
||||
cd ..
|
||||
rm -R "$2"
|
||||
echo -e "\n\nSorry, ${3}${5}${2} is not supported on your build environment.\a"
|
||||
sleep 10
|
||||
return 1
|
||||
}
|
||||
|
||||
function build_file {
|
||||
configure_file "$1" "$2" "$3" "$4" "$5" && make_file "$1" "$2" "$3" "$4" "$5" && make_static "$1" "$2" "$3" "$4" "$5" && return 0
|
||||
echo -e "\n\n\nError building static!\n\n\a"
|
||||
sleep 10
|
||||
return 1
|
||||
}
|
||||
|
||||
echo "Extracting GMP Version $VER ..."
|
||||
tar -xf gmp-$VER.tar.bz2 || ( echo "Error in tarball file!" ; exit 1 )
|
||||
|
||||
if [ ! -d bin ]; then
|
||||
mkdir bin
|
||||
fi
|
||||
if [ ! -d lib/net/i2p/util ]; then
|
||||
mkdir -p lib/net/i2p/util
|
||||
fi
|
||||
|
||||
# Don't touch this one.
|
||||
NO_PLATFORM=none
|
||||
|
||||
for x in $NO_PLATFORM $PLATFORM_LIST
|
||||
do
|
||||
(
|
||||
if [ ! -d bin/$x ]; then
|
||||
mkdir bin/$x
|
||||
cd bin/$x
|
||||
else
|
||||
cd bin/$x
|
||||
rm -Rf *
|
||||
fi
|
||||
|
||||
build_file "$VER" "$x" "$NAME" "$TYPE" "$TARGET"
|
||||
)
|
||||
done
|
||||
|
||||
echo "Success!"
|
||||
exit 0
|
47
core/c/jbigi/mbuild_jbigi.sh
Executable file
47
core/c/jbigi/mbuild_jbigi.sh
Executable file
@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
# When executed in Mingw: Produces an jbigi.dll
|
||||
# When executed in Linux/FreeBSD: Produces an libjbigi.so
|
||||
# What does Darwin produce? libjbigi.jnilib?
|
||||
CC="gcc"
|
||||
|
||||
case `uname -sr` in
|
||||
MINGW*)
|
||||
JAVA_HOME="c:/software/j2sdk1.4.2_05"
|
||||
COMPILEFLAGS="-Wall"
|
||||
INCLUDES="-I. -I../../jbigi/include -I$JAVA_HOME/include/win32/ -I$JAVA_HOME/include/"
|
||||
LINKFLAGS="-shared -Wl,--kill-at"
|
||||
LIBFILE="jbigi.dll";;
|
||||
CYGWIN*)
|
||||
JAVA_HOME="c:/software/j2sdk1.4.2_05"
|
||||
COMPILEFLAGS="-Wall -mno-cygwin"
|
||||
INCLUDES="-I. -I../../jbigi/include -I$JAVA_HOME/include/win32/ -I$JAVA_HOME/include/"
|
||||
LINKFLAGS="-shared -Wl,--kill-at"
|
||||
LIBFILE="jbigi.dll";;
|
||||
Darwin*)
|
||||
JAVA_HOME="/Library/Java/Home"
|
||||
COMPILEFLAGS="-Wall"
|
||||
INCLUDES="-I. -I../../jbigi/include -I$JAVA_HOME/include"
|
||||
LINKFLAGS="-dynamiclib -framework JavaVM"
|
||||
LIBFILE="libjbigi.jnilib";;
|
||||
*)
|
||||
COMPILEFLAGS="-fPIC -Wall"
|
||||
INCLUDES="-I. -I../../jbigi/include -I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
|
||||
LINKFLAGS="-shared -Wl,-soname,libjbigi.so"
|
||||
LIBFILE="libjbigi.so";;
|
||||
esac
|
||||
|
||||
if [ "$1" = "dynamic" ] ; then
|
||||
echo "Building a jbigi lib that is dynamically linked to GMP"
|
||||
LIBPATH="-L.libs"
|
||||
INCLUDELIBS="-lgmp"
|
||||
else
|
||||
echo "Building a jbigi lib that is statically linked to GMP"
|
||||
STATICLIBS=".libs/libgmp.a"
|
||||
fi
|
||||
|
||||
echo "Compiling C code..."
|
||||
rm -f jbigi.o $LIBFILE
|
||||
$CC -c $COMPILEFLAGS $INCLUDES ../../jbigi/src/jbigi.c || exit 1
|
||||
$CC $LINKFLAGS $INCLUDES $INCLUDELIBS -o $LIBFILE jbigi.o $STATICLIBS || exit 1
|
||||
|
||||
exit 0
|
28
core/c/mbuild.sh
Executable file
28
core/c/mbuild.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#/bin/bash
|
||||
|
||||
JBIGI=../../../installer/lib/jbigi/jbigi.jar
|
||||
|
||||
if [ -f jbigi.jarx ] ; then
|
||||
JBIGI=../jbigi.jar
|
||||
fi
|
||||
|
||||
(cd jcpuid ; sh build.sh ; cd ..)
|
||||
(cd jbigi ; sh mbuild-all.sh ; cd ..)
|
||||
|
||||
mkdir t
|
||||
|
||||
(
|
||||
cd t
|
||||
jar xf ../../../installer/lib/jbigi/jbigi.jar
|
||||
)
|
||||
|
||||
cp jbigi/lib/net/i2p/util/* t/
|
||||
cp jcpuid/lib/freenet/support/CPUInformation/* t/
|
||||
|
||||
(
|
||||
cd t
|
||||
jar cf ../jbigi.jar .
|
||||
)
|
||||
|
||||
rm -R t
|
||||
echo "jbigi.jar Refreshed."
|
Reference in New Issue
Block a user