2010-02-11 16:11:01 +00:00
|
|
|
# We want native packages to be relocatable
|
|
|
|
inherit relocatable
|
|
|
|
|
2005-08-31 10:45:47 +00:00
|
|
|
# Native packages are built indirectly via dependency,
|
|
|
|
# no need for them to be a direct target of 'world'
|
|
|
|
EXCLUDE_FROM_WORLD = "1"
|
|
|
|
|
|
|
|
PACKAGES = ""
|
2012-10-27 08:48:17 +00:00
|
|
|
PACKAGES_class-native = ""
|
2011-03-15 14:37:47 +00:00
|
|
|
PACKAGES_DYNAMIC = ""
|
2012-10-27 08:48:17 +00:00
|
|
|
PACKAGES_DYNAMIC_class-native = ""
|
2006-02-10 11:38:23 +00:00
|
|
|
PACKAGE_ARCH = "${BUILD_ARCH}"
|
|
|
|
|
2011-05-08 17:45:39 +00:00
|
|
|
# used by cmake class
|
|
|
|
OECMAKE_RPATH = "${libdir}"
|
2012-10-27 08:48:17 +00:00
|
|
|
OECMAKE_RPATH_class-native = "${libdir}"
|
2011-05-08 17:45:39 +00:00
|
|
|
|
2006-02-10 11:38:23 +00:00
|
|
|
# When this class has packaging enabled, setting
|
|
|
|
# RPROVIDES becomes unnecessary.
|
|
|
|
RPROVIDES = "${PN}"
|
|
|
|
|
2005-08-31 10:45:47 +00:00
|
|
|
TARGET_ARCH = "${BUILD_ARCH}"
|
|
|
|
TARGET_OS = "${BUILD_OS}"
|
|
|
|
TARGET_VENDOR = "${BUILD_VENDOR}"
|
|
|
|
TARGET_PREFIX = "${BUILD_PREFIX}"
|
|
|
|
TARGET_CC_ARCH = "${BUILD_CC_ARCH}"
|
2011-07-27 22:31:28 +00:00
|
|
|
TARGET_LD_ARCH = "${BUILD_LD_ARCH}"
|
|
|
|
TARGET_AS_ARCH = "${BUILD_AS_ARCH}"
|
2014-04-16 09:31:36 +00:00
|
|
|
TARGET_CPPFLAGS = "${BUILD_CPPFLAGS}"
|
|
|
|
TARGET_CFLAGS = "${BUILD_CFLAGS}"
|
|
|
|
TARGET_CXXFLAGS = "${BUILD_CXXFLAGS}"
|
|
|
|
TARGET_LDFLAGS = "${BUILD_LDFLAGS}"
|
2011-04-05 01:13:45 +00:00
|
|
|
TARGET_FPU = ""
|
2005-08-31 10:45:47 +00:00
|
|
|
|
|
|
|
HOST_ARCH = "${BUILD_ARCH}"
|
|
|
|
HOST_OS = "${BUILD_OS}"
|
|
|
|
HOST_VENDOR = "${BUILD_VENDOR}"
|
|
|
|
HOST_PREFIX = "${BUILD_PREFIX}"
|
|
|
|
HOST_CC_ARCH = "${BUILD_CC_ARCH}"
|
2011-07-27 22:31:28 +00:00
|
|
|
HOST_LD_ARCH = "${BUILD_LD_ARCH}"
|
|
|
|
HOST_AS_ARCH = "${BUILD_AS_ARCH}"
|
2005-08-31 10:45:47 +00:00
|
|
|
|
|
|
|
CPPFLAGS = "${BUILD_CPPFLAGS}"
|
|
|
|
CFLAGS = "${BUILD_CFLAGS}"
|
|
|
|
CXXFLAGS = "${BUILD_CFLAGS}"
|
|
|
|
LDFLAGS = "${BUILD_LDFLAGS}"
|
2007-11-12 11:25:30 +00:00
|
|
|
LDFLAGS_build-darwin = "-L${STAGING_LIBDIR_NATIVE} "
|
2005-08-31 10:45:47 +00:00
|
|
|
|
2006-11-25 10:01:30 +00:00
|
|
|
STAGING_BINDIR = "${STAGING_BINDIR_NATIVE}"
|
2007-01-08 21:07:49 +00:00
|
|
|
STAGING_BINDIR_CROSS = "${STAGING_BINDIR_NATIVE}"
|
2006-05-27 21:49:50 +00:00
|
|
|
|
2012-03-15 13:50:59 +00:00
|
|
|
# native pkg doesn't need the TOOLCHAIN_OPTIONS.
|
|
|
|
TOOLCHAIN_OPTIONS = ""
|
|
|
|
|
2010-01-05 21:10:47 +00:00
|
|
|
DEPENDS_GETTEXT = "gettext-native"
|
|
|
|
|
2013-04-10 13:34:56 +00:00
|
|
|
# Don't build ptest natively
|
|
|
|
PTEST_ENABLED = "0"
|
|
|
|
|
2007-09-01 16:40:35 +00:00
|
|
|
# Don't use site files for native builds
|
2013-09-27 09:58:17 +00:00
|
|
|
export CONFIG_SITE = "${COREBASE}/meta/site/native"
|
2007-09-01 16:40:35 +00:00
|
|
|
|
2006-05-27 21:49:50 +00:00
|
|
|
# set the compiler as well. It could have been set to something else
|
2014-10-21 10:50:13 +00:00
|
|
|
export CC = "${BUILD_CC}"
|
|
|
|
export CXX = "${BUILD_CXX}"
|
|
|
|
export FC = "${BUILD_FC}"
|
|
|
|
export CPP = "${BUILD_CPP}"
|
|
|
|
export LD = "${BUILD_LD}"
|
|
|
|
export CCLD = "${BUILD_CCLD}"
|
|
|
|
export AR = "${BUILD_AR}"
|
|
|
|
export AS = "${BUILD_AS}"
|
|
|
|
export RANLIB = "${BUILD_RANLIB}"
|
|
|
|
export STRIP = "${BUILD_STRIP}"
|
|
|
|
export NM = "${BUILD_NM}"
|
2006-05-27 21:49:50 +00:00
|
|
|
|
2005-08-31 10:45:47 +00:00
|
|
|
# Path prefixes
|
2009-09-16 22:09:44 +00:00
|
|
|
base_prefix = "${STAGING_DIR_NATIVE}"
|
2009-09-16 23:56:15 +00:00
|
|
|
prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
|
|
|
|
exec_prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
|
2009-09-16 22:09:44 +00:00
|
|
|
|
native.bbclass: Properly define directories
For most users this commit will have no effect. But if you come across the idea of giving
different names for paths, you'll get some troubles.
When a recipe inherit native, properly define bindir, sbindir, includedir, sysconfdir, datadir
(using xxxdir_native definitions from meta/conf/bitbake.conf).
For example, edit "${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}/quilt-native/temp/log.do_configure"
and see what are the arguments given by oe_runconf.
Notice that ${docdir}, ${mandir}, ${infodir}, ${localstatedir} have no associated _native definition.
(From OE-Core rev: 15345ddd4be6a0b041b3d6caaad48d46b22142e9)
Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-12 15:49:32 +00:00
|
|
|
bindir = "${STAGING_BINDIR_NATIVE}"
|
|
|
|
sbindir = "${STAGING_SBINDIR_NATIVE}"
|
|
|
|
libdir = "${STAGING_LIBDIR_NATIVE}"
|
|
|
|
includedir = "${STAGING_INCDIR_NATIVE}"
|
|
|
|
sysconfdir = "${STAGING_ETCDIR_NATIVE}"
|
|
|
|
datadir = "${STAGING_DATADIR_NATIVE}"
|
2011-07-11 07:23:14 +00:00
|
|
|
|
2011-10-06 22:13:54 +00:00
|
|
|
baselib = "lib"
|
|
|
|
|
2011-09-23 07:57:31 +00:00
|
|
|
# Libtool's default paths are correct for the native machine
|
|
|
|
lt_cv_sys_lib_dlsearch_path_spec[unexport] = "1"
|
|
|
|
|
2012-03-21 11:26:09 +00:00
|
|
|
NATIVE_PACKAGE_PATH_SUFFIX ?= ""
|
2011-05-31 07:07:35 +00:00
|
|
|
bindir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"
|
|
|
|
libdir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"
|
|
|
|
libexecdir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"
|
|
|
|
|
2012-11-03 17:01:32 +00:00
|
|
|
do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE}/"
|
|
|
|
do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_NATIVE}/"
|
2011-01-18 08:17:58 +00:00
|
|
|
|
2009-09-16 22:09:44 +00:00
|
|
|
# Since we actually install these into situ there is no staging prefix
|
|
|
|
STAGING_DIR_HOST = ""
|
|
|
|
STAGING_DIR_TARGET = ""
|
|
|
|
PKG_CONFIG_DIR = "${libdir}/pkgconfig"
|
2005-08-31 10:45:47 +00:00
|
|
|
|
2010-08-16 20:38:31 +00:00
|
|
|
EXTRA_NATIVE_PKGCONFIG_PATH ?= ""
|
2007-04-03 22:33:11 +00:00
|
|
|
PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}"
|
2007-11-12 11:30:16 +00:00
|
|
|
PKG_CONFIG_SYSROOT_DIR = ""
|
2009-01-03 11:27:13 +00:00
|
|
|
|
2011-12-01 03:07:07 +00:00
|
|
|
# we dont want libc-uclibc or libc-glibc to kick in for native recipes
|
|
|
|
LIBCOVERRIDE = ""
|
2012-02-11 02:58:28 +00:00
|
|
|
CLASSOVERRIDE = "class-native"
|
2014-08-25 19:01:17 +00:00
|
|
|
MACHINEOVERRIDES = ""
|
2011-12-01 03:07:07 +00:00
|
|
|
|
2012-06-26 17:53:54 +00:00
|
|
|
PATH_prepend = "${COREBASE}/scripts/native-intercept:"
|
2011-06-23 16:58:26 +00:00
|
|
|
|
2011-06-09 16:56:23 +00:00
|
|
|
python native_virtclass_handler () {
|
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-09 15:00:01 +00:00
|
|
|
classextend = e.data.getVar('BBCLASSEXTEND', True) or ""
|
2011-06-09 16:56:23 +00:00
|
|
|
if "native" not in classextend:
|
|
|
|
return
|
|
|
|
|
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-09 15:00:01 +00:00
|
|
|
pn = e.data.getVar("PN", True)
|
2011-06-09 16:56:23 +00:00
|
|
|
if not pn.endswith("-native"):
|
|
|
|
return
|
|
|
|
|
|
|
|
def map_dependencies(varname, d, suffix = ""):
|
|
|
|
if suffix:
|
|
|
|
varname = varname + "_" + suffix
|
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-09 15:00:01 +00:00
|
|
|
deps = d.getVar(varname, True)
|
2011-06-09 16:56:23 +00:00
|
|
|
if not deps:
|
|
|
|
return
|
|
|
|
deps = bb.utils.explode_deps(deps)
|
2009-11-09 16:04:51 +00:00
|
|
|
newdeps = []
|
|
|
|
for dep in deps:
|
2015-02-02 11:03:28 +00:00
|
|
|
if dep == pn:
|
|
|
|
continue
|
|
|
|
elif "-cross-" in dep:
|
2009-11-05 20:05:45 +00:00
|
|
|
newdeps.append(dep.replace("-cross", "-native"))
|
2009-11-09 16:04:51 +00:00
|
|
|
elif not dep.endswith("-native"):
|
2009-11-05 20:05:45 +00:00
|
|
|
newdeps.append(dep + "-native")
|
2009-01-03 11:27:13 +00:00
|
|
|
else:
|
2009-11-05 20:05:45 +00:00
|
|
|
newdeps.append(dep)
|
2011-11-25 14:25:16 +00:00
|
|
|
d.setVar(varname, " ".join(newdeps))
|
2011-06-09 16:56:23 +00:00
|
|
|
|
2015-07-21 11:16:03 +00:00
|
|
|
e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-native")
|
|
|
|
|
2011-06-09 16:56:23 +00:00
|
|
|
map_dependencies("DEPENDS", e.data)
|
2011-12-17 10:08:53 +00:00
|
|
|
for pkg in [e.data.getVar("PN", True), "", "${PN}"]:
|
2011-06-09 16:56:23 +00:00
|
|
|
map_dependencies("RDEPENDS", e.data, pkg)
|
|
|
|
map_dependencies("RRECOMMENDS", e.data, pkg)
|
|
|
|
map_dependencies("RSUGGESTS", e.data, pkg)
|
|
|
|
map_dependencies("RPROVIDES", e.data, pkg)
|
|
|
|
map_dependencies("RREPLACES", e.data, pkg)
|
|
|
|
|
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-09 15:00:01 +00:00
|
|
|
provides = e.data.getVar("PROVIDES", True)
|
2015-05-12 14:03:40 +00:00
|
|
|
nprovides = []
|
2011-06-09 16:56:23 +00:00
|
|
|
for prov in provides.split():
|
|
|
|
if prov.find(pn) != -1:
|
2015-05-25 07:52:22 +00:00
|
|
|
nprovides.append(prov)
|
|
|
|
elif not prov.endswith("-native"):
|
2015-05-12 14:03:40 +00:00
|
|
|
nprovides.append(prov.replace(prov, prov + "-native"))
|
2015-05-25 07:52:22 +00:00
|
|
|
else:
|
|
|
|
nprovides.append(prov)
|
2015-05-12 14:03:40 +00:00
|
|
|
e.data.setVar("PROVIDES", ' '.join(nprovides))
|
2011-06-09 16:56:23 +00:00
|
|
|
|
2015-07-21 11:16:03 +00:00
|
|
|
|
2009-01-03 11:27:13 +00:00
|
|
|
}
|
|
|
|
|
2011-06-09 16:56:23 +00:00
|
|
|
addhandler native_virtclass_handler
|
2013-06-12 16:31:57 +00:00
|
|
|
native_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"
|
2011-06-09 16:56:23 +00:00
|
|
|
|
2013-12-18 10:46:33 +00:00
|
|
|
deltask package
|
|
|
|
deltask packagedata
|
2014-09-01 14:34:36 +00:00
|
|
|
deltask package_qa
|
2013-12-18 10:46:33 +00:00
|
|
|
deltask package_write_ipk
|
|
|
|
deltask package_write_deb
|
|
|
|
deltask package_write_rpm
|
|
|
|
deltask package_write
|
2010-11-28 15:59:53 +00:00
|
|
|
|
2013-10-02 08:11:37 +00:00
|
|
|
do_packagedata[stamp-extra-info] = ""
|
2011-01-18 08:18:42 +00:00
|
|
|
do_populate_sysroot[stamp-extra-info] = ""
|
2013-08-20 17:13:14 +00:00
|
|
|
|
|
|
|
USE_NLS = "no"
|