mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
ports: zlib and bzip2
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
diff --git bzip2-clean/Makefile bzip2-workdir/Makefile
|
||||
index f8a1772..3620662 100644
|
||||
--- bzip2-clean/Makefile
|
||||
+++ bzip2-workdir/Makefile
|
||||
@@ -35,7 +35,7 @@ OBJS= blocksort.o \
|
||||
decompress.o \
|
||||
bzlib.o
|
||||
|
||||
-all: libbz2.a bzip2 bzip2recover test
|
||||
+all: libbz2.a bzip2 bzip2recover
|
||||
|
||||
bzip2: libbz2.a bzip2.o
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2
|
||||
@@ -54,20 +54,7 @@ libbz2.a: $(OBJS)
|
||||
|
||||
check: test
|
||||
test: bzip2
|
||||
- @cat words1
|
||||
- ./bzip2 -1 < sample1.ref > sample1.rb2
|
||||
- ./bzip2 -2 < sample2.ref > sample2.rb2
|
||||
- ./bzip2 -3 < sample3.ref > sample3.rb2
|
||||
- ./bzip2 -d < sample1.bz2 > sample1.tst
|
||||
- ./bzip2 -d < sample2.bz2 > sample2.tst
|
||||
- ./bzip2 -ds < sample3.bz2 > sample3.tst
|
||||
- cmp sample1.bz2 sample1.rb2
|
||||
- cmp sample2.bz2 sample2.rb2
|
||||
- cmp sample3.bz2 sample3.rb2
|
||||
- cmp sample1.tst sample1.ref
|
||||
- cmp sample2.tst sample2.ref
|
||||
- cmp sample3.tst sample3.ref
|
||||
- @cat words3
|
||||
+ echo bleh
|
||||
|
||||
install: bzip2 bzip2recover
|
||||
if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
|
||||
@@ -0,0 +1,29 @@
|
||||
name=bzip2
|
||||
revision=1
|
||||
from_source=bzip2
|
||||
imagedeps="base-devel"
|
||||
hostdeps="xgcc xbinutils"
|
||||
deps="mlibc"
|
||||
|
||||
configure() {
|
||||
cp -rpf ${source_dir}/* .
|
||||
sed -i 's@\(ln -s -f \)$(prefix)/bin/@\1@' Makefile
|
||||
sed -i "s@(prefix)/man@(prefix)/share/man@g" Makefile
|
||||
make -f Makefile-libbz2_so CC=x86_64-astral-gcc
|
||||
make clean
|
||||
}
|
||||
|
||||
build() {
|
||||
make -j${parallelism} CC=x86_64-astral-gcc
|
||||
}
|
||||
|
||||
install() {
|
||||
make install PREFIX=${dest_dir}/${prefix}
|
||||
cp -av libbz2.so.* ${dest_dir}/${prefix}/lib
|
||||
ln -sv libbz2.so.1.0.8 ${dest_dir}${prefix}/lib/libbz2.so
|
||||
cp -v bzip2-shared ${dest_dir}/${prefix}/bin/bzip2
|
||||
for i in ${dest_dir}/${prefix}/bin/{bzcat,bunzip2}; do
|
||||
ln -sfv bzip2 $i
|
||||
done
|
||||
rm -fv ${dest_dir}/${prefix}/lib/libbz2.a
|
||||
}
|
||||
+1
-1
@@ -3,7 +3,7 @@ revision=1
|
||||
from_source=tar
|
||||
imagedeps="base-devel"
|
||||
hostdeps="xgcc xbinutils"
|
||||
deps="mlibc xz"
|
||||
deps="mlibc xz bzip2 zlib"
|
||||
|
||||
configure() {
|
||||
cp -rpf ${source_dir}/* .
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
name=zlib
|
||||
revision=1
|
||||
from_source=zlib
|
||||
imagedeps="base-devel"
|
||||
hostdeps="xgcc xbinutils"
|
||||
deps="mlibc"
|
||||
|
||||
configure() {
|
||||
CHOST=x86_64-astral prefix=${prefix} ${source_dir}/configure
|
||||
}
|
||||
|
||||
build() {
|
||||
make -j${parallelism}
|
||||
}
|
||||
|
||||
install() {
|
||||
make install DESTDIR="${dest_dir}"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
name=bzip2
|
||||
version=1.0.8
|
||||
source_method=tarball
|
||||
tarball_url="https://sourceware.org/pub/bzip2/bzip2-${version}.tar.gz"
|
||||
tarball_sha512=083f5e675d73f3233c7930ebe20425a533feedeaaa9d8cc86831312a6581cefbe6ed0d08d2fa89be81082f2a5abdabca8b3c080bf97218a1bd59dc118a30b9f3
|
||||
hostdeps="autoconf automake libtool pkgconfig"
|
||||
|
||||
regenerate() {
|
||||
true
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
name=zlib
|
||||
version=1.3
|
||||
source_method=tarball
|
||||
tarball_url="https://www.zlib.net/zlib-${version}.tar.xz"
|
||||
tarball_sha512=3868ac4da5842dd36c9dad794930675b9082ce15cbd099ddb79c0f6bd20a24aa8f33a123f378f26fe0ae02d91f31f2994dccaac565cedeaffed7b315e6ded2a2
|
||||
hostdeps="autoconf automake libtool pkgconfig"
|
||||
|
||||
regenerate() {
|
||||
true
|
||||
}
|
||||
Reference in New Issue
Block a user