diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-09-17 13:18:48 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-09-17 22:25:25 +0100 |
commit | 3fbbc44cfd0d68c67bda0f6180773922431cca0e (patch) | |
tree | 3323fd0f69941ea8036e5c01ac166fd7f608d656 /meta | |
parent | 1c1305d15ced383ff23ede8fa9117db75a61b8b9 (diff) | |
download | poky-3fbbc44cfd0d68c67bda0f6180773922431cca0e.tar.gz |
nativesdk/package_ipk.bbclass: Clean up sdk package architectures
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/cross-canadian.bbclass | 16 | ||||
-rw-r--r-- | meta/classes/crosssdk.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/nativesdk.bbclass | 5 | ||||
-rw-r--r-- | meta/classes/package_ipk.bbclass | 19 |
4 files changed, 20 insertions, 22 deletions
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass index 334f12cdae..bd738ecd4d 100644 --- a/meta/classes/cross-canadian.bbclass +++ b/meta/classes/cross-canadian.bbclass | |||
@@ -6,7 +6,8 @@ EXCLUDE_FROM_WORLD = "1" | |||
6 | OLD_MULTIMACH_ARCH := "${MULTIMACH_ARCH}" | 6 | OLD_MULTIMACH_ARCH := "${MULTIMACH_ARCH}" |
7 | # Save PACKAGE_ARCH | 7 | # Save PACKAGE_ARCH |
8 | OLD_PACKAGE_ARCH := ${PACKAGE_ARCH} | 8 | OLD_PACKAGE_ARCH := ${PACKAGE_ARCH} |
9 | PACKAGE_ARCH = "${HOST_ARCH}-${OLD_PACKAGE_ARCH}-nativesdk" | 9 | PACKAGE_ARCH = "${SDK_ARCH}-${TARGET_ARCH}-canadian" |
10 | PACKAGE_ARCHS = "${PACKAGE_ARCH}" | ||
10 | # Also save BASE_PACKAGE_ARCH since HOST_ARCH can influence it | 11 | # Also save BASE_PACKAGE_ARCH since HOST_ARCH can influence it |
11 | OLD_BASE_PACKAGE_ARCH := "${BASE_PACKAGE_ARCH}" | 12 | OLD_BASE_PACKAGE_ARCH := "${BASE_PACKAGE_ARCH}" |
12 | BASE_PACKAGE_ARCH = "${OLD_BASE_PACKAGE_ARCH}" | 13 | BASE_PACKAGE_ARCH = "${OLD_BASE_PACKAGE_ARCH}" |
@@ -17,7 +18,7 @@ STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk" | |||
17 | STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}" | 18 | STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}" |
18 | 19 | ||
19 | PATH_append = ":${TMPDIR}/cross/${HOST_ARCH}/${bindir_cross}" | 20 | PATH_append = ":${TMPDIR}/cross/${HOST_ARCH}/${bindir_cross}" |
20 | PKGDATA_DIR = "${TMPDIR}/pkgdata/${MULTIMACH_HOST_SYS}" | 21 | PKGDATA_DIR = "${TMPDIR}/pkgdata/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}" |
21 | 22 | ||
22 | HOST_ARCH = "${SDK_ARCH}" | 23 | HOST_ARCH = "${SDK_ARCH}" |
23 | HOST_VENDOR = "${SDK_VENDOR}" | 24 | HOST_VENDOR = "${SDK_VENDOR}" |
@@ -43,14 +44,3 @@ FILES_${PN}-dbg += "${prefix}/.debug \ | |||
43 | export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${layout_libdir}/pkgconfig" | 44 | export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${layout_libdir}/pkgconfig" |
44 | export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" | 45 | export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" |
45 | 46 | ||
46 | python () { | ||
47 | barch = bb.data.getVar('HOST_ARCH', d, True) | ||
48 | archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split() | ||
49 | sdkarchs = [] | ||
50 | for arch in archs: | ||
51 | sdkarchs.append(barch + '-' + arch + '-nativesdk') | ||
52 | bb.data.setVar('PACKAGE_ARCHS', " ".join(sdkarchs), d) | ||
53 | } | ||
54 | |||
55 | |||
56 | |||
diff --git a/meta/classes/crosssdk.bbclass b/meta/classes/crosssdk.bbclass index 66be3ee216..0b1af8fc2f 100644 --- a/meta/classes/crosssdk.bbclass +++ b/meta/classes/crosssdk.bbclass | |||
@@ -4,7 +4,7 @@ PACKAGES = "" | |||
4 | 4 | ||
5 | BASE_PACKAGE_ARCH = "${SDK_ARCH}" | 5 | BASE_PACKAGE_ARCH = "${SDK_ARCH}" |
6 | PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}" | 6 | PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}" |
7 | STAGING_DIR_TARGET = "${STAGING_DIR}/${SDK_ARCH}-${TARGET_ARCH}-nativesdk${TARGET_VENDOR}-${TARGET_OS}" | 7 | STAGING_DIR_TARGET = "${STAGING_DIR}/${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}" |
8 | 8 | ||
9 | TARGET_ARCH = "${SDK_ARCH}" | 9 | TARGET_ARCH = "${SDK_ARCH}" |
10 | TARGET_VENDOR = "${SDK_VENDOR}" | 10 | TARGET_VENDOR = "${SDK_VENDOR}" |
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass index 964d39955b..b0273ace0f 100644 --- a/meta/classes/nativesdk.bbclass +++ b/meta/classes/nativesdk.bbclass | |||
@@ -6,13 +6,12 @@ EXCLUDE_FROM_WORLD = "1" | |||
6 | # Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS | 6 | # Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS |
7 | # | 7 | # |
8 | OLD_PACKAGE_ARCH := ${BASE_PACKAGE_ARCH} | 8 | OLD_PACKAGE_ARCH := ${BASE_PACKAGE_ARCH} |
9 | BASE_PACKAGE_ARCH = "${HOST_ARCH}-${OLD_PACKAGE_ARCH}-nativesdk" | 9 | BASE_PACKAGE_ARCH = "${SDK_ARCH}-nativesdk" |
10 | python () { | 10 | python () { |
11 | barch = bb.data.getVar('HOST_ARCH', d, True) | ||
12 | archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split() | 11 | archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split() |
13 | sdkarchs = [] | 12 | sdkarchs = [] |
14 | for arch in archs: | 13 | for arch in archs: |
15 | sdkarchs.append(barch + '-' + arch + '-nativesdk') | 14 | sdkarchs.append(arch + '-nativesdk') |
16 | bb.data.setVar('PACKAGE_ARCHS', " ".join(sdkarchs), d) | 15 | bb.data.setVar('PACKAGE_ARCHS', " ".join(sdkarchs), d) |
17 | } | 16 | } |
18 | 17 | ||
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index ebd8320a2c..68a8b5c40b 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass | |||
@@ -37,7 +37,7 @@ python package_ipk_install () { | |||
37 | bb.error("PACKAGE_ARCHS missing") | 37 | bb.error("PACKAGE_ARCHS missing") |
38 | raise FuncFailed | 38 | raise FuncFailed |
39 | ipkg_archs = ipkg_archs.split() | 39 | ipkg_archs = ipkg_archs.split() |
40 | arch_priority = 1 | 40 | arch_priority = 1na |
41 | 41 | ||
42 | f = open(conffile,"w") | 42 | f = open(conffile,"w") |
43 | for arch in ipkg_archs: | 43 | for arch in ipkg_archs: |
@@ -75,9 +75,12 @@ package_update_index_ipk () { | |||
75 | 75 | ||
76 | packagedirs="${DEPLOY_DIR_IPK}" | 76 | packagedirs="${DEPLOY_DIR_IPK}" |
77 | for arch in $ipkgarchs; do | 77 | for arch in $ipkgarchs; do |
78 | packagedirs="$packagedirs ${DEPLOY_DIR_IPK}/$arch ${DEPLOY_DIR_IPK}/${SDK_ARCH}-$arch-nativesdk" | 78 | sdkarch=`echo $arch | sed -e 's/${HOST_ARCH}/${SDK_ARCH}/'` |
79 | packagedirs="$packagedirs ${DEPLOY_DIR_IPK}/$arch ${DEPLOY_DIR_IPK}/$sdkarch-nativesdk" | ||
79 | done | 80 | done |
80 | 81 | ||
82 | packagedirs="$packagedirs ${DEPLOY_DIR_IPK}/${SDK_ARCH}-${TARGET_ARCH}-canadian" | ||
83 | |||
81 | for pkgdir in $packagedirs; do | 84 | for pkgdir in $packagedirs; do |
82 | if [ -e $pkgdir/ ]; then | 85 | if [ -e $pkgdir/ ]; then |
83 | touch $pkgdir/Packages | 86 | touch $pkgdir/Packages |
@@ -100,20 +103,26 @@ package_generate_ipkg_conf () { | |||
100 | if [ -e ${DEPLOY_DIR_IPK}/$arch/Packages ] ; then | 103 | if [ -e ${DEPLOY_DIR_IPK}/$arch/Packages ] ; then |
101 | echo "src oe-$arch file:${DEPLOY_DIR_IPK}/$arch" >> ${IPKGCONF_TARGET} | 104 | echo "src oe-$arch file:${DEPLOY_DIR_IPK}/$arch" >> ${IPKGCONF_TARGET} |
102 | fi | 105 | fi |
103 | if [ -e ${DEPLOY_DIR_IPK}/${SDK_ARCH}-$arch-nativesdk/Packages ] ; then | 106 | sdkarch=`echo $arch | sed -e 's/${HOST_ARCH}/${SDK_ARCH}/'` |
104 | echo "src oe-${SDK_ARCH}-$arch-nativesdk file:${DEPLOY_DIR_IPK}/${SDK_ARCH}-$arch-nativesdk" >> ${IPKGCONF_SDK} | 107 | if [ -e ${DEPLOY_DIR_IPK}/$sdkarch-nativesdk/Packages ] ; then |
108 | echo "src oe-$sdkarch-nativesdk file:${DEPLOY_DIR_IPK}/$sdkarch-nativesdk" >> ${IPKGCONF_SDK} | ||
105 | fi | 109 | fi |
106 | done | 110 | done |
111 | if [ -e ${DEPLOY_DIR_IPK}/${SDK_ARCH}-${TARGET_ARCH}-canadian/Packages ] ; then | ||
112 | echo "src oe-${SDK_ARCH}-${TARGET_ARCH}-canadian file:${DEPLOY_DIR_IPK}/${SDK_ARCH}-${TARGET_ARCH}-canadian" >> ${IPKGCONF_SDK} | ||
113 | fi | ||
107 | } | 114 | } |
108 | 115 | ||
109 | package_generate_archlist () { | 116 | package_generate_archlist () { |
110 | ipkgarchs="${PACKAGE_ARCHS}" | 117 | ipkgarchs="${PACKAGE_ARCHS}" |
111 | priority=1 | 118 | priority=1 |
112 | for arch in $ipkgarchs; do | 119 | for arch in $ipkgarchs; do |
120 | sdkarch=`echo $arch | sed -e 's/${HOST_ARCH}/${SDK_ARCH}/'` | ||
113 | echo "arch $arch $priority" >> ${IPKGCONF_TARGET} | 121 | echo "arch $arch $priority" >> ${IPKGCONF_TARGET} |
114 | echo "arch ${SDK_ARCH}-$arch-nativesdk $priority" >> ${IPKGCONF_SDK} | 122 | echo "arch $sdkarch-nativesdk $priority" >> ${IPKGCONF_SDK} |
115 | priority=$(expr $priority + 5) | 123 | priority=$(expr $priority + 5) |
116 | done | 124 | done |
125 | echo "arch ${SDK_ARCH}-${TARGET_ARCH}-canadian $priority" >> ${IPKGCONF_SDK} | ||
117 | } | 126 | } |
118 | 127 | ||
119 | python do_package_ipk () { | 128 | python do_package_ipk () { |