Skip to content

Commit

Permalink
app-editors/vim-qt: minor config workaround for building with -flto
Browse files Browse the repository at this point in the history
This affects all vim packages (braindead configure) but apps build and
run fine with graphite and -flto.

Package-Manager: portage-2.2.24
sarnold committed Nov 9, 2015

Unverified

The email in this signature doesn’t match the committer email.
1 parent a675fc2 commit 622e0ff
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions app-editors/vim-qt/metadata.xml
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
<pkgmetadata>
<herd>qt</herd>
<use>
<flag name="lto">Enable configure workaround for -flto</flag>
<flag name="luajit">Use <pkg>dev-lang/luajit</pkg> instead of <pkg>dev-lang/lua</pkg></flag>
<flag name="racket">Enable support for Scheme using <pkg>dev-lang/racket</pkg></flag>
</use>
12 changes: 11 additions & 1 deletion app-editors/vim-qt/vim-qt-20150102-r1.ebuild
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ fi

LICENSE="vim"
SLOT="0"
IUSE="acl cscope debug lua luajit nls perl python racket ruby"
IUSE="acl cscope debug lua luajit lto nls perl python racket ruby"

REQUIRED_USE="luajit? ( lua )
python? ( ${PYTHON_REQUIRED_USE} )"
@@ -63,6 +63,11 @@ src_prepare() {
}

src_configure() {
if use lto ; then
LDFLAGS_OLD="$LDFLAGS"
local LDFLAGS="${LDFLAGS} -fno-lto -fno-use-linker-plugin"
fi

use debug && append-flags "-DDEBUG"

local myconf="--with-features=huge --disable-gpm --enable-multibyte"
@@ -95,6 +100,11 @@ src_configure() {
fi

econf ${myconf} --enable-gui=qt --with-vim-name=qvim --with-modified-by=Gentoo-${PVR}

if use lto ; then
LDFLAGS="${LDFLAGS_OLD}"
sed -i -e "s|-fno-lto -fno-use-linker-plugin||g" src/auto/config.mk
fi
}

src_install() {

0 comments on commit 622e0ff

Please sign in to comment.