From 339b430236d093ff9471155a321516fc0e9d1f76 Mon Sep 17 00:00:00 2001 From: rofinn Date: Wed, 21 Mar 2018 14:25:25 +0000 Subject: [PATCH] Use Compat.Sys.BINDIR so that BinDeps can work with system images. --- src/BinDeps.jl | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/BinDeps.jl b/src/BinDeps.jl index 5a23afe..71ed868 100644 --- a/src/BinDeps.jl +++ b/src/BinDeps.jl @@ -4,16 +4,12 @@ module BinDeps using Compat -if VERSION >= v"0.7.0-DEV.3073" - const _HOME = Sys.BINDIR -else - const _HOME = JULIA_HOME -end if VERSION >= v"0.7.0-DEV.3382" using Libdl end + export @build_steps, find_library, download_cmd, unpack_cmd, Choice, Choices, CCompile, FileDownloader, FileRule, ChangeDirectory, FileUnpacker, prepare_src, @@ -122,9 +118,9 @@ if Sys.KERNEL == :FreeBSD end if Compat.Sys.iswindows() - const exe7z = joinpath(_HOME, "7z.exe") - function unpack_cmd(file,directory,extension,secondary_extension) + exe7z = joinpath(Compat.Sys.BINDIR, "7z.exe") + if ((extension == ".Z" || extension == ".gz" || extension == ".xz" || extension == ".bz2") && secondary_extension == ".tar") || extension == ".tgz" || extension == ".tbz" return pipeline(`$exe7z x $file -y -so`, `$exe7z x -si -y -ttar -o$directory`)