blob: 9336ffc9389a419288974284700b36950d557589 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001# this build system is mostly shared by attr and acl
2
3SRC_URI += "file://relative-libdir.patch;striplevel=0 \
4 "
Brad Bishop6e60e8b2018-02-01 10:27:11 -05005# This patch should be applied after '(attr\|acl)-Missing-configure.ac.patch'
6SRC_URI_append = " file://0001-Added-configure-option-to-enable-disable-static-libr.patch"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05007
8inherit autotools-brokensep gettext
9
Brad Bishopd5ae7d92018-06-14 09:52:03 -070010# When upstream is using automake properly, this can be removed
11CLEANBROKEN = "1"
12
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013# the package comes with a custom config.h.in, it cannot be
14# overwritten by autoheader
15EXTRA_AUTORECONF += "--exclude=autoheader"
16EXTRA_OECONF = "INSTALL_USER=root INSTALL_GROUP=root"
17EXTRA_OECONF_append_class-native = " --enable-gettext=no"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050018EXTRA_OECONF_append_class-target = "${@['', ' --disable-gettext '][(d.getVar('USE_NLS') == 'no')]}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050019
20EXTRA_OEMAKE = "PKG_LIB_DIR=${base_libdir} PKG_DEVLIB_DIR=${libdir}"
21
22do_install () {
Brad Bishop316dfdd2018-06-25 12:45:53 -040023 oe_runmake install install-lib install-dev DIST_ROOT="${D}" ZIP="gzip -n"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050024}
25
Brad Bishop37a0e4d2017-12-04 01:01:44 -050026do_install_append_class-native () {
27 if test "${libdir}" = "${base_libdir}" ; then
28 return
29 fi
Brad Bishop6e60e8b2018-02-01 10:27:11 -050030 librelpath=${@os.path.relpath(d.getVar('libdir'), d.getVar('base_libdir'))}
31 baselibrelpath=${@os.path.relpath(d.getVar('base_libdir'), d.getVar('libdir'))}
Brad Bishop37a0e4d2017-12-04 01:01:44 -050032
33 # Remove bad symlinks & create the correct symlinks
34 if test -L ${D}${libdir}/lib${BPN}.so ; then
35 rm -rf ${D}${libdir}/lib${BPN}.so
36 ln -sf $baselibrelpath/lib${BPN}.so ${D}${libdir}/lib${BPN}.so
37 fi
38 if test -L ${D}${base_libdir}/lib${BPN}.a ; then
39 rm -rf ${D}${base_libdir}/lib${BPN}.a
40 ln -sf $librelpath/lib${BPN}.a ${D}${base_libdir}/lib${BPN}.a
41 fi
42 if test -L ${D}${base_libdir}/lib${BPN}.la ; then
43 rm -rf ${D}${base_libdir}/lib${BPN}.la
44 ln -sf $librelpath/lib${BPN}.la ${D}${base_libdir}/lib${BPN}.la
45 fi
46}
47
Patrick Williamsc124f4f2015-09-15 14:41:29 -050048PACKAGES =+ "lib${BPN}"
49
50FILES_lib${BPN} = "${base_libdir}/lib*${SOLIBS}"
51
52BBCLASSEXTEND = "native"