Skip to content
Draft
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
20 changes: 20 additions & 0 deletions .devcontainer/onCreate-meson.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,26 @@ if [ "$SYSTEM" = "fedora" ]; then
# Mitigate upstream packaging bug: https://bugzilla.redhat.com/show_bug.cgi?id=2332429
# by swapping the incorrectly installed OpenCL-ICD-Loader for the expected ocl-icd
dnf5 -y swap --repo='fedora' OpenCL-ICD-Loader ocl-icd
elif [ "$SYSTEM" = "gentoo" ]; then
# Configure Portage
mkdir -p /etc/portage/package.accept_keywords /etc/portage/package.use
cat > /etc/portage/package.accept_keywords/sage <<'EOF'
media-gfx/tachyon ~amd64
media-libs/qhull ~amd64
sci-libs/m4ri ~amd64
sci-libs/m4rie ~amd64
EOF
cat > /etc/portage/package.use/sage <<'EOF'
sci-libs/cddlib tools
sci-mathematics/eclib flint
sci-mathematics/flint ntl
sci-mathematics/lcalc pari
sci-libs/brial png
sci-libs/m4ri png
sci-mathematics/maxima ecl
media-libs/qhull tools
media-libs/libglvnd X
EOF
fi

eval $(build/bin/sage-print-system-package-command $SYSTEM "$@" update)
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

7 changes: 7 additions & 0 deletions .devcontainer/portability-gentoo/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM gentoo/portage:latest AS portage
FROM gentoo/stage3:latest

# Copy the entire portage volume in
COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo

RUN emerge -qv dev-vcs/git dev-lang/python
22 changes: 22 additions & 0 deletions .devcontainer/portability-gentoo/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// See https://aka.ms/devcontainer.json for format details.
{
"name": "Gentoo",
//"image": "gentoo/stage3:latest",
"dockerFile": "Dockerfile",
"onCreateCommand": ".devcontainer/onCreate-meson.sh || true",
"features": {
// Git and Python features are not compatible with Gentoo, so we install it manually in the Dockerfile
//"ghcr.io/devcontainers/features/git": {},
//"ghcr.io/devcontainers/features/python:1": {},
"../uv": {
"version": "latest"
}
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python"
]
}
}
}
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
fail-fast: false
matrix:
container:
- gentoo/stage3:latest
- fedora:41
- fedora:42
- ghcr.io/void-linux/void-glibc-full
Expand All @@ -37,6 +38,11 @@ jobs:
xbps-install -yu
# node-based actions require libstdc++.so.6
xbps-install -Sy libstdc++ bash git
elif [ "${{ matrix.container }}" = "gentoo/stage3:latest" ]; then
# Setup portage
getuto
emerge-webrsync
emerge --sync
fi

- name: Checkout code
Expand Down Expand Up @@ -67,6 +73,26 @@ jobs:
# Mitigate upstream packaging bug: https://bugzilla.redhat.com/show_bug.cgi?id=2332429
# by swapping the incorrectly installed OpenCL-ICD-Loader for the expected ocl-icd
dnf -y swap --repo='fedora' OpenCL-ICD-Loader ocl-icd
elif [ "$SYSTEM" = "gentoo" ]; then
# Configure Portage
mkdir -p /etc/portage/package.accept_keywords /etc/portage/package.use
cat > /etc/portage/package.accept_keywords/sage <<'EOF'
media-gfx/tachyon ~amd64
media-libs/qhull ~amd64
sci-libs/m4ri ~amd64
sci-libs/m4rie ~amd64
EOF
cat > /etc/portage/package.use/sage <<'EOF'
sci-libs/cddlib tools
sci-mathematics/eclib flint
sci-mathematics/flint ntl
sci-mathematics/lcalc pari
sci-libs/brial png
sci-libs/m4ri png
sci-mathematics/maxima ecl
media-libs/qhull tools
media-libs/libglvnd X
EOF
fi

eval $(build/bin/sage-print-system-package-command $SYSTEM update)
Expand Down
3 changes: 3 additions & 0 deletions build/bin/sage-print-system-package-command
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ case $system:$command in
[ "$IGNORE_MISSING" = yes ] && options="$options --skip-unavailable"
[ -n "$system_packages" ] && print_shell_command ${SUDO}dnf install $options $system_packages
;;
gentoo*:update)
print_shell_command ${SUDO}emerge --sync
;;
gentoo*:install)
[ -n "$system_packages" ] && print_shell_command ${SUDO}emerge $system_packages
;;
Expand Down
Loading