1SUMMARY = "Persistent Memory Development Kit"
2DESCRIPTION = "Persistent Memory Development Kit"
3HOMEPAGE = "http://pmem.io"
4SECTION = "libs"
5LICENSE = "BSD-3-Clause"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=b44ee63f162f9cdb18fff1224877aafd"
7DEPENDS = "ndctl cmake-native"
8
9# Required to have the fts.h header for musl
10DEPENDS:append:libc-musl = " fts"
11
12S = "${WORKDIR}/git"
13
14SRC_URI = "git://github.com/pmem/pmdk.git;branch=master;protocol=https"
15SRCREV = "5705fdffa755d00b4dbb4d6c30eb49671436f961"
16
17inherit autotools-brokensep pkgconfig
18
19# Fix jemalloc error:
20# | configure: error: cannot run C compiled programs.
21# | If you meant to cross compile, use `--host'.
22#
23# Also fix #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
24EXTRA_OEMAKE = "BUILD_EXAMPLES='n' DOC='n' HOST_SYS='${HOST_SYS}' EXTRA_CFLAGS='${SELECTED_OPTIMIZATION}' LIB_PREFIX=${baselib}"
25
26# Fix the missing fts libs when using musl
27EXTRA_OEMAKE:append:libc-musl = " EXTRA_LIBS='-lfts'"
28
29do_configure:prepend() {
30	touch .skip-doc
31}
32
33do_install() {
34	oe_runmake prefix=${prefix} DESTDIR=${D} install
35
36	# Remove uneeded files
37	rm -rf ${D}/usr/${baselib}/pmdk_debug
38}
39
40# Include these by default otherwise the SDK is not very useful
41FILES:${PN} += "${bindir}/pmempool ${bindir}/daxio"
42FILES:${PN} += "${libdir}/*so*"
43FILES:${PN} += "${libdir}/pkgconfig/*.pc"
44FILES:${PN} += "${includedir}/libpmemobj++/* ${includedir}/libpmemobj/* /usr/*/include/"
45FILES:${PN} += "/usr/etc"
46FILES:${PN} += "/usr/share"
47
48COMPATIBLE_HOST='(x86_64).*'
49