diff options
author | Chen, Chih-Chia <pigfoot@gmail.com> | 2022-09-15 17:29:51 +0800 |
---|---|---|
committer | Chen, Chih-Chia <pigfoot@gmail.com> | 2022-09-15 17:31:13 +0800 |
commit | a752f35230abee4534e3268b9147e4ea8c3a9d2a (patch) | |
tree | 8d9238793af8837a96ca5ef734be0104f34cd7ef | |
parent | [app-misc/dasel] new ebuild (diff) | |
download | pigfoot-a752f35230abee4534e3268b9147e4ea8c3a9d2a.tar.gz pigfoot-a752f35230abee4534e3268b9147e4ea8c3a9d2a.tar.bz2 pigfoot-a752f35230abee4534e3268b9147e4ea8c3a9d2a.zip |
[app-misc/fx] new ebuild
Signed-off-by: Chen, Chih-Chia <pigfoot@gmail.com>
-rw-r--r-- | app-misc/fx/Manifest | 1 | ||||
l--------- | app-misc/fx/fx-24.0.0.ebuild | 1 | ||||
-rw-r--r-- | app-misc/fx/fx-9999.ebuild | 62 |
3 files changed, 64 insertions, 0 deletions
diff --git a/app-misc/fx/Manifest b/app-misc/fx/Manifest new file mode 100644 index 0000000..3e71a9e --- /dev/null +++ b/app-misc/fx/Manifest @@ -0,0 +1 @@ +DIST fx-24.0.0.tar.gz 1033450 BLAKE2B 8f18ba5d9a0057be5b8b0513d7dbbbe9c4ea0efbd26cb734c57a3cdd7ae62f0a76cbbddbe5c12b80484d99e8f3f29d000079b7fa77f44c76997ac90f587cec26 SHA512 d41200db99c0e7ceab0d83f65539dd1032eecb71872e39d156a21eea097c529f9ebe28bc66839ede49351f43ec1ba83b50c3c3f1ad0370d3193490d53b5056c8 diff --git a/app-misc/fx/fx-24.0.0.ebuild b/app-misc/fx/fx-24.0.0.ebuild new file mode 120000 index 0000000..40961c4 --- /dev/null +++ b/app-misc/fx/fx-24.0.0.ebuild @@ -0,0 +1 @@ +fx-9999.ebuild
\ No newline at end of file diff --git a/app-misc/fx/fx-9999.ebuild b/app-misc/fx/fx-9999.ebuild new file mode 100644 index 0000000..e21c764 --- /dev/null +++ b/app-misc/fx/fx-9999.ebuild @@ -0,0 +1,62 @@ +# Copyright 2019-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +EGO_PN="github.com/antonmedv/${PN}" + +inherit go-module + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://${EGO_PN}.git" + EGO_VER="devel" + + src_unpack() { + git-r3_src_unpack + go-module_live_vendor + } +else + EGO_VER="${PV}" + SRC_URI="https://${EGO_PN}/archive/${EGO_VER}.tar.gz -> ${P}.tar.gz" + inherit git-r3 + EGIT_REPO_URI="https://${EGO_PN}.git" + EGIT_COMMIT="${EGO_VER}" + + src_unpack() { + git-r3_src_unpack + go-module_live_vendor + } + + #S="${WORKDIR}/cli-${P}" + KEYWORDS="~amd64 ~x86 ~arm64 ~arm" +fi + +DESCRIPTION="Terminal JSON viewer" +LICENSE="MIT" +SLOT="0/${PVR}" +RESTRICT="mirror" +IUSE="+pie" + +src_compile() { + # -buildmode=pie forces external linking mode, even CGO_ENABLED=0 + # https://github.com/golang/go/issues/18968 + use pie && local build_pie="-buildmode=pie" + + local build_flags="$( echo ${EGO_BUILD_FLAGS} ) $( echo ${build_pie} )" + local ld_flags="$( )" + + # patch version + sed -i "s#version = .*#version = \"${PV}\"#" version.go + + set -- env \ + CGO_ENABLED=0 \ + go build -o "bin/${PN}" -mod=vendor -v -work -x ${build_flags} -ldflags "${ld_flags}" \ + . + echo "$@" + "$@" || die +} + +src_install() { + dobin bin/* +} |