godep.bbclass: Add helper class to enable go-dep tool

Many go packages can take advantage of dep tool since
they manage their own dependencies, this class helps
in using go dep tool for such packages

(From OE-Core rev: 9bea8313b0dd5a6af08d15ee8634fe2ef9ee0f75)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj
2018-03-03 08:34:37 -08:00
committed by Richard Purdie
parent c0d1858705
commit 160e7b0875

View File

@@ -0,0 +1,8 @@
DEPENDS_append = " go-dep-native"
do_compile_prepend() {
rm -f ${WORKDIR}/build/src/${GO_IMPORT}/Gopkg.toml
rm -f ${WORKDIR}/build/src/${GO_IMPORT}/Gopkg.lock
( cd ${WORKDIR}/build/src/${GO_IMPORT} && dep init && dep ensure )
}