Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame^] | 1 | # this build system is mostly shared by attr and acl |
| 2 | |
| 3 | SRC_URI += "file://relative-libdir.patch;striplevel=0 \ |
| 4 | " |
| 5 | |
| 6 | inherit autotools-brokensep gettext |
| 7 | |
| 8 | # the package comes with a custom config.h.in, it cannot be |
| 9 | # overwritten by autoheader |
| 10 | EXTRA_AUTORECONF += "--exclude=autoheader" |
| 11 | EXTRA_OECONF = "INSTALL_USER=root INSTALL_GROUP=root" |
| 12 | EXTRA_OECONF_append_class-native = " --enable-gettext=no" |
| 13 | |
| 14 | EXTRA_OEMAKE = "PKG_LIB_DIR=${base_libdir} PKG_DEVLIB_DIR=${libdir}" |
| 15 | |
| 16 | do_install () { |
| 17 | oe_runmake install install-lib install-dev DIST_ROOT="${D}" |
| 18 | } |
| 19 | |
| 20 | PACKAGES =+ "lib${BPN}" |
| 21 | |
| 22 | FILES_lib${BPN} = "${base_libdir}/lib*${SOLIBS}" |
| 23 | |
| 24 | BBCLASSEXTEND = "native" |
| 25 | # Only append ldflags for target recipe and if USE_NLS is enabled |
| 26 | LDFLAGS_append_libc-uclibc_class-target = "${@['', ' -lintl '][(d.getVar('USE_NLS', True) == 'yes')]}" |
| 27 | EXTRA_OECONF_append_libc-uclibc_class-target = "${@['', ' --disable-gettext '][(d.getVar('USE_NLS', True) == 'no')]}" |
| 28 | |
| 29 | fix_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 | } |
| 52 | SSTATEPOSTINSTFUNCS_class-native += "fix_symlink" |