Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Dec 11, 2023
1 parent 82152eb commit 38014b0
Showing 1 changed file with 36 additions and 25 deletions.
61 changes: 36 additions & 25 deletions projects/sourceware.org/bzip2/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -53,4 +64,4 @@ test:
OUT=$(echo "$INPUT" | bzip2 | bunzip2)
test "$OUT" = "$INPUT"
env:
INPUT: tea.xyz
INPUT: tea.xyz.test-string

0 comments on commit 38014b0

Please sign in to comment.