Skip to content

Commit 4209e55

Browse files
author
KDr2
committed
Fix Dylib building for macOS
And, disable the email notifications.
1 parent b5ce072 commit 4209e55

File tree

4 files changed

+13
-26
lines changed

4 files changed

+13
-26
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ Project.toml
5757
deps/build.log
5858
deps/deps.jl
5959
deps/usr/
60+
deps/tmp-build.jl

.travis.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,15 @@ matrix:
1515
- julia: 0.7
1616
fast_finish: true
1717

18-
notifications:
18+
notifications:
1919
email: false
2020

21+
env:
22+
global:
23+
- BINARYBUILDER_DOWNLOADS_CACHE=downloads
24+
- BINARYBUILDER_AUTOMATIC_APPLE=true
25+
sudo: required
26+
2127
stages:
2228
- name: dylib
2329
- name: test
@@ -42,5 +48,5 @@ jobs:
4248
- stage: test
4349
script:
4450
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
45-
- julia -e ' using Pkg; Pkg.clone(pwd(), "Libtask"); Pkg.build("Libtask"); Pkg.test("Libtask"; coverage=true)'
46-
- julia -e ' using Pkg; cd(Pkg.dir("Libtask")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder())'
51+
- julia -e 'using Pkg; Pkg.clone(pwd(), "Libtask"); Pkg.build("Libtask"); Pkg.test("Libtask"; coverage=true)'
52+
- julia -e 'using Pkg; cd(Pkg.dir("Libtask")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder())'

deps/build.jl

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,5 @@ function include_build_script(version_str, try_prev=false)
1818
include(build_script)
1919
end
2020

21-
@static if Sys.isapple()
22-
println("BinaryBuilder has a problem of its macOS support, so we build the dylib by ourselves.")
23-
using Libdl
24-
julia_root = Libdl.dlpath("libjulia") |> dirname |> dirname |> abspath
25-
LIBS = "$(julia_root)/lib"
26-
LIBSJL = "$(julia_root)/lib/julia"
27-
INCLUDES = "$(julia_root)/include/julia"
28-
THIS_DIR = dirname(@__FILE__)
29-
OUTPUT_DIR = joinpath(THIS_DIR, "usr/lib")
30-
run(`mkdir -p $OUTPUT_DIR`)
31-
OUTPUT = joinpath(OUTPUT_DIR, "libtask.dylib")
32-
run(`gcc -O2 -shared -std=gnu99 -I$INCLUDES -DJULIA_ENABLE_THREADING=1 -fPIC -L$LIBSJL -L$LIBS -ljulia $THIS_DIR/task.c -o $OUTPUT`)
33-
34-
depsjl = joinpath(THIS_DIR, "deps.jl")
35-
open(depsjl, "w") do io
36-
write(io, "const libtask = \"$OUTPUT\";\n")
37-
write(io, "function check_deps() end\n")
38-
end;
39-
else
40-
version_str = read(joinpath(@__DIR__, "../VERSION"), String) |> strip |> (x) -> lstrip(x, ['v'])
41-
include_build_script(version_str, true)
42-
end
21+
version_str = read(joinpath(@__DIR__, "../VERSION"), String) |> strip |> (x) -> lstrip(x, ['v'])
22+
include_build_script(version_str, true)

deps/build_tarballs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ platforms = [
2020
Linux(:i686, :glibc),
2121
Linux(:x86_64, :glibc),
2222
Linux(:armv7l, :glibc, :eabihf),
23-
# MacOS(:x86_64), # The macOS support of BinaryBuilder.jl is broken now.
23+
MacOS(:x86_64),
2424
Windows(:i686),
2525
Windows(:x86_64)
2626
]

0 commit comments

Comments
 (0)