Changeset 075c4d4 for core/c


Ignore:
Timestamp:
Oct 5, 2015 2:13:38 PM (5 years ago)
Author:
dev <dev@…>
Branches:
master
Children:
1dfc818, c1c3a92
Parents:
489ff65e
Message:

Changed scripts to be SH compatible instead of bash.

Location:
core/c/jbigi
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • core/c/jbigi/build-all.sh

    r489ff65e r075c4d4  
    1919esac
    2020
    21 VER=6.0.0
    22 TARVER=${VER}a
    23 TAR=gmp-${TARVER}.tar.bz2
     21# Import gmp version variables and download gmp.
     22. ./download_gmp.sh
    2423
    25 echo "Extracting GMP Version $VER ..."
    26 tar -xjf $TAR
    2724echo "Building..."
    2825mkdir -p lib/net/i2p/util
     
    3835        mkdir -p bin/$x
    3936        cd bin/$x
    40         ../../gmp-$VER/configure --with-pic --build=$x
     37        ../../gmp-$GMP_VER/configure --with-pic --build=$x
    4138        make clean
    4239        make
  • core/c/jbigi/build.sh

    r489ff65e r075c4d4  
    1 #!/bin/bash
     1#!/bin/sh
    22#
    33#  Build the jbigi library for i2p
     
    2222
    2323# Import gmp version variables and download gmp.
    24 source ./download_gmp.sh
     24. ./download_gmp.sh
    2525
    2626
  • core/c/jbigi/download_gmp.sh

    r489ff65e r075c4d4  
    77
    88
    9 function download_tar
     9download_tar()
    1010{
    1111  GMP_TAR_URL="https://gmplib.org/download/gmp/${GMP_TAR}"
     
    2222}
    2323
    24 function extract_tar
     24extract_tar()
    2525{
    2626  tar -xjf ${GMP_TAR} > /dev/null 2>&1 || (rm -f ${GMP_TAR} && download_tar && extract_tar || exit 1)
  • core/c/jbigi/mbuild-all.sh

    r489ff65e r075c4d4  
    1 #!/bin/bash
     1#!/bin/sh
    22#
    33# Run with BITS=32 to generate 32-bit libs on a 64-bit platform
     
    5252# As of GMP 6.0.0, libgmp 3,
    5353X86_64_PLATFORMS="coreisbr coreihwl coreibwl bobcat jaguar bulldozer piledriver steamroller excavator atom athlon64 core2 corei nano pentium4 k10 x86_64"
    54 TRANSLATE_NAME_x86_64="none" # Rename x86_64 to none_64
     54TRANSLATE_NAME_x86_64="none" # Rename x86_64 to none_64, since that is what NativeBigInteger refers to it as
    5555
    5656# Note! these are 32bit _ONLY_ (after the 64 bit ones)
    5757# Also note that the 64-bit entry "x86_64" is filtered out since it already has the more appropriate "i386" entry
    58 X86_PLATFORMS="${X86_64_PLATFORMS//x86_64} pentium pentiummmx pentium2 pentium3 pentiumm k6 k62 k63 athlon geode viac3 viac32 i386"
    59 TRANSLATE_NAME_i386="none" # Rename i386 to none
     58X86_PLATFORMS="$(echo $X86_64_PLATFORMS | sed 's/x86_64//g') pentium pentiummmx pentium2 pentium3 pentiumm k6 k62 k63 athlon geode viac3 viac32 i386"
     59TRANSLATE_NAME_i386="none" # Rename i386 to none, , since that is what NativeBigInteger refers to it as
    6060
    6161DARWIN_PLATFORMS="core2 corei coreisbr coreihwl coreibwl"
     
    6969
    7070# Import gmp version variables and download gmp.
    71 source ./download_gmp.sh
     71. ./download_gmp.sh
    7272
    7373# If JAVA_HOME isn't set we'll try to figure it out
     
    9797
    9898if [ $BITS -eq 32 ]; then
     99  export ABI=32
    99100  export CFLAGS="-m32"
    100101  export LDFLAGS="-m32"
    101102elif [ $BITS -eq 64 ]; then
     103  export ABI=64
    102104  export CFLAGS="-m64"
    103105  export LDFLAGS="-m64"
     
    139141    *)
    140142      echo "No recognized cross-compiler provided in CC env variable."
    141       [ $BITS -eq 32 ] && echo "For 32-bit targets, i686-w64-mingw32-gcc recommended"
    142       [ $BITS -eq 64 ] && echo "For 64-bit targets, x86_64-w64-mingw32-gcc recommended"
     143      [ $BITS -eq 32 ] && echo "For 32-bit targets, i686-w64-mingw32-gcc is recommended"
     144      [ $BITS -eq 64 ] && echo "For 64-bit targets, x86_64-w64-mingw32-gcc is recommended"
    143145      exit 1;
    144146      ;;
     
    148150    HOST_CONFIGURE_FLAG="\$2-pc-freebsd"
    149151  ;;
    150   darwin*)
    151     HOST_CONFIGURE_FLAG="\$2-apple-darwin"
     152  darwin*|osx)
     153    HOST_CONFIGURE_FLAG="\$2-darwin"
    152154#     case "$CC" in
    153155#     *i*86*darwin*)
     
    182184        fi
    183185        echo "Building ${TARGET} .dlls for all architectures";;
    184 darwin*)
     186darwin*|osx)
    185187        NAME="libjbigi"
    186188        TYPE="jnilib"
     
    316318            # and this after:  "x86_VENDOR_OS"
    317319            eval HOST_CONFIGURE_FLAG=$HOST_CONFIGURE_FLAG
    318             echo "gmp-${1}/configure --host=${HOST_CONFIGURE_FLAG} --with-pic"
     320            echo "../../gmp-${1}/configure --host=${HOST_CONFIGURE_FLAG} --with-pic && return 0"
    319321            ../../gmp-${1}/configure --host=${HOST_CONFIGURE_FLAG} --with-pic && return 0
    320322        else
    321323            # We're not cross-compiling, we are however building
    322324            # optimized versions for other platforms on our OS.
    323             echo "gmp-${1}/configure --build=${2} --with-pic"
    324             ../../gmp-${1}/configure --build=${2} --with-pic && return 0
    325         fi
    326         kate config.log
    327 #        if [ $(echo $TARGET| grep -q darwin) ]; then
    328                
    329  #       else
    330   #              ../../gmp-${1}/configure --build=${2} ${HOST_CONFIGURE_FLAG} --with-pic && return 0
    331    #     fi
     325            echo "../../gmp-${1}/configure --build=${2}-${BUILD_OS} --with-pic && return 0"
     326            ../../gmp-${1}/configure --build=${2}-${BUILD_OS} --with-pic && return 0
     327        fi
     328
    332329        cd ..
    333330       
Note: See TracChangeset for help on using the changeset viewer.