Diff conmon-2.1.8 with a conmon-9999

/usr/portage/app-containers/conmon/conmon-9999.ebuild 2024-12-25 14:59:47.043270038 +0300
1
# Copyright 1999-2023 Gentoo Authors
1
# Copyright 1999-2024 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=8
......
8 8
DESCRIPTION="An OCI container runtime monitor"
9 9
HOMEPAGE="https://github.com/containers/conmon"
10 10

  
11
if [[ ${PV} == *9999* ]]; then
11
if [[ ${PV} == 9999* ]]; then
12 12
	inherit git-r3
13 13
	EGIT_REPO_URI="https://github.com/containers/conmon.git"
14 14
else
15 15
	SRC_URI="https://github.com/containers/conmon/archive/v${PV}.tar.gz -> ${P}.tar.gz"
16
	KEYWORDS="amd64 arm64 ~ppc64 ~riscv"
17
	GIT_COMMIT="00e08f4a9ca5420de733bf542b930ad58e1a7e7d"
16
	KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv"
18 17
fi
19 18

  
20 19
LICENSE="Apache-2.0"
......
27 26
	systemd? ( sys-apps/systemd:= )"
28 27
DEPEND="${RDEPEND}"
29 28
BDEPEND="dev-go/go-md2man"
30
PATCHES=(
31
	"${FILESDIR}/conmon-2.1.8-Makefile.patch"
32
)
33 29

  
34 30
src_prepare() {
35 31
	default
36
	if use systemd; then
37
		sed -i -e 's|shell $(PKG_CONFIG) --exists libsystemd.* && echo "0"|shell echo "0"|g;' Makefile || die
38
	else
39
		sed -i -e 's|shell $(PKG_CONFIG) --exists libsystemd.* && echo "0"|shell echo "1"|g;' Makefile || die
40
	fi
41

  
42
	if use seccomp; then
43
		echo -e '#!/usr/bin/env bash\necho "0"' > hack/seccomp-notify.sh || die
44
	else
45
		echo -e '#!/usr/bin/env bash\necho "1"' > hack/seccomp-notify.sh || die
46
	fi
32
	sed -i -e "s|shell.*--exists libsystemd.* && echo \"0\"|shell echo $(usex systemd 0 1)|g;" Makefile || die
33
	echo -e "#!/usr/bin/env bash\necho $(usex seccomp 0 1)" > hack/seccomp-notify.sh || die
47 34
}
48 35

  
49 36
src_compile() {
50 37
	tc-export CC PKG_CONFIG
51
	export PREFIX=${EPREFIX}/usr GOMD2MAN=go-md2man
52
	if [[ ${PV} == *9999* ]]; then
53
		default
54
	else
55
		emake GIT_COMMIT="${GIT_COMMIT}"
56
	fi
38
	export PREFIX="${EPREFIX}/usr" GOMD2MAN=$(command -v go-md2man)
39
	default
57 40
}
58 41

  
59 42
src_install() {
60 43
	default
61 44
	dodir /usr/libexec/podman
62
	dosym ../../bin/"${PN}" /usr/libexec/podman/conmon
45
	dosym ../../bin/"${PN}" /usr/libexec/podman/"${PN}"
63 46
}
Thank you!