Files
gentoo-zh/app-shells/gitstatus/gitstatus-1.5.4.ebuild
T
HougeLangley d966ecfa3a Bump version and fixed headers years:
1. app-vim/easymotion: bump to 3.0.1 (need build and install test)
close: [nvchecker] app-vim/easymotion can be bump to 3.0.1 #2073
close: [nvchecker] app-vim/easymotion can be bump to 3.0.1 #1851
2. dev-cpp/nameof: bump to 0.10.2 (need build and install test)
close: [nvchecker] dev-cpp/nameof can be bump to 0.10.2 #2085
3. dev-cpp/tgbot-cpp: bump to 1.5 (need build and install test)
close: [nvchecker] dev-cpp/tgbot-cpp can be bump to 1.5 #2325
4. dev-db/dbeaver-bin: bump to 22.3.1 (need build and install test)
close: [nvchecker] dev-db/dbeaver-bin can be bump to 22.3.1 #2311
5. dev-db/mongodb: bump to 6.2.0-rc4 (need build and install test)
close: no issue need close
6. dev-libs/libdwarf: bump to 20150507 (need build and install test)
close: no issue need close
7. net-proxy/clash-verge-bin: bump to 1.2.1 (need build and install test)
close: no issue need close
2023-01-06 20:24:44 +08:00

108 lines
2.5 KiB
Bash

# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake flag-o-matic git-r3
DESCRIPTION="Git status for Bash and Zsh prompt"
HOMEPAGE="https://github.com/romkatv/gitstatus"
SRC_URI="https://github.com/romkatv/gitstatus/archive/v${PV}.tar.gz -> ${P}.tar.gz"
# LIBGIT2_TAG depends on pkgver. They must be updated together. See libgit2_version in:
# https://raw.githubusercontent.com/romkatv/gitstatus/v${pkgver}/build.info
LIBGIT2_TAG="tag-5860a42d19bcd226cb6eff2dcbfcbf155d570c73"
EGIT_REPO_URI="https://github.com/romkatv/libgit2"
EGIT_COMMIT="${LIBGIT2_TAG}"
EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/deps"
BUILD_DIR="${EGIT_CHECKOUT_DIR}_BUILD"
CMAKE_USE_DIR="${EGIT_CHECKOUT_DIR}"
IUSE="zsh-completion"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
DEPEND="zsh-completion? ( app-shells/zsh )"
RDEPEND="${DEPEND}"
src_unpack() {
if [[ -n ${A} ]]; then
unpack ${A}
fi
git-r3_fetch
git-r3_checkout
}
src_configure() {
mycmakeargs=(
-DCMAKE_BUILD_TYPE=Release
-DZERO_NSEC=ON
-DTHREADSAFE=ON
-DUSE_BUNDLED_ZLIB=ON
-DREGEX_BACKEND=builtin
-DUSE_HTTP_PARSER=builtin
-DUSE_SSH=OFF
-DUSE_HTTPS=OFF
-DBUILD_CLAR=OFF
-DUSE_GSSAPI=OFF
-DUSE_NTLMCLIENT=OFF
-DBUILD_SHARED_LIBS=OFF
)
cmake_src_configure
}
src_compile() {
append-cflags $(test-flags-CC -fno-plt)
cmake_src_compile
local cxxflags=(
"-I${EGIT_CHECKOUT_DIR}/include"
-DGITSTATUS_ZERO_NSEC
-D_GNU_SOURCE
)
local ldflags=(
"-L${BUILD_DIR}"
-static
)
append-cxxflags "${cxxflags[@]}"
append-ldflags "${ldflags[@]}"
emake all
GITSTATUS_DAEMON= GITSTATUS_CACHE_DIR=${S}/usrbin ./install
if use zsh-completion; then
for file in *.zsh install; do
zsh -fc "emulate zsh -o no_aliases && zcompile -R -- $file.zwc $file" || die "Couldn't zcompile"
done
fi
}
src_install() {
insinto "/usr/share/${PN}"
exeinto "${_}"
doins gitstatus.*.sh *.info
if use zsh-completion; then
doins gitstatus.*.zsh{,.zwc}
fi
doexe install
exeinto "/usr/libexec/${PN}"
doexe usrbin/gitstatusd
dosym "../../../libexec/${PN}/gitstatusd" \
"/usr/share/${PN}/usrbin/gitstatusd"
dodoc {README,docs/listdir}.md
}
pkg_postinst() {
elog "The easiest way to take advantage of gitstatus from Zsh is to use a theme"
elog "that's already integrated with it. For example: app-shells/zsh-theme-powerlevel10k"
elog "The easiest way to take advantage of gitstatus from Bash is via gitstatus.prompt.sh."
elog "Follow this guide: https://github.com/romkatv/gitstatus#using-from-bash"
}