Lines 15-29
Link Here
|
15 |
!sys-fs/lvm-user" |
15 |
!sys-fs/lvm-user" |
16 |
|
16 |
|
17 |
S="${WORKDIR}/${PN/lvm/LVM}.${PV}" |
17 |
S="${WORKDIR}/${PN/lvm/LVM}.${PV}" |
|
|
18 |
IUSE="static" |
18 |
|
19 |
|
19 |
src_compile() { |
20 |
src_compile() { |
20 |
econf || die "econf failed" |
21 |
# Build the static binary first; then the dynamic one... |
|
|
22 |
if [ `use static` ]; then |
23 |
# make distclean # This does not work |
24 |
econf --enable-static_link |
25 |
emake -j1 || die "Failed to compile!" |
26 |
$CC -o tools/lvm.static tools/*.o -L/lib -L./lib -llvm -ldevmapper -ldl -static || die "Static linking failed!" |
27 |
fi |
21 |
|
28 |
|
22 |
# Parallel build doesn't work. |
29 |
# Dynamic binary |
23 |
emake -j1 || die "compile problem" |
30 |
econf --disable-static_link |
|
|
31 |
emake -j1 || die "Failed to compile!" |
24 |
} |
32 |
} |
25 |
|
33 |
|
26 |
src_install() { |
34 |
src_install() { |
|
|
35 |
# Install dynamic things |
27 |
einstall sbindir="${D}/sbin" confdir="${D}/etc/lvm" |
36 |
einstall sbindir="${D}/sbin" confdir="${D}/etc/lvm" |
|
|
37 |
|
38 |
# Make static links |
39 |
if [ `use static` ]; then |
40 |
into / |
41 |
dosbin tools/lvm.static |
42 |
find ${D}/sbin -type l -exec ln -sf ${D}/sbin/lvm.static {}.static \; |
43 |
fi |
44 |
|
28 |
dodoc COPYING* INSTALL README VERSION WHATS_NEW doc/*.{conf,c,txt} |
45 |
dodoc COPYING* INSTALL README VERSION WHATS_NEW doc/*.{conf,c,txt} |
29 |
} |
46 |
} |