blob: 3da22a970212630b2cc01c3b5a658f76e41f0e19 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001SUMMARY = "Persistent Memory Development Kit"
2DESCRIPTION = "Persistent Memory Development Kit"
3HOMEPAGE = "http://pmem.io"
4SECTION = "libs"
5LICENSE = "BSD"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=7db1106255a1baa80391fd2e21eebab7"
7DEPENDS = "ndctl"
8
9# Required to have the fts.h header for musl
10DEPENDS_append_libc-musl = " fts"
11
12SRC_URI = "https://github.com/pmem/${BPN}/archive/${PV}.tar.gz \
13 file://0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch \
14 file://0002-Makefile-Don-t-install-the-docs.patch \
15 file://0003-Makefile-Don-t-build-the-examples.patch \
16 file://0005-pmempool-Remove-unused-__USE_UNIX98-define.patch \
17 file://0006-Makefile.inc-Allow-extra-libs-to-be-specified.patch \
18 "
19
20SRC_URI_append_libc-musl = " file://0004-os_posix-Manually-implement-secure_getenv-if-require.patch"
21
22SRC_URI[md5sum] = "bde73bca9ef5b90911deb0fdcfb15ccf"
23SRC_URI[sha256sum] = "df7e658e75d28cd80f6d2ff7b9fc9ae2885d52f8923fdbacecfd46215115fb4c"
24
25inherit autotools-brokensep pkgconfig
26
27# Fix jemalloc error:
28# | configure: error: cannot run C compiled programs.
29# | If you meant to cross compile, use `--host'.
30#
31# Also fix #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
32EXTRA_OEMAKE = "HOST_SYS='${HOST_SYS}' EXTRA_CFLAGS='${SELECTED_OPTIMIZATION}'"
33
34# Fix the missing fts libs when using musl
35EXTRA_OEMAKE_append_libc-musl = " EXTRA_LIBS='-lfts'"
36
37do_install() {
38 oe_runmake PREFIX=${prefix} DESTDIR=${D} install
39
40 # Copy these into the standard directories
41 install -d ${D}${bindir}/
42 mv ${D}/usr/local/bin/pmempool ${D}${bindir}/
43 mv ${D}/usr/local/bin/daxio ${D}${bindir}/
44
45 install -d ${D}${libdir}
46 mv ${D}/usr/local/lib/*so* ${D}${libdir}/
47
48 install -d ${D}${libdir}/pkgconfig
49 mv ${D}/usr/local/lib/pkgconfig/*.pc ${D}${libdir}/pkgconfig/
50
51 install -d ${D}${includedir}
52 mv ${D}/usr/local/include/* ${D}${includedir}/
53
54 # Remove uneeded files
55 rm -rf ${D}/usr/local/
56}
57
58# Include these by default otherwise the SDK is not very useful
59FILES_${PN} += "${bindir}/pmempool ${bindir}/daxio"
60FILES_${PN} += "${libdir}/*so*"
61FILES_${PN} += "${libdir}/pkgconfig/*.pc"
62FILES_${PN} += "${includedir}/libpmemobj++/* ${includedir}/libpmemobj/*"
63
64COMPATIBLE_HOST='(x86_64).*'