Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ misc-clean:
rm -f aclocal.m4 config.log confcache
rm -rf autom4te.cache
rm -f build/make/Makefile build/make/Makefile-auto
rm -f build/platform/meson/sage-configure-native-file.ini
rm -rf src/lib

bdist-clean: clean
Expand Down
7 changes: 7 additions & 0 deletions build/bin/sage-build-env
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ if [ "x$SAGE_BUILD_ENV_SOURCED" = "x" ]; then
export SAGE_CONFIGURE_PARI="--with-pari=$SAGE_PARI_PREFIX"
fi

# This is usually blank if the system boost is used
if [ -n "$SAGE_BOOST_PREFIX" ]; then
# Some packages that depend on boost accept a --with-boost=<prefix> flag to
# their ./configure scripts. Thus we deal with this just as with GMP above.
export SAGE_CONFIGURE_BOOST="--with-boost=$SAGE_BOOST_PREFIX"
fi

# Optimization flags.
#
# The compiler flags are set in order of priority by
Expand Down
2 changes: 2 additions & 0 deletions build/bin/sage-build-env-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"

export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"

export SAGE_BOOST_PREFIX="@SAGE_BOOST_PREFIX@"

export SAGE_HAVE_LIBJPEG="@SAGE_HAVE_LIBJPEG@"

export SAGE_FRICAS_LISP="@SAGE_FRICAS_LISP@"
Expand Down
1 change: 1 addition & 0 deletions build/pkgs/brial/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ cd src
cp "$SAGE_ROOT"/config/config.* .
sdh_configure \
--enable-shared --disable-static \
$SAGE_CONFIGURE_BOOST \
--with-boost-unit-test-framework=no
sdh_make
sdh_make_install
5 changes: 4 additions & 1 deletion build/pkgs/sagelib/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ SITEPACKAGESDIR=$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["pur
# does not shadow the namespace package sage during the build.
(cd "$SITEPACKAGESDIR" && rm -f sage/__init__.py)
if [ "$SAGE_EDITABLE" = yes ]; then
sdh_pip_editable_install . --config-settings=build-dir="build/sage-distro" --config-settings=setup-args="-DSAGE_LOCAL=$SAGE_LOCAL"
sdh_pip_editable_install . \
--config-settings=build-dir="build/sage-distro" \
--config-settings=setup-args="--native-file=$SAGE_PKGS/../platform/meson/sage-configure-native-file.ini" \
--config-settings=setup-args="-DSAGE_LOCAL=$SAGE_LOCAL"

if [ "$SAGE_WHEELS" = yes ]; then
# Additionally build a wheel (for use in other venvs)
Expand Down
1 change: 1 addition & 0 deletions build/platform/meson/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sage-configure-native-file.ini
6 changes: 6 additions & 0 deletions build/platform/meson/sage-configure-native-file.ini.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# These meson settings are from Sage ./configure

[properties]

# Forwarded path from ./configure --with-boost=/path/to/boost
@SAGE_SET_BOOST_PREFIX@
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ AC_SUBST(SAGE_PKG_CONFIG_PATH, [$SAGE_DARWIN_PKG_CONFIG_PATH'$SAGE_LOCAL/lib/pkg

AC_CONFIG_FILES([build/make/Makefile-auto build/make/Makefile])
AC_CONFIG_FILES([src/bin/sage-env-config src/bin/sage-src-env-config build/bin/sage-build-env-config])
AC_CONFIG_FILES([build/platform/meson/sage-configure-native-file.ini])

AC_CONFIG_FILES([pkgs/sage-conf/_sage_conf/_conf.py])

Expand Down
12 changes: 8 additions & 4 deletions m4/ax_boost_base.m4
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,19 @@ AC_DEFUN([AX_BOOST_BASE],
AC_ARG_WITH([boost],
[AS_HELP_STRING([--with-boost@<:@=ARG@:>@],
[use Boost library from a standard location (ARG=yes),
from the specified location (ARG=<path>),
or disable it (ARG=no)
or from the specified location (ARG=<path>),
@<:@ARG=yes@:>@ ])],
[
AS_CASE([$withval],
[no],[want_boost="no";_AX_BOOST_BASE_boost_path=""],
[yes],[want_boost="yes";_AX_BOOST_BASE_boost_path=""],
[no],[AC_MSG_ERROR([Boost is a prerequisite and cannot be turned off])],
[want_boost="yes";_AX_BOOST_BASE_boost_path="$withval"])
],
[want_boost="yes"])


AC_ARG_WITH([boost-libdir],
[AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
[AS_HELP_STRING([--with-boost-libdir=LIB_DIR (unmaintained, do not use!)],
[Force given directory for boost libraries.
Note that this will override library path detection,
so use this parameter only if default library detection fails
Expand All @@ -79,6 +78,11 @@ AS_IF([test "x$want_boost" = "xyes"],
[_AX_BOOST_BASE_RUNDETECT([$1],[$2],[$3])])
AC_SUBST(BOOST_CPPFLAGS)
AC_SUBST(BOOST_LDFLAGS)
AS_IF([test "x$_AX_BOOST_BASE_boost_path" = "x"],
[AC_SUBST(SAGE_SET_BOOST_PREFIX,[])
AC_SUBST(SAGE_BOOST_PREFIX,[])],
[AC_SUBST(SAGE_SET_BOOST_PREFIX,['boost_root = '"'"$_AX_BOOST_BASE_boost_path"'"])
AC_SUBST(SAGE_BOOST_PREFIX,[$_AX_BOOST_BASE_boost_path])])
])


Expand Down
4 changes: 2 additions & 2 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ boost = dependency(
'boost',
version: '>=1.83.0',
required: false,
modules: ['graph', 'tuple'],
modules: ['graph'],
)
if boost.found()
# Need at least v1.83.0 (https://github.com/boostorg/functional/commit/6a573e4b8333ee63ee62ce95558c3667348db233)
Expand All @@ -236,7 +236,7 @@ else
'boost',
version: '>=1.66.0',
required: false,
modules: ['graph', 'tuple'],
modules: ['graph'],
)
endif

Expand Down
Loading