fzf-0.18.0

let's pray that it works
This commit is contained in:
odrling 2019-04-24 00:57:35 +02:00
parent 5e27f792d8
commit 7e86447e05
4 changed files with 1292 additions and 0 deletions

6
app-misc/fzf/Manifest Normal file
View File

@ -0,0 +1,6 @@
DIST fzf-0.18.0.tar.gz 143243 BLAKE2B 39b9d5ce1c41a8d29def0a9a896a930532e2cc54b831ae5b718ed0588a178dce0fcde0b8d916181791340f1c067e6b81006023d020ee74cac2ee893170581dc3 SHA512 70dcda693ed6706f232874550f89cfcdbce1d28360244a728dd0640a4cfbbbd0899601f42c9096197c159cde86e89d287a06905cb5d665bd09b9d01cca2cb754
DIST github.com-golang-crypto-d864b10.tar.gz 1679015 BLAKE2B c97d8dc9089ed1287767aa890a67e997ee3920627f2a6ac04ffae820300c0134119f367eb1a1a031d0bdc2d3259542f430f70161686debbe727d35096c2a06c6 SHA512 19a75fbc48e556e5457be419f1e4ac1755bf77ac6e774981eded776d305492589fc6c51bb61b24ba9132ca142f61d00968f7f28df2a87df4e65a431ddc9ebcec
DIST github.com-golang-sys-953cdad.tar.gz 1355032 BLAKE2B 117c73ebb46b736c5747d4e7e4fd6a67bb33724724259766217743e363d4359f8ddb44ec50707394d2b3f9842df50fba8abc48a7021a15d35a89cc9d524bcb7a SHA512 2be9fe83c5cb252ae915c77dc6e905b5057a70aebd6a9f38cc3fbc85996c486e6ea108ad554c8354be28e5da21932fc1037ea86969322b0d99d2cd40adb53f6f
DIST github.com-mattn-go-isatty-c2a7a6c.tar.gz 3567 BLAKE2B c5c1b883ea583a24aaf7e207461ea54bb56e536695b9a7de1fc7e8376fbbdacd1600d0b59fbc1b96d765493f2db9a8a11fd1d069da5c108cbe89470c0e9190a9 SHA512 aa01330c30691e984586278ba64b9990bfb811c3d9fd66a98cd593e46f3a8e39675fc8ed0892dd03a4f3850e9f03fd9f4b75b2506737c4cc67850eaa1bbd2c93
DIST github.com-mattn-go-runewidth-3ee7d81.tar.gz 19845 BLAKE2B 5512128da165241ee85c1761d86d8a780f5bb57474c66c49ff796a1a7bd3b59ce1dfc2dae04bf8b032f1939fbceacc60355a0eb9ae1fa4619418ed7b934153c7 SHA512 456bb5314164373c8589109f8333e29c397c44e4d9882b544e86b2870a44d75ba397dfb58287908d305c6928b098097decec753701eba5c17192479c900366ac
DIST github.com-mattn-go-shellwords-a72fbe2.tar.gz 4258 BLAKE2B 045e738b3602b6780b9a3e5afccd782d43cf8e47140429711a13a0d648acf16f9636290398fbffed493b9f2dcc947e51efece4eabd73c0404e218e7dc48bc30e SHA512 a4003a2d96fa51cfb93179c5c5d77f1e3cbed02fd61c6b73848e38ca45ba9ebafabe1fc36656d3c576e8f9708b702d397f9afc3c986d24776772a6017bf9746f

View File

@ -0,0 +1,75 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
GOLANG_PKG_IMPORTPATH="github.com/junegunn"
GOLANG_PKG_TAGS="release"
GOLANG_PKG_HAVE_TEST=1
GOLANG_PKG_DEPENDENCIES=(
"github.com/mattn/go-isatty:c2a7a6c" #v0.0.7
"github.com/mattn/go-runewidth:3ee7d81" #v0.0.4
"github.com/mattn/go-shellwords:a72fbe2" #v1.0.5
"github.com/golang/crypto:d864b10 -> golang.org/x"
"github.com/golang/sys:953cdad -> golang.org/x"
)
inherit golang-single bash-completion-r1
DESCRIPTION="A general-purpose command-line fuzzy finder"
LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="tmux neovim vim bash-completion zsh-completion fish-completion"
RDEPEND="bash-completion? ( app-shells/bash )
fish-completion? ( app-shells/fish )
tmux? ( app-misc/tmux )
vim? ( app-editors/vim )
zsh-completion? ( app-shells/zsh )"
src_install() {
golang-single_src_install
doman man/man1/${PN}.1
# Install bash completion files
if use bash-completion; then
newbashcomp shell/completion.bash ${PN}
insinto /etc/profile.d/
newins shell/key-bindings.bash ${PN}.sh
fi
# Install fish completion files
if use fish-completion; then
insinto /usr/share/fish/functions/
newins shell/key-bindings.fish fzf_key_bindings.fish
fi
# Install Neovim plugin
if use neovim; then
insinto /usr/share/nvim/runtime/plugin
doins plugin/${PN}.vim
fi
# Install TMUX utils
if use tmux; then
dobin bin/${PN}-tmux
doman man/man1/${PN}-tmux.1
fi
# Install VIM plugin
if use vim; then
insinto /usr/share/vim/vimfiles/plugin
doins plugin/${PN}.vim
fi
# Install zsh completion files
if use zsh-completion; then
insinto /usr/share/zsh/site-functions
newins shell/completion.zsh _${PN}
insinto /usr/share/zsh/site-contrib/
newins shell/key-bindings.zsh ${PN}.zsh
fi
}

1026
eclass/golang-common.eclass Normal file

File diff suppressed because it is too large Load Diff

185
eclass/golang-single.eclass Normal file
View File

@ -0,0 +1,185 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
# @ECLASS: golang-single.eclass
# @MAINTAINER:
# Mauro Toffanin <toffanin.mauro@gmail.com>
# @AUTHOR:
# Mauro Toffanin <toffanin.mauro@gmail.com>
# @BLURB: An eclass for GoLang packages not installed inside GOPATH/GOBIN.
# @DESCRIPTION:
# This eclass allows to install arbitrary packages written in GoLang which
# don't support being installed inside the Go environment.
# This mostly includes traditional packages (C/C++/GUI) embedding tools written
# in GoLang, and GoLang packages that need to be compiled with GCC instead of
# the standard Go interpreter.
#
# @EXAMPLE:
# Typical ebuild using golang-single.eclass:
#
# @CODE
# EAPI=5
#
# GOLANG_PKG_IMPORTPATH="github.com/captObvious"
# GOLANG_PKG_ARCHIVESUFFIX=".zip"
# GOLANG_PKG_HAVE_TEST
# inherit golang-single qt4-r2
#
# DESCRIPTION="Foo bar application"
# HOMEPAGE="http://example.org/foo/"
#
# LICENSE="MIT"
# KEYWORDS="~amd64 ~x86"
# SLOT="0"
# IUSE="doc qt4"
#
# CDEPEND="
# qt4? (
# dev-qt/qtcore:4
# dev-qt/qtgui:4
# )"
# RDEPEND="${CDEPEND}
# !media-gfx/bar"
# DEPEND="${CDEPEND}
# doc? ( app-doc/doxygen )"
#
# DOCS=(AUTHORS ChangeLog README "Read me.txt" TODO)
#
# PATCHES=(
# "${FILESDIR}/${P}-qt4.patch" # bug 123458
# "${FILESDIR}/${P}-as-needed.patch"
# )
#
# src_install() {
# use doc && HTML_DOCS=("${BUILD_DIR}/apidocs/html/")
# autotools-utils_src_install
# if use examples; then
# dobin "${BUILD_DIR}"/foo_example{1,2,3} \\
# || die 'dobin examples failed'
# fi
# }
#
# @CODE
inherit golang-common
EXPORT_FUNCTIONS src_prepare src_unpack src_configure src_compile src_install src_test
if [[ -z ${_GOLANG_SINGLE_ECLASS} ]]; then
_GOLANG_SINGLE_ECLASS=1
# This eclass uses GOLANG_PKG_IMPORTPATH to populate SRC_URI.
SRC_URI="${SRC_URI:="https://${GOLANG_PKG_IMPORTPATH}/${GOLANG_PKG_NAME}/archive/${GOLANG_PKG_ARCHIVEPREFIX}${GOLANG_PKG_VERSION}${GOLANG_PKG_ARCHIVESUFFIX} -> ${P}${GOLANG_PKG_ARCHIVESUFFIX}"}"
# This eclass uses GOLANG_PKG_DEPENDENCIES associative array to populate SRC_URI
# with the required snapshots of the supplied GoLang dependencies.
if [[ ${#GOLANG_PKG_DEPENDENCIES[@]} -gt 0 ]]; then
for i in ${!GOLANG_PKG_DEPENDENCIES[@]} ; do
# Collects all the tokens of the dependency.
local -A DEPENDENCY=()
while read -d $'\n' key value; do
[[ -z ${key} ]] && continue
DEPENDENCY[$key]="${value}"
done <<-EOF
$( _factorize_dependency_entities "${GOLANG_PKG_DEPENDENCIES[$i]}" )
EOF
# Debug
debug-print "${FUNCNAME}: DEPENDENCY = ${GOLANG_PKG_DEPENDENCIES[$i]}"
debug-print "${FUNCNAME}: importpath = ${DEPENDENCY[importpath]}"
debug-print "${FUNCNAME}: revision = ${DEPENDENCY[revision]}"
# Downloads the archive.
case ${DEPENDENCY[importpath]} in
github*)
SRC_URI+=" https://${DEPENDENCY[importpath]}/archive/${DEPENDENCY[revision]}${GOLANG_PKG_ARCHIVESUFFIX} -> ${DEPENDENCY[importpath]//\//-}-${DEPENDENCY[revision]}${GOLANG_PKG_ARCHIVESUFFIX}"
;;
bitbucket*)
SRC_URI+=" https://${DEPENDENCY[importpath]}/get/${DEPENDENCY[revision]}.zip -> ${DEPENDENCY[importpath]//\//-}-${DEPENDENCY[revision]}.zip"
;;
code.google*)
SRC_URI+=" https://${DEPENDENCY[project_name]}.googlecode.com/archive/${DEPENDENCY[revision]}.tar.gz -> ${DEPENDENCY[importpath]//\//-}-${DEPENDENCY[revision]}.tar.gz"
;;
*) die "This eclass doesn't support '${DEPENDENCY[importpath]}'" ;;
esac
done
fi
# @FUNCTION: golang-single_src_unpack
# @DESCRIPTION:
# Unpack the source archive.
golang-single_src_unpack() {
debug-print-function ${FUNCNAME} "${@}"
default
# Creates S.
mkdir -p "${S%/*}" || die
# Moves main GoLang package from WORKDIR into GOPATH.
if [[ "${GOLANG_PKG_IMPORTPATH}" != "${GOLANG_PKG_IMPORTPATH_ALIAS}" ]]; then
local alias_abspath="${WORKDIR}/gopath/src/${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}"
mkdir -p "${alias_abspath%/*}" || die
mv "${GOLANG_PKG_NAME}-${GOLANG_PKG_VERSION}" "${alias_abspath}"/ || die
else
mv "${GOLANG_PKG_NAME}-${GOLANG_PKG_VERSION}" "${S}"/ || die
fi
}
# @FUNCTION: golang-single_src_prepare
# @DESCRIPTION:
# Prepare source code.
golang-single_src_prepare() {
debug-print-function ${FUNCNAME} "$@"
# Sets up GoLang build environment.
golang_setup
golang-common_src_prepare
}
# @FUNCTION: golang-single_src_configure
# @DESCRIPTION:
# Configure the package.
golang-single_src_configure() {
debug-print-function ${FUNCNAME} "$@"
golang-common_src_configure
}
# @FUNCTION: golang-single_src_compile
# @DESCRIPTION:
# Compiles the package.
golang-single_src_compile() {
debug-print-function ${FUNCNAME} "$@"
golang-common_src_compile
}
# @FUNCTION: golang-single_src_install
# @DESCRIPTION:
# Installs binaries and documents from DOCS or HTML_DOCS arrays.
golang-single_src_install() {
debug-print-function ${FUNCNAME} "$@"
golang-common_src_install
}
# @FUNCTION: golang-single_src_test
# @DESCRIPTION:
# Runs the unit tests for the main package.
golang-single_src_test() {
debug-print-function ${FUNCNAME} "$@"
golang-common_src_test
}
fi