python-pyside: add shiboken-native as dependency and bump INC_PR
[openembedded.git] / classes / nativesdk.bbclass
blob66893995d0a16b8f6935ebf82965d4654d90ab98
1 # SDK packages are built either explicitly by the user,
2 # or indirectly via dependency.  No need to be in 'world'.
3 EXCLUDE_FROM_WORLD = "1"
6 # Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS
8 OLD_PACKAGE_ARCH := ${BASE_PACKAGE_ARCH}
9 BASE_PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
10 python () {
11     archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split()
12     sdkarchs = []
13     for arch in archs:
14         sdkarchs.append(arch + '-nativesdk')
15     bb.data.setVar('PACKAGE_ARCHS', " ".join(sdkarchs), d)
18 #STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk"
19 #STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}-nativesdk"
21 HOST_ARCH = "${SDK_ARCH}"
22 HOST_VENDOR = "${SDK_VENDOR}"
23 HOST_OS = "${SDK_OS}"
24 HOST_PREFIX = "${SDK_PREFIX}"
25 HOST_CC_ARCH = "${SDK_CC_ARCH}"
26 #HOST_SYS = "${HOST_ARCH}${TARGET_VENDOR}-${HOST_OS}"
28 TARGET_ARCH = "${SDK_ARCH}"
29 TARGET_VENDOR = "${SDK_VENDOR}"
30 TARGET_OS = "${SDK_OS}"
31 TARGET_PREFIX = "${SDK_PREFIX}"
32 TARGET_CC_ARCH = "${SDK_CC_ARCH}"
34 CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
35 CFLAGS = "${BUILDSDK_CFLAGS}"
36 CXXFLAGS = "${BUILDSDK_CFLAGS}"
37 LDFLAGS = "${BUILDSDK_LDFLAGS}"
39 TOOLCHAIN_OPTIONS = ""
41 # Change to place files in SDKPATH
42 prefix = "${SDKPATH}"
43 exec_prefix = "${SDKPATH}"
44 base_prefix = "${SDKPATH}"
46 FILES_${PN} += "${prefix}"
47 FILES_${PN}-dbg += "${prefix}/.debug \
48                     ${prefix}/bin/.debug \
49                    "
51 export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig"
52 export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
54 ORIG_DEPENDS := "${DEPENDS}"
55 DEPENDS_virtclass-nativesdk ?= "${ORIG_DEPENDS}"
57 OVERRIDES =. "virtclass-nativesdk:"
59 python __anonymous () {
60     pn = bb.data.getVar("PN", d, True)
61     depends = bb.data.getVar("DEPENDS_virtclass-nativesdk", d, True)
62     deps = bb.utils.explode_deps(depends)
63     newdeps = []
64     for dep in deps:
65         if dep.endswith("-native") or dep.endswith("-cross"):
66             newdeps.append(dep)
67         elif dep.endswith("-gcc-intermediate") or dep.endswith("-gcc-initial") or dep.endswith("-gcc"):
68             newdeps.append(dep + "-crosssdk")
69         elif not dep.endswith("-nativesdk"):
70             newdeps.append(dep + "-nativesdk")
71         else:
72             newdeps.append(dep)
73     bb.data.setVar("DEPENDS_virtclass-nativesdk", " ".join(newdeps), d)
74     provides = bb.data.getVar("PROVIDES", d, True)
75     for prov in provides.split():
76         if prov.find(pn) != -1:
77             continue
78         if not prov.endswith("-nativesdk"):
79             provides = provides.replace(prov, prov + "-nativesdk")
80     bb.data.setVar("PROVIDES", provides, d)