diff --git a/.github/workflows/runtests.yml b/.github/workflows/runtests.yml index 76b5b929..bd7f3778 100644 --- a/.github/workflows/runtests.yml +++ b/.github/workflows/runtests.yml @@ -29,12 +29,11 @@ jobs: - xcode: '11.4' os: macos-latest julia-version: 1.4 - - cxxwrap: '0.9' - os: ubuntu-latest - julia-version: 1.4 - cxxwrap: '0.10' os: ubuntu-latest julia-version: 1.4 + - os: ubuntu-20.04 + julia-version: 1.4 fail-fast: false diff --git a/Project.toml b/Project.toml index 0b86dc22..f1ff9125 100644 --- a/Project.toml +++ b/Project.toml @@ -18,9 +18,9 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [compat] BinaryProvider = "^0.5.3" CMake = "^1.1.1" -CxxWrap = "0.9.1, 0.10.1, 0.11" +CxxWrap = "0.10.1, 0.11" JSON = "^0.20, ^0.21" -LoadFlint = "^0.2.1" +LoadFlint = "^0.3.0" julia = "^1.3" [extras] diff --git a/deps/build.jl b/deps/build.jl index 70472636..05ef8908 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -12,16 +12,20 @@ const verbose = "--verbose" in ARGS dependencies = [ "build_bliss.v0.73.0.jl", "build_boost.v1.71.0.jl", + #"build_CompilerSupportLibraries.v0.3.3.jl", "build_cddlib.v0.94.10.jl", - "build_FLINT.v0.0.2.jl", + "build_FLINT.v2.6.0.jl", "build_GMP.v6.1.2.jl", + "build_libpolymake_julia.v0.0.2.jl", "build_lrslib.v0.1.0.jl", "build_MPFR.v4.0.2.jl", "build_Ncurses.v6.1.0.jl", "build_Ninja.v1.10.0.jl", - "build_normaliz.v3.8.4.jl", + "build_nauty.v2.6.12.jl", + "build_normaliz.v3.8.5.jl", "build_PPL.v1.2.0.jl", "build_Perl.v5.30.3.jl", + "build_polymake.v4.1.1.jl", "build_Readline.v8.0.4.jl", ] @@ -31,75 +35,38 @@ perl = joinpath(@__DIR__,"usr","bin","perl") use_binary = true depsjl = "" -if haskey(ENV, "POLYMAKE_CONFIG") && ENV["POLYMAKE_CONFIG"] != "no" - try - if ENV["POLYMAKE_CONFIG"] == "yes" - # test whether polymake config is available in path - global pm_config = chomp(read(`command -v polymake-config`, String)) - else - global pm_config = ENV["POLYMAKE_CONFIG"] - end - @assert ispath(pm_config) - global perl ="perl" - global use_binary = false - catch err - if err isa AssertionError - @error("Environment variable POLYMAKE_CONFIG does not point to a valid `polymake-config` executable.") - end - rethrow(err) - end -end - -const prefix = Prefix(joinpath(dirname(pm_config),"..")) -const polymake = joinpath(prefix,"bin","polymake") - -products = Product[ - LibraryProduct(prefix, "libpolymake", :libpolymake) - ExecutableProduct(prefix,"polymake", :polymake) - ExecutableProduct(prefix,"polymake-config", Symbol("polymake_config")) -] - -# Download binaries from hosted location -bin_prefix = "https://github.com/benlorenz/polymake_jll.jl/releases/download/polymake-v4.1.0+0" - -# Listing of files generated by BinaryBuilder: -download_info = Dict( - MacOS(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/polymake.v4.1.0.x86_64-apple-darwin14-cxx03.tar.gz", "5f57b69067cf618b65a841c5bdf05a47983989557abec3386fbdb590ac15642b"), - MacOS(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/polymake.v4.1.0.x86_64-apple-darwin14-cxx11.tar.gz", "98f1aa168f947e518d15d193fa5bb02d8e21b844e75dde6a94f029df783d2f1c"), - Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc6, :cxx11)) => ("$bin_prefix/polymake.v4.1.0.x86_64-linux-gnu-gcc6-cxx11.tar.gz", "ccb4a44242a20e3b377fb46d0933d0d696e8f4b0657610ba155e97a3d48a2b25"), - Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc7, :cxx11)) => ("$bin_prefix/polymake.v4.1.0.x86_64-linux-gnu-gcc7-cxx11.tar.gz", "aa2c294c1166d047fec55414d47cd423d8f0040c789dfff726b329e4ecb6cc9d"), - Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc8, :cxx11)) => ("$bin_prefix/polymake.v4.1.0.x86_64-linux-gnu-gcc8-cxx11.tar.gz", "132f2e9455fadb333b392d584b51722e3fc2d8a1fe733c43a36a98662f8ff97f"), -) +#if haskey(ENV, "LIBPOLYMAKE_JULIA") +# try +# lpj = ENV["LIBPOLYMAKE_JULIA"] +# global libpolymake_julia = joinpath(lpj,"lib","libpolymake_julia.$(Libdl.dlext)") +# global type_translator = joinpath(lpj,"share","libpolymake_julia","type_translator.jl") +# @assert ispath(libpolymake_julia) +# global perl = "perl" +# global use_binary = false +# catch err +# if err isa AssertionError +# @error("Environment variable LIBPOLYMAKE_JULIA does not point to a valid `libpolymake_julia` installation.") +# end +# rethrow(err) +# end +#end + +products = Array{Product,1}() if use_binary # Install unsatisfied or updated dependencies: - unsatisfied = any(!satisfied(p; verbose=verbose) for p in products) - dl_info = choose_download(download_info, platform_key_abi()) - platform = platform_key_abi() - @info platform - if dl_info === nothing && unsatisfied - # If we don't have a BinaryProvider-compatible .tar.gz to download, complain. - # Alternatively, you could attempt to install from a separate provider, - # build from source or something even more ambitious here. - error(""" -Your platform $(triplet(platform)) is not supported by this package! -If you already have a polymake installation you need to set the environment variable `POLYMAKE_CONFIG`. -""") - end pm_bin_prefix = joinpath(@__DIR__,"usr") - if unsatisfied || !isinstalled(dl_info...; prefix=prefix) - if isdir(pm_bin_prefix) - # make sure we can overwrite all the directories (e.g. ncurses) - run(`chmod -R u+w $(pm_bin_prefix)`) - end - # Download and install binaries - for dependency in dependencies # We do not check for already installed dependencies - build_file = joinpath(@__DIR__, dependency) - m = @eval module $(gensym()); include($build_file); end - append!(products, m.products) - end - install(dl_info...; prefix=prefix, force=true, verbose=verbose) + if isdir(pm_bin_prefix) + # make sure we can overwrite all the directories (e.g. ncurses) + run(`chmod -R u+w $(pm_bin_prefix)`) + end + # Download and install binaries + for dependency in dependencies # We do not check for already installed dependencies + build_file = joinpath(@__DIR__, dependency) + m = @eval module $(gensym()); include($build_file); end + append!(products, m.products) end + depsjl = :( function prepare_env() ENV["POLYMAKE_USER_DIR"] = abspath(joinpath(Pkg.depots1(),"polymake_user")); @@ -122,92 +89,25 @@ If you already have a polymake installation you need to set the environment vari end end - pm_config_ninja = joinpath(libdir(prefix),"polymake","config.ninja") + pm_config_ninja = joinpath(pm_bin_prefix,"lib","polymake","config.ninja") run(`$perl -pi -e "s{/workspace/destdir}{$pm_bin_prefix}g" $pm_config_ninja`) # adjust signal used for initalization purposes to avoid problems run(`$perl -pi -e "s/SIG{INT}/SIG{USR1}/g" $pm_bin_prefix/share/polymake/perllib/Polymake/Main.pm`) - -else - if pm_config == nothing - error("Set `POLYMAKE_CONFIG` ENV variable. And rebuild Polymake by calling `import Pkg; Pkg.build(\"Polymake\")`.") - end end -minimal_polymake_version = v"4.0" - -pm_version = read(`$perl $pm_config --version`, String) |> chomp |> VersionNumber -if pm_version < minimal_polymake_version - error("Polymake version $pm_version is older than minimal required version $minimal_polymake_version") -end - -pm_include_statements = read(`$perl $pm_config --includes`, String) |> chomp |> split -# Remove the -I prefix of all includes -pm_include_statements = map(i -> i[3:end], pm_include_statements) -push!(pm_include_statements, joinpath(pm_include_statements[1],"..","share","polymake")) -pm_includes = join(pm_include_statements, " ") - -pm_cflags = chomp(read(`$perl $pm_config --cflags`, String)) -pm_ldflags = chomp(read(`$perl $pm_config --ldflags`, String)) -pm_libraries = chomp(read(`$perl $pm_config --libs`, String)) -pm_cxx = chomp(read(`$perl $pm_config --cc`, String)) - -jlcxx_cmake_dir = joinpath(CxxWrap.prefix_path(), "lib", "cmake", "JlCxx") -julia_exec = joinpath(Sys.BINDIR, Base.julia_exename()) - -xcode_typeinfo_bug = false - -if Sys.isapple() - # Work around a bug in Xcode 11.4 that causes SIGABRT, at least until - # https://github.com/llvm/llvm-project/commit/2464d8135e - # arrives. - # - # We build a jlcxx library that uses std::string which will - # abort with a failed assertion has_julia_type if we are building - # with xcode 11.4 but libcxxwrap-julia was built with an older libc++. - # - # Read the above LLVM commit message for some details; the effect of merged - # vs non-merged type_info is that for the former memory addresses are - # used as hash_code(), for the latter the type_info.name() string is - # hashed. - - cd(joinpath(@__DIR__, "xcodetypeinfo")) - run(`$(CMake.cmake) -DJulia_EXECUTABLE=$julia_exec -DJlCxx_DIR=$jlcxx_cmake_dir .`) - run(`make -j1`) - libpath = joinpath(@__DIR__, "xcodetypeinfo", "libhello.$dlext") - res = run(pipeline(Cmd(`$(Base.julia_cmd()) --project -e "using CxxWrap; @wrapmodule(\"$libpath\", :define_module_hello); @initcxx;"`,ignorestatus=true),stdout=devnull,stderr=devnull)) - if res.termsignal == 6 - global xcode_typeinfo_bug = true - println("Applying Xcode type_info.hash_code() workaround") - end -end +# FIXME: +# - check libpolymake_julia version +# - check polymake version +# - how to find polymake for non-binary libpolymake_julia +# - pin cxxwrap version? -cd(joinpath(@__DIR__, "src")) - -include("type_setup.jl") - -if xcode_typeinfo_bug - global pm_cflags *= " -DFORCE_XCODE_TYPEINFO_MERGED" -end +minimal_polymake_version = v"4.0" -run(`$(CMake.cmake) - -DJulia_EXECUTABLE=$julia_exec - -DJlCxx_DIR=$jlcxx_cmake_dir - -Dpolymake_includes=$pm_includes - -Dpolymake_ldflags=$pm_ldflags - -Dpolymake_libs=$pm_libraries - -Dpolymake_cflags=$pm_cflags - -DCMAKE_CXX_COMPILER=$pm_cxx - -DCMAKE_INSTALL_LIBDIR=lib - .`) -cpus = max(div(Sys.CPU_THREADS,2), 1) -run(`make -j$cpus`) - -json_script = joinpath(@__DIR__,"rules","apptojson.pl") -json_folder = joinpath(@__DIR__,"json") -mkpath(json_folder) - -run(`$perl $polymake --no-config --iscript $json_script $json_folder`) +#pm_version = read(`$perl $pm_config --version`, String) |> chomp |> VersionNumber +#if pm_version < minimal_polymake_version +# error("Polymake version $pm_version is older than minimal required version $minimal_polymake_version") +#end # remove old deps.jl first to avoid problems when switching from binary installation rm(joinpath(@__DIR__,"deps.jl"), force=true) @@ -222,9 +122,3 @@ open(joinpath(@__DIR__,"deps.jl"), "a") do f println(f, "const using_binary = $use_binary") println(f, depsjl) end - -println("storing libcxxwrap version") -jlcxxversion = VersionNumber(unsafe_string(ccall(:cxxwrap_version_string, Cstring, ()))) -open(joinpath(@__DIR__,"jlcxx_version.jl"), "w") do f - println(f, """const jlcxx_version = v"$jlcxxversion";""") -end diff --git a/deps/build_CompilerSupportLibraries.v0.3.3.jl b/deps/build_CompilerSupportLibraries.v0.3.3.jl new file mode 100644 index 00000000..940888c1 --- /dev/null +++ b/deps/build_CompilerSupportLibraries.v0.3.3.jl @@ -0,0 +1,77 @@ +using BinaryProvider # requires BinaryProvider 0.3.0 or later + +# Parse some basic command-line arguments +const verbose = "--verbose" in ARGS +const prefix = Prefix(get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr"))) +products = [ + LibraryProduct(prefix, ["libgcc_s", "libgcc_s_sjlj", "libgcc_s_seh"], :libgcc_s), + LibraryProduct(prefix, ["libstdc++"], :libstdcxx), + LibraryProduct(prefix, ["libgfortran"], :libgfortran), + LibraryProduct(prefix, ["libgomp"], :libgomp), +] + +# Download binaries from hosted location +bin_prefix = "https://github.com/JuliaBinaryWrappers/CompilerSupportLibraries_jll.jl/releases/download/CompilerSupportLibraries-v0.3.3+0" + +# Listing of files generated by BinaryBuilder: +download_info = Dict( + Linux(:aarch64, libc=:glibc, compiler_abi=CompilerABI(:gcc4)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.aarch64-linux-gnu-libgfortran3.tar.gz", "17132bd0c2f2c6d8426a601b57de2c4e670da64076ab7ab0f311dc3c39ed421c"), + Linux(:aarch64, libc=:glibc, compiler_abi=CompilerABI(:gcc7)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.aarch64-linux-gnu-libgfortran4.tar.gz", "c6fa95bb0873c23084bfb7e154ef546b21488777e2d352e5acf38d8e9800c14d"), + Linux(:aarch64, libc=:glibc, compiler_abi=CompilerABI(:gcc8)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.aarch64-linux-gnu-libgfortran5.tar.gz", "a3b98e7b24c580f5120ac2344d19c4884c93b17271fb296fa0b97fc562de7f2d"), + Linux(:aarch64, libc=:musl, compiler_abi=CompilerABI(:gcc4)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.aarch64-linux-musl-libgfortran3.tar.gz", "ee0b1e57302709cf159573ec23017fec797af6b0dae7dbd2ea0904e67b4e0343"), + Linux(:aarch64, libc=:musl, compiler_abi=CompilerABI(:gcc7)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.aarch64-linux-musl-libgfortran4.tar.gz", "b5fb9e89ed28eb3aa31397a165e583d6e860e54e24bd9af7474670335e2b2d57"), + Linux(:aarch64, libc=:musl, compiler_abi=CompilerABI(:gcc8)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.aarch64-linux-musl-libgfortran5.tar.gz", "85cd3c8ad611c8949f7cd0fd01444650358144f576e69fa20d58e9f29f781695"), + Linux(:armv7l, libc=:glibc, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc4)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.armv7l-linux-gnueabihf-libgfortran3.tar.gz", "6964b730d3764a82252fe6144d0e9103d0d9a409027c44de224afc8f05782733"), + Linux(:armv7l, libc=:glibc, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc7)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.armv7l-linux-gnueabihf-libgfortran4.tar.gz", "6b76ac45d465413bf6bc6b45cda8f1f528ce212979d94887b80d9b975e116696"), + Linux(:armv7l, libc=:glibc, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc8)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.armv7l-linux-gnueabihf-libgfortran5.tar.gz", "e5c9854d8191f2fabe81ef1fb7974ce4c4e9261c790ec21e225fbdc57ccf3bf0"), + Linux(:armv7l, libc=:musl, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc4)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.armv7l-linux-musleabihf-libgfortran3.tar.gz", "ead80d5f2f8ed45598fd8331da07dc3e430e42b8129d982e1209c6dc392c4595"), + Linux(:armv7l, libc=:musl, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc7)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.armv7l-linux-musleabihf-libgfortran4.tar.gz", "713f7de6f6b79869c4818b861d9877d008ef0f9bc287a88fb6c80c5757a5f80d"), + Linux(:armv7l, libc=:musl, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc8)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.armv7l-linux-musleabihf-libgfortran5.tar.gz", "7fcd1b6a46cf1bb89602b3ad64dc546c251ca628197a9ab3d23d2ef460f39709"), + Linux(:i686, libc=:glibc, compiler_abi=CompilerABI(:gcc4)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.i686-linux-gnu-libgfortran3.tar.gz", "39f8673f0fb61a1d2c9bb3e847a0e7275bf56ad3a9f41e2c85063c1d9c4c9d5e"), + Linux(:i686, libc=:glibc, compiler_abi=CompilerABI(:gcc7)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.i686-linux-gnu-libgfortran4.tar.gz", "aafe4c28b74eb3fe57e861a814bec3bf7d5d0d1ec252f558a34fd95ea3fedac8"), + Linux(:i686, libc=:glibc, compiler_abi=CompilerABI(:gcc8)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.i686-linux-gnu-libgfortran5.tar.gz", "55abe3b785c179e86430616ad6309c0bde47d32517f468f064c5c69a1b506e74"), + Linux(:i686, libc=:musl, compiler_abi=CompilerABI(:gcc4)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.i686-linux-musl-libgfortran3.tar.gz", "2846df4b60cbabfc86b990c87bec8d7e58431c4ad1b250036993a899fdb29172"), + Linux(:i686, libc=:musl, compiler_abi=CompilerABI(:gcc7)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.i686-linux-musl-libgfortran4.tar.gz", "73ba40c10b825b0a5abc4fd6bd1edd9d270ff4dd37c652a6380e38da5aeab864"), + Linux(:i686, libc=:musl, compiler_abi=CompilerABI(:gcc8)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.i686-linux-musl-libgfortran5.tar.gz", "80f8df63b1137a061b30a11bc2b0a985fbde56c665601bb30ff7762e3fbace72"), + Windows(:i686, compiler_abi=CompilerABI(:gcc4)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.i686-w64-mingw32-libgfortran3.tar.gz", "e53493d881c2a36d697e6abbeaeec8181488868e479bf06ea7db959d9a016763"), + Windows(:i686, compiler_abi=CompilerABI(:gcc7)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.i686-w64-mingw32-libgfortran4.tar.gz", "58c25e695e7dace12db66d19575914922183a8083c353b691e16b1bf86ab9a3a"), + Windows(:i686, compiler_abi=CompilerABI(:gcc8)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.i686-w64-mingw32-libgfortran5.tar.gz", "c9bc14ed49945c57353fffa7d7e374fbb146218bc0345d43bbbf8182f142ca77"), + Linux(:powerpc64le, libc=:glibc, compiler_abi=CompilerABI(:gcc4)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.powerpc64le-linux-gnu-libgfortran3.tar.gz", "c2a29d7f514acca1f9a8f0b723098d1340f3002ab689010546afcb0f9fa5d315"), + Linux(:powerpc64le, libc=:glibc, compiler_abi=CompilerABI(:gcc7)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.powerpc64le-linux-gnu-libgfortran4.tar.gz", "facbe1ae766e774c9ca2782dcb5dc6544b1c025ec1cc091bae15b3f57e6b5513"), + Linux(:powerpc64le, libc=:glibc, compiler_abi=CompilerABI(:gcc8)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.powerpc64le-linux-gnu-libgfortran5.tar.gz", "c11ab7865a3812446c2f1b32c78d89e3af2ddd31c9c32b472706e8f20368d6ed"), + MacOS(:x86_64, compiler_abi=CompilerABI(:gcc4)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-apple-darwin14-libgfortran3.tar.gz", "2739fe9184b065bf32cd1246ee12c1fd6507a9932a921dbf1bf268a3819164a0"), + MacOS(:x86_64, compiler_abi=CompilerABI(:gcc7)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-apple-darwin14-libgfortran4.tar.gz", "cb2825f0eae2cf4e5b6bc7075f3ee70afb8a31711fd5220bfd85827b87625a43"), + MacOS(:x86_64, compiler_abi=CompilerABI(:gcc8)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-apple-darwin14-libgfortran5.tar.gz", "e308cbb8e0b2b50635f98cf700b24743a2eb9d5c7726a99375ef31e096371642"), + Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc4)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-linux-gnu-libgfortran3.tar.gz", "9d0223f3562e0b609595904ecab0fd55650f068da367353a38146394d8329f69"), + Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc7)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-linux-gnu-libgfortran4.tar.gz", "adcc8519411cf0518c472d3ce47d8ac93492934a05c0276afe76eda6d91c4f4d"), + Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc8)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-linux-gnu-libgfortran5.tar.gz", "23771ec6d2fa014db480b5cfe8e1b6f34b2d29e8bbea8cdce1edd5f1e15cb6e0"), + Linux(:x86_64, libc=:musl, compiler_abi=CompilerABI(:gcc4)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-linux-musl-libgfortran3.tar.gz", "a04abda3002d81567e415d17b6d72c010ef6e202d47e6d8bac32c034321ddd48"), + Linux(:x86_64, libc=:musl, compiler_abi=CompilerABI(:gcc7)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-linux-musl-libgfortran4.tar.gz", "b6911e4ece0432d74c24d47d12000179fb00912e587ddae08e0ab1b7eda4bcf5"), + Linux(:x86_64, libc=:musl, compiler_abi=CompilerABI(:gcc8)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-linux-musl-libgfortran5.tar.gz", "269279af71f2b64c30162cfb0d2168d518fa913aade7564fa28c8928497b3e64"), + FreeBSD(:x86_64, compiler_abi=CompilerABI(:gcc4)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-unknown-freebsd11.1-libgfortran3.tar.gz", "aeda35832c30df2d24f06cd061b21f573b1167c76ff57f3f20f1b5dfbe249adc"), + FreeBSD(:x86_64, compiler_abi=CompilerABI(:gcc7)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-unknown-freebsd11.1-libgfortran4.tar.gz", "3476688c80d8032685c57ced39a810447fc3da1b3f3275fe3af37509ccc1252e"), + FreeBSD(:x86_64, compiler_abi=CompilerABI(:gcc8)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-unknown-freebsd11.1-libgfortran5.tar.gz", "19a779b6e539b0050432684d952342b18c28587b0c27a399cb0a00da2773c381"), + Windows(:x86_64, compiler_abi=CompilerABI(:gcc4)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-w64-mingw32-libgfortran3.tar.gz", "bec6c38ec12b26b1fd3c99944af81e463a29daf52152b53f49ca15fbf633b528"), + Windows(:x86_64, compiler_abi=CompilerABI(:gcc7)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-w64-mingw32-libgfortran4.tar.gz", "aec25acb618447247e3ad5ee9aec88725cd26d7abb9b6c29ac45e7aea601331e"), + Windows(:x86_64, compiler_abi=CompilerABI(:gcc8)) => ("$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-w64-mingw32-libgfortran5.tar.gz", "69957fdd4eb5d6cfd1073c3b63b63a3ff3e2db909b4f4834b102d8a96944f66c"), +) + +# Install unsatisfied or updated dependencies: +unsatisfied = any(!satisfied(p; verbose=verbose) for p in products) +dl_info = choose_download(download_info, platform_key_abi()) +if dl_info === nothing && unsatisfied + # If we don't have a compatible .tar.gz to download, complain. + # Alternatively, you could attempt to install from a separate provider, + # build from source or something even more ambitious here. + error("Your platform (\"$(Sys.MACHINE)\", parsed as \"$(triplet(platform_key_abi()))\") is not supported by this package!") +end + +# If we have a download, and we are unsatisfied (or the version we're +# trying to install is not itself installed) then load it up! +if unsatisfied || !isinstalled(dl_info...; prefix=prefix) + # Download and install binaries + install(dl_info...; prefix=prefix, force=true, verbose=verbose) +end + +# Write out a deps.jl file that will contain mappings for our products +write_deps_file(joinpath(@__DIR__, "deps.jl"), products, verbose=verbose) diff --git a/deps/build_FLINT.v0.0.2.jl b/deps/build_FLINT.v0.0.2.jl deleted file mode 100644 index 10033bbc..00000000 --- a/deps/build_FLINT.v0.0.2.jl +++ /dev/null @@ -1,48 +0,0 @@ -using BinaryProvider # requires BinaryProvider 0.3.0 or later - -# Parse some basic command-line arguments -const verbose = "--verbose" in ARGS -const prefix = Prefix(get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr"))) -products = [ - LibraryProduct(prefix, ["libflint"], :libflint), -] - -# Download binaries from hosted location -bin_prefix = "https://github.com/JuliaBinaryWrappers/FLINT_jll.jl/releases/download/FLINT-v0.0.2+0" - -# Listing of files generated by BinaryBuilder: -download_info = Dict( - Linux(:aarch64, libc=:glibc) => ("$bin_prefix/FLINT.v0.0.2.aarch64-linux-gnu.tar.gz", "fc033381212b0003e92a12e6fb767a61b252ecde69c9ae7f4504bb1993a33ad6"), - Linux(:aarch64, libc=:musl) => ("$bin_prefix/FLINT.v0.0.2.aarch64-linux-musl.tar.gz", "823b8217daffea6f59c2e91e7b422ec0bc45fe5db82fbe92c0f112f363a08d27"), - Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/FLINT.v0.0.2.armv7l-linux-gnueabihf.tar.gz", "aa17f15edadb72b30c26a36290e4e23fb142a69d6ab9978ed6115b1671e735ce"), - Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/FLINT.v0.0.2.armv7l-linux-musleabihf.tar.gz", "02157189f548864fb24fee348ab775f5e5ac1bc8a144a7e5ed2b3dd2a1293fab"), - Linux(:i686, libc=:glibc) => ("$bin_prefix/FLINT.v0.0.2.i686-linux-gnu.tar.gz", "09e7104c54e27f71d0384562267682b9c23382535abcbfa8773c8d8a607b5a20"), - Linux(:i686, libc=:musl) => ("$bin_prefix/FLINT.v0.0.2.i686-linux-musl.tar.gz", "82d1acb1fd5e363f2567cbde793086c6b0040dafa7cfbf0444339dfe9f98b743"), - Windows(:i686) => ("$bin_prefix/FLINT.v0.0.2.i686-w64-mingw32.tar.gz", "5e68cfeac5f5cfbf4f6ed0bad185274135d3751fa74a52bcb19e3d3ed4a6733d"), - Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/FLINT.v0.0.2.powerpc64le-linux-gnu.tar.gz", "424f200d1f821ee40bc67e0728ca71378490c94756849e5e08dd599a47ef9a4e"), - MacOS(:x86_64) => ("$bin_prefix/FLINT.v0.0.2.x86_64-apple-darwin14.tar.gz", "47fa6fe4f46f084f585c7665838acb66dddebf812342911a70bec07116162e84"), - Linux(:x86_64, libc=:glibc) => ("$bin_prefix/FLINT.v0.0.2.x86_64-linux-gnu.tar.gz", "f065650c4eaae77d7234232e279f91cfc892b1d44588792178154ee20164f95c"), - Linux(:x86_64, libc=:musl) => ("$bin_prefix/FLINT.v0.0.2.x86_64-linux-musl.tar.gz", "4f212be5c9ffc38b50aaa69a4c63df505bcdc02099c31494fabd64c337bf52ba"), - FreeBSD(:x86_64) => ("$bin_prefix/FLINT.v0.0.2.x86_64-unknown-freebsd11.1.tar.gz", "4a679118435961a358cfbbf68eb4ea781694d53a493929b78309690b2341a86d"), - Windows(:x86_64) => ("$bin_prefix/FLINT.v0.0.2.x86_64-w64-mingw32.tar.gz", "94900de41b267a2f0d117fa4cdbbfc73c9c215ed94dcf746a9e736664be9a644"), -) - -# Install unsatisfied or updated dependencies: -unsatisfied = any(!satisfied(p; verbose=verbose) for p in products) -dl_info = choose_download(download_info, platform_key_abi()) -if dl_info === nothing && unsatisfied - # If we don't have a compatible .tar.gz to download, complain. - # Alternatively, you could attempt to install from a separate provider, - # build from source or something even more ambitious here. - error("Your platform (\"$(Sys.MACHINE)\", parsed as \"$(triplet(platform_key_abi()))\") is not supported by this package!") -end - -# If we have a download, and we are unsatisfied (or the version we're -# trying to install is not itself installed) then load it up! -if unsatisfied || !isinstalled(dl_info...; prefix=prefix) - # Download and install binaries - install(dl_info...; prefix=prefix, force=true, verbose=verbose) -end - -# Write out a deps.jl file that will contain mappings for our products -write_deps_file(joinpath(@__DIR__, "deps.jl"), products, verbose=verbose) diff --git a/deps/build_FLINT.v2.6.0.jl b/deps/build_FLINT.v2.6.0.jl new file mode 100644 index 00000000..95d772ac --- /dev/null +++ b/deps/build_FLINT.v2.6.0.jl @@ -0,0 +1,48 @@ +using BinaryProvider # requires BinaryProvider 0.3.0 or later + +# Parse some basic command-line arguments +const verbose = "--verbose" in ARGS +const prefix = Prefix(get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr"))) +products = [ + LibraryProduct(prefix, ["libflint"], :libflint), +] + +# Download binaries from hosted location +bin_prefix = "https://github.com/JuliaBinaryWrappers/FLINT_jll.jl/releases/download/FLINT-v2.6.0+0" + +# Listing of files generated by BinaryBuilder: +download_info = Dict( + Linux(:aarch64, libc=:glibc) => ("$bin_prefix/FLINT.v2.6.0.aarch64-linux-gnu.tar.gz", "5b14f4c383488c116c2a1755d90bba2c8d73b40efc51e0f0594e5e28dad6a0ee"), + Linux(:aarch64, libc=:musl) => ("$bin_prefix/FLINT.v2.6.0.aarch64-linux-musl.tar.gz", "ebeba3bf7a9e6007cdb2cc0d5f8f43e5dbd0ba51e0a5b8ae550e1c7364a280c8"), + Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/FLINT.v2.6.0.armv7l-linux-gnueabihf.tar.gz", "d506142b9a4744e6e8ea8279c6097d7d8ccceb99a830d82d84f140d7fe4dc574"), + Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/FLINT.v2.6.0.armv7l-linux-musleabihf.tar.gz", "07308f6bf6db8d3c7e7be043217985e751441df57baf14702ae00ab074499fc0"), + Linux(:i686, libc=:glibc) => ("$bin_prefix/FLINT.v2.6.0.i686-linux-gnu.tar.gz", "d92b523d17e68890f512f90709918dec6a42ff048f511eefefd726283156b8b9"), + Linux(:i686, libc=:musl) => ("$bin_prefix/FLINT.v2.6.0.i686-linux-musl.tar.gz", "024ed3f104a92b34629f36d9bb9ca10c8e75e2a129df3974ea6ef14c94b3c438"), + Windows(:i686) => ("$bin_prefix/FLINT.v2.6.0.i686-w64-mingw32.tar.gz", "21b57a6458e3398cb132d1989819387132553235d95567942eda95a395a85c6a"), + Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/FLINT.v2.6.0.powerpc64le-linux-gnu.tar.gz", "b6d37bc7ba18a171f7b56a8c5c2eb857c32cf76827cf540446e8f086ec9392cb"), + MacOS(:x86_64) => ("$bin_prefix/FLINT.v2.6.0.x86_64-apple-darwin14.tar.gz", "0e39a384e45f82bed87f3b472e768a17ade4a5773770c3359b38854e974542d6"), + Linux(:x86_64, libc=:glibc) => ("$bin_prefix/FLINT.v2.6.0.x86_64-linux-gnu.tar.gz", "8137bd0cf4b0fd3808b2d4bc574c005a40275a272ce4e64fc5ee1a1855ae2fae"), + Linux(:x86_64, libc=:musl) => ("$bin_prefix/FLINT.v2.6.0.x86_64-linux-musl.tar.gz", "dd63d941088ef5232207f6cfd2cf02f1003b969ec78c5b4e85ee32578087d273"), + FreeBSD(:x86_64) => ("$bin_prefix/FLINT.v2.6.0.x86_64-unknown-freebsd11.1.tar.gz", "19820b1fed197923d9d152df213fc76cca8b38f73a999391653c97d8d4327ea1"), + Windows(:x86_64) => ("$bin_prefix/FLINT.v2.6.0.x86_64-w64-mingw32.tar.gz", "9ccf3eb9b8ee8d2cfcd501e9e44273ee25a6cd0e903daf3fc2861eb9ab831a12"), +) + +# Install unsatisfied or updated dependencies: +unsatisfied = any(!satisfied(p; verbose=verbose) for p in products) +dl_info = choose_download(download_info, platform_key_abi()) +if dl_info === nothing && unsatisfied + # If we don't have a compatible .tar.gz to download, complain. + # Alternatively, you could attempt to install from a separate provider, + # build from source or something even more ambitious here. + error("Your platform (\"$(Sys.MACHINE)\", parsed as \"$(triplet(platform_key_abi()))\") is not supported by this package!") +end + +# If we have a download, and we are unsatisfied (or the version we're +# trying to install is not itself installed) then load it up! +if unsatisfied || !isinstalled(dl_info...; prefix=prefix) + # Download and install binaries + install(dl_info...; prefix=prefix, force=true, verbose=verbose) +end + +# Write out a deps.jl file that will contain mappings for our products +write_deps_file(joinpath(@__DIR__, "deps.jl"), products, verbose=verbose) diff --git a/deps/build_Perl.v5.30.3.jl b/deps/build_Perl.v5.30.3.jl index 586e7f75..b3a3f739 100644 --- a/deps/build_Perl.v5.30.3.jl +++ b/deps/build_Perl.v5.30.3.jl @@ -9,15 +9,15 @@ products = [ ] # Download binaries from hosted location -bin_prefix = "https://github.com/benlorenz/perl_jll.jl/releases/download/Perl-v5.30.3+0" +bin_prefix = "https://github.com/JuliaBinaryWrappers/Perl_jll.jl/releases/download/Perl-v5.30.3+0" # Listing of files generated by BinaryBuilder: download_info = Dict( - Linux(:i686, libc=:glibc) => ("$bin_prefix/Perl.v5.30.3.i686-linux-gnu.tar.gz", "ade7e9d0c67dfb9fb6123d19847ea264d63455a77ad79883c75d0dc08e2c20eb"), - Linux(:i686, libc=:musl) => ("$bin_prefix/Perl.v5.30.3.i686-linux-musl.tar.gz", "c86e671ff5869cb3913a86d7aaaf121c51d4569491006041df61af03577a7278"), - MacOS(:x86_64) => ("$bin_prefix/Perl.v5.30.3.x86_64-apple-darwin14.tar.gz", "1e066b76ef3053009c34d9e8c3743dac4f7830c28722bc999b294a265fba63c6"), - Linux(:x86_64, libc=:glibc) => ("$bin_prefix/Perl.v5.30.3.x86_64-linux-gnu.tar.gz", "3de938cfa5b4d25b9fa764517f59577eb6691b8380abaf39626d8445fc5846b0"), - Linux(:x86_64, libc=:musl) => ("$bin_prefix/Perl.v5.30.3.x86_64-linux-musl.tar.gz", "627dc5e836531945f4fca0f7e7312da14ad458b9ed11b692b02d6c100c80e6ed"), + Linux(:i686, libc=:glibc) => ("$bin_prefix/Perl.v5.30.3.i686-linux-gnu.tar.gz", "9f43143efaf0583bae902f579d64d25e3f5157a3ba2bf153540effba5abaabb4"), + Linux(:i686, libc=:musl) => ("$bin_prefix/Perl.v5.30.3.i686-linux-musl.tar.gz", "3884f2c7a373e169c94a6c604f484f54d71f97091826e7861b9d07dee99dd50f"), + MacOS(:x86_64) => ("$bin_prefix/Perl.v5.30.3.x86_64-apple-darwin14.tar.gz", "123a6bb9dc7bc8889184dfa2342f78eb61ffad188c9f997469a1ca2cab2025c0"), + Linux(:x86_64, libc=:glibc) => ("$bin_prefix/Perl.v5.30.3.x86_64-linux-gnu.tar.gz", "0413f7ca7e11fb8bfb6c3d68d2afb8b43d1bdf3b174187da794af93a1da1aab5"), + Linux(:x86_64, libc=:musl) => ("$bin_prefix/Perl.v5.30.3.x86_64-linux-musl.tar.gz", "546a3bc32f34c76ed8211c3bb0659d0dc0410a936fbc515d876f48ef6964eda5"), ) # Install unsatisfied or updated dependencies: diff --git a/deps/build_libpolymake_julia.v0.0.2.jl b/deps/build_libpolymake_julia.v0.0.2.jl new file mode 100644 index 00000000..255b79f3 --- /dev/null +++ b/deps/build_libpolymake_julia.v0.0.2.jl @@ -0,0 +1,41 @@ +using BinaryProvider # requires BinaryProvider 0.3.0 or later +import Libdl.dlext + +# Parse some basic command-line arguments +const verbose = "--verbose" in ARGS +const prefix = Prefix(get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr"))) +products = [ + ExecutableProduct(prefix, "polymake_run_script", :polymake_run_script), + FileProduct(prefix, joinpath("lib","libpolymake_julia.$(dlext)"), :libpolymake_julia), + FileProduct(prefix, joinpath("share","libpolymake_julia","type_translator.jl"), :type_translator) +] + +# Download binaries from hosted location +bin_prefix = "https://github.com/benlorenz/libpolymake_julia_jll.jl/releases/download/libpolymake_julia-v0.0.2+0" + +# Listing of files generated by BinaryBuilder: +download_info = Dict( + MacOS(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/libpolymake_julia.v0.0.2.x86_64-apple-darwin14-cxx03.tar.gz", "caefa25154bcb9c76368736ec59933a2ad936aaf6e413a710bb4c7225cdd096b"), + MacOS(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/libpolymake_julia.v0.0.2.x86_64-apple-darwin14-cxx11.tar.gz", "caefa25154bcb9c76368736ec59933a2ad936aaf6e413a710bb4c7225cdd096b"), + Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/libpolymake_julia.v0.0.2.x86_64-linux-gnu-cxx11.tar.gz", "650d5947c7573f28d94dc45716b76327e49e1e033337087dc31ef2773a0cd8b4"), +) + +# Install unsatisfied or updated dependencies: +unsatisfied = any(!satisfied(p; verbose=verbose) for p in products) +dl_info = choose_download(download_info, platform_key_abi()) +if dl_info === nothing && unsatisfied + # If we don't have a compatible .tar.gz to download, complain. + # Alternatively, you could attempt to install from a separate provider, + # build from source or something even more ambitious here. + error("Your platform (\"$(Sys.MACHINE)\", parsed as \"$(triplet(platform_key_abi()))\") is not supported by this package!") +end + +# If we have a download, and we are unsatisfied (or the version we're +# trying to install is not itself installed) then load it up! +if unsatisfied || !isinstalled(dl_info...; prefix=prefix) + # Download and install binaries + install(dl_info...; prefix=prefix, force=true, verbose=verbose) +end + +# Write out a deps.jl file that will contain mappings for our products +write_deps_file(joinpath(@__DIR__, "deps.jl"), products, verbose=verbose) diff --git a/deps/build_nauty.v2.6.12.jl b/deps/build_nauty.v2.6.12.jl new file mode 100644 index 00000000..058710e8 --- /dev/null +++ b/deps/build_nauty.v2.6.12.jl @@ -0,0 +1,95 @@ +using BinaryProvider # requires BinaryProvider 0.3.0 or later + +# Parse some basic command-line arguments +const verbose = "--verbose" in ARGS +const prefix = Prefix(get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr"))) +products = [ + LibraryProduct(prefix, ["libnauty"], :libnauty), + LibraryProduct(prefix, ["libnautyA1"], :libnautyA1), + LibraryProduct(prefix, ["libnautyL0"], :libnautyL0), + LibraryProduct(prefix, ["libnautyL1"], :libnautyL1), + LibraryProduct(prefix, ["libnautyS0"], :libnautyS0), + LibraryProduct(prefix, ["libnautyS1"], :libnautyS1), + LibraryProduct(prefix, ["libnautyW0"], :libnautyW0), + LibraryProduct(prefix, ["libnautyW1"], :libnautyW1), + ExecutableProduct(prefix, "NRswitchg", :NRswitchg), + ExecutableProduct(prefix, "addedgeg", :addedgeg), + ExecutableProduct(prefix, "amtog", :amtog), + ExecutableProduct(prefix, "biplabg", :biplabg), + ExecutableProduct(prefix, "blisstog", :blisstog), + ExecutableProduct(prefix, "catg", :catg), + ExecutableProduct(prefix, "checks6", :checks6), + ExecutableProduct(prefix, "complg", :complg), + ExecutableProduct(prefix, "converseg", :converseg), + ExecutableProduct(prefix, "copyg", :copyg), + ExecutableProduct(prefix, "countg", :countg), + ExecutableProduct(prefix, "cubhamg", :cubhamg), + ExecutableProduct(prefix, "deledgeg", :deledgeg), + ExecutableProduct(prefix, "delptg", :delptg), + ExecutableProduct(prefix, "directg", :directg), + ExecutableProduct(prefix, "dreadnaut", :dreadnaut), + ExecutableProduct(prefix, "dretodot", :dretodot), + ExecutableProduct(prefix, "dretog", :dretog), + ExecutableProduct(prefix, "genbg", :genbg), + ExecutableProduct(prefix, "genbgL", :genbgL), + ExecutableProduct(prefix, "geng", :geng), + ExecutableProduct(prefix, "genquarticg", :genquarticg), + ExecutableProduct(prefix, "genrang", :genrang), + ExecutableProduct(prefix, "genspecialg", :genspecialg), + ExecutableProduct(prefix, "gentourng", :gentourng), + ExecutableProduct(prefix, "gentreeg", :gentreeg), + ExecutableProduct(prefix, "hamheuristic", :hamheuristic), + ExecutableProduct(prefix, "labelg", :labelg), + ExecutableProduct(prefix, "linegraphg", :linegraphg), + ExecutableProduct(prefix, "listg", :listg), + ExecutableProduct(prefix, "multig", :multig), + ExecutableProduct(prefix, "newedgeg", :newedgeg), + ExecutableProduct(prefix, "pickg", :pickg), + ExecutableProduct(prefix, "planarg", :planarg), + ExecutableProduct(prefix, "ranlabg", :ranlabg), + ExecutableProduct(prefix, "shortg", :shortg), + ExecutableProduct(prefix, "showg", :showg), + ExecutableProduct(prefix, "subdivideg", :subdivideg), + ExecutableProduct(prefix, "sumlines", :sumlines), + ExecutableProduct(prefix, "twohamg", :twohamg), + ExecutableProduct(prefix, "vcolg", :vcolg), + ExecutableProduct(prefix, "watercluster2", :watercluster2), +] + +# Download binaries from hosted location +bin_prefix = "https://github.com/JuliaBinaryWrappers/nauty_jll.jl/releases/download/nauty-v2.6.12+0" + +# Listing of files generated by BinaryBuilder: +download_info = Dict( + Linux(:aarch64, libc=:glibc) => ("$bin_prefix/nauty.v2.6.12.aarch64-linux-gnu.tar.gz", "650a9412d6c94fa79b737e24c10ec215d0366b33df5d84165f9b7ac6fb18f9e8"), + Linux(:aarch64, libc=:musl) => ("$bin_prefix/nauty.v2.6.12.aarch64-linux-musl.tar.gz", "dcdcc83713ff65266404573123e9fde7f9182cfc70bfa4e7a6ce0b1392793bd0"), + Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/nauty.v2.6.12.armv7l-linux-gnueabihf.tar.gz", "a4de2b994f9d71998c1acc7835f6cfdf2a34eedc4a3b4fc3901974918ec10961"), + Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/nauty.v2.6.12.armv7l-linux-musleabihf.tar.gz", "a7fafd55f31edf7f517f095ea1eb3dca272a080f345f1e9849b5d5735da3d8fa"), + Linux(:i686, libc=:glibc) => ("$bin_prefix/nauty.v2.6.12.i686-linux-gnu.tar.gz", "cedc51c75b6a2cb3baae4f07068116f26671db0b5699a21a210d35de73262c39"), + Linux(:i686, libc=:musl) => ("$bin_prefix/nauty.v2.6.12.i686-linux-musl.tar.gz", "8dd5d3ad6eb0c38a2feaebf43133cf49a66cc2cb609e8d186a1ed21621c92dc3"), + Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/nauty.v2.6.12.powerpc64le-linux-gnu.tar.gz", "c1324c66c141b9dbf31d99cec78dbafb4ea4e8bcf396d98e009f70e616410ab7"), + MacOS(:x86_64) => ("$bin_prefix/nauty.v2.6.12.x86_64-apple-darwin14.tar.gz", "4464b165292b04c8df69527456365907e7af474dfde9e312ffc750d09cb2c3d0"), + Linux(:x86_64, libc=:glibc) => ("$bin_prefix/nauty.v2.6.12.x86_64-linux-gnu.tar.gz", "c1aa848aad48754d324f0f660feed3c493efeff4fbd585f84b7aed3ef4f4f0d8"), + Linux(:x86_64, libc=:musl) => ("$bin_prefix/nauty.v2.6.12.x86_64-linux-musl.tar.gz", "7f1c1e5a162aedc4e91d456b8889f09ddeb5d613c8bbcea11602583fff75f1c9"), + FreeBSD(:x86_64) => ("$bin_prefix/nauty.v2.6.12.x86_64-unknown-freebsd11.1.tar.gz", "dbad1885eaebd0b364a9d499c1a2a48ed587459396be991ba5ffc76a0f1becf4"), +) + +# Install unsatisfied or updated dependencies: +unsatisfied = any(!satisfied(p; verbose=verbose) for p in products) +dl_info = choose_download(download_info, platform_key_abi()) +if dl_info === nothing && unsatisfied + # If we don't have a compatible .tar.gz to download, complain. + # Alternatively, you could attempt to install from a separate provider, + # build from source or something even more ambitious here. + error("Your platform (\"$(Sys.MACHINE)\", parsed as \"$(triplet(platform_key_abi()))\") is not supported by this package!") +end + +# If we have a download, and we are unsatisfied (or the version we're +# trying to install is not itself installed) then load it up! +if unsatisfied || !isinstalled(dl_info...; prefix=prefix) + # Download and install binaries + install(dl_info...; prefix=prefix, force=true, verbose=verbose) +end + +# Write out a deps.jl file that will contain mappings for our products +write_deps_file(joinpath(@__DIR__, "deps.jl"), products, verbose=verbose) diff --git a/deps/build_normaliz.v3.8.4.jl b/deps/build_normaliz.v3.8.4.jl deleted file mode 100644 index edd81895..00000000 --- a/deps/build_normaliz.v3.8.4.jl +++ /dev/null @@ -1,58 +0,0 @@ -using BinaryProvider # requires BinaryProvider 0.3.0 or later - -# Parse some basic command-line arguments -const verbose = "--verbose" in ARGS -const prefix = Prefix(get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr"))) -products = [ - LibraryProduct(prefix, ["libnormaliz"], :libnormaliz), - ExecutableProduct(prefix, "normaliz", :normaliz), -] - -# Download binaries from hosted location -bin_prefix = "https://github.com/JuliaBinaryWrappers/normaliz_jll.jl/releases/download/normaliz-v3.8.4+0" - -# Listing of files generated by BinaryBuilder: -download_info = Dict( - Linux(:aarch64, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.4.aarch64-linux-gnu-cxx03.tar.gz", "69777f897b1c8ffdd37755e172aae7b96f5c49cc02bcdf58b4921fa4f71bf945"), - Linux(:aarch64, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.4.aarch64-linux-gnu-cxx11.tar.gz", "cc7368a99632aecb0da332d60740b89fe9437ef53f69ed3cfb1c3a8b5abfb876"), - Linux(:aarch64, libc=:musl, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.4.aarch64-linux-musl-cxx03.tar.gz", "2e4de2f027171dea09dc6ef5042f152c711554e6ae2b3ae523822a8d726f21d7"), - Linux(:aarch64, libc=:musl, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.4.aarch64-linux-musl-cxx11.tar.gz", "ac34a8134d10fd50f3851dca9e931421195c51f681596f017c840a4ba79c45a0"), - Linux(:armv7l, libc=:glibc, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.4.armv7l-linux-gnueabihf-cxx03.tar.gz", "8e5fb3cd107145d4ac87a96597b27f645693ff095ffa1aeb357c2c402ba4fb3f"), - Linux(:armv7l, libc=:glibc, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.4.armv7l-linux-gnueabihf-cxx11.tar.gz", "ee635eb08a65a763e34e52196baf594ff6b97564cc37df49cd29e2f894ef0a0a"), - Linux(:armv7l, libc=:musl, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.4.armv7l-linux-musleabihf-cxx03.tar.gz", "5a5caf98434bdccc35b0c7ca10f0d4843bd583a055b85609ef664a679b4ea4c7"), - Linux(:armv7l, libc=:musl, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.4.armv7l-linux-musleabihf-cxx11.tar.gz", "835473fa1bbceceb492e5ed05e94c295bc9f0da8bfaaeae5c433dc1c8ceb1ee2"), - Linux(:i686, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.4.i686-linux-gnu-cxx03.tar.gz", "60fe9d1fd30e0ec203ee6042d651feb70bf793b393ce1f81323e1fcd164b367b"), - Linux(:i686, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.4.i686-linux-gnu-cxx11.tar.gz", "c302b0a2f97b4045cc2e34bb63c37debfe0f220cf3da63c2f226db764a751ddd"), - Linux(:i686, libc=:musl, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.4.i686-linux-musl-cxx03.tar.gz", "5ddac2fbe25263fca3b6cec9539d88f86c1fccd83ae3ee77b8b5e556ba2870c7"), - Linux(:i686, libc=:musl, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.4.i686-linux-musl-cxx11.tar.gz", "c34c332f29700908008a148392e87ec893d360682b0fdcc7df33fd39cd4bbda3"), - Linux(:powerpc64le, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.4.powerpc64le-linux-gnu-cxx03.tar.gz", "5493a8748a7387dd573fc49c9bf5319af46358edd326d6bbedf25543b53ef51b"), - Linux(:powerpc64le, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.4.powerpc64le-linux-gnu-cxx11.tar.gz", "cb416edbc15eee1f23e1b00fdb96e090a1f8caeab43602b5a5585edad5920900"), - MacOS(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.4.x86_64-apple-darwin14-cxx03.tar.gz", "b14b23f8b31124e5a7c08c86e440bc93506e6e805a2c4ceee6e243fc6ddf158c"), - MacOS(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.4.x86_64-apple-darwin14-cxx11.tar.gz", "045617ecc21e7634de2efd240265ec552b19acdc5bac6802258588e8cd077d1e"), - Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.4.x86_64-linux-gnu-cxx03.tar.gz", "32761c36df6ac09cb389120833a8afb06995f5cd9f8b58bad71176286d162612"), - Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.4.x86_64-linux-gnu-cxx11.tar.gz", "15ecf417d56a0e47f63f54808bea6e97b3c86fdd0b88519a645ee0579637535f"), - Linux(:x86_64, libc=:musl, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.4.x86_64-linux-musl-cxx03.tar.gz", "d0d601f14e97e90b455c9e6781377433de7c4098554ef82fafb4a9d07cc40aea"), - Linux(:x86_64, libc=:musl, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.4.x86_64-linux-musl-cxx11.tar.gz", "ff15250f1bff6be56b696fa42cd77fd672732dfef93646d48d703d1fcdc2c732"), - FreeBSD(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.4.x86_64-unknown-freebsd11.1-cxx03.tar.gz", "404209aedef5c5568c6623c0187fcc8335c48dc4563f3b4a4577b6f8e50aed33"), - FreeBSD(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.4.x86_64-unknown-freebsd11.1-cxx11.tar.gz", "9936433d7605cc4fbb6ac5b65b6343cb8bbd363899651e1fd99bb8e1939b795c"), -) - -# Install unsatisfied or updated dependencies: -unsatisfied = any(!satisfied(p; verbose=verbose) for p in products) -dl_info = choose_download(download_info, platform_key_abi()) -if dl_info === nothing && unsatisfied - # If we don't have a compatible .tar.gz to download, complain. - # Alternatively, you could attempt to install from a separate provider, - # build from source or something even more ambitious here. - error("Your platform (\"$(Sys.MACHINE)\", parsed as \"$(triplet(platform_key_abi()))\") is not supported by this package!") -end - -# If we have a download, and we are unsatisfied (or the version we're -# trying to install is not itself installed) then load it up! -if unsatisfied || !isinstalled(dl_info...; prefix=prefix) - # Download and install binaries - install(dl_info...; prefix=prefix, force=true, verbose=verbose) -end - -# Write out a deps.jl file that will contain mappings for our products -write_deps_file(joinpath(@__DIR__, "deps.jl"), products, verbose=verbose) diff --git a/deps/build_normaliz.v3.8.5.jl b/deps/build_normaliz.v3.8.5.jl new file mode 100644 index 00000000..7a29cba3 --- /dev/null +++ b/deps/build_normaliz.v3.8.5.jl @@ -0,0 +1,58 @@ +using BinaryProvider # requires BinaryProvider 0.3.0 or later + +# Parse some basic command-line arguments +const verbose = "--verbose" in ARGS +const prefix = Prefix(get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr"))) +products = [ + LibraryProduct(prefix, ["libnormaliz"], :libnormaliz), + ExecutableProduct(prefix, "normaliz", :normaliz), +] + +# Download binaries from hosted location +bin_prefix = "https://github.com/JuliaBinaryWrappers/normaliz_jll.jl/releases/download/normaliz-v3.8.5+0" + +# Listing of files generated by BinaryBuilder: +download_info = Dict( + Linux(:aarch64, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.5.aarch64-linux-gnu-cxx03.tar.gz", "a99a0dcbf22a22538f710020fd2556b3cdf50375cccc3e0cabfd8cce22bcf311"), + Linux(:aarch64, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.5.aarch64-linux-gnu-cxx11.tar.gz", "af52d800311da24e313ee45370109efc6e47fcbf46da1914c11b05c6c26c5703"), + Linux(:aarch64, libc=:musl, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.5.aarch64-linux-musl-cxx03.tar.gz", "8c83ee40060b362f74965821dc5c92feedfbd7db93df3237aab88bd67396b0e9"), + Linux(:aarch64, libc=:musl, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.5.aarch64-linux-musl-cxx11.tar.gz", "96d92954fd5c31a3efdf6a970b49dc060b6a43e31550b5f9b4295c01ad22dc37"), + Linux(:armv7l, libc=:glibc, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.5.armv7l-linux-gnueabihf-cxx03.tar.gz", "4828b0c63b97c69f6a28c8885735d082f90f9dd950a4446ff81df431478fc7aa"), + Linux(:armv7l, libc=:glibc, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.5.armv7l-linux-gnueabihf-cxx11.tar.gz", "eb4c72eeccf957ebe7b700aa94c1ad4b849e9c1b66c52b601cbdc6e90eba274a"), + Linux(:armv7l, libc=:musl, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.5.armv7l-linux-musleabihf-cxx03.tar.gz", "308701cfdeb94ec0f5c8a8724c52916b2c976337df71671e565c2a060d707cc2"), + Linux(:armv7l, libc=:musl, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.5.armv7l-linux-musleabihf-cxx11.tar.gz", "4a4c6dac7d638345f46b5ffb21239702534ac714cf0570894cd89fd760e0ad78"), + Linux(:i686, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.5.i686-linux-gnu-cxx03.tar.gz", "e4ae21c8c57f826daab72bf49397b6e7e0c845d1c4ca8aec8cae0b23646bc2a1"), + Linux(:i686, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.5.i686-linux-gnu-cxx11.tar.gz", "f513c5c8fe3ae07c3cc75278c814fd2b3301a9891c61c0ba9b068c03576d408e"), + Linux(:i686, libc=:musl, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.5.i686-linux-musl-cxx03.tar.gz", "3cca91840cf0edb01e7eb66949d32db0d19fbe3c1b6ccb9a1b4612e8b2c62593"), + Linux(:i686, libc=:musl, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.5.i686-linux-musl-cxx11.tar.gz", "5b178bcda4c3407533eec1d215a62524aca36ad673187b6b645d779ac2bf34d9"), + Linux(:powerpc64le, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.5.powerpc64le-linux-gnu-cxx03.tar.gz", "2b549e74754a6309d72f43821b80c9bec272de863367e8a48faaff3ffe426e1e"), + Linux(:powerpc64le, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.5.powerpc64le-linux-gnu-cxx11.tar.gz", "29148d68efea35ff086f53aad429d6742df7a4f7200d0364dbb1f62d7c056249"), + MacOS(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.5.x86_64-apple-darwin14-cxx03.tar.gz", "b298f52c228615802ed15f59342b11d2386402e7f569ca72a7bed22278b73163"), + MacOS(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.5.x86_64-apple-darwin14-cxx11.tar.gz", "0c278f97055a9d611c63ab4a568fd361dd2ad538cc4c5f2025278b458e508ce4"), + Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.5.x86_64-linux-gnu-cxx03.tar.gz", "d8e30ce7a5010e96ba6ad58b5a21d983579ec24f683a3ae7daf11d92c118f31d"), + Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.5.x86_64-linux-gnu-cxx11.tar.gz", "f503c66eabdb588bb9e8cb945ec18b65a389d6a58e1e68d4651d307eb3ef1147"), + Linux(:x86_64, libc=:musl, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.5.x86_64-linux-musl-cxx03.tar.gz", "a1f46beebc076d4a08c9a07512bac66fa6df0b6b23146614005b5b05921698e3"), + Linux(:x86_64, libc=:musl, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.5.x86_64-linux-musl-cxx11.tar.gz", "c3d290f32d2e40e1a7bf83ecafa3937f6d1fc4554d64c1f147538457267cbb48"), + FreeBSD(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/normaliz.v3.8.5.x86_64-unknown-freebsd11.1-cxx03.tar.gz", "146a726e933c7b933cb54530a7e45f8807c1d93859c70aa72c9c4b009b2adce3"), + FreeBSD(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/normaliz.v3.8.5.x86_64-unknown-freebsd11.1-cxx11.tar.gz", "4bf3736af7f7cdb7f1d49765e728795b4b9fba307ad71648c9dc2b4619173fc7"), +) + +# Install unsatisfied or updated dependencies: +unsatisfied = any(!satisfied(p; verbose=verbose) for p in products) +dl_info = choose_download(download_info, platform_key_abi()) +if dl_info === nothing && unsatisfied + # If we don't have a compatible .tar.gz to download, complain. + # Alternatively, you could attempt to install from a separate provider, + # build from source or something even more ambitious here. + error("Your platform (\"$(Sys.MACHINE)\", parsed as \"$(triplet(platform_key_abi()))\") is not supported by this package!") +end + +# If we have a download, and we are unsatisfied (or the version we're +# trying to install is not itself installed) then load it up! +if unsatisfied || !isinstalled(dl_info...; prefix=prefix) + # Download and install binaries + install(dl_info...; prefix=prefix, force=true, verbose=verbose) +end + +# Write out a deps.jl file that will contain mappings for our products +write_deps_file(joinpath(@__DIR__, "deps.jl"), products, verbose=verbose) diff --git a/deps/build_polymake.v4.1.1.jl b/deps/build_polymake.v4.1.1.jl new file mode 100644 index 00000000..c10e5217 --- /dev/null +++ b/deps/build_polymake.v4.1.1.jl @@ -0,0 +1,44 @@ +using BinaryProvider # requires BinaryProvider 0.3.0 or later + +# Parse some basic command-line arguments +const verbose = "--verbose" in ARGS +const prefix = Prefix(get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr"))) + +products = Product[ + LibraryProduct(prefix, "libpolymake", :libpolymake) + ExecutableProduct(prefix,"polymake", :polymake) + ExecutableProduct(prefix,"polymake-config", Symbol("polymake_config")) +] + +# Download binaries from hosted location +bin_prefix = "https://github.com/benlorenz/polymake_jll.jl/releases/download/polymake-v4.1.1+0" + +# Listing of files generated by BinaryBuilder: +download_info = Dict( + Linux(:i686, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/polymake.v4.1.1.i686-linux-gnu-cxx03.tar.gz", "ca75f900f5ad788070667198cb70aca76de94c5a4083435b1fd97b1ab5937ba6"), + Linux(:i686, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/polymake.v4.1.1.i686-linux-gnu-cxx11.tar.gz", "323c791c71fa5c61778c6568aa456bd7a37fbc616b7f3e47b1422ca5197e5cc0"), + MacOS(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/polymake.v4.1.1.x86_64-apple-darwin14-cxx03.tar.gz", "1580f847dd0ba971951074dd31884c235d62df092ed70084cc080c1b202a3826"), + MacOS(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/polymake.v4.1.1.x86_64-apple-darwin14-cxx11.tar.gz", "09d45b0b79d84ae2358ea3cb5e427a0f4c21142ebcadcf936e85e5c8994946c3"), + Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/polymake.v4.1.1.x86_64-linux-gnu-cxx03.tar.gz", "e84dc07ec07be7cbf14655842bbceb51feeb829135f4091a8bdcc2bec5aef72c"), + Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/polymake.v4.1.1.x86_64-linux-gnu-cxx11.tar.gz", "ad8992671cb6b333241bd9737d0ffb2df9085033c2668e34cabbe95b11279d6e"), +) + +# Install unsatisfied or updated dependencies: +unsatisfied = any(!satisfied(p; verbose=verbose) for p in products) +dl_info = choose_download(download_info, platform_key_abi()) +if dl_info === nothing && unsatisfied + # If we don't have a compatible .tar.gz to download, complain. + # Alternatively, you could attempt to install from a separate provider, + # build from source or something even more ambitious here. + error("Your platform (\"$(Sys.MACHINE)\", parsed as \"$(triplet(platform_key_abi()))\") is not supported by this package!") +end + +# If we have a download, and we are unsatisfied (or the version we're +# trying to install is not itself installed) then load it up! +if unsatisfied || !isinstalled(dl_info...; prefix=prefix) + # Download and install binaries + install(dl_info...; prefix=prefix, force=true, verbose=verbose) +end + +# Write out a deps.jl file that will contain mappings for our products +write_deps_file(joinpath(@__DIR__, "deps.jl"), products, verbose=verbose) diff --git a/deps/rules/apptojson.pl b/deps/rules/apptojson.pl index a561480c..f8e9d43b 100644 --- a/deps/rules/apptojson.pl +++ b/deps/rules/apptojson.pl @@ -4,7 +4,6 @@ die "usage: $0 " unless @ARGV >= 1; - my $jsonpath = shift @ARGV; my @apps = @ARGV > 0 ? @ARGV : @User::start_applications; @@ -91,7 +90,6 @@ ($$$) } else { # this is necessary due to a bug in polymake $fun{doc} = ""; - print STDERR "WARNING: skipping text docs for ",$help->name,"\n"; } return \%fun; diff --git a/deps/src/CMakeLists.txt b/deps/src/CMakeLists.txt deleted file mode 100644 index 34694272..00000000 --- a/deps/src/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ -project(Polymake) - -cmake_minimum_required(VERSION 3.01) - -find_package(JlCxx REQUIRED) - -include_directories(${JlCxx_DIR}/../../../include/) -set(MY_LIST ${polymake_includes}) -separate_arguments(MY_LIST) -include_directories(${MY_LIST}) - -SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 ${polymake_cflags}" ) -SET( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${polymake_ldflags}" ) - -# avoid gcc 9 internal compiler error, -# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90998 -if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.0 - AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.3) - SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-conversion" ) -endif() - -if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) - message( FATAL_ERROR "gcc version must be at least 7 to build the polymake CxxWrap interface." ) -endif() - -file(GLOB polymake_SRC "*.cpp") -add_library(polymake SHARED ${polymake_SRC}) -target_link_libraries(polymake JlCxx::cxxwrap_julia "${polymake_libs}") - -install(TARGETS - polymake -ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/deps/src/generated/.intentionally_left_empty b/deps/src/generated/.intentionally_left_empty deleted file mode 100644 index e69de29b..00000000 diff --git a/deps/src/polymake.cpp b/deps/src/polymake.cpp deleted file mode 100644 index 06ad39a9..00000000 --- a/deps/src/polymake.cpp +++ /dev/null @@ -1,90 +0,0 @@ -#include "polymake_includes.h" - -#include "polymake_tools.h" - -#include "polymake_functions.h" - -#include "polymake_caller.h" - -#include "polymake_type_modules.h" - -#include "generated/type_declarations.h" - -Polymake_Data data{nullptr, nullptr}; - -JLCXX_MODULE define_module_polymake(jlcxx::Module& polymake) -{ - polymake_module_add_bigobject(polymake); - - polymake_module_add_integer(polymake); - - polymake_module_add_rational(polymake); - - polymake_module_add_matrix(polymake); - - polymake_module_add_pairs(polymake); - - polymake_module_add_lists(polymake); - - polymake_module_add_vector(polymake); - - polymake_module_add_set(polymake); - - polymake_module_add_sparsevector(polymake);; - - auto array_type = polymake_module_add_array(polymake); - - polymake_module_add_incidencematrix(polymake); - - polymake_module_add_sparsematrix(polymake); - - polymake_module_add_tropicalnumber(polymake); - - polymake_module_add_polynomial(polymake); - - polymake_module_add_direct_calls(polymake); - - polymake_module_add_array_polynomial(polymake, array_type); - - polymake.method("initialize_polymake", &initialize_polymake); - polymake.method("application", [](const std::string x) { - data.main_polymake_session->set_application(x); - }); - - polymake.method("_shell_execute", [](const std::string x) { - return data.main_polymake_session->shell_execute(x); - }); - - polymake.method("shell_complete", [](const std::string x) { - auto res = data.main_polymake_session->shell_complete(x); - return std::tuple>{ - std::get<0>(res), - std::get<2>(res) - }; - }); - - polymake.method("shell_context_help", []( - const std::string& input, - size_t pos=std::string::npos, - bool full=false, - bool html=false){ - std::vector ctx_help = - data.main_polymake_session->shell_context_help(input, pos, full, html); - return ctx_help; - }); - - polymake.method("set_preference", [](const std::string x) { - return data.main_polymake_session->set_preference(x); - }); - -#include "generated/map_inserts.h" - - polymake_module_add_caller(polymake); - - polymake_module_add_type_translations(polymake); - - // polymake.method("cube",[](pm::perl::Value a1, pm::perl::Value a2, - // pm::perl::Value a3, pm::perl::OptionSet opt){ return - // polymake::polytope::cube - // >(a1,a2,a3,opt); }); -} diff --git a/deps/src/polymake_array_polynomial.cpp b/deps/src/polymake_array_polynomial.cpp deleted file mode 100644 index 83f77182..00000000 --- a/deps/src/polymake_array_polynomial.cpp +++ /dev/null @@ -1,56 +0,0 @@ -#include "polymake_includes.h" - -#include "polymake_tools.h" - -#include "polymake_functions.h" - -#include "polymake_type_modules.h" - -void polymake_module_add_array_polynomial(jlcxx::Module& polymake, tparametric1 array_type) -{ - array_type - .apply>, - pm::Array>>([](auto wrapped) { - typedef typename decltype(wrapped)::type WrappedT; - typedef typename decltype(wrapped)::type::value_type elemType; - - wrapped.template constructor(); - wrapped.template constructor(); - - wrapped.method("_getindex", [](const WrappedT& A, int64_t n) { - return elemType(A[static_cast(n) - 1]); - }); - wrapped.method("_setindex!", - [](WrappedT& A, const elemType& val, int64_t n) { - A[static_cast(n) - 1] = val; - }); - wrapped.method("length", &WrappedT::size); - wrapped.method("resize!", [](WrappedT& A, int64_t newsz) { - A.resize(static_cast(newsz)); - return A; - }); - - wrapped.method("append!", [](WrappedT& A, WrappedT& B) { - A.append(B); - return A; - }); - wrapped.method("fill!", [](WrappedT& A, const elemType& x) { - A.fill(x); - return A; - }); - wrapped.method("show_small_obj", [](const WrappedT& A) { - return show_small_object(A); - }); - wrapped.method("take", - [](pm::perl::BigObject p, const std::string& s, - WrappedT& A) { p.take(s) << A; }); - }); - polymake.method( - "to_array_polynomial_integer_int", [](const pm::perl::PropertyValue& pv) { - return to_SmallObject>>(pv); - }); - polymake.method( - "to_array_polynomial_rational_int", [](const pm::perl::PropertyValue& pv) { - return to_SmallObject>>(pv); - }); -} diff --git a/deps/src/polymake_arrays.cpp b/deps/src/polymake_arrays.cpp deleted file mode 100644 index 35bfcd1b..00000000 --- a/deps/src/polymake_arrays.cpp +++ /dev/null @@ -1,123 +0,0 @@ -#include "polymake_includes.h" - -#include "polymake_tools.h" - -#include "polymake_functions.h" - -#include "polymake_type_modules.h" - - -tparametric1 polymake_module_add_array(jlcxx::Module& polymake) -{ - - auto type = polymake - .add_type>>( - "Array", jlcxx::julia_type("AbstractVector", "Base")); - - type.apply, pm::Array, - pm::Array, - pm::Array, pm::Array>, - pm::Array>, - pm::Array>, - pm::Array>, - pm::Array>, - pm::Array>>, - pm::Array>>([](auto wrapped) { - typedef typename decltype(wrapped)::type WrappedT; - typedef typename decltype(wrapped)::type::value_type elemType; - - wrapped.template constructor(); - wrapped.template constructor(); - - wrapped.method("_getindex", [](const WrappedT& A, int64_t n) { - return elemType(A[static_cast(n) - 1]); - }); - wrapped.method("_setindex!", - [](WrappedT& A, const elemType& val, int64_t n) { - A[static_cast(n) - 1] = val; - }); - wrapped.method("length", &WrappedT::size); - wrapped.method("resize!", [](WrappedT& A, int64_t newsz) { - A.resize(static_cast(newsz)); - return A; - }); - - wrapped.method("append!", [](WrappedT& A, WrappedT& B) { - A.append(B); - return A; - }); - wrapped.method("fill!", [](WrappedT& A, const elemType& x) { - A.fill(x); - return A; - }); - wrapped.method("show_small_obj", [](const WrappedT& A) { - return show_small_object(A); - }); - wrapped.method("take", - [](pm::perl::BigObject p, const std::string& s, - WrappedT& A) { p.take(s) << A; }); - }) - .apply>([](auto wrapped) { - typedef typename decltype(wrapped)::type WrappedT; - typedef pm::perl::BigObject elemType; - - wrapped.template constructor(); - - wrapped.method("_getindex", [](const WrappedT& A, int64_t n) { - return elemType(A[static_cast(n) - 1]); - }); - wrapped.method("_setindex!", - [](WrappedT& A, const elemType& val, int64_t n) { - A[static_cast(n) - 1] = val; - }); - wrapped.method("length", &WrappedT::size); - wrapped.method("resize!", [](WrappedT& A, int64_t newsz) { - A.resize(static_cast(newsz)); - return A; - }); - }); - - polymake.method("to_array_int", [](const pm::perl::PropertyValue& pv) { - return to_SmallObject>(pv); - }); - polymake.method("to_array_integer", - [](const pm::perl::PropertyValue& pv) { - return to_SmallObject>(pv); - }); - polymake.method("to_array_string", [](const pm::perl::PropertyValue& pv) { - return to_SmallObject>(pv); - }); - polymake.method("to_array_array_int", - [](const pm::perl::PropertyValue& pv) { - return to_SmallObject>>(pv); - }); - polymake.method( - "to_array_array_integer", [](const pm::perl::PropertyValue& pv) { - return to_SmallObject>>(pv); - }); - polymake.method( - "to_array_array_rational", [](const pm::perl::PropertyValue& pv) { - return to_SmallObject>>(pv); - }); - polymake.method( - "to_array_set_int", [](const pm::perl::PropertyValue& pv) { - return to_SmallObject>>(pv); - }); - polymake.method( - "to_array_pair_int_int", [](const pm::perl::PropertyValue& pv){ - return to_SmallObject>>(pv); - }); - polymake.method( - "to_array_list_pair_int_int", [](const pm::perl::PropertyValue& pv){ - return to_SmallObject>>>(pv); - }); - polymake.method( - "to_array_matrix_integer", [](const pm::perl::PropertyValue& pv) { - return to_SmallObject>>(pv); - }); - polymake.method( - "to_array_bigobject", [](const pm::perl::PropertyValue& pv) { - return to_SmallObject>(pv); - }); - return type; -} diff --git a/deps/src/polymake_bigobjects.cpp b/deps/src/polymake_bigobjects.cpp deleted file mode 100644 index bb003d97..00000000 --- a/deps/src/polymake_bigobjects.cpp +++ /dev/null @@ -1,102 +0,0 @@ -#include "polymake_includes.h" - -#include "polymake_tools.h" - -#include "polymake_functions.h" - -#include "polymake_type_modules.h" - -#include "polymake_caller.h" - -#include "generated/option_set_take.h" - -#include "generated/polymake_call_function_feed_argument.h" - -void polymake_module_add_bigobject(jlcxx::Module& polymake) -{ - - polymake.add_type("PropertyValue"); - polymake.add_type("OptionSet"); - - polymake.method("option_set_take", option_set_take); - - polymake.add_type("BigObjectType") - .constructor() - .method("type_name", [](pm::perl::BigObjectType p) { return p.name(); }); - - polymake.add_type("BigObject") - .constructor() - .constructor() - .method("save_bigobject", - [](pm::perl::BigObject p, const std::string& s) { - return p.save(s); - }) - .method( - "load_bigobject", - [](const std::string& s) { return pm::perl::BigObject::load(s); }) - .method("internal_give", - [](pm::perl::BigObject p, const std::string& s) { - return p.give(s); - }) - .method("exists", [](pm::perl::BigObject& p, - const std::string& s) { return p.exists(s); }) - .method("_isa", [](const pm::perl::BigObject& p, - const pm::perl::BigObjectType& t) { return p.isa(t); }) - .method("cast!", [](pm::perl::BigObject& p, - const pm::perl::BigObjectType& t) { return p.cast(t); }) - .method("bigobject_type", [](pm::perl::BigObject p) { return p.type(); }) - .method("type_name", - [](pm::perl::BigObject p) { return p.type().name(); }) - .method("properties", [](pm::perl::BigObject p) { - std::string x = p.call_method("properties"); - return x; - }) - .method("_get_attachment", [](pm::perl::BigObject p, const std::string& s) { - return p.get_attachment(s); - }) - .method("remove_attachment", [](pm::perl::BigObject p, const std::string& s) { - return p.remove_attachment(s); - }) - .method("attach", [](pm::perl::BigObject p, const std::string& s, - jl_value_t* v) { - auto pv_helper = p.attach(s); - polymake_call_function_feed_argument(pv_helper, v); - }) - ; - - polymake.method("to_bool", [](pm::perl::PropertyValue p) { - return static_cast(p); - }); - polymake.method("to_int", [](pm::perl::PropertyValue p) { - return static_cast(p); - }); - polymake.method("to_double", [](pm::perl::PropertyValue p) { - return static_cast(p); - }); - polymake.method("to_string", [](pm::perl::PropertyValue p) { - return to_SmallObject(p); - }); - polymake.method("to_bigobject", &to_bigobject); - - polymake.method("setname!", [](pm::perl::BigObject p, const std::string& s){ - p.set_name(s); - }); - polymake.method("take", [](pm::perl::BigObject p, const std::string& s, - const std::string& t) { p.take(s) << t; }); - polymake.method("take", - [](pm::perl::BigObject p, const std::string& s, - const pm::perl::PropertyValue& v) { p.take(s) << v; }); - polymake.method("take", - [](pm::perl::BigObject p, const std::string& s, - const pm::perl::BigObject& v) { p.take(s) << v; }); - polymake.method("add", [](pm::perl::BigObject p, const std::string& s, - const pm::perl::BigObject& v) { p.add(s, v); }); - - polymake.method("typeinfo_string", - [](pm::perl::PropertyValue p, bool demangle) { - return typeinfo_helper(p, demangle); - }); - polymake.method("check_defined", [](pm::perl::PropertyValue v) { - return PropertyValueHelper(v).is_defined(); - }); -} diff --git a/deps/src/polymake_caller.cpp b/deps/src/polymake_caller.cpp deleted file mode 100644 index 0ce32d92..00000000 --- a/deps/src/polymake_caller.cpp +++ /dev/null @@ -1,72 +0,0 @@ -#define INCLUDED_FROM_CALLER - -#include "polymake_caller.h" - -#include "polymake_tools.h" - -#include - -static auto type_map_translator = new std::map(); - -void insert_type_in_map(std::string&& ptr_name, jl_value_t** var_space) -{ - type_map_translator->emplace(std::make_pair(ptr_name, var_space)); -} - -void set_julia_type(std::string name, void* type_address) -{ - jl_value_t** address; - try { - address = (*type_map_translator)[name]; - } - catch (std::exception& e) { - std::cerr << "In 'set_julia_type': type translation failed for " << name << std::endl; - return; - } - memcpy(address, &type_address, sizeof(jl_value_t*)); -} - -#include "generated/polymake_call_function_feed_argument.h" - -template -using funcall_type = std::conditional_t; - -// Visualization in polymake only works if the function is called and -// then immediately released,i.e. not converted to a property value -template -auto polymake_call_function( - const std::string& function_name, - const std::vector& template_vector, - const jlcxx::ArrayRef arguments) - -> funcall_type -{ - auto function = polymake::prepare_call_function(function_name, template_vector); - for (auto arg : arguments) - polymake_call_function_feed_argument(function, arg); - return static_cast>(function()); -} - -// Visualization in polymake only works if the method is called and -// then immediately released,i.e. not converted to a property value -template -auto polymake_call_method( - const std::string& function_name, - pm::perl::BigObject object, - const jlcxx::ArrayRef arguments) - -> funcall_type -{ - auto function = object.prepare_call_method(function_name); - for (auto arg : arguments) - polymake_call_function_feed_argument(function, arg); - return static_cast>(function()); -} - -void polymake_module_add_caller(jlcxx::Module& polymake) -{ - polymake.method("internal_call_function", &polymake_call_function); - polymake.method("internal_call_function_void", - &polymake_call_function); - polymake.method("internal_call_method", &polymake_call_method); - polymake.method("internal_call_method_void", &polymake_call_method); - polymake.method("set_julia_type", &set_julia_type); -} diff --git a/deps/src/polymake_caller.h b/deps/src/polymake_caller.h deleted file mode 100644 index a5553a4b..00000000 --- a/deps/src/polymake_caller.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef POLYMAKE_WRAP_CALLER -#define POLYMAKE_WRAP_CALLER - -#include "polymake_includes.h" - -#include "generated/type_declarations_extern.h" - -void insert_type_in_map(std::string&&, jl_value_t**); - -void set_julia_type(std::string, void*); - -void polymake_module_add_caller(jlcxx::Module&); - -#endif diff --git a/deps/src/polymake_direct_calls.cpp b/deps/src/polymake_direct_calls.cpp deleted file mode 100644 index 9b7319d1..00000000 --- a/deps/src/polymake_direct_calls.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "polymake_includes.h" - -#include "polymake_type_modules.h" - -template -pm::Vector direct_call_solve_LP( - const pm::Matrix& inequalities, - const pm::Matrix& equalities, - const pm::Vector& objective, - bool maximize) -{ - try { - auto solution = polymake::polytope::solve_LP(inequalities, equalities, objective, maximize); - return solution.solution; - } catch (...) { - return pm::Vector(); - } -} - - -void polymake_module_add_direct_calls(jlcxx::Module& polymake) -{ - polymake.method("direct_call_solve_LP", &direct_call_solve_LP); - polymake.method("direct_call_solve_LP_float", &direct_call_solve_LP); -} diff --git a/deps/src/polymake_functions.cpp b/deps/src/polymake_functions.cpp deleted file mode 100644 index 49167fb8..00000000 --- a/deps/src/polymake_functions.cpp +++ /dev/null @@ -1,72 +0,0 @@ -#include "polymake_includes.h" -#include "polymake_tools.h" -#include "polymake_caller.h" -#include "polymake_functions.h" - -#include -#include - -void initialize_polymake(bool interactive = true) -{ - try { - if (data.main_polymake_session == nullptr) { - data.main_polymake_session = new polymake::Main; - data.main_polymake_session->shell_enable(); - data.main_polymake_scope = new polymake::Scope( - data.main_polymake_session->newScope()); - if (interactive){ - std::cout << data.main_polymake_session->greeting() << std::endl; - }; - }; - } - catch (const std::exception& e) { - jl_error(e.what()); - } -} - -pm::perl::BigObject to_bigobject(const pm::perl::PropertyValue& v) -{ - pm::perl::BigObject obj; - v >> obj; - return v; -} - -std::string typeinfo_helper(const pm::perl::PropertyValue& p, bool demangle) -{ - PropertyValueHelper ph(p); - - if (!ph.is_defined()) { - return "undefined"; - } - if (ph.is_boolean()) { - return "bool"; - } - switch (ph.classify_number()) { - // primitives - case PropertyValueHelper::number_is_zero: - case PropertyValueHelper::number_is_int: - return "Int"; - case PropertyValueHelper::number_is_float: - return "double"; - - // with typeinfo ptr (nullptr for Objects) - case PropertyValueHelper::number_is_object: - // some non-primitive Scalar type with typeinfo (e.g. Rational) - case PropertyValueHelper::not_a_number: - // a c++ type with typeinfo or a perl Object - { - const std::type_info* ti = ph.get_canned_typeinfo(); - if (ti == nullptr) { - // check some perl based types via custom perl code - return call_function("classify_perl_pv", p); - } - // demangle: - int status = -1; - std::unique_ptr res{ - abi::__cxa_demangle(ti->name(), nullptr, nullptr, &status), - std::free}; - return (status == 0 && demangle) ? res.get() : ti->name(); - } - } - return "unknown"; -} diff --git a/deps/src/polymake_functions.h b/deps/src/polymake_functions.h deleted file mode 100644 index d32a04e5..00000000 --- a/deps/src/polymake_functions.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef POLYMAKE_WRAP_FUNCTIONS -#define POLYMAKE_WRAP_FUNCTIONS - - -void initialize_polymake(bool interactive); - -pm::perl::BigObject to_bigobject(const pm::perl::PropertyValue&); - -std::string typeinfo_helper(const pm::perl::PropertyValue& p, bool demangle); - -template T to_SmallObject(const pm::perl::PropertyValue& pv) -{ - T obj = pv; - return obj; -}; - -pm::Integer new_integer_from_bigint(jl_value_t*); - -// We can do better templating here -template -std::string show_small_object(const T& obj, bool print_typename = true) -{ - std::ostringstream buffer(""); - auto wrapped_buffer = wrap(buffer); - if (print_typename) { - wrapped_buffer << polymake::legible_typename(typeid(obj)) << pm::endl; - } - wrapped_buffer << obj; - return buffer.str(); -} - -struct VecOrMat_supported -{ - typedef jlcxx::ParameterList value_type; -}; - -#endif diff --git a/deps/src/polymake_incidencematrix.cpp b/deps/src/polymake_incidencematrix.cpp deleted file mode 100644 index 78fbe98c..00000000 --- a/deps/src/polymake_incidencematrix.cpp +++ /dev/null @@ -1,52 +0,0 @@ -#include "polymake_includes.h" - -#include "polymake_tools.h" - -#include "polymake_functions.h" - -#include "polymake_type_modules.h" - -template<> struct jlcxx::IsMirroredType : std::false_type { }; -template<> struct jlcxx::IsMirroredType : std::false_type { }; - -void polymake_module_add_incidencematrix(jlcxx::Module& polymake) -{ - polymake.add_type("NonSymmetric"); - polymake.add_type("Symmetric"); - polymake - .add_type>, jlcxx::ParameterList>( - "IncidenceMatrix", jlcxx::julia_type("AbstractSparseMatrix", "SparseArrays")) - .apply_combination>( - [](auto wrapped) { - typedef typename decltype(wrapped)::type WrappedT; - wrapped.template constructor(); - wrapped.method("_getindex", - [](WrappedT& M, int64_t i, int64_t j) { - return bool(M(i - 1, j - 1)); - }); - wrapped.method("_setindex!", - [](WrappedT& M, bool r, int64_t i, - int64_t j) { - M(i - 1, j - 1) = r; - }); - wrapped.method("nrows", &WrappedT::rows); - wrapped.method("_row", [](WrappedT& M, int64_t i) { return pm::Set(M.row(i - 1)); }); - wrapped.method("ncols", &WrappedT::cols); - wrapped.method("_col", [](WrappedT& M, int64_t i) { return pm::Set(M.col(i - 1)); }); - wrapped.method("_resize!", [](WrappedT& M, int64_t i, - int64_t j) { M.resize(i, j); }); - wrapped.method("take", - [](pm::perl::BigObject p, const std::string& s, - WrappedT& M) { p.take(s) << M; }); - - wrapped.method("show_small_obj", [](WrappedT& S) { - return show_small_object(S); - }); - }); - polymake.method("to_incidencematrix_nonsymmetric", [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); - polymake.method("to_incidencematrix_symmetric", [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); -} diff --git a/deps/src/polymake_includes.h b/deps/src/polymake_includes.h deleted file mode 100644 index 86880ac1..00000000 --- a/deps/src/polymake_includes.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef POLYMAKE_WRAP_INCLUDES -#define POLYMAKE_WRAP_INCLUDES - -#include "polymake_jlcxx.h" - -#include -#include - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wlogical-op-parentheses" -#pragma clang diagnostic ignored "-Wshift-op-parentheses" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#pragma clang diagnostic pop - -#endif diff --git a/deps/src/polymake_integers.cpp b/deps/src/polymake_integers.cpp deleted file mode 100644 index e2abb970..00000000 --- a/deps/src/polymake_integers.cpp +++ /dev/null @@ -1,91 +0,0 @@ -#include "polymake_includes.h" - -#include "polymake_tools.h" - -#include "polymake_functions.h" - -#include "polymake_type_modules.h" - -pm::Integer new_integer_from_bigint(jl_value_t* integer) -{ - pm::Integer* p; - p = reinterpret_cast(integer); - return *p; -} - -void polymake_module_add_integer(jlcxx::Module& polymake) -{ - polymake - .add_type("Integer", - jlcxx::julia_type("Integer", "Base")) - .constructor() - .method("<", [](pm::Integer& a, pm::Integer& b) { return a < b; }) - .method("<", [](pm::Integer& a, - int64_t b) { return a < static_cast(b); }) - .method("<", [](int64_t a, - pm::Integer& b) { return static_cast(a) < b; }) - .method("<=", [](pm::Integer& a, pm::Integer& b) { return a <= b; }) - .method("<=", [](pm::Integer& a, - int64_t b) { return a <= static_cast(b); }) - .method("<=", - [](int64_t a, pm::Integer& b) { - return static_cast(a) <= b; - }) - - .method("show_small_obj", - [](pm::Integer& i) { - return show_small_object(i, false); - }) - .method("Float64", [](pm::Integer& a) { return double(a); }) - .method("-", [](pm::Integer& a, pm::Integer& b) { return a - b; }) - .method("-", [](pm::Integer& a, - int64_t b) { return a - static_cast(b); }) - .method("-", [](int64_t a, - pm::Integer& b) { return static_cast(a) - b; }) - // unary minus - .method("-", [](pm::Integer& a) { return -a; }) - - .method("div", [](pm::Integer& a, pm::Integer& b) { return a / b; }) - .method("div", [](pm::Integer& a, - int64_t b) { return a / static_cast(b); }) - .method("div", - [](int64_t a, pm::Integer& b) { - return static_cast(a) / b; - }) - - .method("rem", [](pm::Integer& a, pm::Integer& b) { return a % b; }) - .method("rem", [](pm::Integer& a, - int64_t b) { return a % static_cast(b); }) - .method("rem", - [](int64_t a, pm::Integer& b) { - return static_cast(a) % b; - }); - - polymake.set_override_module(polymake.julia_module()); - polymake.method("==", [](pm::Integer& a, pm::Integer& b) { - return a == b; }); - polymake.method("==", [](pm::Integer& a, int64_t b) { - return a == static_cast(b); }); - polymake.method("==", [](int64_t a, pm::Integer& b) { - return static_cast(a) == b; }); - - // the symmetric definitions are on the julia side - polymake.method("+", [](pm::Integer& a, pm::Integer& b) { - return a + b; }); - polymake.method("+", [](pm::Integer& a, int64_t b) { - return a + static_cast(b); }); - polymake.method("+", [](int64_t a, pm::Integer& b) { - return static_cast(a) + b; }); - polymake.method("*", [](pm::Integer& a, pm::Integer& b) { - return a * b; }); - polymake.method("*", [](pm::Integer& a, int64_t b) { - return a * static_cast(b); }); - polymake.method("*", [](int64_t a, pm::Integer& b) { - return static_cast(a) * b; }); - polymake.unset_override_module(); - - polymake.method("new_integer_from_bigint", new_integer_from_bigint); - polymake.method("to_integer", [](pm::perl::PropertyValue pv) { - return to_SmallObject(pv); - }); -} diff --git a/deps/src/polymake_jlcxx.h b/deps/src/polymake_jlcxx.h deleted file mode 100644 index 5a2acdbe..00000000 --- a/deps/src/polymake_jlcxx.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef POLYMAKE_JLCXX -#define POLYMAKE_JLCXX - -// This must be the very first include - -// Work around Xcode 11.4 issue until upstream libc++ fix arrives in Xcode: -// https://github.com/llvm/llvm-project/commit/2464d8135e -// -// First include __config from libc++, then override typeinfo flag -// to force use of address as hash instead of hashing the string. - -#if defined(__APPLE__) && defined(FORCE_XCODE_TYPEINFO_MERGED) -#include <__config> -#if defined(_LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT) && \ - _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT == 0 -#undef _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT -#define _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT 1 -#else -#error Trying to work around Xcode 11.4 bug but libc++ macro not set as expected! \ - Please try rebuilding and create an issue if this reappears. -#endif -#endif - -#include "jlcxx/jlcxx.hpp" - -#endif diff --git a/deps/src/polymake_lists.cpp b/deps/src/polymake_lists.cpp deleted file mode 100644 index fc870010..00000000 --- a/deps/src/polymake_lists.cpp +++ /dev/null @@ -1,79 +0,0 @@ -#include "polymake_includes.h" - -#include "polymake_tools.h" - -#include "polymake_functions.h" - -#include "polymake_type_modules.h" - - -void polymake_module_add_lists(jlcxx::Module& polymake) -{ - auto type = polymake - .add_type>>( - "StdList", jlcxx::julia_type("Any", "Base")); - - type.apply>>([&polymake](auto wrapped) { - typedef typename decltype(wrapped)::type WrappedT; - typedef typename decltype(wrapped)::type::value_type elemType; - - wrapped.template constructor(); - wrapped.template constructor(); - - //Pattern to overwrite function in Base - polymake.set_override_module(jl_base_module); - - wrapped.method("isempty", &WrappedT::empty); - - wrapped.method("empty!", [](WrappedT& L) { - L.clear(); - return L; - }); - - wrapped.method("push!", [](WrappedT& L, elemType i) { - L.push_back(i); - return L; - }); - - wrapped.method("pushfirst!", [](WrappedT& L, elemType i) { - L.push_front(i); - return L; - }); - - wrapped.method("length", &WrappedT::size); - - polymake.unset_override_module(); - - wrapped.method("show_small_obj", [](const WrappedT& S) { - return show_small_object(S); - }); - }); - - polymake.method("to_list_pair_int_int", [](const pm::perl::PropertyValue& pv) { - return to_SmallObject>>(pv); - }); - - polymake.add_type>>("ListIterator") - .apply>>( - [](auto wrapped) { - typedef typename decltype(wrapped)::type WrappedT; - typedef typename decltype(wrapped)::type::value_type elemType; - - wrapped.method("beginiterator", [](const std::list& L) { - return WrappedT(L); - }); - - wrapped.method("increment", [](WrappedT& state) { - state.iterator++; - }); - wrapped.method("get_element", [](WrappedT& state) { - auto elt = *(state.iterator); - return elt; - }); - wrapped.method("isdone", [](const std::list& L, - WrappedT& state) { - return L.end() == state.iterator; - }); - }); - -} diff --git a/deps/src/polymake_matrices.cpp b/deps/src/polymake_matrices.cpp deleted file mode 100644 index 6c203bcc..00000000 --- a/deps/src/polymake_matrices.cpp +++ /dev/null @@ -1,52 +0,0 @@ -#include "polymake_includes.h" - -#include "polymake_tools.h" - -#include "polymake_functions.h" - -#include "polymake_type_modules.h" - -void polymake_module_add_matrix(jlcxx::Module& polymake) -{ - - polymake - .add_type>>( - "Matrix", jlcxx::julia_type("AbstractMatrix", "Base")) - .apply_combination( - [](auto wrapped) { - typedef typename decltype(wrapped)::type WrappedT; - typedef typename decltype(wrapped)::type::value_type elemType; - wrapped.template constructor(); - - wrapped.method("_getindex", - [](WrappedT& f, int64_t i, int64_t j) { - return elemType(f(i - 1, j - 1)); - }); - wrapped.method("_setindex!", - [](WrappedT& M, elemType r, int64_t i, - int64_t j) { M(i - 1, j - 1) = r; }); - wrapped.method("nrows", &WrappedT::rows); - wrapped.method("ncols", &WrappedT::cols); - wrapped.method("resize!", [](WrappedT& M, int64_t i, - int64_t j) { M.resize(i, j); }); - - wrapped.method("take", - [](pm::perl::BigObject p, const std::string& s, - WrappedT& M) { p.take(s) << M; }); - wrapped.method("show_small_obj", [](WrappedT& M) { - return show_small_object(M); - }); - }); - polymake.method("to_matrix_int", [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); - polymake.method("to_matrix_integer", [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); - polymake.method("to_matrix_rational", [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); - polymake.method("to_matrix_double", [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); -} diff --git a/deps/src/polymake_pairs.cpp b/deps/src/polymake_pairs.cpp deleted file mode 100644 index 7032bca5..00000000 --- a/deps/src/polymake_pairs.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include "polymake_includes.h" - -#include "polymake_tools.h" - -#include "polymake_functions.h" - -#include "polymake_type_modules.h" - - -void polymake_module_add_pairs(jlcxx::Module& polymake) -{ - - auto type = polymake - .add_type, jlcxx::TypeVar<2>>>( - "StdPair", jlcxx::julia_type("Any", "Base" )); - - type.apply>([&polymake](auto wrapped) { - typedef typename decltype(wrapped)::type WrappedT; - - wrapped.template constructor(); - wrapped.template constructor(); - - //Pattern to overwrite function in Base - polymake.set_override_module(jl_base_module); - - wrapped.method("first", [](const WrappedT& P) { - return P.first; - }); - - wrapped.method("last", [](const WrappedT& P) { - return P.second; - }); - - polymake.unset_override_module(); - - wrapped.method("show_small_obj", [](WrappedT& S) { - return show_small_object(S); - }); - }); - - polymake.method("to_pair_int_int", [](const pm::perl::PropertyValue& pv) { - return to_SmallObject>(pv); - }); - -} diff --git a/deps/src/polymake_polynomial.cpp b/deps/src/polymake_polynomial.cpp deleted file mode 100644 index 95bdc2f8..00000000 --- a/deps/src/polymake_polynomial.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include "polymake_includes.h" - -#include "polymake_tools.h" - -#include "polymake_functions.h" - -#include "polymake_type_modules.h" - -void polymake_module_add_polynomial(jlcxx::Module& polymake) -{ - polymake - .add_type, jlcxx::TypeVar<2>>>( - "Polynomial", jlcxx::julia_type("Any", "Base")) - .apply_combination>( - [](auto wrapped) { - typedef typename decltype(wrapped)::type polyT; - typedef typename decltype(wrapped)::type::coefficient_type coeffT; - typedef typename decltype(wrapped)::type::monomial_type::value_type expT; - - wrapped.template constructor, pm::Matrix>(); - - wrapped.method("_isequal", [](polyT& a, polyT& b) { return a == b; }); - wrapped.method("_add", [](polyT& a, polyT& b) { return a + b; }); - wrapped.method("_sub", [](polyT& a, polyT& b) { return a - b; }); - wrapped.method("_mul", [](polyT& a, polyT& b) { return a * b; }); - wrapped.method("^", [](polyT& a, int64_t b) { return a ^ b; }); - wrapped.method("/", [](polyT& a, coeffT c) { return a / c; }); - wrapped.method("coefficients_as_vector", &polyT::coefficients_as_vector); - wrapped.method("monomials_as_matrix", [](polyT& a) { return a.monomials_as_matrix(); }); - wrapped.method("set_var_names", [](polyT& a, Array& names) { a.set_var_names(names); }); - wrapped.method("get_var_names", [](polyT& a) { return a.get_var_names(); }); - wrapped.method("nvars", [] (polyT& a) -> pm::Int { return a.n_vars(); }); - - wrapped.method("show_small_obj", [](polyT& P) { - return show_small_object(P); - }); - wrapped.method("take", - [](pm::perl::BigObject p, const std::string& s, - polyT& P){ p.take(s) << P; }); - }); - - polymake.method("to_polynomial_int_int", [](pm::perl::PropertyValue v) { - return to_SmallObject>(v); - }); - polymake.method("to_polynomial_integer_int", [](pm::perl::PropertyValue v) { - return to_SmallObject>(v); - }); - polymake.method("to_polynomial_rational_int", [](pm::perl::PropertyValue v) { - return to_SmallObject>(v); - }); - polymake.method("to_polynomial_double_int", [](pm::perl::PropertyValue v) { - return to_SmallObject>(v); - }); -} diff --git a/deps/src/polymake_rationals.cpp b/deps/src/polymake_rationals.cpp deleted file mode 100644 index 9dda44d2..00000000 --- a/deps/src/polymake_rationals.cpp +++ /dev/null @@ -1,104 +0,0 @@ -#include "polymake_includes.h" - -#include "polymake_tools.h" - -#include "polymake_functions.h" - -#include "polymake_type_modules.h" - -void polymake_module_add_rational(jlcxx::Module& polymake) -{ - - polymake - .add_type("Rational", - jlcxx::julia_type("Real", "Base")) - .constructor() - .method("rational_si_si", []( - const jlcxx::StrictlyTypedNumber num, - const jlcxx::StrictlyTypedNumber den) { - return pm::Rational(num.value, den.value); - }) - .method("<", [](pm::Rational& a, pm::Rational& b) { return a < b; }) - .method("<", [](pm::Rational& a, pm::Integer& b) { return a < b; }) - .method("<", [](pm::Rational& a, - int64_t b) { return a < static_cast(b); }) - .method("<", [](pm::Integer& a, pm::Rational& b) { return a < b; }) - .method("<", [](int64_t a, - pm::Rational& b) { return static_cast(a) < b; }) - - .method("<=", [](pm::Rational& a, pm::Rational& b) { return a <= b; }) - .method("<=", [](pm::Rational& a, pm::Integer& b) { return a <= b; }) - .method("<=", [](pm::Rational& a, - int64_t b) { return a <= static_cast(b); }) - .method("<=", [](pm::Integer& a, pm::Rational& b) { return a <= b; }) - .method("<=", [](int64_t a, pm::Rational& b) { - return static_cast(a) <= b; - }) - - .method( - "numerator", - [](const pm::Rational& r) { return pm::Integer(numerator(r)); }) - .method( - "denominator", - [](const pm::Rational& r) { return pm::Integer(denominator(r)); }) - .method("show_small_obj", - [](const pm::Rational& r) { - return show_small_object(r, false); - }) - .method("Float64", [](pm::Rational& a) { return double(a); }) - .method("-", [](pm::Rational& a, pm::Rational& b) { return a - b; }) - .method("-", [](pm::Rational& a, pm::Integer& b) { return a - b; }) - .method("-", [](pm::Rational& a, - int64_t b) { return a - static_cast(b); }) - .method("-", [](pm::Integer& a, pm::Rational& b) { return a - b; }) - .method("-", [](int64_t a, - pm::Rational& b) { return static_cast(a) - b; }) - // unary minus - .method("-", [](pm::Rational& a) { return -a; }) - - .method("//", [](pm::Rational& a, pm::Rational& b) { return a / b; }) - .method("//", [](pm::Rational& a, pm::Integer& b) { return a / b; }) - .method("//", [](pm::Rational& a, int64_t b) { - return a / static_cast(b); }) - .method("//", [](pm::Integer& a, pm::Rational& b) { return a / b; }) - .method("//", [](int64_t a, pm::Rational& b) { - return static_cast(a) / b; }); - - polymake.set_override_module(polymake.julia_module()); - polymake.method("==", [](pm::Rational& a, pm::Rational& b) { - return a == b; }); - polymake.method("==", [](pm::Rational& a, pm::Integer& b) { - return a == b; }); - polymake.method("==", [](pm::Integer& a, pm::Rational& b) { - return a == b; }); - polymake.method("==", [](pm::Rational& a, int64_t b) { - return static_cast(a) == b; }); - polymake.method("==", [](int64_t a, pm::Rational& b) { - return a == static_cast(b); }); - // the symmetric definitions are on the julia side - polymake.method("+", [](pm::Rational& a, pm::Rational& b) { - return a + b; }); - polymake.method("+", [](pm::Rational& a, pm::Integer& b) { - return a + b; }); - polymake.method("+", [](pm::Integer& a, pm::Rational& b) { - return a + b; }); - polymake.method("+", [](pm::Rational& a, int64_t b) { - return a + static_cast(b); }); - polymake.method("+", [](int64_t a, pm::Rational& b) { - return static_cast(a) + b; }); - polymake.method("*", [](pm::Rational& a, pm::Rational& b) { - return a * b; }); - polymake.method("*", [](pm::Rational& a, pm::Integer& b) { - return a * b; }); - polymake.method("*", [](pm::Integer& a, pm::Rational& b) { - return a * b; }); - polymake.method("*", [](pm::Rational& a, int64_t b) { - return a * static_cast(b); }); - polymake.method("*", [](int64_t a, pm::Rational& b) { - return static_cast(a) * b; }); - polymake.unset_override_module(); - - polymake.method("to_rational", [](pm::perl::PropertyValue pv) { - return to_SmallObject(pv); - }); -} diff --git a/deps/src/polymake_sets.cpp b/deps/src/polymake_sets.cpp deleted file mode 100644 index 2bc3fdb4..00000000 --- a/deps/src/polymake_sets.cpp +++ /dev/null @@ -1,123 +0,0 @@ -#include "polymake_includes.h" - -#include "polymake_tools.h" - -#include "polymake_functions.h" - -#include "polymake_type_modules.h" - -template<> struct jlcxx::IsMirroredType : std::false_type { }; - -void polymake_module_add_set(jlcxx::Module& polymake) -{ - polymake.add_type("operations_cmp"); - - polymake - .add_type>>( - "Set", jlcxx::julia_type("AbstractSet", "Base")) - .apply>([](auto wrapped) { - typedef typename decltype(wrapped)::type WrappedT; - typedef typename decltype(wrapped)::type::value_type elemType; - - wrapped.template constructor>(); - - wrapped.method("_new_set", [](jlcxx::ArrayRef A) { - pm::Set s{A.begin(), A.end()}; - return s; - }); - - wrapped.method("swap", &WrappedT::swap); - - wrapped.method("isempty", &WrappedT::empty); - wrapped.method("length", &WrappedT::size); - - wrapped.method("empty!", [](WrappedT& S) { - S.clear(); - return S; - }); - wrapped.method("_isequal", [](WrappedT& S, WrappedT& T) { return S == T; }); - wrapped.method( - "in", [](elemType i, WrappedT& S) { return S.contains(i); }); - - wrapped.method("push!", [](WrappedT& S, elemType i) { - S += i; - return S; - }); - - wrapped.method("delete!", [](WrappedT& S, elemType i) { - S -= i; - return S; - }); - - wrapped.method("union!", - [](WrappedT& S, WrappedT& T) { return S += T; }); - wrapped.method("intersect!", - [](WrappedT& S, WrappedT& T) { return S *= T; }); - wrapped.method("setdiff!", - [](WrappedT& S, WrappedT& T) { return S -= T; }); - wrapped.method("symdiff!", - [](WrappedT& S, WrappedT& T) { return S ^= T; }); - - wrapped.method( - "union", [](WrappedT& S, WrappedT& T) { return WrappedT{S + T}; }); - wrapped.method("intersect", [](WrappedT& S, WrappedT& T) { - return WrappedT{S * T}; - }); - wrapped.method("setdiff", [](WrappedT& S, WrappedT& T) { - return WrappedT{S - T}; - }); - wrapped.method("symdiff", [](WrappedT& S, WrappedT& T) { - return WrappedT{S ^ T}; - }); - - wrapped.method("_getindex", [](WrappedT& S, WrappedT& T) { - return WrappedT{pm::select(pm::wary(S), T)}; - }); - wrapped.method("range", [](elemType a, elemType b) { - return WrappedT{pm::range(a, b)}; - }); - wrapped.method("sequence", [](elemType a, elemType c) { - return WrappedT{pm::sequence(a, c)}; - }); - wrapped.method("scalar2set", [](elemType s) { - return WrappedT{pm::scalar2set(s)}; - }); - wrapped.method("show_small_obj", [](WrappedT& S) { - return show_small_object(S); - }); - wrapped.method("take", - [](pm::perl::BigObject p, const std::string& s, - WrappedT& S){ p.take(s) << S; }); - }); - - polymake.method("to_set_int", [](pm::perl::PropertyValue v) { - return to_SmallObject>(v); - }); - - polymake.add_type>>("SetIterator") - .apply>( - [](auto wrapped) { - typedef typename decltype(wrapped)::type WrappedSetIter; - typedef typename decltype(wrapped)::type::value_type elemType; - wrapped.method("beginiterator", [](pm::Set& S) { - auto result = WrappedSetIterator{S}; - return result; - }); - - wrapped.method("increment", [](WrappedSetIter& state) { - state.iterator++; - }); - wrapped.method("get_element", [](WrappedSetIter& state) { - auto elt = *(state.iterator); - return elt; - }); - wrapped.method("isdone", [](pm::Set& S, - WrappedSetIter& state) { - return S.end() == state.iterator; - }); - }); - - polymake.method("incl", [](pm::Set s1, pm::Set s2) { - return pm::incl(s1, s2); - }); -} diff --git a/deps/src/polymake_sparsematrix.cpp b/deps/src/polymake_sparsematrix.cpp deleted file mode 100644 index 3ed24640..00000000 --- a/deps/src/polymake_sparsematrix.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include "polymake_includes.h" - -#include "polymake_tools.h" - -#include "polymake_functions.h" - -#include "polymake_type_modules.h" - -void polymake_module_add_sparsematrix(jlcxx::Module& polymake) -{ - - polymake.method("_get_global_epsilon", []() { return pm::spec_object_traits::global_epsilon; }); - polymake.method("_set_global_epsilon", [](double e) { pm::spec_object_traits::global_epsilon = e; }); - polymake - .add_type>, jlcxx::ParameterList,int>>( - "SparseMatrix", jlcxx::julia_type("AbstractSparseMatrix", "SparseArrays")) - .apply_combination( - [](auto wrapped) { - typedef typename decltype(wrapped)::type matType; - typedef typename decltype(wrapped)::type::value_type elemType; - wrapped.template constructor(); - wrapped.method("_getindex", - [](matType& M, int64_t i, int64_t j) { - return elemType(M(i - 1, j - 1)); - }); - wrapped.method("_setindex!", - [](matType& M, elemType r, int64_t i, - int64_t j) { - M(i - 1, j - 1) = r; - }); - wrapped.method("nrows", &matType::rows); - wrapped.method("ncols", &matType::cols); - wrapped.method("nzindices", [](matType& S) { - return Array>(pm::rows(pm::index_matrix(S))); - }); - wrapped.method("resize!", [](matType& M, int64_t i, - int64_t j) { M.resize(i, j); }); - wrapped.method("take", - [](pm::perl::BigObject p, const std::string& s, - matType& M) { p.take(s) << M; }); - wrapped.method("show_small_obj", [](matType& S) { - return show_small_object(S); - }); - }); - polymake.method("to_sparsematrix_rational", - [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); - polymake.method("to_sparsematrix_integer", - [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); - polymake.method("to_sparsematrix_int", - [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); - polymake.method("to_sparsematrix_double", - [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); -} diff --git a/deps/src/polymake_sparsevector.cpp b/deps/src/polymake_sparsevector.cpp deleted file mode 100644 index 1ff8e560..00000000 --- a/deps/src/polymake_sparsevector.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include "polymake_includes.h" - -#include "polymake_tools.h" - -#include "polymake_functions.h" - -#include "polymake_type_modules.h" - -void polymake_module_add_sparsevector(jlcxx::Module& polymake) -{ - polymake - .add_type>, jlcxx::ParameterList,int>>( - "SparseVector", jlcxx::julia_type("AbstractSparseVector", "SparseArrays")) - .apply_combination( - [](auto wrapped) { - typedef typename decltype(wrapped)::type vecType; - typedef typename decltype(wrapped)::type::value_type elemType; - wrapped.template constructor(); - wrapped.method("_getindex", - [](vecType& V, int64_t i) { - return elemType(V[i - 1]); - }); - wrapped.method("_setindex!", - [](vecType& V, elemType r, int64_t i) { - V[i - 1] = r; - }); - wrapped.method("length", &vecType::dim); - wrapped.method("_nzindices", [](vecType& S) { - return Set(pm::indices(S)); - }); - wrapped.method("resize!", - [](vecType& V, int64_t sz) { V.resize(sz); }); - wrapped.method("show_small_obj", [](vecType& S) { - return show_small_object(S); - }); - }); - polymake.method("to_sparsevector_rational", - [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); - polymake.method("to_sparsevector_integer", - [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); - polymake.method("to_sparsevector_int", - [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); - polymake.method("to_sparsevector_double", - [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); -} diff --git a/deps/src/polymake_tools.h b/deps/src/polymake_tools.h deleted file mode 100644 index 37111c94..00000000 --- a/deps/src/polymake_tools.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef POLYMAKE_WRAP_TOOLS -#define POLYMAKE_WRAP_TOOLS - -namespace pm { -template -struct iterator_cross_const_helper, - true> { - typedef jlcxx::array_iterator_base, - std::remove_const_t> - iterator; - typedef jlcxx::array_iterator_base, - std::add_const_t> - const_iterator; -}; -} // namespace pm - -using namespace polymake; - -namespace { - -class PropertyValueHelper : public pm::perl::PropertyValue { - public: - PropertyValueHelper(const pm::perl::PropertyValue& pv) - : pm::perl::PropertyValue(pv){}; - - // in some form these will be moved to the polymake code - bool is_boolean() const - { - return call_function("is_boolean_wrapper", *this); - }; - - using Value::classify_number; - using Value::get_canned_typeinfo; - using Value::is_defined; - using Value::not_a_number; - using Value::number_is_float; - using Value::number_is_int; - using Value::number_is_object; - using Value::number_is_zero; -}; - -} // namespace - - -struct Polymake_Data { - polymake::Main* main_polymake_session; - polymake::Scope* main_polymake_scope; -}; - -extern Polymake_Data data; - -template struct WrappedSetIterator { - typename pm::Set::const_iterator iterator; - using value_type = T; - WrappedSetIterator(pm::Set& S) - { - iterator = pm::entire(S); - } -}; - -template struct WrappedStdListIterator { - typename std::list::const_iterator iterator; - using value_type = T; - WrappedStdListIterator(const std::list& L) - { - iterator = L.begin(); - } -}; - -#endif diff --git a/deps/src/polymake_tropicalnumber.cpp b/deps/src/polymake_tropicalnumber.cpp deleted file mode 100644 index 4487b9b7..00000000 --- a/deps/src/polymake_tropicalnumber.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include "polymake_includes.h" - -#include "polymake_tools.h" - -#include "polymake_functions.h" - -#include "polymake_type_modules.h" - -template<> struct jlcxx::IsMirroredType : std::false_type { }; -template<> struct jlcxx::IsMirroredType : std::false_type { }; - -void polymake_module_add_tropicalnumber(jlcxx::Module& polymake) -{ - polymake.add_type("Max"); - polymake.add_type("Min"); - - polymake - .add_type, jlcxx::TypeVar<2>>>( - "TropicalNumber", jlcxx::julia_type("Number", "Base")) - .apply_combination, - jlcxx::ParameterList>( - [](auto wrapped) { - typedef typename decltype(wrapped)::type tropType; - wrapped.template constructor(); - wrapped.method("zero", [](tropType& a) { return a.zero(); }); - wrapped.method("dual_zero", [](tropType& a) { return a.dual_zero(); }); - wrapped.method("one", [](tropType& a) { return a.one(); }); - wrapped.method("_add", [](tropType& a, tropType& b) { return a + b; }); - wrapped.method("_mul", [](tropType& a, tropType& b) { return a * b; }); - wrapped.method("//", [](tropType& a, tropType& b) { return a / b; }); - wrapped.method("_isequal", [](tropType& a, - tropType& b) { return a == b; }); - wrapped.method("<", [](tropType& a, - tropType& b) { return a < b; }); - wrapped.method("scalar", [](tropType& a) { return pm::Rational(a); }); - wrapped.method("show_small_obj", [](tropType& S) { - return show_small_object(S); - }); - }); - polymake.method("to_tropicalnumber_max_rational", - [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); - polymake.method("to_tropicalnumber_min_rational", - [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); - // polymake.method("to_tropicalnumber_max_integer", - // [](pm::perl::PropertyValue pv) { - // return to_SmallObject>(pv); - // }); - // polymake.method("to_tropicalnumber_min_integer", - // [](pm::perl::PropertyValue pv) { - // return to_SmallObject>(pv); - // }); -} diff --git a/deps/src/polymake_type_modules.h b/deps/src/polymake_type_modules.h deleted file mode 100644 index 4fd88274..00000000 --- a/deps/src/polymake_type_modules.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef POLYMAKE_TYPE_MODULES -#define POLYMAKE_TYPE_MODULES - -#include "polymake_jlcxx.h" - -using tparametric1 = jlcxx::TypeWrapper>>; - -tparametric1 polymake_module_add_array(jlcxx::Module& polymake); -void polymake_module_add_array_polynomial(jlcxx::Module& polymake, tparametric1 arrayt); - -void polymake_module_add_bigobject(jlcxx::Module& polymake); -void polymake_module_add_direct_calls(jlcxx::Module&); -void polymake_module_add_incidencematrix(jlcxx::Module& polymake); -void polymake_module_add_integer(jlcxx::Module& polymake); -void polymake_module_add_matrix(jlcxx::Module& polymake); -void polymake_module_add_polynomial(jlcxx::Module& polymake); -void polymake_module_add_rational(jlcxx::Module& polymake); -void polymake_module_add_pairs(jlcxx::Module& polymake); -void polymake_module_add_lists(jlcxx::Module& polymake); -void polymake_module_add_set(jlcxx::Module& polymake); -void polymake_module_add_sparsematrix(jlcxx::Module& polymake); -void polymake_module_add_sparsevector(jlcxx::Module& polymake); -void polymake_module_add_tropicalnumber(jlcxx::Module& polymake); -void polymake_module_add_type_translations(jlcxx::Module&); -void polymake_module_add_vector(jlcxx::Module& polymake); - -#endif diff --git a/deps/src/polymake_type_translations.cpp b/deps/src/polymake_type_translations.cpp deleted file mode 100644 index 5a00c508..00000000 --- a/deps/src/polymake_type_translations.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include "polymake_includes.h" - -#include "polymake_type_modules.h" - -#include "generated/get_type_names.h" - -void polymake_module_add_type_translations(jlcxx::Module& polymake) -{ - polymake.method("get_type_names", &get_type_names); -} diff --git a/deps/src/polymake_vectors.cpp b/deps/src/polymake_vectors.cpp deleted file mode 100644 index 396b74e8..00000000 --- a/deps/src/polymake_vectors.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include "polymake_includes.h" - -#include "polymake_tools.h" - -#include "polymake_functions.h" - -#include "polymake_type_modules.h" - -void polymake_module_add_vector(jlcxx::Module& polymake) -{ - - polymake - .add_type>>( - "Vector", jlcxx::julia_type("AbstractVector", "Base")) - .apply_combination( - [](auto wrapped) { - typedef typename decltype(wrapped)::type WrappedT; - typedef typename decltype(wrapped)::type::value_type elemType; - wrapped.template constructor(); - wrapped.method("_getindex", [](WrappedT& V, int64_t n) { - return elemType(V[n - 1]); - }); - wrapped.method("_setindex!", - [](WrappedT& V, elemType val, int64_t n) { - V[n - 1] = val; - }); - wrapped.method("length", &WrappedT::size); - wrapped.method("resize!", - [](WrappedT& V, int64_t sz) { V.resize(sz); }); - - wrapped.method("take", - [](pm::perl::BigObject p, const std::string& s, - WrappedT& V) { p.take(s) << V; }); - wrapped.method("show_small_obj", [](WrappedT& V) { - return show_small_object(V); - }); - }); - - polymake.method("to_vector_int", [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); - polymake.method("to_vector_integer", [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); - polymake.method("to_vector_rational", [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); - polymake.method("to_vector_double", [](pm::perl::PropertyValue pv) { - return to_SmallObject>(pv); - }); -} diff --git a/deps/type_setup.jl b/deps/type_setup.jl deleted file mode 100644 index e7cfa511..00000000 --- a/deps/type_setup.jl +++ /dev/null @@ -1,424 +0,0 @@ -type_tuples = let NT = NamedTuple{(:type_string, :ctype, :jltype, :convert_f)} - type_tuples = [ - ("PropertyValue", "pm::perl::PropertyValue", "PropertyValue", nothing), - ("OptionSet", "pm::perl::OptionSet", "OptionSet", nothing), - ("BigObject", "pm::perl::BigObject", "BigObject", "to_bigobject"), - ("Integer", "pm::Integer", "Integer", "to_integer"), - ("Rational", "pm::Rational", "Rational", "to_rational"), - ( - "Matrix_Int", - "pm::Matrix", - "Matrix{CxxWrap.CxxLong}", - "to_matrix_int", - ), - ( - "Matrix_Integer", - "pm::Matrix", - "Matrix{Integer}", - "to_matrix_integer", - ), - ( - "Matrix_Rational", - "pm::Matrix", - "Matrix{Rational}", - "to_matrix_rational", - ), - ( - "Matrix_double", - "pm::Matrix", - "Matrix{Float64}", - "to_matrix_double", - ), - ( - "Vector_Int", - "pm::Vector", - "Vector{CxxWrap.CxxLong}", - "to_vector_int", - ), - ( - "Vector_Integer", - "pm::Vector", - "Vector{Integer}", - "to_vector_integer", - ), - ( - "Vector_Rational", - "pm::Vector", - "Vector{Rational}", - "to_vector_rational", - ), - ( - "Vector_double", - "pm::Vector", - "Vector{Float64}", - "to_vector_double", - ), - ( - "Pair_Int_Int", - "std::pair", - "StdPair{CxxWrap.CxxLong,CxxWrap.CxxLong}", - "to_pair_int_int", - ), - ( - "List_Pair_Int_Int", - "std::list>", - "StdList{StdPair{CxxWrap.CxxLong,CxxWrap.CxxLong}}", - "to_list_pair_int_int", - ), - ("Set_Int", "pm::Set", "Set{CxxWrap.CxxLong}", "to_set_int"), - ( - "Array_Int", - "pm::Array", - "Array{CxxWrap.CxxLong}", - "to_array_int", - ), - ( - "Array_Integer", - "pm::Array", - "Array{Integer}", - "to_array_integer", - ), - ( - "Array_String", - "pm::Array", - "Array{String}", - "to_array_string", - ), - ( - "Array_Set_Int", - "pm::Array>", - "Array{Set{CxxWrap.CxxLong}}", - "to_array_set_int", - ), - ( - "Array_Array_Int", - "pm::Array>", - "Array{Array{CxxWrap.CxxLong}}", - "to_array_array_int", - ), - ( - "Array_Array_Integer", - "pm::Array>", - "Array{Array{Integer}}", - "to_array_array_integer", - ), - ( - "Array_Array_Rational", - "pm::Array>", - "Array{Array{Rational}}", - "to_array_array_rational", - ), - ( - "Array_Pair_Int_Int", - "pm::Array>", - "Array{StdPair{CxxWrap.CxxLong,CxxWrap.CxxLong}}", - "to_array_pair_int_int", - ), - ( - "Array_List_Pair_Int_Int", - "pm::Array>>", - "Array{StdList{StdPair{CxxWrap.CxxLong,CxxWrap.CxxLong}}}", - "to_array_list_pair_int_int", - ), - ( - "Array_Matrix_Integer", - "pm::Array>", - "Array{Matrix{Integer}}", - "to_array_matrix_integer", - ), - ( - "Array_BigObject", - "pm::Array", - "Array{BigObject}", - "to_array_bigobject", - ), - ( - "Array_Polynomial_Integer_Int", - "pm::Array>", - "Array{Polynomial{Integer,CxxWrap.CxxLong}}", - "to_array_polynomial_integer_int", - ), - ( - "Array_Polynomial_Rational_Int", - "pm::Array>", - "Array{Polynomial{Rational,CxxWrap.CxxLong}}", - "to_array_polynomial_rational_int", - ), - ( - "SparseMatrix_Integer", - "pm::SparseMatrix", - "SparseMatrix{Integer}", - "to_sparsematrix_integer", - ), - ( - "SparseMatrix_Rational", - "pm::SparseMatrix", - "SparseMatrix{Rational}", - "to_sparsematrix_rational", - ), - ( - "SparseMatrix_Int", - "pm::SparseMatrix", - "SparseMatrix{CxxWrap.CxxLong}", - "to_sparsematrix_int", - ), - ( - "SparseMatrix_double", - "pm::SparseMatrix", - "SparseMatrix{Float64}", - "to_sparsematrix_double", - ), - ( - "SparseVector_Integer", - "pm::SparseVector", - "SparseVector{Integer}", - "to_sparsevector_integer", - ), - ( - "SparseVector_Rational", - "pm::SparseVector", - "SparseVector{Rational}", - "to_sparsevector_rational", - ), - ( - "SparseVector_Int", - "pm::SparseVector", - "SparseVector{CxxWrap.CxxLong}", - "to_sparsevector_int", - ), - ( - "SparseVector_double", - "pm::SparseVector", - "SparseVector{Float64}", - "to_sparsevector_double", - ), - ( - "IncidenceMatrix_NonSymmetric", - "pm::IncidenceMatrix", - "IncidenceMatrix{NonSymmetric}", - "to_incidencematrix_nonsymmetric", - ), - ( - "IncidenceMatrix_Symmetric", - "pm::IncidenceMatrix", - "IncidenceMatrix{Symmetric}", - "to_incidencematrix_symmetric", - ), - ( - "TropicalNumber_Max_Rational", - "pm::TropicalNumber", - "TropicalNumber{Max,Rational}", - "to_tropicalnumber_max_rational", - ), - ( - "TropicalNumber_Min_Rational", - "pm::TropicalNumber", - "TropicalNumber{Min,Rational}", - "to_tropicalnumber_min_rational", - ), - # ( - # "TropicalNumber_Max_Integer", - # "pm::TropicalNumber", - # "TropicalNumber{Max,Integer}", - # "to_tropicalnumber_max_Integer", - # ), - # ( - # "TropicalNumber_Min_Integer", - # "pm::TropicalNumber", - # "TropicalNumber{Min,Integer}", - # "to_tropicalnumber_min_Integer", - # ), - ( - "Polynomial_Int_Int", - "pm::Polynomial", - "Polynomial{CxxWrap.CxxLong,CxxWrap.CxxLong}", - "to_polynomial_int_int", - ), - ( - "Polynomial_Integer_Int", - "pm::Polynomial", - "Polynomial{Integer,CxxWrap.CxxLong}", - "to_polynomial_integer_int", - ), - ( - "Polynomial_Rational_Int", - "pm::Polynomial", - "Polynomial{Rational,CxxWrap.CxxLong}", - "to_polynomial_rational_int", - ), - ( - "Polynomial_double_Int", - "pm::Polynomial", - "Polynomial{Float64,CxxWrap.CxxLong}", - "to_polynomial_double_int", - ), - ] - NT.(type_tuples) -end - -insert_type_map(type_string) = "insert_type_in_map(\"$type_string\", &POLYMAKETYPE_$type_string);" - -function map_inserts_code(type_tuples) - return join((insert_type_map(tt.type_string) for tt in type_tuples), "\n") -end - -function call_function_feed_argument_if(juliatype, ctype) - return """ -\telse if (jl_subtype(current_type, POLYMAKETYPE_$juliatype)) { - function << jlcxx::unbox(value); - }""" -end - -function call_function_feed_argument_code(type_tuples) - feeding_ifs = join( - (call_function_feed_argument_if(tt.type_string, tt.ctype) for tt in type_tuples), - "\n") - return """ -template -void polymake_call_function_feed_argument(T& function, jl_value_t* value) -{ - jl_value_t* current_type = jl_typeof(value); - if (jl_is_int64(value)) { - // check size of long, to be sure - static_assert(sizeof(long) == 8, "long must be 64 bit"); - function << static_cast(jl_unbox_int64(value)); - } else if (jl_is_bool(value)) { - function << jl_unbox_bool(value); - } else if (jl_is_string(value)) { - function << std::string(jl_string_data(value)); - } else if (jl_typeis(value, jl_float64_type)){ - function << jl_unbox_float64(value); - } $feeding_ifs - else { - throw std::runtime_error( - "Cannot pass function value: conversion failed for argument of type " + std::string(jl_typeof_str(value)) - ); - } - return; -} -""" -end - -function option_set_take_if(type_string, ctype) - return """ -\telse if (jl_subtype(current_type, POLYMAKETYPE_$type_string)) { - optset[key] << jlcxx::unbox(value); - }""" -end - -function option_set_take_code(type_tuples) - option_set_ifs = join( - (option_set_take_if(tt.type_string, tt.ctype) for tt in type_tuples), "\n") - - content =""" -void option_set_take(pm::perl::OptionSet optset, - std::string key, - jl_value_t* value) -{ - jl_value_t* current_type = jl_typeof(value); - if (jl_is_int64(value)) { - // check size of long, to be sure - static_assert(sizeof(long) == 8, "long must be 64 bit"); - optset[key] << static_cast(jl_unbox_int64(value)); - } else if (jl_is_bool(value)) { - optset[key] << jl_unbox_bool(value); - } else if (jl_is_string(value)) { - optset[key] << std::string(jl_string_data(value)); - } else if (jl_typeis(value, jl_float64_type)){ - optset[key] << jl_unbox_float64(value); - } $option_set_ifs - else { - throw std::runtime_error( - "Cannot create OptionSet: conversion failed for (key, value) = (" + - key + - ", ::" + - std::string(jl_typeof_str(value)) + - ")" - ); - } - return; -} -""" - return content -end - -function type_translator_code_jl(type_tuples) - content = join(("(\"$(tt.type_string)\", $(tt.jltype))," for tt in type_tuples), "\n") - return "const C_TYPES=[$content]" -end - -function type_translator(ctype, convert_f) - return """ -\t type_name_tuples[i] = jl_cstr_to_string(\"$convert_f\"); - realname = abi::__cxa_demangle(typeid($ctype).name(), nullptr, nullptr, &status); - type_name_tuples[i + 1] = jl_cstr_to_string(realname); - free(realname); - i += 2; - """ -end - -function get_type_names_code(type_tuples) - non_nothing_types = filter( i -> i.convert_f != nothing, type_tuples ) - - type_translations = join( - (type_translator(tt.ctype, tt.convert_f) for tt in non_nothing_types), - "\n") - - return """ -#include -#include - -jlcxx::ArrayRef get_type_names() { - int status; - char* realname; - int number_of_types = $(length(non_nothing_types)); - jl_value_t** type_name_tuples = new jl_value_t*[2 * number_of_types]; - int i = 0; -$type_translations - return jlcxx::make_julia_array(type_name_tuples, 2 * number_of_types); -} -""" -end - -let file = abspath( @__DIR__, "src", "generated", "map_inserts.h" ) - open(file,"w") do outputfile - println(outputfile, map_inserts_code(type_tuples)) - end -end - -let decls = ["jl_value_t* POLYMAKETYPE_$(tt.type_string);" for tt in type_tuples] - - intern = join(decls, "\n") - open(abspath( @__DIR__, "src", "generated", "type_declarations.h"), "w") do outputfile - println(outputfile, intern) - end - - extern = join(("extern $d" for d in decls), "\n") - open(abspath( @__DIR__, "src", "generated", "type_declarations_extern.h"), "w") do outputfile - println(outputfile, extern) - end -end - -let file = abspath( @__DIR__, "src", "generated", "polymake_call_function_feed_argument.h") - open(file, "w") do outputfile - println(outputfile, call_function_feed_argument_code(type_tuples)) - end -end - -let file = abspath( @__DIR__, "src", "generated", "option_set_take.h") - open(file,"w") do outputfile - println(outputfile, option_set_take_code(type_tuples)) - end -end - -let file = abspath( @__DIR__, "..", "src", "generated", "type_translator.jl" ) - open(file,"w") do outputfile - println(outputfile, type_translator_code_jl(type_tuples)) - end -end - -let file = abspath( @__DIR__, "src", "generated", "get_type_names.h" ) - open(file,"w") do outputfile - println(outputfile,get_type_names_code(type_tuples)) - end -end diff --git a/deps/xcodetypeinfo/CMakeLists.txt b/deps/xcodetypeinfo/CMakeLists.txt deleted file mode 100644 index 5d4a1242..00000000 --- a/deps/xcodetypeinfo/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -project(xcodetypeinfo) - -cmake_minimum_required(VERSION 3.01) - -find_package(JlCxx REQUIRED) - -include_directories(${JlCxx_DIR}/../../../include/) - -add_library(hello SHARED hello.cpp) -target_link_libraries(hello JlCxx::cxxwrap_julia) diff --git a/deps/xcodetypeinfo/hello.cpp b/deps/xcodetypeinfo/hello.cpp deleted file mode 100644 index a19dbd18..00000000 --- a/deps/xcodetypeinfo/hello.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include -#include - -#include "jlcxx/jlcxx.hpp" - -std::string greet(const std::string& str) -{ - return "hello, world"; -} - -JLCXX_MODULE define_module_hello(jlcxx::Module& mod) -{ - mod.method("greet", &greet); -} diff --git a/src/Polymake.jl b/src/Polymake.jl index a8279ce9..56c95733 100644 --- a/src/Polymake.jl +++ b/src/Polymake.jl @@ -41,13 +41,6 @@ function Base.showerror(io::IO, ex::PolymakeError) print(io, "Exception occured at Polymake side:\n$(ex.msg)") end -function check_jlcxx_version(version) - current_jlcxx = VersionNumber(unsafe_string(ccall(:cxxwrap_version_string, Cstring, ()))) - if (version != current_jlcxx) - error("""JlCxx version changed, please run `using Pkg; Pkg.build("Polymake");`""") - end -end - ########################### # Load Cxx stuff and init ########################## @@ -56,25 +49,22 @@ Sys.isapple() || Sys.islinux() || error("System is not supported!") deps_dir = joinpath(@__DIR__, "..", "deps") -isfile(joinpath(deps_dir,"jlcxx_version.jl")) && - isfile(joinpath(deps_dir,"deps.jl")) || - error("""Please run `using Pkg; Pkg.build("Polymake");`""") - -include(joinpath(deps_dir,"jlcxx_version.jl")) +include("repl.jl") +include("ijulia.jl") -check_jlcxx_version(jlcxx_version) +include(joinpath(deps_dir,"deps.jl")) -@wrapmodule(joinpath(deps_dir, "src", "libpolymake.$dlext"), :define_module_polymake) +@wrapmodule(joinpath(libpolymake_julia), :define_module_polymake) -include("generated/type_translator.jl") +json_script = joinpath(deps_dir,"rules","apptojson.pl") +json_folder = joinpath(deps_dir,"json") +mkpath(json_folder) -include("repl.jl") -include("ijulia.jl") +run(`$polymake_run_script $json_script $json_folder`) -include(joinpath(deps_dir,"deps.jl")) +include(type_translator) function __init__() - check_jlcxx_version(jlcxx_version) @initcxx if using_binary diff --git a/src/setup_types.jl b/src/setup_types.jl index ec37c679..2e6a1e20 100644 --- a/src/setup_types.jl +++ b/src/setup_types.jl @@ -40,8 +40,15 @@ fill_wrapped_types!(TypeConversionFunctions, get_type_names()) # now it is mapped to Base.copy # we make sure both really do a C++ copy for polymake types # whether this is deep or not cannot be enforced anyway -if jlcxx_version >= v"0.8.0" +# +# relevant is the libcxxwrap version that is used at build-time +# which is fixed to 0.8.0 for binarybuilder +# and cxxwrap 0.10 with libcxxwrap 0.7 might still work +# FIXME: we might need to add this with the build-time +# libcxxwrapversion for custom installations .... + +#if CxxWrap.libcxxwrapversion() >= v"0.8.0" Base.deepcopy(x::T) where T<:SmallObject = Base.copy(x) -else - Base.copy(x::T) where T<:SmallObject = Base.deepcopy(x) -end +#else +# Base.copy(x::T) where T<:SmallObject = Base.deepcopy(x) +#end