Skip to content
Merged
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
16 changes: 16 additions & 0 deletions .github/workflows/static_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@ jobs:
run: |
cd micromamba-feedstock/
sed -i '' '/conda_forge_output_validation/d' conda-forge.yml
# Already applied upstream in mamba; feedstock patch is for released tarballs only.
- name: Remove psl dependencies patch
run: |
python3 - <<'PY'
from pathlib import Path

path = Path("micromamba-feedstock/recipe/meta.yaml")
path.write_text(
"".join(
line
for line in path.read_text().splitlines(keepends=True)
if "0001-psl-dependencies.patch" not in line
)
)
PY
- name: Checkout mamba branch
uses: actions/checkout@v7
with:
Expand Down Expand Up @@ -178,6 +193,7 @@ jobs:
reproc-cpp-static>=14.2.4.post0
libmsgpack-c-static
libcurl-static>=8.4.0
libpsl-static
libarchive-minimal-static
zstd-static
zlib
Expand Down
1 change: 1 addition & 0 deletions dev/environment-micromamba-static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dependencies:
- reproc-cpp-static >=14.2.4.post0
- libcurl >=8.4.0
- libcurl-static >=8.4.0
- libpsl-static
- libmsgpack-c-static
- xz-static
- libssh2-static
Expand Down
16 changes: 15 additions & 1 deletion libmamba/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ macro(libmamba_create_target target_name linkage output_name)
set(
REQUIRED_STATIC_DEPS
libcurl.a
libpsl.a
libssh2.a
libgssapi_krb5.a
libkrb5.a
Expand Down Expand Up @@ -624,6 +625,7 @@ macro(libmamba_create_target target_name linkage output_name)
libssl_static.lib
libcrypto_static.lib
libcurl_a.lib
libpsl.a
)

set(STATIC_DEPS "")
Expand All @@ -644,7 +646,19 @@ macro(libmamba_create_target target_name linkage output_name)

target_link_libraries(${target_name} PUBLIC ${SYSTEM_PROVIDED_LIBRARIES} ${STATIC_DEPS})

add_compile_definitions(LIBARCHIVE_STATIC CURL_STATICLIB)
# Necessary for properly linking static libraries.
add_compile_definitions(
# See:
# https://github.com/libarchive/libarchive/blob/19ff56da4f4790064346579a1a7f18a0230b0ac6/libarchive/archive_entry.h#L134-L158
LIBARCHIVE_STATIC
# See:
# https://github.com/curl/curl/blob/1d7b8e6c29e22c88750fb53a01e30be03104a3fd/docs/FAQ.md?plain=1#L1074-L1077
CURL_STATICLIB
# See:
# https://github.com/rockdaboot/libpsl/blob/8c06e95b8878f6b80613d7628486056728429d09/include/libpsl.h.in#L45-L55
PSL_STATIC
)

include_directories("${_mamba_deps_prefix}/include/")
endif()
else()
Expand Down
Loading