Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfs-progs/
Date: Mon, 07 Nov 2022 04:30:25
Message-Id: 1667793447.44051a8d609bfb639fee627427f47dedb8e6b515.sam@gentoo
1 commit: 44051a8d609bfb639fee627427f47dedb8e6b515
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 7 03:00:26 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 7 03:57:27 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44051a8d
7
8 sys-fs/btrfs-progs: add 6.0.1
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 sys-fs/btrfs-progs/Manifest | 1 +
13 sys-fs/btrfs-progs/btrfs-progs-6.0.1.ebuild | 150 ++++++++++++++++++++++++++++
14 2 files changed, 151 insertions(+)
15
16 diff --git a/sys-fs/btrfs-progs/Manifest b/sys-fs/btrfs-progs/Manifest
17 index 0422ba2e56e1..cf77816302f7 100644
18 --- a/sys-fs/btrfs-progs/Manifest
19 +++ b/sys-fs/btrfs-progs/Manifest
20 @@ -1,4 +1,5 @@
21 DIST btrfs-progs-v5.15.1.tar.xz 2280796 BLAKE2B b460254a6261d3d04a2d265a3b4e05a89385888f7ea4f2b16ec5b73922646c7f47a546fc78ba7c009e65914125435cf38157eabffc74f5d00df2c21c844922e3 SHA512 68ed89e337ae857fdaf077eaa889e259e9f162ea2222bdaa03f4187783a8682c24d45c91b0559b901d81429ba2cd3f84087d032d354092d5512fb226bdf91549
22 DIST btrfs-progs-v5.18.1.tar.xz 2293940 BLAKE2B ce2326cca51a4242895aada860e290c6af69a216dc6369673bb3321ab91bfe1c995fcc37dd0c1e15c8e28aabaedf3d6c9508bde393eb0ba4c7b9327c922f749a SHA512 265a03b0db00a231ad51bb75fb161dee0a7a51cd120a696ca0524f08ef635b18afe43b391fa9889a4a79734ccc3931e4374bd950eb26dc47ddc8482368efed0e
23 DIST btrfs-progs-v5.19.1.tar.xz 2315036 BLAKE2B f1ae6901ddc8236f440d46a950923727c3f6168a220ec2c782102355fabcc2217e9617691550db203391279775d53676a2a7ad1920bfde07f39b3744b7f5fff5 SHA512 17fded8583b7392202b1bb408cbb5d42024623ac15415f95e8e56e27b43be79da6d4e6c191d39db4e5a8948390a7c216c0ea520171b0ab95438cc330084c8398
24 +DIST btrfs-progs-v6.0.1.tar.xz 2318988 BLAKE2B a69dfcfe6c9aa057f118d5bfee2904b14a87facb08380146d35ba427a44f2ca3ed8dd323ddc3bc7eeb31deb5d7e6f8f8f6de4155ccac14457bf17c7fa63a288c SHA512 5ae2d05658719bd983374c62f8bf45f9a4cd5d1e86c8b0bc7df2194e7c308a64b5a7c5ef38cc5b359a84d4e3e8318d363ab831e3956088fd3ef5b66b7b7e6ea5
25 DIST btrfs-progs-v6.0.tar.xz 2317272 BLAKE2B 0d81aefadafaaaf0e535bdb727a376c8476686f3b99b97061fdde75861272474bcc6d6dba3227ba23de621ef5c6afcb38fc8cd9fce32ee0fcb0de046f5dd07d8 SHA512 3ec532c7c96783da11d1c77619bfef87d9d52bf2f6df7bd89c200157052936a2bfd6c961c7e3519e7a12ec611e7b17fb4d6c3f192086bb1b4ebbf87c22cfe24a
26
27 diff --git a/sys-fs/btrfs-progs/btrfs-progs-6.0.1.ebuild b/sys-fs/btrfs-progs/btrfs-progs-6.0.1.ebuild
28 new file mode 100644
29 index 000000000000..73fcf46caa45
30 --- /dev/null
31 +++ b/sys-fs/btrfs-progs/btrfs-progs-6.0.1.ebuild
32 @@ -0,0 +1,150 @@
33 +# Copyright 2008-2022 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=8
37 +
38 +PYTHON_COMPAT=( python3_{8..10} )
39 +
40 +inherit bash-completion-r1 python-single-r1 udev
41 +
42 +libbtrfs_soname=0
43 +
44 +if [[ ${PV} != 9999 ]]; then
45 + MY_PV="v${PV/_/-}"
46 + SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz"
47 +
48 + if [[ ${PV} != *_rc* ]] ; then
49 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
50 + fi
51 +
52 + S="${WORKDIR}"/${PN}-${MY_PV}
53 +else
54 + EGIT_REPO_URI="https://github.com/kdave/btrfs-progs.git"
55 + EGIT_BRANCH="devel"
56 + WANT_LIBTOOL="none"
57 + inherit autotools git-r3
58 +fi
59 +
60 +DESCRIPTION="Btrfs filesystem utilities"
61 +HOMEPAGE="https://btrfs.wiki.kernel.org https://btrfs.readthedocs.io/en/latest/"
62 +
63 +LICENSE="GPL-2"
64 +SLOT="0/${libbtrfs_soname}"
65 +IUSE="+convert python +man reiserfs static static-libs udev +zstd"
66 +# Could support it with just !systemd => eudev, see mdadm, but let's
67 +# see if someone asks for it first.
68 +REQUIRED_USE="static? ( !udev )"
69 +
70 +# Tries to mount repaired filesystems
71 +RESTRICT="test"
72 +
73 +RDEPEND="
74 + dev-libs/lzo:2=
75 + sys-apps/util-linux:=[static-libs(+)?]
76 + sys-libs/zlib:=
77 + convert? (
78 + sys-fs/e2fsprogs:=
79 + reiserfs? (
80 + >=sys-fs/reiserfsprogs-3.6.27
81 + )
82 + )
83 + python? ( ${PYTHON_DEPS} )
84 + udev? ( virtual/libudev:= )
85 + zstd? ( app-arch/zstd:= )
86 +"
87 +DEPEND="${RDEPEND}
88 + >=sys-kernel/linux-headers-5.10
89 + convert? ( sys-apps/acl )
90 + python? (
91 + $(python_gen_cond_dep '
92 + dev-python/setuptools[${PYTHON_USEDEP}]
93 + ')
94 + )
95 + static? (
96 + dev-libs/lzo:2[static-libs(+)]
97 + sys-apps/util-linux:0[static-libs(+)]
98 + sys-libs/zlib:0[static-libs(+)]
99 + convert? (
100 + sys-fs/e2fsprogs[static-libs(+)]
101 + reiserfs? (
102 + >=sys-fs/reiserfsprogs-3.6.27[static-libs(+)]
103 + )
104 + )
105 + zstd? ( app-arch/zstd[static-libs(+)] )
106 + )
107 +"
108 +BDEPEND="virtual/pkgconfig
109 + man? ( dev-python/sphinx )"
110 +
111 +if [[ ${PV} == 9999 ]]; then
112 + BDEPEND+=" sys-devel/gnuconfig"
113 +fi
114 +
115 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
116 +
117 +pkg_setup() {
118 + use python && python-single-r1_pkg_setup
119 +}
120 +
121 +src_prepare() {
122 + default
123 +
124 + if [[ ${PV} == 9999 ]]; then
125 + AT_M4DIR="m4" eautoreconf
126 +
127 + mkdir config || die
128 + local automakedir="$(autotools_run_tool --at-output automake --print-libdir)"
129 + [[ -e ${automakedir} ]] || die "Could not locate automake directory"
130 +
131 + ln -s "${automakedir}"/install-sh config/install-sh || die
132 + ln -s "${BROOT}"/usr/share/gnuconfig/config.guess config/config.guess || die
133 + ln -s "${BROOT}"/usr/share/gnuconfig/config.sub config/config.sub || die
134 + fi
135 +}
136 +
137 +src_configure() {
138 + local myeconfargs=(
139 + --bindir="${EPREFIX}"/sbin
140 +
141 + --enable-lzo
142 + --disable-experimental
143 + $(use_enable convert)
144 + $(use_enable man documentation)
145 + $(use_enable elibc_glibc backtrace)
146 + $(use_enable python)
147 + $(use_enable static-libs static)
148 + $(use_enable udev libudev)
149 + $(use_enable zstd)
150 +
151 + # Could support libgcrypt, libsodium, libkcapi
152 + --with-crypto=builtin
153 + --with-convert=ext2$(usex reiserfs ',reiserfs' '')
154 + )
155 +
156 + econf "${myeconfargs[@]}"
157 +}
158 +
159 +src_compile() {
160 + emake V=1 all $(usev static)
161 +}
162 +
163 +src_install() {
164 + local makeargs=(
165 + $(usex python install_python '')
166 + $(usex static install-static '')
167 + )
168 +
169 + emake V=1 DESTDIR="${D}" install "${makeargs[@]}"
170 +
171 + newbashcomp btrfs-completion btrfs
172 +
173 + use python && python_optimize
174 +}
175 +
176 +pkg_postinst() {
177 + udev_reload
178 +}
179 +
180 +pkg_postrm() {
181 + udev_reload
182 +}