Skip to content

Commit

Permalink
Use JLL package to provide GSL binary library
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano committed Oct 26, 2019
1 parent 436eecc commit 72e5e57
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 71 deletions.
3 changes: 1 addition & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ task:
name: FreeBSD
env:
matrix:
- JULIA_VERSION: 1.0
- JULIA_VERSION: 1.1
- JULIA_VERSION: 1.3
- JULIA_VERSION: nightly
install_script:
- sh -c "$(fetch https://raw.githubusercontent.com/ararslan/CirrusCI.jl/master/bin/install.sh -o -)"
Expand Down
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ os:
- linux
- osx
julia:
- 1.0
- 1.1
- 1.3
- nightly
notifications:
email: false
Expand Down
5 changes: 2 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ uuid = "92c85e6c-cbff-5e0c-80f7-495c94daaecd"
version = "0.5.1"

[deps]
BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
GSL_jll = "1b77fbbe-d8ee-58f0-85f9-836ddc23a7a4"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"

[compat]
BinaryProvider = "≥ 0.5.2"
SpecialFunctions = "≥ 0.6.0"
julia = "^1.0.0"
julia = "^1.3.0"

[extras]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
environment:
matrix:
- julia_version: 1
- julia_version: 1.3
- julia_version: nightly

platform:
Expand Down
53 changes: 0 additions & 53 deletions deps/build.jl

This file was deleted.

16 changes: 6 additions & 10 deletions src/GSL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@ module GSL

using Markdown


# BEGIN MODULE C
# low-level interface
module C
# Deps
const depsfile = joinpath(dirname(@__DIR__), "deps", "deps.jl")
if isfile(depsfile)
include(depsfile)
else
error("GSL is not properly installed. Please build it first.")
end

using Markdown
using Libdl
using GSL_jll

const libgslcblas = joinpath(dirname(GSL_jll.libgsl_path),
"libgslcblas" * (Sys.iswindows() ? "-0." : "." ) * dlext)

# Generated code
include("gen/gsl_export.jl")
include("gen/gsl_types.jl")
Expand All @@ -24,8 +22,6 @@ include("gen/gsl_global_vars.jl")
include("error_handling.jl")

function __init__()
# Load library
check_deps()
# Seems we need to load BLAS with this RTLD_GLOBAL
flags = Libdl.RTLD_LAZY | Libdl.RTLD_DEEPBIND | Libdl.RTLD_GLOBAL
if Libdl.dlopen_e(libgslcblas, flags) in (C_NULL, nothing)
Expand Down

0 comments on commit 72e5e57

Please sign in to comment.