sagemath/sagemath-flexiblas.patch
Jerry James 916819fe9b Version 9.4.
- Drop upstreamed -eclib patch.
- Drop unnecessary -readonly patch.
- Unbundle ipywidgets.
- Bundle memory_allocator for now.
2021-08-27 13:18:01 -06:00

283 lines
10 KiB
Diff

diff -up configure.orig configure
--- configure.orig 2021-08-22 02:45:52.000000000 -0600
+++ configure 2021-08-26 13:40:30.029000877 -0600
@@ -12703,12 +12703,12 @@ if test -n "$OPENBLAS_CFLAGS"; then
pkg_cv_OPENBLAS_CFLAGS="$OPENBLAS_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openblas >= 0.2.20\""; } >&5
- ($PKG_CONFIG --exists --print-errors "openblas >= 0.2.20") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flexiblas >= 3.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "flexiblas >= 3.0.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_OPENBLAS_CFLAGS=`$PKG_CONFIG --cflags "openblas >= 0.2.20" 2>/dev/null`
+ pkg_cv_OPENBLAS_CFLAGS=`$PKG_CONFIG --cflags "flexiblas >= 3.0.0" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -12720,12 +12720,12 @@ if test -n "$OPENBLAS_LIBS"; then
pkg_cv_OPENBLAS_LIBS="$OPENBLAS_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openblas >= 0.2.20\""; } >&5
- ($PKG_CONFIG --exists --print-errors "openblas >= 0.2.20") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flexiblas >= 3.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "flexiblas >= 3.0.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_OPENBLAS_LIBS=`$PKG_CONFIG --libs "openblas >= 0.2.20" 2>/dev/null`
+ pkg_cv_OPENBLAS_LIBS=`$PKG_CONFIG --libs "flexiblas >= 3.0.0" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -12746,9 +12746,9 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- OPENBLAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openblas >= 0.2.20" 2>&1`
+ OPENBLAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "flexiblas >= 3.0.0" 2>&1`
else
- OPENBLAS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openblas >= 0.2.20" 2>&1`
+ OPENBLAS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "flexiblas >= 3.0.0" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$OPENBLAS_PKG_ERRORS" >&5
@@ -12776,16 +12776,16 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
#ifdef __cplusplus
extern "C"
#endif
-char openblas_get_config ();
+char flexiblas_get_version ();
int
main ()
{
-return openblas_get_config ();
+return flexiblas_get_version ();
;
return 0;
}
_ACEOF
-for ac_lib in '' openblas cblas blas; do
+for ac_lib in '' flexiblas cblas blas; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -12835,22 +12835,22 @@ else
/* end confdefs.h. */
#include <stdio.h>
- char *openblas_get_config(void);
+ void flexiblas_get_version(void);
int version[3];
int
main ()
{
version[0] = version[1] = version[2] = 0;
/*printf("%s", openblas_get_config());*/
- if (sscanf(openblas_get_config(), "OpenBLAS %d.%d.%d",
- version, version+1, version+2) < 1)
- return 1;
+ flexiblas_get_version(&version[0], &version[1], &version[2]);
+
+
if ( 10000 * version[0]
+ 100 * version[1]
+ version[2]
- < 10000 * 0
- + 100 * 2
- + 20)
+ < 10000 * 3
+ + 100 * 0
+ + 0)
return 1;
;
return 0;
@@ -12903,7 +12903,7 @@ return cblas_dgemm ();
return 0;
}
_ACEOF
-for ac_lib in '' openblas cblas blas; do
+for ac_lib in '' flexiblas cblas blas; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -12967,7 +12967,7 @@ return dgeqrf ();
return 0;
}
_ACEOF
-for ac_lib in '' openblas lapack; do
+for ac_lib in '' flexiblas lapack; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -13031,7 +13031,7 @@ return dgeqrf_ ();
return 0;
}
_ACEOF
-for ac_lib in '' openblas lapack; do
+for ac_lib in '' flexiblas lapack; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -13095,7 +13095,7 @@ return DGEQRF ();
return 0;
}
_ACEOF
-for ac_lib in '' openblas lapack; do
+for ac_lib in '' flexiblas lapack; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -13159,7 +13159,7 @@ return DGEQRF_ ();
return 0;
}
_ACEOF
-for ac_lib in '' openblas lapack; do
+for ac_lib in '' flexiblas lapack; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -13247,16 +13247,16 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
#ifdef __cplusplus
extern "C"
#endif
-char openblas_get_config ();
+char flexiblas_get_version ();
int
main ()
{
-return openblas_get_config ();
+return flexiblas_get_version ();
;
return 0;
}
_ACEOF
-for ac_lib in '' openblas cblas blas; do
+for ac_lib in '' flexiblas cblas blas; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -13306,22 +13306,22 @@ else
/* end confdefs.h. */
#include <stdio.h>
- char *openblas_get_config(void);
+ void flexiblas_get_version(void);
int version[3];
int
main ()
{
version[0] = version[1] = version[2] = 0;
/*printf("%s", openblas_get_config());*/
- if (sscanf(openblas_get_config(), "OpenBLAS %d.%d.%d",
- version, version+1, version+2) < 1)
- return 1;
+ flexiblas_get_version(&version[0], &version[1], &version[2]);
+
+
if ( 10000 * version[0]
+ 100 * version[1]
+ version[2]
- < 10000 * 0
- + 100 * 2
- + 20)
+ < 10000 * 3
+ + 100 * 0
+ + 0)
return 1;
;
return 0;
@@ -13374,7 +13374,7 @@ return cblas_dgemm ();
return 0;
}
_ACEOF
-for ac_lib in '' openblas cblas blas; do
+for ac_lib in '' flexiblas cblas blas; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -13438,7 +13438,7 @@ return dgeqrf ();
return 0;
}
_ACEOF
-for ac_lib in '' openblas lapack; do
+for ac_lib in '' flexiblas lapack; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -13502,7 +13502,7 @@ return dgeqrf_ ();
return 0;
}
_ACEOF
-for ac_lib in '' openblas lapack; do
+for ac_lib in '' flexiblas lapack; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -13566,7 +13566,7 @@ return DGEQRF ();
return 0;
}
_ACEOF
-for ac_lib in '' openblas lapack; do
+for ac_lib in '' flexiblas lapack; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -13630,7 +13630,7 @@ return DGEQRF_ ();
return 0;
}
_ACEOF
-for ac_lib in '' openblas lapack; do
+for ac_lib in '' flexiblas lapack; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -13705,12 +13705,12 @@ if test -n "$OPENBLASPCDIR"; then
pkg_cv_OPENBLASPCDIR="$OPENBLASPCDIR"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openblas\""; } >&5
- ($PKG_CONFIG --exists --print-errors "openblas") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flexiblas\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "flexiblas") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_OPENBLASPCDIR=`$PKG_CONFIG --variable="pcfiledir" "openblas" 2>/dev/null`
+ pkg_cv_OPENBLASPCDIR=`$PKG_CONFIG --variable="pcfiledir" "flexiblas" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -13925,7 +13925,7 @@ fi
if test x$sage_spkg_install_openblas != xyes; then :
- SAGE_OPENBLAS_PC_COMMAND="\$(LN) -sf \"$OPENBLASPCDIR/openblas.pc\" \"\$(@)\""
+ SAGE_OPENBLAS_PC_COMMAND="\$(LN) -sf \"$OPENBLASPCDIR/flexiblas.pc\" \"\$(@)\""
if test x$sage_install_blas_pc = xyes; then :
diff -up src/sage/env.py.orig src/sage/env.py
--- src/sage/env.py.orig 2021-08-26 13:39:46.040938448 -0600
+++ src/sage/env.py 2021-08-26 13:40:30.029000877 -0600
@@ -212,7 +212,7 @@ MAXIMA_FAS = var("MAXIMA_FAS")
KENZO_FAS = var("KENZO_FAS")
SAGE_NAUTY_BINS_PREFIX = var("SAGE_NAUTY_BINS_PREFIX", "")
ARB_LIBRARY = var("ARB_LIBRARY", "arb")
-CBLAS_PC_MODULES = var("CBLAS_PC_MODULES", "cblas:openblas:blas")
+CBLAS_PC_MODULES = var("CBLAS_PC_MODULES", "flexiblas:cblas:openblas:blas")
ECL_CONFIG = var("ECL_CONFIG", "ecl-config")
NTL_INCDIR = var("NTL_INCDIR")
NTL_LIBDIR = var("NTL_LIBDIR")
@@ -456,7 +456,7 @@ def cython_aliases(required_modules=('ff
for lib, required in itertools.chain(((lib, True) for lib in required_modules),
((lib, False) for lib in optional_modules)):
var = lib.upper().replace("-", "") + "_"
- if lib == 'cblas':
+ if lib == 'cblas' or lib == 'lapack':
lib = get_cblas_pc_module_name()
if lib == 'zlib':
aliases[var + "CFLAGS"] = ""