mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-05 05:15:25 +02:00
riddler: update to v0.6.4
We refresh a patch and re-organize the go src for building Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
parent
b6460736c9
commit
876864dd59
|
@ -0,0 +1,52 @@
|
|||
From de09fed4786ba36431e8dcce1972c9e55ee50eaa Mon Sep 17 00:00:00 2001
|
||||
From: Bruce Ashfield <bruce.ashfield@gmail.com>
|
||||
Date: Wed, 15 Jan 2025 19:03:27 +0000
|
||||
Subject: [PATCH] build: ensure that GOBUILDTAGS are respected
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
||||
---
|
||||
basic.mk | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/basic.mk b/basic.mk
|
||||
index cb9b881..a262b61 100644
|
||||
--- a/basic.mk
|
||||
+++ b/basic.mk
|
||||
@@ -45,12 +45,12 @@ build: prebuild $(NAME) ## Builds a dynamic executable or package.
|
||||
|
||||
$(NAME): $(wildcard *.go) $(wildcard */*.go) VERSION.txt
|
||||
@echo "+ $@"
|
||||
- $(GO) build -tags "$(BUILDTAGS)" ${GO_LDFLAGS} -o $(NAME) .
|
||||
+ $(GO) build ${GOBUILDFLAGS} -tags "$(BUILDTAGS)" ${GO_LDFLAGS} -o $(NAME) .
|
||||
|
||||
.PHONY: static
|
||||
static: prebuild ## Builds a static executable.
|
||||
@echo "+ $@"
|
||||
- CGO_ENABLED=$(CGO_ENABLED) $(GO) build \
|
||||
+ CGO_ENABLED=$(CGO_ENABLED) $(GO) build ${GOBUILDFLAGS} \
|
||||
-tags "$(BUILDTAGS) static_build" \
|
||||
${GO_LDFLAGS_STATIC} -o $(NAME) .
|
||||
|
||||
@@ -107,7 +107,7 @@ install: prebuild ## Installs the executable or package.
|
||||
|
||||
define buildpretty
|
||||
mkdir -p $(BUILDDIR)/$(1)/$(2);
|
||||
-GOOS=$(1) GOARCH=$(2) CGO_ENABLED=$(CGO_ENABLED) $(GO) build \
|
||||
+GOOS=$(1) GOARCH=$(2) CGO_ENABLED=$(CGO_ENABLED) $(GO) build ${GOBUILDFLAGS} \
|
||||
-o $(BUILDDIR)/$(1)/$(2)/$(NAME) \
|
||||
-a -tags "$(BUILDTAGS) static_build netgo" \
|
||||
-installsuffix netgo ${GO_LDFLAGS_STATIC} .;
|
||||
@@ -123,7 +123,7 @@ cross: *.go VERSION.txt prebuild ## Builds the cross-compiled binaries, creating
|
||||
define buildrelease
|
||||
GOOS=$(1) GOARCH=$(2) CGO_ENABLED=$(CGO_ENABLED) $(GO) build \
|
||||
-o $(BUILDDIR)/$(NAME)-$(1)-$(2) \
|
||||
- -a -tags "$(BUILDTAGS) static_build netgo" \
|
||||
+ -a ${GOBUILDFLAGS} -tags "$(BUILDTAGS) static_build netgo" \
|
||||
-installsuffix netgo ${GO_LDFLAGS_STATIC} .;
|
||||
md5sum $(BUILDDIR)/$(NAME)-$(1)-$(2) > $(BUILDDIR)/$(NAME)-$(1)-$(2).md5;
|
||||
sha256sum $(BUILDDIR)/$(NAME)-$(1)-$(2) > $(BUILDDIR)/$(NAME)-$(1)-$(2).sha256;
|
||||
--
|
||||
2.39.2
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
From 8ca4391a5954db168d513ba64c3791f63b044fbf Mon Sep 17 00:00:00 2001
|
||||
From: Bruce Ashfield <bruce.ashfield@gmail.com>
|
||||
Date: Tue, 30 Jun 2020 23:58:22 -0400
|
||||
Subject: [PATCH] build: use to select cross compiler
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
||||
---
|
||||
git/Makefile | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git git/Makefile git/Makefile
|
||||
index c6976af..f3c8d17 100644
|
||||
--- git/Makefile
|
||||
+++ git/Makefile
|
||||
@@ -10,11 +10,11 @@ all: clean build static fmt lint test vet
|
||||
|
||||
build:
|
||||
@echo "+ $@"
|
||||
- @go build -tags "$(BUILDTAGS) cgo" .
|
||||
+ @${GO} build ${GOBUILDFLAGS} -tags "$(BUILDTAGS) cgo" .
|
||||
|
||||
static:
|
||||
@echo "+ $@"
|
||||
- CGO_ENABLED=1 go build -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static" -o riddler .
|
||||
+ CGO_ENABLED=1 ${GO} build ${GOBUILDFLAGS} -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static" -o riddler .
|
||||
|
||||
fmt:
|
||||
@echo "+ $@"
|
||||
@@ -26,11 +26,11 @@ lint:
|
||||
|
||||
test: fmt lint vet
|
||||
@echo "+ $@"
|
||||
- @go test -v -tags "$(BUILDTAGS) cgo" $(shell go list ./... | grep -v vendor)
|
||||
+ @${GO} test -v -tags "$(BUILDTAGS) cgo" $(shell go list ./... | grep -v vendor)
|
||||
|
||||
vet:
|
||||
@echo "+ $@"
|
||||
- @go vet $(shell go list ./... | grep -v vendor)
|
||||
+ @${GO} vet $(shell go list ./... | grep -v vendor)
|
||||
|
||||
clean:
|
||||
@echo "+ $@"
|
||||
@@ -38,4 +38,4 @@ clean:
|
||||
|
||||
install:
|
||||
@echo "+ $@"
|
||||
- @go install -v .
|
||||
+ @${GO} install -v .
|
||||
--
|
||||
2.19.1
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
HOMEPAGE = "https://github.com/jfrazelle/riddler"
|
||||
SUMMARY = "Convert `docker inspect` to opencontainers (OCI compatible) runc spec."
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=20ce4c6a4f32d6ee4a68e3a7506db3f1"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=7bac31faf84a2d7e88972f562a3ebbe5"
|
||||
|
||||
SRC_URI = "git://github.com/jfrazelle/riddler;branch=master;protocol=https;destsuffix=git/src/github.com/jessfraz/riddler \
|
||||
file://0001-build-use-to-select-cross-compiler.patch \
|
||||
SRC_URI = "git://github.com/jfrazelle/riddler;branch=master;protocol=https;destsuffix=git/src/github.com/genuinetools/riddler \
|
||||
file://0001-build-ensure-that-GOBUILDTAGS-are-respected.patch \
|
||||
"
|
||||
|
||||
SRCREV = "66698f2a5cb6854a1095673a15dcc253f0e28f93"
|
||||
PV = "v0.6.4+git"
|
||||
|
||||
S = "${WORKDIR}/git/src/github.com/jessfraz/riddler"
|
||||
S = "${WORKDIR}/git/src/github.com/genuinetools/riddler"
|
||||
GO_IMPORT = "github.com/jessfraz/riddler"
|
||||
|
||||
inherit goarch
|
||||
|
@ -27,7 +27,8 @@ EXTRA_OEMAKE="BUILDTAGS=''"
|
|||
do_compile() {
|
||||
export GOARCH="${TARGET_GOARCH}"
|
||||
export GOROOT="${STAGING_LIBDIR}/go"
|
||||
export GOPATH="${S}/src/import/vendor:${WORKDIR}/git/"
|
||||
# export GOPATH="${S}/src/import/vendor:${WORKDIR}/git/"
|
||||
export GOPATH="${WORKDIR}/git/"
|
||||
|
||||
# Pass the needed cflags/ldflags so that cgo
|
||||
# can find the needed headers files and libraries
|
||||
|
|
Loading…
Reference in New Issue
Block a user