blob: e6f4c72e8c3924dda671e20a6fc3c055267b81b2 [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
10# the package comes with a custom config.h.in, it cannot be
11# overwritten by autoheader
12EXTRA_AUTORECONF += "--exclude=autoheader"
13EXTRA_OECONF = "INSTALL_USER=root INSTALL_GROUP=root"
14EXTRA_OECONF_append_class-native = " --enable-gettext=no"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050015EXTRA_OECONF_append_class-target = "${@['', ' --disable-gettext '][(d.getVar('USE_NLS') == 'no')]}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016
17EXTRA_OEMAKE = "PKG_LIB_DIR=${base_libdir} PKG_DEVLIB_DIR=${libdir}"
18
19do_install () {
20 oe_runmake install install-lib install-dev DIST_ROOT="${D}"
21}
22
Brad Bishop37a0e4d2017-12-04 01:01:44 -050023do_install_append_class-native () {
24 if test "${libdir}" = "${base_libdir}" ; then
25 return
26 fi
Brad Bishop6e60e8b2018-02-01 10:27:11 -050027 librelpath=${@os.path.relpath(d.getVar('libdir'), d.getVar('base_libdir'))}
28 baselibrelpath=${@os.path.relpath(d.getVar('base_libdir'), d.getVar('libdir'))}
Brad Bishop37a0e4d2017-12-04 01:01:44 -050029
30 # Remove bad symlinks & create the correct symlinks
31 if test -L ${D}${libdir}/lib${BPN}.so ; then
32 rm -rf ${D}${libdir}/lib${BPN}.so
33 ln -sf $baselibrelpath/lib${BPN}.so ${D}${libdir}/lib${BPN}.so
34 fi
35 if test -L ${D}${base_libdir}/lib${BPN}.a ; then
36 rm -rf ${D}${base_libdir}/lib${BPN}.a
37 ln -sf $librelpath/lib${BPN}.a ${D}${base_libdir}/lib${BPN}.a
38 fi
39 if test -L ${D}${base_libdir}/lib${BPN}.la ; then
40 rm -rf ${D}${base_libdir}/lib${BPN}.la
41 ln -sf $librelpath/lib${BPN}.la ${D}${base_libdir}/lib${BPN}.la
42 fi
43}
44
Patrick Williamsc124f4f2015-09-15 14:41:29 -050045PACKAGES =+ "lib${BPN}"
46
47FILES_lib${BPN} = "${base_libdir}/lib*${SOLIBS}"
48
49BBCLASSEXTEND = "native"