mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
Remove layout_* variables
Remove layout_* variables and replace them with variables specific to the different classes. The layout variables were only useful for the native/cross classes and caused more confusion than they solved. They didn't scale to the sdk class. It now clear a small set of native/cross variables fulfil the needs. This patch also changes native.bbclass to use "/" as the STAGING_DIR which makes sense since we're installing binaries into the locations we're compiling them for. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
@@ -206,11 +206,11 @@ autotools_stage_all() {
|
||||
oe_runmake DESTDIR="${STAGE_TEMP}" install
|
||||
autotools_stage_dir ${STAGE_TEMP}/${includedir} ${STAGING_INCDIR}
|
||||
if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then
|
||||
autotools_stage_dir ${STAGE_TEMP}/${bindir} ${STAGING_DIR_HOST}${layout_bindir}
|
||||
autotools_stage_dir ${STAGE_TEMP}/${sbindir} ${STAGING_DIR_HOST}${layout_sbindir}
|
||||
autotools_stage_dir ${STAGE_TEMP}/${base_bindir} ${STAGING_DIR_HOST}${layout_base_bindir}
|
||||
autotools_stage_dir ${STAGE_TEMP}/${base_sbindir} ${STAGING_DIR_HOST}${layout_base_sbindir}
|
||||
autotools_stage_dir ${STAGE_TEMP}/${libexecdir} ${STAGING_DIR_HOST}${layout_libexecdir}
|
||||
autotools_stage_dir ${STAGE_TEMP}/${bindir} ${STAGING_DIR_HOST}${bindir}
|
||||
autotools_stage_dir ${STAGE_TEMP}/${sbindir} ${STAGING_DIR_HOST}${sbindir}
|
||||
autotools_stage_dir ${STAGE_TEMP}/${base_bindir} ${STAGING_DIR_HOST}${base_bindir}
|
||||
autotools_stage_dir ${STAGE_TEMP}/${base_sbindir} ${STAGING_DIR_HOST}${base_sbindir}
|
||||
autotools_stage_dir ${STAGE_TEMP}/${libexecdir} ${STAGING_DIR_HOST}${libexecdir}
|
||||
fi
|
||||
if [ -d ${STAGE_TEMP}/${libdir} ]
|
||||
then
|
||||
@@ -218,7 +218,7 @@ autotools_stage_all() {
|
||||
fi
|
||||
if [ -d ${STAGE_TEMP}/${base_libdir} ]
|
||||
then
|
||||
autotools_stage_libdir ${STAGE_TEMP}/${base_libdir} ${STAGING_DIR_HOST}${layout_base_libdir}
|
||||
autotools_stage_libdir ${STAGE_TEMP}/${base_libdir} ${STAGING_DIR_HOST}${base_libdir}
|
||||
fi
|
||||
rm -rf ${STAGE_TEMP}/${mandir} || true
|
||||
rm -rf ${STAGE_TEMP}/${infodir} || true
|
||||
|
||||
@@ -926,8 +926,8 @@ base_do_stage () {
|
||||
:
|
||||
}
|
||||
|
||||
do_populate_staging[dirs] = "${STAGING_DIR_TARGET}/${layout_bindir} ${STAGING_DIR_TARGET}/${layout_libdir} \
|
||||
${STAGING_DIR_TARGET}/${layout_includedir} \
|
||||
do_populate_staging[dirs] = "${STAGING_DIR_TARGET}/${bindir} ${STAGING_DIR_TARGET}/${libdir} \
|
||||
${STAGING_DIR_TARGET}/${includedir} \
|
||||
${STAGING_BINDIR_NATIVE} ${STAGING_LIBDIR_NATIVE} \
|
||||
${STAGING_INCDIR_NATIVE} \
|
||||
${STAGING_DATADIR} \
|
||||
|
||||
@@ -14,8 +14,8 @@ def get_binconfig_mangle(d):
|
||||
s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
|
||||
s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'"
|
||||
s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'"
|
||||
s += " -e 's:OEPREFIX:${STAGING_DIR_HOST}${layout_prefix}:'"
|
||||
s += " -e 's:OEEXECPREFIX:${STAGING_DIR_HOST}${layout_exec_prefix}:'"
|
||||
s += " -e 's:OEPREFIX:${STAGING_DIR_HOST}${prefix}:'"
|
||||
s += " -e 's:OEEXECPREFIX:${STAGING_DIR_HOST}${exec_prefix}:'"
|
||||
s += " -e 's:-I${WORKDIR}:-I${STAGING_INCDIR}:'"
|
||||
s += " -e 's:-L${WORKDIR}:-L${STAGING_LIBDIR}:'"
|
||||
return s
|
||||
@@ -31,7 +31,7 @@ do_install_append() {
|
||||
-e 's:${STAGING_LIBDIR}:${libdir}:g;' \
|
||||
-e 's:${STAGING_INCDIR}:${includedir}:g;' \
|
||||
-e 's:${STAGING_DATADIR}:${datadir}:' \
|
||||
-e 's:${STAGING_DIR_HOST}${layout_prefix}:${prefix}:' > ${D}${bindir}/`basename $config`
|
||||
-e 's:${STAGING_DIR_HOST}${prefix}:${prefix}:' > ${D}${bindir}/`basename $config`
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -40,7 +40,7 @@ do_install_append() {
|
||||
-e 's:${STAGING_LIBDIR}:${libdir}:g;' \
|
||||
-e 's:${STAGING_INCDIR}:${includedir}:g;' \
|
||||
-e 's:${STAGING_DATADIR}:${datadir}:' \
|
||||
-e 's:${STAGING_DIR_HOST}${layout_prefix}:${prefix}:' \
|
||||
-e 's:${STAGING_DIR_HOST}${prefix}:${prefix}:' \
|
||||
$lafile
|
||||
done
|
||||
}
|
||||
|
||||
@@ -26,34 +26,11 @@ LDFLAGS_build-darwin = "-L${STAGING_LIBDIR_NATIVE}"
|
||||
TOOLCHAIN_OPTIONS = ""
|
||||
|
||||
# Overrides for paths
|
||||
|
||||
# Path prefixes
|
||||
base_prefix = "${exec_prefix}"
|
||||
prefix = "${CROSS_DIR}"
|
||||
base_prefix = "${prefix}"
|
||||
exec_prefix = "${prefix}"
|
||||
|
||||
# Base paths
|
||||
base_bindir = "${base_prefix}/bin"
|
||||
base_sbindir = "${base_prefix}/bin"
|
||||
base_libdir = "${base_prefix}/lib"
|
||||
|
||||
# Architecture independent paths
|
||||
datadir = "${prefix}/share"
|
||||
sysconfdir = "${prefix}/etc"
|
||||
sharedstatedir = "${prefix}/com"
|
||||
localstatedir = "${prefix}/var"
|
||||
infodir = "${datadir}/info"
|
||||
mandir = "${datadir}/man"
|
||||
docdir = "${datadir}/doc"
|
||||
servicedir = "${prefix}/srv"
|
||||
|
||||
# Architecture dependent paths
|
||||
bindir = "${exec_prefix}/bin"
|
||||
sbindir = "${exec_prefix}/bin"
|
||||
libexecdir = "${exec_prefix}/libexec"
|
||||
libdir = "${exec_prefix}/lib"
|
||||
includedir = "${exec_prefix}/include"
|
||||
oldincludedir = "${exec_prefix}/include"
|
||||
|
||||
do_stage () {
|
||||
oe_runmake install
|
||||
|
||||
@@ -2,7 +2,7 @@ inherit distutils-base
|
||||
|
||||
DISTUTILS_BUILD_ARGS ?= ""
|
||||
DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}"
|
||||
DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${layout_prefix} \
|
||||
DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \
|
||||
--install-data=${STAGING_DATADIR}"
|
||||
DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \
|
||||
--install-data=${D}/${datadir}"
|
||||
@@ -16,7 +16,7 @@ distutils_do_compile() {
|
||||
}
|
||||
|
||||
distutils_stage_headers() {
|
||||
install -d ${STAGING_DIR_HOST}${layout_libdir}/${PYTHON_DIR}/site-packages
|
||||
install -d ${STAGING_DIR_HOST}${libdir}/${PYTHON_DIR}/site-packages
|
||||
STAGING_INCDIR=${STAGING_INCDIR} \
|
||||
STAGING_LIBDIR=${STAGING_LIBDIR} \
|
||||
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
|
||||
@@ -25,10 +25,10 @@ distutils_stage_headers() {
|
||||
}
|
||||
|
||||
distutils_stage_all() {
|
||||
install -d ${STAGING_DIR_HOST}${layout_prefix}/${PYTHON_DIR}/site-packages
|
||||
install -d ${STAGING_DIR_HOST}${prefix}/${PYTHON_DIR}/site-packages
|
||||
STAGING_INCDIR=${STAGING_INCDIR} \
|
||||
STAGING_LIBDIR=${STAGING_LIBDIR} \
|
||||
PYTHONPATH=${STAGING_DIR_HOST}${layout_prefix}/${PYTHON_DIR}/site-packages \
|
||||
PYTHONPATH=${STAGING_DIR_HOST}${prefix}/${PYTHON_DIR}/site-packages \
|
||||
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
|
||||
${STAGING_BINDIR_NATIVE}/python setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
|
||||
oefatal "python setup.py install (stage) execution failed."
|
||||
|
||||
@@ -50,32 +50,15 @@ export RANLIB = "${HOST_PREFIX}ranlib"
|
||||
export STRIP = "${HOST_PREFIX}strip"
|
||||
|
||||
# Path prefixes
|
||||
export base_prefix = "${STAGING_DIR_NATIVE}"
|
||||
export prefix = "${STAGING_DIR_NATIVE}${layout_prefix}"
|
||||
export exec_prefix = "${STAGING_DIR_NATIVE}${layout_exec_prefix}"
|
||||
base_prefix = "${STAGING_DIR_NATIVE}"
|
||||
prefix = "${STAGING_DIR_NATIVE}/usr"
|
||||
exec_prefix = "${STAGING_DIR_NATIVE}/usr"
|
||||
|
||||
# Base paths
|
||||
export base_bindir = "${STAGING_DIR_NATIVE}${layout_base_bindir}"
|
||||
export base_sbindir = "${STAGING_DIR_NATIVE}${layout_base_sbindir}"
|
||||
export base_libdir = "${STAGING_DIR_NATIVE}${layout_base_libdir}"
|
||||
|
||||
# Architecture independent paths
|
||||
export datadir = "${STAGING_DIR_NATIVE}${layout_datadir}"
|
||||
export sysconfdir = "${STAGING_DIR_NATIVE}${layout_sysconfdir}"
|
||||
export sharedstatedir = "${STAGING_DIR_NATIVE}${layout_sharedstatedir}"
|
||||
export localstatedir = "${STAGING_DIR_NATIVE}${layout_localstatedir}"
|
||||
export infodir = "${STAGING_DIR_NATIVE}${layout_infodir}"
|
||||
export mandir = "${STAGING_DIR_NATIVE}${layout_mandir}"
|
||||
export docdir = "${STAGING_DIR_NATIVE}${layout_docdir}"
|
||||
export servicedir = "${STAGING_DIR_NATIVE}${layout_servicedir}"
|
||||
|
||||
# Architecture dependent paths
|
||||
export bindir = "${STAGING_DIR_NATIVE}${layout_bindir}"
|
||||
export sbindir = "${STAGING_DIR_NATIVE}${layout_sbindir}"
|
||||
export libexecdir = "${STAGING_DIR_NATIVE}${layout_libexecdir}"
|
||||
export libdir = "${STAGING_DIR_NATIVE}${layout_libdir}"
|
||||
export includedir = "${STAGING_DIR_NATIVE}${layout_includedir}"
|
||||
export oldincludedir = "${STAGING_DIR_NATIVE}${layout_includedir}"
|
||||
# Since we actually install these into situ there is no staging prefix
|
||||
STAGING_DIR_HOST = ""
|
||||
STAGING_DIR_TARGET = ""
|
||||
SHLIBSDIR = "${STAGING_DIR_NATIVE}/shlibs"
|
||||
PKG_CONFIG_DIR = "${libdir}/pkgconfig"
|
||||
|
||||
#
|
||||
# If changing this function, please make sure packaged-staging.bbclass is
|
||||
|
||||
@@ -174,11 +174,11 @@ staging_helper () {
|
||||
done
|
||||
echo "dest root /" >> $conffile
|
||||
fi
|
||||
if [ ! -e ${TMPDIR}${layout_libdir}/opkg/info/ ]; then
|
||||
mkdir -p ${TMPDIR}${layout_libdir}/opkg/info/
|
||||
if [ ! -e ${TMPDIR}${libdir}/opkg/info/ ]; then
|
||||
mkdir -p ${TMPDIR}${libdir}/opkg/info/
|
||||
fi
|
||||
if [ ! -e ${TMPDIR}${layout_libdir}/ipkg/ ]; then
|
||||
cd ${TMPDIR}${layout_libdir}/
|
||||
if [ ! -e ${TMPDIR}${libdir}/ipkg/ ]; then
|
||||
cd ${TMPDIR}${libdir}/
|
||||
ln -sf opkg/ ipkg || true
|
||||
fi
|
||||
}
|
||||
@@ -210,7 +210,7 @@ python packagestage_scenefunc () {
|
||||
#
|
||||
# Install the staging package somewhere temporarily so we can extract the stamp files
|
||||
#
|
||||
bb.mkdirhier(bb.data.expand("${WORKDIR}/tstage/${layout_libdir}/opkg/info/ ", d))
|
||||
bb.mkdirhier(bb.data.expand("${WORKDIR}/tstage/${libdir}/opkg/info/ ", d))
|
||||
cmd = bb.data.expand("${PSTAGE_PKGMANAGER} -f ${PSTAGE_MACHCONFIG} -force-depends -o ${WORKDIR}/tstage install", d)
|
||||
ret = os.system("PATH=\"%s\" %s %s" % (path, cmd, stagepkg))
|
||||
if ret != 0:
|
||||
@@ -379,20 +379,20 @@ staging_packager () {
|
||||
staging_package_installer () {
|
||||
#${PSTAGE_INSTALL_CMD} ${PSTAGE_PKG}
|
||||
|
||||
STATUSFILE=${TMPDIR}${layout_libdir}/opkg/status
|
||||
STATUSFILE=${TMPDIR}${libdir}/opkg/status
|
||||
echo "Package: ${PSTAGE_PKGPN}" >> $STATUSFILE
|
||||
echo "Version: ${PSTAGE_PKGVERSION}" >> $STATUSFILE
|
||||
echo "Status: install user installed" >> $STATUSFILE
|
||||
echo "Architecture: ${PSTAGE_PKGARCH}" >> $STATUSFILE
|
||||
echo "" >> $STATUSFILE
|
||||
|
||||
CTRLFILE=${TMPDIR}${layout_libdir}/opkg/info/${PSTAGE_PKGPN}.control
|
||||
CTRLFILE=${TMPDIR}${libdir}/opkg/info/${PSTAGE_PKGPN}.control
|
||||
echo "Package: ${PSTAGE_PKGPN}" > $CTRLFILE
|
||||
echo "Version: ${PSTAGE_PKGVERSION}" >> $CTRLFILE
|
||||
echo "Architecture: ${PSTAGE_PKGARCH}" >> $CTRLFILE
|
||||
|
||||
cd ${PSTAGE_TMPDIR_STAGE}
|
||||
find -type f | grep -v ./CONTROL | sed -e 's/^\.//' > ${TMPDIR}${layout_libdir}/opkg/info/${PSTAGE_PKGPN}.list
|
||||
find -type f | grep -v ./CONTROL | sed -e 's/^\.//' > ${TMPDIR}${libdir}/opkg/info/${PSTAGE_PKGPN}.list
|
||||
}
|
||||
|
||||
staging_package_libtoolhack () {
|
||||
|
||||
@@ -59,7 +59,7 @@ FILES_${PN}-dbg += "${prefix}/.debug \
|
||||
${prefix}/bin/.debug \
|
||||
"
|
||||
|
||||
export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${layout_libdir}/pkgconfig"
|
||||
export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig"
|
||||
export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
|
||||
|
||||
python () {
|
||||
|
||||
@@ -6,10 +6,10 @@ XLIBS_CVS = "${FREEDESKTOP_CVS}/xlibs"
|
||||
inherit autotools pkgconfig
|
||||
|
||||
do_stage() {
|
||||
oe_runmake install prefix=${STAGING_DIR_HOST}${layout_prefix} \
|
||||
oe_runmake install prefix=${STAGING_DIR_HOST}${prefix} \
|
||||
bindir=${STAGING_BINDIR} \
|
||||
includedir=${STAGING_INCDIR} \
|
||||
libdir=${STAGING_LIBDIR} \
|
||||
datadir=${STAGING_DATADIR} \
|
||||
mandir=${STAGING_DIR_HOST}${layout_mandir}
|
||||
mandir=${STAGING_DIR_HOST}${mandir}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user