summaryrefslogtreecommitdiff
blob: 624d696ce239255f0fbf8e392cb48b9263f65146 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit toolchain-funcs flag-o-matic

DESCRIPTION="Persistent Memory Development Kit"
HOMEPAGE="https://pmem.io/ https://github.com/pmem/pmdk"
SRC_URI="https://github.com/pmem/pmdk/releases/download/${PV}/${P}.tar.gz"

LICENSE="BSD"
SLOT="0/1"
KEYWORDS="~amd64"

DEPEND="
	sys-block/ndctl:=
	sys-block/libfabric:=
"
RDEPEND="${DEPEND}"
BDEPEND="
	virtual/pandoc
	virtual/pkgconfig
"

DOCS=(
	CODING_STYLE.md
	CONTRIBUTING.md
	ChangeLog
	README.md
)

src_prepare() {
	default

	# don't pre-compress man pages
	sed -e 's/:=.gz//g ; s:gzip -nc:cat:g' -i doc/Makefile || die

	# remove -Werror
	find . -name 'Makefile*' -type f -print | xargs sed 's:-Werror::g' -i || die
}

src_configure() {
	# doesn't build with -mindirect-branch=thunk
	filter-flags -mindirect-branch=thunk
}

src_compile() {
	emake DEBUG= CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" AR="$(tc-getAR)"
}

src_install() {
	emake install prefix=/usr sysconfdir=/etc DESTDIR="${ED}"
}