app-shells/blesh: drop 0.4.0_pre3

This commit is contained in:
blackteahamburger 2024-12-07 19:07:44 +08:00 committed by peeweep
parent 686f6a92bf
commit 5d7076de05
5 changed files with 1 additions and 378 deletions

View File

@ -1,2 +0,0 @@
DIST blesh-0.4.0_pre3.tar.gz 2502922 BLAKE2B a26ab9ec1bd7d604b7adda468a32acec2ee5873f0aa0c51da1b92f446d1d1b496cdcc429c7dce0c3d39db5526e9de9ab9502f1012072497719e845e7a84c943a SHA512 7786c8f06f6e153c7736241c30a4004e26f38d3c3600fb1882332b6690da5eda465d3e354612c2b0e285e708ea6784f81fe9de2d5633006ce016949f1c007bac
DIST blesh-contrib-0_pre20230403.tar.gz 32654 BLAKE2B b8bd4d9a9ec96bc9d2d9811368cf181f658b193c20d0a2eed285859a9b1a1bacb4af5bc3d4e5615fa7f9c40e75d2b2a674a043cf48a76455f9087e035ce4fb0c SHA512 1d2712095441b98a08b70096fa9854e90c284ee6e88afd40fe8f73482311e3d47d42facb9c705ceb1ee488ede9c008530d3fc8fa1c099b586b07c6aa6052e46f

View File

@ -1,67 +0,0 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
MY_PV="${PV/_pre/-devel}"
DESCRIPTION="A line editor written in pure Bash with enhanced features"
HOMEPAGE="https://github.com/akinomyoga/ble.sh"
if [[ ${PV} == 9999 ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/akinomyoga/ble.sh.git"
else
GIT_COMMIT_CONTRIB=9700c79eb97b3b5f0f06f7019097dc9d3ee93404
BLESH_CONTRIB_PV="0_pre20230403"
SRC_URI="
https://github.com/akinomyoga/ble.sh/archive/refs/tags/v${MY_PV}.tar.gz -> ${P}.tar.gz
https://github.com/akinomyoga/blesh-contrib/archive/${GIT_COMMIT_CONTRIB}.tar.gz
-> blesh-contrib-${BLESH_CONTRIB_PV}.tar.gz
"
S="${WORKDIR}/ble.sh-${MY_PV}"
KEYWORDS="~amd64"
fi
LICENSE="BSD MIT"
SLOT="0"
IUSE="doc"
RDEPEND=">=app-shells/bash-3.0"
PATCHES=( "${FILESDIR}/${P}-no-git.patch" )
if [[ ${PV} != 9999 ]]; then
PATCHES+=( "${FILESDIR}/${P}-optional-docs.patch" )
fi
src_unpack() {
if [[ ${PV} == 9999 ]] ; then
git-r3_src_unpack
else
default
rmdir "${S}/contrib" || die
mv "${WORKDIR}/blesh-contrib-${GIT_COMMIT_CONTRIB}" "${S}/contrib" || die
fi
}
src_compile() {
emake USE_DOC=$(usex doc)
}
src_install() {
emake install \
USE_DOC=$(usex doc) \
DESTDIR="${D}" \
PREFIX="${EPREFIX}/usr" \
INSDIR_DOC="${ED}/usr/share/doc/${PF}"
insinto /usr/share/blesh/lib
doins "${FILESDIR}/_package.bash"
}
pkg_postinst() {
elog "Remember to enable ble.sh in your ~/.bashrc"
elog "by adding this line at the top of ~/.bashrc:"
elog '[[ $- == *i* ]] && source /usr/share/blesh/ble.sh --noattach'
elog "and add this line at the end of ~/.bashrc:"
elog '[[ ${BLE_VERSION-} ]] && ble-attach'
}

View File

@ -2,34 +2,11 @@
_ble_base_package_type=portage
function _binary_exists {
while (($#)); do
type -t -- "$1" &>/dev/null || return 1
shift
done
}
function ble/base/package:portage/update {
if ((EUID != 0)); then
ble/util/print "Error: Please run as root!" >&2
return 1
fi
if ! _binary_exists qatom || ! _binary_exists pquery; then
ble/util/print "Warning: Unable to check the version of app-shells/blesh: app-portage/portage-utils and/or sys-apps/pkgcore is not installed."
ble/util/print "Assuming non-live package is installed."
emerge -avu app-shells/blesh || return 1
else
if [[ $(qatom --format '%{PV}' $(pquery -I app-shells/blesh)) == 9999 ]]; then
if _binary_exists smart-live-rebuild; then
smart-live-rebuild -f app-shells/blesh || return 1
else
ble/util/print "Error: app-shells/blesh-9999 live package is installed but app-portage/smart-live-rebuild is not installed!" >&2
ble/util/print "Unable to update. Quiting..." >&2
return 1
fi
else
emerge -avu app-shells/blesh || return 1
fi
fi
smart-live-rebuild -f app-shells/blesh || return 1
return 6
}

View File

@ -1,54 +0,0 @@
--- a/ble.pp
+++ b/ble.pp
@@ -76,7 +76,7 @@
# check --help or --version
{
- #%[commit_hash = system("git show -s --format=%h")]
+ #%[commit_hash = "1a5c451c8baa71439a6be4ea0f92750de35a7620"]
#%[ble_version = getenv("FULLVER") + "+" + commit_hash]
#%expand
##%if commit_hash != ""
@@ -1729,7 +1729,7 @@
}
#%$ pwd=$(pwd) q=\' Q="'\''" bash -c 'echo "_ble_base_repository=$q${pwd//$q/$Q}$q"'
-#%$ echo "_ble_base_branch=$(git rev-parse --abbrev-ref HEAD)"
+#%$ echo "_ble_base_branch=\"v0.4.0-devel3\""
_ble_base_repository_url=https://github.com/akinomyoga/ble.sh
#%$ echo "_ble_base_build_git_version=\"$BUILD_GIT_VERSION\""
#%$ echo "_ble_base_build_make_version=\"$BUILD_MAKE_VERSION\""
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -43,10 +43,10 @@
outfiles+=$(OUTDIR)/ble.sh
-include $(OUTDIR)/ble.dep
-$(OUTDIR)/ble.sh: ble.pp GNUmakefile | .git $(OUTDIR)
+$(OUTDIR)/ble.sh: ble.pp GNUmakefile | $(OUTDIR)
DEPENDENCIES_PHONY=1 DEPENDENCIES_OUTPUT="$(@:%.sh=%.dep)" DEPENDENCIES_TARGET="$@" \
FULLVER=$(FULLVER) \
- BUILD_GIT_VERSION="$(shell LANG=C git --version)" \
+ BUILD_GIT_VERSION="2.39.0" \
BUILD_MAKE_VERSION="$(shell LANG=C $(MAKE) --version | head -1)" \
BUILD_GAWK_VERSION="$(GAWK_VERSION)" \
$(MWGPP) $< >/dev/null
@@ -139,7 +139,6 @@
.PHONY: update-contrib
update-contrib contrib/contrib.mk:
- git submodule update --init --recursive
include contrib/contrib.mk
--- a/make_command.sh
+++ b/make_command.sh
@@ -79,7 +79,7 @@
#\
# Source: /ble.pp'
local file
- for file in $(git ls-files src); do
+ for file in $(ls src); do
[[ $file == *.sh ]] || continue
script=$script"\\
# Source: /$file"

View File

@ -1,231 +0,0 @@
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -28,6 +28,13 @@
MWGPP:=$(GAWK) -f make/mwg_pp.awk
+# Note (#D2058): we had used "cp -p xxx out/xxx" to copy files to the build
+# directory, but some filesystem (ecryptfs) has a bug that the subsecond
+# timestamps are truncated causing an issue: make every time copies all the
+# files into the subdirectory `out`. We give up using `cp -p` and instead copy
+# the file with `cp` with the timestamps being the copy time.
+CP := cp
+
#------------------------------------------------------------------------------
# ble.sh
@@ -99,10 +114,11 @@
outfiles += $(OUTDIR)/lib/test-syntax.sh
outfiles += $(OUTDIR)/lib/test-complete.sh
outfiles += $(OUTDIR)/lib/util.bgproc.sh
+
$(OUTDIR)/lib/%.sh: lib/%.sh | $(OUTDIR)/lib
- cp -p $< $@
+ $(CP) $< $@
$(OUTDIR)/lib/%.txt: lib/%.txt | $(OUTDIR)/lib
- cp -p $< $@
+ $(CP) $< $@
$(OUTDIR)/lib/core-syntax.sh: lib/core-syntax.sh lib/core-syntax-ctx.def | $(OUTDIR)/lib
$(MWGPP) $< > $@
$(OUTDIR)/lib/init-msys1.sh: lib/init-msys1.sh lib/init-msys1-helper.c | $(OUTDIR)/lib
@@ -119,20 +135,45 @@
# $(MWGPP) $< > $@
#------------------------------------------------------------------------------
-# documents
+# licenses and documents
+
+outdirs += $(OUTDIR)/licenses $(OUTDIR)/doc
+outfiles-license += $(OUTDIR)/licenses/LICENSE.md
+ifneq ($(USE_DOC),no)
+ outfiles-doc += $(OUTDIR)/doc/README.md
+ outfiles-doc += $(OUTDIR)/doc/README-ja_JP.md
+ outfiles-doc += $(OUTDIR)/doc/CONTRIBUTING.md
+ outfiles-doc += $(OUTDIR)/doc/ChangeLog.md
+ outfiles-doc += $(OUTDIR)/doc/Release.md
+endif
-outdirs += $(OUTDIR)/doc
-outfiles-doc += $(OUTDIR)/doc/README.md
-outfiles-doc += $(OUTDIR)/doc/README-ja_JP.md
-outfiles-doc += $(OUTDIR)/doc/LICENSE.md
-outfiles-doc += $(OUTDIR)/doc/CONTRIBUTING.md
-outfiles-doc += $(OUTDIR)/doc/ChangeLog.md
-outfiles-doc += $(OUTDIR)/doc/Release.md
-$(OUTDIR)/doc/%: % | $(OUTDIR)/doc
- cp -p $< $@
+# Workaround for make-3.81 (#D2065)
+#
+# We want to do something like the following:
+#
+# $(OUTDIR)/license/%.md: %.md | $(OUTDIR)/license
+# $(CP) $< $@
+# $(OUTDIR)/doc/%.md: %.md | $(OUTDIR)/doc
+# $(CP) $< $@
+#
+# However, because of a bug in make-3.81, this rule overrides all the other
+# more detailed patterns such as $(OUTDIR)/doc/contrib/%.md. As a result, even
+# when we want to apply preprocessing to specific file patterns under
+# $(OUTDIR)/doc/%, $(CP) is always is used to install the files. To work
+# around this problem in make-3.81, we need to manually filter the target files
+# whose source files are at the top level in the source tree.
+#
+outfiles-doc-toplevel := \
+ $(filter $(outfiles-doc),$(patsubst %,$(OUTDIR)/doc/%,$(wildcard *.md)))
+$(outfiles-doc-toplevel): $(OUTDIR)/doc/%.md: %.md | $(OUTDIR)/doc
+ $(CP) $< $@
+outfiles-license-toplevel := \
+ $(filter $(outfiles-license),$(patsubst %,$(OUTDIR)/licenses/%,$(wildcard *.md)))
+$(outfiles-license-toplevel): $(OUTDIR)/licenses/%.md: %.md | $(OUTDIR)/licenses
+ $(CP) $< $@
$(OUTDIR)/doc/%: docs/% | $(OUTDIR)/doc
- cp -p $< $@
+ $(CP) $< $@
#------------------------------------------------------------------------------
# contrib
@@ -149,7 +190,7 @@
$(outdirs):
mkdir -p $@
-build: contrib/contrib.mk $(outfiles) $(outfiles-doc)
+build: contrib/contrib.mk $(outfiles) $(outfiles-doc) $(outfiles-license)
.PHONY: build
all: build
@@ -157,25 +198,27 @@
#------------------------------------------------------------------------------
# target "install"
+# Users can specify make variables INSDIR, INSDIR_LICENSE, and INSDIR_DOC to
+# control the install locations. Instead of INSDIR, users may specify DESTDIR
+# and/or PREFIX to automatically set up these variables.
+
ifneq ($(INSDIR),)
- ifeq ($(INSDIR_DOC),)
- INSDIR_DOC := $(INSDIR)/doc
- endif
+ INSDIR_LICENSE := $(INSDIR)/licenses
+ INSDIR_DOC := $(INSDIR)/doc
else
- ifneq ($(filter-out %/,$(DESTDIR)),)
- DESTDIR := $(DESTDIR)/
- endif
-
- ifneq ($(DESTDIR)$(PREFIX),)
- DATA_HOME := $(DESTDIR)$(PREFIX)/share
+ ifneq ($(DESTDIR),)
+ DATADIR := $(abspath $(DESTDIR)/$(PREFIX)/share)
+ else ifneq ($(PREFIX),)
+ DATADIR := $(abspath $(PREFIX)/share)
else ifneq ($(XDG_DATA_HOME),)
- DATA_HOME := $(XDG_DATA_HOME)
+ DATADIR := $(abspath $(XDG_DATA_HOME))
else
- DATA_HOME := $(HOME)/.local/share
+ DATADIR := $(abspath $(HOME)/.local/share)
endif
- INSDIR = $(DATA_HOME)/blesh
- INSDIR_DOC = $(DATA_HOME)/doc/blesh
+ INSDIR := $(DATADIR)/blesh
+ INSDIR_LICENSE := $(DATADIR)/blesh/licenses
+ INSDIR_DOC := $(DATADIR)/doc/blesh
endif
ifneq ($(strip_comment),)
@@ -184,23 +227,32 @@
opt_strip_comment :=
endif
-install: \
- $(outfiles:$(OUTDIR)/%=$(INSDIR)/%) \
- $(outfiles-doc:$(OUTDIR)/doc/%=$(INSDIR_DOC)/%) \
+insfiles := $(outfiles:$(OUTDIR)/%=$(INSDIR)/%)
+insfiles-license := $(outfiles-license:$(OUTDIR)/licenses/%=$(INSDIR_LICENSE)/%)
+insfiles-doc := $(outfiles-doc:$(OUTDIR)/doc/%=$(INSDIR_DOC)/%)
+
+install-files := \
+ $(insfiles) $(insfiles-license) $(insfiles-doc) \
$(INSDIR)/cache.d $(INSDIR)/run
-$(INSDIR)/%: $(OUTDIR)/%
+install: $(install-files)
+uninstall:
+ bash make_command.sh uninstall $(install-files)
+.PHONY: install uninstall
+
+$(insfiles): $(INSDIR)/%: $(OUTDIR)/%
bash make_command.sh install $(opt_strip_comment) "$<" "$@"
-$(INSDIR_DOC)/%: $(OUTDIR)/doc/%
+$(insfiles-license): $(INSDIR_LICENSE)/%: $(OUTDIR)/licenses/%
+ bash make_command.sh install "$<" "$@"
+$(insfiles-doc): $(INSDIR_DOC)/%: $(OUTDIR)/doc/%
bash make_command.sh install "$<" "$@"
$(INSDIR)/cache.d $(INSDIR)/run:
mkdir -p $@ && chmod a+rwxt $@
-.PHONY: install
clean:
- -rm -rf $(outfiles) $(OUTDIR)/ble.dep
+ -rm -rf $(outfiles) $(outfiles-doc) $(outfiles-license) $(OUTDIR)/ble.dep
.PHONY: clean
-dist: $(outfiles)
+dist: $(outfiles) $(outfiles-doc) $(outfiles-license)
FULLVER=$(FULLVER) bash make_command.sh dist $^
.PHONY: dist
--- a/contrib/contrib.mk
+++ b/contrib/contrib.mk
@@ -3,13 +3,17 @@
contrib-subdirs := airline config integration
contrib-outdirs := $(OUTDIR)/contrib $(contrib-subdirs:%=$(OUTDIR)/contrib/%)
contrib-srcfiles := $(wildcard contrib/*.bash $(contrib-subdirs:%=contrib/%/*.bash))
-contrib-outfiles := $(contrib-srcfiles:contrib/%=$(OUTDIR)/contrib/%)
+contrib-datfiles := $(wildcard contrib/*.dat $(contrib-subdirs:%=contrib/%/*.dat))
+contrib-docfiles := $(wildcard contrib/*.md $(contrib-subdirs:%=contrib/%/*.md))
+contrib-outfiles := $(contrib-srcfiles:contrib/%=$(OUTDIR)/contrib/%) $(contrib-datfiles:contrib/%=$(OUTDIR)/contrib/%)
# files
outdirs += $(contrib-outdirs)
outfiles += $(contrib-outfiles)
$(OUTDIR)/contrib/%.bash: contrib/%.bash | $(contrib-outdirs)
- cp -p $< $@
+ $(CP) $< $@
+$(OUTDIR)/contrib/%.dat: contrib/%.dat | $(contrib-outdirs)
+ $(CP) $< $@
define LinkOldIngteration
outfiles += $$(OUTDIR)/contrib/$1.bash
@@ -22,16 +26,18 @@
$(eval $(call LinkOldIngteration,fzf-initialize))
$(eval $(call LinkOldIngteration,fzf-key-bindings))
+# licenses
+
+outdirs += $(OUTDIR)/licenses/contrib
+outfiles-license += $(OUTDIR)/licenses/contrib/LICENSE
+$(OUTDIR)/licenses/contrib/LICENSE: contrib/LICENSE | $(OUTDIR)/licenses/contrib
+ $(CP) $< $@
+
# docs
-outdirs += $(OUTDIR)/doc/contrib
-outfiles-doc += $(OUTDIR)/doc/contrib/LICENSE
-outfiles-doc += $(OUTDIR)/doc/contrib/README-ja.md
-outfiles-doc += $(OUTDIR)/doc/contrib/README.md
-
-# Note (workaround for make-3.81): 当初 $(OUTDIR)/doc/contrib/% に対してルール
-# を記述していたが make-3.81 に於いて正しく適用されない事が分かった。仕方がない
-# ので LICENSE と %.md の二つの規則に分けて書く事にする。
-$(OUTDIR)/doc/contrib/LICENSE: contrib/LICENSE | $(OUTDIR)/doc/contrib
- cp -p $< $@
-$(OUTDIR)/doc/contrib/%.md: contrib/%.md | $(OUTDIR)/doc/contrib
- cp -p $< $@
+
+outdirs += $(OUTDIR)/doc/contrib $(OUTDIR)/doc/contrib/integration
+ifneq ($(USE_DOC),no)
+ outfiles-doc += $(contrib-docfiles:contrib/%=$(OUTDIR)/doc/contrib/%)
+endif
+$(OUTDIR)/doc/contrib/%.md: contrib/%.md | $(OUTDIR)/doc/contrib $(OUTDIR)/doc/contrib/integration
+ $(CP) $< $@