1 |
|
# Copyright 1999-2017 Gentoo Foundation
|
|
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI=5
|
|
4 |
EAPI=7
|
5 |
5 |
|
6 |
|
inherit autotools linux-info flag-o-matic eutils
|
|
6 |
inherit autotools linux-info
|
7 |
7 |
|
8 |
8 |
MY_PV=${PV/_/.}-3
|
9 |
9 |
|
10 |
10 |
DESCRIPTION="Device-mapper RAID tool and library"
|
11 |
11 |
HOMEPAGE="https://people.redhat.com/~heinzm/sw/dmraid/"
|
12 |
12 |
SRC_URI="https://people.redhat.com/~heinzm/sw/dmraid/src/${PN}-${MY_PV}.tar.bz2"
|
|
13 |
S="${WORKDIR}/${PN}/${MY_PV}/${PN}"
|
13 |
14 |
|
14 |
15 |
LICENSE="GPL-2"
|
15 |
16 |
SLOT="0"
|
16 |
|
KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86"
|
17 |
|
IUSE="dietlibc intel_led klibc led mini static"
|
18 |
|
REQUIRED_USE="klibc? ( !dietlibc )"
|
19 |
|
|
20 |
|
RDEPEND=">=sys-fs/lvm2-2.02.45
|
21 |
|
klibc? ( dev-libs/klibc )
|
22 |
|
dietlibc? ( dev-libs/dietlibc )"
|
23 |
|
DEPEND="${RDEPEND}
|
24 |
|
virtual/pkgconfig
|
25 |
|
static? ( sys-fs/lvm2[static-libs] )"
|
|
17 |
KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
|
|
18 |
IUSE="intel-led led mini static"
|
26 |
19 |
|
27 |
|
S=${WORKDIR}/${PN}/${MY_PV}/${PN}
|
|
20 |
RDEPEND=">=sys-fs/lvm2-2.02.45[lvm(+)]"
|
|
21 |
DEPEND="
|
|
22 |
${RDEPEND}
|
|
23 |
static? ( sys-fs/lvm2[static-libs] )
|
|
24 |
"
|
|
25 |
BDEPEND="
|
|
26 |
app-arch/tar
|
|
27 |
virtual/pkgconfig
|
|
28 |
"
|
28 |
29 |
|
29 |
30 |
pkg_setup() {
|
30 |
31 |
if kernel_is lt 2 6 ; then
|
... | ... | |
35 |
36 |
}
|
36 |
37 |
|
37 |
38 |
src_prepare() {
|
38 |
|
epatch "${FILESDIR}"/${P}-undo-p-rename.patch \
|
39 |
|
"${FILESDIR}"/${P}-return-all-sets.patch \
|
40 |
|
"${FILESDIR}"/${P}-static-build-fixes.patch
|
|
39 |
eapply -p2 "${FILESDIR}"/${P}-undo-p-rename.patch \
|
|
40 |
"${FILESDIR}"/${P}-return-all-sets.patch
|
|
41 |
eapply -p0 "${FILESDIR}"/${P}-static-build-fixes.patch
|
|
42 |
eapply -p3 "${FILESDIR}"/${P}-parallel-make.patch
|
|
43 |
eapply "${FILESDIR}"/${P}-fix-missing-PATH-MOUNTED.patch
|
|
44 |
eapply "${FILESDIR}"/${PN}-1.0.0_rc16-musl.patch
|
|
45 |
|
41 |
46 |
# pkg_check_modules is not in aclocal.m4 by default, and eautoreconf doesnt add it
|
42 |
47 |
einfo "Appending pkg.m4 from system to aclocal.m4"
|
43 |
|
cat "${ROOT}"/usr/share/aclocal/pkg.m4 >>"${S}"/aclocal.m4 || die "Could not append pkg.m4"
|
44 |
|
epatch_user
|
|
48 |
cat "${BROOT}"/usr/share/aclocal/pkg.m4 >>"${S}"/aclocal.m4 || die "Could not append pkg.m4"
|
|
49 |
|
|
50 |
mv configure.{in,ac} || die
|
|
51 |
|
|
52 |
default
|
|
53 |
|
45 |
54 |
eautoreconf
|
46 |
55 |
|
47 |
56 |
einfo "Creating prepatched source archive for use with Genkernel"
|
48 |
57 |
# archive the patched source for use with genkernel
|
49 |
58 |
cd "${WORKDIR}" || die
|
50 |
59 |
mkdir -p "tmp/${PN}" || die
|
|
60 |
|
51 |
61 |
cp -a "${PN}/${MY_PV}/${PN}" "tmp/${PN}" || die
|
52 |
62 |
mv "tmp/${PN}/${PN}" "tmp/${PN}/${MY_PV}" || die
|
|
63 |
|
53 |
64 |
cd tmp || die
|
54 |
65 |
tar -jcf ${PN}-${MY_PV}-prepatched.tar.bz2 ${PN} || die
|
55 |
66 |
mv ${PN}-${MY_PV}-prepatched.tar.bz2 .. || die
|
56 |
67 |
}
|
57 |
68 |
|
58 |
69 |
src_configure() {
|
59 |
|
econf --with-usrlibdir='${prefix}'/$(get_libdir) \
|
|
70 |
# disable klibc and dietlibc, bug #653392
|
|
71 |
econf \
|
|
72 |
--with-usrlibdir='${prefix}'/$(get_libdir) \
|
|
73 |
--disable-klibc \
|
|
74 |
--disable-dietlibc \
|
60 |
75 |
$(use_enable static static_link) \
|
61 |
76 |
$(use_enable mini) \
|
62 |
77 |
$(use_enable led) \
|
63 |
|
$(use_enable intel_led) \
|
64 |
|
$(use_enable klibc) \
|
65 |
|
$(use_enable dietlibc)
|
66 |
|
}
|
67 |
|
|
68 |
|
src_compile() {
|
69 |
|
emake -j1
|
|
78 |
$(use_enable intel-led intel_led)
|
70 |
79 |
}
|
71 |
80 |
|
72 |
81 |
src_install() {
|
73 |
82 |
emake DESTDIR="${D}" install
|
|
83 |
|
74 |
84 |
dodoc CHANGELOG README TODO KNOWN_BUGS doc/*
|
|
85 |
|
75 |
86 |
insinto /usr/share/${PN}
|
76 |
87 |
doins "${WORKDIR}"/${PN}-${MY_PV}-prepatched.tar.bz2
|
77 |
88 |
}
|