From 8f2ec10e6433deacc3f37a4d7b54fd3cb969ee2b Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Sat, 25 May 2024 13:15:27 +0200 Subject: [PATCH 1/8] update build --- recipes/d4binding/meta.yaml | 2 +- recipes/d4tools/meta.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/d4binding/meta.yaml b/recipes/d4binding/meta.yaml index cbbb959e092d6..1dd5ae4074258 100644 --- a/recipes/d4binding/meta.yaml +++ b/recipes/d4binding/meta.yaml @@ -5,7 +5,7 @@ package: version: {{ version }} build: - number: 1 + number: 2 source: # TODO: use formal release number when 0.3.5 is released diff --git a/recipes/d4tools/meta.yaml b/recipes/d4tools/meta.yaml index 239cb6310566d..7bb6992873fc5 100644 --- a/recipes/d4tools/meta.yaml +++ b/recipes/d4tools/meta.yaml @@ -5,7 +5,7 @@ package: version: {{ version }} build: - number: 1 + number: 2 source: url: https://github.com/38/d4-format/archive/refs/tags/d4tools-v{{ version }}.tar.gz From 44c6ba17cfb9a3b0ac03ea8f78b85b32c7cf0b8b Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Sat, 25 May 2024 14:05:45 +0200 Subject: [PATCH 2/8] fix lint --- build-fail-blacklist | 3 --- recipes/d4binding/meta.yaml | 2 ++ recipes/d4tools/meta.yaml | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build-fail-blacklist b/build-fail-blacklist index d97aaf7798667..f03fdf69f80ed 100644 --- a/build-fail-blacklist +++ b/build-fail-blacklist @@ -1043,9 +1043,6 @@ recipes/perl-gd # sha mismatch when downloading source recipes/fmlrc2 -# tries to download zlib itself, which fails -recipes/d4binding - # no matching package named `quickersort` found recipes/mudskipper diff --git a/recipes/d4binding/meta.yaml b/recipes/d4binding/meta.yaml index 1dd5ae4074258..91f7672a91e21 100644 --- a/recipes/d4binding/meta.yaml +++ b/recipes/d4binding/meta.yaml @@ -6,6 +6,8 @@ package: build: number: 2 + run_exports: + - {{ pin_subpackage("d4binding", max_pin="x.x.x") }} source: # TODO: use formal release number when 0.3.5 is released diff --git a/recipes/d4tools/meta.yaml b/recipes/d4tools/meta.yaml index 7bb6992873fc5..4b7bdfe1cbdab 100644 --- a/recipes/d4tools/meta.yaml +++ b/recipes/d4tools/meta.yaml @@ -6,6 +6,8 @@ package: build: number: 2 + run_exports: + - {{ pin_subpackage("d4tools", max_pin="x.x.x") }} source: url: https://github.com/38/d4-format/archive/refs/tags/d4tools-v{{ version }}.tar.gz From 6cc327afb2d0923baf71534b841d8d84f9e04157 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Sat, 25 May 2024 18:42:19 +0200 Subject: [PATCH 3/8] update build --- recipes/d4binding/build.sh | 2 + recipes/d4binding/build_htslib.sh | 63 +++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 recipes/d4binding/build_htslib.sh diff --git a/recipes/d4binding/build.sh b/recipes/d4binding/build.sh index 564717ff7b0ef..2a880e7b38a02 100644 --- a/recipes/d4binding/build.sh +++ b/recipes/d4binding/build.sh @@ -8,5 +8,7 @@ export \ CARGO_NET_GIT_FETCH_WITH_CLI=true \ CARGO_HOME="${BUILD_PREFIX}/.cargo" +cp $RECIPE_DIR/build_htslib.sh ${PACKAGE_HOME}/d4-hts/build_htslib.sh + cd d4binding ./install.sh diff --git a/recipes/d4binding/build_htslib.sh b/recipes/d4binding/build_htslib.sh new file mode 100644 index 0000000000000..e3a214a0d2ec0 --- /dev/null +++ b/recipes/d4binding/build_htslib.sh @@ -0,0 +1,63 @@ +#!/bin/bash + +if [ "${DOCS_RS}" = "1" ] +then + exit 0 +fi + +set -ex + +pushd ${OUT_DIR} + +HTSLIB_VERSION=${1} + +rm -rf ${OUT_DIR}/htslib + +git clone -b ${HTSLIB_VERSION} http://github.com/samtools/htslib.git + +cd htslib + +cat > config.h << CONFIG_H +#define HAVE_LIBBZ2 1 +#define HAVE_DRAND48 1 +CONFIG_H + +perl -i -pe 's/hfile_libcurl\.o//g' Makefile + +function is_musl() { + if [ ! -z $(echo $TARGET | grep musl) ]; then + return 0 + else + return 1 + fi +} + +is_musl && perl -i -pe 's/gcc/musl-gcc/g' Makefile + + +if [ "x${ZLIB_SRC}" != "x" ] +then + tar xz ${ZLIB_SRC} +else + curl -L 'http://github.com/madler/zlib/archive/refs/tags/v1.2.11.tar.gz' | tar xz +fi +cd zlib-1.2.11 +is_musl && CC=musl-gcc ./configure || ./configure +make libz.a +cp libz.a .. +cd .. + +#The original file in the repo is lacking -L in the curl command so it doen't work +curl -L http://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz | tar xz +cd bzip2-1.0.8 +is_musl && perl -i -pe 's/gcc/musl-gcc/g' Makefile +is_musl || perl -i -pe 's/CFLAGS=/CFLAGS=-fPIC /g' Makefile +make +cp libbz2.a .. +cd .. + +perl -i -pe 's/CPPFLAGS =/CPPFLAGS = -Izlib-1.2.11 -Ibzip2-1.0.8/g' Makefile + +is_musl || perl -i -pe 's/CFLAGS *=/CFLAGS = -fPIC/g' Makefile + +make -j8 lib-static \ No newline at end of file From 0a488a15adc38de14bbad5f5b9bf18724defe2d3 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Sat, 25 May 2024 19:46:58 +0200 Subject: [PATCH 4/8] update path --- recipes/d4binding/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/d4binding/build.sh b/recipes/d4binding/build.sh index 2a880e7b38a02..7a4df4b5c893a 100644 --- a/recipes/d4binding/build.sh +++ b/recipes/d4binding/build.sh @@ -8,7 +8,7 @@ export \ CARGO_NET_GIT_FETCH_WITH_CLI=true \ CARGO_HOME="${BUILD_PREFIX}/.cargo" -cp $RECIPE_DIR/build_htslib.sh ${PACKAGE_HOME}/d4-hts/build_htslib.sh +cp $RECIPE_DIR/build_htslib.sh d4-hts/build_htslib.sh cd d4binding ./install.sh From 6755d94352608b53bb02fe5a8f6cddcb2513c46f Mon Sep 17 00:00:00 2001 From: mencian Date: Tue, 22 Oct 2024 19:04:32 -0500 Subject: [PATCH 5/8] bump d4tools build number --- recipes/d4tools/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/d4tools/meta.yaml b/recipes/d4tools/meta.yaml index 185f9b3671124..2060fe4057ea6 100644 --- a/recipes/d4tools/meta.yaml +++ b/recipes/d4tools/meta.yaml @@ -9,7 +9,7 @@ source: sha256: 376e61c93cfe2efc15f5e74b75214e065e278146555e67b8769818bf49594726 build: - number: 0 + number: 1 run_exports: - {{ pin_subpackage('d4tools', max_pin="x.x") }} From 2d51e68c9dc520d93f8842eae9919aebfb044a16 Mon Sep 17 00:00:00 2001 From: mencian Date: Tue, 22 Oct 2024 22:21:56 -0500 Subject: [PATCH 6/8] bump d4binding to 0.3.11 --- recipes/d4binding/build.sh | 8 +------- recipes/d4binding/meta.yaml | 24 ++++++++++++++---------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/recipes/d4binding/build.sh b/recipes/d4binding/build.sh index 7a4df4b5c893a..b76d698a699f3 100644 --- a/recipes/d4binding/build.sh +++ b/recipes/d4binding/build.sh @@ -2,13 +2,7 @@ set -x -# TODO: Remove the following export when pinning is updated and we use -# {{ compiler('rust') }} in the recipe. -export \ - CARGO_NET_GIT_FETCH_WITH_CLI=true \ - CARGO_HOME="${BUILD_PREFIX}/.cargo" - cp $RECIPE_DIR/build_htslib.sh d4-hts/build_htslib.sh cd d4binding -./install.sh +./install.sh PREFIX="${PREFIX}" diff --git a/recipes/d4binding/meta.yaml b/recipes/d4binding/meta.yaml index 91f7672a91e21..4113cf05e7a61 100644 --- a/recipes/d4binding/meta.yaml +++ b/recipes/d4binding/meta.yaml @@ -1,31 +1,32 @@ -{% set version = "0.3.4" %} +{% set name = "d4binding" %} +{% set version = "0.3.11" %} package: - name: d4binding + name: {{ name }} version: {{ version }} build: - number: 2 + number: 0 run_exports: - - {{ pin_subpackage("d4binding", max_pin="x.x.x") }} + - {{ pin_subpackage("d4binding", max_pin="x.x") }} source: - # TODO: use formal release number when 0.3.5 is released - url: https://github.com/38/d4-format/archive/refs/tags/v{{ version }}-3.tar.gz - sha256: 05e1a410b77c34d7d188e69ef607eaa9f0babcc9817c558362203fc3f1f2219c + url: https://github.com/38/d4-format/archive/refs/tags/v{{ version }}.tar.gz + sha256: 376e61c93cfe2efc15f5e74b75214e065e278146555e67b8769818bf49594726 requirements: build: - {{ compiler('c') }} - {{ compiler('cxx') }} - - rust >=1.30 - - gcc #[not osx] + - {{ compiler('rust') }} + - gcc # [not osx] - clangdev - pkg-config - make - cmake run: - starcode + test: commands: - "true" @@ -33,8 +34,11 @@ test: about: home: https://github.com/38/d4-format license: MIT + license_family: MIT summary: | - The C/C++ binding for the D4 file format + The C/C++ binding for the D4 file format. + dev_url: https://github.com/38/d4-format + extra: recipe-maintainers: - haohou From 1934ecda6856fc57c35f1b5eee41f694d822fcc0 Mon Sep 17 00:00:00 2001 From: mencian Date: Tue, 22 Oct 2024 22:23:40 -0500 Subject: [PATCH 7/8] clean up recipe --- recipes/d4tools/meta.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/d4tools/meta.yaml b/recipes/d4tools/meta.yaml index 2060fe4057ea6..17f8a4c9838dc 100644 --- a/recipes/d4tools/meta.yaml +++ b/recipes/d4tools/meta.yaml @@ -1,7 +1,8 @@ +{% set name = "d4tools" %} {% set version = "0.3.11" %} package: - name: d4tools + name: {{ name }} version: {{ version }} source: @@ -35,7 +36,7 @@ about: license: MIT license_family: MIT summary: | - The D4 command line utility program + The D4 command line utility program. dev_url: https://github.com/38/d4-format extra: From 387ff98787c5310e6a75487f3b5c5db150d6e4f8 Mon Sep 17 00:00:00 2001 From: mencian Date: Tue, 22 Oct 2024 23:15:44 -0500 Subject: [PATCH 8/8] clean up recipe --- recipes/d4binding/build.sh | 8 +++++++- recipes/d4binding/meta.yaml | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/recipes/d4binding/build.sh b/recipes/d4binding/build.sh index b76d698a699f3..463bbbe302d53 100644 --- a/recipes/d4binding/build.sh +++ b/recipes/d4binding/build.sh @@ -2,7 +2,13 @@ set -x +# TODO: Remove the following export when pinning is updated and we use +# {{ compiler('rust') }} in the recipe. +export \ + CARGO_NET_GIT_FETCH_WITH_CLI=true \ + CARGO_HOME="${BUILD_PREFIX}/.cargo" + cp $RECIPE_DIR/build_htslib.sh d4-hts/build_htslib.sh cd d4binding -./install.sh PREFIX="${PREFIX}" +./install.sh diff --git a/recipes/d4binding/meta.yaml b/recipes/d4binding/meta.yaml index 4113cf05e7a61..a5507dd7ca35d 100644 --- a/recipes/d4binding/meta.yaml +++ b/recipes/d4binding/meta.yaml @@ -18,7 +18,7 @@ requirements: build: - {{ compiler('c') }} - {{ compiler('cxx') }} - - {{ compiler('rust') }} + - rust >=1.30 - gcc # [not osx] - clangdev - pkg-config