Merge pull request #43853 from timokau/singular-4.1.1p1

singular: 4.1.1p1 -> 4.1.1p2
This commit is contained in:
Michael Raskin 2018-07-23 13:20:39 +00:00 committed by GitHub
commit ef4d546554
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl, gmp, bison, perl, ncurses, readline, coreutils, pkgconfig
, lib
, autoreconfHook
, file
, flint
@ -9,21 +10,25 @@
}:
stdenv.mkDerivation rec {
name = "singular-${version}${patchVersion}";
version = "4.1.1";
patchVersion = "p1";
name = "singular-${version}";
version = "4.1.1p2";
urlVersion = builtins.replaceStrings [ "." ] [ "-" ] version;
src = fetchurl {
url = "http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/${urlVersion}/singular-${version}${patchVersion}.tar.gz";
sha256 = "0wvgz7l1b7zkpmim0r3mvv4fp8xnhlbz4c7hc90rn30snlansnf1";
src = let
# singular sorts its tarballs in directories by base release (without patch version)
# for example 4.1.1p1 will be in the directory 4-1-1
baseVersion = builtins.head (lib.splitString "p" version);
urlVersion = builtins.replaceStrings [ "." ] [ "-" ] baseVersion;
in
fetchurl {
url = "http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/${urlVersion}/singular-${version}.tar.gz";
sha256 = "07x9kri8vl4galik7lr6pscq3c51n8570pyw64i7gbj0m706f7wf";
};
configureFlags = [
"--with-ntl=${ntl}"
] ++stdenv.lib.optionals enableFactory [
] ++ lib.optionals enableFactory [
"--enable-factory"
] ++ stdenv.lib.optionals enableGfanlib [
] ++ lib.optionals enableGfanlib [
"--enable-gfanlib"
];
@ -42,7 +47,7 @@ stdenv.mkDerivation rec {
readline
ntl
flint
] ++ stdenv.lib.optionals enableGfanlib [
] ++ lib.optionals enableGfanlib [
cddlib
];
nativeBuildInputs = [
@ -60,10 +65,12 @@ stdenv.mkDerivation rec {
-i '{}' ';'
'';
hardeningDisable = stdenv.lib.optional stdenv.isi686 "stackprotector";
hardeningDisable = lib.optional stdenv.isi686 "stackprotector";
# The Makefile actually defaults to `make install` anyway
buildPhase = "true;";
buildPhase = ''
# do nothing
'';
installPhase = ''
mkdir -p "$out"
@ -77,7 +84,7 @@ stdenv.mkDerivation rec {
# simple test to make sure singular starts and finds its libraries
doInstallCheck = true;
installCheckPhase = ''
$out/bin/Singular -c 'LIB "freegb.lib"; exit;'
"$out/bin/Singular" -c 'LIB "freegb.lib"; exit;'
if [ $? -ne 0 ]; then
echo >&2 "Error loading the freegb library in Singular."
exit 1
@ -86,9 +93,10 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
meta = with stdenv.lib; {
meta = with lib; {
description = "A CAS for polynomial computations";
maintainers = with maintainers; [ raskin ];
maintainers = with maintainers; [ raskin timokau ];
# 32 bit x86 fails with some link error: `undefined reference to `__divmoddi4@GCC_7.0.0'`
platforms = subtractLists platforms.i686 platforms.linux;
license = licenses.gpl3; # Or GPLv2 at your option - but not GPLv4
homepage = http://www.singular.uni-kl.de;