blob: 370e16f4a6ff77266743c288a38ec9c8c210ba81 [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 "
5
6inherit autotools-brokensep gettext
7
8# the package comes with a custom config.h.in, it cannot be
9# overwritten by autoheader
10EXTRA_AUTORECONF += "--exclude=autoheader"
11EXTRA_OECONF = "INSTALL_USER=root INSTALL_GROUP=root"
12EXTRA_OECONF_append_class-native = " --enable-gettext=no"
13
14EXTRA_OEMAKE = "PKG_LIB_DIR=${base_libdir} PKG_DEVLIB_DIR=${libdir}"
15
16do_install () {
17 oe_runmake install install-lib install-dev DIST_ROOT="${D}"
18}
19
20PACKAGES =+ "lib${BPN}"
21
22FILES_lib${BPN} = "${base_libdir}/lib*${SOLIBS}"
23
24BBCLASSEXTEND = "native"
25# Only append ldflags for target recipe and if USE_NLS is enabled
26LDFLAGS_append_libc-uclibc_class-target = "${@['', ' -lintl '][(d.getVar('USE_NLS', True) == 'yes')]}"
27EXTRA_OECONF_append_libc-uclibc_class-target = "${@['', ' --disable-gettext '][(d.getVar('USE_NLS', True) == 'no')]}"
28
29fix_symlink () {
30 if [ "${BB_CURRENTTASK}" != "populate_sysroot" -a "${BB_CURRENTTASK}" != "populate_sysroot_setscene" ]
31 then
32 return
33 fi
34
35 if test "${libdir}" = "${base_libdir}" ; then
36 return
37 fi
38 # Remove bad symlinks & create the correct symlinks
39 if test -L ${libdir}/lib${BPN}.so ; then
40 rm -rf ${libdir}/lib${BPN}.so
41 ln -sf ${base_libdir}/lib${BPN}.so ${libdir}/lib${BPN}.so
42 fi
43 if test -L ${base_libdir}/lib${BPN}.a ; then
44 rm -rf ${base_libdir}/lib${BPN}.a
45 ln -sf ${libdir}/lib${BPN}.a ${base_libdir}/lib${BPN}.a
46 fi
47 if test -L ${base_libdir}/lib${BPN}.la ; then
48 rm -rf ${base_libdir}/lib${BPN}.la
49 ln -sf ${libdir}/lib${BPN}.la ${base_libdir}/lib${BPN}.la
50 fi
51}
52SSTATEPOSTINSTFUNCS_class-native += "fix_symlink"