From 72e3430637694e95f4cc1111bbb329bff8b0c3c3 Mon Sep 17 00:00:00 2001 From: Benjamin Lorenz Date: Wed, 23 Sep 2020 23:39:56 +0200 Subject: [PATCH 1/4] [polymake] bump to 4.2 and add patch for sigint also switch to archive source --- P/polymake/build_tarballs.jl | 12 ++++++++++-- .../config/config-x86_64-apple-darwin14.ninja | 4 ++-- P/polymake/bundled/patches/sigint.patch | 13 +++++++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 P/polymake/bundled/patches/sigint.patch diff --git a/P/polymake/build_tarballs.jl b/P/polymake/build_tarballs.jl index f663dfe8fc9..2c241803051 100644 --- a/P/polymake/build_tarballs.jl +++ b/P/polymake/build_tarballs.jl @@ -3,16 +3,19 @@ using BinaryBuilder, Pkg name = "polymake" -version = v"4.1.0" +version = v"4.2.0" # Collection of sources required to build polymake sources = [ - GitSource("https://github.com/polymake/polymake.git", "8704ebbba9f8cc2b07f824a283ffed49a8c036be") + ArchiveSource("https://github.com/polymake/polymake/archive/V$(version.major).$(version.minor).tar.gz", "d308f551ef4c9f490a3a848d45a1ab41ae6461b1daf5be3deeaebad7df3816d4") DirectorySource("./bundled") ] # Bash recipe for building across all platforms script = raw""" +# the prepared config files for non-native architectures +# assume a fixed source directory +mv $WORKSPACE/srcdir/{polymake-*,polymake} cd $WORKSPACE/srcdir/polymake perl_version=5.30.3 @@ -24,7 +27,12 @@ for dir in FLINT GMP MPFR PPL Perl bliss boost cddlib lrslib normaliz; do ln -s .. ${prefix}/deps/${dir}_jll done +# adjust for hardcoded /workspace dirs atomic_patch -p1 ../patches/relocatable.patch + +# to unbreak ctrl+c in julia +atomic_patch -p1 ../patches/sigint.patch + if [[ $target == *darwin* ]]; then # we cannot run configure and instead provide config files mkdir -p build/Opt diff --git a/P/polymake/bundled/config/config-x86_64-apple-darwin14.ninja b/P/polymake/bundled/config/config-x86_64-apple-darwin14.ninja index bd9418f8dfc..9ca1991425e 100644 --- a/P/polymake/bundled/config/config-x86_64-apple-darwin14.ninja +++ b/P/polymake/bundled/config/config-x86_64-apple-darwin14.ninja @@ -2,7 +2,7 @@ configure.command=/workspace/srcdir/polymake/configure CXX=clang++ --with-libcxx --with-lrs-include=/workspace/destdir/include/lrslib root=/workspace/srcdir/polymake core.includes=-I${root}/include/core-wrappers -I${root}/include/core -app.includes=-I${root}/include/app-wrappers -I${root}/include/apps -I${root}/include/external/permlib -I${root}/include/external/TOSimplex +app.includes=-I${root}/include/app-wrappers -I${root}/include/apps -I${root}/include/external/permlib -I${root}/include/external/TOSimplex -I${root}/include/external/Miniball CC = clang -target x86_64-apple-darwin14 --sysroot /opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root CXX = clang++ -target x86_64-apple-darwin14 --sysroot /opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root @@ -23,7 +23,7 @@ LDsharedFLAGS = -mmacosx-version-min=10.8 -L/workspace/destdir/lib -Wl,-rpath,/w LDcallableFLAGS = -mmacosx-version-min=10.8 -L/workspace/destdir/lib -Wl,-rpath,/workspace/destdir/lib -dynamiclib -undefined dynamic_lookup -fstack-protector-strong -mmacosx-version-min=10.8 -fstack-protector-strong LDsonameFLAGS = -install_name /workspace/destdir/lib/ LIBS = -lc++ -lflint -lmpfr -lgmp -lpthread -ExternalHeaders = permlib TOSimplex +ExternalHeaders = permlib TOSimplex Miniball Arch = darwin.x86_64 BundledExts = cdd atint bliss flint libnormaliz lrs ppl sympol BuildModes = Opt Debug diff --git a/P/polymake/bundled/patches/sigint.patch b/P/polymake/bundled/patches/sigint.patch new file mode 100644 index 00000000000..d34eebebee6 --- /dev/null +++ b/P/polymake/bundled/patches/sigint.patch @@ -0,0 +1,13 @@ +diff --git a/perllib/Polymake/Main.pm b/perllib/Polymake/Main.pm +index ce048584af..7a9a723dac 100644 +--- a/perllib/Polymake/Main.pm ++++ b/perllib/Polymake/Main.pm +@@ -23,7 +23,7 @@ sub import { + (undef, my ($user_opts, $must_reset_SIGCHLD)) = @_; + + # this guarantees initialization of internal structures for signal handling +- local $SIG{INT} = 'IGNORE'; ++ local $SIG{USR1} = 'IGNORE'; + + # these redefinitions must happen before the whole slew of polymake perl code is loaded! + if ($must_reset_SIGCHLD) { From f47f65f3768901e993a28fb87aa773d8372169ac Mon Sep 17 00:00:00 2001 From: Benjamin Lorenz Date: Fri, 9 Oct 2020 11:51:34 +0200 Subject: [PATCH 2/4] [polymake] remove CompilerAbi for macos --- P/polymake/build_tarballs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/P/polymake/build_tarballs.jl b/P/polymake/build_tarballs.jl index 2c241803051..4a4f8510d9c 100644 --- a/P/polymake/build_tarballs.jl +++ b/P/polymake/build_tarballs.jl @@ -94,7 +94,7 @@ install_license COPYING # These are the platforms we will build for by default, unless further # platforms are passed in on the command line platforms = [ - MacOS(:x86_64, compiler_abi=CompilerABI(cxxstring_abi=:cxx11)), + MacOS(:x86_64), Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(cxxstring_abi=:cxx11)), ] From 619db7d76342b84e68dfabbcdaae1f0d2abcabac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Fri, 9 Oct 2020 10:52:53 +0100 Subject: [PATCH 3/4] [polymake] Use new Platform type --- P/polymake/build_tarballs.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/P/polymake/build_tarballs.jl b/P/polymake/build_tarballs.jl index 4a4f8510d9c..523c867afd3 100644 --- a/P/polymake/build_tarballs.jl +++ b/P/polymake/build_tarballs.jl @@ -94,9 +94,10 @@ install_license COPYING # These are the platforms we will build for by default, unless further # platforms are passed in on the command line platforms = [ - MacOS(:x86_64), - Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(cxxstring_abi=:cxx11)), + Platform("x86_64", "linux"; libc="glibc"), + Platform("x86_64", "macos"), ] +platforms = expand_cxxstring_abis(platforms) # The products that we will ensure are always built products = [ From b2cd2cb996a317d6b8b06b4213519e6afa6c8690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Fri, 9 Oct 2020 11:19:43 +0100 Subject: [PATCH 4/4] [polymake] Fix dependencies --- P/polymake/build_tarballs.jl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/P/polymake/build_tarballs.jl b/P/polymake/build_tarballs.jl index 523c867afd3..cebde5acd66 100644 --- a/P/polymake/build_tarballs.jl +++ b/P/polymake/build_tarballs.jl @@ -109,17 +109,17 @@ products = [ # Dependencies that must be installed before this package can be built dependencies = [ - Dependency("CompilerSupportLibraries_jll") - Dependency("FLINT_jll") + Dependency("CompilerSupportLibraries_jll"), + Dependency("FLINT_jll"), Dependency("GMP_jll", v"6.1.2"), Dependency("MPFR_jll", v"4.0.2"), - Dependency("PPL_jll") - Dependency(PackageSpec(name="Perl_jll", uuid="83958c19-0796-5285-893e-a1267f8ec499", version=v"5.30.3")) - Dependency("bliss_jll") - Dependency("boost_jll") - Dependency("cddlib_jll") - Dependency("lrslib_jll") - Dependency("normaliz_jll") + Dependency("PPL_jll"), + Dependency(PackageSpec(name="Perl_jll", uuid="83958c19-0796-5285-893e-a1267f8ec499", version=v"5.30.3")), + Dependency("bliss_jll"), + Dependency("boost_jll"), + Dependency("cddlib_jll"), + Dependency("lrslib_jll"), + Dependency("normaliz_jll"), ] # Build the tarballs, and possibly a `build.jl` as well.