Skip to content

Commit

Permalink
ucsc-bigwigsummary: update macOS build (#50368)
Browse files Browse the repository at this point in the history
* ucsc-bigwigsummary: update macOS build

* edit build.sh

* edit meta.yaml
  • Loading branch information
mencian authored Aug 28, 2024
1 parent e432de9 commit 770b5e6
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 31 deletions.
29 changes: 21 additions & 8 deletions recipes/ucsc-bigwigsummary/build.sh
Original file line number Diff line number Diff line change
@@ -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 -j ${CPU_COUNT})
(cd kent/src/htslib && make -j ${CPU_COUNT})
(cd kent/src/jkOwnLib && make -j ${CPU_COUNT})
(cd kent/src/hg/lib && make -j ${CPU_COUNT})
(cd kent/src/utils/bigWigSummary && make -j ${CPU_COUNT})
cp bin/bigWigSummary "$PREFIX/bin"
chmod +x "$PREFIX/bin/bigWigSummary"

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/bigWigSummary && make CC="${CC}" CFLAGS="${CFLAGS}" -j ${CPU_COUNT})
cp -rf bin/bigWigSummary "$PREFIX/bin"
chmod 0755 "$PREFIX/bin/bigWigSummary"
11 changes: 0 additions & 11 deletions recipes/ucsc-bigwigsummary/htmshell.patch

This file was deleted.

27 changes: 27 additions & 0 deletions recipes/ucsc-bigwigsummary/include.macos.patch
Original file line number Diff line number Diff line change
@@ -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.
27 changes: 15 additions & 12 deletions recipes/ucsc-bigwigsummary/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set package = "ucsc-bigwigsummary" %}
{% set program = "bigWigSummary" %}
{% set version = "448" %}
{% set sha256 = "90c28f06f3f5b6d79ff141cbf745e6a0c1b289a2ce640bbd1b0a14c826f08a85" %}
{% set version = "469" %}
{% set sha256 = "3f95b26ccca854c965c05773481c269f2a0e6fb1906ae8a7fe2437c6ad543963" %}

package:
name: {{ package }}
Expand All @@ -11,12 +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:
number: 1
skip: True # [osx]
run_exports:
- {{ pin_subpackage(package|lower, max_pin=None) }}

Expand All @@ -25,29 +24,33 @@ requirements:
- make
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- binutils # [linux]
- binutils # [linux]
host:
- libpng
- libuuid
- mysql-connector-c
- openssl
- mariadb-connector-c
- libopenssl-static
- clangdev # [osx]
- zlib
run:
- libpng
- libuuid
- mysql-connector-c
- openssl
- mariadb-connector-c
- 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"
home: "https://hgdownload.cse.ucsc.edu/admin/exe"
license: "Varies; see http://genome.ucsc.edu/license"
summary: "Extract summary information from a bigWig file."
dev_url: "https://github.com/ucscGenomeBrowser/kent"
doc_url: "https://github.com/ucscGenomeBrowser/kent/blob/v{{ version }}_base/README"

extra:
additional-platforms:
Expand Down

0 comments on commit 770b5e6

Please sign in to comment.