From a0246a5aff6d13a48a46cbe4e36ee9bb41c9c941 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 17 Dec 2023 12:14:18 -0800 Subject: [PATCH 01/38] build/pkgs/*/distros: Remove quotes, change to one package per line git grep -l \" build/pkgs/*/distros* | xargs sed -i.bak '/^"/s/"//g' git grep -l -E '^([^# ]+) +([^# ][^#]+)(#.*)' build/pkgs/*/distros/*.txt | xargs sed -E -i.bak $'s/^([^# ]+) +([^# ][^#]+)(#.*)?/\\3\\\n\\1\\\n\\2/' git grep -l -E '^([^# ]+) +([^# ][^#]+)' build/pkgs/*/distros/*.txt | xargs sed -E -i.bak $'s/^([^# ]+) +([^# ][^#]+)/\\1\\\n\\2/' git grep -l -E ' +$' build/pkgs/*/distros/*.txt | xargs sed -E -i.bak 's/[ ]+$//' --- build/pkgs/_bootstrap/distros/arch.txt | 4 +++- build/pkgs/_bootstrap/distros/cygwin.txt | 4 +++- build/pkgs/_bootstrap/distros/fedora.txt | 4 +++- build/pkgs/_bootstrap/distros/freebsd.txt | 5 ++++- build/pkgs/_bootstrap/distros/homebrew.txt | 5 ++++- build/pkgs/_bootstrap/distros/nix.txt | 5 ++++- build/pkgs/_bootstrap/distros/void.txt | 7 +++++-- build/pkgs/_prereq/distros/cygwin.txt | 3 ++- build/pkgs/_prereq/distros/slackware.txt | 12 +++++++++--- build/pkgs/_sagemath/distros/arch.txt | 3 ++- build/pkgs/barvinok/distros/opensuse.txt | 2 +- build/pkgs/bzip2/distros/cygwin.txt | 3 ++- build/pkgs/bzip2/distros/fedora.txt | 3 ++- build/pkgs/bzip2/distros/opensuse.txt | 2 +- build/pkgs/cbc/distros/fedora.txt | 3 ++- build/pkgs/cddlib/distros/cygwin.txt | 3 ++- build/pkgs/cddlib/distros/opensuse.txt | 2 +- build/pkgs/cliquer/distros/fedora.txt | 3 ++- build/pkgs/coxeter3/distros/fedora.txt | 4 +++- build/pkgs/curl/distros/cygwin.txt | 3 ++- build/pkgs/curl/distros/fedora.txt | 3 ++- build/pkgs/curl/distros/opensuse.txt | 2 +- build/pkgs/eclib/distros/fedora.txt | 3 ++- build/pkgs/ecm/distros/fedora.txt | 3 ++- build/pkgs/fflas_ffpack/distros/opensuse.txt | 2 +- build/pkgs/flint/distros/fedora.txt | 3 ++- build/pkgs/fplll/distros/fedora.txt | 3 ++- build/pkgs/fplll/distros/opensuse.txt | 2 +- build/pkgs/freetype/distros/opensuse.txt | 2 +- build/pkgs/gc/distros/fedora.txt | 3 ++- build/pkgs/gc/distros/opensuse.txt | 2 +- build/pkgs/gf2x/distros/fedora.txt | 3 ++- build/pkgs/gf2x/distros/opensuse.txt | 2 +- build/pkgs/gfortran/distros/macports.txt | 3 ++- build/pkgs/giac/distros/arch.txt | 3 ++- build/pkgs/givaro/distros/fedora.txt | 3 ++- build/pkgs/givaro/distros/opensuse.txt | 2 +- build/pkgs/glpk/distros/cygwin.txt | 3 ++- build/pkgs/glpk/distros/fedora.txt | 4 +++- build/pkgs/gmp/distros/fedora.txt | 3 ++- build/pkgs/gsl/distros/fedora.txt | 3 ++- build/pkgs/gsl/distros/opensuse.txt | 2 +- build/pkgs/igraph/distros/fedora.txt | 3 ++- build/pkgs/iml/distros/fedora.txt | 3 ++- build/pkgs/info/distros/fedora.txt | 3 ++- build/pkgs/isl/distros/opensuse.txt | 2 +- build/pkgs/libatomic_ops/distros/fedora.txt | 3 ++- build/pkgs/libatomic_ops/distros/opensuse.txt | 2 +- build/pkgs/libffi/distros/fedora.txt | 3 ++- build/pkgs/libffi/distros/opensuse.txt | 2 +- build/pkgs/libgd/distros/fedora.txt | 3 ++- build/pkgs/libgd/distros/opensuse.txt | 2 +- build/pkgs/libgd/distros/slackware.txt | 7 ++++++- build/pkgs/liblzma/distros/fedora.txt | 3 ++- build/pkgs/liblzma/distros/opensuse.txt | 2 +- build/pkgs/libogg/distros/opensuse.txt | 2 +- build/pkgs/libpng/distros/opensuse.txt | 2 +- build/pkgs/libsemigroups/distros/opensuse.txt | 2 +- build/pkgs/libtheora/distros/opensuse.txt | 2 +- build/pkgs/linbox/distros/opensuse.txt | 2 +- build/pkgs/m4ri/distros/opensuse.txt | 2 +- build/pkgs/m4rie/distros/opensuse.txt | 2 +- build/pkgs/mathjax/distros/gentoo.txt | 2 +- build/pkgs/mpc/distros/fedora.txt | 3 ++- build/pkgs/mpfr/distros/opensuse.txt | 2 +- build/pkgs/ncurses/distros/opensuse.txt | 4 ++-- build/pkgs/openblas/distros/cygwin.txt | 3 ++- build/pkgs/openssl/distros/fedora.txt | 3 ++- build/pkgs/openssl/distros/slackware.txt | 3 ++- build/pkgs/pari/distros/conda.txt | 5 ++++- build/pkgs/pari/distros/fedora.txt | 3 ++- build/pkgs/pari/distros/gentoo.txt | 3 ++- .../pkgs/perl_term_readline_gnu/distros/opensuse.txt | 2 +- build/pkgs/planarity/distros/fedora.txt | 3 ++- build/pkgs/polylib/distros/opensuse.txt | 2 +- build/pkgs/ptyprocess/distros/conda.txt | 2 +- build/pkgs/r/distros/conda.txt | 3 ++- build/pkgs/r/distros/fedora.txt | 3 ++- build/pkgs/readline/distros/opensuse.txt | 2 +- build/pkgs/sqlite/distros/opensuse.txt | 2 +- build/pkgs/suitesparse/distros/fedora.txt | 3 ++- build/pkgs/suitesparse/distros/gentoo.txt | 5 ++++- build/pkgs/tachyon/distros/fedora.txt | 3 ++- build/pkgs/zeromq/distros/fedora.txt | 3 ++- build/pkgs/zeromq/distros/opensuse.txt | 2 +- build/pkgs/zlib/distros/opensuse.txt | 2 +- 86 files changed, 169 insertions(+), 90 deletions(-) diff --git a/build/pkgs/_bootstrap/distros/arch.txt b/build/pkgs/_bootstrap/distros/arch.txt index 33054ef918c..050de00ca70 100644 --- a/build/pkgs/_bootstrap/distros/arch.txt +++ b/build/pkgs/_bootstrap/distros/arch.txt @@ -1,3 +1,5 @@ # Packages needed for ./bootstrap -autoconf automake libtool +autoconf +automake +libtool pkgconf diff --git a/build/pkgs/_bootstrap/distros/cygwin.txt b/build/pkgs/_bootstrap/distros/cygwin.txt index b5d2db8cfb2..bde788ee5d9 100644 --- a/build/pkgs/_bootstrap/distros/cygwin.txt +++ b/build/pkgs/_bootstrap/distros/cygwin.txt @@ -1,2 +1,4 @@ # Packages needed for ./bootstrap -autoconf automake libtool +autoconf +automake +libtool diff --git a/build/pkgs/_bootstrap/distros/fedora.txt b/build/pkgs/_bootstrap/distros/fedora.txt index e8e9330eca1..d0efc22cc39 100644 --- a/build/pkgs/_bootstrap/distros/fedora.txt +++ b/build/pkgs/_bootstrap/distros/fedora.txt @@ -1,4 +1,6 @@ # Packages needed for ./bootstrap -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 93d91f5c84b..5fe960ac3a0 100644 --- a/build/pkgs/_bootstrap/distros/freebsd.txt +++ b/build/pkgs/_bootstrap/distros/freebsd.txt @@ -1,2 +1,5 @@ # Packages needed for ./bootstrap -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 93d91f5c84b..5fe960ac3a0 100644 --- a/build/pkgs/_bootstrap/distros/homebrew.txt +++ b/build/pkgs/_bootstrap/distros/homebrew.txt @@ -1,2 +1,5 @@ # Packages needed for ./bootstrap -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 93d91f5c84b..5fe960ac3a0 100644 --- a/build/pkgs/_bootstrap/distros/nix.txt +++ b/build/pkgs/_bootstrap/distros/nix.txt @@ -1,2 +1,5 @@ # Packages needed for ./bootstrap -autoconf automake libtool pkg-config +autoconf +automake +libtool +pkg-config diff --git a/build/pkgs/_bootstrap/distros/void.txt b/build/pkgs/_bootstrap/distros/void.txt index 6490cf773e7..904bd61a232 100644 --- a/build/pkgs/_bootstrap/distros/void.txt +++ b/build/pkgs/_bootstrap/distros/void.txt @@ -1,4 +1,7 @@ # Packages needed for ./bootstrap -autoconf automake libtool -xtools mk-configure +autoconf +automake +libtool +xtools +mk-configure pkg-config diff --git a/build/pkgs/_prereq/distros/cygwin.txt b/build/pkgs/_prereq/distros/cygwin.txt index 2bf3164005b..a9d6b08d3c7 100644 --- a/build/pkgs/_prereq/distros/cygwin.txt +++ b/build/pkgs/_prereq/distros/cygwin.txt @@ -13,7 +13,8 @@ binutils make m4 # a system python is needed for downloading the sage packages, https://github.com/sagemath/sage/issues/29090 -python39-urllib3 python39 +python39-urllib3 +python39 perl perl-ExtUtils-MakeMaker tar diff --git a/build/pkgs/_prereq/distros/slackware.txt b/build/pkgs/_prereq/distros/slackware.txt index 4c957e45264..86c738fc7f8 100644 --- a/build/pkgs/_prereq/distros/slackware.txt +++ b/build/pkgs/_prereq/distros/slackware.txt @@ -1,11 +1,17 @@ binutils make -guile gc libffi # dependencies of make -"gcc-[0-9]" # So that slackpkg pattern matching does not pull in all gcc-* packages +# dependencies of make +guile +gc +libffi +gcc-[0-9] # So that slackpkg pattern matching does not pull in all gcc-* packages gcc-11 # on slackware-current gcc-g++ gcc-g++-11 # on slackware-current -libmpc glibc kernel-headers # dependencies of gcc +# dependencies of gcc +libmpc +glibc +kernel-headers perl m4 bc diff --git a/build/pkgs/_sagemath/distros/arch.txt b/build/pkgs/_sagemath/distros/arch.txt index 825a91411b0..b58e3f244a7 100644 --- a/build/pkgs/_sagemath/distros/arch.txt +++ b/build/pkgs/_sagemath/distros/arch.txt @@ -1 +1,2 @@ -sagemath sagemath-doc +sagemath +sagemath-doc diff --git a/build/pkgs/barvinok/distros/opensuse.txt b/build/pkgs/barvinok/distros/opensuse.txt index b3369e09db7..65092b1978a 100644 --- a/build/pkgs/barvinok/distros/opensuse.txt +++ b/build/pkgs/barvinok/distros/opensuse.txt @@ -1,2 +1,2 @@ barvinok -"pkgconfig(barvinok)" +pkgconfig(barvinok) diff --git a/build/pkgs/bzip2/distros/cygwin.txt b/build/pkgs/bzip2/distros/cygwin.txt index 8e127a3d331..8ef7f4d0734 100644 --- a/build/pkgs/bzip2/distros/cygwin.txt +++ b/build/pkgs/bzip2/distros/cygwin.txt @@ -1 +1,2 @@ -bzip2 libbz2-devel +bzip2 +libbz2-devel diff --git a/build/pkgs/bzip2/distros/fedora.txt b/build/pkgs/bzip2/distros/fedora.txt index f62dee917bb..13c12f2a5f6 100644 --- a/build/pkgs/bzip2/distros/fedora.txt +++ b/build/pkgs/bzip2/distros/fedora.txt @@ -1 +1,2 @@ -bzip2 bzip2-devel +bzip2 +bzip2-devel diff --git a/build/pkgs/bzip2/distros/opensuse.txt b/build/pkgs/bzip2/distros/opensuse.txt index ad77a92d4bb..ff839c0de00 100644 --- a/build/pkgs/bzip2/distros/opensuse.txt +++ b/build/pkgs/bzip2/distros/opensuse.txt @@ -1,3 +1,3 @@ # spkg-configure checks for both the program and the library bzip2 -"pkgconfig(bzip2)" +pkgconfig(bzip2) diff --git a/build/pkgs/cbc/distros/fedora.txt b/build/pkgs/cbc/distros/fedora.txt index 3e1af7ad66b..d63f4439b2a 100644 --- a/build/pkgs/cbc/distros/fedora.txt +++ b/build/pkgs/cbc/distros/fedora.txt @@ -1 +1,2 @@ -coin-or-Cbc coin-or-Cbc-devel +coin-or-Cbc +coin-or-Cbc-devel diff --git a/build/pkgs/cddlib/distros/cygwin.txt b/build/pkgs/cddlib/distros/cygwin.txt index f9eaae4c7ad..d406d903210 100644 --- a/build/pkgs/cddlib/distros/cygwin.txt +++ b/build/pkgs/cddlib/distros/cygwin.txt @@ -1 +1,2 @@ -cddlib-devel cddlib-tools +cddlib-devel +cddlib-tools diff --git a/build/pkgs/cddlib/distros/opensuse.txt b/build/pkgs/cddlib/distros/opensuse.txt index ffb93647443..0d299e7ad0e 100644 --- a/build/pkgs/cddlib/distros/opensuse.txt +++ b/build/pkgs/cddlib/distros/opensuse.txt @@ -1,2 +1,2 @@ cddlib-tools -"pkgconfig(cddlib)" +pkgconfig(cddlib) diff --git a/build/pkgs/cliquer/distros/fedora.txt b/build/pkgs/cliquer/distros/fedora.txt index 4dadef53faa..718f9f6b2cf 100644 --- a/build/pkgs/cliquer/distros/fedora.txt +++ b/build/pkgs/cliquer/distros/fedora.txt @@ -1 +1,2 @@ -cliquer cliquer-devel +cliquer +cliquer-devel diff --git a/build/pkgs/coxeter3/distros/fedora.txt b/build/pkgs/coxeter3/distros/fedora.txt index 3cfeb2f9fa0..0c6fb8a3e95 100644 --- a/build/pkgs/coxeter3/distros/fedora.txt +++ b/build/pkgs/coxeter3/distros/fedora.txt @@ -1 +1,3 @@ -coxeter coxeter-devel coxeter-tools +coxeter +coxeter-devel +coxeter-tools diff --git a/build/pkgs/curl/distros/cygwin.txt b/build/pkgs/curl/distros/cygwin.txt index 7bcb9889a4d..26bfd4d1186 100644 --- a/build/pkgs/curl/distros/cygwin.txt +++ b/build/pkgs/curl/distros/cygwin.txt @@ -1 +1,2 @@ -libcurl-devel curl +libcurl-devel +curl diff --git a/build/pkgs/curl/distros/fedora.txt b/build/pkgs/curl/distros/fedora.txt index 7bcb9889a4d..26bfd4d1186 100644 --- a/build/pkgs/curl/distros/fedora.txt +++ b/build/pkgs/curl/distros/fedora.txt @@ -1 +1,2 @@ -libcurl-devel curl +libcurl-devel +curl diff --git a/build/pkgs/curl/distros/opensuse.txt b/build/pkgs/curl/distros/opensuse.txt index ffd4f36dc86..a0ac40946fa 100644 --- a/build/pkgs/curl/distros/opensuse.txt +++ b/build/pkgs/curl/distros/opensuse.txt @@ -1,2 +1,2 @@ curl -"pkgconfig(libcurl)" +pkgconfig(libcurl) diff --git a/build/pkgs/eclib/distros/fedora.txt b/build/pkgs/eclib/distros/fedora.txt index 7861ae6de2b..2bcdd8cb9a5 100644 --- a/build/pkgs/eclib/distros/fedora.txt +++ b/build/pkgs/eclib/distros/fedora.txt @@ -1 +1,2 @@ -eclib eclib-devel +eclib +eclib-devel diff --git a/build/pkgs/ecm/distros/fedora.txt b/build/pkgs/ecm/distros/fedora.txt index 45e62aa8032..0625c82b8b9 100644 --- a/build/pkgs/ecm/distros/fedora.txt +++ b/build/pkgs/ecm/distros/fedora.txt @@ -1 +1,2 @@ -gmp-ecm gmp-ecm-devel +gmp-ecm +gmp-ecm-devel diff --git a/build/pkgs/fflas_ffpack/distros/opensuse.txt b/build/pkgs/fflas_ffpack/distros/opensuse.txt index 2dda5369b8d..cf55f69f450 100644 --- a/build/pkgs/fflas_ffpack/distros/opensuse.txt +++ b/build/pkgs/fflas_ffpack/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(fflas-ffpack)" +pkgconfig(fflas-ffpack) diff --git a/build/pkgs/flint/distros/fedora.txt b/build/pkgs/flint/distros/fedora.txt index 8df1db2cd08..12eb8937aea 100644 --- a/build/pkgs/flint/distros/fedora.txt +++ b/build/pkgs/flint/distros/fedora.txt @@ -1 +1,2 @@ -flint flint-devel +flint +flint-devel diff --git a/build/pkgs/fplll/distros/fedora.txt b/build/pkgs/fplll/distros/fedora.txt index ccf2e14dfee..29c3b897ae1 100644 --- a/build/pkgs/fplll/distros/fedora.txt +++ b/build/pkgs/fplll/distros/fedora.txt @@ -1 +1,2 @@ -libfplll libfplll-devel +libfplll +libfplll-devel diff --git a/build/pkgs/fplll/distros/opensuse.txt b/build/pkgs/fplll/distros/opensuse.txt index ee87c038706..2589161f43c 100644 --- a/build/pkgs/fplll/distros/opensuse.txt +++ b/build/pkgs/fplll/distros/opensuse.txt @@ -1,3 +1,3 @@ -"pkgconfig(fplll)" +pkgconfig(fplll) fplll-devel fplll diff --git a/build/pkgs/freetype/distros/opensuse.txt b/build/pkgs/freetype/distros/opensuse.txt index 33f8f6b7bdd..9205ba71e27 100644 --- a/build/pkgs/freetype/distros/opensuse.txt +++ b/build/pkgs/freetype/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(freetype2)" +pkgconfig(freetype2) diff --git a/build/pkgs/gc/distros/fedora.txt b/build/pkgs/gc/distros/fedora.txt index 1d6df64a216..b6940f8b6aa 100644 --- a/build/pkgs/gc/distros/fedora.txt +++ b/build/pkgs/gc/distros/fedora.txt @@ -1 +1,2 @@ -gc gc-devel +gc +gc-devel diff --git a/build/pkgs/gc/distros/opensuse.txt b/build/pkgs/gc/distros/opensuse.txt index 4620f6a8cb4..f250631fcc2 100644 --- a/build/pkgs/gc/distros/opensuse.txt +++ b/build/pkgs/gc/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(bdw-gc)" +pkgconfig(bdw-gc) diff --git a/build/pkgs/gf2x/distros/fedora.txt b/build/pkgs/gf2x/distros/fedora.txt index 726d8da490c..3d1d2bb46bb 100644 --- a/build/pkgs/gf2x/distros/fedora.txt +++ b/build/pkgs/gf2x/distros/fedora.txt @@ -1 +1,2 @@ -gf2x gf2x-devel +gf2x +gf2x-devel diff --git a/build/pkgs/gf2x/distros/opensuse.txt b/build/pkgs/gf2x/distros/opensuse.txt index 9a15ad0abe3..9fb7b9fd16e 100644 --- a/build/pkgs/gf2x/distros/opensuse.txt +++ b/build/pkgs/gf2x/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(gf2x)" +pkgconfig(gf2x) diff --git a/build/pkgs/gfortran/distros/macports.txt b/build/pkgs/gfortran/distros/macports.txt index c2878adf893..dfa7190f158 100644 --- a/build/pkgs/gfortran/distros/macports.txt +++ b/build/pkgs/gfortran/distros/macports.txt @@ -1 +1,2 @@ -gcc10 +gfortran +gcc10 ++gfortran diff --git a/build/pkgs/giac/distros/arch.txt b/build/pkgs/giac/distros/arch.txt index 7bdbd844d6c..f54c3286e4f 100644 --- a/build/pkgs/giac/distros/arch.txt +++ b/build/pkgs/giac/distros/arch.txt @@ -1 +1,2 @@ -libgiac giac +libgiac +giac diff --git a/build/pkgs/givaro/distros/fedora.txt b/build/pkgs/givaro/distros/fedora.txt index 6848d8c4e7f..9016d00aaab 100644 --- a/build/pkgs/givaro/distros/fedora.txt +++ b/build/pkgs/givaro/distros/fedora.txt @@ -1 +1,2 @@ -givaro givaro-devel +givaro +givaro-devel diff --git a/build/pkgs/givaro/distros/opensuse.txt b/build/pkgs/givaro/distros/opensuse.txt index 2a8103e6f6b..8de5fadae90 100644 --- a/build/pkgs/givaro/distros/opensuse.txt +++ b/build/pkgs/givaro/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(givaro)" +pkgconfig(givaro) diff --git a/build/pkgs/glpk/distros/cygwin.txt b/build/pkgs/glpk/distros/cygwin.txt index 2e6c6a10cb8..0fbb959079e 100644 --- a/build/pkgs/glpk/distros/cygwin.txt +++ b/build/pkgs/glpk/distros/cygwin.txt @@ -1 +1,2 @@ -glpk libglpk-devel +glpk +libglpk-devel diff --git a/build/pkgs/glpk/distros/fedora.txt b/build/pkgs/glpk/distros/fedora.txt index 73ab7f14b14..e028b246574 100644 --- a/build/pkgs/glpk/distros/fedora.txt +++ b/build/pkgs/glpk/distros/fedora.txt @@ -1 +1,3 @@ -glpk glpk-devel glpk-utils +glpk +glpk-devel +glpk-utils diff --git a/build/pkgs/gmp/distros/fedora.txt b/build/pkgs/gmp/distros/fedora.txt index bbe9ee39cab..1436ed982e7 100644 --- a/build/pkgs/gmp/distros/fedora.txt +++ b/build/pkgs/gmp/distros/fedora.txt @@ -1 +1,2 @@ -gmp gmp-devel +gmp +gmp-devel diff --git a/build/pkgs/gsl/distros/fedora.txt b/build/pkgs/gsl/distros/fedora.txt index 5577d09957b..ce35d3d80bd 100644 --- a/build/pkgs/gsl/distros/fedora.txt +++ b/build/pkgs/gsl/distros/fedora.txt @@ -1 +1,2 @@ -gsl gsl-devel +gsl +gsl-devel diff --git a/build/pkgs/gsl/distros/opensuse.txt b/build/pkgs/gsl/distros/opensuse.txt index ccfee4f4e43..c1867648576 100644 --- a/build/pkgs/gsl/distros/opensuse.txt +++ b/build/pkgs/gsl/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(gsl)" +pkgconfig(gsl) diff --git a/build/pkgs/igraph/distros/fedora.txt b/build/pkgs/igraph/distros/fedora.txt index 8ca7a112d45..fa2dc51a2ce 100644 --- a/build/pkgs/igraph/distros/fedora.txt +++ b/build/pkgs/igraph/distros/fedora.txt @@ -1 +1,2 @@ -igraph igraph-devel +igraph +igraph-devel diff --git a/build/pkgs/iml/distros/fedora.txt b/build/pkgs/iml/distros/fedora.txt index 32307096d65..88a895a10f6 100644 --- a/build/pkgs/iml/distros/fedora.txt +++ b/build/pkgs/iml/distros/fedora.txt @@ -1 +1,2 @@ -iml iml-devel +iml +iml-devel diff --git a/build/pkgs/info/distros/fedora.txt b/build/pkgs/info/distros/fedora.txt index c0d8f74e0ad..c3ed35de973 100644 --- a/build/pkgs/info/distros/fedora.txt +++ b/build/pkgs/info/distros/fedora.txt @@ -1 +1,2 @@ -texinfo info +texinfo +info diff --git a/build/pkgs/isl/distros/opensuse.txt b/build/pkgs/isl/distros/opensuse.txt index 721c2bb0dcb..ec70829dde7 100644 --- a/build/pkgs/isl/distros/opensuse.txt +++ b/build/pkgs/isl/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(isl)" +pkgconfig(isl) diff --git a/build/pkgs/libatomic_ops/distros/fedora.txt b/build/pkgs/libatomic_ops/distros/fedora.txt index 3417f891c11..d1f77fa5ad7 100644 --- a/build/pkgs/libatomic_ops/distros/fedora.txt +++ b/build/pkgs/libatomic_ops/distros/fedora.txt @@ -1 +1,2 @@ -libatomic_ops libatomic_ops-devel +libatomic_ops +libatomic_ops-devel diff --git a/build/pkgs/libatomic_ops/distros/opensuse.txt b/build/pkgs/libatomic_ops/distros/opensuse.txt index 6e7e1c4cecb..0d82eae1b32 100644 --- a/build/pkgs/libatomic_ops/distros/opensuse.txt +++ b/build/pkgs/libatomic_ops/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(atomic_ops)" +pkgconfig(atomic_ops) diff --git a/build/pkgs/libffi/distros/fedora.txt b/build/pkgs/libffi/distros/fedora.txt index 8d342f491c1..70c40a27925 100644 --- a/build/pkgs/libffi/distros/fedora.txt +++ b/build/pkgs/libffi/distros/fedora.txt @@ -1 +1,2 @@ -libffi libffi-devel +libffi +libffi-devel diff --git a/build/pkgs/libffi/distros/opensuse.txt b/build/pkgs/libffi/distros/opensuse.txt index 1a6986d429e..39fa66806ec 100644 --- a/build/pkgs/libffi/distros/opensuse.txt +++ b/build/pkgs/libffi/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(libffi)" +pkgconfig(libffi) diff --git a/build/pkgs/libgd/distros/fedora.txt b/build/pkgs/libgd/distros/fedora.txt index d27cc48549e..1f276d6eb09 100644 --- a/build/pkgs/libgd/distros/fedora.txt +++ b/build/pkgs/libgd/distros/fedora.txt @@ -1 +1,2 @@ -gd gd-devel +gd +gd-devel diff --git a/build/pkgs/libgd/distros/opensuse.txt b/build/pkgs/libgd/distros/opensuse.txt index 48195aa6b44..bcf953527f8 100644 --- a/build/pkgs/libgd/distros/opensuse.txt +++ b/build/pkgs/libgd/distros/opensuse.txt @@ -1,2 +1,2 @@ gd -"pkgconfig(gdlib)" +pkgconfig(gdlib) diff --git a/build/pkgs/libgd/distros/slackware.txt b/build/pkgs/libgd/distros/slackware.txt index 5d28bb87ae1..442f2e7f440 100644 --- a/build/pkgs/libgd/distros/slackware.txt +++ b/build/pkgs/libgd/distros/slackware.txt @@ -1,3 +1,8 @@ gd # shared library dependencies of gd -fontconfig libXpm libX11 libxcb libXau libXdmcp +fontconfig +libXpm +libX11 +libxcb +libXau +libXdmcp diff --git a/build/pkgs/liblzma/distros/fedora.txt b/build/pkgs/liblzma/distros/fedora.txt index 813a264efd5..87d41237fa8 100644 --- a/build/pkgs/liblzma/distros/fedora.txt +++ b/build/pkgs/liblzma/distros/fedora.txt @@ -1 +1,2 @@ -xz xz-devel +xz +xz-devel diff --git a/build/pkgs/liblzma/distros/opensuse.txt b/build/pkgs/liblzma/distros/opensuse.txt index f84d903df3e..96db709ccb8 100644 --- a/build/pkgs/liblzma/distros/opensuse.txt +++ b/build/pkgs/liblzma/distros/opensuse.txt @@ -1,2 +1,2 @@ xz -"pkgconfig(liblzma)" +pkgconfig(liblzma) diff --git a/build/pkgs/libogg/distros/opensuse.txt b/build/pkgs/libogg/distros/opensuse.txt index 886b7534f7b..cab88ad14f1 100644 --- a/build/pkgs/libogg/distros/opensuse.txt +++ b/build/pkgs/libogg/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(ogg)" +pkgconfig(ogg) diff --git a/build/pkgs/libpng/distros/opensuse.txt b/build/pkgs/libpng/distros/opensuse.txt index 3283fd2e697..40ec3d0a25c 100644 --- a/build/pkgs/libpng/distros/opensuse.txt +++ b/build/pkgs/libpng/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(libpng16)" +pkgconfig(libpng16) diff --git a/build/pkgs/libsemigroups/distros/opensuse.txt b/build/pkgs/libsemigroups/distros/opensuse.txt index aca27d4e0e3..3e58abf59c9 100644 --- a/build/pkgs/libsemigroups/distros/opensuse.txt +++ b/build/pkgs/libsemigroups/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(libsemigroups)" +pkgconfig(libsemigroups) diff --git a/build/pkgs/libtheora/distros/opensuse.txt b/build/pkgs/libtheora/distros/opensuse.txt index 19826d2aea6..156db81fdea 100644 --- a/build/pkgs/libtheora/distros/opensuse.txt +++ b/build/pkgs/libtheora/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(theora)" +pkgconfig(theora) diff --git a/build/pkgs/linbox/distros/opensuse.txt b/build/pkgs/linbox/distros/opensuse.txt index 1a52a7c51d3..efef6e5c743 100644 --- a/build/pkgs/linbox/distros/opensuse.txt +++ b/build/pkgs/linbox/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(linbox)" +pkgconfig(linbox) diff --git a/build/pkgs/m4ri/distros/opensuse.txt b/build/pkgs/m4ri/distros/opensuse.txt index c2a7c2c8f93..ea526e29d8e 100644 --- a/build/pkgs/m4ri/distros/opensuse.txt +++ b/build/pkgs/m4ri/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(m4ri)" +pkgconfig(m4ri) diff --git a/build/pkgs/m4rie/distros/opensuse.txt b/build/pkgs/m4rie/distros/opensuse.txt index 4b8fbfa44df..78287631a6b 100644 --- a/build/pkgs/m4rie/distros/opensuse.txt +++ b/build/pkgs/m4rie/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(m4rie)" +pkgconfig(m4rie) diff --git a/build/pkgs/mathjax/distros/gentoo.txt b/build/pkgs/mathjax/distros/gentoo.txt index a347f8c2348..e0d633a9b98 100644 --- a/build/pkgs/mathjax/distros/gentoo.txt +++ b/build/pkgs/mathjax/distros/gentoo.txt @@ -1 +1 @@ -">=dev-libs/mathjax-3" +>=dev-libs/mathjax-3 diff --git a/build/pkgs/mpc/distros/fedora.txt b/build/pkgs/mpc/distros/fedora.txt index 491a280bb72..19ae194c12c 100644 --- a/build/pkgs/mpc/distros/fedora.txt +++ b/build/pkgs/mpc/distros/fedora.txt @@ -1 +1,2 @@ -libmpc libmpc-devel +libmpc +libmpc-devel diff --git a/build/pkgs/mpfr/distros/opensuse.txt b/build/pkgs/mpfr/distros/opensuse.txt index 564517323f0..dadf66949a4 100644 --- a/build/pkgs/mpfr/distros/opensuse.txt +++ b/build/pkgs/mpfr/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(mpfr)" +pkgconfig(mpfr) diff --git a/build/pkgs/ncurses/distros/opensuse.txt b/build/pkgs/ncurses/distros/opensuse.txt index b31c6886b17..f50c62d6ac4 100644 --- a/build/pkgs/ncurses/distros/opensuse.txt +++ b/build/pkgs/ncurses/distros/opensuse.txt @@ -1,2 +1,2 @@ -"pkgconfig(ncurses)" -"pkgconfig(ncursesw)" +pkgconfig(ncurses) +pkgconfig(ncursesw) diff --git a/build/pkgs/openblas/distros/cygwin.txt b/build/pkgs/openblas/distros/cygwin.txt index d2146131e38..055fa2733d1 100644 --- a/build/pkgs/openblas/distros/cygwin.txt +++ b/build/pkgs/openblas/distros/cygwin.txt @@ -1 +1,2 @@ -liblapack-devel libopenblas +liblapack-devel +libopenblas diff --git a/build/pkgs/openssl/distros/fedora.txt b/build/pkgs/openssl/distros/fedora.txt index dda63a9f276..a9579db4fca 100644 --- a/build/pkgs/openssl/distros/fedora.txt +++ b/build/pkgs/openssl/distros/fedora.txt @@ -1 +1,2 @@ -openssl openssl-devel +openssl +openssl-devel diff --git a/build/pkgs/openssl/distros/slackware.txt b/build/pkgs/openssl/distros/slackware.txt index 6ed59c09128..14c745a6bc8 100644 --- a/build/pkgs/openssl/distros/slackware.txt +++ b/build/pkgs/openssl/distros/slackware.txt @@ -1 +1,2 @@ -openssl openssl-solibs +openssl +openssl-solibs diff --git a/build/pkgs/pari/distros/conda.txt b/build/pkgs/pari/distros/conda.txt index 88ec4bef346..018d16817d3 100644 --- a/build/pkgs/pari/distros/conda.txt +++ b/build/pkgs/pari/distros/conda.txt @@ -1,3 +1,6 @@ pari=*=*_pthread # We add these data packages because they are checked by spkg-configure.m4 -pari-elldata pari-galdata pari-galpol pari-seadata +pari-elldata +pari-galdata +pari-galpol +pari-seadata diff --git a/build/pkgs/pari/distros/fedora.txt b/build/pkgs/pari/distros/fedora.txt index 95ba141d56c..d315900766c 100644 --- a/build/pkgs/pari/distros/fedora.txt +++ b/build/pkgs/pari/distros/fedora.txt @@ -2,7 +2,8 @@ pari-devel # spkg-configure checks for gp, gphelp. Access to the documentation is crucial # for the cypari2 build. #29342: By default configuration in /etc/dnf/dnf.conf, # installation of documentation may be suppressed; we override this. -pari-gp --setopt=tsflags= +pari-gp +--setopt=tsflags= # spkg-configure checks for data pari-galdata pari-galpol diff --git a/build/pkgs/pari/distros/gentoo.txt b/build/pkgs/pari/distros/gentoo.txt index 449975ac8e1..cd13d54e8cc 100644 --- a/build/pkgs/pari/distros/gentoo.txt +++ b/build/pkgs/pari/distros/gentoo.txt @@ -1 +1,2 @@ -sci-mathematics/pari sci-mathematics/pari-data +sci-mathematics/pari +sci-mathematics/pari-data diff --git a/build/pkgs/perl_term_readline_gnu/distros/opensuse.txt b/build/pkgs/perl_term_readline_gnu/distros/opensuse.txt index ba80f6c445f..60563e056ca 100644 --- a/build/pkgs/perl_term_readline_gnu/distros/opensuse.txt +++ b/build/pkgs/perl_term_readline_gnu/distros/opensuse.txt @@ -1 +1 @@ -"perl(Term::ReadLine::Gnu)" +perl(Term::ReadLine::Gnu) diff --git a/build/pkgs/planarity/distros/fedora.txt b/build/pkgs/planarity/distros/fedora.txt index b107ebbf96f..e3d211ca5d1 100644 --- a/build/pkgs/planarity/distros/fedora.txt +++ b/build/pkgs/planarity/distros/fedora.txt @@ -1 +1,2 @@ -planarity planarity-devel +planarity +planarity-devel diff --git a/build/pkgs/polylib/distros/opensuse.txt b/build/pkgs/polylib/distros/opensuse.txt index f6432c31dfe..8b7f1e54de7 100644 --- a/build/pkgs/polylib/distros/opensuse.txt +++ b/build/pkgs/polylib/distros/opensuse.txt @@ -1,2 +1,2 @@ polylib -"pkgconfig(polylibgmp)" +pkgconfig(polylibgmp) diff --git a/build/pkgs/ptyprocess/distros/conda.txt b/build/pkgs/ptyprocess/distros/conda.txt index 4a518435c60..964d3f79453 100644 --- a/build/pkgs/ptyprocess/distros/conda.txt +++ b/build/pkgs/ptyprocess/distros/conda.txt @@ -1,3 +1,3 @@ # The version should be fixed to 0.5.1 (see https://github.com/sagemath/sage/issues/32147), but this is not available on conda-forge -# thus don't install ptyprocess with conda, but let pip handle it +# thus don't install ptyprocess with conda, but let pip handle it # ptyprocess diff --git a/build/pkgs/r/distros/conda.txt b/build/pkgs/r/distros/conda.txt index 42e26b8d8ed..4c235733c5f 100644 --- a/build/pkgs/r/distros/conda.txt +++ b/build/pkgs/r/distros/conda.txt @@ -1 +1,2 @@ -r r-essentials +r +r-essentials diff --git a/build/pkgs/r/distros/fedora.txt b/build/pkgs/r/distros/fedora.txt index a5148a636ee..088b10653bb 100644 --- a/build/pkgs/r/distros/fedora.txt +++ b/build/pkgs/r/distros/fedora.txt @@ -1 +1,2 @@ -R R-devel +R +R-devel diff --git a/build/pkgs/readline/distros/opensuse.txt b/build/pkgs/readline/distros/opensuse.txt index fffe7fdb306..66fd20246e7 100644 --- a/build/pkgs/readline/distros/opensuse.txt +++ b/build/pkgs/readline/distros/opensuse.txt @@ -1,3 +1,3 @@ readline-devel # not available on Leap 15.2: -"pkgconfig(readline)" +pkgconfig(readline) diff --git a/build/pkgs/sqlite/distros/opensuse.txt b/build/pkgs/sqlite/distros/opensuse.txt index e5831abec57..80861d24415 100644 --- a/build/pkgs/sqlite/distros/opensuse.txt +++ b/build/pkgs/sqlite/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(sqlite3)" +pkgconfig(sqlite3) diff --git a/build/pkgs/suitesparse/distros/fedora.txt b/build/pkgs/suitesparse/distros/fedora.txt index 473f5afeb82..add9f88182c 100644 --- a/build/pkgs/suitesparse/distros/fedora.txt +++ b/build/pkgs/suitesparse/distros/fedora.txt @@ -1 +1,2 @@ -suitesparse suitesparse-devel +suitesparse +suitesparse-devel diff --git a/build/pkgs/suitesparse/distros/gentoo.txt b/build/pkgs/suitesparse/distros/gentoo.txt index 3b1b625f3e6..36650ca82e3 100644 --- a/build/pkgs/suitesparse/distros/gentoo.txt +++ b/build/pkgs/suitesparse/distros/gentoo.txt @@ -1 +1,4 @@ -sci-libs/amd sci-libs/cholmod sci-libs/suitesparseconfig sci-libs/umfpack +sci-libs/amd +sci-libs/cholmod +sci-libs/suitesparseconfig +sci-libs/umfpack diff --git a/build/pkgs/tachyon/distros/fedora.txt b/build/pkgs/tachyon/distros/fedora.txt index b1ee1e1bdbe..035020a8d5b 100644 --- a/build/pkgs/tachyon/distros/fedora.txt +++ b/build/pkgs/tachyon/distros/fedora.txt @@ -1 +1,2 @@ -tachyon tachyon-devel +tachyon +tachyon-devel diff --git a/build/pkgs/zeromq/distros/fedora.txt b/build/pkgs/zeromq/distros/fedora.txt index 901dce11d4f..7ab081d69d9 100644 --- a/build/pkgs/zeromq/distros/fedora.txt +++ b/build/pkgs/zeromq/distros/fedora.txt @@ -1 +1,2 @@ -zeromq zeromq-devel +zeromq +zeromq-devel diff --git a/build/pkgs/zeromq/distros/opensuse.txt b/build/pkgs/zeromq/distros/opensuse.txt index bf80cc05be1..1d10c00df82 100644 --- a/build/pkgs/zeromq/distros/opensuse.txt +++ b/build/pkgs/zeromq/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(libzmq)" +pkgconfig(libzmq) diff --git a/build/pkgs/zlib/distros/opensuse.txt b/build/pkgs/zlib/distros/opensuse.txt index 734537742c0..74ff91e4b69 100644 --- a/build/pkgs/zlib/distros/opensuse.txt +++ b/build/pkgs/zlib/distros/opensuse.txt @@ -1 +1 @@ -"pkgconfig(zlib)" +pkgconfig(zlib) From a90f3ac35cc3e908ba5bfb07dc717d07d75c33c6 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 17 Dec 2023 12:18:27 -0800 Subject: [PATCH 02/38] build/bin/sage-print-system-package-command: Shell-quote the packages --- build/bin/sage-print-system-package-command | 39 ++++++++++++--------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/build/bin/sage-print-system-package-command b/build/bin/sage-print-system-package-command index c36f64e19bf..508135a3d35 100755 --- a/build/bin/sage-print-system-package-command +++ b/build/bin/sage-print-system-package-command @@ -79,7 +79,12 @@ function print_shell_command() echo ".. CODE-BLOCK:: bash" echo fi - echo "${PROMPT}$1" + echo -n "${PROMPT}" + for a in "$@"; do + # shell-quote arguments if necessary + printf "%q " $a + done + echo if [ -n "$OUTPUT_RST" ]; then echo fi @@ -109,70 +114,70 @@ case $system:$command in # Verbs handled above are our own inventions. Verbs handled below are apt-get verbs. # @(debian*|ubuntu*):update) - print_shell_command "${SUDO}apt-get $command $system_packages" + print_shell_command ${SUDO}apt-get $command $system_packages ;; @(debian*|ubuntu*):*) [ "$NO_INSTALL_RECOMMENDS" = yes ] && options="$options --no-install-recommends" [ "$YES" = yes ] && options="$options --yes" env="DEBIAN_FRONTEND=noninteractive " - [ -n "$system_packages" ] && print_shell_command "${SUDO}${env}apt-get $command $options $system_packages" + [ -n "$system_packages" ] && print_shell_command ${SUDO}${env}apt-get $command $options $system_packages ;; @(fedora*|redhat*|centos*):install) [ "$YES" = yes ] && options="$options -y" - [ -n "$system_packages" ] && print_shell_command "${SUDO}yum install $options $system_packages" + [ -n "$system_packages" ] && print_shell_command ${SUDO}yum install $options $system_packages ;; gentoo*:install) - [ -n "$system_packages" ] && print_shell_command "${SUDO}emerge $system_packages" + [ -n "$system_packages" ] && print_shell_command ${SUDO}emerge $system_packages ;; arch*:update) print_shell_command "${SUDO}pacman -Sy" ;; arch*:install) [ "$YES" = yes ] && options="$options --noconfirm" - [ -n "$system_packages" ] && print_shell_command "${SUDO}pacman -S $options $system_packages" + [ -n "$system_packages" ] && print_shell_command ${SUDO}pacman -S $options $system_packages ;; void*:update) print_shell_command "${SUDO}xbps-install -Su" ;; void*:install) [ "$YES" = yes ] && options="$options --yes" - [ -n "$system_packages" ] && print_shell_command "${SUDO}xbps-install $options $system_packages" + [ -n "$system_packages" ] && print_shell_command ${SUDO}xbps-install $options $system_packages ;; opensuse*:install) - [ -n "$system_packages" ] && print_shell_command "${SUDO}zypper install $system_packages" + [ -n "$system_packages" ] && print_shell_command ${SUDO}zypper install $system_packages ;; *conda*:install) [ "$YES" = yes ] && options="$options --yes" - [ -n "$system_packages" ] && print_shell_command "conda install $options $system_packages" + [ -n "$system_packages" ] && print_shell_command conda install $options $system_packages ;; homebrew*:install) - [ -n "$system_packages" ] && print_shell_command "brew install $system_packages" + [ -n "$system_packages" ] && print_shell_command brew install $system_packages ;; slackware*:install) - [ -n "$system_packages" ] && print_shell_command "${SUDO}slackpkg install $system_packages" + [ -n "$system_packages" ] && print_shell_command ${SUDO}slackpkg install $system_packages ;; cygwin*:update) print_comment "first install apt-cyg from https://github.com/transcode-open/apt-cyg" ;; cygwin*:install) - [ -n "$system_packages" ] && print_shell_command "apt-cyg install $system_packages" + [ -n "$system_packages" ] && print_shell_command apt-cyg install $system_packages ;; freebsd*:install) - [ -n "$system_packages" ] && print_shell_command "${SUDO}pkg install $system_packages" + [ -n "$system_packages" ] && print_shell_command ${SUDO}pkg install $system_packages ;; nix*:install) - [ -n "$system_packages" ] && print_shell_command "nix-env --install $system_packages" + [ -n "$system_packages" ] && print_shell_command nix-env --install $system_packages ;; alpine:update) print_shell_command "apk update" ;; alpine:install) - [ -n "$system_packages" ] && print_shell_command "apk add $system_packages" + [ -n "$system_packages" ] && print_shell_command apk add $system_packages ;; pip:install) - [ -n "$system_packages" ] && print_shell_command "sage -pip install $system_packages" + [ -n "$system_packages" ] && print_shell_command sage -pip install $system_packages ;; cpan:install) - [ -n "$system_packages" ] && print_shell_command "cpan -i $system_packages" + [ -n "$system_packages" ] && print_shell_command cpan -i $system_packages ;; repology:install) if [ -n "$system_packages" ]; then From e4a39d0b55b1be938996c5b60096014ffa4a7080 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 17 Dec 2023 14:40:58 -0800 Subject: [PATCH 03/38] build/bin/sage-get-system-packages: Substitute PYTHON_MINOR here --- build/bin/sage-get-system-packages | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/bin/sage-get-system-packages b/build/bin/sage-get-system-packages index c8b9314c3fe..1b8aae79c16 100755 --- a/build/bin/sage-get-system-packages +++ b/build/bin/sage-get-system-packages @@ -41,7 +41,7 @@ case "$SYSTEM" in fi fi SYSTEM_PACKAGES_FILE_NAMES="distros/$SYSTEM.txt" - STRIP_COMMENTS="sed s/#.*//;" + STRIP_COMMENTS="sed s/#.*//;s/\${PYTHON_MINOR}/${PYTHON_MINOR}/g" COLLECT=echo ;; esac From ef84d502921bad54c88ab05beddd05ba99ba26b8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 17 Dec 2023 14:41:51 -0800 Subject: [PATCH 04/38] build/bin/write-dockerfile.sh: Shell-quote system packages --- build/bin/write-dockerfile.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/build/bin/write-dockerfile.sh b/build/bin/write-dockerfile.sh index bfc4dd751a4..104f7c19b31 100755 --- a/build/bin/write-dockerfile.sh +++ b/build/bin/write-dockerfile.sh @@ -16,12 +16,15 @@ export PATH="$SAGE_ROOT"/build/bin:$PATH SYSTEM_PACKAGES=$EXTRA_SYSTEM_PACKAGES CONFIGURE_ARGS="--enable-option-checking " for SPKG in $(sage-package list --has-file=spkg-configure.m4 $SAGE_PACKAGE_LIST_ARGS) $EXTRA_SAGE_PACKAGES; do - SYSTEM_PACKAGE=$(sage-get-system-packages $SYSTEM $SPKG | sed 's/${PYTHON_MINOR}/'${PYTHON_MINOR}'/g') + SYSTEM_PACKAGE=$(sage-get-system-packages $SYSTEM $SPKG) if [ -n "${SYSTEM_PACKAGE}" ]; then - # SYSTEM_PACKAGE can be empty if, for example, the environment - # variable ENABLE_SYSTEM_SITE_PACKAGES is empty. - SYSTEM_PACKAGES+=" ${SYSTEM_PACKAGE}" - CONFIGURE_ARGS+="--with-system-${SPKG}=${WITH_SYSTEM_SPKG} " + # SYSTEM_PACKAGE can be empty if, for example, the environment + # variable ENABLE_SYSTEM_SITE_PACKAGES is empty. + for a in $SYSTEM_PACKAGE; do + # shell-quote package if necessary + SYSTEM_PACKAGES+=$(printf " %q" "$a") + done + CONFIGURE_ARGS+="--with-system-${SPKG}=${WITH_SYSTEM_SPKG} " fi done echo "# Automatically generated by SAGE_ROOT/build/bin/write-dockerfile.sh" From 944e0d1cd04067f8533578501a244794d189c57e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 17 Dec 2023 14:42:58 -0800 Subject: [PATCH 05/38] src/doc/bootstrap: Use sage-get-system-packages so that ENABLE_SYSTEM_SITEPACKAGES is respected --- src/doc/bootstrap | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/doc/bootstrap b/src/doc/bootstrap index b6830ad7bb3..ea7930b7eed 100755 --- a/src/doc/bootstrap +++ b/src/doc/bootstrap @@ -37,9 +37,8 @@ for SYSTEM in arch debian fedora homebrew opensuse; do DEVELOP_SYSTEM_PACKAGES= for PKG_BASE in $(sage-package list --has-file distros/$SYSTEM.txt); do PKG_SCRIPTS=build/pkgs/$PKG_BASE - SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/distros/$SYSTEM.txt PKG_TYPE=$(cat $PKG_SCRIPTS/type) - PKG_SYSTEM_PACKAGES=$(echo $(${STRIP_COMMENTS} $SYSTEM_PACKAGES_FILE)) + PKG_SYSTEM_PACKAGES=$(sage-get-system-packages $SYSTEM $PKG_BASE) if [ -n "PKG_SYSTEM_PACKAGES" ]; then if [ -f $PKG_SCRIPTS/spkg-configure.m4 ]; then case "$PKG_BASE:$PKG_TYPE" in From 1b3f0019fc71b9c83069d830600de0e158f3f1d3 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 17 Dec 2023 14:43:46 -0800 Subject: [PATCH 06/38] sage-spkg-info, src/doc/bootstrap: Wrap command lines --- build/bin/sage-print-system-package-command | 26 ++++++++++++++++----- build/bin/sage-spkg-info | 2 +- src/doc/bootstrap | 8 +++---- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/build/bin/sage-print-system-package-command b/build/bin/sage-print-system-package-command index 508135a3d35..728e8380c77 100755 --- a/build/bin/sage-print-system-package-command +++ b/build/bin/sage-print-system-package-command @@ -34,6 +34,16 @@ do ;; --prompt) PROMPT=' $ ' + CONTINUATION=' ' + ;; + --continuation=*) + CONTINUATION="${1#--continuation=}" + ;; + --wrap) + WRAP=78 + ;; + --wrap=*) + WRAP="${1#--wrap=}" ;; --no-install-recommends) NO_INSTALL_RECOMMENDS=yes @@ -79,12 +89,16 @@ function print_shell_command() echo ".. CODE-BLOCK:: bash" echo fi - echo -n "${PROMPT}" - for a in "$@"; do - # shell-quote arguments if necessary - printf "%q " $a - done - echo + # shell-quote arguments if necessary + quoted=$(for a in "$@"; do printf "%q " $a; done) + if [ -z "$WRAP" -o $# -lt 6 ]; then + echo "${PROMPT}${quoted}" + else + if [ -z "$SAGE_BOOTSTRAP_PYTHON" ]; then + SAGE_BOOTSTRAP_PYTHON=$(sage-bootstrap-python -c "import sys; print(sys.executable)") + fi + $SAGE_BOOTSTRAP_PYTHON -c "import textwrap; print(' \\\\\n'.join(textwrap.wrap(r'''${quoted}''', $WRAP, initial_indent=r'''${PROMPT}''', subsequent_indent=r'''${CONTINUATION}''', break_long_words=False, break_on_hyphens=False)))" + fi if [ -n "$OUTPUT_RST" ]; then echo fi diff --git a/build/bin/sage-spkg-info b/build/bin/sage-spkg-info index e43e516dc5b..4c8c4b0f9a9 100755 --- a/build/bin/sage-spkg-info +++ b/build/bin/sage-spkg-info @@ -103,7 +103,7 @@ for system in $systems; do echo "$system:" ;; esac - sage-print-system-package-command $system --prompt=' $ ' --sudo install $system_packages + sage-print-system-package-command $system --wrap --prompt=' $ ' --continuation=' ' --sudo install $system_packages echo done if [ -z "$system" ]; then diff --git a/src/doc/bootstrap b/src/doc/bootstrap index ea7930b7eed..107bbd25bcd 100755 --- a/src/doc/bootstrap +++ b/src/doc/bootstrap @@ -74,10 +74,10 @@ for SYSTEM in arch debian fedora homebrew opensuse; do if [ "${BOOTSTRAP_QUIET}" = "no" ]; then echo >&2 $0:$LINENO: installing "$OUTPUT_DIR"/$SYSTEM"*.txt" fi - echo "$(sage-print-system-package-command $SYSTEM --prompt --sudo install $(echo $(echo $SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM.txt - echo "$(sage-print-system-package-command $SYSTEM --prompt --sudo install $(echo $(echo $OPTIONAL_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-optional.txt - echo "$(sage-print-system-package-command $SYSTEM --prompt --sudo install $(echo $(echo $RECOMMENDED_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-recommended.txt - echo "$(sage-print-system-package-command $SYSTEM --prompt --sudo install $(echo $(echo $DEVELOP_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-develop.txt + echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap=84 --sudo install $(echo $(echo $SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM.txt + echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap=84 --sudo install $(echo $(echo $OPTIONAL_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-optional.txt + echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap=84 --sudo install $(echo $(echo $RECOMMENDED_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-recommended.txt + echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap=84 --sudo install $(echo $(echo $DEVELOP_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-develop.txt done OUTPUT_DIR="src/doc/en/reference/spkg" From 23a4e368d91a231e0ac8362639e745ef9b6b5f81 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 17 Dec 2023 15:59:02 -0800 Subject: [PATCH 07/38] Document the format of system package files --- build/pkgs/_prereq/distros/alpine.txt | 9 +++++++++ build/pkgs/_prereq/distros/arch.txt | 9 +++++++++ build/pkgs/_prereq/distros/conda.txt | 9 +++++++++ build/pkgs/_prereq/distros/cygwin.txt | 12 +++++------- build/pkgs/_prereq/distros/debian.txt | 16 ++++++---------- build/pkgs/_prereq/distros/fedora.txt | 16 ++++++---------- build/pkgs/_prereq/distros/freebsd.txt | 9 ++++----- build/pkgs/_prereq/distros/gentoo.txt | 9 +++++++++ build/pkgs/_prereq/distros/homebrew.txt | 13 ++++++------- build/pkgs/_prereq/distros/nix.txt | 16 ++++++---------- build/pkgs/_prereq/distros/opensuse.txt | 13 ++++++------- build/pkgs/_prereq/distros/slackware.txt | 9 +++++++++ build/pkgs/_prereq/distros/void.txt | 9 +++++++++ src/doc/en/developer/packaging.rst | 7 ++++++- 14 files changed, 99 insertions(+), 57 deletions(-) diff --git a/build/pkgs/_prereq/distros/alpine.txt b/build/pkgs/_prereq/distros/alpine.txt index 159c452cf30..3986f8ac849 100644 --- a/build/pkgs/_prereq/distros/alpine.txt +++ b/build/pkgs/_prereq/distros/alpine.txt @@ -1,3 +1,12 @@ +# This file, build/pkgs/_prereq/distros/alpine.txt, contains names of +# Alpine Linux packages needed for installation of Sage from source. +# +# In addition, the files build/pkgs/SPKG/distros/alpine.txt contain +# the names of packages that provide the equivalent of SPKG. +# +# One package per line. No need to escape special characters. +# Everything on a line after a # character is ignored. +# binutils make m4 diff --git a/build/pkgs/_prereq/distros/arch.txt b/build/pkgs/_prereq/distros/arch.txt index 9b9bf09e7e2..aac6d8f5976 100644 --- a/build/pkgs/_prereq/distros/arch.txt +++ b/build/pkgs/_prereq/distros/arch.txt @@ -1,3 +1,12 @@ +# This file, build/pkgs/_prereq/distros/arch.txt, contains names of +# Arch Linux packages needed for installation of Sage from source. +# +# In addition, the files build/pkgs/SPKG/distros/arch.txt contain +# the names of packages that provide the equivalent of SPKG. +# +# One package per line. No need to escape special characters. +# Everything on a line after a # character is ignored. +# binutils make m4 diff --git a/build/pkgs/_prereq/distros/conda.txt b/build/pkgs/_prereq/distros/conda.txt index d76388ce7bb..d85e37c8959 100644 --- a/build/pkgs/_prereq/distros/conda.txt +++ b/build/pkgs/_prereq/distros/conda.txt @@ -1,3 +1,12 @@ +# This file, build/pkgs/_prereq/distros/conda.txt, contains names of +# conda packages needed for installation of Sage from source. +# +# In addition, the files build/pkgs/SPKG/distros/conda.txt contain +# the names of packages that provide the equivalent of SPKG. +# +# One package per line. No need to escape special characters. +# Everything on a line after a # character is ignored. +# compilers make m4 diff --git a/build/pkgs/_prereq/distros/cygwin.txt b/build/pkgs/_prereq/distros/cygwin.txt index a9d6b08d3c7..7a05e1aaa54 100644 --- a/build/pkgs/_prereq/distros/cygwin.txt +++ b/build/pkgs/_prereq/distros/cygwin.txt @@ -1,12 +1,10 @@ -# This file, build/pkgs/cygwin.txt, contains name Cygwin packages -# needed for installation of Sage from source. +# This file, build/pkgs/_prereq/distros/cygwin.txt, contains names of +# Cygwin packages needed for installation of Sage from source. # -# In addition, the files build/pkgs/SPKG/cygwin.txt contain the names -# of packages that provide the equivalent of SPKG. -# -# See build/bin/sage-spkg, where this information is processed -# for use in "sage -info SPKG". +# In addition, the files build/pkgs/SPKG/distros/cygwin.txt contain +# the names of packages that provide the equivalent of SPKG. # +# One package per line. No need to escape special characters. # Everything on a line after a # character is ignored. # binutils diff --git a/build/pkgs/_prereq/distros/debian.txt b/build/pkgs/_prereq/distros/debian.txt index 50be6ac7e0b..785739528b4 100644 --- a/build/pkgs/_prereq/distros/debian.txt +++ b/build/pkgs/_prereq/distros/debian.txt @@ -1,16 +1,12 @@ -# This file, build/pkgs/debian.txt, contains names of Debian/Ubuntu packages -# needed for installation of Sage from source. +# This file, build/pkgs/_prereq/distros/debian.txt, contains names of +# Debian/Ubuntu/... packages needed for installation of Sage from source. # -# In addition, the files build/pkgs/SPKG/debian.txt contain the names -# of packages that provide the equivalent of SPKG. -# -# If distinctions between different distributions need to be made, -# files named debian....txt or ubuntu.....txt can be used. -# -# See build/bin/sage-spkg, where this information is processed -# for use in "sage -info SPKG". +# In addition, the files build/pkgs/SPKG/distros/debian.txt contain +# the names of packages that provide the equivalent of SPKG. # +# One package per line. No need to escape special characters. # Everything on a line after a # character is ignored. +# binutils make m4 diff --git a/build/pkgs/_prereq/distros/fedora.txt b/build/pkgs/_prereq/distros/fedora.txt index b35d7f64faf..2716e7eb0cd 100644 --- a/build/pkgs/_prereq/distros/fedora.txt +++ b/build/pkgs/_prereq/distros/fedora.txt @@ -1,15 +1,11 @@ -# This file, build/pkgs/fedora.txt, contains names of Fedora/Redhat/CentOS packages -# needed for installation of Sage from source. +# This file, build/pkgs/_prereq/distros/fedora.txt, contains names of +# Fedora/Redhat/CentOS/AlmaLinux packages needed for installation +# of Sage from source. # -# In addition, the files build/pkgs/SPKG/fedora.txt contain the names -# of packages that provide the equivalent of SPKG. -# -# If distinctions between different distributions need to be made, -# files named fedora....txt, redhat...txt, or centos....txt can be used. -# -# See build/bin/sage-spkg, where this information is processed -# for use in "sage -info SPKG". +# In addition, the files build/pkgs/SPKG/distros/fedora.txt contain +# the names of packages that provide the equivalent of SPKG. # +# One package per line. No need to escape special characters. # Everything on a line after a # character is ignored. # binutils diff --git a/build/pkgs/_prereq/distros/freebsd.txt b/build/pkgs/_prereq/distros/freebsd.txt index cc708ccfb2b..f9a4937520a 100644 --- a/build/pkgs/_prereq/distros/freebsd.txt +++ b/build/pkgs/_prereq/distros/freebsd.txt @@ -1,5 +1,5 @@ -# This file, build/pkgs/freebsd.txt, contains names of FreeBSD packages -# needed for installation of Sage from source. +# This file, build/pkgs/_prereq/distros/freebsd.txt, contains names of +# FreeBSD packages needed for installation of Sage from source. # # In addition, the files build/pkgs/SPKG/distros/freebsd.txt contain the # names of packages that provide the equivalent of SPKG. @@ -8,10 +8,9 @@ # $ cd /usr/ports/math/sage # $ sudo make install-missing-packages # -# See build/bin/sage-spkg, where this information is processed -# for use in "sage -info SPKG". -# +# One package per line. No need to escape special characters. # Everything on a line after a # character is ignored. +# gmake automake bash diff --git a/build/pkgs/_prereq/distros/gentoo.txt b/build/pkgs/_prereq/distros/gentoo.txt index 1e26c46cacc..455991e8a99 100644 --- a/build/pkgs/_prereq/distros/gentoo.txt +++ b/build/pkgs/_prereq/distros/gentoo.txt @@ -1,3 +1,12 @@ +# This file, build/pkgs/_prereq/distros/gentoo.txt, contains names of +# Gentoo packages needed for installation of Sage from source. +# +# In addition, the files build/pkgs/SPKG/distros/gentoo.txt contain +# the names of packages that provide the equivalent of SPKG. +# +# One package per line. No need to escape special characters. +# Everything on a line after a # character is ignored. +# sys-devel/binutils sys-libs/binutils-libs sys-devel/make diff --git a/build/pkgs/_prereq/distros/homebrew.txt b/build/pkgs/_prereq/distros/homebrew.txt index 863c22a6bee..2a85c39abfc 100644 --- a/build/pkgs/_prereq/distros/homebrew.txt +++ b/build/pkgs/_prereq/distros/homebrew.txt @@ -1,12 +1,11 @@ -# This file, build/pkgs/homebrew.txt, contains names of homebrew packages -# needed for installation of Sage from source (in addition to XCode). +# This file, build/pkgs/_prereq/distros/homebrew.txt, contains names of +# Homebrew packages needed for installation of Sage from source. # -# In addition, the files build/pkgs/SPKG/homebrew.txt contain the names -# of packages that provide the equivalent of SPKG. -# -# See build/bin/sage-spkg, where this information is processed -# for use in "sage -info SPKG". +# In addition, the files build/pkgs/SPKG/distros/homebrew.txt contain +# the names of packages that provide the equivalent of SPKG. # +# One package per line. No need to escape special characters. # Everything on a line after a # character is ignored. +# # No packages needed diff --git a/build/pkgs/_prereq/distros/nix.txt b/build/pkgs/_prereq/distros/nix.txt index 01e5ed4e959..523fe272f7c 100644 --- a/build/pkgs/_prereq/distros/nix.txt +++ b/build/pkgs/_prereq/distros/nix.txt @@ -1,16 +1,12 @@ -# This file, build/pkgs/debian.txt, contains names of Debian/Ubuntu packages -# needed for installation of Sage from source. +# This file, build/pkgs/_prereq/distros/nix.txt, contains names of +# nix packages needed for installation of Sage from source. # -# In addition, the files build/pkgs/SPKG/debian.txt contain the names -# of packages that provide the equivalent of SPKG. -# -# If distinctions between different distributions need to be made, -# files named debian....txt or ubuntu.....txt can be used. -# -# See build/bin/sage-spkg, where this information is processed -# for use in "sage -info SPKG". +# In addition, the files build/pkgs/SPKG/distros/nix.txt contain +# the names of packages that provide the equivalent of SPKG. # +# One package per line. No need to escape special characters. # Everything on a line after a # character is ignored. +# binutils gnumake gnum4 diff --git a/build/pkgs/_prereq/distros/opensuse.txt b/build/pkgs/_prereq/distros/opensuse.txt index 6f7a11fea47..56f77da9bcf 100644 --- a/build/pkgs/_prereq/distros/opensuse.txt +++ b/build/pkgs/_prereq/distros/opensuse.txt @@ -1,13 +1,12 @@ -# This file, build/pkgs/opensuse.txt, contains names of OpenSuse packages -# needed for installation of Sage from source. +# This file, build/pkgs/_prereq/distros/opensuse.txt, contains names of +# OpenSuse packages needed for installation of Sage from source. # -# In addition, the files build/pkgs/SPKG/opensuse.txt contain the names -# of packages that provide the equivalent of SPKG. -# -# See build/bin/sage-spkg, where this information is processed -# for use in "sage -info SPKG". +# In addition, the files build/pkgs/SPKG/distros/opensuse.txt contain +# the names of packages that provide the equivalent of SPKG. # +# One package per line. No need to escape special characters. # Everything on a line after a # character is ignored. +# binutils make m4 diff --git a/build/pkgs/_prereq/distros/slackware.txt b/build/pkgs/_prereq/distros/slackware.txt index 86c738fc7f8..117762dcd00 100644 --- a/build/pkgs/_prereq/distros/slackware.txt +++ b/build/pkgs/_prereq/distros/slackware.txt @@ -1,3 +1,12 @@ +# This file, build/pkgs/_prereq/distros/slackware.txt, contains names of +# Slackware packages needed for installation of Sage from source. +# +# In addition, the files build/pkgs/SPKG/distros/slackware.txt contain +# the names of packages that provide the equivalent of SPKG. +# +# One package per line. No need to escape special characters. +# Everything on a line after a # character is ignored. +# binutils make # dependencies of make diff --git a/build/pkgs/_prereq/distros/void.txt b/build/pkgs/_prereq/distros/void.txt index 552b5a415f2..d5c2143c56c 100644 --- a/build/pkgs/_prereq/distros/void.txt +++ b/build/pkgs/_prereq/distros/void.txt @@ -1,3 +1,12 @@ +# This file, build/pkgs/_prereq/distros/void.txt, contains names of +# Void Linux packages needed for installation of Sage from source. +# +# In addition, the files build/pkgs/SPKG/distros/void.txt contain +# the names of packages that provide the equivalent of SPKG. +# +# One package per line. No need to escape special characters. +# Everything on a line after a # character is ignored. +# bc binutils gcc diff --git a/src/doc/en/developer/packaging.rst b/src/doc/en/developer/packaging.rst index 4ed1762efe6..07db87d1f48 100644 --- a/src/doc/en/developer/packaging.rst +++ b/src/doc/en/developer/packaging.rst @@ -512,10 +512,15 @@ containing files with names like :: arch.txt conda.txt debian.txt + fedora.txt homebrew.txt ... -corresponding to different packaging systems. +corresponding to different packaging systems. Each system package +should appear on a separate line. If the shell-style variable reference +``${PYTHON_MINOR}`` appears, it is replaced by the minor version of +Python, e.g., 12 for Python 3.12.x. Everything on a line after a ``#`` +character is ignored, so comments can be included in the files. For example, if ``./configure`` detects that the Homebrew packaging system is in use, and if the current package can be provided by a From ab52a21caa6a266507a38700011a7084f08bf29b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 17 Dec 2023 16:01:36 -0800 Subject: [PATCH 08/38] src/doc/bootstrap: Wrap more narrowly --- src/doc/bootstrap | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/doc/bootstrap b/src/doc/bootstrap index 107bbd25bcd..240599c9799 100755 --- a/src/doc/bootstrap +++ b/src/doc/bootstrap @@ -74,10 +74,10 @@ for SYSTEM in arch debian fedora homebrew opensuse; do if [ "${BOOTSTRAP_QUIET}" = "no" ]; then echo >&2 $0:$LINENO: installing "$OUTPUT_DIR"/$SYSTEM"*.txt" fi - echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap=84 --sudo install $(echo $(echo $SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM.txt - echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap=84 --sudo install $(echo $(echo $OPTIONAL_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-optional.txt - echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap=84 --sudo install $(echo $(echo $RECOMMENDED_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-recommended.txt - echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap=84 --sudo install $(echo $(echo $DEVELOP_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-develop.txt + echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo $(echo $SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM.txt + echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo $(echo $OPTIONAL_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-optional.txt + echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo $(echo $RECOMMENDED_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-recommended.txt + echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo $(echo $DEVELOP_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-develop.txt done OUTPUT_DIR="src/doc/en/reference/spkg" From 0874d617d4a286b0a96696b34cacc58c5aa7f6f8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 17 Dec 2023 17:21:05 -0800 Subject: [PATCH 09/38] build/bin/sage-print-system-package-command: Simplify --- build/bin/sage-print-system-package-command | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/build/bin/sage-print-system-package-command b/build/bin/sage-print-system-package-command index 728e8380c77..0790a718e33 100755 --- a/build/bin/sage-print-system-package-command +++ b/build/bin/sage-print-system-package-command @@ -94,10 +94,7 @@ function print_shell_command() if [ -z "$WRAP" -o $# -lt 6 ]; then echo "${PROMPT}${quoted}" else - if [ -z "$SAGE_BOOTSTRAP_PYTHON" ]; then - SAGE_BOOTSTRAP_PYTHON=$(sage-bootstrap-python -c "import sys; print(sys.executable)") - fi - $SAGE_BOOTSTRAP_PYTHON -c "import textwrap; print(' \\\\\n'.join(textwrap.wrap(r'''${quoted}''', $WRAP, initial_indent=r'''${PROMPT}''', subsequent_indent=r'''${CONTINUATION}''', break_long_words=False, break_on_hyphens=False)))" + sage-bootstrap-python -c "import textwrap; print(' \\\\\n'.join(textwrap.wrap(r'''${quoted}''', $WRAP, initial_indent=r'''${PROMPT}''', subsequent_indent=r'''${CONTINUATION}''', break_long_words=False, break_on_hyphens=False)))" fi if [ -n "$OUTPUT_RST" ]; then echo From b889b585d374def8f1da84f050c111f754392edb Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 17 Dec 2023 17:40:18 -0800 Subject: [PATCH 10/38] src/doc/bootstrap: Remove unused variable --- src/doc/bootstrap | 1 - 1 file changed, 1 deletion(-) diff --git a/src/doc/bootstrap b/src/doc/bootstrap index 240599c9799..18b68bc012e 100755 --- a/src/doc/bootstrap +++ b/src/doc/bootstrap @@ -19,7 +19,6 @@ fi cd "$SAGE_ROOT" -STRIP_COMMENTS="sed s/#.*//;" OUTPUT_DIR="src/doc/en/installation" mkdir -p "$OUTPUT_DIR" From 7c0eb333eaf129d208c51f2df4a3798723d5f9a5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 18 Dec 2023 10:46:57 -0800 Subject: [PATCH 11/38] build/pkgs/_bootstrap/distros/fedora.txt: Remove outdated comment --- build/pkgs/_bootstrap/distros/fedora.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/build/pkgs/_bootstrap/distros/fedora.txt b/build/pkgs/_bootstrap/distros/fedora.txt index d0efc22cc39..5fe960ac3a0 100644 --- a/build/pkgs/_bootstrap/distros/fedora.txt +++ b/build/pkgs/_bootstrap/distros/fedora.txt @@ -2,5 +2,4 @@ autoconf automake libtool -# Fedora 26 needs: pkg-config From ce31931081940b5cc20c194eb76445c28953dba1 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 16 Mar 2021 18:42:20 -0700 Subject: [PATCH 12/38] tox.ini: Add local-macports --- tox.ini | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 6c928aa2623..6ec2b77feb2 100644 --- a/tox.ini +++ b/tox.ini @@ -498,7 +498,6 @@ setenv = ### ### "local" envs ### - homebrew: SYSTEM=homebrew local: SHARED_CACHE_DIR={toxworkdir}/Caches local: SETENV=: local: SETENV_CONFIGURE=: @@ -507,6 +506,7 @@ setenv = local-sudo: __SUDO=--sudo local-root: CONFIG_CONFIGURE_ARGS_ROOT=--enable-build-as-root # brew caches downloaded files in ${HOME}/Library/Caches. We share it between different toxenvs. + homebrew: SYSTEM=homebrew local-homebrew: HOMEBREW={envdir}/homebrew local-{homebrew-usrlocal,nohomebrew}: HOMEBREW=/usr/local # local-macos-nohomebrew: "best effort" isolation to avoid using a homebrew installation in /usr/local @@ -519,6 +519,11 @@ setenv = local-{homebrew-nokegonly,nohomebrew}: BOOTSTRAP=ACLOCAL_PATH="$HOMEBREW/opt/gettext/share/aclocal:$ACLOCAL_PATH" PATH="$HOMEBREW/opt/gettext/bin/:$HOMEBREW/bin:$PATH" ./bootstrap local-homebrew-!nokegonly: SETENV=. .homebrew-build-env local-homebrew: IGNORE_MISSING_SYSTEM_PACKAGES=no + # macports + macports: SYSTEM=macports + local-macports: MP_PREFIX={envdir}/macports + local-macports-optlocal: MP_PREFIX=/opt/local + local-macports: PATH={env:MP_PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin # conda local-conda: CONDA_PREFIX={envdir}/conda local-conda: PATH={env:CONDA_PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin @@ -686,6 +691,12 @@ commands = homebrew: bash -c 'if [ ! -x {env:HOMEBREW}/bin/brew ]; then mkdir -p {env:HOMEBREW} && cd {env:HOMEBREW} && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 ; fi' homebrew: bash -c 'case "{env:SKIP_SYSTEM_PKG_INSTALL:}" in 1|y*|Y*);; *) export PATH="build/bin:$PATH" && PACKAGES=$(sage-get-system-packages homebrew $(sage-package list {env:SAGE_PACKAGE_LIST_ARGS}) {env:ALL_EXTRA_SAGE_PACKAGES}); {env:HOMEBREW}/bin/brew install $PACKAGES; {env:HOMEBREW}/bin/brew upgrade $PACKAGES;; esac' # + # local-macports + # + # https://guide.macports.org/#installing.macports.source.multiple + local-macports: bash -c 'if [ ! -x "{env:MP_PREFIX}/bin/port" ]; then (mkdir -p {envdir}/macports-src && cd {envdir}/macports-src && curl -L https://distfiles.macports.org/MacPorts/MacPorts-2.6.4.tar.gz | tar xz --strip 1 && ./configure --prefix="{env:MP_PREFIX}" --with-applications-dir=$MP_PREFIX/Applications --with-no-root-privileges --without-startupitems && make && make install); fi' + local-macports: bash -c 'case "{env:SKIP_SYSTEM_PKG_INSTALL:}" in 1|y*|Y*);; *) port selfupdate && port upgrade outdated && PACKAGES=$(build/bin/sage-get-system-packages {env:SYSTEM} $(PATH=build/bin:$PATH build/bin/sage-package list {env:SAGE_PACKAGE_LIST_ARGS}) {env:EXTRA_SAGE_PACKAGES}); eval $(build/bin/sage-print-system-package-command {env:SYSTEM} {env:__SUDO:} --yes --no-install-recommends install $PACKAGES) || [ "$IGNORE_MISSING_SYSTEM_PACKAGES" = yes ] && echo "(ignoring errors)" ;; esac' + # # local-conda # # https://docs.anaconda.com/anaconda/install/silent-mode/ From 2b921f13111d0938a32f8f03a6d9419159c1c3c2 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 16 Mar 2021 19:25:49 -0700 Subject: [PATCH 13/38] Add macports.txt --- build/pkgs/_bootstrap/distros/macports.txt | 2 ++ build/pkgs/_prereq/distros/macports.txt | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 build/pkgs/_bootstrap/distros/macports.txt create mode 100644 build/pkgs/_prereq/distros/macports.txt diff --git a/build/pkgs/_bootstrap/distros/macports.txt b/build/pkgs/_bootstrap/distros/macports.txt new file mode 100644 index 00000000000..9f3b39e6fb7 --- /dev/null +++ b/build/pkgs/_bootstrap/distros/macports.txt @@ -0,0 +1,2 @@ +# Packages needed for ./bootstrap +gettext autoconf automake libtool pkgconfig diff --git a/build/pkgs/_prereq/distros/macports.txt b/build/pkgs/_prereq/distros/macports.txt new file mode 100644 index 00000000000..e887cd91e80 --- /dev/null +++ b/build/pkgs/_prereq/distros/macports.txt @@ -0,0 +1,12 @@ +# This file, build/pkgs/_prereq/distros/macports.txt, contains names of macports packages +# needed for installation of Sage from source (in addition to XCode). +# +# In addition, the files build/pkgs/SPKG/distros/macports.txt contain the names +# of packages that provide the equivalent of SPKG. +# +# See build/bin/sage-spkg, where this information is processed +# for use in "sage -info SPKG". +# +# Everything on a line after a # character is ignored. + +# No packages needed From 9eb1efc3ae20cb97a6090759921f4ac0668eb1fc Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 16 Mar 2021 19:26:12 -0700 Subject: [PATCH 14/38] build/pkgs/_prereq/distros: Update file comments --- build/pkgs/_prereq/distros/cygwin.txt | 4 ++-- build/pkgs/_prereq/distros/debian.txt | 4 ++-- build/pkgs/_prereq/distros/fedora.txt | 4 ++-- build/pkgs/_prereq/distros/freebsd.txt | 2 +- build/pkgs/_prereq/distros/homebrew.txt | 4 ++-- build/pkgs/_prereq/distros/nix.txt | 7 ++----- build/pkgs/_prereq/distros/opensuse.txt | 4 ++-- 7 files changed, 13 insertions(+), 16 deletions(-) diff --git a/build/pkgs/_prereq/distros/cygwin.txt b/build/pkgs/_prereq/distros/cygwin.txt index 2bf3164005b..994edd517cb 100644 --- a/build/pkgs/_prereq/distros/cygwin.txt +++ b/build/pkgs/_prereq/distros/cygwin.txt @@ -1,7 +1,7 @@ -# This file, build/pkgs/cygwin.txt, contains name Cygwin packages +# This file, build/pkgs/_prereq/distros/cygwin.txt, contains name Cygwin packages # needed for installation of Sage from source. # -# In addition, the files build/pkgs/SPKG/cygwin.txt contain the names +# In addition, the files build/pkgs/SPKG/distros/cygwin.txt contain the names # of packages that provide the equivalent of SPKG. # # See build/bin/sage-spkg, where this information is processed diff --git a/build/pkgs/_prereq/distros/debian.txt b/build/pkgs/_prereq/distros/debian.txt index 50be6ac7e0b..67f9a4d9b4a 100644 --- a/build/pkgs/_prereq/distros/debian.txt +++ b/build/pkgs/_prereq/distros/debian.txt @@ -1,7 +1,7 @@ -# This file, build/pkgs/debian.txt, contains names of Debian/Ubuntu packages +# This file, build/pkgs/_prereq/distros/debian.txt, contains names of Debian/Ubuntu packages # needed for installation of Sage from source. # -# In addition, the files build/pkgs/SPKG/debian.txt contain the names +# In addition, the files build/pkgs/SPKG/distros/debian.txt contain the names # of packages that provide the equivalent of SPKG. # # If distinctions between different distributions need to be made, diff --git a/build/pkgs/_prereq/distros/fedora.txt b/build/pkgs/_prereq/distros/fedora.txt index b35d7f64faf..1a104f207a1 100644 --- a/build/pkgs/_prereq/distros/fedora.txt +++ b/build/pkgs/_prereq/distros/fedora.txt @@ -1,7 +1,7 @@ -# This file, build/pkgs/fedora.txt, contains names of Fedora/Redhat/CentOS packages +# This file, build/pkgs/_prereq/distros/fedora.txt, contains names of Fedora/Redhat/CentOS packages # needed for installation of Sage from source. # -# In addition, the files build/pkgs/SPKG/fedora.txt contain the names +# In addition, the files build/pkgs/SPKG/distros/fedora.txt contain the names # of packages that provide the equivalent of SPKG. # # If distinctions between different distributions need to be made, diff --git a/build/pkgs/_prereq/distros/freebsd.txt b/build/pkgs/_prereq/distros/freebsd.txt index cc708ccfb2b..7d7185821c0 100644 --- a/build/pkgs/_prereq/distros/freebsd.txt +++ b/build/pkgs/_prereq/distros/freebsd.txt @@ -1,4 +1,4 @@ -# This file, build/pkgs/freebsd.txt, contains names of FreeBSD packages +# This file, build/pkgs/_prereq/distros/freebsd.txt, contains names of FreeBSD packages # needed for installation of Sage from source. # # In addition, the files build/pkgs/SPKG/distros/freebsd.txt contain the diff --git a/build/pkgs/_prereq/distros/homebrew.txt b/build/pkgs/_prereq/distros/homebrew.txt index 863c22a6bee..245fef14a42 100644 --- a/build/pkgs/_prereq/distros/homebrew.txt +++ b/build/pkgs/_prereq/distros/homebrew.txt @@ -1,7 +1,7 @@ -# This file, build/pkgs/homebrew.txt, contains names of homebrew packages +# This file, build/pkgs/_prereq/distros/homebrew.txt, contains names of homebrew packages # needed for installation of Sage from source (in addition to XCode). # -# In addition, the files build/pkgs/SPKG/homebrew.txt contain the names +# In addition, the files build/pkgs/SPKG/distros/homebrew.txt contain the names # of packages that provide the equivalent of SPKG. # # See build/bin/sage-spkg, where this information is processed diff --git a/build/pkgs/_prereq/distros/nix.txt b/build/pkgs/_prereq/distros/nix.txt index 01e5ed4e959..f27105137a6 100644 --- a/build/pkgs/_prereq/distros/nix.txt +++ b/build/pkgs/_prereq/distros/nix.txt @@ -1,12 +1,9 @@ -# This file, build/pkgs/debian.txt, contains names of Debian/Ubuntu packages +# This file, build/pkgs/_prereq/distros/nix.txt, contains names of Debian/Ubuntu packages # needed for installation of Sage from source. # -# In addition, the files build/pkgs/SPKG/debian.txt contain the names +# In addition, the files build/pkgs/SPKG/nix.txt contain the names # of packages that provide the equivalent of SPKG. # -# If distinctions between different distributions need to be made, -# files named debian....txt or ubuntu.....txt can be used. -# # See build/bin/sage-spkg, where this information is processed # for use in "sage -info SPKG". # diff --git a/build/pkgs/_prereq/distros/opensuse.txt b/build/pkgs/_prereq/distros/opensuse.txt index 6f7a11fea47..acd2e246d4f 100644 --- a/build/pkgs/_prereq/distros/opensuse.txt +++ b/build/pkgs/_prereq/distros/opensuse.txt @@ -1,7 +1,7 @@ -# This file, build/pkgs/opensuse.txt, contains names of OpenSuse packages +# This file, build/pkgs/_prereq/distros/opensuse.txt, contains names of OpenSuse packages # needed for installation of Sage from source. # -# In addition, the files build/pkgs/SPKG/opensuse.txt contain the names +# In addition, the files build/pkgs/SPKG/distros/opensuse.txt contain the names # of packages that provide the equivalent of SPKG. # # See build/bin/sage-spkg, where this information is processed From e6dafb4ca0a65a86abdff642be2acd4e5162355b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 16 Mar 2021 19:26:44 -0700 Subject: [PATCH 15/38] build/bin/sage-print-system-package-command: Handle macports install --- build/bin/sage-print-system-package-command | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/bin/sage-print-system-package-command b/build/bin/sage-print-system-package-command index c36f64e19bf..0c5e1463194 100755 --- a/build/bin/sage-print-system-package-command +++ b/build/bin/sage-print-system-package-command @@ -147,6 +147,10 @@ case $system:$command in homebrew*:install) [ -n "$system_packages" ] && print_shell_command "brew install $system_packages" ;; + macports*:install) + [ "$YES" = yes ] && options="$options -N" + [ -n "$system_packages" ] && print_shell_command "${SUDO}port $options install $system_packages" + ;; slackware*:install) [ -n "$system_packages" ] && print_shell_command "${SUDO}slackpkg install $system_packages" ;; From c42c9a09939b44172862cd1fcb67fb06d2ae2190 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 17 Mar 2021 14:16:29 -0700 Subject: [PATCH 16/38] tox.ini (local-macports-optlocal): Use sudo --- tox.ini | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 6ec2b77feb2..28b8e673ce0 100644 --- a/tox.ini +++ b/tox.ini @@ -523,6 +523,8 @@ setenv = macports: SYSTEM=macports local-macports: MP_PREFIX={envdir}/macports local-macports-optlocal: MP_PREFIX=/opt/local + local-macports-optlocal: SUDO=sudo + local-macports-optlocal: __SUDO=--sudo local-macports: PATH={env:MP_PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin # conda local-conda: CONDA_PREFIX={envdir}/conda @@ -694,8 +696,8 @@ commands = # local-macports # # https://guide.macports.org/#installing.macports.source.multiple - local-macports: bash -c 'if [ ! -x "{env:MP_PREFIX}/bin/port" ]; then (mkdir -p {envdir}/macports-src && cd {envdir}/macports-src && curl -L https://distfiles.macports.org/MacPorts/MacPorts-2.6.4.tar.gz | tar xz --strip 1 && ./configure --prefix="{env:MP_PREFIX}" --with-applications-dir=$MP_PREFIX/Applications --with-no-root-privileges --without-startupitems && make && make install); fi' - local-macports: bash -c 'case "{env:SKIP_SYSTEM_PKG_INSTALL:}" in 1|y*|Y*);; *) port selfupdate && port upgrade outdated && PACKAGES=$(build/bin/sage-get-system-packages {env:SYSTEM} $(PATH=build/bin:$PATH build/bin/sage-package list {env:SAGE_PACKAGE_LIST_ARGS}) {env:EXTRA_SAGE_PACKAGES}); eval $(build/bin/sage-print-system-package-command {env:SYSTEM} {env:__SUDO:} --yes --no-install-recommends install $PACKAGES) || [ "$IGNORE_MISSING_SYSTEM_PACKAGES" = yes ] && echo "(ignoring errors)" ;; esac' + local-macports: bash -c 'if [ ! -x "{env:MP_PREFIX}/bin/port" ]; then (mkdir -p {envdir}/macports-src && cd {envdir}/macports-src && curl -L https://distfiles.macports.org/MacPorts/MacPorts-2.6.4.tar.gz | tar xz --strip 1 && ./configure --prefix="{env:MP_PREFIX}" --with-applications-dir=$MP_PREFIX/Applications --with-no-root-privileges --without-startupitems && make && {env:SUDO:} make install); fi' + local-macports: bash -c 'case "{env:SKIP_SYSTEM_PKG_INSTALL:}" in 1|y*|Y*);; *) {env:SUDO:} port selfupdate && {env:SUDO:} port upgrade outdated && PACKAGES=$(build/bin/sage-get-system-packages {env:SYSTEM} $(PATH=build/bin:$PATH build/bin/sage-package list {env:SAGE_PACKAGE_LIST_ARGS}) {env:EXTRA_SAGE_PACKAGES}); eval $(build/bin/sage-print-system-package-command {env:SYSTEM} {env:__SUDO:} --yes --no-install-recommends install $PACKAGES) || [ "$IGNORE_MISSING_SYSTEM_PACKAGES" = yes ] && echo "(ignoring errors)" ;; esac' # # local-conda # From c609df08fc3f60d31a7a93a6e6a243ecc18bca84 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 18 Mar 2021 11:09:39 -0700 Subject: [PATCH 17/38] build/bin/sage-print-system-package-command (macports): Handle setup-build-env --- build/bin/sage-print-system-package-command | 11 +++++++++++ tox.ini | 1 + 2 files changed, 12 insertions(+) diff --git a/build/bin/sage-print-system-package-command b/build/bin/sage-print-system-package-command index 0c5e1463194..216f9b9983f 100755 --- a/build/bin/sage-print-system-package-command +++ b/build/bin/sage-print-system-package-command @@ -102,6 +102,17 @@ case $system:$command in [ -n "$SAGE_ROOT" ] || SAGE_ROOT=. echo "${PROMPT}source $SAGE_ROOT/.homebrew-build-env" ;; + macports*:setup-build-env) + $IF_VERBOSE echo "${COMMENT}" + $IF_VERBOSE echo "${COMMENT}MacPorts does not provide unversioned gcc and gfortran executables by default" + $IF_VERBOSE echo "${COMMENT}To make gfortran available (and build with gcc from XCode), use:" + $IF_VERBOSE echo "${COMMENT}" + print_shell_command "export FC=gfortran-mp-10" + $IF_VERBOSE echo "${COMMENT}" + $IF_VERBOSE echo "${COMMENT}Alternatively, to use gcc and gfortran from Macports, use:" + $IF_VERBOSE echo "${COMMENT}" + $IF_VERBOSE print_shell_command "${SUDO} port select --set gcc mp-gcc10" + ;; *:setup-build-env) # Nothing needed ;; diff --git a/tox.ini b/tox.ini index 28b8e673ce0..6e7d4a2e85e 100644 --- a/tox.ini +++ b/tox.ini @@ -526,6 +526,7 @@ setenv = local-macports-optlocal: SUDO=sudo local-macports-optlocal: __SUDO=--sudo local-macports: PATH={env:MP_PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin + local-macports: SETENV=eval $(build/bin/sage-print-system-package-command {env:SYSTEM} setup-build-env) # conda local-conda: CONDA_PREFIX={envdir}/conda local-conda: PATH={env:CONDA_PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin From 13ddb0f00d2069934a9f51135b3c3694a708a6ef Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 18 Mar 2021 12:05:04 -0700 Subject: [PATCH 18/38] build/bin/sage-guess-package-system: Detect macports --- build/bin/sage-guess-package-system | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/bin/sage-guess-package-system b/build/bin/sage-guess-package-system index 09eafd510c9..8e679c2eac9 100755 --- a/build/bin/sage-guess-package-system +++ b/build/bin/sage-guess-package-system @@ -11,6 +11,8 @@ if conda --version > /dev/null 2>&1; then fi if brew --version > /dev/null 2>&1; then echo homebrew +elif port version > /dev/null 2>&1; then + echo macports elif emerge --version > /dev/null 2>&1; then echo gentoo elif apt-get --version > /dev/null 2>&1; then From 6b3114530576e18ad6059cb1dc8aed0777cd7f13 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 26 Mar 2021 12:04:56 -0700 Subject: [PATCH 19/38] tox.ini: Add configuration factors macports-python{3.8,3.9} --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index 6e7d4a2e85e..f9c42e4fbae 100644 --- a/tox.ini +++ b/tox.ini @@ -574,6 +574,8 @@ setenv = homebrew-{python3.9,python3.10,python3.11,python3.12}: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python={env:HOMEBREW}/opt/python@{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}/bin/python3 # Installers from https://www.python.org/downloads/macos/ (must manually download and install) macos-python3_pythonorg: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=/Library/Frameworks/Python.framework/Versions/{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}/bin/python3 + # MacPorts + macports-{python3.8,python3.9,python3.10,python3.11}: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python={env:MP_PREFIX}/bin/python{env:PYTHON_MAJOR}.{env:PYTHON_MINOR} # https://github.com/pypa/manylinux manylinux-standard: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=/opt/python/cp{env:PYTHON_MAJOR}{env:PYTHON_MINOR}-cp{env:PYTHON_MAJOR}{env:PYTHON_MINOR}/bin/python3 conda: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=python3 From 99290f057da47ebaeedb249534e0d1e2a9324f0b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 1 Apr 2021 18:54:55 -0700 Subject: [PATCH 20/38] build/bin/sage-print-system-package-command (macports): Recommend FC as configure arg, not environment variable This is so that the presence of the environment variable at 'make' time does not break the build when the compiler is not actually present. --- build/bin/sage-print-system-package-command | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build/bin/sage-print-system-package-command b/build/bin/sage-print-system-package-command index 216f9b9983f..b07901b5571 100755 --- a/build/bin/sage-print-system-package-command +++ b/build/bin/sage-print-system-package-command @@ -107,9 +107,13 @@ case $system:$command in $IF_VERBOSE echo "${COMMENT}MacPorts does not provide unversioned gcc and gfortran executables by default" $IF_VERBOSE echo "${COMMENT}To make gfortran available (and build with gcc from XCode), use:" $IF_VERBOSE echo "${COMMENT}" - print_shell_command "export FC=gfortran-mp-10" + $IF_VERBOSE print_shell_command "./configure FC=gfortran-mp-10" $IF_VERBOSE echo "${COMMENT}" - $IF_VERBOSE echo "${COMMENT}Alternatively, to use gcc and gfortran from Macports, use:" + $IF_VERBOSE echo "${COMMENT}To build with gcc and gfortran from MacPorts, use:" + $IF_VERBOSE echo "${COMMENT}" + $IF_VERBOSE print_shell_command "./configure CC=gcc-mp-10 CXX=g++-mp-10 FC=gfortran-mp-10" + $IF_VERBOSE echo "${COMMENT}" + $IF_VERBOSE echo "${COMMENT}Alternatively, to make use gcc and gfortran from Macports, use:" $IF_VERBOSE echo "${COMMENT}" $IF_VERBOSE print_shell_command "${SUDO} port select --set gcc mp-gcc10" ;; From 503f7c21b308328664e6b802f5888a26cb1456a6 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 1 Apr 2021 18:55:49 -0700 Subject: [PATCH 21/38] tox.ini (macports): Pass FC as configure argument; add variants macports-gcc_{spkg,9,10,11} --- tox.ini | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tox.ini b/tox.ini index f9c42e4fbae..66569253961 100644 --- a/tox.ini +++ b/tox.ini @@ -621,6 +621,14 @@ setenv = macos-nohomebrew: FREETYPE_CONFIGURE=--without-harfbuzz macos-nohomebrew: PILLOW_BUILD_EXT=--disable-platform-guessing --disable-jpeg2000 --disable-imagequant --disable-tiff --disable-lcms --disable-webp --disable-webpmux --disable-xcb macos-nohomebrew: ZLIB_ROOT={env:MACOS_SDK}/usr + macports: CONFIG_CONFIGURE_ARGS_2=FC=gfortran-mp-10 + macports-gcc_spkg: CONFIG_CONFIGURE_ARGS_2=--without-system-gcc + macports-gcc_9: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-mp-9 CXX=g++-mp-9 --with-system-gfortran=force FC=gfortran-mp-9 + macports-gcc_10: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-mp-10 CXX=g++-mp-10 --with-system-gfortran=force FC=gfortran-mp-10 + macports-gcc_11: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-mp-11 CXX=g++-mp-11 --with-system-gfortran=force FC=gfortran-mp-11 + # + # macOS SDK/deployment target settings + # macos: MACOS_SDK=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk # python3 from XCode 12 has MACOSX_DEPLOYMENT_TARGET=10.14.6. Selecting a lower target would cause /usr/bin/python3 to be rejected by configure. macos-10.14: MACOS_SDK=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk From 09229e60c9c264e68b317a4f760ab9839eff20f9 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 15 Apr 2022 13:46:23 -0700 Subject: [PATCH 22/38] tox.ini (macports): Fix up use of ALL_EXTRA_SAGE_PACKAGES --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 66569253961..6299e8e8d8f 100644 --- a/tox.ini +++ b/tox.ini @@ -708,7 +708,7 @@ commands = # # https://guide.macports.org/#installing.macports.source.multiple local-macports: bash -c 'if [ ! -x "{env:MP_PREFIX}/bin/port" ]; then (mkdir -p {envdir}/macports-src && cd {envdir}/macports-src && curl -L https://distfiles.macports.org/MacPorts/MacPorts-2.6.4.tar.gz | tar xz --strip 1 && ./configure --prefix="{env:MP_PREFIX}" --with-applications-dir=$MP_PREFIX/Applications --with-no-root-privileges --without-startupitems && make && {env:SUDO:} make install); fi' - local-macports: bash -c 'case "{env:SKIP_SYSTEM_PKG_INSTALL:}" in 1|y*|Y*);; *) {env:SUDO:} port selfupdate && {env:SUDO:} port upgrade outdated && PACKAGES=$(build/bin/sage-get-system-packages {env:SYSTEM} $(PATH=build/bin:$PATH build/bin/sage-package list {env:SAGE_PACKAGE_LIST_ARGS}) {env:EXTRA_SAGE_PACKAGES}); eval $(build/bin/sage-print-system-package-command {env:SYSTEM} {env:__SUDO:} --yes --no-install-recommends install $PACKAGES) || [ "$IGNORE_MISSING_SYSTEM_PACKAGES" = yes ] && echo "(ignoring errors)" ;; esac' + local-macports: bash -c 'case "{env:SKIP_SYSTEM_PKG_INSTALL:}" in 1|y*|Y*);; *) {env:SUDO:} port selfupdate && {env:SUDO:} port upgrade outdated && PACKAGES=$(build/bin/sage-get-system-packages {env:SYSTEM} $(PATH=build/bin:$PATH build/bin/sage-package list {env:SAGE_PACKAGE_LIST_ARGS}) {env:ALL_EXTRA_SAGE_PACKAGES}); eval $(build/bin/sage-print-system-package-command {env:SYSTEM} {env:__SUDO:} --yes --no-install-recommends install $PACKAGES) || [ "$IGNORE_MISSING_SYSTEM_PACKAGES" = yes ] && echo "(ignoring errors)" ;; esac' # # local-conda # From bb06bd10fd5e2efc178c2ecb06f9c4b840d3116b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 16 Apr 2022 10:27:25 -0700 Subject: [PATCH 23/38] tox.ini (local-macports): Update macports base version to 2.7.2 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 6299e8e8d8f..7e00760adf5 100644 --- a/tox.ini +++ b/tox.ini @@ -707,7 +707,7 @@ commands = # local-macports # # https://guide.macports.org/#installing.macports.source.multiple - local-macports: bash -c 'if [ ! -x "{env:MP_PREFIX}/bin/port" ]; then (mkdir -p {envdir}/macports-src && cd {envdir}/macports-src && curl -L https://distfiles.macports.org/MacPorts/MacPorts-2.6.4.tar.gz | tar xz --strip 1 && ./configure --prefix="{env:MP_PREFIX}" --with-applications-dir=$MP_PREFIX/Applications --with-no-root-privileges --without-startupitems && make && {env:SUDO:} make install); fi' + local-macports: bash -c 'if [ ! -x "{env:MP_PREFIX}/bin/port" ]; then (mkdir -p {envdir}/macports-src && cd {envdir}/macports-src && curl -L https://distfiles.macports.org/MacPorts/MacPorts-2.7.2.tar.gz | tar xz --strip 1 && ./configure --prefix="{env:MP_PREFIX}" --with-applications-dir=$MP_PREFIX/Applications --with-no-root-privileges --without-startupitems && make && {env:SUDO:} make install); fi' local-macports: bash -c 'case "{env:SKIP_SYSTEM_PKG_INSTALL:}" in 1|y*|Y*);; *) {env:SUDO:} port selfupdate && {env:SUDO:} port upgrade outdated && PACKAGES=$(build/bin/sage-get-system-packages {env:SYSTEM} $(PATH=build/bin:$PATH build/bin/sage-package list {env:SAGE_PACKAGE_LIST_ARGS}) {env:ALL_EXTRA_SAGE_PACKAGES}); eval $(build/bin/sage-print-system-package-command {env:SYSTEM} {env:__SUDO:} --yes --no-install-recommends install $PACKAGES) || [ "$IGNORE_MISSING_SYSTEM_PACKAGES" = yes ] && echo "(ignoring errors)" ;; esac' # # local-conda From 2b8863b1a46ca7e9d7f180cd694f5e32a4cc0090 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 16 Apr 2022 10:28:14 -0700 Subject: [PATCH 24/38] build/pkgs/gfortran/distros/macports.txt: Switch to gcc11 --- build/pkgs/gfortran/distros/macports.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/gfortran/distros/macports.txt b/build/pkgs/gfortran/distros/macports.txt index c2878adf893..3f1565176e8 100644 --- a/build/pkgs/gfortran/distros/macports.txt +++ b/build/pkgs/gfortran/distros/macports.txt @@ -1 +1 @@ -gcc10 +gfortran +gcc11 +gfortran From 9144cc241ba42408f13a150cca863fd9554b6b73 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 16 Apr 2022 23:07:57 -0700 Subject: [PATCH 25/38] tox.ini (macports): By default use FC=gfortran-mp-11 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 7e00760adf5..fab0c6fce2a 100644 --- a/tox.ini +++ b/tox.ini @@ -621,7 +621,7 @@ setenv = macos-nohomebrew: FREETYPE_CONFIGURE=--without-harfbuzz macos-nohomebrew: PILLOW_BUILD_EXT=--disable-platform-guessing --disable-jpeg2000 --disable-imagequant --disable-tiff --disable-lcms --disable-webp --disable-webpmux --disable-xcb macos-nohomebrew: ZLIB_ROOT={env:MACOS_SDK}/usr - macports: CONFIG_CONFIGURE_ARGS_2=FC=gfortran-mp-10 + macports: CONFIG_CONFIGURE_ARGS_2=FC=gfortran-mp-11 macports-gcc_spkg: CONFIG_CONFIGURE_ARGS_2=--without-system-gcc macports-gcc_9: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-mp-9 CXX=g++-mp-9 --with-system-gfortran=force FC=gfortran-mp-9 macports-gcc_10: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-mp-10 CXX=g++-mp-10 --with-system-gfortran=force FC=gfortran-mp-10 From 8cced87e40c44fb04d2f231c23f92f3166e864a3 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 16 Apr 2022 23:13:49 -0700 Subject: [PATCH 26/38] build/bin/sage-print-system-package-command (macports): Also update to gcc11 here --- build/bin/sage-print-system-package-command | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/bin/sage-print-system-package-command b/build/bin/sage-print-system-package-command index b07901b5571..fedf9edade2 100755 --- a/build/bin/sage-print-system-package-command +++ b/build/bin/sage-print-system-package-command @@ -107,15 +107,15 @@ case $system:$command in $IF_VERBOSE echo "${COMMENT}MacPorts does not provide unversioned gcc and gfortran executables by default" $IF_VERBOSE echo "${COMMENT}To make gfortran available (and build with gcc from XCode), use:" $IF_VERBOSE echo "${COMMENT}" - $IF_VERBOSE print_shell_command "./configure FC=gfortran-mp-10" + $IF_VERBOSE print_shell_command "./configure FC=gfortran-mp-11" $IF_VERBOSE echo "${COMMENT}" $IF_VERBOSE echo "${COMMENT}To build with gcc and gfortran from MacPorts, use:" $IF_VERBOSE echo "${COMMENT}" - $IF_VERBOSE print_shell_command "./configure CC=gcc-mp-10 CXX=g++-mp-10 FC=gfortran-mp-10" + $IF_VERBOSE print_shell_command "./configure CC=gcc-mp-11 CXX=g++-mp-11 FC=gfortran-mp-11" $IF_VERBOSE echo "${COMMENT}" $IF_VERBOSE echo "${COMMENT}Alternatively, to make use gcc and gfortran from Macports, use:" $IF_VERBOSE echo "${COMMENT}" - $IF_VERBOSE print_shell_command "${SUDO} port select --set gcc mp-gcc10" + $IF_VERBOSE print_shell_command "${SUDO} port select --set gcc mp-gcc11" ;; *:setup-build-env) # Nothing needed From 38f7eff1ed2d018bdfff608f4ad7a56dec7e1393 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 30 Apr 2022 18:12:20 -0700 Subject: [PATCH 27/38] WIP --- build/bin/sage-print-system-package-command | 2 ++ tox.ini | 11 +++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/build/bin/sage-print-system-package-command b/build/bin/sage-print-system-package-command index fedf9edade2..3b6ab2e08e1 100755 --- a/build/bin/sage-print-system-package-command +++ b/build/bin/sage-print-system-package-command @@ -103,6 +103,8 @@ case $system:$command in echo "${PROMPT}source $SAGE_ROOT/.homebrew-build-env" ;; macports*:setup-build-env) + $IF_VERBOSE echo "${COMMENT}" + $IF_VERBOSE echo "${COMMENT}WARNING: Use of MacPorts is experimental" $IF_VERBOSE echo "${COMMENT}" $IF_VERBOSE echo "${COMMENT}MacPorts does not provide unversioned gcc and gfortran executables by default" $IF_VERBOSE echo "${COMMENT}To make gfortran available (and build with gcc from XCode), use:" diff --git a/tox.ini b/tox.ini index fab0c6fce2a..3b5b61f0f04 100644 --- a/tox.ini +++ b/tox.ini @@ -621,15 +621,14 @@ setenv = macos-nohomebrew: FREETYPE_CONFIGURE=--without-harfbuzz macos-nohomebrew: PILLOW_BUILD_EXT=--disable-platform-guessing --disable-jpeg2000 --disable-imagequant --disable-tiff --disable-lcms --disable-webp --disable-webpmux --disable-xcb macos-nohomebrew: ZLIB_ROOT={env:MACOS_SDK}/usr - macports: CONFIG_CONFIGURE_ARGS_2=FC=gfortran-mp-11 - macports-gcc_spkg: CONFIG_CONFIGURE_ARGS_2=--without-system-gcc - macports-gcc_9: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-mp-9 CXX=g++-mp-9 --with-system-gfortran=force FC=gfortran-mp-9 - macports-gcc_10: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-mp-10 CXX=g++-mp-10 --with-system-gfortran=force FC=gfortran-mp-10 - macports-gcc_11: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-mp-11 CXX=g++-mp-11 --with-system-gfortran=force FC=gfortran-mp-11 + macports: CONFIG_CONFIGURE_ARGS_2=--with-system-gfortran=force FC=gfortran-mp-11 + macports-clang_13: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC="$CONFIGURED_CC" CXX="$CONFIGURED_CXX" --with-system-gfortran=force FC=gfortran-mp-11 + macports-clang_13: CONFIGURED_CC=clang-mp-13 -isysroot {env:MACOS_SDK} + macports-clang_13: CONFIGURED_CXX=clang-mp-13 -isysroot {env:MACOS_SDK} # # macOS SDK/deployment target settings # - macos: MACOS_SDK=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk + {macos,macports}: MACOS_SDK=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk # python3 from XCode 12 has MACOSX_DEPLOYMENT_TARGET=10.14.6. Selecting a lower target would cause /usr/bin/python3 to be rejected by configure. macos-10.14: MACOS_SDK=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk macos-10.14: MACOSX_DEPLOYMENT_TARGET=10.14.6 From 7956e28b62cd8aaa45c085736a40d099b181733b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 30 Apr 2022 20:22:22 -0700 Subject: [PATCH 28/38] tox.ini (macports): Remove variants that tried to use real gcc --- tox.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 3b5b61f0f04..81bcf2faae6 100644 --- a/tox.ini +++ b/tox.ini @@ -621,8 +621,7 @@ setenv = macos-nohomebrew: FREETYPE_CONFIGURE=--without-harfbuzz macos-nohomebrew: PILLOW_BUILD_EXT=--disable-platform-guessing --disable-jpeg2000 --disable-imagequant --disable-tiff --disable-lcms --disable-webp --disable-webpmux --disable-xcb macos-nohomebrew: ZLIB_ROOT={env:MACOS_SDK}/usr - macports: CONFIG_CONFIGURE_ARGS_2=--with-system-gfortran=force FC=gfortran-mp-11 - macports-clang_13: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC="$CONFIGURED_CC" CXX="$CONFIGURED_CXX" --with-system-gfortran=force FC=gfortran-mp-11 + macports-clang_13: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC="$CONFIGURED_CC" CXX="$CONFIGURED_CXX" macports-clang_13: CONFIGURED_CC=clang-mp-13 -isysroot {env:MACOS_SDK} macports-clang_13: CONFIGURED_CXX=clang-mp-13 -isysroot {env:MACOS_SDK} # From 3274dbe7b0395d78b796886f4f921ea870f8d613 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 1 May 2022 00:44:00 -0700 Subject: [PATCH 29/38] build/pkgs/libgd/distros/macports.txt: Disable --- build/pkgs/libgd/distros/macports.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/pkgs/libgd/distros/macports.txt b/build/pkgs/libgd/distros/macports.txt index d44f88f27cc..ee5e3357f06 100644 --- a/build/pkgs/libgd/distros/macports.txt +++ b/build/pkgs/libgd/distros/macports.txt @@ -1 +1,2 @@ -gd2 +# broken as of 2022-05-01 -- and also has too many dependencies +#gd2 From 395bdaa16c56a3a5e733c6306d8070067ad21a70 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 1 May 2022 00:50:43 -0700 Subject: [PATCH 30/38] build/pkgs/python3/distros/macports.txt: Use python310 --- build/pkgs/python3/distros/macports.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/python3/distros/macports.txt b/build/pkgs/python3/distros/macports.txt index 6a2d05c5edb..92826c681b4 100644 --- a/build/pkgs/python3/distros/macports.txt +++ b/build/pkgs/python3/distros/macports.txt @@ -1 +1 @@ -python39 +python310 From b790eb1099e713a7c513aabb2e90fb9f114cd2ef Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 1 May 2022 09:39:15 -0700 Subject: [PATCH 31/38] Disable more broken macports packages --- build/pkgs/cmake/distros/macports.txt | 3 ++- build/pkgs/curl/distros/macports.txt | 3 ++- build/pkgs/freetype/distros/macports.txt | 3 ++- build/pkgs/qhull/distros/macports.txt | 3 ++- build/pkgs/r/distros/macports.txt | 3 ++- build/pkgs/suitesparse/distros/macports.txt | 3 ++- build/pkgs/zeromq/distros/macports.txt | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/build/pkgs/cmake/distros/macports.txt b/build/pkgs/cmake/distros/macports.txt index a3ea3e4380f..de0e65cf914 100644 --- a/build/pkgs/cmake/distros/macports.txt +++ b/build/pkgs/cmake/distros/macports.txt @@ -1 +1,2 @@ -cmake +# Broken as of 2022-05-01 +#cmake diff --git a/build/pkgs/curl/distros/macports.txt b/build/pkgs/curl/distros/macports.txt index 13368f82902..284d14f8d01 100644 --- a/build/pkgs/curl/distros/macports.txt +++ b/build/pkgs/curl/distros/macports.txt @@ -1 +1,2 @@ -curl +# Broken as of 2022-05-01 +#curl diff --git a/build/pkgs/freetype/distros/macports.txt b/build/pkgs/freetype/distros/macports.txt index 098479093ff..a2e684ddd92 100644 --- a/build/pkgs/freetype/distros/macports.txt +++ b/build/pkgs/freetype/distros/macports.txt @@ -1 +1,2 @@ -freetype +# Broken as of 2022-05-01 +#freetype diff --git a/build/pkgs/qhull/distros/macports.txt b/build/pkgs/qhull/distros/macports.txt index 95d316779cf..703b7aadad9 100644 --- a/build/pkgs/qhull/distros/macports.txt +++ b/build/pkgs/qhull/distros/macports.txt @@ -1 +1,2 @@ -qhull +# broken as of 2022-05-01 +#qhull diff --git a/build/pkgs/r/distros/macports.txt b/build/pkgs/r/distros/macports.txt index 331bae08fb7..5798a47ae13 100644 --- a/build/pkgs/r/distros/macports.txt +++ b/build/pkgs/r/distros/macports.txt @@ -1 +1,2 @@ -R +# Broken as of 2022-05-01, and too many dependencies (X11) +# R diff --git a/build/pkgs/suitesparse/distros/macports.txt b/build/pkgs/suitesparse/distros/macports.txt index 45d8956e69e..93b99b56740 100644 --- a/build/pkgs/suitesparse/distros/macports.txt +++ b/build/pkgs/suitesparse/distros/macports.txt @@ -1 +1,2 @@ -SuiteSparse +# broken as of 2022-05-01 +#SuiteSparse diff --git a/build/pkgs/zeromq/distros/macports.txt b/build/pkgs/zeromq/distros/macports.txt index 3f0b9927569..11d74369d60 100644 --- a/build/pkgs/zeromq/distros/macports.txt +++ b/build/pkgs/zeromq/distros/macports.txt @@ -1 +1,2 @@ -zmq-devel +# Broken as of 2022-05-01 +#zmq-devel From 59fa001b0f71d47b15ba31ab8325246ded5124b5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 1 May 2022 15:52:10 -0700 Subject: [PATCH 32/38] build/bin/sage-print-system-package-command [macports]: Do not describe variants that do not work --- build/bin/sage-print-system-package-command | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/build/bin/sage-print-system-package-command b/build/bin/sage-print-system-package-command index 3b6ab2e08e1..c5f5939fe49 100755 --- a/build/bin/sage-print-system-package-command +++ b/build/bin/sage-print-system-package-command @@ -106,18 +106,10 @@ case $system:$command in $IF_VERBOSE echo "${COMMENT}" $IF_VERBOSE echo "${COMMENT}WARNING: Use of MacPorts is experimental" $IF_VERBOSE echo "${COMMENT}" - $IF_VERBOSE echo "${COMMENT}MacPorts does not provide unversioned gcc and gfortran executables by default" + $IF_VERBOSE echo "${COMMENT}MacPorts does not provide unversioned gfortran executables by default" $IF_VERBOSE echo "${COMMENT}To make gfortran available (and build with gcc from XCode), use:" $IF_VERBOSE echo "${COMMENT}" $IF_VERBOSE print_shell_command "./configure FC=gfortran-mp-11" - $IF_VERBOSE echo "${COMMENT}" - $IF_VERBOSE echo "${COMMENT}To build with gcc and gfortran from MacPorts, use:" - $IF_VERBOSE echo "${COMMENT}" - $IF_VERBOSE print_shell_command "./configure CC=gcc-mp-11 CXX=g++-mp-11 FC=gfortran-mp-11" - $IF_VERBOSE echo "${COMMENT}" - $IF_VERBOSE echo "${COMMENT}Alternatively, to make use gcc and gfortran from Macports, use:" - $IF_VERBOSE echo "${COMMENT}" - $IF_VERBOSE print_shell_command "${SUDO} port select --set gcc mp-gcc11" ;; *:setup-build-env) # Nothing needed From e23f67a01edfd4106566cfc484a19603d5162209 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 1 May 2022 18:13:54 -0700 Subject: [PATCH 33/38] tox.ini (macports): Set CPATH, LIBRARY_PATH --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index 81bcf2faae6..180b90daa1b 100644 --- a/tox.ini +++ b/tox.ini @@ -526,6 +526,8 @@ setenv = local-macports-optlocal: SUDO=sudo local-macports-optlocal: __SUDO=--sudo local-macports: PATH={env:MP_PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin + local-macports: CPATH={env:MP_PREFIX}/include + local-macports: LIBRARY_PATH={env:MP_PREFIX}/lib local-macports: SETENV=eval $(build/bin/sage-print-system-package-command {env:SYSTEM} setup-build-env) # conda local-conda: CONDA_PREFIX={envdir}/conda From d0fd7c84fb2a7876ef168a01eaa1425b49d58529 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 1 May 2022 19:41:18 -0700 Subject: [PATCH 34/38] build/pkgs/pari/distros/macports.txt: Disable --- build/pkgs/pari/distros/macports.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/pkgs/pari/distros/macports.txt b/build/pkgs/pari/distros/macports.txt index 67abbc9dec6..8960baaba3e 100644 --- a/build/pkgs/pari/distros/macports.txt +++ b/build/pkgs/pari/distros/macports.txt @@ -1 +1,2 @@ -pari +# incomplete, unusable for sage, causes cysignals build failure +#pari From f5cf2cf9a67587cee79dbff26b161bc42eead9e8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 1 May 2022 23:35:46 -0700 Subject: [PATCH 35/38] tox.ini (macports): Use isysroot --- tox.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 180b90daa1b..4b4fb8464a6 100644 --- a/tox.ini +++ b/tox.ini @@ -623,7 +623,9 @@ setenv = macos-nohomebrew: FREETYPE_CONFIGURE=--without-harfbuzz macos-nohomebrew: PILLOW_BUILD_EXT=--disable-platform-guessing --disable-jpeg2000 --disable-imagequant --disable-tiff --disable-lcms --disable-webp --disable-webpmux --disable-xcb macos-nohomebrew: ZLIB_ROOT={env:MACOS_SDK}/usr - macports-clang_13: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC="$CONFIGURED_CC" CXX="$CONFIGURED_CXX" + macports: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC="$CONFIGURED_CC" CXX="$CONFIGURED_CXX" + macports: CONFIGURED_CC=gcc -isysroot {env:MACOS_SDK} + macports: CONFIGURED_CXX=g++ -isysroot {env:MACOS_SDK} macports-clang_13: CONFIGURED_CC=clang-mp-13 -isysroot {env:MACOS_SDK} macports-clang_13: CONFIGURED_CXX=clang-mp-13 -isysroot {env:MACOS_SDK} # From 84082ea7dfc500d41d8e1cfb889865b6d0aeec9b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 18 Dec 2023 10:54:25 -0800 Subject: [PATCH 36/38] build/bin/sage-print-system-package-command (macports): Update use of print_shell_command --- build/bin/sage-print-system-package-command | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/bin/sage-print-system-package-command b/build/bin/sage-print-system-package-command index df91da0cc47..722a7f75161 100755 --- a/build/bin/sage-print-system-package-command +++ b/build/bin/sage-print-system-package-command @@ -125,7 +125,7 @@ case $system:$command in $IF_VERBOSE echo "${COMMENT}MacPorts does not provide unversioned gfortran executables by default" $IF_VERBOSE echo "${COMMENT}To make gfortran available (and build with gcc from XCode), use:" $IF_VERBOSE echo "${COMMENT}" - $IF_VERBOSE print_shell_command "./configure FC=gfortran-mp-11" + $IF_VERBOSE print_shell_command ./configure FC=gfortran-mp-11 ;; *:setup-build-env) # Nothing needed @@ -174,7 +174,7 @@ case $system:$command in ;; macports*:install) [ "$YES" = yes ] && options="$options -N" - [ -n "$system_packages" ] && print_shell_command "${SUDO}port $options install $system_packages" + [ -n "$system_packages" ] && print_shell_command ${SUDO}port $options install $system_packages ;; slackware*:install) [ -n "$system_packages" ] && print_shell_command ${SUDO}slackpkg install $system_packages From 388653f58f431a6c57933ec6798c2fcf7a450813 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 18 Dec 2023 10:56:58 -0800 Subject: [PATCH 37/38] build/pkgs/_bootstrap/distros/macports.txt: One package per line --- build/pkgs/_bootstrap/distros/macports.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/pkgs/_bootstrap/distros/macports.txt b/build/pkgs/_bootstrap/distros/macports.txt index 9f3b39e6fb7..5f6a8a4c191 100644 --- a/build/pkgs/_bootstrap/distros/macports.txt +++ b/build/pkgs/_bootstrap/distros/macports.txt @@ -1,2 +1,6 @@ # Packages needed for ./bootstrap -gettext autoconf automake libtool pkgconfig +gettext +autoconf +automake +libtool +pkgconfig From b5ad62423fd2203e7886d7c3f6a836e22b654ba2 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 18 Dec 2023 11:05:34 -0800 Subject: [PATCH 38/38] tox.ini: Add macports-python3.12 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 4b4fb8464a6..9be72cccdeb 100644 --- a/tox.ini +++ b/tox.ini @@ -577,7 +577,7 @@ setenv = # Installers from https://www.python.org/downloads/macos/ (must manually download and install) macos-python3_pythonorg: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=/Library/Frameworks/Python.framework/Versions/{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}/bin/python3 # MacPorts - macports-{python3.8,python3.9,python3.10,python3.11}: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python={env:MP_PREFIX}/bin/python{env:PYTHON_MAJOR}.{env:PYTHON_MINOR} + macports-{python3.8,python3.9,python3.10,python3.11,python3.12}: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python={env:MP_PREFIX}/bin/python{env:PYTHON_MAJOR}.{env:PYTHON_MINOR} # https://github.com/pypa/manylinux manylinux-standard: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=/opt/python/cp{env:PYTHON_MAJOR}{env:PYTHON_MINOR}-cp{env:PYTHON_MAJOR}{env:PYTHON_MINOR}/bin/python3 conda: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=python3