mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-08 22:52:59 -04:00
dev-go/staticcheck: add ebuilds
Signed-off-by: Randall T. Vasquez <ran.dall@icloud.com>
This commit is contained in:
2
dev-go/staticcheck/Manifest
Normal file
2
dev-go/staticcheck/Manifest
Normal file
@@ -0,0 +1,2 @@
|
||||
DIST staticcheck-0.3.3-deps.tar.xz 8172540 BLAKE2B 2eb71e52ac0f07531787222d121847e2822530828c441c998b9b63582aae6632756d96094897dd03acd7ab1801e56107270671f29b109fd852210deb978014b3 SHA512 7b3216f4f2262f526e26bf20f0028033ea01da6bfa2a03e47ff235032af9d70a16ba80b4e331252039310129940f81334c32e9e1781a5eb888f5017803f723bf
|
||||
DIST staticcheck-0.3.3.tar.gz 703452 BLAKE2B f4b8bf44057a6f011b3c4e34d0c9215c90867417a6929f155d838db909fa9f1b79412b42f04e63076e06d957fc02b2144c40cb7106542a558f90804b8813e544 SHA512 8099facca4f65a2428b503d1b26d0b3c4fd7494788328b4ccf073f4134dd4e7c46184d8c266762489151d2cf47bc48b9a9f7e687c6dca39b24a58dd6cbad4961
|
||||
14
dev-go/staticcheck/manifest
Normal file
14
dev-go/staticcheck/manifest
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>ran.dall@icloud.com</email>
|
||||
<name>Randall Vasquez</name>
|
||||
</maintainer>
|
||||
<longdescription lang="en">
|
||||
The advanced Go linter
|
||||
</longdescription>
|
||||
<upstream>
|
||||
<remote-id type="github">dominikh/go-tools</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
63
dev-go/staticcheck/staticcheck-0.3.3.ebuild
Normal file
63
dev-go/staticcheck/staticcheck-0.3.3.ebuild
Normal file
@@ -0,0 +1,63 @@
|
||||
# Copyright 2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit go-module
|
||||
|
||||
DESCRIPTION="The advanced Go linter"
|
||||
HOMEPAGE="https://staticcheck.io/"
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/dominikh/go-tools.git"
|
||||
RESTRICT="fetch mirror"
|
||||
else
|
||||
SRC_URI="https://github.com/dominikh/go-tools/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
SRC_URI+=" https://github.com/ran-dall/portage-deps/raw/master/${P}-deps.tar.xz"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
RESTRICT="mirror"
|
||||
S="${WORKDIR}/go-tools-${PV}"
|
||||
fi
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
|
||||
IUSE="test"
|
||||
|
||||
DEPEND="dev-lang/go
|
||||
sys-libs/glibc"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND=""
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
git-r3_src_unpack
|
||||
go-module_live_vendor
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
export CGO_ENABLED=1
|
||||
export CGO_CFLAGS="${CFLAGS}"
|
||||
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||
export CGO_LDFLAGS="${LDFLAGS}"
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
mkdir -pv bin || die
|
||||
ego build -ldflags "-linkmode=external" -o bin/"${PN}" "./cmd/staticcheck"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
GOROOT="${BROOT}/usr/lib/go" ego test -v -ldflags "-linkmode=external" ./...
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin bin/"${PN}"
|
||||
}
|
||||
63
dev-go/staticcheck/staticcheck-9999.ebuild
Normal file
63
dev-go/staticcheck/staticcheck-9999.ebuild
Normal file
@@ -0,0 +1,63 @@
|
||||
# Copyright 2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit go-module
|
||||
|
||||
DESCRIPTION="The advanced Go linter"
|
||||
HOMEPAGE="https://staticcheck.io/"
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/dominikh/go-tools.git"
|
||||
RESTRICT="fetch mirror"
|
||||
else
|
||||
SRC_URI="https://github.com/dominikh/go-tools/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
SRC_URI+=" https://github.com/ran-dall/portage-deps/raw/master/${P}-deps.tar.xz"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
RESTRICT="mirror"
|
||||
S="${WORKDIR}/go-tools-${PV}"
|
||||
fi
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
|
||||
IUSE="test"
|
||||
|
||||
DEPEND="dev-lang/go
|
||||
sys-libs/glibc"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND=""
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
git-r3_src_unpack
|
||||
go-module_live_vendor
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
export CGO_ENABLED=1
|
||||
export CGO_CFLAGS="${CFLAGS}"
|
||||
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||
export CGO_LDFLAGS="${LDFLAGS}"
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
mkdir -pv bin || die
|
||||
ego build -ldflags "-linkmode=external" -o bin/"${PN}" "./cmd/staticcheck"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
GOROOT="${BROOT}/usr/lib/go" ego test -v -ldflags "-linkmode=external" ./...
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin bin/"${PN}"
|
||||
}
|
||||
Reference in New Issue
Block a user