aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-03-03 08:34:37 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-06 06:36:34 -0800
commit9bea8313b0dd5a6af08d15ee8634fe2ef9ee0f75 (patch)
tree699e7b4cc621366a24abbd5c4eb35c3e67761189 /meta/classes
parent10193150381b1088a5de627aed0ad1d052a3955d (diff)
downloadopenembedded-core-contrib-9bea8313b0dd5a6af08d15ee8634fe2ef9ee0f75.tar.gz
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 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/godep.bbclass8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/classes/godep.bbclass b/meta/classes/godep.bbclass
new file mode 100644
index 0000000000..c82401c313
--- /dev/null
+++ b/meta/classes/godep.bbclass
@@ -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 )
+}
+