From 38014b07ae62ffe03a0f47fdf84bbaf5ae5e173a Mon Sep 17 00:00:00 2001 From: Max Howell Date: Mon, 11 Dec 2023 12:28:55 -0500 Subject: [PATCH] wip --- projects/sourceware.org/bzip2/package.yml | 61 +++++++++++++---------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/projects/sourceware.org/bzip2/package.yml b/projects/sourceware.org/bzip2/package.yml index 58fd32a40c..50f4f65c62 100644 --- a/projects/sourceware.org/bzip2/package.yml +++ b/projects/sourceware.org/bzip2/package.yml @@ -9,41 +9,52 @@ versions: provides: - bin/bunzip2 - bin/bzcat + - bin/bzcmp - bin/bzdiff - bin/bzgrep + - bin/bzegrep + - bin/bzfgrep - bin/bzip2 - bin/bzip2recover - bin/bzmore + - bin/bzless build: - script: | - make \ - --environment-overrides \ - --jobs {{ hw.concurrency }} \ + script: + - make + --environment-overrides + --jobs {{ hw.concurrency }} install - case {{ hw.platform }} in - linux) - make \ - --file Makefile-libbz2_so \ - --environment-overrides \ - --jobs {{ hw.concurrency }} - - mv libbz2.*.1.* {{ prefix }}/lib - cd {{ prefix }}/lib - test -e libbz2.so || ln -s libbz2.so.{{ version }} libbz2.so - test -e libbz2.so.{{ version.major }} || ln -s libbz2.so.{{ version }} libbz2.so.{{ version.major }} - ;; - darwin) - cd {{ prefix }}/lib - test -e libbz2.dylib - test -e libbz2.{{version}}.dylib - test -e libbz2.{{version.major}}.dylib - ;; - esac + - if: linux + run: | + make \ + --file Makefile-libbz2_so \ + --environment-overrides \ + --jobs {{ hw.concurrency }} + + mv libbz2.*.1.* {{ prefix }}/lib + cd {{ prefix }}/lib + test -e libbz2.so || ln -s libbz2.so.{{ version }} libbz2.so + test -e libbz2.so.{{ version.major }} || ln -s libbz2.so.{{ version }} libbz2.so.{{ version.major }} + + - if: darwin + run: | + test -e libbz2.dylib + test -e libbz2.{{version}}.dylib + test -e libbz2.{{version.major}}.dylib + working-directory: ${{ prefix }}/lib + + - run: | + for x in *; do + if [ -L $x ]; then + y="$(readlink $x)" + ln -s $(basename "$y") $x + fi + done + working-directory: '{{prefix}}/bin' env: - CFLAGS: -fPIC # so deps link without relocation issues on linux/aarch64 PREFIX: ${{ prefix }} darwin: PKG_VERSION: ${{ version }} @@ -53,4 +64,4 @@ test: OUT=$(echo "$INPUT" | bzip2 | bunzip2) test "$OUT" = "$INPUT" env: - INPUT: tea.xyz + INPUT: tea.xyz.test-string