--- lvm2-2.00.15.ebuild.old 2004-05-15 18:25:21.000000000 +0200 +++ lvm2-2.00.15.ebuild 2004-05-15 18:37:27.000000000 +0200 @@ -15,15 +15,32 @@ !sys-fs/lvm-user" S="${WORKDIR}/${PN/lvm/LVM}.${PV}" +IUSE="static" src_compile() { - econf || die "econf failed" + # Build the static binary first; then the dynamic one... + if [ `use static` ]; then + # make distclean # This does not work + econf --enable-static_link + emake -j1 || die "Failed to compile!" + $CC -o tools/lvm.static tools/*.o -L/lib -L./lib -llvm -ldevmapper -ldl -static || die "Static linking failed!" + fi - # Parallel build doesn't work. - emake -j1 || die "compile problem" + # Dynamic binary + econf --disable-static_link + emake -j1 || die "Failed to compile!" } src_install() { + # Install dynamic things einstall sbindir="${D}/sbin" confdir="${D}/etc/lvm" + + # Make static links + if [ `use static` ]; then + into / + dosbin tools/lvm.static + find ${D}/sbin -type l -exec ln -sf ${D}/sbin/lvm.static {}.static \; + fi + dodoc COPYING* INSTALL README VERSION WHATS_NEW doc/*.{conf,c,txt} }