re-import sources as agreed with the maintainer

This commit is contained in:
Adam Samalik 2023-07-10 09:17:20 +02:00
parent 7ece5b1ae5
commit cf9cd35a63
6 changed files with 144 additions and 1 deletions

3
.gitignore vendored
View File

@ -1,2 +1,3 @@
SOURCES/superlu_5.2.0.tar.gz
/superlu_4.3.tar.gz
/superlu_5.1.1.tar.gz
/superlu_5.2.0.tar.gz

13
SuperLU-add-fpic.patch Normal file
View File

@ -0,0 +1,13 @@
diff -up SuperLU_4.3/MAKE_INC/make.linux.fpic SuperLU_4.3/MAKE_INC/make.linux
--- SuperLU_4.3/MAKE_INC/make.linux.fpic 2012-01-06 10:39:58.474356562 +0530
+++ SuperLU_4.3/MAKE_INC/make.linux 2012-01-06 10:40:59.933356590 +0530
@@ -46,7 +46,8 @@ ARCHFLAGS = cr
RANLIB = ranlib
CC = gcc
-CFLAGS = -O3
+FPIC = -fPIC
+CFLAGS = -O3 $(FPIC)
NOOPTS =
FORTRAN = g77
FFLAGS = -O2

View File

@ -0,0 +1,39 @@
diff -up SuperLU_4.3/SRC/Makefile.fix SuperLU_4.3/SRC/Makefile
--- SuperLU_4.3/SRC/Makefile.fix 2012-02-01 17:15:17.711698876 +0530
+++ SuperLU_4.3/SRC/Makefile 2012-02-01 17:17:07.794698927 +0530
@@ -111,7 +111,7 @@ ZLUSRC = \
ilu_zcolumn_dfs.o ilu_zpanel_dfs.o ilu_zcopy_to_ucol.o \
ilu_zpivotL.o zdiagonal.o
-all: single double complex complex16
+all: sharedlib
single: $(SLUSRC) $(ALLAUX) $(LAAUX) $(SLASRC) $(SCLAUX)
$(ARCH) $(ARCHFLAGS) $(SUPERLULIB) \
@@ -133,17 +133,22 @@ complex16: $(ZLUSRC) $(ALLAUX) $(LAAUX)
$(ZLUSRC) $(ALLAUX) $(LAAUX) $(ZLASRC) $(DZLAUX)
$(RANLIB) $(SUPERLULIB)
+sharedlib: $(ALLAUX) $(LAAUX) $(SLASRC) $(DLASRC) $(CLASRC) $(ZLASRC) $(SCLAUX) $(DZLAUX) $(SLUSRC) $(DLUSRC) $(CLUSRC) $(ZLUSRC)
+ $(CC) $(CFLAGS) $(LIBS) -shared -Wl,-soname,libsuperlu.so.4.3 -o libsuperlu.so.4.3 \
+ $(ALLAUX) $(LAAUX) $(SLASRC) $(DLASRC) $(CLASRC) $(ZLASRC) $(SCLAUX) \
+ $(DZLAUX) $(SLUSRC) $(DLUSRC) $(CLUSRC) $(ZLUSRC)
+ ln -sf libsuperlu.so.4.3 libsuperlu.so
##################################
# Do not optimize these routines #
##################################
-slamch.o: slamch.c ; $(CC) -c $(NOOPTS) $(CDEFS) $<
-dlamch.o: dlamch.c ; $(CC) -c $(NOOPTS) $(CDEFS) $<
-superlu_timer.o: superlu_timer.c ; $(CC) -c $(NOOPTS) $<
+slamch.o: slamch.c ; $(CC) $(FPIC) $(LIBS) -c $(NOOPTS) $(CDEFS) $<
+dlamch.o: dlamch.c ; $(CC) $(FPIC) $(LIBS) -c $(NOOPTS) $(CDEFS) $<
+superlu_timer.o: superlu_timer.c ; $(CC) $(FPIC) $(LIBS) -c $(NOOPTS) $<
##################################
.c.o:
- $(CC) $(CFLAGS) $(CDEFS) $(BLASDEF) -c $< $(VERBOSE)
+ $(CC) $(CFLAGS) $(CDEFS) $(BLASDEF) $(LIBS) -c $< $(VERBOSE)
.f.o:
$(FORTRAN) $(FFLAGS) -c $<

View File

@ -0,0 +1,13 @@
Index: SuperLU_4.3/SRC/util.c
===================================================================
--- SuperLU_4.3.orig/SRC/util.c
+++ SuperLU_4.3/SRC/util.c
@@ -29,7 +29,7 @@
void superlu_abort_and_exit(char* msg)
{
- fprintf(stderr, msg);
+ fputs(stderr, msg);
exit (-1);
}

View File

@ -0,0 +1,52 @@
Index: SuperLU_4.3/TESTING/Makefile
===================================================================
--- SuperLU_4.3.orig/TESTING/Makefile
+++ SuperLU_4.3/TESTING/Makefile
@@ -52,9 +52,9 @@ testmat:
single: ./stest stest.out
-./stest: $(SLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
+./stest: $(SLINTST) $(ALINTST) $(TMGLIB)
$(LOADER) $(LOADOPTS) $(SLINTST) $(ALINTST) \
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
+ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@
stest.out: stest stest.csh
@echo Testing SINGLE PRECISION linear equation routines
@@ -62,9 +62,9 @@ stest.out: stest stest.csh
double: ./dtest dtest.out
-./dtest: $(DLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
+./dtest: $(DLINTST) $(ALINTST) $(TMGLIB)
$(LOADER) $(LOADOPTS) $(DLINTST) $(ALINTST) \
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
+ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@
dtest.out: dtest dtest.csh
@echo Testing DOUBLE PRECISION linear equation routines
@@ -72,9 +72,9 @@ dtest.out: dtest dtest.csh
complex: ./ctest ctest.out
-./ctest: $(CLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
+./ctest: $(CLINTST) $(ALINTST) $(TMGLIB)
$(LOADER) $(LOADOPTS) $(CLINTST) $(ALINTST) \
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
+ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@
ctest.out: ctest ctest.csh
@echo Testing SINGLE COMPLEX linear equation routines
@@ -82,9 +82,9 @@ ctest.out: ctest ctest.csh
complex16: ./ztest ztest.out
-./ztest: $(ZLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
+./ztest: $(ZLINTST) $(ALINTST) $(TMGLIB)
$(LOADER) $(LOADOPTS) $(ZLINTST) $(ALINTST) \
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
+ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@
ztest.out: ztest ztest.csh
@echo Testing DOUBLE COMPLEX linear equation routines

25
SuperLU-removemc64.patch Normal file
View File

@ -0,0 +1,25 @@
Description: Provide stubs for the two functions whose implementation is nonfree
Author: Sébastien Villemot <sebastien@debian.org>
Forwarded: not-needed
Last-Update: 2013-11-27
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- /dev/null
+++ b/SRC/mc64ad.c
@@ -0,0 +1,16 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+void mc64id_(int *a)
+{
+ fprintf(stderr, "SuperLU: MC64 functionality not available (it uses non-free code). Aborting.\n");
+ abort();
+}
+
+void mc64ad_(int *a, int *b, int *c, int d[], int e[], double f[],
+ int *g, int h[], int *i, int j[], int *k, double l[],
+ int m[], int n[])
+{
+ fprintf(stderr, "SuperLU: MC64 functionality not available (it uses non-free code). Aborting.\n");
+ abort();
+}