mirror of
https://github.com/flatcar/scripts.git
synced 2025-12-07 18:31:54 +01:00
*: Do not use ROOT in src_ functions
The ROOT variable in EAPI 7 is available only in pkg_ functions, so switch the uses of the ROOT variable in the src_ functions to SYSROOT.
This commit is contained in:
parent
ac73ae991d
commit
2c4f71d70b
@ -40,8 +40,8 @@ src_compile() {
|
||||
# setup CFLAGS and LDFLAGS for separate build target
|
||||
# see https://github.com/tianon/docker-overlay/pull/10
|
||||
# FLatcar: inject our own CFLAGS/LDFLAGS for torcx
|
||||
export CGO_CFLAGS="${CGO_CFLAGS} -I${ROOT}/usr/include"
|
||||
export CGO_LDFLAGS="${CGO_LDFLAGS} -L${ROOT}/usr/$(get_libdir)"
|
||||
export CGO_CFLAGS="${CGO_CFLAGS} -I${SYSROOT}/usr/include"
|
||||
export CGO_LDFLAGS="${CGO_LDFLAGS} -L${SYSROOT}/usr/$(get_libdir)"
|
||||
emake \
|
||||
LDFLAGS="$(usex hardened '-extldflags -fno-PIC' '')" \
|
||||
VERSION="$(cat VERSION)" \
|
||||
|
||||
@ -42,9 +42,9 @@ PATCHES=(
|
||||
|
||||
src_compile() {
|
||||
# Taken from app-emulation/docker-1.7.0-r1
|
||||
export CGO_CFLAGS="-I${ROOT}/usr/include"
|
||||
export CGO_CFLAGS="-I${SYSROOT}/usr/include"
|
||||
export CGO_LDFLAGS="$(usex hardened '-fno-PIC ' '')
|
||||
-L${ROOT}/usr/$(get_libdir)"
|
||||
-L${SYSROOT}/usr/$(get_libdir)"
|
||||
|
||||
# build up optional flags
|
||||
local options=(
|
||||
|
||||
@ -32,7 +32,7 @@ src_prepare() {
|
||||
src_compile() {
|
||||
emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
|
||||
VERSION=${PV} \
|
||||
JSON_INCLUDE_PATH="${ROOT%/}/usr/include/json-c"
|
||||
JSON_INCLUDE_PATH="${SYSROOT%/}/usr/include/json-c"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
EAPI=7
|
||||
|
||||
# Tell linux-info where to find the kernel source/build
|
||||
KERNEL_DIR="${SYSROOT}/usr/src/linux"
|
||||
KBUILD_OUTPUT="${SYSROOT}/var/cache/portage/sys-kernel/coreos-kernel"
|
||||
KERNEL_DIR="${SYSROOT%/}/usr/src/linux"
|
||||
KBUILD_OUTPUT="${SYSROOT%/}/var/cache/portage/sys-kernel/coreos-kernel"
|
||||
inherit linux-info savedconfig
|
||||
|
||||
# In case this is a real snapshot, fill in commit below.
|
||||
@ -102,7 +102,7 @@ src_unpack() {
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
local kernel_mods="${ROOT}/lib/modules/${KV_FULL}"
|
||||
local kernel_mods="${SYSROOT%/}/lib/modules/${KV_FULL}"
|
||||
|
||||
# Fail if any firmware is missing.
|
||||
einfo "Scanning for files required by ${KV_FULL}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user