From fbc27ac5c441c7dc7e4d4c8293a31058871c1393 Mon Sep 17 00:00:00 2001 From: Joshua Zhuang <71105179+mencian@users.noreply.github.com> Date: Wed, 28 Aug 2024 03:44:32 -0500 Subject: [PATCH] ucsc-fatotwobit: update macOS build (#50369) * ucsc-fatotwobit: update macOS build * try without mariadb --- recipes/ucsc-fatotwobit/build.sh | 29 +++++++++++++----- recipes/ucsc-fatotwobit/htmshell.patch | 11 ------- recipes/ucsc-fatotwobit/include.macos.patch | 27 ++++++++++++++++ recipes/ucsc-fatotwobit/include.patch | 16 +++++----- recipes/ucsc-fatotwobit/meta.yaml | 34 ++++++++++----------- 5 files changed, 72 insertions(+), 45 deletions(-) delete mode 100644 recipes/ucsc-fatotwobit/htmshell.patch create mode 100644 recipes/ucsc-fatotwobit/include.macos.patch diff --git a/recipes/ucsc-fatotwobit/build.sh b/recipes/ucsc-fatotwobit/build.sh index cd1c569ec1e88..017f496c75e0d 100644 --- a/recipes/ucsc-fatotwobit/build.sh +++ b/recipes/ucsc-fatotwobit/build.sh @@ -1,13 +1,26 @@ #!/bin/bash + mkdir -p "$PREFIX/bin" + export MACHTYPE=$(uname -m) -export BINDIR=$(pwd)/bin +export BINDIR="$(pwd)/bin" +export INCLUDE_PATH="${PREFIX}/include" +export LIBRARY_PATH="${PREFIX}/lib" +export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib" +export CFLAGS="${CFLAGS} -O3 ${LDFLAGS}" export L="${LDFLAGS}" + mkdir -p "$BINDIR" -(cd kent/src/lib && make) -(cd kent/src/htslib && make) -(cd kent/src/jkOwnLib && make) -(cd kent/src/hg/lib && make) -(cd kent/src/utils/faToTwoBit && make) -cp bin/faToTwoBit "$PREFIX/bin" -chmod +x "$PREFIX/bin/faToTwoBit" + +if [[ "$(uname)" == Darwin ]]; then + export LDFLAGS="${LDFLAGS} -Wl,-rpath,${PREFIX}/lib" + export CFLAGS="${CFLAGS} -Wno-unused-command-line-argument" +fi + +(cd kent/src/lib && make CC="${CC}" CFLAGS="${CFLAGS}" -j ${CPU_COUNT}) +(cd kent/src/htslib && make CC="${CC}" CFLAGS="${CFLAGS}" -j ${CPU_COUNT}) +(cd kent/src/jkOwnLib && make CC="${CC}" CFLAGS="${CFLAGS}" -j ${CPU_COUNT}) +(cd kent/src/hg/lib && make CC="${CC}" CFLAGS="${CFLAGS}" -j ${CPU_COUNT}) +(cd kent/src/utils/faToTwoBit && make CC="${CC}" CFLAGS="${CFLAGS}" -j ${CPU_COUNT}) +cp -rf bin/faToTwoBit "$PREFIX/bin" +chmod 0755 "$PREFIX/bin/faToTwoBit" diff --git a/recipes/ucsc-fatotwobit/htmshell.patch b/recipes/ucsc-fatotwobit/htmshell.patch deleted file mode 100644 index 1e6f87375ed01..0000000000000 --- a/recipes/ucsc-fatotwobit/htmshell.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- kent/src/lib/htmshell.c 2024-03-27 10:56:44.493892141 +0200 -+++ kent/src/lib/htmshell.c 2024-03-27 10:57:01.073792396 +0200 -@@ -713,7 +713,7 @@ - puts("Status: 400\r"); - puts("Content-Type: text/plain; charset=UTF-8\r"); - puts("\r"); --if (format != NULL && args != NULL) -+if (format != NULL) - { - vfprintf(stdout, format, args); - fprintf(stdout, "\n"); diff --git a/recipes/ucsc-fatotwobit/include.macos.patch b/recipes/ucsc-fatotwobit/include.macos.patch new file mode 100644 index 0000000000000..979f87005a72e --- /dev/null +++ b/recipes/ucsc-fatotwobit/include.macos.patch @@ -0,0 +1,27 @@ +--- a/kent/src/inc/common.mk 2017-11-07 17:46:00.000000000 -0500 ++++ b/kent/src/inc/common.mk 2017-11-13 17:44:51.017090255 -0500 +@@ -17,7 +17,7 @@ + endif + + HG_DEFS=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DMACHTYPE_${MACHTYPE} +-HG_INC+=-I../inc -I../../inc -I../../../inc -I../../../../inc -I../../../../../inc -I$(kentSrc)/htslib ++HG_INC+=-I../inc -I../../inc -I../../../inc -I../../../../inc -I../../../../../inc -I$(kentSrc)/htslib -I${PREFIX}/include + + # to check for Mac OSX Darwin specifics: + UNAME_S := $(shell uname -s) +--- a/kent/src/hg/lib/straw/makefile 2022-10-26 12:00:00.000000000 +0100 ++++ b/kent/src/hg/lib/straw/makefile 2022-10-26 12:00:00.000000000 +0100 +@@ -1,4 +1,4 @@ +-KENT_INC=-I../../../inc ++KENT_INC=-I../../../inc -I${PREFIX}/include + + straw: straw.o cStraw.o + ld -r -o ../straw.o straw.o cStraw.o +--- a/kent/src/utils/expMatrixToBarchartBed/expMatrixToBarchartBed 2018-06-06 02:23:56.000000000 +0200 ++++ b/kent/src/utils/expMatrixToBarchartBed/expMatrixToBarchartBed 2018-06-06 02:23:56.000000000 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python2.7 ++#!/usr/bin/env python + # expMatrixToBarchartBed + """ + Generate a barChart bed6+5 file from a matrix, meta data, and coordinates. diff --git a/recipes/ucsc-fatotwobit/include.patch b/recipes/ucsc-fatotwobit/include.patch index e9c8621194325..2c1e8a7f20226 100644 --- a/recipes/ucsc-fatotwobit/include.patch +++ b/recipes/ucsc-fatotwobit/include.patch @@ -1,5 +1,5 @@ ---- kent/src/inc/common.mk 2017-11-07 17:46:00.000000000 -0500 -+++ kent/src/inc/common.mk 2017-11-13 17:44:51.017090255 -0500 +--- a/kent/src/inc/common.mk 2017-11-07 17:46:00.000000000 -0500 ++++ b/kent/src/inc/common.mk 2017-11-13 17:44:51.017090255 -0500 @@ -17,7 +17,7 @@ endif @@ -9,24 +9,24 @@ # to check for Mac OSX Darwin specifics: UNAME_S := $(shell uname -s) ---- kent/src/inc/common.mk 2022-10-25 12:00:00.000000000 +0100 -+++ kent/src/inc/common.mk 2022-10-25 12:00:00.000000000 +0100 +--- a/kent/src/inc/common.mk 2022-10-25 12:00:00.000000000 +0100 ++++ b/kent/src/inc/common.mk 2022-10-25 12:00:00.000000000 +0100 @@ -147,4 +147,4 @@ - L+=${PREFIX}/lib/libssl.a ${PREFIX}/lib/libcrypto.a -ldl + L+=${PREFIX}/lib/libssl.so ${PREFIX}/lib/libcrypto.so -ldl else ifneq ($(wildcard /opt/local/lib/libssl.a),) L+=/opt/local/lib/libssl.a ---- kent/src/hg/lib/straw/makefile 2022-10-26 12:00:00.000000000 +0100 -+++ kent/src/hg/lib/straw/makefile 2022-10-26 12:00:00.000000000 +0100 +--- a/kent/src/hg/lib/straw/makefile 2022-10-26 12:00:00.000000000 +0100 ++++ b/kent/src/hg/lib/straw/makefile 2022-10-26 12:00:00.000000000 +0100 @@ -1,4 +1,4 @@ -KENT_INC=-I../../../inc +KENT_INC=-I../../../inc -I${PREFIX}/include straw: straw.o cStraw.o ld -r -o ../straw.o straw.o cStraw.o ---- kent/src/utils/expMatrixToBarchartBed/expMatrixToBarchartBed 2018-06-06 02:23:56.000000000 +0200 -+++ kent/src/utils/expMatrixToBarchartBed/expMatrixToBarchartBed 2018-06-06 02:23:56.000000000 +0200 +--- a/kent/src/utils/expMatrixToBarchartBed/expMatrixToBarchartBed 2018-06-06 02:23:56.000000000 +0200 ++++ b/kent/src/utils/expMatrixToBarchartBed/expMatrixToBarchartBed 2018-06-06 02:23:56.000000000 +0200 @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python diff --git a/recipes/ucsc-fatotwobit/meta.yaml b/recipes/ucsc-fatotwobit/meta.yaml index 4a21a851c4e54..492d7f4a37cdd 100644 --- a/recipes/ucsc-fatotwobit/meta.yaml +++ b/recipes/ucsc-fatotwobit/meta.yaml @@ -1,7 +1,7 @@ {% set package = "ucsc-fatotwobit" %} {% set program = "faToTwoBit" %} -{% set version = "455" %} -{% set sha256 = "e458cadad7c4a5c1b8385edafffa1b29380ac725a0c20535bf5a3bab99fe80db" %} +{% set version = "469" %} +{% set sha256 = "3f95b26ccca854c965c05773481c269f2a0e6fb1906ae8a7fe2437c6ad543963" %} package: name: "{{ package }}" @@ -11,15 +11,11 @@ source: url: "http://hgdownload.cse.ucsc.edu/admin/exe/userApps.archive/userApps.v{{ version }}.src.tgz" sha256: "{{ sha256 }}" patches: - - "include.patch" - - htmshell.patch + - include.patch # [linux] + - include.macos.patch # [osx] build: - skip: True # [osx] - number: 2 - ignore_run_exports: - - libpng - - libuuid + number: 1 run_exports: - {{ pin_subpackage("ucsc-fatotwobit", max_pin=None) }} @@ -28,29 +24,31 @@ requirements: - make - {{ compiler('c') }} - {{ compiler('cxx') }} - - binutils # [linux] + - binutils # [linux] host: - libpng - libuuid - mysql-connector-c - - openssl - libopenssl-static - - zlib >=1.3.1,<2.0a0 + - clangdev # [osx] + - zlib run: - libpng - libuuid - mysql-connector-c - - openssl + - libopenssl-static test: commands: - # just check for existence, because the individual packages have no unified behavior - - which {{ program }} + # just check for existence and exec bit, because the individual packages have no unified behavior + - test -x ${PREFIX}/bin/{{ program }} about: - home: "http://hgdownload.cse.ucsc.edu/admin/exe/" - license: "varies; see http://genome.ucsc.edu/license" - summary: "Convert DNA from fasta to 2bit format" + home: "https://hgdownload.cse.ucsc.edu/admin/exe" + license: "Varies; see http://genome.ucsc.edu/license" + summary: "Convert DNA from fasta to 2bit format." + dev_url: "https://github.com/ucscGenomeBrowser/kent" + doc_url: "https://github.com/ucscGenomeBrowser/kent/blob/v{{ version }}_base/README" extra: additional-platforms: