blob: 5ab1d028fc6d1e7caa645a138d2d5250ed7064d9 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001SUMMARY = "XFS Filesystem Utilities"
2HOMEPAGE = "http://oss.sgi.com/projects/xfs"
3SECTION = "base"
4LICENSE = "GPLv2 & LGPLv2.1"
5LICENSE_libhandle = "LGPLv2.1"
6LIC_FILES_CHKSUM = "file://LICENSES/GPL-2.0;md5=74274e8a218423e49eefdea80bc55038 \
7 file://LICENSES/LGPL-2.1;md5=b370887980db5dd40659b50909238dbd"
8DEPENDS = "util-linux util-linux-native"
9SRC_URI = "https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/${BP}.tar.xz \
10 file://remove_flags_from_build_flags.patch \
11 file://0001-build-Check-for-sync_file_range-libc-function.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080012 file://0001-Check-for-MAP_SYNC-in-sys-mman.h.patch \
13 file://0002-include-include-xfs-linux.h-after-sys-mman.h.patch \
Brad Bishop0f291cc2019-09-01 15:16:57 -040014 file://0001-support-usrmerge.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080015 "
Brad Bishop665fd022019-08-26 01:32:28 -040016SRC_URI[md5sum] = "5ca3f79e76e3fb984a03d1b42a2e60ba"
17SRC_URI[sha256sum] = "7b500e148cebd08f99e37cf744c7843817b37e7be2a32c4dc57d6ea16e3019ae"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080018
19inherit autotools-brokensep
20
21PACKAGES =+ "${PN}-fsck ${PN}-mkfs ${PN}-repair libhandle"
22
23DEPENDS += "util-linux"
24
25RDEPENDS_${PN} = "${PN}-fsck ${PN}-mkfs ${PN}-repair"
26
27FILES_${PN}-fsck = "${base_sbindir}/fsck.xfs"
28FILES_${PN}-mkfs = "${base_sbindir}/mkfs.xfs"
29FILES_${PN}-repair = "${base_sbindir}/xfs_repair"
30
31FILES_libhandle = "${base_libdir}/libhandle${SOLIBS}"
32
33EXTRA_OECONF = "--enable-gettext=no \
Brad Bishop15ae2502019-06-18 21:44:24 -040034 --enable-scrub=no \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080035 INSTALL_USER=root \
36 INSTALL_GROUP=root \
37 ac_cv_header_aio_h=yes \
38 ac_cv_lib_rt_lio_listio=yes \
39"
40
41DISABLE_STATIC = ""
42EXTRA_AUTORECONF += "-I ${S}/m4 --exclude=autoheader"
43
44PACKAGECONFIG ??= "readline blkid"
45
46PACKAGECONFIG[readline] = "--enable-readline=yes,--enable-readline=no,readline"
47PACKAGECONFIG[blkid] = "--enable-blkid=yes,--enable-blkid=no,util-linux"
48
49export DEBUG="-DNDEBUG"
50export BUILD_VERBOSE="1"
51export tagname="CC"
52
53EXTRA_OEMAKE = "DIST_ROOT='${D}'"
54
55do_configure () {
56 export BUILD_CC="${BUILD_CC} ${BUILD_CFLAGS}"
57 # Prevent Makefile from calling configure without arguments,
58 # when do_configure gets called for a second time.
59 rm -f ${B}/include/builddefs ${B}/include/platform_defs.h ${B}/configure
60 # Recreate configure script.
61 oe_runmake configure
Brad Bishop19323692019-04-05 15:28:33 -040062 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
63 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080064 oe_runconf
65}
66
67do_install_append() {
68 oe_runmake 'DESTDIR=${D}' install-dev
69 rm ${D}${libdir}/*.la
70 rmdir --ignore-fail-on-non-empty ${D}${libdir}
Brad Bishop15ae2502019-06-18 21:44:24 -040071
Brad Bishop0f291cc2019-09-01 15:16:57 -040072 if [ ${libdir} != ${base_libdir} ];then
73 ln -sf -r ${D}${libdir}/libhandle.a ${D}${base_libdir}/libhandle.a
74 ln -sf -r ${D}${base_libdir}/libhandle.so ${D}${libdir}/libhandle.so
75 fi
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080076}