From 023824556a6a71045b5687b85e06ce6a65534757 Mon Sep 17 00:00:00 2001 From: memento Date: Sat, 7 Dec 2024 15:00:21 -0600 Subject: [PATCH 01/29] Add source-built conda-froge compliant serial-monitor-rust --- recipes/egui-phosphor-rust-source/README.md | 5 ++ .../install-rust-source.sh | 20 +++++++ .../install_rust_source.bat | 19 ++++++ recipes/egui-phosphor-rust-source/recipe.yaml | 55 +++++++++++++++++ recipes/keepawake-rs/README.md | 5 ++ recipes/keepawake-rs/build.sh | 15 +++++ .../patches/osx-update-time.patch | 13 ++++ recipes/keepawake-rs/recipe.yaml | 50 ++++++++++++++++ recipes/preferences-rs-rust-source/README.md | 5 ++ .../install-rust-source.sh | 20 +++++++ .../install_rust_source.bat | 19 ++++++ .../preferences-rs-rust-source/recipe.yaml | 56 +++++++++++++++++ recipes/serial-monitor-rust/README.md | 5 ++ recipes/serial-monitor-rust/bld.bat | 2 + recipes/serial-monitor-rust/build.sh | 23 +++++++ recipes/serial-monitor-rust/helpers/build.ps1 | 23 +++++++ .../patches/use-local-rust-sources.patch | 19 ++++++ recipes/serial-monitor-rust/recipe.yaml | 56 +++++++++++++++++ recipes/serialport-rs-rust-source/README.md | 5 ++ .../install-rust-source.sh | 20 +++++++ .../install_rust_source.bat | 19 ++++++ recipes/serialport-rs-rust-source/recipe.yaml | 60 +++++++++++++++++++ 22 files changed, 514 insertions(+) create mode 100644 recipes/egui-phosphor-rust-source/README.md create mode 100755 recipes/egui-phosphor-rust-source/install-rust-source.sh create mode 100644 recipes/egui-phosphor-rust-source/install_rust_source.bat create mode 100644 recipes/egui-phosphor-rust-source/recipe.yaml create mode 100644 recipes/keepawake-rs/README.md create mode 100644 recipes/keepawake-rs/build.sh create mode 100644 recipes/keepawake-rs/patches/osx-update-time.patch create mode 100644 recipes/keepawake-rs/recipe.yaml create mode 100644 recipes/preferences-rs-rust-source/README.md create mode 100755 recipes/preferences-rs-rust-source/install-rust-source.sh create mode 100644 recipes/preferences-rs-rust-source/install_rust_source.bat create mode 100644 recipes/preferences-rs-rust-source/recipe.yaml create mode 100644 recipes/serial-monitor-rust/README.md create mode 100644 recipes/serial-monitor-rust/bld.bat create mode 100644 recipes/serial-monitor-rust/build.sh create mode 100644 recipes/serial-monitor-rust/helpers/build.ps1 create mode 100644 recipes/serial-monitor-rust/patches/use-local-rust-sources.patch create mode 100644 recipes/serial-monitor-rust/recipe.yaml create mode 100644 recipes/serialport-rs-rust-source/README.md create mode 100755 recipes/serialport-rs-rust-source/install-rust-source.sh create mode 100644 recipes/serialport-rs-rust-source/install_rust_source.bat create mode 100644 recipes/serialport-rs-rust-source/recipe.yaml diff --git a/recipes/egui-phosphor-rust-source/README.md b/recipes/egui-phosphor-rust-source/README.md new file mode 100644 index 0000000..f2a0e51 --- /dev/null +++ b/recipes/egui-phosphor-rust-source/README.md @@ -0,0 +1,5 @@ +# V1 recipe format + +This recipe is an example of the v1 recipe format that was defined by [CEP 13](https://github.com/conda/ceps/blob/main/cep-13.md). The v1 recipe format is fully functional when built with rattler-build, but is not yet fully supported by conda-forge's automation. + +See https://github.com/conda-forge/conda-forge.github.io/issues/2308 for progress on general support for this new format. diff --git a/recipes/egui-phosphor-rust-source/install-rust-source.sh b/recipes/egui-phosphor-rust-source/install-rust-source.sh new file mode 100755 index 0000000..543694f --- /dev/null +++ b/recipes/egui-phosphor-rust-source/install-rust-source.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -euxo pipefail + +cargo build --release --all-targets +cargo test --release --all-targets + +# This is a Rust source distribution, we need to remove the target directory +rm -rf target + +# Install source distribution +mkdir -p ${PREFIX}/src/rust-libraries/${PKG_NAME}-${PKG_VERSION} +cp -r ./* ${PREFIX}/src/rust-libraries/${PKG_NAME}-${PKG_VERSION} + +# Adding the checksums of the source distribution to the recipe +cat > $PREFIX/src/rust-libraries/${PKG_NAME}-${PKG_VERSION}/.cargo-checksum.json << EOF +{"files":{},"package":"${PKG_SHA256}"} +EOF + +cargo-bundle-licenses --format yaml --output "${RECIPE_DIR}"/THIRDPARTY.yml diff --git a/recipes/egui-phosphor-rust-source/install_rust_source.bat b/recipes/egui-phosphor-rust-source/install_rust_source.bat new file mode 100644 index 0000000..b9124d5 --- /dev/null +++ b/recipes/egui-phosphor-rust-source/install_rust_source.bat @@ -0,0 +1,19 @@ +@echo off +setlocal enabledelayedexpansion + +cargo build --release --all-targets +cargo test --release --lib + +rem This is a Rust source distribution, we need to remove the target directory +rd /s /q target + +rem Install source distribution +mkdir %PREFIX%\src\rust-libraries\%PKG_NAME%-%PKG_VERSION% +xcopy /e /i . %PREFIX%\src\rust-libraries\%PKG_NAME%-%PKG_VERSION% + +rem Adding the checksums of the source distribution to the recipe +( +echo {"files":{},"package":"%PKG_SHA256%"} +) > %PREFIX%\src\rust-libraries\%PKG_NAME%-%PKG_VERSION%\.cargo-checksum.json + +cargo-bundle-licenses --format yaml --output "%RECIPE_DIR%\THIRDPARTY.yml" \ No newline at end of file diff --git a/recipes/egui-phosphor-rust-source/recipe.yaml b/recipes/egui-phosphor-rust-source/recipe.yaml new file mode 100644 index 0000000..4ff9c9f --- /dev/null +++ b/recipes/egui-phosphor-rust-source/recipe.yaml @@ -0,0 +1,55 @@ +context: + name: egui-phosphor-rust-source + version: "0.7.3" + sha256: "076e5598271b9c92565b991cf771b2478740c7a7f66024051e9e74d8d39f7a6f" + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + url: https://github.com/amPerl/egui-phosphor/archive/refs/tags/v${{ version }}.tar.gz + sha256: ${{ sha256 }} + +build: + number: 0 + script: + env: + PKG_SHA256: ${{ sha256 }} + content: + - if: linux or osx + then: "${RECIPE_DIR}/install-rust-source.sh" + else: "%RECIPE_DIR%\\install_rust_source.bat" + +requirements: + build: + - ${{ compiler('c') }} + - ${{ stdlib("c") }} + - ${{ compiler('rust') }} + - cargo-bundle-licenses + host: + - setuptools-rust + +tests: + - script: + - if: linux or osx + then: + - test -f $PREFIX/src/rust-libraries/${{ name }}-${{ version }}/LICENSE-MIT + else: + - if ! exist %PREFIX%\\src\\rust-libraries\\${{ name }}-${{ version }}\\LICENSE-MIT exit 1 + # - downstream: serial-monitor-rust + +about: + homepage: https://github.com/amPerl/egui-phosphor + summary: 'Phosphor icons for egui.' + description: | + Bundles Phosphor icons with boilerplate to use in your egui app. + license: MIT + license_file: + - LICENSE-MIT + - LICENSE-APACHE + repository: https://github.com/amPerl/egui-phosphor + +extra: + recipe-maintainers: + - MementoRC diff --git a/recipes/keepawake-rs/README.md b/recipes/keepawake-rs/README.md new file mode 100644 index 0000000..f2a0e51 --- /dev/null +++ b/recipes/keepawake-rs/README.md @@ -0,0 +1,5 @@ +# V1 recipe format + +This recipe is an example of the v1 recipe format that was defined by [CEP 13](https://github.com/conda/ceps/blob/main/cep-13.md). The v1 recipe format is fully functional when built with rattler-build, but is not yet fully supported by conda-forge's automation. + +See https://github.com/conda-forge/conda-forge.github.io/issues/2308 for progress on general support for this new format. diff --git a/recipes/keepawake-rs/build.sh b/recipes/keepawake-rs/build.sh new file mode 100644 index 0000000..9784c9a --- /dev/null +++ b/recipes/keepawake-rs/build.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -euxo pipefail + +# On macos, clang 18 conflicts with Xcode_15.2 +if [[ "${target_platform}" == osx-* ]]; then + unset CONDA_BUILD_SYSROOT + export DEVELOPER_DIR=/Applications/Xcode_15.2.app/Contents/Developer +fi + +cargo build --release --all-targets +# Skip doc-test which fails to find cc as a linker (odd, since it can build just fine) +cargo test --release --all-targets +CARGO_TARGET_DIR=target cargo install --features="bin" --path . --root "${PREFIX}" +cargo-bundle-licenses --format yaml --output "${RECIPE_DIR}"/THIRDPARTY.yml diff --git a/recipes/keepawake-rs/patches/osx-update-time.patch b/recipes/keepawake-rs/patches/osx-update-time.patch new file mode 100644 index 0000000..b82b0c0 --- /dev/null +++ b/recipes/keepawake-rs/patches/osx-update-time.patch @@ -0,0 +1,13 @@ +--- a/Cargo.toml.orig 2021-09-23 14:00:00.000000000 +0000 ++++ b/Cargo.toml 2021-09-23 14:00:00.000000000 +0000 +@@ -42,2 +42,3 @@ + sysinfo = { version = "0.30.5", optional = true } ++time = "0.3.35" + thiserror = "1.0.56" +@@ -54,3 +55,3 @@ +-[target.'cfg(target_os = "macos")'.dependencies] +-apple-sys = { version = "0.2.0", features = ["CoreFoundation", "IOKit"] } +-core-foundation = "0.9.3" ++[target.'cfg(target_os = "macos")'.dependencies] ++apple-sys = { version = "0.2.0", features = ["CoreFoundation", "IOKit"] } ++core-foundation = "0.9.3" diff --git a/recipes/keepawake-rs/recipe.yaml b/recipes/keepawake-rs/recipe.yaml new file mode 100644 index 0000000..ba26504 --- /dev/null +++ b/recipes/keepawake-rs/recipe.yaml @@ -0,0 +1,50 @@ +context: + name: keepawake-rs + version: "0.5.1" + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + url: https://github.com/segevfiner/keepawake-rs/archive/refs/tags/v${{ version }}.tar.gz + sha256: 06bfc2ce38a6d06e54fc156bd20afa08ae687b6075d9a4ceb123ec935e8c235a + patches: + - if: osx + then: + - patches/osx-update-time.patch + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - ${{ stdlib("c") }} + - ${{ compiler('rust') }} + - cargo-bundle-licenses + - cmake + host: + - setuptools-rust + +tests: + - script: + - keepawake --help + +about: + homepage: https://github.com/segevfiner/keepawake-rs + summary: 'Keep your computer awake.' + description: | + Keep your computer awake. Like caffeinate, + systemd-inhibit/gnome-session-inhibit, or PowerToys Awake, + but cross-platform and written in Rust. + license: MIT + license_file: + - LICENSE + - THIRDPARTY.yml + documentation: https://crates.io/crates/keepawake + repository: https://github.com/segevfiner/keepawake-rs + +extra: + recipe-maintainers: + - MementoRC diff --git a/recipes/preferences-rs-rust-source/README.md b/recipes/preferences-rs-rust-source/README.md new file mode 100644 index 0000000..f2a0e51 --- /dev/null +++ b/recipes/preferences-rs-rust-source/README.md @@ -0,0 +1,5 @@ +# V1 recipe format + +This recipe is an example of the v1 recipe format that was defined by [CEP 13](https://github.com/conda/ceps/blob/main/cep-13.md). The v1 recipe format is fully functional when built with rattler-build, but is not yet fully supported by conda-forge's automation. + +See https://github.com/conda-forge/conda-forge.github.io/issues/2308 for progress on general support for this new format. diff --git a/recipes/preferences-rs-rust-source/install-rust-source.sh b/recipes/preferences-rs-rust-source/install-rust-source.sh new file mode 100755 index 0000000..543694f --- /dev/null +++ b/recipes/preferences-rs-rust-source/install-rust-source.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -euxo pipefail + +cargo build --release --all-targets +cargo test --release --all-targets + +# This is a Rust source distribution, we need to remove the target directory +rm -rf target + +# Install source distribution +mkdir -p ${PREFIX}/src/rust-libraries/${PKG_NAME}-${PKG_VERSION} +cp -r ./* ${PREFIX}/src/rust-libraries/${PKG_NAME}-${PKG_VERSION} + +# Adding the checksums of the source distribution to the recipe +cat > $PREFIX/src/rust-libraries/${PKG_NAME}-${PKG_VERSION}/.cargo-checksum.json << EOF +{"files":{},"package":"${PKG_SHA256}"} +EOF + +cargo-bundle-licenses --format yaml --output "${RECIPE_DIR}"/THIRDPARTY.yml diff --git a/recipes/preferences-rs-rust-source/install_rust_source.bat b/recipes/preferences-rs-rust-source/install_rust_source.bat new file mode 100644 index 0000000..b9124d5 --- /dev/null +++ b/recipes/preferences-rs-rust-source/install_rust_source.bat @@ -0,0 +1,19 @@ +@echo off +setlocal enabledelayedexpansion + +cargo build --release --all-targets +cargo test --release --lib + +rem This is a Rust source distribution, we need to remove the target directory +rd /s /q target + +rem Install source distribution +mkdir %PREFIX%\src\rust-libraries\%PKG_NAME%-%PKG_VERSION% +xcopy /e /i . %PREFIX%\src\rust-libraries\%PKG_NAME%-%PKG_VERSION% + +rem Adding the checksums of the source distribution to the recipe +( +echo {"files":{},"package":"%PKG_SHA256%"} +) > %PREFIX%\src\rust-libraries\%PKG_NAME%-%PKG_VERSION%\.cargo-checksum.json + +cargo-bundle-licenses --format yaml --output "%RECIPE_DIR%\THIRDPARTY.yml" \ No newline at end of file diff --git a/recipes/preferences-rs-rust-source/recipe.yaml b/recipes/preferences-rs-rust-source/recipe.yaml new file mode 100644 index 0000000..3252604 --- /dev/null +++ b/recipes/preferences-rs-rust-source/recipe.yaml @@ -0,0 +1,56 @@ +context: + name: preferences-rs-rust-source + version: "2.0.0" + sha256: "8aa13f1c206db011ed01612acd46246d4d77fc3d9dd6f42f7ba7cbf762441df8" + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + url: https://github.com/andybarron/preferences-rs/archive/refs/tags/v${{ version }}.tar.gz + sha256: ${{ sha256 }} + +build: + number: 0 + script: + env: + PKG_SHA256: ${{ sha256 }} + content: + - if: linux or osx + then: "${RECIPE_DIR}/install-rust-source.sh" + else: "%RECIPE_DIR%\\install_rust_source.bat" + +requirements: + build: + - ${{ compiler('c') }} + - ${{ stdlib("c") }} + - ${{ compiler('rust') }} + - cargo-bundle-licenses + host: + - setuptools-rust + +tests: + - script: + - if: linux or osx + then: + - test -f $PREFIX/src/rust-libraries/${{ name }}-${{ version }}/LICENSE.txt + else: + - if ! exist %PREFIX%\\src\\rust-libraries\\${{ name }}-${{ version }}\\LICENSE.txt exit 1 + # - downstream: serial-monitor-rust + +about: + homepage: https://github.com/andybarron/preferences-rs + summary: 'Read and write user-specific application data in (stable!) Rust.' + description: | + Read and write user-specific application data in Rust + license: MIT + license_file: + - LICENSE.txt + - THIRDPARTY.yml + documentation: https://docs.rs/preferences + repository: https://github.com/andybarron/preferences-rs + +extra: + recipe-maintainers: + - MementoRC diff --git a/recipes/serial-monitor-rust/README.md b/recipes/serial-monitor-rust/README.md new file mode 100644 index 0000000..f2a0e51 --- /dev/null +++ b/recipes/serial-monitor-rust/README.md @@ -0,0 +1,5 @@ +# V1 recipe format + +This recipe is an example of the v1 recipe format that was defined by [CEP 13](https://github.com/conda/ceps/blob/main/cep-13.md). The v1 recipe format is fully functional when built with rattler-build, but is not yet fully supported by conda-forge's automation. + +See https://github.com/conda-forge/conda-forge.github.io/issues/2308 for progress on general support for this new format. diff --git a/recipes/serial-monitor-rust/bld.bat b/recipes/serial-monitor-rust/bld.bat new file mode 100644 index 0000000..4fc15c9 --- /dev/null +++ b/recipes/serial-monitor-rust/bld.bat @@ -0,0 +1,2 @@ +@echo off +powershell -ExecutionPolicy Bypass -File "%RECIPE_DIR%\helpers\build.ps1" diff --git a/recipes/serial-monitor-rust/build.sh b/recipes/serial-monitor-rust/build.sh new file mode 100644 index 0000000..24f6090 --- /dev/null +++ b/recipes/serial-monitor-rust/build.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +set -euxo pipefail + +# Use Conda Rust source libraries (compiled/tested) instead of downloading from crates.io +EGUI_PHOSPHOR_VERSION=$(ls $BUILD_PREFIX/src/rust-libraries/egui-phosphor-rust-source-* -d | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' | sort -V | tail -n1) +PREFERENCES_VERSION=$(ls $BUILD_PREFIX/src/rust-libraries/preferences-rs-rust-source-* -d | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' | sort -V | tail -n1) +SERIALPORT_VERSION=$(ls $BUILD_PREFIX/src/rust-libraries/serialport-rs-rust-source-* -d | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' | sort -V | tail -n1) + +mkdir -p .cargo +touch .cargo/config.toml +cat >> .cargo/config.toml << EOF + +[patch.crates-io] +serialport = { path = "${BUILD_PREFIX}/src/rust-libraries/serialport-rs-rust-source-${SERIALPORT_VERSION}" } +egui-phosphor = { path = "${BUILD_PREFIX}/src/rust-libraries/egui-phosphor-rust-source-${EGUI_PHOSPHOR_VERSION}" } +preferences = { path = "${BUILD_PREFIX}/src/rust-libraries/preferences-rs-rust-source-${PREFERENCES_VERSION}" } +EOF + +cargo build --release --all-targets +cargo test --release --all-targets +CARGO_TARGET_DIR=target cargo install --path . --root "${PREFIX}" +cargo-bundle-licenses --format yaml --output "${RECIPE_DIR}"/THIRDPARTY.yml diff --git a/recipes/serial-monitor-rust/helpers/build.ps1 b/recipes/serial-monitor-rust/helpers/build.ps1 new file mode 100644 index 0000000..9a0ff47 --- /dev/null +++ b/recipes/serial-monitor-rust/helpers/build.ps1 @@ -0,0 +1,23 @@ +Set-StrictMode -Version Latest +$ErrorActionPreference = "Stop" + +# Use Conda Rust source libraries (compiled/tested) instead of downloading from crates.io +$EGUI_PHOSPHOR_VERSION = (Get-ChildItem "$env:BUILD_PREFIX/src/rust-libraries/egui-phosphor-rust-source-*" -Directory | ForEach-Object { $_.Name -match '\d+\.\d+\.\d+' | Out-Null; $Matches[0] } | Sort-Object -Version | Select-Object -Last 1) +$PREFERENCES_VERSION = (Get-ChildItem "$env:BUILD_PREFIX/src/rust-libraries/preferences-rs-rust-source-*" -Directory | ForEach-Object { $_.Name -match '\d+\.\d+\.\d+' | Out-Null; $Matches[0] } | Sort-Object -Version | Select-Object -Last 1) +$SERIALPORT_VERSION = (Get-ChildItem "$env:BUILD_PREFIX/src/rust-libraries/serialport-rs-rust-source-*" -Directory | ForEach-Object { $_.Name -match '\d+\.\d+\.\d+' | Out-Null; $Matches[0] } | Sort-Object -Version | Select-Object -Last 1) + +New-Item -ItemType Directory -Force -Path .cargo +New-Item -ItemType File -Force -Path .cargo/config.toml +Add-Content -Path .cargo/config.toml -Value @" + +[patch.crates-io] +serialport = { path = "$env:BUILD_PREFIX/src/rust-libraries/serialport-rs-rust-source-$SERIALPORT_VERSION" } +egui-phosphor = { path = "$env:BUILD_PREFIX/src/rust-libraries/egui-phosphor-rust-source-$EGUI_PHOSPHOR_VERSION" } +preferences = { path = "$env:BUILD_PREFIX/src/rust-libraries/preferences-rs-rust-source-$PREFERENCES_VERSION" } +"@ + +cargo build --release --all-targets +cargo test --release --all-targets +$env:CARGO_TARGET_DIR = "target" +cargo install --path . --root "$env:PREFIX" +cargo-bundle-licenses --format yaml --output "$env:RECIPE_DIR/THIRDPARTY.yml" \ No newline at end of file diff --git a/recipes/serial-monitor-rust/patches/use-local-rust-sources.patch b/recipes/serial-monitor-rust/patches/use-local-rust-sources.patch new file mode 100644 index 0000000..99b194e --- /dev/null +++ b/recipes/serial-monitor-rust/patches/use-local-rust-sources.patch @@ -0,0 +1,19 @@ +--- a/Cargo.toml.orig 2020-07-29 14:00:00.000000000 +0000 ++++ b/Cargo.toml 2020-07-29 14:00:00.000000000 +0000 +@@ -15,3 +15,3 @@ + egui_plot = "0.29.0" +-egui-phosphor = { git = "https://github.com/hacknus/egui-phosphor" } ++egui-phosphor = "0.7.3" + egui-theme-switch = { version = "0.2.0", default-features = true } +@@ -20,4 +20,4 @@ + itertools-num = "0.1" +-keepawake = { git = "https://github.com/segevfiner/keepawake-rs" } +-preferences = { git = "https://github.com/andybarron/preferences-rs" } ++keepawake = "0.5.1" ++preferences = "2.0.0" + rand = "0.8.5" +@@ -28,3 +28,3 @@ + serde = { version = "1.0", features = ["derive"] } +-serialport = { git = "https://github.com/serialport/serialport-rs", features = ["serde"] } ++serialport = { version = "4.6.1", features = ["serde"] } + diff --git a/recipes/serial-monitor-rust/recipe.yaml b/recipes/serial-monitor-rust/recipe.yaml new file mode 100644 index 0000000..3717c3d --- /dev/null +++ b/recipes/serial-monitor-rust/recipe.yaml @@ -0,0 +1,56 @@ +context: + name: serial-monitor-rust + version: "0.3.0" + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + url: https://github.com/hacknus/serial-monitor-rust/archive/refs/tags/v${{ version }}.tar.gz + sha256: ed5382c75d97fd05c8bc95a8b17de12a023fabbe88d7794c05d8ef79ee3a1096 + patches: + - patches/use-local-rust-sources.patch + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - ${{ stdlib("c") }} + - ${{ compiler('rust') }} + - cargo-bundle-licenses + - pkg-config + # Rust source distributions (pre-compiled/tested on conda-forge) + - egui-phosphor-rust-source >=0.7.3 + - preferences-rs-rust-source >=2.0.0 + - serialport-rs-rust-source >=4.6.1 + host: + - keepawake-rs + - setuptools-rust + - if: linux + then: + - libudev + +tests: + - script: + - echo "No tests" + +about: + homepage: https://github.com/hacknus/serial-monitor-rust + summary: 'A cross-plattform serial monitor/plotter written entirely in rust.' + description: | + A cross-platform serial monitor and plotter written + entirely in rust, the GUI is written using egui. + Inspired by the serial monitor/plotter from the Arduino IDE, + but both plotting and reading the traffic can be done simultaneously. + license: GPL-3.0-only + license_file: + - LICENSE + - THIRDPARTY.yml + repository: https://github.com/hacknus/serial-monitor-rust + +extra: + recipe-maintainers: + - MementoRC diff --git a/recipes/serialport-rs-rust-source/README.md b/recipes/serialport-rs-rust-source/README.md new file mode 100644 index 0000000..f2a0e51 --- /dev/null +++ b/recipes/serialport-rs-rust-source/README.md @@ -0,0 +1,5 @@ +# V1 recipe format + +This recipe is an example of the v1 recipe format that was defined by [CEP 13](https://github.com/conda/ceps/blob/main/cep-13.md). The v1 recipe format is fully functional when built with rattler-build, but is not yet fully supported by conda-forge's automation. + +See https://github.com/conda-forge/conda-forge.github.io/issues/2308 for progress on general support for this new format. diff --git a/recipes/serialport-rs-rust-source/install-rust-source.sh b/recipes/serialport-rs-rust-source/install-rust-source.sh new file mode 100755 index 0000000..60a9612 --- /dev/null +++ b/recipes/serialport-rs-rust-source/install-rust-source.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -euxo pipefail + +cargo build --release --all-targets +cargo test --release --lib + +# This is a Rust source distribution, we need to remove the target directory +rm -rf target + +# Install source distribution +mkdir -p ${PREFIX}/src/rust-libraries/${PKG_NAME}-${PKG_VERSION} +cp -r ./* ${PREFIX}/src/rust-libraries/${PKG_NAME}-${PKG_VERSION} + +# Adding the checksums of the source distribution to the recipe +cat > $PREFIX/src/rust-libraries/${PKG_NAME}-${PKG_VERSION}/.cargo-checksum.json << EOF +{"files":{},"package":"${PKG_SHA256}"} +EOF + +cargo-bundle-licenses --format yaml --output "${RECIPE_DIR}"/THIRDPARTY.yml diff --git a/recipes/serialport-rs-rust-source/install_rust_source.bat b/recipes/serialport-rs-rust-source/install_rust_source.bat new file mode 100644 index 0000000..b9124d5 --- /dev/null +++ b/recipes/serialport-rs-rust-source/install_rust_source.bat @@ -0,0 +1,19 @@ +@echo off +setlocal enabledelayedexpansion + +cargo build --release --all-targets +cargo test --release --lib + +rem This is a Rust source distribution, we need to remove the target directory +rd /s /q target + +rem Install source distribution +mkdir %PREFIX%\src\rust-libraries\%PKG_NAME%-%PKG_VERSION% +xcopy /e /i . %PREFIX%\src\rust-libraries\%PKG_NAME%-%PKG_VERSION% + +rem Adding the checksums of the source distribution to the recipe +( +echo {"files":{},"package":"%PKG_SHA256%"} +) > %PREFIX%\src\rust-libraries\%PKG_NAME%-%PKG_VERSION%\.cargo-checksum.json + +cargo-bundle-licenses --format yaml --output "%RECIPE_DIR%\THIRDPARTY.yml" \ No newline at end of file diff --git a/recipes/serialport-rs-rust-source/recipe.yaml b/recipes/serialport-rs-rust-source/recipe.yaml new file mode 100644 index 0000000..1008a0f --- /dev/null +++ b/recipes/serialport-rs-rust-source/recipe.yaml @@ -0,0 +1,60 @@ +context: + name: serialport-rs-rust-source + version: "4.6.1" + sha256: "bf7a47b1d682115b1a93bb722079bb1420041b5dcf149ceb0db8d8e6348c0064" + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + url: https://github.com/serialport/serialport-rs/archive/refs/tags/v${{ version }}.tar.gz + sha256: ${{ sha256 }} + +build: + number: 0 + script: + env: + PKG_SHA256: ${{ sha256 }} + content: + - if: linux or osx + then: "${RECIPE_DIR}/install-rust-source.sh" + else: "%RECIPE_DIR%\\install_rust_source.bat" + +requirements: + build: + - ${{ compiler('c') }} + - ${{ stdlib("c") }} + - ${{ compiler('rust') }} + - cargo-bundle-licenses + - pkg-config + host: + - setuptools-rust + - if: linux + then: + - libudev + +tests: + - script: + - if: linux or osx + then: + - test -f $PREFIX/src/rust-libraries/${{ name }}-${{ version }}/LICENSE.txt + else: + - if ! exist %PREFIX%\\src\\rust-libraries\\${{ name }}-${{ version }}\\LICENSE.txt exit 1 + # - downstream: serial-monitor-rust + +about: + homepage: https://github.com/serialport/serialport-rs + summary: 'A cross-platform serial port library in Rust.' + description: | + A cross-platform serial port library in Rust. Provides a blocking I/O + interface and port enumeration including USB device information. + license: MPL-2.0 + license_file: + - LICENSE.txt + - THIRDPARTY.yml + repository: https://github.com/serialport/serialport-rs + +extra: + recipe-maintainers: + - MementoRC From 975d489f86e46fe1a5855bf1705d43633712b8bd Mon Sep 17 00:00:00 2001 From: memento Date: Sat, 7 Dec 2024 15:01:36 -0600 Subject: [PATCH 02/29] (dev) OSX clan 18 conflicts with apple-sys --- recipes/keepawake-rs/build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes/keepawake-rs/build.sh b/recipes/keepawake-rs/build.sh index 9784c9a..3a7e7c5 100644 --- a/recipes/keepawake-rs/build.sh +++ b/recipes/keepawake-rs/build.sh @@ -4,8 +4,10 @@ set -euxo pipefail # On macos, clang 18 conflicts with Xcode_15.2 if [[ "${target_platform}" == osx-* ]]; then - unset CONDA_BUILD_SYSROOT - export DEVELOPER_DIR=/Applications/Xcode_15.2.app/Contents/Developer + unset CONDA_BUILD_SYSROOT + export DEVELOPER_DIR=/Applications/Xcode_15.2.app/Contents/Developer + export LIBCLANG_PATH=/Applications/Xcode_15.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib + export BINDGEN_EXTRA_CLANG_ARGS="-I/Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include" fi cargo build --release --all-targets From d5bdc9cb25829c94b94b1d9e134cb69ff2e25174 Mon Sep 17 00:00:00 2001 From: memento Date: Sat, 7 Dec 2024 17:27:29 -0600 Subject: [PATCH 03/29] (ref) updates from passing conda-staged recipes --- recipes/egui-phosphor-rust-source/recipe.yaml | 2 +- recipes/keepawake-rs/build.bat | 6 ++++++ recipes/keepawake-rs/build.sh | 2 ++ recipes/keepawake-rs/recipe.yaml | 14 ++++++++++++-- recipes/preferences-rs-rust-source/recipe.yaml | 2 +- recipes/serial-monitor-rust/build.bat | 2 ++ recipes/serial-monitor-rust/build.sh | 12 +++++++++--- recipes/serial-monitor-rust/helpers/build.ps1 | 7 +++---- recipes/serialport-rs-rust-source/recipe.yaml | 2 +- 9 files changed, 37 insertions(+), 12 deletions(-) create mode 100644 recipes/keepawake-rs/build.bat create mode 100644 recipes/serial-monitor-rust/build.bat diff --git a/recipes/egui-phosphor-rust-source/recipe.yaml b/recipes/egui-phosphor-rust-source/recipe.yaml index 4ff9c9f..671a8de 100644 --- a/recipes/egui-phosphor-rust-source/recipe.yaml +++ b/recipes/egui-phosphor-rust-source/recipe.yaml @@ -36,7 +36,7 @@ tests: then: - test -f $PREFIX/src/rust-libraries/${{ name }}-${{ version }}/LICENSE-MIT else: - - if ! exist %PREFIX%\\src\\rust-libraries\\${{ name }}-${{ version }}\\LICENSE-MIT exit 1 + - if not exist %PREFIX%\\src\\rust-libraries\\${{ name }}-${{ version }}\\LICENSE-MIT exit 1 # - downstream: serial-monitor-rust about: diff --git a/recipes/keepawake-rs/build.bat b/recipes/keepawake-rs/build.bat new file mode 100644 index 0000000..674e930 --- /dev/null +++ b/recipes/keepawake-rs/build.bat @@ -0,0 +1,6 @@ +@echo off + +call cargo build --release --all-targets +call cargo test --release --all-targets +call cargo install --path . --root "%PREFIX%" --features="bin" +call cargo-bundle-licenses --format yaml --output "%RECIPE_DIR%\THIRDPARTY.yml" diff --git a/recipes/keepawake-rs/build.sh b/recipes/keepawake-rs/build.sh index 3a7e7c5..d282dd6 100644 --- a/recipes/keepawake-rs/build.sh +++ b/recipes/keepawake-rs/build.sh @@ -4,6 +4,8 @@ set -euxo pipefail # On macos, clang 18 conflicts with Xcode_15.2 if [[ "${target_platform}" == osx-* ]]; then + export PATH="/Applications/Xcode_15.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH" + export CPATH="/Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include" unset CONDA_BUILD_SYSROOT export DEVELOPER_DIR=/Applications/Xcode_15.2.app/Contents/Developer export LIBCLANG_PATH=/Applications/Xcode_15.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib diff --git a/recipes/keepawake-rs/recipe.yaml b/recipes/keepawake-rs/recipe.yaml index ba26504..2b64db9 100644 --- a/recipes/keepawake-rs/recipe.yaml +++ b/recipes/keepawake-rs/recipe.yaml @@ -23,13 +23,23 @@ requirements: - ${{ stdlib("c") }} - ${{ compiler('rust') }} - cargo-bundle-licenses - - cmake host: - setuptools-rust tests: + - package_contents: + files: + - if: linux or osx + then: + - bin/keepawake + else: + - bin/keepawake.exe - script: - - keepawake --help + - if: linux or osx + then: + - keepawake --help + else: + - keepawake.exe --help about: homepage: https://github.com/segevfiner/keepawake-rs diff --git a/recipes/preferences-rs-rust-source/recipe.yaml b/recipes/preferences-rs-rust-source/recipe.yaml index 3252604..48137d7 100644 --- a/recipes/preferences-rs-rust-source/recipe.yaml +++ b/recipes/preferences-rs-rust-source/recipe.yaml @@ -36,7 +36,7 @@ tests: then: - test -f $PREFIX/src/rust-libraries/${{ name }}-${{ version }}/LICENSE.txt else: - - if ! exist %PREFIX%\\src\\rust-libraries\\${{ name }}-${{ version }}\\LICENSE.txt exit 1 + - if not exist %PREFIX%\\src\\rust-libraries\\${{ name }}-${{ version }}\\LICENSE.txt exit 1 # - downstream: serial-monitor-rust about: diff --git a/recipes/serial-monitor-rust/build.bat b/recipes/serial-monitor-rust/build.bat new file mode 100644 index 0000000..4fc15c9 --- /dev/null +++ b/recipes/serial-monitor-rust/build.bat @@ -0,0 +1,2 @@ +@echo off +powershell -ExecutionPolicy Bypass -File "%RECIPE_DIR%\helpers\build.ps1" diff --git a/recipes/serial-monitor-rust/build.sh b/recipes/serial-monitor-rust/build.sh index 24f6090..443dca0 100644 --- a/recipes/serial-monitor-rust/build.sh +++ b/recipes/serial-monitor-rust/build.sh @@ -3,9 +3,9 @@ set -euxo pipefail # Use Conda Rust source libraries (compiled/tested) instead of downloading from crates.io -EGUI_PHOSPHOR_VERSION=$(ls $BUILD_PREFIX/src/rust-libraries/egui-phosphor-rust-source-* -d | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' | sort -V | tail -n1) -PREFERENCES_VERSION=$(ls $BUILD_PREFIX/src/rust-libraries/preferences-rs-rust-source-* -d | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' | sort -V | tail -n1) -SERIALPORT_VERSION=$(ls $BUILD_PREFIX/src/rust-libraries/serialport-rs-rust-source-* -d | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' | sort -V | tail -n1) +EGUI_PHOSPHOR_VERSION=$(find $BUILD_PREFIX/src/rust-libraries/egui-phosphor-rust-source-* -type d -exec basename {} \; | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' | sort -V | tail -n1) +PREFERENCES_VERSION=$(find $BUILD_PREFIX/src/rust-libraries/preferences-rs-rust-source-* -type d -exec basename {} \; | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' | sort -V | tail -n1) +SERIALPORT_VERSION=$(find $BUILD_PREFIX/src/rust-libraries/serialport-rs-rust-source-* -type d -exec basename {} \; | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' | sort -V | tail -n1) mkdir -p .cargo touch .cargo/config.toml @@ -17,6 +17,12 @@ egui-phosphor = { path = "${BUILD_PREFIX}/src/rust-libraries/egui-phosphor-rust- preferences = { path = "${BUILD_PREFIX}/src/rust-libraries/preferences-rs-rust-source-${PREFERENCES_VERSION}" } EOF +if [[ "${target_platform}" == osx-* ]]; then + export PATH="/Applications/Xcode_15.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH" + export CPATH="/Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include" + unset CONDA_BUILD_SYSROOT +fi + cargo build --release --all-targets cargo test --release --all-targets CARGO_TARGET_DIR=target cargo install --path . --root "${PREFIX}" diff --git a/recipes/serial-monitor-rust/helpers/build.ps1 b/recipes/serial-monitor-rust/helpers/build.ps1 index 9a0ff47..07cdaf0 100644 --- a/recipes/serial-monitor-rust/helpers/build.ps1 +++ b/recipes/serial-monitor-rust/helpers/build.ps1 @@ -2,10 +2,9 @@ Set-StrictMode -Version Latest $ErrorActionPreference = "Stop" # Use Conda Rust source libraries (compiled/tested) instead of downloading from crates.io -$EGUI_PHOSPHOR_VERSION = (Get-ChildItem "$env:BUILD_PREFIX/src/rust-libraries/egui-phosphor-rust-source-*" -Directory | ForEach-Object { $_.Name -match '\d+\.\d+\.\d+' | Out-Null; $Matches[0] } | Sort-Object -Version | Select-Object -Last 1) -$PREFERENCES_VERSION = (Get-ChildItem "$env:BUILD_PREFIX/src/rust-libraries/preferences-rs-rust-source-*" -Directory | ForEach-Object { $_.Name -match '\d+\.\d+\.\d+' | Out-Null; $Matches[0] } | Sort-Object -Version | Select-Object -Last 1) -$SERIALPORT_VERSION = (Get-ChildItem "$env:BUILD_PREFIX/src/rust-libraries/serialport-rs-rust-source-*" -Directory | ForEach-Object { $_.Name -match '\d+\.\d+\.\d+' | Out-Null; $Matches[0] } | Sort-Object -Version | Select-Object -Last 1) - +$EGUI_PHOSPHOR_VERSION = (Get-ChildItem "$env:BUILD_PREFIX/src/rust-libraries/egui-phosphor-rust-source-*" -Directory | ForEach-Object { $_.Name -match '\d+\.\d+\.\d+' | Out-Null; [version]$Matches[0] } | Sort-Object -Property {$_} | Select-Object -Last 1) +$PREFERENCES_VERSION = (Get-ChildItem "$env:BUILD_PREFIX/src/rust-libraries/preferences-rs-rust-source-*" -Directory | ForEach-Object { $_.Name -match '\d+\.\d+\.\d+' | Out-Null; [version]$Matches[0] } | Sort-Object -Property {$_} | Select-Object -Last 1) +$SERIALPORT_VERSION = (Get-ChildItem "$env:BUILD_PREFIX/src/rust-libraries/serialport-rs-rust-source-*" -Directory | ForEach-Object { $_.Name -match '\d+\.\d+\.\d+' | Out-Null; [version]$Matches[0] } | Sort-Object -Property {$_} | Select-Object -Last 1) New-Item -ItemType Directory -Force -Path .cargo New-Item -ItemType File -Force -Path .cargo/config.toml Add-Content -Path .cargo/config.toml -Value @" diff --git a/recipes/serialport-rs-rust-source/recipe.yaml b/recipes/serialport-rs-rust-source/recipe.yaml index 1008a0f..ce70316 100644 --- a/recipes/serialport-rs-rust-source/recipe.yaml +++ b/recipes/serialport-rs-rust-source/recipe.yaml @@ -40,7 +40,7 @@ tests: then: - test -f $PREFIX/src/rust-libraries/${{ name }}-${{ version }}/LICENSE.txt else: - - if ! exist %PREFIX%\\src\\rust-libraries\\${{ name }}-${{ version }}\\LICENSE.txt exit 1 + - if not exist %PREFIX%\\src\\rust-libraries\\${{ name }}-${{ version }}\\LICENSE.txt exit 1 # - downstream: serial-monitor-rust about: From 6d64f5f6d32edcd3e05c01aaafee8256a25ba8e9 Mon Sep 17 00:00:00 2001 From: memento Date: Sat, 7 Dec 2024 18:28:06 -0600 Subject: [PATCH 04/29] (ref) variant_config.yaml --- .../variant_config.yaml | 21 +++++++++++++++++++ recipes/keepawake-rs/variant_config.yaml | 21 +++++++++++++++++++ .../variant_config.yaml | 21 +++++++++++++++++++ .../serial-monitor-rust/variant_config.yaml | 21 +++++++++++++++++++ .../variant_config.yaml | 21 +++++++++++++++++++ 5 files changed, 105 insertions(+) create mode 100644 recipes/egui-phosphor-rust-source/variant_config.yaml create mode 100644 recipes/keepawake-rs/variant_config.yaml create mode 100644 recipes/preferences-rs-rust-source/variant_config.yaml create mode 100644 recipes/serial-monitor-rust/variant_config.yaml create mode 100644 recipes/serialport-rs-rust-source/variant_config.yaml diff --git a/recipes/egui-phosphor-rust-source/variant_config.yaml b/recipes/egui-phosphor-rust-source/variant_config.yaml new file mode 100644 index 0000000..78b7939 --- /dev/null +++ b/recipes/egui-phosphor-rust-source/variant_config.yaml @@ -0,0 +1,21 @@ +c_stdlib: + - if: linux + then: + - sysroot + - if: osx + then: + - macosx_deployment_target + - if: win + then: + - vs + +c_compiler: + - if: linux + then: + - gcc + - if: osx + then: + - clang + - if: win + then: + - vs diff --git a/recipes/keepawake-rs/variant_config.yaml b/recipes/keepawake-rs/variant_config.yaml new file mode 100644 index 0000000..78b7939 --- /dev/null +++ b/recipes/keepawake-rs/variant_config.yaml @@ -0,0 +1,21 @@ +c_stdlib: + - if: linux + then: + - sysroot + - if: osx + then: + - macosx_deployment_target + - if: win + then: + - vs + +c_compiler: + - if: linux + then: + - gcc + - if: osx + then: + - clang + - if: win + then: + - vs diff --git a/recipes/preferences-rs-rust-source/variant_config.yaml b/recipes/preferences-rs-rust-source/variant_config.yaml new file mode 100644 index 0000000..78b7939 --- /dev/null +++ b/recipes/preferences-rs-rust-source/variant_config.yaml @@ -0,0 +1,21 @@ +c_stdlib: + - if: linux + then: + - sysroot + - if: osx + then: + - macosx_deployment_target + - if: win + then: + - vs + +c_compiler: + - if: linux + then: + - gcc + - if: osx + then: + - clang + - if: win + then: + - vs diff --git a/recipes/serial-monitor-rust/variant_config.yaml b/recipes/serial-monitor-rust/variant_config.yaml new file mode 100644 index 0000000..78b7939 --- /dev/null +++ b/recipes/serial-monitor-rust/variant_config.yaml @@ -0,0 +1,21 @@ +c_stdlib: + - if: linux + then: + - sysroot + - if: osx + then: + - macosx_deployment_target + - if: win + then: + - vs + +c_compiler: + - if: linux + then: + - gcc + - if: osx + then: + - clang + - if: win + then: + - vs diff --git a/recipes/serialport-rs-rust-source/variant_config.yaml b/recipes/serialport-rs-rust-source/variant_config.yaml new file mode 100644 index 0000000..78b7939 --- /dev/null +++ b/recipes/serialport-rs-rust-source/variant_config.yaml @@ -0,0 +1,21 @@ +c_stdlib: + - if: linux + then: + - sysroot + - if: osx + then: + - macosx_deployment_target + - if: win + then: + - vs + +c_compiler: + - if: linux + then: + - gcc + - if: osx + then: + - clang + - if: win + then: + - vs From 0c13b2ceb0cb5a330b2fbdffb19562c0b917294d Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Sun, 8 Dec 2024 09:58:28 +0100 Subject: [PATCH 05/29] use global variant config --- pixi.toml | 4 ++-- .../variant_config.yaml | 21 ------------------- recipes/keepawake-rs/variant_config.yaml | 21 ------------------- .../variant_config.yaml | 21 ------------------- 4 files changed, 2 insertions(+), 65 deletions(-) delete mode 100644 recipes/egui-phosphor-rust-source/variant_config.yaml delete mode 100644 recipes/keepawake-rs/variant_config.yaml delete mode 100644 recipes/preferences-rs-rust-source/variant_config.yaml diff --git a/pixi.toml b/pixi.toml index a5f072d..58a30fb 100644 --- a/pixi.toml +++ b/pixi.toml @@ -10,8 +10,8 @@ platforms = ["osx-arm64", "linux-64", "win-64", "osx-64"] rattler-build = ">=0.31.1,<0.32" [tasks] -build-all = "rattler-build build --recipe-dir ./recipes --skip-existing=all -c https://prefix.dev/prefix-package-incubator -c conda-forge" -build = "rattler-build build -c https://prefix.dev/prefix-package-incubator -c conda-forge --recipe" +build-all = "rattler-build build -m ./variants.yaml --recipe-dir ./recipes --skip-existing=all -c https://prefix.dev/prefix-package-incubator -c conda-forge" +build = "rattler-build build -m ./variants.yaml -c https://prefix.dev/prefix-package-incubator -c conda-forge --recipe" [feature.update-versions.dependencies] python = "3.12.*" diff --git a/recipes/egui-phosphor-rust-source/variant_config.yaml b/recipes/egui-phosphor-rust-source/variant_config.yaml deleted file mode 100644 index 78b7939..0000000 --- a/recipes/egui-phosphor-rust-source/variant_config.yaml +++ /dev/null @@ -1,21 +0,0 @@ -c_stdlib: - - if: linux - then: - - sysroot - - if: osx - then: - - macosx_deployment_target - - if: win - then: - - vs - -c_compiler: - - if: linux - then: - - gcc - - if: osx - then: - - clang - - if: win - then: - - vs diff --git a/recipes/keepawake-rs/variant_config.yaml b/recipes/keepawake-rs/variant_config.yaml deleted file mode 100644 index 78b7939..0000000 --- a/recipes/keepawake-rs/variant_config.yaml +++ /dev/null @@ -1,21 +0,0 @@ -c_stdlib: - - if: linux - then: - - sysroot - - if: osx - then: - - macosx_deployment_target - - if: win - then: - - vs - -c_compiler: - - if: linux - then: - - gcc - - if: osx - then: - - clang - - if: win - then: - - vs diff --git a/recipes/preferences-rs-rust-source/variant_config.yaml b/recipes/preferences-rs-rust-source/variant_config.yaml deleted file mode 100644 index 78b7939..0000000 --- a/recipes/preferences-rs-rust-source/variant_config.yaml +++ /dev/null @@ -1,21 +0,0 @@ -c_stdlib: - - if: linux - then: - - sysroot - - if: osx - then: - - macosx_deployment_target - - if: win - then: - - vs - -c_compiler: - - if: linux - then: - - gcc - - if: osx - then: - - clang - - if: win - then: - - vs From cc4f3efcc900d43acd136db3cfecb67136a37153 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Sun, 8 Dec 2024 10:00:07 +0100 Subject: [PATCH 06/29] add missing file --- recipes/serial-monitor-rust/variant_config.yaml => variants.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename recipes/serial-monitor-rust/variant_config.yaml => variants.yaml (100%) diff --git a/recipes/serial-monitor-rust/variant_config.yaml b/variants.yaml similarity index 100% rename from recipes/serial-monitor-rust/variant_config.yaml rename to variants.yaml From 1f93ebc18b47c79732e987d230eb1d444f826d88 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Sun, 8 Dec 2024 10:14:39 +0100 Subject: [PATCH 07/29] update patch --- .../patches/osx-update-time.patch | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/recipes/keepawake-rs/patches/osx-update-time.patch b/recipes/keepawake-rs/patches/osx-update-time.patch index b82b0c0..6adc36d 100644 --- a/recipes/keepawake-rs/patches/osx-update-time.patch +++ b/recipes/keepawake-rs/patches/osx-update-time.patch @@ -1,13 +1,12 @@ ---- a/Cargo.toml.orig 2021-09-23 14:00:00.000000000 +0000 -+++ b/Cargo.toml 2021-09-23 14:00:00.000000000 +0000 -@@ -42,2 +42,3 @@ +diff --git a/Cargo.toml b/Cargo.toml +index fda81c9..5a151dd 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -40,6 +40,7 @@ ctrlc = { version = "3.2.3", features = ["termination"], optional = true } + derive_builder = "0.13.0" + shadow-rs = { version = "0.26.1", optional = true } sysinfo = { version = "0.30.5", optional = true } +time = "0.3.35" thiserror = "1.0.56" -@@ -54,3 +55,3 @@ --[target.'cfg(target_os = "macos")'.dependencies] --apple-sys = { version = "0.2.0", features = ["CoreFoundation", "IOKit"] } --core-foundation = "0.9.3" -+[target.'cfg(target_os = "macos")'.dependencies] -+apple-sys = { version = "0.2.0", features = ["CoreFoundation", "IOKit"] } -+core-foundation = "0.9.3" + + [target.'cfg(windows)'.dependencies.windows] From 185b6a74818e13b305b473300ff3a80a3d5abbb6 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Sun, 8 Dec 2024 10:49:01 +0100 Subject: [PATCH 08/29] .. --- .github/workflows/build.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6b11edd..ce6f4a0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,10 +43,7 @@ jobs: - name: Run code in changed subdirectories shell: bash - run: | - rattler-build build --recipe-dir ./recipes \ - --skip-existing=all --target-platform=${{ matrix.target }} \ - -c https://prefix.dev/prefix-package-incubator -c conda-forge + run: pixi build-all - name: Upload all packages shell: bash From 15aab1f6383c46a138759467bb22e797891abee9 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Sun, 8 Dec 2024 13:48:25 +0100 Subject: [PATCH 09/29] .. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ce6f4a0..9db6117 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,7 +43,7 @@ jobs: - name: Run code in changed subdirectories shell: bash - run: pixi build-all + run: pixi run build-all - name: Upload all packages shell: bash From 82daf6824b12fc7d7c7c16b4e86cabeeae2a8028 Mon Sep 17 00:00:00 2001 From: memento Date: Sun, 8 Dec 2024 16:55:42 -0600 Subject: [PATCH 10/29] (ref) v0.3.1. removed extra rust-src-pkgs. unsolved osx SDK issues --- recipes/egui-phosphor-rust-source/README.md | 5 -- .../install-rust-source.sh | 20 ------- .../install_rust_source.bat | 19 ------ recipes/egui-phosphor-rust-source/recipe.yaml | 55 ----------------- recipes/keepawake-rs/README.md | 5 -- recipes/keepawake-rs/build.sh | 10 +--- .../patches/osx-update-time.patch | 12 ---- recipes/preferences-rs-rust-source/README.md | 5 -- .../install-rust-source.sh | 20 ------- .../install_rust_source.bat | 19 ------ .../preferences-rs-rust-source/recipe.yaml | 56 ----------------- recipes/serial-monitor-rust/README.md | 5 -- recipes/serial-monitor-rust/bld.bat | 2 - recipes/serial-monitor-rust/build.sh | 6 +- .../patches/use-local-rust-sources.patch | 19 ------ recipes/serial-monitor-rust/recipe.yaml | 10 +--- recipes/serialport-rs-rust-source/README.md | 5 -- .../install-rust-source.sh | 20 ------- .../install_rust_source.bat | 19 ------ recipes/serialport-rs-rust-source/recipe.yaml | 60 ------------------- .../variant_config.yaml | 21 ------- 21 files changed, 8 insertions(+), 385 deletions(-) delete mode 100644 recipes/egui-phosphor-rust-source/README.md delete mode 100755 recipes/egui-phosphor-rust-source/install-rust-source.sh delete mode 100644 recipes/egui-phosphor-rust-source/install_rust_source.bat delete mode 100644 recipes/egui-phosphor-rust-source/recipe.yaml delete mode 100644 recipes/keepawake-rs/README.md delete mode 100644 recipes/preferences-rs-rust-source/README.md delete mode 100755 recipes/preferences-rs-rust-source/install-rust-source.sh delete mode 100644 recipes/preferences-rs-rust-source/install_rust_source.bat delete mode 100644 recipes/preferences-rs-rust-source/recipe.yaml delete mode 100644 recipes/serial-monitor-rust/README.md delete mode 100644 recipes/serial-monitor-rust/bld.bat delete mode 100644 recipes/serial-monitor-rust/patches/use-local-rust-sources.patch delete mode 100644 recipes/serialport-rs-rust-source/README.md delete mode 100755 recipes/serialport-rs-rust-source/install-rust-source.sh delete mode 100644 recipes/serialport-rs-rust-source/install_rust_source.bat delete mode 100644 recipes/serialport-rs-rust-source/recipe.yaml delete mode 100644 recipes/serialport-rs-rust-source/variant_config.yaml diff --git a/recipes/egui-phosphor-rust-source/README.md b/recipes/egui-phosphor-rust-source/README.md deleted file mode 100644 index f2a0e51..0000000 --- a/recipes/egui-phosphor-rust-source/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# V1 recipe format - -This recipe is an example of the v1 recipe format that was defined by [CEP 13](https://github.com/conda/ceps/blob/main/cep-13.md). The v1 recipe format is fully functional when built with rattler-build, but is not yet fully supported by conda-forge's automation. - -See https://github.com/conda-forge/conda-forge.github.io/issues/2308 for progress on general support for this new format. diff --git a/recipes/egui-phosphor-rust-source/install-rust-source.sh b/recipes/egui-phosphor-rust-source/install-rust-source.sh deleted file mode 100755 index 543694f..0000000 --- a/recipes/egui-phosphor-rust-source/install-rust-source.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -set -euxo pipefail - -cargo build --release --all-targets -cargo test --release --all-targets - -# This is a Rust source distribution, we need to remove the target directory -rm -rf target - -# Install source distribution -mkdir -p ${PREFIX}/src/rust-libraries/${PKG_NAME}-${PKG_VERSION} -cp -r ./* ${PREFIX}/src/rust-libraries/${PKG_NAME}-${PKG_VERSION} - -# Adding the checksums of the source distribution to the recipe -cat > $PREFIX/src/rust-libraries/${PKG_NAME}-${PKG_VERSION}/.cargo-checksum.json << EOF -{"files":{},"package":"${PKG_SHA256}"} -EOF - -cargo-bundle-licenses --format yaml --output "${RECIPE_DIR}"/THIRDPARTY.yml diff --git a/recipes/egui-phosphor-rust-source/install_rust_source.bat b/recipes/egui-phosphor-rust-source/install_rust_source.bat deleted file mode 100644 index b9124d5..0000000 --- a/recipes/egui-phosphor-rust-source/install_rust_source.bat +++ /dev/null @@ -1,19 +0,0 @@ -@echo off -setlocal enabledelayedexpansion - -cargo build --release --all-targets -cargo test --release --lib - -rem This is a Rust source distribution, we need to remove the target directory -rd /s /q target - -rem Install source distribution -mkdir %PREFIX%\src\rust-libraries\%PKG_NAME%-%PKG_VERSION% -xcopy /e /i . %PREFIX%\src\rust-libraries\%PKG_NAME%-%PKG_VERSION% - -rem Adding the checksums of the source distribution to the recipe -( -echo {"files":{},"package":"%PKG_SHA256%"} -) > %PREFIX%\src\rust-libraries\%PKG_NAME%-%PKG_VERSION%\.cargo-checksum.json - -cargo-bundle-licenses --format yaml --output "%RECIPE_DIR%\THIRDPARTY.yml" \ No newline at end of file diff --git a/recipes/egui-phosphor-rust-source/recipe.yaml b/recipes/egui-phosphor-rust-source/recipe.yaml deleted file mode 100644 index 671a8de..0000000 --- a/recipes/egui-phosphor-rust-source/recipe.yaml +++ /dev/null @@ -1,55 +0,0 @@ -context: - name: egui-phosphor-rust-source - version: "0.7.3" - sha256: "076e5598271b9c92565b991cf771b2478740c7a7f66024051e9e74d8d39f7a6f" - -package: - name: ${{ name|lower }} - version: ${{ version }} - -source: - url: https://github.com/amPerl/egui-phosphor/archive/refs/tags/v${{ version }}.tar.gz - sha256: ${{ sha256 }} - -build: - number: 0 - script: - env: - PKG_SHA256: ${{ sha256 }} - content: - - if: linux or osx - then: "${RECIPE_DIR}/install-rust-source.sh" - else: "%RECIPE_DIR%\\install_rust_source.bat" - -requirements: - build: - - ${{ compiler('c') }} - - ${{ stdlib("c") }} - - ${{ compiler('rust') }} - - cargo-bundle-licenses - host: - - setuptools-rust - -tests: - - script: - - if: linux or osx - then: - - test -f $PREFIX/src/rust-libraries/${{ name }}-${{ version }}/LICENSE-MIT - else: - - if not exist %PREFIX%\\src\\rust-libraries\\${{ name }}-${{ version }}\\LICENSE-MIT exit 1 - # - downstream: serial-monitor-rust - -about: - homepage: https://github.com/amPerl/egui-phosphor - summary: 'Phosphor icons for egui.' - description: | - Bundles Phosphor icons with boilerplate to use in your egui app. - license: MIT - license_file: - - LICENSE-MIT - - LICENSE-APACHE - repository: https://github.com/amPerl/egui-phosphor - -extra: - recipe-maintainers: - - MementoRC diff --git a/recipes/keepawake-rs/README.md b/recipes/keepawake-rs/README.md deleted file mode 100644 index f2a0e51..0000000 --- a/recipes/keepawake-rs/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# V1 recipe format - -This recipe is an example of the v1 recipe format that was defined by [CEP 13](https://github.com/conda/ceps/blob/main/cep-13.md). The v1 recipe format is fully functional when built with rattler-build, but is not yet fully supported by conda-forge's automation. - -See https://github.com/conda-forge/conda-forge.github.io/issues/2308 for progress on general support for this new format. diff --git a/recipes/keepawake-rs/build.sh b/recipes/keepawake-rs/build.sh index d282dd6..16926f2 100644 --- a/recipes/keepawake-rs/build.sh +++ b/recipes/keepawake-rs/build.sh @@ -2,14 +2,10 @@ set -euxo pipefail -# On macos, clang 18 conflicts with Xcode_15.2 if [[ "${target_platform}" == osx-* ]]; then - export PATH="/Applications/Xcode_15.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH" - export CPATH="/Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include" - unset CONDA_BUILD_SYSROOT - export DEVELOPER_DIR=/Applications/Xcode_15.2.app/Contents/Developer - export LIBCLANG_PATH=/Applications/Xcode_15.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib - export BINDGEN_EXTRA_CLANG_ARGS="-I/Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include" + # On macos, clang 18 conflicts with Xcode_xx.x in relation to apple-sys: Use Xcode_xx.x + export PATH="${SDKROOT}/../../../Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH" + export CPATH="${SDKROOT}/usr/include" fi cargo build --release --all-targets diff --git a/recipes/keepawake-rs/patches/osx-update-time.patch b/recipes/keepawake-rs/patches/osx-update-time.patch index 6adc36d..e69de29 100644 --- a/recipes/keepawake-rs/patches/osx-update-time.patch +++ b/recipes/keepawake-rs/patches/osx-update-time.patch @@ -1,12 +0,0 @@ -diff --git a/Cargo.toml b/Cargo.toml -index fda81c9..5a151dd 100644 ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -40,6 +40,7 @@ ctrlc = { version = "3.2.3", features = ["termination"], optional = true } - derive_builder = "0.13.0" - shadow-rs = { version = "0.26.1", optional = true } - sysinfo = { version = "0.30.5", optional = true } -+time = "0.3.35" - thiserror = "1.0.56" - - [target.'cfg(windows)'.dependencies.windows] diff --git a/recipes/preferences-rs-rust-source/README.md b/recipes/preferences-rs-rust-source/README.md deleted file mode 100644 index f2a0e51..0000000 --- a/recipes/preferences-rs-rust-source/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# V1 recipe format - -This recipe is an example of the v1 recipe format that was defined by [CEP 13](https://github.com/conda/ceps/blob/main/cep-13.md). The v1 recipe format is fully functional when built with rattler-build, but is not yet fully supported by conda-forge's automation. - -See https://github.com/conda-forge/conda-forge.github.io/issues/2308 for progress on general support for this new format. diff --git a/recipes/preferences-rs-rust-source/install-rust-source.sh b/recipes/preferences-rs-rust-source/install-rust-source.sh deleted file mode 100755 index 543694f..0000000 --- a/recipes/preferences-rs-rust-source/install-rust-source.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -set -euxo pipefail - -cargo build --release --all-targets -cargo test --release --all-targets - -# This is a Rust source distribution, we need to remove the target directory -rm -rf target - -# Install source distribution -mkdir -p ${PREFIX}/src/rust-libraries/${PKG_NAME}-${PKG_VERSION} -cp -r ./* ${PREFIX}/src/rust-libraries/${PKG_NAME}-${PKG_VERSION} - -# Adding the checksums of the source distribution to the recipe -cat > $PREFIX/src/rust-libraries/${PKG_NAME}-${PKG_VERSION}/.cargo-checksum.json << EOF -{"files":{},"package":"${PKG_SHA256}"} -EOF - -cargo-bundle-licenses --format yaml --output "${RECIPE_DIR}"/THIRDPARTY.yml diff --git a/recipes/preferences-rs-rust-source/install_rust_source.bat b/recipes/preferences-rs-rust-source/install_rust_source.bat deleted file mode 100644 index b9124d5..0000000 --- a/recipes/preferences-rs-rust-source/install_rust_source.bat +++ /dev/null @@ -1,19 +0,0 @@ -@echo off -setlocal enabledelayedexpansion - -cargo build --release --all-targets -cargo test --release --lib - -rem This is a Rust source distribution, we need to remove the target directory -rd /s /q target - -rem Install source distribution -mkdir %PREFIX%\src\rust-libraries\%PKG_NAME%-%PKG_VERSION% -xcopy /e /i . %PREFIX%\src\rust-libraries\%PKG_NAME%-%PKG_VERSION% - -rem Adding the checksums of the source distribution to the recipe -( -echo {"files":{},"package":"%PKG_SHA256%"} -) > %PREFIX%\src\rust-libraries\%PKG_NAME%-%PKG_VERSION%\.cargo-checksum.json - -cargo-bundle-licenses --format yaml --output "%RECIPE_DIR%\THIRDPARTY.yml" \ No newline at end of file diff --git a/recipes/preferences-rs-rust-source/recipe.yaml b/recipes/preferences-rs-rust-source/recipe.yaml deleted file mode 100644 index 48137d7..0000000 --- a/recipes/preferences-rs-rust-source/recipe.yaml +++ /dev/null @@ -1,56 +0,0 @@ -context: - name: preferences-rs-rust-source - version: "2.0.0" - sha256: "8aa13f1c206db011ed01612acd46246d4d77fc3d9dd6f42f7ba7cbf762441df8" - -package: - name: ${{ name|lower }} - version: ${{ version }} - -source: - url: https://github.com/andybarron/preferences-rs/archive/refs/tags/v${{ version }}.tar.gz - sha256: ${{ sha256 }} - -build: - number: 0 - script: - env: - PKG_SHA256: ${{ sha256 }} - content: - - if: linux or osx - then: "${RECIPE_DIR}/install-rust-source.sh" - else: "%RECIPE_DIR%\\install_rust_source.bat" - -requirements: - build: - - ${{ compiler('c') }} - - ${{ stdlib("c") }} - - ${{ compiler('rust') }} - - cargo-bundle-licenses - host: - - setuptools-rust - -tests: - - script: - - if: linux or osx - then: - - test -f $PREFIX/src/rust-libraries/${{ name }}-${{ version }}/LICENSE.txt - else: - - if not exist %PREFIX%\\src\\rust-libraries\\${{ name }}-${{ version }}\\LICENSE.txt exit 1 - # - downstream: serial-monitor-rust - -about: - homepage: https://github.com/andybarron/preferences-rs - summary: 'Read and write user-specific application data in (stable!) Rust.' - description: | - Read and write user-specific application data in Rust - license: MIT - license_file: - - LICENSE.txt - - THIRDPARTY.yml - documentation: https://docs.rs/preferences - repository: https://github.com/andybarron/preferences-rs - -extra: - recipe-maintainers: - - MementoRC diff --git a/recipes/serial-monitor-rust/README.md b/recipes/serial-monitor-rust/README.md deleted file mode 100644 index f2a0e51..0000000 --- a/recipes/serial-monitor-rust/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# V1 recipe format - -This recipe is an example of the v1 recipe format that was defined by [CEP 13](https://github.com/conda/ceps/blob/main/cep-13.md). The v1 recipe format is fully functional when built with rattler-build, but is not yet fully supported by conda-forge's automation. - -See https://github.com/conda-forge/conda-forge.github.io/issues/2308 for progress on general support for this new format. diff --git a/recipes/serial-monitor-rust/bld.bat b/recipes/serial-monitor-rust/bld.bat deleted file mode 100644 index 4fc15c9..0000000 --- a/recipes/serial-monitor-rust/bld.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -powershell -ExecutionPolicy Bypass -File "%RECIPE_DIR%\helpers\build.ps1" diff --git a/recipes/serial-monitor-rust/build.sh b/recipes/serial-monitor-rust/build.sh index 443dca0..268ab85 100644 --- a/recipes/serial-monitor-rust/build.sh +++ b/recipes/serial-monitor-rust/build.sh @@ -18,9 +18,9 @@ preferences = { path = "${BUILD_PREFIX}/src/rust-libraries/preferences-rs-rust-s EOF if [[ "${target_platform}" == osx-* ]]; then - export PATH="/Applications/Xcode_15.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH" - export CPATH="/Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include" - unset CONDA_BUILD_SYSROOT + # On macos, clang 18 conflicts with Xcode_xx.x in relation to apple-sys: Use Xcode_xx.x + export PATH="${SDKROOT}/../../../Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH" + export CPATH="${SDKROOT}/usr/include" fi cargo build --release --all-targets diff --git a/recipes/serial-monitor-rust/patches/use-local-rust-sources.patch b/recipes/serial-monitor-rust/patches/use-local-rust-sources.patch deleted file mode 100644 index 99b194e..0000000 --- a/recipes/serial-monitor-rust/patches/use-local-rust-sources.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/Cargo.toml.orig 2020-07-29 14:00:00.000000000 +0000 -+++ b/Cargo.toml 2020-07-29 14:00:00.000000000 +0000 -@@ -15,3 +15,3 @@ - egui_plot = "0.29.0" --egui-phosphor = { git = "https://github.com/hacknus/egui-phosphor" } -+egui-phosphor = "0.7.3" - egui-theme-switch = { version = "0.2.0", default-features = true } -@@ -20,4 +20,4 @@ - itertools-num = "0.1" --keepawake = { git = "https://github.com/segevfiner/keepawake-rs" } --preferences = { git = "https://github.com/andybarron/preferences-rs" } -+keepawake = "0.5.1" -+preferences = "2.0.0" - rand = "0.8.5" -@@ -28,3 +28,3 @@ - serde = { version = "1.0", features = ["derive"] } --serialport = { git = "https://github.com/serialport/serialport-rs", features = ["serde"] } -+serialport = { version = "4.6.1", features = ["serde"] } - diff --git a/recipes/serial-monitor-rust/recipe.yaml b/recipes/serial-monitor-rust/recipe.yaml index 3717c3d..2105190 100644 --- a/recipes/serial-monitor-rust/recipe.yaml +++ b/recipes/serial-monitor-rust/recipe.yaml @@ -1,6 +1,6 @@ context: name: serial-monitor-rust - version: "0.3.0" + version: "0.3.1" package: name: ${{ name|lower }} @@ -8,9 +8,7 @@ package: source: url: https://github.com/hacknus/serial-monitor-rust/archive/refs/tags/v${{ version }}.tar.gz - sha256: ed5382c75d97fd05c8bc95a8b17de12a023fabbe88d7794c05d8ef79ee3a1096 - patches: - - patches/use-local-rust-sources.patch + sha256: 3044e9a19c72efb240742f8a319f83b29efe3f9d2126dab9e3240e7609171079 build: number: 0 @@ -22,10 +20,6 @@ requirements: - ${{ compiler('rust') }} - cargo-bundle-licenses - pkg-config - # Rust source distributions (pre-compiled/tested on conda-forge) - - egui-phosphor-rust-source >=0.7.3 - - preferences-rs-rust-source >=2.0.0 - - serialport-rs-rust-source >=4.6.1 host: - keepawake-rs - setuptools-rust diff --git a/recipes/serialport-rs-rust-source/README.md b/recipes/serialport-rs-rust-source/README.md deleted file mode 100644 index f2a0e51..0000000 --- a/recipes/serialport-rs-rust-source/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# V1 recipe format - -This recipe is an example of the v1 recipe format that was defined by [CEP 13](https://github.com/conda/ceps/blob/main/cep-13.md). The v1 recipe format is fully functional when built with rattler-build, but is not yet fully supported by conda-forge's automation. - -See https://github.com/conda-forge/conda-forge.github.io/issues/2308 for progress on general support for this new format. diff --git a/recipes/serialport-rs-rust-source/install-rust-source.sh b/recipes/serialport-rs-rust-source/install-rust-source.sh deleted file mode 100755 index 60a9612..0000000 --- a/recipes/serialport-rs-rust-source/install-rust-source.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -set -euxo pipefail - -cargo build --release --all-targets -cargo test --release --lib - -# This is a Rust source distribution, we need to remove the target directory -rm -rf target - -# Install source distribution -mkdir -p ${PREFIX}/src/rust-libraries/${PKG_NAME}-${PKG_VERSION} -cp -r ./* ${PREFIX}/src/rust-libraries/${PKG_NAME}-${PKG_VERSION} - -# Adding the checksums of the source distribution to the recipe -cat > $PREFIX/src/rust-libraries/${PKG_NAME}-${PKG_VERSION}/.cargo-checksum.json << EOF -{"files":{},"package":"${PKG_SHA256}"} -EOF - -cargo-bundle-licenses --format yaml --output "${RECIPE_DIR}"/THIRDPARTY.yml diff --git a/recipes/serialport-rs-rust-source/install_rust_source.bat b/recipes/serialport-rs-rust-source/install_rust_source.bat deleted file mode 100644 index b9124d5..0000000 --- a/recipes/serialport-rs-rust-source/install_rust_source.bat +++ /dev/null @@ -1,19 +0,0 @@ -@echo off -setlocal enabledelayedexpansion - -cargo build --release --all-targets -cargo test --release --lib - -rem This is a Rust source distribution, we need to remove the target directory -rd /s /q target - -rem Install source distribution -mkdir %PREFIX%\src\rust-libraries\%PKG_NAME%-%PKG_VERSION% -xcopy /e /i . %PREFIX%\src\rust-libraries\%PKG_NAME%-%PKG_VERSION% - -rem Adding the checksums of the source distribution to the recipe -( -echo {"files":{},"package":"%PKG_SHA256%"} -) > %PREFIX%\src\rust-libraries\%PKG_NAME%-%PKG_VERSION%\.cargo-checksum.json - -cargo-bundle-licenses --format yaml --output "%RECIPE_DIR%\THIRDPARTY.yml" \ No newline at end of file diff --git a/recipes/serialport-rs-rust-source/recipe.yaml b/recipes/serialport-rs-rust-source/recipe.yaml deleted file mode 100644 index ce70316..0000000 --- a/recipes/serialport-rs-rust-source/recipe.yaml +++ /dev/null @@ -1,60 +0,0 @@ -context: - name: serialport-rs-rust-source - version: "4.6.1" - sha256: "bf7a47b1d682115b1a93bb722079bb1420041b5dcf149ceb0db8d8e6348c0064" - -package: - name: ${{ name|lower }} - version: ${{ version }} - -source: - url: https://github.com/serialport/serialport-rs/archive/refs/tags/v${{ version }}.tar.gz - sha256: ${{ sha256 }} - -build: - number: 0 - script: - env: - PKG_SHA256: ${{ sha256 }} - content: - - if: linux or osx - then: "${RECIPE_DIR}/install-rust-source.sh" - else: "%RECIPE_DIR%\\install_rust_source.bat" - -requirements: - build: - - ${{ compiler('c') }} - - ${{ stdlib("c") }} - - ${{ compiler('rust') }} - - cargo-bundle-licenses - - pkg-config - host: - - setuptools-rust - - if: linux - then: - - libudev - -tests: - - script: - - if: linux or osx - then: - - test -f $PREFIX/src/rust-libraries/${{ name }}-${{ version }}/LICENSE.txt - else: - - if not exist %PREFIX%\\src\\rust-libraries\\${{ name }}-${{ version }}\\LICENSE.txt exit 1 - # - downstream: serial-monitor-rust - -about: - homepage: https://github.com/serialport/serialport-rs - summary: 'A cross-platform serial port library in Rust.' - description: | - A cross-platform serial port library in Rust. Provides a blocking I/O - interface and port enumeration including USB device information. - license: MPL-2.0 - license_file: - - LICENSE.txt - - THIRDPARTY.yml - repository: https://github.com/serialport/serialport-rs - -extra: - recipe-maintainers: - - MementoRC diff --git a/recipes/serialport-rs-rust-source/variant_config.yaml b/recipes/serialport-rs-rust-source/variant_config.yaml deleted file mode 100644 index 78b7939..0000000 --- a/recipes/serialport-rs-rust-source/variant_config.yaml +++ /dev/null @@ -1,21 +0,0 @@ -c_stdlib: - - if: linux - then: - - sysroot - - if: osx - then: - - macosx_deployment_target - - if: win - then: - - vs - -c_compiler: - - if: linux - then: - - gcc - - if: osx - then: - - clang - - if: win - then: - - vs From 0b4e679f2dd5ea3cc20ba2e36971bb072003826f Mon Sep 17 00:00:00 2001 From: memento Date: Sun, 8 Dec 2024 16:58:59 -0600 Subject: [PATCH 11/29] (ref) more v0.3.1 cleanup --- recipes/keepawake-rs/build.sh | 6 ----- recipes/serial-monitor-rust/build.bat | 6 ++++- recipes/serial-monitor-rust/build.sh | 21 ------------------ recipes/serial-monitor-rust/helpers/build.ps1 | 22 ------------------- 4 files changed, 5 insertions(+), 50 deletions(-) delete mode 100644 recipes/serial-monitor-rust/helpers/build.ps1 diff --git a/recipes/keepawake-rs/build.sh b/recipes/keepawake-rs/build.sh index 16926f2..f66a98f 100644 --- a/recipes/keepawake-rs/build.sh +++ b/recipes/keepawake-rs/build.sh @@ -2,12 +2,6 @@ set -euxo pipefail -if [[ "${target_platform}" == osx-* ]]; then - # On macos, clang 18 conflicts with Xcode_xx.x in relation to apple-sys: Use Xcode_xx.x - export PATH="${SDKROOT}/../../../Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH" - export CPATH="${SDKROOT}/usr/include" -fi - cargo build --release --all-targets # Skip doc-test which fails to find cc as a linker (odd, since it can build just fine) cargo test --release --all-targets diff --git a/recipes/serial-monitor-rust/build.bat b/recipes/serial-monitor-rust/build.bat index 4fc15c9..674e930 100644 --- a/recipes/serial-monitor-rust/build.bat +++ b/recipes/serial-monitor-rust/build.bat @@ -1,2 +1,6 @@ @echo off -powershell -ExecutionPolicy Bypass -File "%RECIPE_DIR%\helpers\build.ps1" + +call cargo build --release --all-targets +call cargo test --release --all-targets +call cargo install --path . --root "%PREFIX%" --features="bin" +call cargo-bundle-licenses --format yaml --output "%RECIPE_DIR%\THIRDPARTY.yml" diff --git a/recipes/serial-monitor-rust/build.sh b/recipes/serial-monitor-rust/build.sh index 268ab85..920c3f0 100644 --- a/recipes/serial-monitor-rust/build.sh +++ b/recipes/serial-monitor-rust/build.sh @@ -2,27 +2,6 @@ set -euxo pipefail -# Use Conda Rust source libraries (compiled/tested) instead of downloading from crates.io -EGUI_PHOSPHOR_VERSION=$(find $BUILD_PREFIX/src/rust-libraries/egui-phosphor-rust-source-* -type d -exec basename {} \; | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' | sort -V | tail -n1) -PREFERENCES_VERSION=$(find $BUILD_PREFIX/src/rust-libraries/preferences-rs-rust-source-* -type d -exec basename {} \; | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' | sort -V | tail -n1) -SERIALPORT_VERSION=$(find $BUILD_PREFIX/src/rust-libraries/serialport-rs-rust-source-* -type d -exec basename {} \; | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' | sort -V | tail -n1) - -mkdir -p .cargo -touch .cargo/config.toml -cat >> .cargo/config.toml << EOF - -[patch.crates-io] -serialport = { path = "${BUILD_PREFIX}/src/rust-libraries/serialport-rs-rust-source-${SERIALPORT_VERSION}" } -egui-phosphor = { path = "${BUILD_PREFIX}/src/rust-libraries/egui-phosphor-rust-source-${EGUI_PHOSPHOR_VERSION}" } -preferences = { path = "${BUILD_PREFIX}/src/rust-libraries/preferences-rs-rust-source-${PREFERENCES_VERSION}" } -EOF - -if [[ "${target_platform}" == osx-* ]]; then - # On macos, clang 18 conflicts with Xcode_xx.x in relation to apple-sys: Use Xcode_xx.x - export PATH="${SDKROOT}/../../../Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH" - export CPATH="${SDKROOT}/usr/include" -fi - cargo build --release --all-targets cargo test --release --all-targets CARGO_TARGET_DIR=target cargo install --path . --root "${PREFIX}" diff --git a/recipes/serial-monitor-rust/helpers/build.ps1 b/recipes/serial-monitor-rust/helpers/build.ps1 deleted file mode 100644 index 07cdaf0..0000000 --- a/recipes/serial-monitor-rust/helpers/build.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -Set-StrictMode -Version Latest -$ErrorActionPreference = "Stop" - -# Use Conda Rust source libraries (compiled/tested) instead of downloading from crates.io -$EGUI_PHOSPHOR_VERSION = (Get-ChildItem "$env:BUILD_PREFIX/src/rust-libraries/egui-phosphor-rust-source-*" -Directory | ForEach-Object { $_.Name -match '\d+\.\d+\.\d+' | Out-Null; [version]$Matches[0] } | Sort-Object -Property {$_} | Select-Object -Last 1) -$PREFERENCES_VERSION = (Get-ChildItem "$env:BUILD_PREFIX/src/rust-libraries/preferences-rs-rust-source-*" -Directory | ForEach-Object { $_.Name -match '\d+\.\d+\.\d+' | Out-Null; [version]$Matches[0] } | Sort-Object -Property {$_} | Select-Object -Last 1) -$SERIALPORT_VERSION = (Get-ChildItem "$env:BUILD_PREFIX/src/rust-libraries/serialport-rs-rust-source-*" -Directory | ForEach-Object { $_.Name -match '\d+\.\d+\.\d+' | Out-Null; [version]$Matches[0] } | Sort-Object -Property {$_} | Select-Object -Last 1) -New-Item -ItemType Directory -Force -Path .cargo -New-Item -ItemType File -Force -Path .cargo/config.toml -Add-Content -Path .cargo/config.toml -Value @" - -[patch.crates-io] -serialport = { path = "$env:BUILD_PREFIX/src/rust-libraries/serialport-rs-rust-source-$SERIALPORT_VERSION" } -egui-phosphor = { path = "$env:BUILD_PREFIX/src/rust-libraries/egui-phosphor-rust-source-$EGUI_PHOSPHOR_VERSION" } -preferences = { path = "$env:BUILD_PREFIX/src/rust-libraries/preferences-rs-rust-source-$PREFERENCES_VERSION" } -"@ - -cargo build --release --all-targets -cargo test --release --all-targets -$env:CARGO_TARGET_DIR = "target" -cargo install --path . --root "$env:PREFIX" -cargo-bundle-licenses --format yaml --output "$env:RECIPE_DIR/THIRDPARTY.yml" \ No newline at end of file From d0cf47c8937ec68e8ad2c070b450da79cdde2aae Mon Sep 17 00:00:00 2001 From: memento Date: Wed, 11 Dec 2024 10:44:40 -0600 Subject: [PATCH 12/29] (ref) v0.3.2 --- recipes/serial-monitor-rust/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/serial-monitor-rust/recipe.yaml b/recipes/serial-monitor-rust/recipe.yaml index 2105190..67ee688 100644 --- a/recipes/serial-monitor-rust/recipe.yaml +++ b/recipes/serial-monitor-rust/recipe.yaml @@ -1,6 +1,6 @@ context: name: serial-monitor-rust - version: "0.3.1" + version: "0.3.2" package: name: ${{ name|lower }} @@ -8,7 +8,7 @@ package: source: url: https://github.com/hacknus/serial-monitor-rust/archive/refs/tags/v${{ version }}.tar.gz - sha256: 3044e9a19c72efb240742f8a319f83b29efe3f9d2126dab9e3240e7609171079 + sha256: 7d9e7f19f3dc86f74852dd0129dcb31feb08a3411269d337dba3463a4f479f01 build: number: 0 From e0e0ed73a9e48f0bf3a8937270df4bc1028b4a4b Mon Sep 17 00:00:00 2001 From: memento Date: Wed, 11 Dec 2024 11:54:30 -0600 Subject: [PATCH 13/29] (ref) v0.3.2 win: CARGO_HOME? --- recipes/keepawake-rs/build.bat | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/recipes/keepawake-rs/build.bat b/recipes/keepawake-rs/build.bat index 674e930..6e482c5 100644 --- a/recipes/keepawake-rs/build.bat +++ b/recipes/keepawake-rs/build.bat @@ -1,6 +1,17 @@ @echo off -call cargo build --release --all-targets -call cargo test --release --all-targets -call cargo install --path . --root "%PREFIX%" --features="bin" -call cargo-bundle-licenses --format yaml --output "%RECIPE_DIR%\THIRDPARTY.yml" +set CARGO_HOME=%BUILD_PREFIX%\cargo +mkdir %CARGO_HOME% +icacls %CARGO_HOME% /grant Users:F + +cargo build --release --all-targets +if %errorlevel% NEQ 0 exit /b %errorlevel% + +cargo test --release --all-targets +if %errorlevel% NEQ 0 exit /b %errorlevel% + +cargo install --path . --root "%PREFIX%" --features="bin" +if %errorlevel% NEQ 0 exit /b %errorlevel% + +cargo-bundle-licenses --format yaml --output "%RECIPE_DIR%\THIRDPARTY.yml" +if %errorlevel% NEQ 0 exit /b %errorlevel% From cf9fa3e4b1acabe55d04db4d58c6caacb0f192e8 Mon Sep 17 00:00:00 2001 From: memento Date: Wed, 11 Dec 2024 14:43:34 -0600 Subject: [PATCH 14/29] (ref) osx: MACOS_DEPLOY + time --- recipes/keepawake-rs/build.sh | 12 ++++++++++++ recipes/keepawake-rs/patches/osx-update-time.patch | 6 ++++++ recipes/keepawake-rs/variant_config.yaml | 9 +++++++++ 3 files changed, 27 insertions(+) create mode 100644 recipes/keepawake-rs/variant_config.yaml diff --git a/recipes/keepawake-rs/build.sh b/recipes/keepawake-rs/build.sh index f66a98f..ea1dc07 100644 --- a/recipes/keepawake-rs/build.sh +++ b/recipes/keepawake-rs/build.sh @@ -2,6 +2,18 @@ set -euxo pipefail +export CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER=$CC +export CARGO_TARGET_AARCH64_APPLE_DARWIN_LINKER=$CC + +BINDGEN_EXTRA_CLANG_ARGS="-v ${CPPFLAGS} ${CFLAGS}" +if [[ "${target_platform}" == osx-arm64 ]]; then + BINDGEN_EXTRA_CLANG_ARGS="${BINDGEN_EXTRA_CLANG_ARGS} --target=aarch64-apple-darwin" +else + BINDGEN_EXTRA_CLANG_ARGS="${BINDGEN_EXTRA_CLANG_ARGS} --target=x86_64-apple-darwin13.4.0" +fi +export BINDGEN_EXTRA_CLANG_ARGS="$(echo "${BINDGEN_EXTRA_CLANG_ARGS}" | sed 's/ /\n/g' | sort -u | paste -s -d ' ' -)" +export LIBCLANG_PATH=${BUILD_PREFIX}/lib + cargo build --release --all-targets # Skip doc-test which fails to find cc as a linker (odd, since it can build just fine) cargo test --release --all-targets diff --git a/recipes/keepawake-rs/patches/osx-update-time.patch b/recipes/keepawake-rs/patches/osx-update-time.patch index e69de29..11c95c9 100644 --- a/recipes/keepawake-rs/patches/osx-update-time.patch +++ b/recipes/keepawake-rs/patches/osx-update-time.patch @@ -0,0 +1,6 @@ +--- a/Cargo.toml.orig 2021-09-23 14:00:00.000000000 +0000 ++++ b/Cargo.toml 2021-09-23 14:00:00.000000000 +0000 +@@ -42,2 +42,3 @@ + sysinfo = { version = "0.30.5", optional = true } ++time = "0.3.35" + thiserror = "1.0.56" diff --git a/recipes/keepawake-rs/variant_config.yaml b/recipes/keepawake-rs/variant_config.yaml new file mode 100644 index 0000000..923542f --- /dev/null +++ b/recipes/keepawake-rs/variant_config.yaml @@ -0,0 +1,9 @@ +c_stdlib_version: + - if: osx + then: + - 10.13 +MACOSX_DEPLOYEMENT_TARGET: + - if: osx + then: + - 10.13 + From be1d56a4edbd7e1dcd6cb023af0523026fb180ef Mon Sep 17 00:00:00 2001 From: memento Date: Wed, 11 Dec 2024 14:50:26 -0600 Subject: [PATCH 15/29] (ref) osx: one change at a time --- recipes/keepawake-rs/build.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/recipes/keepawake-rs/build.sh b/recipes/keepawake-rs/build.sh index ea1dc07..a04d79e 100644 --- a/recipes/keepawake-rs/build.sh +++ b/recipes/keepawake-rs/build.sh @@ -5,14 +5,13 @@ set -euxo pipefail export CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER=$CC export CARGO_TARGET_AARCH64_APPLE_DARWIN_LINKER=$CC -BINDGEN_EXTRA_CLANG_ARGS="-v ${CPPFLAGS} ${CFLAGS}" -if [[ "${target_platform}" == osx-arm64 ]]; then - BINDGEN_EXTRA_CLANG_ARGS="${BINDGEN_EXTRA_CLANG_ARGS} --target=aarch64-apple-darwin" -else - BINDGEN_EXTRA_CLANG_ARGS="${BINDGEN_EXTRA_CLANG_ARGS} --target=x86_64-apple-darwin13.4.0" -fi -export BINDGEN_EXTRA_CLANG_ARGS="$(echo "${BINDGEN_EXTRA_CLANG_ARGS}" | sed 's/ /\n/g' | sort -u | paste -s -d ' ' -)" -export LIBCLANG_PATH=${BUILD_PREFIX}/lib +# BINDGEN_EXTRA_CLANG_ARGS="-v ${CPPFLAGS} ${CFLAGS}" +# if [[ "${target_platform}" == osx-arm64 ]]; then +# BINDGEN_EXTRA_CLANG_ARGS="${BINDGEN_EXTRA_CLANG_ARGS} --target=aarch64-apple-darwin" +# else +# BINDGEN_EXTRA_CLANG_ARGS="${BINDGEN_EXTRA_CLANG_ARGS} --target=x86_64-apple-darwin13.4.0" +# fi +# export LIBCLANG_PATH=${BUILD_PREFIX}/lib cargo build --release --all-targets # Skip doc-test which fails to find cc as a linker (odd, since it can build just fine) From bf4daaef308c879d7be42b188d5d19f5ae85045d Mon Sep 17 00:00:00 2001 From: memento Date: Wed, 11 Dec 2024 14:59:23 -0600 Subject: [PATCH 16/29] (ref) osx: typo in variant-config.yaml --- recipes/keepawake-rs/{variant_config.yaml => variant-config.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename recipes/keepawake-rs/{variant_config.yaml => variant-config.yaml} (100%) diff --git a/recipes/keepawake-rs/variant_config.yaml b/recipes/keepawake-rs/variant-config.yaml similarity index 100% rename from recipes/keepawake-rs/variant_config.yaml rename to recipes/keepawake-rs/variant-config.yaml From 49025ce4472dd1b8f8c0172b70177b65d227b8a8 Mon Sep 17 00:00:00 2001 From: memento Date: Wed, 11 Dec 2024 15:40:26 -0600 Subject: [PATCH 17/29] (ref) osx: typo in variant_config.yaml? --- recipes/keepawake-rs/build.sh | 14 +++++++------- .../{variant-config.yaml => variant_config.yaml} | 0 2 files changed, 7 insertions(+), 7 deletions(-) rename recipes/keepawake-rs/{variant-config.yaml => variant_config.yaml} (100%) diff --git a/recipes/keepawake-rs/build.sh b/recipes/keepawake-rs/build.sh index a04d79e..96751b6 100644 --- a/recipes/keepawake-rs/build.sh +++ b/recipes/keepawake-rs/build.sh @@ -5,13 +5,13 @@ set -euxo pipefail export CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER=$CC export CARGO_TARGET_AARCH64_APPLE_DARWIN_LINKER=$CC -# BINDGEN_EXTRA_CLANG_ARGS="-v ${CPPFLAGS} ${CFLAGS}" -# if [[ "${target_platform}" == osx-arm64 ]]; then -# BINDGEN_EXTRA_CLANG_ARGS="${BINDGEN_EXTRA_CLANG_ARGS} --target=aarch64-apple-darwin" -# else -# BINDGEN_EXTRA_CLANG_ARGS="${BINDGEN_EXTRA_CLANG_ARGS} --target=x86_64-apple-darwin13.4.0" -# fi -# export LIBCLANG_PATH=${BUILD_PREFIX}/lib +BINDGEN_EXTRA_CLANG_ARGS="-v ${CPPFLAGS} ${CFLAGS}" +if [[ "${target_platform}" == osx-arm64 ]]; then + BINDGEN_EXTRA_CLANG_ARGS="${BINDGEN_EXTRA_CLANG_ARGS} --target=aarch64-apple-darwin" +else + BINDGEN_EXTRA_CLANG_ARGS="${BINDGEN_EXTRA_CLANG_ARGS} --target=x86_64-apple-darwin13.4.0" +fi +export LIBCLANG_PATH=${BUILD_PREFIX}/lib cargo build --release --all-targets # Skip doc-test which fails to find cc as a linker (odd, since it can build just fine) diff --git a/recipes/keepawake-rs/variant-config.yaml b/recipes/keepawake-rs/variant_config.yaml similarity index 100% rename from recipes/keepawake-rs/variant-config.yaml rename to recipes/keepawake-rs/variant_config.yaml From d1f483d98f46b8a1dac097e0f0f018d8243980d8 Mon Sep 17 00:00:00 2001 From: memento Date: Wed, 11 Dec 2024 16:05:57 -0600 Subject: [PATCH 18/29] (ref) osx: try conda_build_config. add libclang --- recipes/keepawake-rs/conda_build_config.yaml | 13 +++++++++++++ recipes/keepawake-rs/recipe.yaml | 1 + 2 files changed, 14 insertions(+) create mode 100644 recipes/keepawake-rs/conda_build_config.yaml diff --git a/recipes/keepawake-rs/conda_build_config.yaml b/recipes/keepawake-rs/conda_build_config.yaml new file mode 100644 index 0000000..73a2723 --- /dev/null +++ b/recipes/keepawake-rs/conda_build_config.yaml @@ -0,0 +1,13 @@ +c_stdlib_version: + - if: osx + then: + - 10.13 +c_compiler_version: + - if: osx + then: + - 18 +MACOSX_DEPLOYEMENT_TARGET: + - if: osx + then: + - 10.13 + diff --git a/recipes/keepawake-rs/recipe.yaml b/recipes/keepawake-rs/recipe.yaml index 2b64db9..1d45934 100644 --- a/recipes/keepawake-rs/recipe.yaml +++ b/recipes/keepawake-rs/recipe.yaml @@ -23,6 +23,7 @@ requirements: - ${{ stdlib("c") }} - ${{ compiler('rust') }} - cargo-bundle-licenses + - libclang ${{ c_compiler_version }}.* host: - setuptools-rust From 3216e981e4ff7c3d7486df4cf6a74ec3a701163e Mon Sep 17 00:00:00 2001 From: memento Date: Wed, 11 Dec 2024 16:32:22 -0600 Subject: [PATCH 19/29] (ref) osx: try conda_build_config. add libclang --- recipes/keepawake-rs/conda_build_config.yaml | 13 ------------- recipes/keepawake-rs/variant_config.yaml | 5 ++++- 2 files changed, 4 insertions(+), 14 deletions(-) delete mode 100644 recipes/keepawake-rs/conda_build_config.yaml diff --git a/recipes/keepawake-rs/conda_build_config.yaml b/recipes/keepawake-rs/conda_build_config.yaml deleted file mode 100644 index 73a2723..0000000 --- a/recipes/keepawake-rs/conda_build_config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -c_stdlib_version: - - if: osx - then: - - 10.13 -c_compiler_version: - - if: osx - then: - - 18 -MACOSX_DEPLOYEMENT_TARGET: - - if: osx - then: - - 10.13 - diff --git a/recipes/keepawake-rs/variant_config.yaml b/recipes/keepawake-rs/variant_config.yaml index 923542f..ea51f6b 100644 --- a/recipes/keepawake-rs/variant_config.yaml +++ b/recipes/keepawake-rs/variant_config.yaml @@ -6,4 +6,7 @@ MACOSX_DEPLOYEMENT_TARGET: - if: osx then: - 10.13 - +c_compiler_version: + - if: osx + then: + - 18 From 0ffd895a4eb6993a53a98a6c8e2443b24e4ee2ba Mon Sep 17 00:00:00 2001 From: memento Date: Wed, 11 Dec 2024 16:54:55 -0600 Subject: [PATCH 20/29] (ref) osx: libclang osx only --- recipes/keepawake-rs/recipe.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/keepawake-rs/recipe.yaml b/recipes/keepawake-rs/recipe.yaml index 1d45934..df8821f 100644 --- a/recipes/keepawake-rs/recipe.yaml +++ b/recipes/keepawake-rs/recipe.yaml @@ -23,7 +23,9 @@ requirements: - ${{ stdlib("c") }} - ${{ compiler('rust') }} - cargo-bundle-licenses - - libclang ${{ c_compiler_version }}.* + - if: osx + then: + - libclang ${{ c_compiler_version }}.* host: - setuptools-rust From a73c30c821f803beef49d8e205dbaac2b34c7a34 Mon Sep 17 00:00:00 2001 From: memento Date: Wed, 11 Dec 2024 17:10:38 -0600 Subject: [PATCH 21/29] (ref) osx: libclang osx only --- recipes/keepawake-rs/recipe.yaml | 1 + recipes/keepawake-rs/variant_config.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/keepawake-rs/recipe.yaml b/recipes/keepawake-rs/recipe.yaml index df8821f..6611715 100644 --- a/recipes/keepawake-rs/recipe.yaml +++ b/recipes/keepawake-rs/recipe.yaml @@ -1,6 +1,7 @@ context: name: keepawake-rs version: "0.5.1" + c_compiler_version: 19 package: name: ${{ name|lower }} diff --git a/recipes/keepawake-rs/variant_config.yaml b/recipes/keepawake-rs/variant_config.yaml index ea51f6b..a6f9272 100644 --- a/recipes/keepawake-rs/variant_config.yaml +++ b/recipes/keepawake-rs/variant_config.yaml @@ -9,4 +9,4 @@ MACOSX_DEPLOYEMENT_TARGET: c_compiler_version: - if: osx then: - - 18 + - 19 From 455c597a34397b2960da88b45a4a1371bf89c5dd Mon Sep 17 00:00:00 2001 From: memento Date: Wed, 11 Dec 2024 17:11:33 -0600 Subject: [PATCH 22/29] (ref) osx: should it be variants.yaml? --- recipes/keepawake-rs/variants.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 recipes/keepawake-rs/variants.yaml diff --git a/recipes/keepawake-rs/variants.yaml b/recipes/keepawake-rs/variants.yaml new file mode 100644 index 0000000..a6f9272 --- /dev/null +++ b/recipes/keepawake-rs/variants.yaml @@ -0,0 +1,12 @@ +c_stdlib_version: + - if: osx + then: + - 10.13 +MACOSX_DEPLOYEMENT_TARGET: + - if: osx + then: + - 10.13 +c_compiler_version: + - if: osx + then: + - 19 From 156d95487862a7f31d1a6449a1dc4a9cba4759c5 Mon Sep 17 00:00:00 2001 From: memento Date: Wed, 11 Dec 2024 17:17:20 -0600 Subject: [PATCH 23/29] (ref) osx: variants.yaml --- recipes/keepawake-rs/variant_config.yaml | 12 ------------ recipes/keepawake-rs/variants.yaml | 10 ++++++++-- 2 files changed, 8 insertions(+), 14 deletions(-) delete mode 100644 recipes/keepawake-rs/variant_config.yaml diff --git a/recipes/keepawake-rs/variant_config.yaml b/recipes/keepawake-rs/variant_config.yaml deleted file mode 100644 index a6f9272..0000000 --- a/recipes/keepawake-rs/variant_config.yaml +++ /dev/null @@ -1,12 +0,0 @@ -c_stdlib_version: - - if: osx - then: - - 10.13 -MACOSX_DEPLOYEMENT_TARGET: - - if: osx - then: - - 10.13 -c_compiler_version: - - if: osx - then: - - 19 diff --git a/recipes/keepawake-rs/variants.yaml b/recipes/keepawake-rs/variants.yaml index a6f9272..dd9f5b2 100644 --- a/recipes/keepawake-rs/variants.yaml +++ b/recipes/keepawake-rs/variants.yaml @@ -1,11 +1,17 @@ c_stdlib_version: - - if: osx + - if: osx and x86_64 then: - 10.13 + - if: osx and aarch64 + then: + - 11.0 MACOSX_DEPLOYEMENT_TARGET: - - if: osx + - if: osx and x86_64 then: - 10.13 + - if: osx and aarch64 + then: + - 11.0 c_compiler_version: - if: osx then: From e979956fc6bde399eb7a28693b1c411102c7ae6d Mon Sep 17 00:00:00 2001 From: memento Date: Wed, 11 Dec 2024 17:18:58 -0600 Subject: [PATCH 24/29] (ref) osx: variants.yaml --- recipes/serial-monitor-rust/variants.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 recipes/serial-monitor-rust/variants.yaml diff --git a/recipes/serial-monitor-rust/variants.yaml b/recipes/serial-monitor-rust/variants.yaml new file mode 100644 index 0000000..dd9f5b2 --- /dev/null +++ b/recipes/serial-monitor-rust/variants.yaml @@ -0,0 +1,18 @@ +c_stdlib_version: + - if: osx and x86_64 + then: + - 10.13 + - if: osx and aarch64 + then: + - 11.0 +MACOSX_DEPLOYEMENT_TARGET: + - if: osx and x86_64 + then: + - 10.13 + - if: osx and aarch64 + then: + - 11.0 +c_compiler_version: + - if: osx + then: + - 19 From 32cad4b6e8868f4f623e737a8f16d7dfc0727583 Mon Sep 17 00:00:00 2001 From: memento Date: Wed, 11 Dec 2024 18:00:56 -0600 Subject: [PATCH 25/29] (ref) osx: serail same as keepawake --- recipes/keepawake-rs/build.sh | 12 +++++++----- recipes/serial-monitor-rust/build.sh | 13 +++++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/recipes/keepawake-rs/build.sh b/recipes/keepawake-rs/build.sh index 96751b6..88133d1 100644 --- a/recipes/keepawake-rs/build.sh +++ b/recipes/keepawake-rs/build.sh @@ -6,12 +6,14 @@ export CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER=$CC export CARGO_TARGET_AARCH64_APPLE_DARWIN_LINKER=$CC BINDGEN_EXTRA_CLANG_ARGS="-v ${CPPFLAGS} ${CFLAGS}" -if [[ "${target_platform}" == osx-arm64 ]]; then - BINDGEN_EXTRA_CLANG_ARGS="${BINDGEN_EXTRA_CLANG_ARGS} --target=aarch64-apple-darwin" -else - BINDGEN_EXTRA_CLANG_ARGS="${BINDGEN_EXTRA_CLANG_ARGS} --target=x86_64-apple-darwin13.4.0" +if [[ "${target_platform}" == osx-* ]]; then + if [[ "${target_platform}" == osx-arm64 ]]; then + BINDGEN_EXTRA_CLANG_ARGS="${BINDGEN_EXTRA_CLANG_ARGS} --target=aarch64-apple-darwin" + else + BINDGEN_EXTRA_CLANG_ARGS="${BINDGEN_EXTRA_CLANG_ARGS} --target=x86_64-apple-darwin13.4.0" + fi + export LIBCLANG_PATH=${BUILD_PREFIX}/lib fi -export LIBCLANG_PATH=${BUILD_PREFIX}/lib cargo build --release --all-targets # Skip doc-test which fails to find cc as a linker (odd, since it can build just fine) diff --git a/recipes/serial-monitor-rust/build.sh b/recipes/serial-monitor-rust/build.sh index 920c3f0..22b012e 100644 --- a/recipes/serial-monitor-rust/build.sh +++ b/recipes/serial-monitor-rust/build.sh @@ -2,6 +2,19 @@ set -euxo pipefail +export CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER=$CC +export CARGO_TARGET_AARCH64_APPLE_DARWIN_LINKER=$CC + +BINDGEN_EXTRA_CLANG_ARGS="-v ${CPPFLAGS} ${CFLAGS}" +if [[ "${target_platform}" == osx-* ]]; then + if [[ "${target_platform}" == osx-arm64 ]]; then + BINDGEN_EXTRA_CLANG_ARGS="${BINDGEN_EXTRA_CLANG_ARGS} --target=aarch64-apple-darwin" + else + BINDGEN_EXTRA_CLANG_ARGS="${BINDGEN_EXTRA_CLANG_ARGS} --target=x86_64-apple-darwin13.4.0" + fi + export LIBCLANG_PATH=${BUILD_PREFIX}/lib +fi + cargo build --release --all-targets cargo test --release --all-targets CARGO_TARGET_DIR=target cargo install --path . --root "${PREFIX}" From c3c779ff3ee4359b2416948d507d01c59e274917 Mon Sep 17 00:00:00 2001 From: memento Date: Wed, 11 Dec 2024 18:09:06 -0600 Subject: [PATCH 26/29] (ref) osx: serial same as keepawake --- recipes/serial-monitor-rust/recipe.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/serial-monitor-rust/recipe.yaml b/recipes/serial-monitor-rust/recipe.yaml index 67ee688..a342b29 100644 --- a/recipes/serial-monitor-rust/recipe.yaml +++ b/recipes/serial-monitor-rust/recipe.yaml @@ -20,6 +20,9 @@ requirements: - ${{ compiler('rust') }} - cargo-bundle-licenses - pkg-config + - if: osx + then: + - libclang ${{ c_compiler_version }}.* host: - keepawake-rs - setuptools-rust From c04333fec5c2d0cd71180ecefc2c8c14578b32b2 Mon Sep 17 00:00:00 2001 From: memento Date: Wed, 11 Dec 2024 18:14:21 -0600 Subject: [PATCH 27/29] (ref) osx: variant not working? --- recipes/serial-monitor-rust/recipe.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/serial-monitor-rust/recipe.yaml b/recipes/serial-monitor-rust/recipe.yaml index a342b29..bc6b72d 100644 --- a/recipes/serial-monitor-rust/recipe.yaml +++ b/recipes/serial-monitor-rust/recipe.yaml @@ -1,6 +1,7 @@ context: name: serial-monitor-rust version: "0.3.2" + c_compiler_version: 19 package: name: ${{ name|lower }} From afb7c0022cafac75e62c59d7c0d7317b9df2adae Mon Sep 17 00:00:00 2001 From: memento Date: Wed, 11 Dec 2024 18:31:34 -0600 Subject: [PATCH 28/29] (ref) win: add early fails. add recipe tests --- recipes/serial-monitor-rust/build.bat | 14 ++++++++++---- recipes/serial-monitor-rust/recipe.yaml | 15 ++++++++++++++- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/recipes/serial-monitor-rust/build.bat b/recipes/serial-monitor-rust/build.bat index 674e930..3669f2d 100644 --- a/recipes/serial-monitor-rust/build.bat +++ b/recipes/serial-monitor-rust/build.bat @@ -1,6 +1,12 @@ @echo off -call cargo build --release --all-targets -call cargo test --release --all-targets -call cargo install --path . --root "%PREFIX%" --features="bin" -call cargo-bundle-licenses --format yaml --output "%RECIPE_DIR%\THIRDPARTY.yml" +cargo build --release --all-targets +if %errorlevel% NEQ 0 exit /b %errorlevel% + +cargo test --release --all-targets +if %errorlevel% NEQ 0 exit /b %errorlevel% + +cargo install --path . --root "%PREFIX%" --features="bin" +if %errorlevel% NEQ 0 exit /b %errorlevel% + +cargo-bundle-licenses --format yaml --output "%RECIPE_DIR%\THIRDPARTY.yml" diff --git a/recipes/serial-monitor-rust/recipe.yaml b/recipes/serial-monitor-rust/recipe.yaml index bc6b72d..4477e8b 100644 --- a/recipes/serial-monitor-rust/recipe.yaml +++ b/recipes/serial-monitor-rust/recipe.yaml @@ -32,8 +32,21 @@ requirements: - libudev tests: + - package_contents: + files: + - if: linux or osx + then: + - bin/serial-monitor-rust + - if: win + then: + - bin/serial-monitor-rust.exe - script: - - echo "No tests" + - if: linux or osx + then: + - serial-monitor-rust --help + else: + - serial-monitor-rust.exe --help + about: homepage: https://github.com/hacknus/serial-monitor-rust From af8499c9b57bc6739e7f2238d7f798c07da287e9 Mon Sep 17 00:00:00 2001 From: memento Date: Wed, 11 Dec 2024 21:24:43 -0600 Subject: [PATCH 29/29] (ref) win: compiles but can't install? Let's not test a GUI ... lol --- recipes/serial-monitor-rust/build.bat | 7 ++++--- recipes/serial-monitor-rust/recipe.yaml | 12 +++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/recipes/serial-monitor-rust/build.bat b/recipes/serial-monitor-rust/build.bat index 3669f2d..67caa3d 100644 --- a/recipes/serial-monitor-rust/build.bat +++ b/recipes/serial-monitor-rust/build.bat @@ -1,12 +1,13 @@ @echo off -cargo build --release --all-targets +cargo build --release --all-targets --verbose if %errorlevel% NEQ 0 exit /b %errorlevel% -cargo test --release --all-targets +cargo test --release --all-targets --verbose if %errorlevel% NEQ 0 exit /b %errorlevel% -cargo install --path . --root "%PREFIX%" --features="bin" +set CARGO_TARGET_DIR=target +cargo install --path . --root "%PREFIX%" --verbose if %errorlevel% NEQ 0 exit /b %errorlevel% cargo-bundle-licenses --format yaml --output "%RECIPE_DIR%\THIRDPARTY.yml" diff --git a/recipes/serial-monitor-rust/recipe.yaml b/recipes/serial-monitor-rust/recipe.yaml index 4477e8b..d2035da 100644 --- a/recipes/serial-monitor-rust/recipe.yaml +++ b/recipes/serial-monitor-rust/recipe.yaml @@ -41,11 +41,13 @@ tests: then: - bin/serial-monitor-rust.exe - script: - - if: linux or osx - then: - - serial-monitor-rust --help - else: - - serial-monitor-rust.exe --help + - echo "No tests for GUI applications" + # Better not test the GUI as it fails on linux (no DISPLAY) and hangs on osx + #- if: linux or osx + # then: + # - serial-monitor-rust --help + # else: + # - serial-monitor-rust.exe --help about: