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