summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororbea <orbea@riseup.net>2022-05-14 18:05:34 -0700
committerSam James <sam@gentoo.org>2022-05-17 01:06:17 +0000
commit0e4bdd6bbebca017d6099c62090116306d1c1a89 (patch)
tree82e944f2ac52ec752abe8c746b5aa374c9da76a7 /dev-util/clippy
parentx11-misc/xdg-utils: add 1.1.3_p20210805 (diff)
downloadgentoo-0e4bdd6bbebca017d6099c62090116306d1c1a89.tar.gz
gentoo-0e4bdd6bbebca017d6099c62090116306d1c1a89.tar.bz2
gentoo-0e4bdd6bbebca017d6099c62090116306d1c1a89.zip
dev-util/clippy: Fix clippy install with slibtool
Installing a file created by libtool is not portable for slibtool and this will result in installing the slibtool shell wrapper script for clippy and not the clippy binary. This additionally fails when compiling net-misc/frr which will use the shell wrapper script that does not work outside of the build directory. The 'make install' target is not appropriate for --enable-clippy-only and fixing that seems like significant work so just use shell instead to find the correct file. I bumped the ebuild revision because this causes a build failure in frr. Bug: https://bugs.gentoo.org/830087 Signed-off-by: orbea <orbea@riseup.net> Closes: https://github.com/gentoo/gentoo/pull/25491 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/clippy')
-rw-r--r--dev-util/clippy/clippy-8.2.2-r1.ebuild46
1 files changed, 46 insertions, 0 deletions
diff --git a/dev-util/clippy/clippy-8.2.2-r1.ebuild b/dev-util/clippy/clippy-8.2.2-r1.ebuild
new file mode 100644
index 000000000000..5b4cdd92cece
--- /dev/null
+++ b/dev-util/clippy/clippy-8.2.2-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_P="frr-${PV}"
+PYTHON_COMPAT=( python3_{8..10} )
+inherit autotools python-single-r1
+
+DESCRIPTION="Standalone clippy tool built from FRR sources"
+HOMEPAGE="https://frrouting.org/"
+SRC_URI="https://github.com/FRRouting/frr/archive/${MY_P}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/frr-${MY_P}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# standalone clippy does not have any tests
+# restrict to prevent bug 811753
+RESTRICT="test"
+
+DEPEND="
+ ${PYTHON_DEPS}
+ virtual/libelf:=
+"
+RDEPEND="${DEPEND}"
+BDEPEND="sys-devel/flex"
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf --enable-clippy-only
+}
+
+src_install() {
+ # 830087
+ find "lib" -type f -name "clippy" -print0 |
+ xargs -0 file | grep executable | grep ELF | cut -f 1 -d : |
+ xargs -I '{}' dobin '{}' ||
+ die "Failed to install 'lib/clippy'"
+}