Skip to content

Commit d1c244f

Browse files
authored
givaro: fix cross build, add meta.homepage (#394461)
2 parents 2b82ae0 + 96f28a6 commit d1c244f

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

pkgs/development/libraries/givaro/default.nix

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
stdenv.mkDerivation rec {
1313
pname = "givaro";
1414
version = "4.2.0";
15+
1516
src = fetchFromGitHub {
1617
owner = "linbox-team";
17-
repo = pname;
18-
rev = "v${version}";
18+
repo = "givaro";
19+
tag = "v${version}";
1920
sha256 = "sha256-KR0WJc0CSvaBnPRott4hQJhWNBb/Wi6MIhcTExtVobQ=";
2021
};
22+
2123
patches = [
2224
# Pull upstream fix for gcc-13:
2325
# https://github.com/linbox-team/givaro/pull/218
@@ -44,6 +46,8 @@ stdenv.mkDerivation rec {
4446
url = "https://github.com/linbox-team/givaro/commit/a18baf5227d4f3e81a50850fe98e0d954eaa3ddb.patch";
4547
hash = "sha256-IR0IHhCqbxgtsST30vxM9ak1nGtt0apxcLUQ1kS1DHw=";
4648
})
49+
# skip gmp version check for cross-compiling, our version is new enough
50+
./skip-gmp-check.patch
4751
];
4852

4953
enableParallelBuilding = true;
@@ -59,6 +63,7 @@ stdenv.mkDerivation rec {
5963
configureFlags =
6064
[
6165
"--without-archnative"
66+
"CCNAM=${stdenv.cc.cc.pname}"
6267
]
6368
++ lib.optionals stdenv.hostPlatform.isx86_64 [
6469
# disable SIMD instructions (which are enabled *when available* by default)
@@ -80,6 +85,7 @@ stdenv.mkDerivation rec {
8085

8186
meta = {
8287
description = "C++ library for arithmetic and algebraic computations";
88+
homepage = "https://casys.gricad-pages.univ-grenoble-alpes.fr/givaro/";
8389
mainProgram = "givaro-config";
8490
license = lib.licenses.cecill-b;
8591
maintainers = [ lib.maintainers.raskin ];
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/macros/gmp-check.m4 b/macros/gmp-check.m4
2+
index 72eba8c..25af64e 100644
3+
--- a/macros/gmp-check.m4
4+
+++ b/macros/gmp-check.m4
5+
@@ -105,21 +105,6 @@ AC_DEFUN([GIV_CHECK_GMP], [
6+
exit 1
7+
])
8+
9+
- AC_MSG_CHECKING([whether gmp version is at least $min_gmp_release])
10+
- AC_TRY_RUN(
11+
- [
12+
- #include <cstddef>
13+
- #include <gmp.h>
14+
- int main () {
15+
- return (__GNU_MP_RELEASE < $min_gmp_release);
16+
- }
17+
- ],
18+
- [ AC_MSG_RESULT(yes)
19+
- ],
20+
- [ AC_MSG_RESULT(no)
21+
- AC_MSG_ERROR(your GMP is too old. GMP release >= $min_gmp_release needed)
22+
- exit 1]
23+
- )
24+
AC_LANG_POP([C++])
25+
26+
AC_SUBST(GMP_CFLAGS)

0 commit comments

Comments
 (0)