From 79e7ff732ca6cdfbc8d2e3fd8b59af6640052b3c Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Thu, 4 Aug 2022 04:01:31 +0900 Subject: [PATCH 01/20] Make furo sage standard sphinx theme --- .github/workflows/doc-build.yml | 1 - build/pkgs/sagemath_doc_html/dependencies | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 5e317c5238c..9d5934bd3af 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -24,7 +24,6 @@ jobs: # Reuse built SAGE_LOCAL contained in the Docker image ./bootstrap ./configure --enable-build-as-root --prefix=/sage/local --with-sage-venv --enable-download-from-upstream-url - make furo - name: Build run: make doc-html diff --git a/build/pkgs/sagemath_doc_html/dependencies b/build/pkgs/sagemath_doc_html/dependencies index 94342638a01..039e22f11ef 100644 --- a/build/pkgs/sagemath_doc_html/dependencies +++ b/build/pkgs/sagemath_doc_html/dependencies @@ -1,4 +1,4 @@ -sagelib sphinx pplpy_doc | $(SAGERUNTIME) maxima networkx scipy sympy matplotlib pillow mathjax mpmath ipykernel jupyter_client conway_polynomials tachyon jmol ipywidgets jupyter_sphinx sage_docbuild elliptic_curves +sagelib sphinx pplpy_doc | $(SAGERUNTIME) maxima networkx scipy sympy matplotlib pillow mathjax mpmath ipykernel jupyter_client conway_polynomials tachyon jmol ipywidgets jupyter_sphinx sage_docbuild elliptic_curves furo # Building the documentation has many dependencies, because all # documented modules are imported and because we use matplotlib to From 2505ea042169d8a179d4b1f28a0c0baeabdd421a Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Thu, 4 Aug 2022 04:35:50 +0900 Subject: [PATCH 02/20] Elevate furo to standard package --- build/pkgs/furo/type | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pkgs/furo/type b/build/pkgs/furo/type index 134d9bc32d5..a6a7b9cd726 100644 --- a/build/pkgs/furo/type +++ b/build/pkgs/furo/type @@ -1 +1 @@ -optional +standard diff --git a/configure.ac b/configure.ac index 4ab080c6115..225ffe43d0c 100644 --- a/configure.ac +++ b/configure.ac @@ -489,7 +489,7 @@ AC_ARG_ENABLE([doc], AS_HELP_STRING([--disable-doc], [disable build of the Sage documentation and packages depending on it]), [ dnl Disable packages needed for docbuilding - for pkg in sage_docbuild alabaster babel snowballstemmer imagesize sphinx sphinxcontrib_devhelp sphinxcontrib_jsmath sphinxcontrib_serializinghtml sphinxcontrib_applehelp sphinxcontrib_htmlhelp sphinxcontrib_qthelp sphinxcontrib_websupport jupyter_sphinx; do + for pkg in sage_docbuild alabaster babel snowballstemmer imagesize sphinx sphinxcontrib_devhelp sphinxcontrib_jsmath sphinxcontrib_serializinghtml sphinxcontrib_applehelp sphinxcontrib_htmlhelp sphinxcontrib_qthelp sphinxcontrib_websupport jupyter_sphinx furo; do AS_VAR_SET([SAGE_ENABLE_$pkg], [$enableval]) done AS_VAR_IF([enableval], [no], [dnl Disable the docbuild by disabling the install tree for documentation From 2bb42f1e52352d9d0adf8d408b9b79fec0a8c97d Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Fri, 5 Aug 2022 08:55:38 +0900 Subject: [PATCH 03/20] Use sphinx pygments style --- src/sage_docbuild/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index bf5abd7817c..53c5ca8e98e 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -260,7 +260,7 @@ def set_intersphinx_mappings(app, config): # The name of the Pygments (syntax highlighting) style to use. This # overrides a HTML theme's corresponding setting. - pygments_style = "tango" + pygments_style = "sphinx" pygments_dark_style = "monokai" # Add siderbar/home.html to the default sidebar. From d4b388757f1f51fd7fc11bb5e57319297a52ce9c Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Fri, 5 Aug 2022 10:46:39 +0900 Subject: [PATCH 04/20] Sidebar also scrolls logo --- src/sage_docbuild/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index 53c5ca8e98e..9ed62d10947 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -266,9 +266,9 @@ def set_intersphinx_mappings(app, config): # Add siderbar/home.html to the default sidebar. html_sidebars = { "**": [ + "sidebar/scroll-start.html", "sidebar/brand.html", "sidebar/search.html", - "sidebar/scroll-start.html", "sidebar/home.html", "sidebar/navigation.html", "sidebar/ethical-ads.html", From 113a817a9b18c078a108e31522579eab1afac19c Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Fri, 5 Aug 2022 11:07:40 +0900 Subject: [PATCH 05/20] Sphinx style with grayish background --- src/doc/common/static/custom-furo.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/doc/common/static/custom-furo.css b/src/doc/common/static/custom-furo.css index d9dfb2583ab..343fbb908cf 100644 --- a/src/doc/common/static/custom-furo.css +++ b/src/doc/common/static/custom-furo.css @@ -2,3 +2,12 @@ span.sidebar-brand-text { font-size: small; text-align: center; } + +div.highlight { + background: #F4F4F4; +} + +body[data-theme="dark"] div.highlight { + background: #383838; +} + From f53bed1a6f9b699bf58519f0681f9ee5bcb36ea6 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 11 Jul 2022 09:15:07 -0700 Subject: [PATCH 06/20] m4/: Add missing dependencies of iconv.m4 --- m4/host-cpu-c-abi.m4 | 678 ++++++++++++++++++++++++++++++++++++ m4/lib-ld.m4 | 168 +++++++++ m4/lib-link.m4 | 813 +++++++++++++++++++++++++++++++++++++++++++ m4/lib-prefix.m4 | 323 +++++++++++++++++ 4 files changed, 1982 insertions(+) create mode 100644 m4/host-cpu-c-abi.m4 create mode 100644 m4/lib-ld.m4 create mode 100644 m4/lib-link.m4 create mode 100644 m4/lib-prefix.m4 diff --git a/m4/host-cpu-c-abi.m4 b/m4/host-cpu-c-abi.m4 new file mode 100644 index 00000000000..b9223241b43 --- /dev/null +++ b/m4/host-cpu-c-abi.m4 @@ -0,0 +1,678 @@ +# host-cpu-c-abi.m4 serial 15 +dnl Copyright (C) 2002-2022 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible and Sam Steingold. + +dnl Sets the HOST_CPU variable to the canonical name of the CPU. +dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its +dnl C language ABI (application binary interface). +dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in +dnl config.h. +dnl +dnl This canonical name can be used to select a particular assembly language +dnl source file that will interoperate with C code on the given host. +dnl +dnl For example: +dnl * 'i386' and 'sparc' are different canonical names, because code for i386 +dnl will not run on SPARC CPUs and vice versa. They have different +dnl instruction sets. +dnl * 'sparc' and 'sparc64' are different canonical names, because code for +dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code +dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit +dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit +dnl mode, but not both. +dnl * 'mips' and 'mipsn32' are different canonical names, because they use +dnl different argument passing and return conventions for C functions, and +dnl although the instruction set of 'mips' is a large subset of the +dnl instruction set of 'mipsn32'. +dnl * 'mipsn32' and 'mips64' are different canonical names, because they use +dnl different sizes for the C types like 'int' and 'void *', and although +dnl the instruction sets of 'mipsn32' and 'mips64' are the same. +dnl * The same canonical name is used for different endiannesses. You can +dnl determine the endianness through preprocessor symbols: +dnl - 'arm': test __ARMEL__. +dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL. +dnl - 'powerpc64': test _BIG_ENDIAN vs. _LITTLE_ENDIAN. +dnl * The same name 'i386' is used for CPUs of type i386, i486, i586 +dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because +dnl - Instructions that do not exist on all of these CPUs (cmpxchg, +dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your +dnl assembly language source files use such instructions, you will +dnl need to make the distinction. +dnl - Speed of execution of the common instruction set is reasonable across +dnl the entire family of CPUs. If you have assembly language source files +dnl that are optimized for particular CPU types (like GNU gmp has), you +dnl will need to make the distinction. +dnl See . +AC_DEFUN([gl_HOST_CPU_C_ABI], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_C_ASM]) + AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi], + [case "$host_cpu" in + +changequote(,)dnl + i[34567]86 ) +changequote([,])dnl + gl_cv_host_cpu_c_abi=i386 + ;; + + x86_64 ) + # On x86_64 systems, the C compiler may be generating code in one of + # these ABIs: + # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. + # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 + # with native Windows (mingw, MSVC). + # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if (defined __x86_64__ || defined __amd64__ \ + || defined _M_X64 || defined _M_AMD64) + int ok; + #else + error fail + #endif + ]])], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __ILP32__ || defined _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=x86_64-x32], + [gl_cv_host_cpu_c_abi=x86_64])], + [gl_cv_host_cpu_c_abi=i386]) + ;; + +changequote(,)dnl + alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] ) +changequote([,])dnl + gl_cv_host_cpu_c_abi=alpha + ;; + + arm* | aarch64 ) + # Assume arm with EABI. + # On arm64 systems, the C compiler may be generating code in one of + # these ABIs: + # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. + # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef __aarch64__ + int ok; + #else + error fail + #endif + ]])], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __ILP32__ || defined _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=arm64-ilp32], + [gl_cv_host_cpu_c_abi=arm64])], + [# Don't distinguish little-endian and big-endian arm, since they + # don't require different machine code for simple operations and + # since the user can distinguish them through the preprocessor + # defines __ARMEL__ vs. __ARMEB__. + # But distinguish arm which passes floating-point arguments and + # return values in integer registers (r0, r1, ...) - this is + # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which + # passes them in float registers (s0, s1, ...) and double registers + # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer + # sets the preprocessor defines __ARM_PCS (for the first case) and + # __ARM_PCS_VFP (for the second case), but older GCC does not. + echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c + # Look for a reference to the register d0 in the .s file. + AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1 + if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then + gl_cv_host_cpu_c_abi=armhf + else + gl_cv_host_cpu_c_abi=arm + fi + rm -f conftest* + ]) + ;; + + hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) + # On hppa, the C compiler may be generating 32-bit code or 64-bit + # code. In the latter case, it defines _LP64 and __LP64__. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef __LP64__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=hppa64], + [gl_cv_host_cpu_c_abi=hppa]) + ;; + + ia64* ) + # On ia64 on HP-UX, the C compiler may be generating 64-bit code or + # 32-bit code. In the latter case, it defines _ILP32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=ia64-ilp32], + [gl_cv_host_cpu_c_abi=ia64]) + ;; + + mips* ) + # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this + # at 32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=mips64], + [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but + # may later get defined by ), and _MIPS_SIM == _ABIN32. + # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but + # may later get defined by ), and _MIPS_SIM == _ABIO32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if (_MIPS_SIM == _ABIN32) + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=mipsn32], + [gl_cv_host_cpu_c_abi=mips])]) + ;; + + powerpc* ) + # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. + # No need to distinguish them here; the caller may distinguish + # them based on the OS. + # On powerpc64 systems, the C compiler may still be generating + # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may + # be generating 64-bit code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __powerpc64__ || defined __LP64__ + int ok; + #else + error fail + #endif + ]])], + [# On powerpc64, there are two ABIs on Linux: The AIX compatible + # one and the ELFv2 one. The latter defines _CALL_ELF=2. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined _CALL_ELF && _CALL_ELF == 2 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=powerpc64-elfv2], + [gl_cv_host_cpu_c_abi=powerpc64]) + ], + [gl_cv_host_cpu_c_abi=powerpc]) + ;; + + rs6000 ) + gl_cv_host_cpu_c_abi=powerpc + ;; + + riscv32 | riscv64 ) + # There are 2 architectures (with variants): rv32* and rv64*. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if __riscv_xlen == 64 + int ok; + #else + error fail + #endif + ]])], + [cpu=riscv64], + [cpu=riscv32]) + # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. + # Size of 'long' and 'void *': + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __LP64__ + int ok; + #else + error fail + #endif + ]])], + [main_abi=lp64], + [main_abi=ilp32]) + # Float ABIs: + # __riscv_float_abi_double: + # 'float' and 'double' are passed in floating-point registers. + # __riscv_float_abi_single: + # 'float' are passed in floating-point registers. + # __riscv_float_abi_soft: + # No values are passed in floating-point registers. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __riscv_float_abi_double + int ok; + #else + error fail + #endif + ]])], + [float_abi=d], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __riscv_float_abi_single + int ok; + #else + error fail + #endif + ]])], + [float_abi=f], + [float_abi='']) + ]) + gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}" + ;; + + s390* ) + # On s390x, the C compiler may be generating 64-bit (= s390x) code + # or 31-bit (= s390) code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __LP64__ || defined __s390x__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=s390x], + [gl_cv_host_cpu_c_abi=s390]) + ;; + + sparc | sparc64 ) + # UltraSPARCs running Linux have `uname -m` = "sparc64", but the + # C compiler still generates 32-bit code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=sparc64], + [gl_cv_host_cpu_c_abi=sparc]) + ;; + + *) + gl_cv_host_cpu_c_abi="$host_cpu" + ;; + esac + ]) + + dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same. + HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'` + HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi" + AC_SUBST([HOST_CPU]) + AC_SUBST([HOST_CPU_C_ABI]) + + # This was + # AC_DEFINE_UNQUOTED([__${HOST_CPU}__]) + # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__]) + # earlier, but KAI C++ 3.2d doesn't like this. + sed -e 's/-/_/g' >> confdefs.h <&1 /dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } +fi + +if test -n "$LD"; then + AC_MSG_CHECKING([for ld]) +elif test "$GCC" = yes; then + AC_MSG_CHECKING([for ld used by $CC]) +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +if test -n "$LD"; then + # Let the user override the test with a path. + : +else + AC_CACHE_VAL([acl_cv_path_LD], + [ + acl_cv_path_LD= # Final result of this test + ac_prog=ld # Program to search in $PATH + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + acl_output=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $acl_output in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` + while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do + acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` + done + # Got the pathname. No search in PATH is needed. + acl_cv_path_LD="$acl_output" + ac_prog= + ;; + "") + # If it fails, then pretend we aren't using GCC. + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac + fi + if test -n "$ac_prog"; then + # Search for $ac_prog in $PATH. + acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$acl_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE([rpath], + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_FROMPACKAGE(name, package) +dnl declares that libname comes from the given package. The configure file +dnl will then not have a --with-libname-prefix option but a +dnl --with-package-prefix option. Several libraries can come from the same +dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar +dnl macro call that searches for libname. +AC_DEFUN([AC_LIB_FROMPACKAGE], +[ + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + define([acl_frompackage_]NAME, [$2]) + popdef([NAME]) + pushdef([PACK],[$2]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + define([acl_libsinpackage_]PACKUP, + m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) + popdef([PACKUP]) + popdef([PACK]) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found +dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" + ]) + AC_ARG_WITH(PACK[-prefix], +[[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib + --without-]]PACK[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + additional_libdir2="$withval/$acl_libdirstem2" + additional_libdir3="$withval/$acl_libdirstem3" + fi + fi +]) + if test "X$additional_libdir2" = "X$additional_libdir"; then + additional_libdir2= + fi + if test "X$additional_libdir3" = "X$additional_libdir"; then + additional_libdir3= + fi + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + LIB[]NAME[]_PREFIX= + dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been + dnl computed. So it has to be reset here. + HAVE_LIB[]NAME= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do + if test "X$found_dir" = "X"; then + eval dir=\$$additional_libdir_variable + if test -n "$dir"; then + dnl The same code as in the loop below: + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + fi + done + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$acl_hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem3 | */$acl_libdirstem3/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $dependency_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then + haveit= + if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$dependency_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$dependency_libdir"; then + dnl Really add $dependency_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$dependency_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$dependency_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$dependency_libdir"; then + dnl Really add $dependency_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$dependency_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + dnl But on GNU systems, ignore -lc options, because + dnl - linking with libc is the default anyway, + dnl - linking with libc.a may produce an error + dnl "/usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/lib/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie" + dnl or may produce an executable that always crashes, see + dnl . + dep=`echo "X$dep" | sed -e 's/^X-l//'` + if test "X$dep" != Xc \ + || case $host_os in + linux* | gnu* | k*bsd*-gnu) false ;; + *) true ;; + esac; then + names_next_round="$names_next_round $dep" + fi + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi + popdef([PACKLIBS]) + popdef([PACKUP]) + popdef([PACK]) + popdef([NAME]) +]) + +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, +dnl unless already present in VAR. +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes +dnl contains two or three consecutive elements that belong together. +AC_DEFUN([AC_LIB_APPENDTOVAR], +[ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done +]) + +dnl For those cases where a variable contains several -L and -l options +dnl referring to unknown libraries and directories, this macro determines the +dnl necessary additional linker options for the runtime path. +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, +dnl otherwise linking without libtool is assumed. +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], +[ + AC_REQUIRE([AC_LIB_RPATH]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + $1= + if test "$enable_rpath" != no; then + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode directories into the resulting + dnl binary. + rpathdirs= + next= + for opt in $2; do + if test -n "$next"; then + dir="$next" + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2" \ + && test "X$dir" != "X/usr/$acl_libdirstem3"; then + rpathdirs="$rpathdirs $dir" + fi + next= + else + case $opt in + -L) next=yes ;; + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2" \ + && test "X$dir" != "X/usr/$acl_libdirstem3"; then + rpathdirs="$rpathdirs $dir" + fi + next= ;; + *) next= ;; + esac + fi + done + if test "X$rpathdirs" != "X"; then + if test -n ""$3""; then + dnl libtool is used for linking. Use -R options. + for dir in $rpathdirs; do + $1="${$1}${$1:+ }-R$dir" + done + else + dnl The linker is used for linking directly. + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user + dnl must pass all path elements in one option. + alldirs= + for dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="$flag" + else + dnl The -rpath options are cumulative. + for dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="${$1}${$1:+ }$flag" + done + fi + fi + fi + fi + fi + AC_SUBST([$1]) +]) diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 new file mode 100644 index 00000000000..999f712f5ac --- /dev/null +++ b/m4/lib-prefix.m4 @@ -0,0 +1,323 @@ +# lib-prefix.m4 serial 20 +dnl Copyright (C) 2001-2005, 2008-2022 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed +dnl to access previously installed libraries. The basic assumption is that +dnl a user will want packages to use other packages he previously installed +dnl with the same --prefix option. +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate +dnl libraries, but is otherwise very convenient. +AC_DEFUN([AC_LIB_PREFIX], +[ + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_ARG_WITH([lib-prefix], +[[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir]], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's already present in $LDFLAGS, + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi +]) + +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, +dnl acl_final_exec_prefix, containing the values to which $prefix and +dnl $exec_prefix will expand at the end of the configure script. +AC_DEFUN([AC_LIB_PREPARE_PREFIX], +[ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the +dnl variables prefix and exec_prefix bound to the values they will have +dnl at the end of the configure script. +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], +[ + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_PREPARE_MULTILIB creates +dnl - a function acl_is_expected_elfclass, that tests whether standard input +dn; has a 32-bit or 64-bit ELF header, depending on the host CPU ABI, +dnl - 3 variables acl_libdirstem, acl_libdirstem2, acl_libdirstem3, containing +dnl the basename of the libdir to try in turn, either "lib" or "lib64" or +dnl "lib/64" or "lib32" or "lib/sparcv9" or "lib/amd64" or similar. +AC_DEFUN([AC_LIB_PREPARE_MULTILIB], +[ + dnl There is no formal standard regarding lib, lib32, and lib64. + dnl On most glibc systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. However, on + dnl Arch Linux based distributions, it's the opposite: 32-bit libraries go + dnl under $prefix/lib32 and 64-bit libraries go under $prefix/lib. + dnl We determine the compiler's default mode by looking at the compiler's + dnl library search path. If at least one of its elements ends in /lib64 or + dnl points to a directory whose absolute pathname ends in /lib64, we use that + dnl for 64-bit ABIs. Similarly for 32-bit ABIs. Otherwise we use the default, + dnl namely "lib". + dnl On Solaris systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or + dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT]) + + AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf], + [AC_EGREP_CPP([Extensible Linking Format], + [#if defined __ELF__ || (defined __linux__ && defined __EDG__) + Extensible Linking Format + #endif + ], + [gl_cv_elf=yes], + [gl_cv_elf=no]) + ]) + if test $gl_cv_elf = yes; then + # Extract the ELF class of a file (5th byte) in decimal. + # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header + if od -A x < /dev/null >/dev/null 2>/dev/null; then + # Use POSIX od. + func_elfclass () + { + od -A n -t d1 -j 4 -N 1 + } + else + # Use BSD hexdump. + func_elfclass () + { + dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' + echo + } + fi + # Use 'expr', not 'test', to compare the values of func_elfclass, because on + # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002, + # not 1 or 2. +changequote(,)dnl + case $HOST_CPU_C_ABI_32BIT in + yes) + # 32-bit ABI. + acl_is_expected_elfclass () + { + expr "`func_elfclass | sed -e 's/[ ]//g'`" = 1 > /dev/null + } + ;; + no) + # 64-bit ABI. + acl_is_expected_elfclass () + { + expr "`func_elfclass | sed -e 's/[ ]//g'`" = 2 > /dev/null + } + ;; + *) + # Unknown. + acl_is_expected_elfclass () + { + : + } + ;; + esac +changequote([,])dnl + else + acl_is_expected_elfclass () + { + : + } + fi + + dnl Allow the user to override the result by setting acl_cv_libdirstems. + AC_CACHE_CHECK([for the common suffixes of directories in the library search path], + [acl_cv_libdirstems], + [dnl Try 'lib' first, because that's the default for libdir in GNU, see + dnl . + acl_libdirstem=lib + acl_libdirstem2= + acl_libdirstem3= + case "$host_os" in + solaris*) + dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment + dnl . + dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." + dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the + dnl symlink is missing, so we set acl_libdirstem2 too. + if test $HOST_CPU_C_ABI_32BIT = no; then + acl_libdirstem2=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem3=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; + esac + fi + ;; + *) + dnl If $CC generates code for a 32-bit ABI, the libraries are + dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64. + dnl Similarly, if $CC generates code for a 64-bit ABI, the libraries + dnl are surely under $prefix/lib or $prefix/lib64, not $prefix/lib32. + dnl Find the compiler's search path. However, non-system compilers + dnl sometimes have odd library search paths. But we can't simply invoke + dnl '/usr/bin/gcc -print-search-dirs' because that would not take into + dnl account the -m32/-m31 or -m64 options from the $CC or $CFLAGS. + searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ + | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test $HOST_CPU_C_ABI_32BIT != no; then + # 32-bit or unknown ABI. + if test -d /usr/lib32; then + acl_libdirstem2=lib32 + fi + fi + if test $HOST_CPU_C_ABI_32BIT != yes; then + # 64-bit or unknown ABI. + if test -d /usr/lib64; then + acl_libdirstem3=lib64 + fi + fi + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; + */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib32 ) acl_libdirstem2=lib32 ;; + */lib64 ) acl_libdirstem3=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + if test $HOST_CPU_C_ABI_32BIT = yes; then + # 32-bit ABI. + acl_libdirstem3= + fi + if test $HOST_CPU_C_ABI_32BIT = no; then + # 64-bit ABI. + acl_libdirstem2= + fi + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" + acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" + ]) + dnl Decompose acl_cv_libdirstems into acl_libdirstem, acl_libdirstem2, and + dnl acl_libdirstem3. +changequote(,)dnl + acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` + acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` + acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` +changequote([,])dnl +]) From 16b3c5aad1d87e219bd3f86979787ada5b1e9688 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 11 Jul 2022 09:34:35 -0700 Subject: [PATCH 07/20] .homebrew-build-env, build/pkgs/{_prereq,_bootstrap}/distros: Remove gettext --- .homebrew-build-env | 4 ++-- build/pkgs/_bootstrap/distros/arch.txt | 2 +- build/pkgs/_bootstrap/distros/conda.txt | 2 +- build/pkgs/_bootstrap/distros/cygwin.txt | 2 +- build/pkgs/_bootstrap/distros/debian.txt | 1 - build/pkgs/_bootstrap/distros/fedora.txt | 2 +- build/pkgs/_bootstrap/distros/freebsd.txt | 2 +- build/pkgs/_bootstrap/distros/homebrew.txt | 2 +- build/pkgs/_bootstrap/distros/nix.txt | 2 +- build/pkgs/_bootstrap/distros/opensuse.txt | 1 - build/pkgs/_bootstrap/distros/void.txt | 3 +-- build/pkgs/_prereq/distros/gentoo.txt | 2 -- build/pkgs/_prereq/distros/slackware.txt | 2 -- configure.ac | 6 +++--- 14 files changed, 13 insertions(+), 20 deletions(-) diff --git a/.homebrew-build-env b/.homebrew-build-env index ff07cad2f64..84f5017a310 100644 --- a/.homebrew-build-env +++ b/.homebrew-build-env @@ -2,7 +2,7 @@ # that activate keg-only homebrew package installations HOMEBREW=`brew --prefix` || return 1 -for l in gettext bzip2 texinfo polymake; do +for l in bzip2 texinfo polymake; do if [ -d "$HOMEBREW/opt/$l/bin" ]; then PATH="$HOMEBREW/opt/$l/bin:$PATH" fi @@ -39,7 +39,7 @@ for l in "gcc/lib/gcc/11 gcc/lib/gcc/10 gcc/lib/gcc/9"; do done export LIBRARY_PATH export CPATH -for l in gettext; do +for l in ; do if [ -d "$HOMEBREW/opt/$l/share/aclocal" ]; then ACLOCAL_PATH="$HOMEBREW/opt/$l/share/aclocal:$ACLOCAL_PATH" fi diff --git a/build/pkgs/_bootstrap/distros/arch.txt b/build/pkgs/_bootstrap/distros/arch.txt index 67bfbc0fae0..96fe92340d9 100644 --- a/build/pkgs/_bootstrap/distros/arch.txt +++ b/build/pkgs/_bootstrap/distros/arch.txt @@ -1,4 +1,4 @@ # Packages needed for ./bootstrap -gettext autoconf automake libtool +autoconf automake libtool # Otherwise: Error: could not locate the pkg-config autoconf macros. These are pkg-config diff --git a/build/pkgs/_bootstrap/distros/conda.txt b/build/pkgs/_bootstrap/distros/conda.txt index 5405f70cf3d..b5d2db8cfb2 100644 --- a/build/pkgs/_bootstrap/distros/conda.txt +++ b/build/pkgs/_bootstrap/distros/conda.txt @@ -1,2 +1,2 @@ # Packages needed for ./bootstrap -gettext autoconf automake libtool +autoconf automake libtool diff --git a/build/pkgs/_bootstrap/distros/cygwin.txt b/build/pkgs/_bootstrap/distros/cygwin.txt index 5cd20fd529c..b5d2db8cfb2 100644 --- a/build/pkgs/_bootstrap/distros/cygwin.txt +++ b/build/pkgs/_bootstrap/distros/cygwin.txt @@ -1,2 +1,2 @@ # Packages needed for ./bootstrap -gettext-devel autoconf automake libtool +autoconf automake libtool diff --git a/build/pkgs/_bootstrap/distros/debian.txt b/build/pkgs/_bootstrap/distros/debian.txt index d99fdbbceab..5fe960ac3a0 100644 --- a/build/pkgs/_bootstrap/distros/debian.txt +++ b/build/pkgs/_bootstrap/distros/debian.txt @@ -1,5 +1,4 @@ # Packages needed for ./bootstrap -gettext autoconf automake libtool diff --git a/build/pkgs/_bootstrap/distros/fedora.txt b/build/pkgs/_bootstrap/distros/fedora.txt index 97f16705319..e8e9330eca1 100644 --- a/build/pkgs/_bootstrap/distros/fedora.txt +++ b/build/pkgs/_bootstrap/distros/fedora.txt @@ -1,4 +1,4 @@ # Packages needed for ./bootstrap -gettext-devel autoconf automake libtool +autoconf automake libtool # Fedora 26 needs: pkg-config diff --git a/build/pkgs/_bootstrap/distros/freebsd.txt b/build/pkgs/_bootstrap/distros/freebsd.txt index 55f45bfd276..93d91f5c84b 100644 --- a/build/pkgs/_bootstrap/distros/freebsd.txt +++ b/build/pkgs/_bootstrap/distros/freebsd.txt @@ -1,2 +1,2 @@ # Packages needed for ./bootstrap -gettext autoconf automake libtool pkg-config +autoconf automake libtool pkg-config diff --git a/build/pkgs/_bootstrap/distros/homebrew.txt b/build/pkgs/_bootstrap/distros/homebrew.txt index 55f45bfd276..93d91f5c84b 100644 --- a/build/pkgs/_bootstrap/distros/homebrew.txt +++ b/build/pkgs/_bootstrap/distros/homebrew.txt @@ -1,2 +1,2 @@ # Packages needed for ./bootstrap -gettext autoconf automake libtool pkg-config +autoconf automake libtool pkg-config diff --git a/build/pkgs/_bootstrap/distros/nix.txt b/build/pkgs/_bootstrap/distros/nix.txt index 55f45bfd276..93d91f5c84b 100644 --- a/build/pkgs/_bootstrap/distros/nix.txt +++ b/build/pkgs/_bootstrap/distros/nix.txt @@ -1,2 +1,2 @@ # Packages needed for ./bootstrap -gettext autoconf automake libtool pkg-config +autoconf automake libtool pkg-config diff --git a/build/pkgs/_bootstrap/distros/opensuse.txt b/build/pkgs/_bootstrap/distros/opensuse.txt index 819e4433b53..48e74f8118e 100644 --- a/build/pkgs/_bootstrap/distros/opensuse.txt +++ b/build/pkgs/_bootstrap/distros/opensuse.txt @@ -1,5 +1,4 @@ # Packages needed for ./bootstrap -gettext-tools autoconf automake libtool diff --git a/build/pkgs/_bootstrap/distros/void.txt b/build/pkgs/_bootstrap/distros/void.txt index eefc9315cb5..159333b4216 100644 --- a/build/pkgs/_bootstrap/distros/void.txt +++ b/build/pkgs/_bootstrap/distros/void.txt @@ -1,4 +1,3 @@ # Packages needed for ./bootstrap -gettext autoconf automake libtool -gettext-devel +autoconf automake libtool xtools mk-configure diff --git a/build/pkgs/_prereq/distros/gentoo.txt b/build/pkgs/_prereq/distros/gentoo.txt index 51316a87c0b..1e26c46cacc 100644 --- a/build/pkgs/_prereq/distros/gentoo.txt +++ b/build/pkgs/_prereq/distros/gentoo.txt @@ -14,8 +14,6 @@ sys-devel/bc dev-lang/python sys-devel/flex app-misc/ca-certificates -sys-devel/gettext -dev-libs/libcroco dev-libs/libxml2 sys-apps/findutils sys-apps/which diff --git a/build/pkgs/_prereq/distros/slackware.txt b/build/pkgs/_prereq/distros/slackware.txt index a8310031df7..4c2b7080ce8 100644 --- a/build/pkgs/_prereq/distros/slackware.txt +++ b/build/pkgs/_prereq/distros/slackware.txt @@ -15,7 +15,5 @@ flex # for https upstream_url downloads ca-certificates pkg-config -gettext-tools -libcroco # gettext dependency (msgfmt) libxml2 cyrus-sasl diff --git a/configure.ac b/configure.ac index 4ab080c6115..22637978a8a 100644 --- a/configure.ac +++ b/configure.ac @@ -49,10 +49,10 @@ dnl Make sure the path to our own m4 macros is always properly set dnl and doesn't depend on how autoconf is called. AC_CONFIG_MACRO_DIR([m4]) -dnl The AC_LIB_RPATH macro comes from gettext, which is one of our bootstrap -dnl packages. It defines, among other things, the $acl_shlibext variable that +dnl The AC_LIB_RPATH macro comes from a Gnulib-provided file in m4/. +dnl It defines, among other things, the $acl_shlibext variable that dnl contains the shared library extension for this system. We already use the -dnl AM_ICONV macro from gettext (which ultimately calls AC_LIB_RPATH), and we +dnl AM_ICONV macro from the same source (which ultimately calls AC_LIB_RPATH), and we dnl avoid involving libtool by using it to get the shared library extension. AC_LIB_RPATH AC_SUBST(SHLIBEXT, "${acl_shlibext}") From 44e2ed80ff4f13e329cc3cc80df376182ec21c84 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 22 Aug 2022 14:32:33 -0700 Subject: [PATCH 08/20] build/pkgs/gnulib: New --- build/pkgs/gnulib/SPKG.rst | 9 +++++++++ build/pkgs/gnulib/package-version.txt | 2 ++ build/pkgs/gnulib/spkg-install | 2 ++ build/pkgs/gnulib/type | 1 + 4 files changed, 14 insertions(+) create mode 100644 build/pkgs/gnulib/SPKG.rst create mode 100644 build/pkgs/gnulib/package-version.txt create mode 100755 build/pkgs/gnulib/spkg-install create mode 100644 build/pkgs/gnulib/type diff --git a/build/pkgs/gnulib/SPKG.rst b/build/pkgs/gnulib/SPKG.rst new file mode 100644 index 00000000000..6d4ea0f4d87 --- /dev/null +++ b/build/pkgs/gnulib/SPKG.rst @@ -0,0 +1,9 @@ +gnulib: Modules imported from Gnulib +==================================== + +This script package represents the modules imported into the Sage source tree from Gnulib. + +Upstream Contact +---------------- + +https://www.gnu.org/software/gnulib/ diff --git a/build/pkgs/gnulib/package-version.txt b/build/pkgs/gnulib/package-version.txt new file mode 100644 index 00000000000..993bba70f54 --- /dev/null +++ b/build/pkgs/gnulib/package-version.txt @@ -0,0 +1,2 @@ +19435dc207e9279d744435ce72466f765c5358e2 +# version of 2022-07-10 diff --git a/build/pkgs/gnulib/spkg-install b/build/pkgs/gnulib/spkg-install new file mode 100755 index 00000000000..599e0b77a66 --- /dev/null +++ b/build/pkgs/gnulib/spkg-install @@ -0,0 +1,2 @@ +#! /usr/bin/env bash +# Nothing to do diff --git a/build/pkgs/gnulib/type b/build/pkgs/gnulib/type new file mode 100644 index 00000000000..a6a7b9cd726 --- /dev/null +++ b/build/pkgs/gnulib/type @@ -0,0 +1 @@ +standard From 2d8f1b7d62311ed42d5186373c0462d95020286c Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Fri, 5 Aug 2022 00:52:19 +0100 Subject: [PATCH 09/20] build/pkgs/gnulib/spkg-src: New, adapted from bootstrap in branch u/dimpase/config/gnulib --- build/pkgs/gnulib/spkg-src | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 build/pkgs/gnulib/spkg-src diff --git a/build/pkgs/gnulib/spkg-src b/build/pkgs/gnulib/spkg-src new file mode 100755 index 00000000000..44bdce451f8 --- /dev/null +++ b/build/pkgs/gnulib/spkg-src @@ -0,0 +1,39 @@ +#! /usr/bin/env bash + +# the commit hash below is the latest as of 2022-07-31 +# For updating gnulib, change this hash and run +# +# ./sage -sh -c 'build/pkgs/gnulib/spkg-src +# +# Then commit the results. + +gnulibcommit="f9b39c4e337f1dc0dd07c4f3985c476fb875d799" + +gnulibtool="$SAGE_ROOT/upstream/gnulib/gnulib-tool" + +if [ -x "$gnulibtool" ]; then + cd upstream/gnulib + gnulibinstalled=`git rev-parse HEAD` + cd ../.. + if [ ! x${gnulibcommit} = x${gnulibinstalled} ]; then + rm -rf upstream/gnulib + fi +fi +if [ ! -x "$gnulibtool" ]; then + echo >&2 "gnulib-tool needs to be installed and in your PATH. We install a copy in upstream/ " + mkdir -p upstream + cd upstream # use github mirror - faster, only needed stuff + mkdir -p gnulib + cd gnulib + eval git init ${quietquiet} + eval git remote add origin https://github.com/coreutils/gnulib.git ${quietquiet} + eval git fetch origin ${gnulibcommit} --depth 1 ${quietquiet} + eval git checkout FETCH_HEAD ${quietquiet} + cd ../.. + if [ ! -x "$gnulibtool" ]; then + echo >&2 "Failure installing/updating gnulib in upstream/. " + exit 179 + fi +fi +eval $gnulibtool --import iconv ${quietquiet} +rm -rf lib/ From ce70f3dc814a061021af4ca598e99dcede2c1a80 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 22 Aug 2022 14:44:26 -0700 Subject: [PATCH 10/20] build/pkgs/gnulib/spkg-src: Update package-version.txt --- build/pkgs/gnulib/spkg-src | 1 + 1 file changed, 1 insertion(+) diff --git a/build/pkgs/gnulib/spkg-src b/build/pkgs/gnulib/spkg-src index 44bdce451f8..3774cd13540 100755 --- a/build/pkgs/gnulib/spkg-src +++ b/build/pkgs/gnulib/spkg-src @@ -37,3 +37,4 @@ if [ ! -x "$gnulibtool" ]; then fi eval $gnulibtool --import iconv ${quietquiet} rm -rf lib/ +echo "${gnulibcommit}" > build/pkgs/gnulib/package-version.txt From 8bf9d9738304b9bf1dee14ee639c934db15972a5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 22 Aug 2022 14:45:59 -0700 Subject: [PATCH 11/20] build/pkgs/gnulib: Update to version of 2022-07-31 --- build/pkgs/gnulib/package-version.txt | 3 +-- build/pkgs/gnulib/spkg-src | 2 +- m4/iconv.m4 | 24 +++++++++++++++++------- m4/lib-link.m4 | 6 +++--- 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/build/pkgs/gnulib/package-version.txt b/build/pkgs/gnulib/package-version.txt index 993bba70f54..a64fb36670b 100644 --- a/build/pkgs/gnulib/package-version.txt +++ b/build/pkgs/gnulib/package-version.txt @@ -1,2 +1 @@ -19435dc207e9279d744435ce72466f765c5358e2 -# version of 2022-07-10 +f9b39c4e337f1dc0dd07c4f3985c476fb875d799 diff --git a/build/pkgs/gnulib/spkg-src b/build/pkgs/gnulib/spkg-src index 3774cd13540..98eb7f4e561 100755 --- a/build/pkgs/gnulib/spkg-src +++ b/build/pkgs/gnulib/spkg-src @@ -3,7 +3,7 @@ # the commit hash below is the latest as of 2022-07-31 # For updating gnulib, change this hash and run # -# ./sage -sh -c 'build/pkgs/gnulib/spkg-src +# ./sage -sh -c 'build/pkgs/gnulib/spkg-src' # # Then commit the results. diff --git a/m4/iconv.m4 b/m4/iconv.m4 index 00057953e33..2065c9772ad 100644 --- a/m4/iconv.m4 +++ b/m4/iconv.m4 @@ -1,4 +1,4 @@ -# iconv.m4 serial 24 +# iconv.m4 serial 26 dnl Copyright (C) 2000-2002, 2007-2014, 2016-2022 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -234,12 +234,6 @@ AC_DEFUN([AM_ICONV_LINK], dnl Define AM_ICONV using AC_DEFUN_ONCE, in order to avoid warnings like dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". -dnl This is tricky because of the way 'aclocal' is implemented: -dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. -dnl Otherwise aclocal's initial scan pass would miss the macro definition. -dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. -dnl Otherwise aclocal would emit many "Use of uninitialized value $1" -dnl warnings. AC_DEFUN_ONCE([AM_ICONV], [ AM_ICONV_LINK @@ -280,4 +274,20 @@ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, si ICONV_CONST="const" fi ]) + + dnl A summary result, for those packages which want to print a summary at the + dnl end of the configuration. + if test "$am_func_iconv" = yes; then + if test -n "$LIBICONV"; then + am_cv_func_iconv_summary='yes, in libiconv' + else + am_cv_func_iconv_summary='yes, in libc' + fi + else + if test "$am_cv_func_iconv" = yes; then + am_cv_func_iconv_summary='not working, consider installing GNU libiconv' + else + am_cv_func_iconv_summary='no, consider installing GNU libiconv' + fi + fi ]) diff --git a/m4/lib-link.m4 b/m4/lib-link.m4 index ed5186afb48..3b75bcd0de1 100644 --- a/m4/lib-link.m4 +++ b/m4/lib-link.m4 @@ -1,4 +1,4 @@ -# lib-link.m4 serial 32 +# lib-link.m4 serial 33 dnl Copyright (C) 2001-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -196,8 +196,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" ]) AC_ARG_WITH(PACK[-prefix], -[[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib - --without-]]PACK[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], +[[ --with-]]PACK[[-prefix[=DIR] search for ]]PACKLIBS[[ in DIR/include and DIR/lib + --without-]]PACK[[-prefix don't search for ]]PACKLIBS[[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no From 8d90b5605464f26edc0c13898dee05bc1433f341 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 28 Aug 2022 18:40:16 -0700 Subject: [PATCH 12/20] build/pkgs/furo: Make it a normal package --- build/pkgs/furo/checksums.ini | 5 +++++ build/pkgs/furo/{requirements.txt => install-requires.txt} | 0 build/pkgs/furo/package-version.txt | 1 + build/pkgs/furo/spkg-install.in | 2 ++ 4 files changed, 8 insertions(+) create mode 100644 build/pkgs/furo/checksums.ini rename build/pkgs/furo/{requirements.txt => install-requires.txt} (100%) create mode 100644 build/pkgs/furo/package-version.txt create mode 100644 build/pkgs/furo/spkg-install.in diff --git a/build/pkgs/furo/checksums.ini b/build/pkgs/furo/checksums.ini new file mode 100644 index 00000000000..9744b38985e --- /dev/null +++ b/build/pkgs/furo/checksums.ini @@ -0,0 +1,5 @@ +tarball=furo-VERSION.tar.gz +sha1=a7bbb19999467b15035c8c8251b574fd00c16b9d +md5=9a1e88053831f4d7542dbfd822e70501 +cksum=672552824 +upstream_url=https://pypi.io/packages/source/f/furo/furo-VERSION.tar.gz diff --git a/build/pkgs/furo/requirements.txt b/build/pkgs/furo/install-requires.txt similarity index 100% rename from build/pkgs/furo/requirements.txt rename to build/pkgs/furo/install-requires.txt diff --git a/build/pkgs/furo/package-version.txt b/build/pkgs/furo/package-version.txt new file mode 100644 index 00000000000..95f879eb816 --- /dev/null +++ b/build/pkgs/furo/package-version.txt @@ -0,0 +1 @@ +2022.6.21 diff --git a/build/pkgs/furo/spkg-install.in b/build/pkgs/furo/spkg-install.in new file mode 100644 index 00000000000..37ac1a53437 --- /dev/null +++ b/build/pkgs/furo/spkg-install.in @@ -0,0 +1,2 @@ +cd src +sdh_pip_install . From 28f30ac94f76728def31990bbe69dcec851e1eb0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 28 Aug 2022 22:19:19 -0700 Subject: [PATCH 13/20] build/bin/sage-spkg: Handle *.whl packages --- build/bin/sage-spkg | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/build/bin/sage-spkg b/build/bin/sage-spkg index 4478bc7f2d7..e3543df9a29 100755 --- a/build/bin/sage-spkg +++ b/build/bin/sage-spkg @@ -451,20 +451,30 @@ echo "Setting up build directory for $PKG_NAME" cp -RLp "$PKG_SCRIPTS" "$PKG_NAME" cd "$PKG_NAME" || exit $? -sage-uncompress-spkg -d src "$PKG_SRC" -if [ $? -ne 0 ]; then - error_msg "Error: failed to extract $PKG_SRC" - exit 1 -fi - -echo "Finished extraction" - -cd src -if ! sage-apply-patches; then - error_msg "Error applying patches" - exit 1 -fi -cd .. +case "$PKG_SRC" in + *.whl) + # (Non-platform) wheel. Do not extract, do not create a src directory, + # just copy to dist/ and create a simple install script. + mkdir -p dist + cp "$PKG_SRC" dist/ + echo "sdh_store_and_pip_install_wheel ." > spkg-install.in + ;; + *) + # Source tarball + sage-uncompress-spkg -d src "$PKG_SRC" + if [ $? -ne 0 ]; then + error_msg "Error: failed to extract $PKG_SRC" + exit 1 + fi + echo "Finished extraction" + cd src + if ! sage-apply-patches; then + error_msg "Error applying patches" + exit 1 + fi + cd .. + ;; +esac ################################################################## # The package has been extracted, prepare for installation From fd1c677af6b141763afa604cc2fc8122c848ff61 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 28 Aug 2022 22:19:31 -0700 Subject: [PATCH 14/20] build/pkgs/furo: Use a wheel --- build/pkgs/furo/checksums.ini | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build/pkgs/furo/checksums.ini b/build/pkgs/furo/checksums.ini index 9744b38985e..2ba1678635d 100644 --- a/build/pkgs/furo/checksums.ini +++ b/build/pkgs/furo/checksums.ini @@ -1,5 +1,5 @@ -tarball=furo-VERSION.tar.gz -sha1=a7bbb19999467b15035c8c8251b574fd00c16b9d -md5=9a1e88053831f4d7542dbfd822e70501 -cksum=672552824 -upstream_url=https://pypi.io/packages/source/f/furo/furo-VERSION.tar.gz +tarball=furo-VERSION-py3-none-any.whl +sha1=b9261dbe404cc13d399d50db0122fe48d7daeb23 +md5=fb331872d4d8a7d33f56aeb5df1f333f +cksum=3430203884 +upstream_url=https://pypi.io/packages/py3/f/furo/furo-VERSION-py3-none-any.whl From 9fa490a6039edbe35c442dde8a26f945aa5251e8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 28 Aug 2022 22:23:21 -0700 Subject: [PATCH 15/20] build/pkgs/sphinx_basic_ng: New (furo dependency) --- build/pkgs/furo/dependencies | 2 +- build/pkgs/sphinx_basic_ng/SPKG.rst | 16 ++++++++++++++++ build/pkgs/sphinx_basic_ng/checksums.ini | 5 +++++ build/pkgs/sphinx_basic_ng/dependencies | 4 ++++ build/pkgs/sphinx_basic_ng/install-requires.txt | 1 + build/pkgs/sphinx_basic_ng/package-version.txt | 1 + build/pkgs/sphinx_basic_ng/spkg-install.in | 2 ++ build/pkgs/sphinx_basic_ng/type | 1 + 8 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 build/pkgs/sphinx_basic_ng/SPKG.rst create mode 100644 build/pkgs/sphinx_basic_ng/checksums.ini create mode 100644 build/pkgs/sphinx_basic_ng/dependencies create mode 100644 build/pkgs/sphinx_basic_ng/install-requires.txt create mode 100644 build/pkgs/sphinx_basic_ng/package-version.txt create mode 100644 build/pkgs/sphinx_basic_ng/spkg-install.in create mode 100644 build/pkgs/sphinx_basic_ng/type diff --git a/build/pkgs/furo/dependencies b/build/pkgs/furo/dependencies index 9544f8d9e55..fec067b2058 100644 --- a/build/pkgs/furo/dependencies +++ b/build/pkgs/furo/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) beautifulsoup4 sphinx pygments | $(PYTHON_TOOLCHAIN) +$(PYTHON) beautifulsoup4 sphinx pygments sphinx_basic_ng | $(PYTHON_TOOLCHAIN) ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/sphinx_basic_ng/SPKG.rst b/build/pkgs/sphinx_basic_ng/SPKG.rst new file mode 100644 index 00000000000..c137da5c63b --- /dev/null +++ b/build/pkgs/sphinx_basic_ng/SPKG.rst @@ -0,0 +1,16 @@ +sphinx_basic_ng: A modern skeleton for Sphinx themes. +===================================================== + +Description +----------- + +A modern skeleton for Sphinx themes. + +License +------- + +Upstream Contact +---------------- + +https://pypi.org/project/sphinx-basic-ng/ + diff --git a/build/pkgs/sphinx_basic_ng/checksums.ini b/build/pkgs/sphinx_basic_ng/checksums.ini new file mode 100644 index 00000000000..1be1765fff8 --- /dev/null +++ b/build/pkgs/sphinx_basic_ng/checksums.ini @@ -0,0 +1,5 @@ +tarball=sphinx_basic_ng-VERSION.tar.gz +sha1=03857ae3336e81db16599a68b826b6ed6053cd28 +md5=bdb1b36fd46f0b5b4f6c079e7350b860 +cksum=2230250036 +upstream_url=https://pypi.io/packages/source/s/sphinx_basic_ng/sphinx_basic_ng-VERSION.tar.gz diff --git a/build/pkgs/sphinx_basic_ng/dependencies b/build/pkgs/sphinx_basic_ng/dependencies new file mode 100644 index 00000000000..175a793ecbc --- /dev/null +++ b/build/pkgs/sphinx_basic_ng/dependencies @@ -0,0 +1,4 @@ +$(PYTHON) sphinx | $(PYTHON_TOOLCHAIN) + +---------- +All lines of this file are ignored except the first. diff --git a/build/pkgs/sphinx_basic_ng/install-requires.txt b/build/pkgs/sphinx_basic_ng/install-requires.txt new file mode 100644 index 00000000000..c11d80ea377 --- /dev/null +++ b/build/pkgs/sphinx_basic_ng/install-requires.txt @@ -0,0 +1 @@ +sphinx-basic-ng diff --git a/build/pkgs/sphinx_basic_ng/package-version.txt b/build/pkgs/sphinx_basic_ng/package-version.txt new file mode 100644 index 00000000000..4110d074c83 --- /dev/null +++ b/build/pkgs/sphinx_basic_ng/package-version.txt @@ -0,0 +1 @@ +0.0.1a12 diff --git a/build/pkgs/sphinx_basic_ng/spkg-install.in b/build/pkgs/sphinx_basic_ng/spkg-install.in new file mode 100644 index 00000000000..37ac1a53437 --- /dev/null +++ b/build/pkgs/sphinx_basic_ng/spkg-install.in @@ -0,0 +1,2 @@ +cd src +sdh_pip_install . diff --git a/build/pkgs/sphinx_basic_ng/type b/build/pkgs/sphinx_basic_ng/type new file mode 100644 index 00000000000..a6a7b9cd726 --- /dev/null +++ b/build/pkgs/sphinx_basic_ng/type @@ -0,0 +1 @@ +standard From eba7f6f3ae9927c17989e3ec848b521acf8086f5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 28 Aug 2022 22:38:19 -0700 Subject: [PATCH 16/20] src/doc/en/developer/packaging.rst: Document wheel packages --- src/doc/en/developer/packaging.rst | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/doc/en/developer/packaging.rst b/src/doc/en/developer/packaging.rst index ec933c118bc..097ad651648 100644 --- a/src/doc/en/developer/packaging.rst +++ b/src/doc/en/developer/packaging.rst @@ -82,6 +82,17 @@ the following source types: ``$SAGE_LOCAL/var/lib/sage/installed/`` and will re-run the installation if ``package-version.txt`` changes. +#. A ``wheel`` package: + + - comes from the (non-platform) wheel file named in the required file + ``checksums.ini`` and hosted on the Sage mirrors; + + - its version number is defined by the required file ``package-version.txt``; + + - Sage records the version number of the package installed using a file in + ``$SAGE_LOCAL/var/lib/sage/installed/`` and will re-run the installation + if ``package-version.txt`` changes. + #. A ``pip`` package: - is obtained directly from https://pypi.org/; @@ -119,7 +130,7 @@ the following source types: To summarize: the package source type is determined as follows: if there is a file ``requirements.txt``, it is a ``pip`` package. If not, -then if there is a ``checksums.ini`` file, it is ``normal``. +then if there is a ``checksums.ini`` file, it is ``normal`` or ``wheel``. Otherwise, if it has an ``spkg-install`` script, it is a ``script`` package, and if it does not, then it is a ``dummy`` package. @@ -584,7 +595,7 @@ For example, the ``scipy`` ``spkg-check.in`` file contains the line exec python3 spkg-check.py -All normal Python packages must have a file ``install-requires.txt``. +All normal Python packages and all wheel packages must have a file ``install-requires.txt``. If a Python package is available on PyPI, this file must contain the name of the package as it is known to PyPI. Optionally, ``install-requires.txt`` can encode version constraints (such as lower @@ -778,7 +789,7 @@ Where packages are installed The Sage distribution has the notion of several installation trees. - ``$SAGE_VENV`` is the default installation tree for all Python packages, i.e., - normal packages with an ``install-requires.txt`` and pip packages + normal packages with an ``install-requires.txt``, wheel packages, and pip packages with a ``requirements.txt``. - ``$SAGE_LOCAL`` is the default installation tree for all non-Python packages. From 8e06d43935d133ed2ba9067b0038402f1517b2bf Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 28 Aug 2022 22:48:07 -0700 Subject: [PATCH 17/20] src/doc/en/developer/packaging.rst: Policy on wheels, on standard packages --- src/doc/en/developer/packaging.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/doc/en/developer/packaging.rst b/src/doc/en/developer/packaging.rst index 097ad651648..dad4a112882 100644 --- a/src/doc/en/developer/packaging.rst +++ b/src/doc/en/developer/packaging.rst @@ -84,8 +84,11 @@ the following source types: #. A ``wheel`` package: - - comes from the (non-platform) wheel file named in the required file - ``checksums.ini`` and hosted on the Sage mirrors; + - comes from the wheel file named in the required file ``checksums.ini`` + and hosted on the Sage mirrors; + + - per policy, only non-platform wheels are allowed, i.e., ``*-none-any.whl`` + files; - its version number is defined by the required file ``package-version.txt``; @@ -1210,6 +1213,9 @@ must meet the following requirements: - **Build Support**. The code must build on all the fully supported platforms (Linux, macOS, Cygwin); see :ref:`chapter-portability_testing`. + It must be installed either from source as a normal package, + or as a Python (non-platform) wheel package, see + :ref:`section-package-source-types`. - **Quality**. The code should be "better" than any other available code (that passes the two above criteria), and the authors need to From b12e9dc536013049a45ea29e15bdfd898dd1a909 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 29 Aug 2022 21:42:44 +0900 Subject: [PATCH 18/20] Use the name platform-independent --- build/bin/sage-spkg | 3 ++- src/doc/en/developer/packaging.rst | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build/bin/sage-spkg b/build/bin/sage-spkg index e3543df9a29..53835babf27 100755 --- a/build/bin/sage-spkg +++ b/build/bin/sage-spkg @@ -453,7 +453,8 @@ cd "$PKG_NAME" || exit $? case "$PKG_SRC" in *.whl) - # (Non-platform) wheel. Do not extract, do not create a src directory, + # (Platform-independent) wheel + # Do not extract, do not create a src directory, # just copy to dist/ and create a simple install script. mkdir -p dist cp "$PKG_SRC" dist/ diff --git a/src/doc/en/developer/packaging.rst b/src/doc/en/developer/packaging.rst index dad4a112882..6935ced9f0f 100644 --- a/src/doc/en/developer/packaging.rst +++ b/src/doc/en/developer/packaging.rst @@ -87,8 +87,8 @@ the following source types: - comes from the wheel file named in the required file ``checksums.ini`` and hosted on the Sage mirrors; - - per policy, only non-platform wheels are allowed, i.e., ``*-none-any.whl`` - files; + - per policy, only platform-independent wheels are allowed, i.e., + ``*-none-any.whl`` files; - its version number is defined by the required file ``package-version.txt``; @@ -1214,7 +1214,7 @@ must meet the following requirements: - **Build Support**. The code must build on all the fully supported platforms (Linux, macOS, Cygwin); see :ref:`chapter-portability_testing`. It must be installed either from source as a normal package, - or as a Python (non-platform) wheel package, see + or as a Python (platform-independent) wheel package, see :ref:`section-package-source-types`. - **Quality**. The code should be "better" than any other available From d887d447ade9e9cc91880ade637ffe2c32a37ac0 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 29 Aug 2022 23:25:12 +0900 Subject: [PATCH 19/20] Use rerun instead of re-run --- src/doc/en/developer/packaging.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/doc/en/developer/packaging.rst b/src/doc/en/developer/packaging.rst index 6935ced9f0f..33ca56415f8 100644 --- a/src/doc/en/developer/packaging.rst +++ b/src/doc/en/developer/packaging.rst @@ -79,7 +79,7 @@ the following source types: (see :ref:`section-spkg-install`); - Sage records the version number of the package installed using a file in - ``$SAGE_LOCAL/var/lib/sage/installed/`` and will re-run the installation + ``$SAGE_LOCAL/var/lib/sage/installed/`` and will rerun the installation if ``package-version.txt`` changes. #. A ``wheel`` package: @@ -93,7 +93,7 @@ the following source types: - its version number is defined by the required file ``package-version.txt``; - Sage records the version number of the package installed using a file in - ``$SAGE_LOCAL/var/lib/sage/installed/`` and will re-run the installation + ``$SAGE_LOCAL/var/lib/sage/installed/`` and will rerun the installation if ``package-version.txt`` changes. #. A ``pip`` package: @@ -121,7 +121,7 @@ the following source types: (see :ref:`section-spkg-install`); - Sage records the version number of the package installed using a file in - ``$SAGE_LOCAL/var/lib/sage/installed/`` and will re-run the installation + ``$SAGE_LOCAL/var/lib/sage/installed/`` and will rerun the installation if ``package-version.txt`` changes. #. A ``dummy`` package: From 08202bc1ba7caea46327908db8e3715d1adf6f9a Mon Sep 17 00:00:00 2001 From: Release Manager Date: Thu, 8 Sep 2022 01:11:10 +0200 Subject: [PATCH 20/20] Updated SageMath version to 9.7.rc1 --- .zenodo.json | 8 ++++---- VERSION.txt | 2 +- build/pkgs/configure/checksums.ini | 6 +++--- build/pkgs/configure/package-version.txt | 2 +- build/pkgs/sage_conf/install-requires.txt | 2 +- build/pkgs/sage_docbuild/install-requires.txt | 2 +- build/pkgs/sage_setup/install-requires.txt | 2 +- build/pkgs/sage_sws2rst/install-requires.txt | 2 +- build/pkgs/sagelib/install-requires.txt | 2 +- build/pkgs/sagemath_categories/install-requires.txt | 2 +- build/pkgs/sagemath_environment/install-requires.txt | 2 +- build/pkgs/sagemath_objects/install-requires.txt | 2 +- pkgs/sage-conf/VERSION.txt | 2 +- pkgs/sage-conf_pypi/VERSION.txt | 2 +- pkgs/sage-docbuild/VERSION.txt | 2 +- pkgs/sage-setup/VERSION.txt | 2 +- pkgs/sage-sws2rst/VERSION.txt | 2 +- pkgs/sagemath-categories/VERSION.txt | 2 +- pkgs/sagemath-environment/VERSION.txt | 2 +- pkgs/sagemath-objects/VERSION.txt | 2 +- pkgs/sagemath-repl/VERSION.txt | 2 +- src/VERSION.txt | 2 +- src/bin/sage-version.sh | 6 +++--- src/sage/version.py | 6 +++--- 24 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.zenodo.json b/.zenodo.json index 022e38c3554..d7b2439a788 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,10 +1,10 @@ { "description": "Mirror of the Sage https://sagemath.org/ source tree", "license": "other-open", - "title": "sagemath/sage: 9.7.rc0", - "version": "9.7.rc0", + "title": "sagemath/sage: 9.7.rc1", + "version": "9.7.rc1", "upload_type": "software", - "publication_date": "2022-08-30", + "publication_date": "2022-09-07", "creators": [ { "affiliation": "SageMath.org", @@ -15,7 +15,7 @@ "related_identifiers": [ { "scheme": "url", - "identifier": "https://github.com/sagemath/sage/tree/9.7.rc0", + "identifier": "https://github.com/sagemath/sage/tree/9.7.rc1", "relation": "isSupplementTo" }, { diff --git a/VERSION.txt b/VERSION.txt index 23115dbdf96..affcafdf359 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -SageMath version 9.7.rc0, Release Date: 2022-08-30 +SageMath version 9.7.rc1, Release Date: 2022-09-07 diff --git a/build/pkgs/configure/checksums.ini b/build/pkgs/configure/checksums.ini index 8c389783249..11d18b32093 100644 --- a/build/pkgs/configure/checksums.ini +++ b/build/pkgs/configure/checksums.ini @@ -1,4 +1,4 @@ tarball=configure-VERSION.tar.gz -sha1=23560f10767addedb5a1427d8d5edaf01ef1f31c -md5=ff94d32b21e117d264e4cf5ba47834f0 -cksum=4110255875 +sha1=17621baa3704964f752a02c3a1533a8adb59cd3d +md5=e1f4d86a1e996aeee5e5c072bf92f0a1 +cksum=3769097678 diff --git a/build/pkgs/configure/package-version.txt b/build/pkgs/configure/package-version.txt index ebb31399c91..60e9162dd80 100644 --- a/build/pkgs/configure/package-version.txt +++ b/build/pkgs/configure/package-version.txt @@ -1 +1 @@ -fcc25ebf82c72cfe50e2b305deb55595e1537de8 +2e5af062ddd382d2d0eb8070dd0c6e872b77b6bd diff --git a/build/pkgs/sage_conf/install-requires.txt b/build/pkgs/sage_conf/install-requires.txt index 1337b83837e..806746abbe4 100644 --- a/build/pkgs/sage_conf/install-requires.txt +++ b/build/pkgs/sage_conf/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-conf ~= 9.7rc0 +sage-conf ~= 9.7rc1 diff --git a/build/pkgs/sage_docbuild/install-requires.txt b/build/pkgs/sage_docbuild/install-requires.txt index 598d5d2c1da..9a762283dae 100644 --- a/build/pkgs/sage_docbuild/install-requires.txt +++ b/build/pkgs/sage_docbuild/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-docbuild ~= 9.7rc0 +sage-docbuild ~= 9.7rc1 diff --git a/build/pkgs/sage_setup/install-requires.txt b/build/pkgs/sage_setup/install-requires.txt index 37423936b81..72ddc44f5ef 100644 --- a/build/pkgs/sage_setup/install-requires.txt +++ b/build/pkgs/sage_setup/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-setup ~= 9.7rc0 +sage-setup ~= 9.7rc1 diff --git a/build/pkgs/sage_sws2rst/install-requires.txt b/build/pkgs/sage_sws2rst/install-requires.txt index ae814b1f5ca..0c11aa3cd0d 100644 --- a/build/pkgs/sage_sws2rst/install-requires.txt +++ b/build/pkgs/sage_sws2rst/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-sws2rst ~= 9.7rc0 +sage-sws2rst ~= 9.7rc1 diff --git a/build/pkgs/sagelib/install-requires.txt b/build/pkgs/sagelib/install-requires.txt index 5e50bca2eb8..17a9b7fbd9e 100644 --- a/build/pkgs/sagelib/install-requires.txt +++ b/build/pkgs/sagelib/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagelib ~= 9.7rc0 +sagelib ~= 9.7rc1 diff --git a/build/pkgs/sagemath_categories/install-requires.txt b/build/pkgs/sagemath_categories/install-requires.txt index ef34ec911bb..faa6593b049 100644 --- a/build/pkgs/sagemath_categories/install-requires.txt +++ b/build/pkgs/sagemath_categories/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-categories ~= 9.7rc0 +sagemath-categories ~= 9.7rc1 diff --git a/build/pkgs/sagemath_environment/install-requires.txt b/build/pkgs/sagemath_environment/install-requires.txt index 12ea11a8989..9dd9d149e08 100644 --- a/build/pkgs/sagemath_environment/install-requires.txt +++ b/build/pkgs/sagemath_environment/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-environment ~= 9.7rc0 +sagemath-environment ~= 9.7rc1 diff --git a/build/pkgs/sagemath_objects/install-requires.txt b/build/pkgs/sagemath_objects/install-requires.txt index e79e569f420..7d5feaa7bb8 100644 --- a/build/pkgs/sagemath_objects/install-requires.txt +++ b/build/pkgs/sagemath_objects/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-objects ~= 9.7rc0 +sagemath-objects ~= 9.7rc1 diff --git a/pkgs/sage-conf/VERSION.txt b/pkgs/sage-conf/VERSION.txt index c337fbc423a..37d25ab1334 100644 --- a/pkgs/sage-conf/VERSION.txt +++ b/pkgs/sage-conf/VERSION.txt @@ -1 +1 @@ -9.7.rc0 +9.7.rc1 diff --git a/pkgs/sage-conf_pypi/VERSION.txt b/pkgs/sage-conf_pypi/VERSION.txt index c337fbc423a..37d25ab1334 100644 --- a/pkgs/sage-conf_pypi/VERSION.txt +++ b/pkgs/sage-conf_pypi/VERSION.txt @@ -1 +1 @@ -9.7.rc0 +9.7.rc1 diff --git a/pkgs/sage-docbuild/VERSION.txt b/pkgs/sage-docbuild/VERSION.txt index c337fbc423a..37d25ab1334 100644 --- a/pkgs/sage-docbuild/VERSION.txt +++ b/pkgs/sage-docbuild/VERSION.txt @@ -1 +1 @@ -9.7.rc0 +9.7.rc1 diff --git a/pkgs/sage-setup/VERSION.txt b/pkgs/sage-setup/VERSION.txt index c337fbc423a..37d25ab1334 100644 --- a/pkgs/sage-setup/VERSION.txt +++ b/pkgs/sage-setup/VERSION.txt @@ -1 +1 @@ -9.7.rc0 +9.7.rc1 diff --git a/pkgs/sage-sws2rst/VERSION.txt b/pkgs/sage-sws2rst/VERSION.txt index c337fbc423a..37d25ab1334 100644 --- a/pkgs/sage-sws2rst/VERSION.txt +++ b/pkgs/sage-sws2rst/VERSION.txt @@ -1 +1 @@ -9.7.rc0 +9.7.rc1 diff --git a/pkgs/sagemath-categories/VERSION.txt b/pkgs/sagemath-categories/VERSION.txt index c337fbc423a..37d25ab1334 100644 --- a/pkgs/sagemath-categories/VERSION.txt +++ b/pkgs/sagemath-categories/VERSION.txt @@ -1 +1 @@ -9.7.rc0 +9.7.rc1 diff --git a/pkgs/sagemath-environment/VERSION.txt b/pkgs/sagemath-environment/VERSION.txt index c337fbc423a..37d25ab1334 100644 --- a/pkgs/sagemath-environment/VERSION.txt +++ b/pkgs/sagemath-environment/VERSION.txt @@ -1 +1 @@ -9.7.rc0 +9.7.rc1 diff --git a/pkgs/sagemath-objects/VERSION.txt b/pkgs/sagemath-objects/VERSION.txt index c337fbc423a..37d25ab1334 100644 --- a/pkgs/sagemath-objects/VERSION.txt +++ b/pkgs/sagemath-objects/VERSION.txt @@ -1 +1 @@ -9.7.rc0 +9.7.rc1 diff --git a/pkgs/sagemath-repl/VERSION.txt b/pkgs/sagemath-repl/VERSION.txt index c337fbc423a..37d25ab1334 100644 --- a/pkgs/sagemath-repl/VERSION.txt +++ b/pkgs/sagemath-repl/VERSION.txt @@ -1 +1 @@ -9.7.rc0 +9.7.rc1 diff --git a/src/VERSION.txt b/src/VERSION.txt index c337fbc423a..37d25ab1334 100644 --- a/src/VERSION.txt +++ b/src/VERSION.txt @@ -1 +1 @@ -9.7.rc0 +9.7.rc1 diff --git a/src/bin/sage-version.sh b/src/bin/sage-version.sh index aa65b1a245c..a18cc712d08 100644 --- a/src/bin/sage-version.sh +++ b/src/bin/sage-version.sh @@ -4,6 +4,6 @@ # which stops "setup.py develop" from rewriting it as a Python file. : # This file is auto-generated by the sage-update-version script, do not edit! -SAGE_VERSION='9.7.rc0' -SAGE_RELEASE_DATE='2022-08-30' -SAGE_VERSION_BANNER='SageMath version 9.7.rc0, Release Date: 2022-08-30' +SAGE_VERSION='9.7.rc1' +SAGE_RELEASE_DATE='2022-09-07' +SAGE_VERSION_BANNER='SageMath version 9.7.rc1, Release Date: 2022-09-07' diff --git a/src/sage/version.py b/src/sage/version.py index 759f2141d1d..4862a5603a6 100644 --- a/src/sage/version.py +++ b/src/sage/version.py @@ -1,5 +1,5 @@ # Sage version information for Python scripts # This file is auto-generated by the sage-update-version script, do not edit! -version = '9.7.rc0' -date = '2022-08-30' -banner = 'SageMath version 9.7.rc0, Release Date: 2022-08-30' +version = '9.7.rc1' +date = '2022-09-07' +banner = 'SageMath version 9.7.rc1, Release Date: 2022-09-07'