diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2013-02-17 10:59:43 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2013-02-17 11:01:20 +0100 |
commit | b2f8432ad3fc7d655c6bb41ecbdfdbbb28ced4c7 (patch) | |
tree | 728ed89be5b61373be0d4565c2f67e7713f70b48 /pkgs/development/interpreters/pure | |
parent | 524d9b656e1c72d3fdeebeb674f0c494f9fc8ba8 (diff) |
pure: update and fix by patching
Diffstat (limited to 'pkgs/development/interpreters/pure')
-rw-r--r-- | pkgs/development/interpreters/pure/default.nix | 12 | ||||
-rw-r--r-- | pkgs/development/interpreters/pure/new-gcc.patch | 62 |
2 files changed, 69 insertions, 5 deletions
diff --git a/pkgs/development/interpreters/pure/default.nix b/pkgs/development/interpreters/pure/default.nix index dd1982e836db7..83a1c0ac5009d 100644 --- a/pkgs/development/interpreters/pure/default.nix +++ b/pkgs/development/interpreters/pure/default.nix @@ -1,5 +1,5 @@ x@{builderDefsPackage - , llvm, gmp, mpfr, readline + , llvm, gmp, mpfr, readline, bison, flex , ...}: builderDefsPackage (a : @@ -12,11 +12,11 @@ let sourceInfo = rec { baseName="pure"; project="pure-lang"; - version="0.49"; + version="0.56"; name="${baseName}-${version}"; extension="tar.gz"; url="http://${project}.googlecode.com/files/${name}.${extension}"; - hash="0kkrcmmqks82g3qlkvs3cd23v6b5948rw3xsdadd1jidh74jg33x"; + hash="1ll29j31lp7ymp1kq57328q8md7pkp8jmwsadp67j4cdlzc3zdhj"; }; in rec { @@ -29,8 +29,10 @@ rec { inherit buildInputs; /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMakeInstall"]; - + phaseNames = ["doPatch" "doConfigure" "doMakeInstall"]; + + patches = [ ./new-gcc.patch ]; + meta = { description = "A purely functional programming language based on term rewriting"; maintainers = with a.lib.maintainers; diff --git a/pkgs/development/interpreters/pure/new-gcc.patch b/pkgs/development/interpreters/pure/new-gcc.patch new file mode 100644 index 0000000000000..ea2cd8450591a --- /dev/null +++ b/pkgs/development/interpreters/pure/new-gcc.patch @@ -0,0 +1,62 @@ +diff --git a/runtime.cc b/runtime.cc +index 04cbc40..54a0b43 100644 +--- a/runtime.cc ++++ b/runtime.cc +@@ -13121,39 +13121,6 @@ unsigned int sleep(unsigned int secs) + } + #endif + +-/* Horrible kludge to get round, trunc and the inverse hyperbolic functions +- from libmingwex.a (these are in C99, but not in the Windows system +- libraries, and LLVM doesn't know how to get them either). */ +- +-extern "C" +-double __round(double x) +-{ +- return round(x); +-} +- +-extern "C" +-double __trunc(double x) +-{ +- return trunc(x); +-} +- +-extern "C" +-double __asinh(double x) +-{ +- return asinh(x); +-} +- +-extern "C" +-double __acosh(double x) +-{ +- return acosh(x); +-} +- +-extern "C" +-double __atanh(double x) +-{ +- return atanh(x); +-} + + /* File type bits. */ + +diff --git a/util.hh b/util.hh +index ae95b79..eab3330 100644 +--- a/util.hh ++++ b/util.hh +@@ -58,13 +58,6 @@ char *default_encoding(); + double my_strtod(const char *nptr, char **endptr); + char *my_formatd(char *buffer, const char *format, double d); + +-/* Windows doesn't have strptime, so we provide a suitable replacement from +- GNU libc (see strptime.c). */ +- +-#ifndef HAVE_STRPTIME +-extern "C" +-char *strptime(const char *s, const char *format, struct tm *tm); +-#endif + + /* Windows doesn't have mkstemp, so we provide a suitable replacement. */ + |