-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
224 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rust_compiler_version: 1.78 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,223 @@ | ||
context: | ||
name: libjaylink | ||
version: "0.4.0" | ||
build_num: 0 | ||
|
||
recipe: | ||
name: libjaylink-split | ||
version: ${{ version }} | ||
|
||
source: | ||
url: https://gitlab.zapb.de/libjaylink/libjaylink/-/archive/${{ version }}/libjaylink-${{ version }}.tar.gz | ||
sha256: 5557d623934a4bbc053c11f9a181375d7abeb76af910696d9e3d9b1de3bf6987 | ||
|
||
build: | ||
number: ${{ build_num }} | ||
skip: | ||
- win | ||
- osx | ||
|
||
cache: | ||
requirements: | ||
build: | ||
- ${{ compiler('c') }} | ||
- ${{ stdlib('c') }} | ||
- autoconf | ||
- automake | ||
# - git | ||
- libtool | ||
- ninja | ||
- pkg-config | ||
host: | ||
- libusb | ||
- meson >=1.1.0 | ||
build: | ||
script: | ||
env: | ||
CONDA_QEMU_USER_ARCHS: ${{ conda_qemu_user_archs }} | ||
CONDA_QEMU_INSTALL_DIR: ${{ conda_local_install_dir }} | ||
content: | ||
- ${RECIPE_DIR}/helpers/build-install.sh | ||
|
||
outputs: | ||
- package: | ||
name: libjaylink-shared-resources | ||
version: ${{ version }} | ||
build: | ||
files: | ||
include: | ||
- include/qemu-plugin.h | ||
- share/qemu/* | ||
- share/qemu/keymaps/* | ||
exclude: | ||
- ${{ conda_local_install_dir }} | ||
script: | ||
#- mamba install -n my -y python=3.10 | ||
- python --version | ||
- python ${RECIPE_DIR}/helpers/install_cached_resources.py "${{ conda_local_install_dir }}" "include" "${{ qemu_include }}" | ||
- python ${RECIPE_DIR}/helpers/install_cached_resources.py "${{ conda_local_install_dir }}" "share/qemu" "${{ qemu_bins }}" | ||
- python ${RECIPE_DIR}/helpers/install_cached_resources.py "${{ conda_local_install_dir }}" "share/qemu/keymaps" "${{ qemu_keymaps }}" | ||
# Only the bin and etc should appear here | ||
- python ${RECIPE_DIR}/helpers/uninstalled_resources.py "${{ conda_local_install_dir }}" || true | ||
tests: | ||
- script: | ||
- python helpers/verify_installed_resources.py "include" "${{ qemu_include }}" | ||
- python helpers/verify_installed_resources.py "share/qemu" "${{ qemu_bins }}" | ||
- python helpers/verify_installed_resources.py "share/qemu/keymaps" "${{ qemu_keymaps }}" | ||
files: | ||
recipe: | ||
- helpers/verify_installed_resources.py | ||
requirements: | ||
run: | ||
- python >=3.10 | ||
|
||
- package: | ||
name: qemu-execve-aarch64 | ||
version: ${{ version }} | ||
build: | ||
files: | ||
include: | ||
- bin/qemu-execve-aarch64 | ||
- etc/conda/activate.d/qemu-execve-aarch64-activate.sh | ||
- etc/conda/deactivate.d/qemu-execve-aarch64-deactivate.sh | ||
exclude: | ||
- ${{ conda_local_install_dir }} | ||
script: | ||
- python ${RECIPE_DIR}/helpers/install_cached_resources.py "${{ conda_local_install_dir }}" "bin" "qemu-execve-aarch64" | ||
- python ${RECIPE_DIR}/helpers/install_cached_resources.py "${{ conda_local_install_dir }}" "etc/conda/activate.d" "qemu-execve-aarch64-activate.sh" | ||
- python ${RECIPE_DIR}/helpers/install_cached_resources.py "${{ conda_local_install_dir }}" "etc/conda/deactivate.d" "qemu-execve-aarch64-deactivate.sh" | ||
requirements: | ||
build: | ||
- ${{ stdlib('c') }} | ||
host: | ||
- ${{ pin_subpackage('qemu-shared-resources', exact=True) }} | ||
run: | ||
- ${{ emulated_c_stdlib }}_linux-aarch64 ${{ emulated_c_stdlib_version }} | ||
tests: | ||
- package_contents: | ||
files: | ||
- bin/qemu-execve-aarch64 | ||
- etc/conda/activate.d/qemu-execve-aarch64-activate.sh | ||
- etc/conda/deactivate.d/qemu-execve-aarch64-deactivate.sh | ||
- script: | ||
interpreter: bash | ||
content: | | ||
test -f ${QEMU_LD_PREFIX}/lib/ld-${{ emulated_c_stdlib_version }}.so | ||
aarch64-conda-linux-gnu-gcc -Wl,-rpath,${QEMU_LD_PREFIX}/lib -Wl,-rpath,${QEMU_LD_PREFIX}/lib64 -L$QEMU_LD_PREFIX/lib64:$QEMU_LD_PREFIX/lib -Wl,--dynamic-linker=$QEMU_LD_PREFIX/lib/ld-${{ emulated_c_stdlib_version }}.so -o hello_from tests/hello_from.c | ||
aarch64-conda-linux-gnu-gcc -Wl,-rpath,${QEMU_LD_PREFIX}/lib -Wl,-rpath,${QEMU_LD_PREFIX}/lib64 -L$QEMU_LD_PREFIX/lib64:$QEMU_LD_PREFIX/lib -Wl,--dynamic-linker=$QEMU_LD_PREFIX/lib/ld-${{ emulated_c_stdlib_version }}.so -o execve_call tests/execve_call.c | ||
|
||
bash helpers/debug-qemu.sh $PREFIX/bin/qemu-execve-aarch64 ./hello_from AARCH64 | ||
qemu-execve-aarch64 ./hello_from AARCH64 | ||
requirements: | ||
run: | ||
- file | ||
- gcc_impl_linux-aarch64 | ||
- gdb | ||
- libcap | ||
- patchelf | ||
- sysroot_linux-aarch64 | ||
- anaconda::strace_${{ target_platform }} | ||
files: | ||
recipe: | ||
- helpers/execute_cmd.py | ||
- helpers/debug-qemu.sh | ||
- tests/hello_from.c | ||
- tests/execve_call.c | ||
|
||
|
||
- package: | ||
name: qemu-execve-ppc64le | ||
version: ${{ version }} | ||
build: | ||
files: | ||
include: | ||
- bin/qemu-execve-ppc64le | ||
- etc/conda/activate.d/qemu-execve-ppc64le-activate.sh | ||
- etc/conda/deactivate.d/qemu-execve-ppc64le-deactivate.sh | ||
exclude: | ||
- ${{ conda_local_install_dir }} | ||
script: | ||
- python ${RECIPE_DIR}/helpers/install_cached_resources.py "${{ conda_local_install_dir }}" "bin" "qemu-execve-ppc64le" | ||
- python ${RECIPE_DIR}/helpers/install_cached_resources.py "${{ conda_local_install_dir }}" "etc/conda/activate.d" "qemu-execve-ppc64le-activate.sh" | ||
- python ${RECIPE_DIR}/helpers/install_cached_resources.py "${{ conda_local_install_dir }}" "etc/conda/deactivate.d" "qemu-execve-ppc64le-deactivate.sh" | ||
requirements: | ||
build: | ||
- ${{ stdlib('c') }} | ||
host: | ||
- ${{ pin_subpackage('qemu-shared-resources', exact=True) }} | ||
run: | ||
- ${{ emulated_c_stdlib }}_linux-ppc64le ${{ emulated_c_stdlib_version }} | ||
tests: | ||
- package_contents: | ||
files: | ||
- bin/qemu-execve-ppc64le | ||
- etc/conda/activate.d/qemu-execve-ppc64le-activate.sh | ||
- etc/conda/deactivate.d/qemu-execve-ppc64le-deactivate.sh | ||
- script: | ||
interpreter: bash | ||
content: | | ||
test -f ${QEMU_LD_PREFIX}/lib/ld-${{ emulated_c_stdlib_version }}.so | ||
powerpc64le-conda-linux-gnu-gcc -Wl,-rpath,${QEMU_LD_PREFIX}/lib -Wl,-rpath,${QEMU_LD_PREFIX}/lib64 -L$QEMU_LD_PREFIX/lib64:$QEMU_LD_PREFIX/lib -Wl,--dynamic-linker=$QEMU_LD_PREFIX/lib/ld-${{ emulated_c_stdlib_version }}.so -o hello_from tests/hello_from.c | ||
powerpc64le-conda-linux-gnu-gcc -Wl,-rpath,${QEMU_LD_PREFIX}/lib -Wl,-rpath,${QEMU_LD_PREFIX}/lib64 -L$QEMU_LD_PREFIX/lib64:$QEMU_LD_PREFIX/lib -Wl,--dynamic-linker=$QEMU_LD_PREFIX/lib/ld-${{ emulated_c_stdlib_version }}.so -o execve_call tests/execve_call.c | ||
bash helpers/debug-qemu.sh $PREFIX/bin/qemu-execve-ppc64le ./hello_from PPC64LE | ||
qemu-execve-ppc64le ./hello_from PPC64LE | ||
requirements: | ||
run: | ||
- file | ||
- gcc_impl_linux-ppc64le | ||
- gdb | ||
- libcap | ||
- patchelf | ||
- sysroot_linux-ppc64le | ||
- anaconda::strace_${{ target_platform }} | ||
files: | ||
recipe: | ||
- helpers/execute_cmd.py | ||
- helpers/debug-qemu.sh | ||
- tests/hello_from.c | ||
- tests/execve_call.c | ||
|
||
|
||
# These tests fail within rattler-build (they worked with conda-build and also work when executed manually from the build_artifacts directory) | ||
# - script: | | ||
# aarch64-conda-linux-gnu-gcc -Wl,-dynamic-linker,${QEMU_LD_PREFIX}/lib/ld-linux-aarch64.so.1 -Wl,-rpath,${QEMU_LD_PREFIX} -o hello_from tests/hello_from.c | ||
# aarch64-conda-linux-gnu-gcc -Wl,-dynamic-linker,${QEMU_LD_PREFIX}/lib/ld-linux-aarch64.so.1 -Wl,-rpath,${QEMU_LD_PREFIX} -o execve_call tests/execve_call.c | ||
# qemu-execve-aarch64 ./hello_from "AARCH64" > hello.txt | ||
# - bash -c 'qemu-execve-aarch64 ./hello_from "AARCH64" > hello.txt' | ||
# - grep "AARCH64" hello.txt || exit 1 | ||
# | ||
# - bash -c 'qemu-execve-aarch64 ./execve_call "/bin/ls" > ls_x86_64.txt 2>&1' || true | ||
# - grep "hello_from" ls_x86_64.txt || exit 1 | ||
# | ||
# - bash -c 'QEMU_EXECVE=${PREFIX}/bin/qemu-execve-aarch64 qemu-execve-aarch64 ./execve_call "/bin/ls" > ls_aarch64.txt 2>&1' || true | ||
# - grep "Invalid ELF image" ls_aarch64.txt || exit 1 | ||
# | ||
# - bash -c 'QEMU_EXECVE=${PREFIX}/bin/qemu-execve-aarch64 qemu-execve-aarch64 ./execve_call "./hello_from" "EXECVE" > execve_call.txt 2>&1' || true | ||
# - grep "EXECVE" execve_call.txt || exit 1 | ||
# files: | ||
# recipe: | ||
# - tests/hello_from.c | ||
# - tests/execve_call.c | ||
# requirements: | ||
# run: | ||
# - gcc_impl_linux-aarch64 | ||
|
||
|
||
|
||
about: | ||
homepage: https://gitlab.zapb.de/libjaylink/libjaylink | ||
summary: 'libjaylink is a shared library written in C to access SEGGER J-Link.' | ||
description: | | ||
libjaylink is a shared library written in C to access SEGGER J-Link and | ||
compatible devices. | ||
license: GPL-2.0-only | ||
license_file: COPYING | ||
repository: https://gitlab.zapb.de/libjaylink/libjaylink | ||
|
||
extra: | ||
recipe-maintainers: | ||
- MementoRC | ||
feedstock-name: libjaylink |