nixpkgs/pkgs/by-name/su/superlu_dist/mc64ad_dist-stub.patch
2025-03-07 12:25:04 +08:00

32 lines
1.0 KiB
Diff

mc64ad_dist.c was removed (DFSG nonfree), create stubs
--- /dev/null
+++ b/SRC/prec-independent/mc64ad_dist.c
@@ -0,0 +1,27 @@
+/* The original mc64ad_dist.c is nonfree and has been removed.
+ We provide a stub interface here instead.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "superlu_ddefs.h"
+
+/* only mc64id_dist and mc64ad_dist are referenced by SuperLU-Dist code */
+
+/* Subroutine */ int_t mc64id_dist(int_t *icntl)
+{
+ fprintf(stderr, "SuperLU-Dist: MC64 functionality not available.\n(It uses code under a non-free HSL licence which does not permit redistribution).\nAborting mc64id_dist.\n");
+ abort();
+ return 0;
+}
+
+int_t mc64ad_dist(int_t *job, int_t *n, int_t *ne, int_t *
+ ip, int_t *irn, double *a, int_t *num, int_t *cperm,
+ int_t *liw, int_t *iw, int_t *ldw, double *dw, int_t *
+ icntl, int_t *info)
+{
+ fprintf(stderr, "SuperLU-Dist: MC64 functionality not available.\n(It uses code under a non-free HSL licence which does not permit redistribution).\nAborting mc64ad_dist.\n");
+ abort();
+ return 0;
+}