Files
meta-openwrt/classes/openwrt-lua.bbclass
Jagadeesh Krishnanjanappa 552c3a04c4 openwrt-lua: remove hardcoded 'lib' string to a generic value CMAKE_INSTALL_LIBDIR
This solves a bunch of below errors and warnings when the libdir is /usr/lib64 for
64bit machine or in multilib environment:

The libubox warning:
-- snip --
WARNING: libubox-2.0.0+gitAUTOINC+96305a3caf-r0 do_package: QA Issue: libubox: Files/directories were installed but not shipped in any package: /usr/lib/lua/5.1/uloop.so
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
libubox: 1 installed and not shipped files. [installed-vs-shipped]
-- snip --

The ubox recipe fails with below errors:

-- snip --
.../ubox/git-r0/recipe-sysroot-native/usr/bin/x86_64-montavista-linux/../../libexec/x86_64-montavista-linux/gcc/x86_64-montavista-linux/7.2.0/ld: cannot find -lubus collect2: error: ld returned 1 exit status
-- snip --

-- snip --
| ../ubox/git-r0/recipe-sysroot-native/usr/bin/x86_64-montavista-linux/../../libexec/x86_64-montavista-linux/gcc/x86_64-montavista-linux/7.2.0/ld: cannot find -luci
| collect2: error: ld returned 1 exit status
-- snip --

-- snip --
WARNING: ubox-git-r0 do_package: QA Issue: ubox: Files/directories were installed but not shipped in any package: /usr/lib/libvalidate.so
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or
delete them within do_install.
ubox: 1 installed and not shipped files. [installed-vs-shipped]
ERROR: ubox-git-r0 do_package_qa: QA Issue: /usr/sbin/validate_data contained in package ubox requires libvalidate.so()(64bit), but no providers found in RDEPENDS_ubox? [file-rdeps]
WARNING: ubox-git-r0 do_package_qa: QA Issue: ubox-dbg: found library in wrong location: /usr/lib/.debug/libvalidate.so [libdir]
ERROR: ubox-git-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: ubox-git-r0 do_package_qa: Function failed: do_package_qa
-- snip --

The ubus build fails with below error:
-- snip --
ERROR: ubus-git-r0 do_package_qa: QA Issue: /usr/bin/ubus contained in package ubus requires libubus.so()(64bit), but no providers found in RDEPENDS_ubus? [file-rdeps]
WARNING: ubus-git-r0 do_package_qa: QA Issue: ubus-dbg: found library in wrong location: /usr/lib/.debug/libubus.so [libdir]
ERROR: ubus-git-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: ubus-git-r0 do_package_qa: Function failed: do_package_qa
-- snip --

-- snip --
WARNING: ubus-git-r0 do_package: QA Issue: ubus: Files/directories were installed but not shipped in any package: /usr/lib/lua/5.1/ubus.so
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
ubus: 1 installed and not shipped files. [installed-vs-shipped]
-- snip --

The netifd recipe fails with below error:

-- snip --
| cp: target ‘.../tmp_new/work/corei7-64-montavista-linux/netifd/git-r0/image/lib64/netifd/’ is not a directory
| WARNING: .../tmp_new/work/corei7-64-montavista-linux/netifd/git-r0/temp/run.do_install.27647:1 exit 1 from 'cp -dR --preserve=mode,links .../tmp_new/work/corei7-64-montavista-linux/netifd/git-r0/git/scripts/* .../tmp_new/work/corei7-64-montavista-linux/netifd/git-r0/image/lib64/netifd/'
-- snip --

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
2018-03-02 08:45:30 -08:00

24 lines
718 B
Plaintext

# This file Copyright (C) 2015 Khem Raj <raj.kem@gmail.com> and
#
# It is released under the MIT license. See COPYING.MIT
# for the terms.
OECMAKE_C_FLAGS += "-DLUA_COMPAT_5_1"
EXTRA_OECMAKE += "-DLUAPATH=${libdir}/lua/5.1"
FILES_${PN} += "${libdir}/* ${datadir}/lua/5.*/"
FILES_${PN}-dbg += "${libdir}/lua/5.*/.debug"
DEPENDS += "lua5.1-native"
OECMAKE_C_FLAGS += "-I${STAGING_INCDIR}/lua5.1"
CFLAGS += "-I${STAGING_INCDIR}/lua5.1"
do_configure_prepend () {
if [ -e "${S}/CMakeLists.txt" ] ; then
sed -i -e \
"s:ARCHIVE DESTINATION lib:ARCHIVE DESTINATION \${CMAKE_INSTALL_LIBDIR}:g" \
-e "s:LIBRARY DESTINATION lib:LIBRARY DESTINATION \${CMAKE_INSTALL_LIBDIR}:g" \
${S}/CMakeLists.txt
fi
}