yacas: 1.2.2 -> 1.6.1

They switched to cmake and talk about mingw cross, so I can kill
crossAttrs too.
This commit is contained in:
John Ericson 2018-05-10 02:10:09 -04:00
parent 9cb1d82be6
commit ae429f8e55
2 changed files with 27 additions and 49 deletions

View File

@ -1,44 +1,39 @@
{stdenv, fetchurl, perl}:
{ stdenv, fetchFromGitHub, cmake, perl
, enableGui ? false, qt5
, enableJupyter ? false, boost, jsoncpp, openssl, zmqpp
}:
stdenv.mkDerivation rec {
name = "yacas-1.2.2";
name = "yacas-${version}";
version = "1.6.1";
src = fetchurl {
url = "http://yacas.sourceforge.net/backups/${name}.tar.gz";
sha256 = "1dmafm3w0lm5w211nwkfzaid1rvvmgskz7k4500pjhgdczi5sd78";
src = fetchFromGitHub {
owner = "grzegorzmazur";
repo = "yacas";
rev = "v${version}";
sha256 = "0awvlvf607r4hwl1vkhs6jq2s6ig46c66pmr4vspj2cdnypx99cc";
};
hardeningDisable = [ "format" ];
cmakeFlags = [
"-DENABLE_CYACAS_GUI=${if enableGui then "ON" else "OFF"}"
"-DENABLE_CYACAS_KERNEL=${if enableJupyter then "ON" else "OFF"}"
];
# Perl is only for the documentation
nativeBuildInputs = [ perl ];
patches = [ ./gcc43.patch ];
crossAttrs = {
# Trick to get host-built programs needed for the cross-build.
# If yacas had proper makefiles, this would not be needed.
preConfigure = ''
./configure
pushd src
make mkfastprimes
cp mkfastprimes ../..
popd
pushd manmake
make manripper removeduplicates
cp manripper removeduplicates ../..
popd
'';
preBuild = ''
cp ../mkfastprimes ../manripper ../removeduplicates src
'';
};
nativeBuildInputs = [ cmake perl ];
buildInputs = [
] ++ stdenv.lib.optionals enableGui (with qt5; [ qtbase qtwebkit ])
++ stdenv.lib.optionals enableJupyter [ boost jsoncpp openssl zmqpp ]
;
meta = {
description = "Easy to use, general purpose Computer Algebra System";
homepage = http://yacas.sourceforge.net/;
homepage = http://www.yacas.org/;
license = stdenv.lib.licenses.gpl2Plus;
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux;
broken = enableGui || enableJupyter;
};
}

View File

@ -1,17 +0,0 @@
Taken from gentoo:
http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-mathematics/yacas/files/yacas-1.2.2-gcc43.patch?rev=1.1&view=markup
Index: yacas-1.2.2-gcc43.patch
===================================================================
--- a/manmake/manripper.cpp
+++ b/manmake/manripper.cpp
@@ -1,7 +1,8 @@
-#include <stdio.h>
-#include <ctype.h>
+#include <cstdio>
+#include <cctype>
#include <string>
+#include <cstring>
#include <map>
using namespace std;