Skip to content

Commit

Permalink
Merge pull request #7 from simonbyrne/patch-1
Browse files Browse the repository at this point in the history
Update to newer release
  • Loading branch information
quinnj authored Mar 6, 2019
2 parents 36ec55b + 0375bc0 commit d12f660
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 58 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: julia
os:
- linux
julia:
- 0.6
- 1.0
notifications:
email: false
git:
Expand All @@ -19,8 +19,7 @@ sudo: required

# Before anything else, get the latest versions of things
before_script:
- julia -e 'Pkg.clone("https://github.com/JuliaPackaging/BinaryProvider.jl")'
- julia -e 'Pkg.clone("https://github.com/JuliaPackaging/BinaryBuilder.jl"); Pkg.build()'
- julia -e 'using Pkg; pkg"add BinaryProvider"; pkg"add BinaryBuilder#master"; Pkg.build()'

script:
- julia build_tarballs.jl
Expand Down
96 changes: 41 additions & 55 deletions build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -1,74 +1,60 @@
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder

name = "DecFP"
version = v"2.2.0" # 2.0 Update 2

# Collection of sources required to build DecFP
sources = [
"https://software.intel.com/sites/default/files/m/d/4/1/d/8/IntelRDFPMathLib20U1.tar.gz" =>
"dcd56b70a57d783d31c73798cabc33d715d0fdca8465725e4eebfb9de88444dd",
"https://www.netlib.org/misc/intel/IntelRDFPMathLib20U2.tar.gz" =>
"93c0c78e0989df88f8540bf38d6743734804cef1e40706fd8fe5c6a03f79e173",

]

# Bash recipe for building across all platforms
script = raw"""
if [ $target == "x86_64-w64-mingw32" ]; then
cd $WORKSPACE/srcdir
cd IntelRDFPMathLib20U1/LIBRARY/src/
wget https://raw.githubusercontent.com/weolar/miniblink49/master/vc6/include/crt/float.h
cd ..
make CC_NAME_INDEX=3 CC_INDEX=3 _HOST_OS=Windows_NT _HOST_ARCH=x86_64 _NUM_CPUS=1 CC=x86_64-w64-mingw32-gcc CFLAGS_OPT="-O2 -DBID_THREAD= -DBID_MS_FLAGS" CALL_BY_REF=0 GLOBAL_RND=1 GLOBAL_FLAGS=1 UNCHANGED_BINARY_FLAGS=1
$CC -shared -o libbid.dll *.obj
mkdir $prefix/bin
cp libbid.dll $prefix/bin/.
elif [ $target == "i686-w64-mingw32" ]; then
cd $WORKSPACE/srcdir
cd IntelRDFPMathLib20U1/LIBRARY/src/
wget https://raw.githubusercontent.com/weolar/miniblink49/master/vc6/include/crt/float.h
cd ..
make CC_NAME_INDEX=3 CC_INDEX=3 _HOST_OS=Windows_NT _HOST_ARCH=x86 _NUM_CPUS=1 CC=i686-w64-mingw32-gcc CFLAGS_OPT="-O2 -DBID_THREAD= -DBID_MS_FLAGS" CALL_BY_REF=0 GLOBAL_RND=1 GLOBAL_FLAGS=1 UNCHANGED_BINARY_FLAGS=1
$CC -shared -o libbid.dll *.obj
mkdir $prefix/bin
cp libbid.dll $prefix/bin/.
elif [ $target == "i686-linux-gnu" ]; then
cd $WORKSPACE/srcdir
cd IntelRDFPMathLib20U1/LIBRARY/
make _HOST_ARCH=i686 CC=gcc CFLAGS_OPT="-O2 -fPIC" CALL_BY_REF=0 GLOBAL_RND=1 GLOBAL_FLAGS=1 UNCHANGED_BINARY_FLAGS=1
$CC -shared -o libbid.so *.o
mkdir $prefix/lib
cp libbid.* $prefix/lib/.
elif [ $target == "x86_64-apple-darwin14" ]; then
cd $WORKSPACE/srcdir
cd IntelRDFPMathLib20U1/LIBRARY/
make CC=gcc CFLAGS_OPT="-O2 -fPIC" CALL_BY_REF=0 GLOBAL_RND=1 GLOBAL_FLAGS=1 UNCHANGED_BINARY_FLAGS=1
$CC -shared -o libbid.dylib *.o
mkdir $prefix/lib
cp libbid.* $prefix/lib/.
cd IntelRDFPMathLib20U2/LIBRARY/
if [ "$nbits" == 64 ]; then
_HOST_ARCH=x86_64
else
_HOST_ARCH=x86
fi
cd $WORKSPACE/srcdir
cd IntelRDFPMathLib20U1/LIBRARY/
make CC=gcc CFLAGS_OPT="-O2 -fPIC" CALL_BY_REF=0 GLOBAL_RND=1 GLOBAL_FLAGS=1 UNCHANGED_BINARY_FLAGS=1
$CC -shared -o libbid.so *.o
mkdir $prefix/lib
cp libbid.* $prefix/lib/.
if [[ $target == *"-w64-"* ]]; then
make CC_NAME=cc _HOST_OS=Windows_NT AR_CMD="ar rv" _HOST_ARCH=$_HOST_ARCH CALL_BY_REF=0 GLOBAL_RND=1 GLOBAL_FLAGS=1 UNCHANGED_BINARY_FLAGS=1
$CC $LDFLAGS -shared -o libbid.$dlext *.obj
else
if [[ $target == *"-musl"* ]]; then
CFLAGS_OPT="-fPIC -D__QNX__"
elif [[ $target == *"freebsd"* ]]; then
CFLAGS_OPT="-fPIC -D__linux"
else
CFLAGS_OPT="-fPIC"
fi
make CC_NAME=cc CFLAGS_OPT="$CFLAGS_OPT" CFLAGS="$CFLAGS_OPT" _HOST_ARCH=$_HOST_ARCH CALL_BY_REF=0 GLOBAL_RND=1 GLOBAL_FLAGS=1 UNCHANGED_BINARY_FLAGS=1
$CC $LDFLAGS -shared -o libbid.$dlext *.o
fi
mkdir -p $prefix/bin
cp libbid.$dlext $prefix/bin/
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [
Linux(:i686, :glibc),
Linux(:x86_64, :glibc),
# Linux(:aarch64, :glibc),
# Linux(:armv7l, :glibc),
# Linux(:powerpc64le, :glibc),
MacOS(),
Linux(:i686, libc=:glibc),
Linux(:x86_64, libc=:glibc),
Linux(:aarch64, libc=:glibc),
Linux(:armv7l, libc=:glibc, call_abi=:eabihf),
Linux(:powerpc64le, libc=:glibc),
Linux(:i686, libc=:musl),
Linux(:x86_64, libc=:musl),
Linux(:aarch64, libc=:musl),
Linux(:armv7l, libc=:musl, call_abi=:eabihf),
MacOS(:x86_64),
FreeBSD(:x86_64),
Windows(:i686),
Windows(:x86_64)
]
Expand All @@ -83,4 +69,4 @@ dependencies = [
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, "DecFP", sources, script, platforms, products, dependencies)
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)

0 comments on commit d12f660

Please sign in to comment.