]> Cypherpunks repositories - bass.git/commitdiff
bfs skel
authorSergey Matveev <stargrave@stargrave.org>
Fri, 14 Jun 2024 21:03:48 +0000 (00:03 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Fri, 14 Jun 2024 21:03:48 +0000 (00:03 +0300)
build/distfiles/.gitignore
build/distfiles/bfs-3.1.3.tar.zst.do [new file with mode: 0644]
build/distfiles/oniguruma-v6.9.9.tar.zst.do [new file with mode: 0644]
build/skel/deskutils/bfs-3.1.3.do [new file with mode: 0644]
build/skel/devel/oniguruma-v6.9.9.do [new file with mode: 0644]
build/skel/sysutils/bfs-skip-mtab.patch [new file with mode: 0644]

index 4325984a03c666b6feef9f39e2f8d4fcd767dd38b68a02612e65a35dc2feddc5..185ab71ede7d9b7f80ab7bcf71f00e40ed691061d92cb6f39a21d4578d3af49c 100644 (file)
@@ -9,6 +9,8 @@
 /automake-1.16.5.tar.xz
 /b3sum-1.5.0.tar.gz
 /bash-5.2.21.tar.gz
+/bfs-3.1.3.tar.zst
+/bfs.git/
 /boost_1_74_0.tar.bz2
 /c-ares-1.30.0.tar.gz
 /cairo-1.16.0.tar.xz
 /npth-1.7.tar.bz2
 /nsxiv-v32-11-g420a0a2.tar.zst
 /nsxiv.git
+/oniguruma-v6.9.9.tar.zst
+/oniguruma.git/
 /openssl-1.1.1w.tar.gz
 /opus-1.5.2.tar.gz
 /opus-tools-0.2.tar.gz
diff --git a/build/distfiles/bfs-3.1.3.tar.zst.do b/build/distfiles/bfs-3.1.3.tar.zst.do
new file mode 100644 (file)
index 0000000..8a5a13a
--- /dev/null
@@ -0,0 +1,7 @@
+[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../..
+sname=$1.do . "$BASS_ROOT"/lib/rc
+[ -d bfs.git ] || git clone --depth 1 --bare https://github.com/tavianator/bfs.git >&2
+cd bfs.git
+commit=a1e288cb6a2482b7acc1edb92eea9d676da0729f
+git fetch origin $commit >&2
+git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
diff --git a/build/distfiles/oniguruma-v6.9.9.tar.zst.do b/build/distfiles/oniguruma-v6.9.9.tar.zst.do
new file mode 100644 (file)
index 0000000..d26373f
--- /dev/null
@@ -0,0 +1,7 @@
+[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../..
+sname=$1.do . "$BASS_ROOT"/lib/rc
+[ -d oniguruma.git ] || git clone --depth 1 --bare https://github.com/kkos/oniguruma.git >&2
+cd oniguruma.git
+commit=e62a8e5ec123bb91651d297e6f72c84d53e3cff8
+git fetch origin $commit >&2
+git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
diff --git a/build/skel/deskutils/bfs-3.1.3.do b/build/skel/deskutils/bfs-3.1.3.do
new file mode 100644 (file)
index 0000000..02323a9
--- /dev/null
@@ -0,0 +1,28 @@
+[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../../..
+sname=$1.do . "$BASS_ROOT"/lib/rc
+. "$BASS_ROOT"/build/skel/common.rc
+
+bdeps="
+rc-paths
+stow
+archivers/zstd
+devel/gmake-4.4.1
+devel/pkgconf-2.1.1
+devel/oniguruma-v6.9.9
+"
+redo-ifchange $bdeps "$DISTFILES"/$NAME.tar.zst
+hsh=$("$BASS_ROOT"/build/bin/cksum $BASS_REV $SPATH)
+. "$BASS_ROOT"/build/lib/create-tmp-for-build.rc
+"$BASS_ROOT"/build/bin/pkg-inst $bdeps
+. ./rc
+$TAR xf "$DISTFILES"/$NAME.tar.zst
+"$BASS_ROOT"/bin/rm-r "$SKELBINS"/$ARCH/$NAME-$hsh
+
+cd $NAME
+patch <"$BASS_ROOT"/build/skel/sysutils/bfs-skip-mtab.patch >&2
+gmake -j$MAKE_JOBS LDFLAGS="-static $LDFLAGS" >&2
+mkdir -p "$SKELBINS"/$ARCH/$NAME-$hsh/bin
+mv bin/bfs "$SKELBINS"/$ARCH/$NAME-$hsh/bin
+
+cd "$SKELBINS"/$ARCH
+"$BASS_ROOT"/build/lib/mk-pkg $NAME-$hsh
diff --git a/build/skel/devel/oniguruma-v6.9.9.do b/build/skel/devel/oniguruma-v6.9.9.do
new file mode 100644 (file)
index 0000000..0c443cd
--- /dev/null
@@ -0,0 +1,21 @@
+[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../../..
+sname=$1.do . "$BASS_ROOT"/lib/rc
+. "$BASS_ROOT"/build/skel/common.rc
+
+bdeps="rc-paths stow archivers/zstd devel/autotools"
+redo-ifchange $bdeps "$DISTFILES"/$NAME.tar.zst
+hsh=$("$BASS_ROOT"/build/bin/cksum $BASS_REV $SPATH)
+. "$BASS_ROOT"/build/lib/create-tmp-for-build.rc
+"$BASS_ROOT"/build/bin/pkg-inst $bdeps
+. ./rc
+$TAR xf "$DISTFILES"/$NAME.tar.zst
+"$BASS_ROOT"/bin/rm-r "$SKELBINS"/$ARCH/$NAME-$hsh
+
+cd $NAME
+autoreconf -vfi >&2
+./configure --prefix="$SKELBINS"/$ARCH/$NAME-$hsh >&2
+make -j$MAKE_JOBS >&2
+make install >&2
+
+cd "$SKELBINS"/$ARCH
+"$BASS_ROOT"/build/lib/mk-pkg $NAME-$hsh
diff --git a/build/skel/sysutils/bfs-skip-mtab.patch b/build/skel/sysutils/bfs-skip-mtab.patch
new file mode 100644 (file)
index 0000000..6e871a0
--- /dev/null
@@ -0,0 +1,27 @@
+From 73195a7349ce90b270a4748177120ae155aa4f53 Mon Sep 17 00:00:00 2001
+From: Sergey Matveev <stargrave@stargrave.org>
+Date: Thu, 10 Feb 2022 15:43:56 +0300
+Subject: [PATCH] Skip mtab
+
+It is used only for -fstype and can stuck when NFS mountpoint is dead.
+---
+ src/ctx.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/ctx.c b/src/ctx.c
+index 0f619c2..600e79b 100644
+--- a/src/ctx.c
++++ b/src/ctx.c
+@@ -81,6 +81,7 @@ fail:
+ const struct bfs_mtab *bfs_ctx_mtab(const struct bfs_ctx *ctx) {
+       struct bfs_ctx *mut = (struct bfs_ctx *)ctx;
++      return mut->mtab;
+       if (mut->mtab_error) {
+               errno = mut->mtab_error;
+
+base-commit: c331357a9d23982f0b6378e3e6c8476f66d1313c
+-- 
+2.45.2
+