Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another attempt to package qsv written in rust #24081

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
14 changes: 14 additions & 0 deletions recipes/qsv/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:: check licenses
cargo-bundle-licenses --format yaml --output THIRDPARTY.yml

:: build
cargo install --root "%LIBRARY_PREFIX%" --path . --all-features || goto :error

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peterjc , as I understand it, bld.bat is used to build for Windows.

I'd change this line to:
cargo install --root "$PREFIX" --path . --locked --features feature_capable,apply,generate,foreach,fetch,geocode

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the --all-features option here explains why hashbrown is being built with nightly, as we do have a nightly feature in qsv Cargo.toml.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, I overlooked the Windows options were in a separate file.


:: remove extra build file
del /F /Q "%LIBRARY_PREFIX%\.crates.toml"

goto :EOF

:error
echo Failed with error #%errorlevel%.
exit 1
20 changes: 20 additions & 0 deletions recipes/qsv/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

set -o xtrace -o nounset -o pipefail -o errexit

cargo-bundle-licenses \
--format yaml \
--output THIRDPARTY.yml

# build statically linked binary with Rust
# with different parms for Linux and macOS
os_type=$(echo $OSTYPE | cut -c 1-6)
if [[ "$os_type" == "darwin" ]]; then
export RUST_BACKTRACE=full
cargo install --root "$PREFIX" --path . --no-default-features --locked --target x86_64-apple-darwin --features feature_capable,apply,generate,foreach,fetch,geocode
else
cargo install --root "$PREFIX" --path . --locked --features feature_capable,apply,generate,foreach,fetch,geocode
fi

# remove extra build file
rm -f "${PREFIX}/.crates.toml"
47 changes: 47 additions & 0 deletions recipes/qsv/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{% set version = "0.114.0" %}

package:
name: qsv
version: {{ version }}

source:
url: https://github.com/jqnatividad/qsv/archive/refs/tags/{{ version }}.tar.gz
sha256: 12fa3b54ff805ef9b6e72b29d8355b5b4085a8cda4042a1be790ddd1dca7945b

build:
number: 0
missing_dso_whitelist:
- /lib64/libutil.so.1
- /lib64/libpthread.so.0
- /lib64/libc.so.6
- /lib64/libdl.so.2
- /lib64/librt.so.1
- /lib64/libm.so.6

requirements:
build:

host:
- {{ compiler('rust') }}
- rust >=1.72.0
- {{ compiler('c') }} # [not win]
- {{ compiler('m2w64_c') }} # [win]
- cargo-bundle-licenses
- rust-std-x86_64-apple-darwin # [osx]
run:


test:
commands:
- RUST_BACKTRACE=full qsv --version > /dev/null

about:
home: https://github.com/jqnatividad/qsv
license: MIT
license_file: LICENSE-MIT
summary: A fast CSV toolkit written in Rust, a fork from BurntSushi's XSV.

extra:
recipe-maintainers:
- peterjc
- jqnatividad
Loading