Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | SUMMARY = "Persistent Memory Development Kit" |
| 2 | DESCRIPTION = "Persistent Memory Development Kit" |
| 3 | HOMEPAGE = "http://pmem.io" |
| 4 | SECTION = "libs" |
| 5 | LICENSE = "BSD" |
| 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=7db1106255a1baa80391fd2e21eebab7" |
| 7 | DEPENDS = "ndctl" |
| 8 | |
| 9 | # Required to have the fts.h header for musl |
| 10 | DEPENDS_append_libc-musl = " fts" |
| 11 | |
| 12 | SRC_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 | |
| 20 | SRC_URI_append_libc-musl = " file://0004-os_posix-Manually-implement-secure_getenv-if-require.patch" |
| 21 | |
| 22 | SRC_URI[md5sum] = "bde73bca9ef5b90911deb0fdcfb15ccf" |
| 23 | SRC_URI[sha256sum] = "df7e658e75d28cd80f6d2ff7b9fc9ae2885d52f8923fdbacecfd46215115fb4c" |
| 24 | |
| 25 | inherit 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] |
| 32 | EXTRA_OEMAKE = "HOST_SYS='${HOST_SYS}' EXTRA_CFLAGS='${SELECTED_OPTIMIZATION}'" |
| 33 | |
| 34 | # Fix the missing fts libs when using musl |
| 35 | EXTRA_OEMAKE_append_libc-musl = " EXTRA_LIBS='-lfts'" |
| 36 | |
| 37 | do_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 |
| 59 | FILES_${PN} += "${bindir}/pmempool ${bindir}/daxio" |
| 60 | FILES_${PN} += "${libdir}/*so*" |
| 61 | FILES_${PN} += "${libdir}/pkgconfig/*.pc" |
| 62 | FILES_${PN} += "${includedir}/libpmemobj++/* ${includedir}/libpmemobj/*" |
| 63 | |
| 64 | COMPATIBLE_HOST='(x86_64).*' |