Skip to content

Commit

Permalink
app-editors/kakoune-9999: add GCC version check
Browse files Browse the repository at this point in the history
correct usage of pkg-config
  • Loading branch information
Hummer12007 authored and gktrk committed Sep 1, 2016
1 parent 9fefef9 commit 109b632
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions app-editors/kakoune/kakoune-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

EAPI=6

inherit flag-o-matic toolchain-funcs git-r3
inherit flag-o-matic toolchain-funcs git-r3 versionator

DESCRIPTION="Selection-oriented code editor inspired by vim"
HOMEPAGE="https://github.com/mawww/kakoune"
Expand All @@ -17,7 +17,7 @@ IUSE="debug"

RDEPEND="
sys-libs/ncurses:=[unicode]
dev-libs/boost
dev-libs/boost:=
"
DEPEND="
app-text/asciidoc
Expand All @@ -27,9 +27,17 @@ DEPEND="

PATCHES=( "${FILESDIR}/${PN}-makefile.patch" )

pkg_pretend() {
if [[ ${MERGE_TYPE} != binary ]]; then
if tc-is-gcc && ! version_is_at_least 5.0 $(gcc-version); then
die "Clang or GCC >=5.0 is required to build this version"
fi
fi
}

src_configure() {
append-cppflags $(pkg-config --cflags ncursesw)
append-libs $(pkg-config --libs ncursesw)
append-cppflags $($(tc-getPKG_CONFIG) --cflags ncursesw)
append-libs $($(tc-getPKG_CONFIG) --libs ncursesw)
export CXX=$(tc-getCXX)
export debug=$(usex debug)
S="${WORKDIR}/${P}/src"
Expand Down

0 comments on commit 109b632

Please sign in to comment.