Build: Fix Debian build on ARM (ticket #1801)

- Fix other jbigi/jcpuid build script errors and typos
- Nonzero exit code missing on some jbigi/jcpuid build script failures
- Refresh patch
This commit is contained in:
zzz
2016-06-01 17:45:27 +00:00
parent dbd1ae0dfb
commit d7e1f62db4
5 changed files with 27 additions and 24 deletions

View File

@ -4,26 +4,26 @@
# When executed in OSX: Produces a libjbigi.jnilib
[ -z "$CC" ] && CC="gcc"
UNAME="$(uname -m)"
if [ -z $BITS ]; then
UNAME="$(uname -a)"
if test "${UNAME#*x86_64}" != "x86_&4"; then
if test "${UNAME#*x86_64}" != "$UNAME"; then
BITS=64
elif test "${UNAME#*i386}" != "i386"; then
elif test "${UNAME#*i386}" != "$UNAME"; then
BITS=32
elif test "${UNAME#*i686}" != "i686"; then
elif test "${UNAME#*i686}" != "$UNAME"; then
BITS=32
elif test "${UNAME#*armv6}" != "armv6"; then
elif test "${UNAME#*armv6}" != "$UNAME"; then
BITS=32
elif test "${UNAME#*armv7}" != "armv7"; then
elif test "${UNAME#*armv7}" != "$UNAME"; then
BITS=32
elif test "${UNAME#*aarch32}" != "aarch32"; then
elif test "${UNAME#*aarch32}" != "$UNAME"; then
BITS=32
elif test "${UNAME#*aarch64}" != "aarch64"; then
elif test "${UNAME#*aarch64}" != "$UNAME"; then
BITS=64
else
echo "Unable to detect default setting for BITS variable"
exit
exit 1
fi
printf "BITS variable not set, $BITS bit system detected\n" >&2
@ -85,8 +85,8 @@ else
STATICLIBS=".libs/libgmp.a"
fi
[ $BITS -eq 32 ] && COMPILEFLAGS="-m32 $COMPILEFLAGS" && LINKFLAGS="-m32 $LINKFLAGS"
[ $BITS -eq 64 ] && COMPILEFLAGS="-m64 $COMPILEFLAGS" && LINKFLAGS="-m64 $LINKFLAGS"
[ $BITS -eq 32 -a "${UNAME#*86}" != "$UNAME" ] && COMPILEFLAGS="-m32 $COMPILEFLAGS" && LINKFLAGS="-m32 $LINKFLAGS"
[ $BITS -eq 64 -a "${UNAME#*86}" != "$UNAME" ] && COMPILEFLAGS="-m64 $COMPILEFLAGS" && LINKFLAGS="-m64 $LINKFLAGS"
echo "Compiling C code..."
echo "Compile: \"$CC -c $COMPILEFLAGS $INCLUDES ../../jbigi/src/jbigi.c\""

View File

@ -19,30 +19,30 @@ case $TARGET in
echo "Building `uname -s |tr [A-Z] [a-z]` .sos";;
*)
echo "Unsupported build environment"
exit;;
exit 1;;
esac
if [ -z $BITS ]; then
UNAME="$(uname -a)"
if test "${UNAME#*x86_64}" != "x86_&4"; then
UNAME="$(uname -m)"
if test "${UNAME#*x86_64}" != "$UNAME"; then
BITS=64
elif test "${UNAME#*i386}" != "i386"; then
elif test "${UNAME#*i386}" != "$UNAME"; then
BITS=32
elif test "${UNAME#*i686}" != "i686"; then
elif test "${UNAME#*i686}" != "$UNAME"; then
BITS=32
elif test "${UNAME#*armv6}" != "armv6"; then
elif test "${UNAME#*armv6}" != "$UNAME"; then
BITS=32
elif test "${UNAME#*armv7}" != "armv7"; then
elif test "${UNAME#*armv7}" != "$UNAME"; then
BITS=32
elif test "${UNAME#*aarch32}" != "aarch32"; then
elif test "${UNAME#*aarch32}" != "$UNAME"; then
BITS=32
elif test "${UNAME#*aarch64}" != "aarch64"; then
elif test "${UNAME#*aarch64}" != "$UNAME"; then
BITS=64
else
echo "Unable to detect default setting for BITS variable"
exit
exit 1
fi
printf "BITS variable not set, $BITS bit system detected\n" >&2

View File

@ -23,7 +23,7 @@ index 1521392..6a89c92 100755
LIBFILE="libjbigi.so";;
*)
@@ -89,8 +89,8 @@
[ $BITS -eq 64 ] && COMPILEFLAGS="-m64 $COMPILEFLAGS" && LINKFLAGS="-m64 $LINKFLAGS"
[ $BITS -eq 64 -a "${UNAME#*86}" != "$UNAME" ] && COMPILEFLAGS="-m64 $COMPILEFLAGS" && LINKFLAGS="-m64 $LINKFLAGS"
echo "Compiling C code..."
-echo "Compile: \"$CC -c $COMPILEFLAGS $INCLUDES ../../jbigi/src/jbigi.c\""

View File

@ -1,3 +1,6 @@
2016-06-01 zzz
* Build: Fix Debian build on ARM (ticket #1801)
2016-05-29 zzz
* Console: Fix /configfamily form (ticket #1797)

View File

@ -18,10 +18,10 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 15;
public final static long BUILD = 16;
/** for example "-test" */
public final static String EXTRA = "";
public final static String EXTRA = "-rc";
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
public static void main(String args[]) {
System.out.println("I2P Router version: " + FULL_VERSION);