summaryrefslogtreecommitdiff
blob: b7ae5b0f010e620b3bf9a8c0745d4f83e6e51b01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit cmake-utils

DESCRIPTION="CommonMark parsing and rendering library and program in C"
HOMEPAGE="https://github.com/jgm/cmark"
SRC_URI="https://github.com/jgm/cmark/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"

DEPEND="
	test? ( || ( dev-lang/python:3.4 dev-lang/python:3.5 ) )"
RDEPEND=""

src_prepare() {
	cmake-utils_src_prepare
	# Remove static library from installing
	sed -i -e \
		s":\${LIBRARY} \${STATICLIBRARY}:\${LIBRARY}:g" \
		src/CMakeLists.txt || die
}

src_configure() {
	local mycmakeargs=(
		-DCMARK_TESTS="$(usex test)"
	)
	cmake-utils_src_configure
}