Unverified Commit 240ca368 authored by George Huebner's avatar George Huebner
Browse files

singular: fix docbuilding on non-sandboxed builds

This upgrade fixes the issue with drawTropicalCurve docbuilding
on Darwin (although said doctest is pretty useless now that Apple has
removed postscript from macOS).

Removed enableGfanlib; you can still overrideAttrs

Added mpfr to be more consistent with upstream packaging
recommendations
parent 27ad665e
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
, getconf
, flint3
, ntl
, mpfr
, cddlib
, gfan
, lrcalc
@@ -15,8 +16,7 @@
, latex2html
, texinfo
, texliveSmall
, enableDocs ? !stdenv.isDarwin
, enableGfanlib ? true
, enableDocs ? true
}:

stdenv.mkDerivation rec {
@@ -40,12 +40,11 @@ stdenv.mkDerivation rec {
  };

  configureFlags = [
    "--enable-gfanlib"
    "--with-ntl=${ntl}"
    "--disable-pyobject-module"
    "--with-flint=${flint3}"
  ] ++ lib.optionals enableDocs [
    "--enable-doc-build"
  ] ++ lib.optionals enableGfanlib [
    "--enable-gfanlib"
  ];

  prePatch = ''
@@ -61,14 +60,15 @@ stdenv.mkDerivation rec {
  buildInputs = [
    # necessary
    gmp
    flint3
    # by upstream recommended but optional
    ncurses
    readline
    ntl
    flint3
    mpfr
    lrcalc
    # for gfanlib
    gfan
  ] ++ lib.optionals enableGfanlib [
    cddlib
  ];

@@ -100,6 +100,8 @@ stdenv.mkDerivation rec {
  doCheck = true; # very basic checks, does not test any libraries

  installPhase = ''
    # clean up any artefacts a previous non-sandboxed docbuild may have left behind
    rm /tmp/conic.log /tmp/conic.tex /tmp/tropicalcurve*.tex || true
    make install
  '' + lib.optionalString enableDocs ''
    # Sage uses singular.info, which is not installed by default
@@ -118,8 +120,8 @@ stdenv.mkDerivation rec {
    "Buch/buch.lst"
    "Plural/short.lst"
    "Old/factor.tst"
  ] ++ lib.optionals enableGfanlib [
    # tests that require gfanlib
    # requires "DivRemIdU", a syzextra (undocumented) command
    "Short/ok_s.lst"
  ];