summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/autotools.bbclass7
-rw-r--r--meta/classes/cpan.bbclass3
-rw-r--r--meta/classes/cpan_build.bbclass1
-rw-r--r--meta/classes/cross.bbclass4
-rw-r--r--meta/classes/native.bbclass24
-rw-r--r--meta/classes/staging.bbclass62
-rw-r--r--meta/classes/xlibs.bbclass8
7 files changed, 22 insertions, 87 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 20dc72a1df..649e269f3e 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -1,6 +1,3 @@
1# use autotools_stage_all for native packages
2AUTOTOOLS_NATIVE_STAGE_INSTALL = "1"
3
4def autotools_dep_prepend(d): 1def autotools_dep_prepend(d):
5 if bb.data.getVar('INHIBIT_AUTOTOOLS_DEPS', d, 1): 2 if bb.data.getVar('INHIBIT_AUTOTOOLS_DEPS', d, 1):
6 return '' 3 return ''
@@ -204,8 +201,4 @@ autotools_stage_all() {
204 rm -rf ${STAGE_TEMP} 201 rm -rf ${STAGE_TEMP}
205} 202}
206 203
207do_stage () {
208 autotools_stage_all
209}
210
211EXPORT_FUNCTIONS do_configure do_install 204EXPORT_FUNCTIONS do_configure do_install
diff --git a/meta/classes/cpan.bbclass b/meta/classes/cpan.bbclass
index 3b1280c07b..513f0b3ce7 100644
--- a/meta/classes/cpan.bbclass
+++ b/meta/classes/cpan.bbclass
@@ -31,9 +31,8 @@ cpan_do_compile () {
31 oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" LD="${CCLD}" 31 oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" LD="${CCLD}"
32} 32}
33 33
34NATIVE_INSTALL_WORKS = "1"
35cpan_do_install () { 34cpan_do_install () {
36 oe_runmake DESTDIR="${D}" install_vendor 35 oe_runmake DESTDIR="${D}" install_vendor
37} 36}
38 37
39EXPORT_FUNCTIONS do_configure do_compile do_install do_stage 38EXPORT_FUNCTIONS do_configure do_compile do_install
diff --git a/meta/classes/cpan_build.bbclass b/meta/classes/cpan_build.bbclass
index 944e8d4ac0..dd8d5434d5 100644
--- a/meta/classes/cpan_build.bbclass
+++ b/meta/classes/cpan_build.bbclass
@@ -42,7 +42,6 @@ cpan_build_do_compile () {
42 perl Build 42 perl Build
43} 43}
44 44
45NATIVE_INSTALL_WORKS = "1"
46cpan_build_do_install () { 45cpan_build_do_install () {
47 perl Build install 46 perl Build install
48} 47}
diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
index b7dbd86c35..de44e99d70 100644
--- a/meta/classes/cross.bbclass
+++ b/meta/classes/cross.bbclass
@@ -50,10 +50,6 @@ do_install () {
50 oe_runmake 'DESTDIR=${D}' install 50 oe_runmake 'DESTDIR=${D}' install
51} 51}
52 52
53do_stage () {
54 autotools_stage_all
55}
56
57# 53#
58# Override the default sysroot staging copy since this won't look like a target system 54# Override the default sysroot staging copy since this won't look like a target system
59# 55#
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 9d678fd802..529f1c259d 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -66,25 +66,6 @@ STAGING_DIR_TARGET = ""
66SHLIBSDIR = "${STAGING_DIR_NATIVE}/shlibs" 66SHLIBSDIR = "${STAGING_DIR_NATIVE}/shlibs"
67PKG_CONFIG_DIR = "${libdir}/pkgconfig" 67PKG_CONFIG_DIR = "${libdir}/pkgconfig"
68 68
69#
70# If changing this function, please make sure packaged-staging.bbclass is
71# updated too
72#
73do_stage_native () {
74 # If autotools is active, use the autotools staging function, else
75 # use our "make install" equivalent
76 if [ "${AUTOTOOLS_NATIVE_STAGE_INSTALL}" == "1" ]
77 then
78 autotools_stage_all
79 else
80 oe_runmake install
81 fi
82}
83
84do_stage () {
85 do_stage_native
86}
87
88PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}" 69PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}"
89PKG_CONFIG_SYSROOT_DIR = "" 70PKG_CONFIG_SYSROOT_DIR = ""
90 71
@@ -93,11 +74,6 @@ ORIG_DEPENDS := "${DEPENDS}"
93DEPENDS_virtclass-native ?= "${ORIG_DEPENDS}" 74DEPENDS_virtclass-native ?= "${ORIG_DEPENDS}"
94 75
95python __anonymous () { 76python __anonymous () {
96 # If we've a legacy native do_stage, we need to neuter do_install
97 stagefunc = bb.data.getVar('do_stage', d, True)
98 if (stagefunc.strip() != "do_stage_native" and stagefunc.strip() != "autotools_stage_all") and bb.data.getVar('AUTOTOOLS_NATIVE_STAGE_INSTALL', d, 1) == "1":
99 bb.data.setVar("do_install", " :", d)
100
101 if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""): 77 if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""):
102 pn = bb.data.getVar("PN", d, True) 78 pn = bb.data.getVar("PN", d, True)
103 depends = bb.data.getVar("DEPENDS_virtclass-native", d, True) 79 depends = bb.data.getVar("DEPENDS_virtclass-native", d, True)
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index b771b92fae..0b2e457a93 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -76,21 +76,6 @@ sysroot_stage_all() {
76 sysroot_stage_dirs ${D} ${SYSROOT_DESTDIR} 76 sysroot_stage_dirs ${D} ${SYSROOT_DESTDIR}
77} 77}
78 78
79def is_legacy_staging(d):
80 stagefunc = bb.data.getVar('do_stage', d, True)
81 legacy = True
82 if stagefunc is None:
83 legacy = False
84 elif stagefunc.strip() == "use_do_install_for_stage":
85 legacy = False
86 elif stagefunc.strip() == "autotools_stage_all":
87 legacy = False
88 elif stagefunc.strip() == "do_stage_native" and bb.data.getVar('AUTOTOOLS_NATIVE_STAGE_INSTALL', d, 1) == "1":
89 legacy = False
90 elif bb.data.getVar('NATIVE_INSTALL_WORKS', d, 1) == "1":
91 legacy = False
92 return legacy
93
94do_populate_sysroot[dirs] = "${STAGING_DIR_TARGET}/${bindir} ${STAGING_DIR_TARGET}/${libdir} \ 79do_populate_sysroot[dirs] = "${STAGING_DIR_TARGET}/${bindir} ${STAGING_DIR_TARGET}/${libdir} \
95 ${STAGING_DIR_TARGET}/${includedir} \ 80 ${STAGING_DIR_TARGET}/${includedir} \
96 ${STAGING_BINDIR_NATIVE} ${STAGING_LIBDIR_NATIVE} \ 81 ${STAGING_BINDIR_NATIVE} ${STAGING_LIBDIR_NATIVE} \
@@ -119,36 +104,31 @@ python do_populate_sysroot () {
119 pstageactive = (bb.data.getVar("PSTAGING_ACTIVE", d, True) == "1") 104 pstageactive = (bb.data.getVar("PSTAGING_ACTIVE", d, True) == "1")
120 lockfile = bb.data.getVar("SYSROOT_LOCK", d, True) 105 lockfile = bb.data.getVar("SYSROOT_LOCK", d, True)
121 stagefunc = bb.data.getVar('do_stage', d, True) 106 stagefunc = bb.data.getVar('do_stage', d, True)
122 legacy = is_legacy_staging(d) 107
123 if legacy: 108 dest = bb.data.getVar('D', d, True)
124 bb.data.setVar("SYSROOT_DESTDIR", "", d) 109 sysrootdest = bb.data.expand('${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}', d)
125 bb.note("Legacy staging mode for %s" % bb.data.getVar("FILE", d, True)) 110 bb.mkdirhier(sysrootdest)
126 lock = bb.utils.lockfile(lockfile) 111
127 bb.build.exec_func('populate_sysroot_prehook', d) 112 bb.build.exec_func("sysroot_stage_all", d)
128 bb.build.exec_func('do_stage', d) 113 #os.system('cp -pPR %s/* %s/' % (dest, sysrootdest))
129 for f in (bb.data.getVar('SYSROOT_PREPROCESS_FUNCS', d, True) or '').split(): 114 for f in (bb.data.getVar('SYSROOT_PREPROCESS_FUNCS', d, True) or '').split():
130 bb.build.exec_func(f, d) 115 bb.build.exec_func(f, d)
131 bb.build.exec_func('populate_sysroot_posthook', d) 116 bb.build.exec_func("packagedstaging_fastpath", d)
132 bb.utils.unlockfile(lock) 117
133 else: 118 lock = bb.utils.lockfile(lockfile)
134 dest = bb.data.getVar('D', d, True) 119 os.system(bb.data.expand('cp -pPR ${SYSROOT_DESTDIR}${TMPDIR}/* ${TMPDIR}/', d))
135 sysrootdest = bb.data.expand('${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}', d) 120 bb.utils.unlockfile(lock)
136 bb.mkdirhier(sysrootdest)
137
138 bb.build.exec_func("sysroot_stage_all", d)
139 #os.system('cp -pPR %s/* %s/' % (dest, sysrootdest))
140 for f in (bb.data.getVar('SYSROOT_PREPROCESS_FUNCS', d, True) or '').split():
141 bb.build.exec_func(f, d)
142 bb.build.exec_func("packagedstaging_fastpath", d)
143
144 lock = bb.utils.lockfile(lockfile)
145 os.system(bb.data.expand('cp -pPR ${SYSROOT_DESTDIR}${TMPDIR}/* ${TMPDIR}/', d))
146 bb.utils.unlockfile(lock)
147} 121}
148 122
123def is_legacy_staging(d):
124 stagefunc = bb.data.getVar('do_stage', d, True)
125 if stagefunc is None:
126 return False
127 return True
128
149python () { 129python () {
150 if is_legacy_staging(d): 130 if is_legacy_staging(d):
151 bb.note("Legacy staging mode for %s" % bb.data.getVar("FILE", d, True)) 131 bb.fatal("Legacy staging found for %s as it has a do_stage function. This will need conversion to a do_install or often simply removal to work with Poky" % bb.data.getVar("FILE", d, True))
152} 132}
153 133
154 134
diff --git a/meta/classes/xlibs.bbclass b/meta/classes/xlibs.bbclass
index fc52400b9f..7271d7b029 100644
--- a/meta/classes/xlibs.bbclass
+++ b/meta/classes/xlibs.bbclass
@@ -5,11 +5,3 @@ XLIBS_CVS = "${FREEDESKTOP_CVS}/xlibs"
5 5
6inherit autotools pkgconfig 6inherit autotools pkgconfig
7 7
8do_stage() {
9 oe_runmake install prefix=${STAGING_DIR_HOST}${prefix} \
10 bindir=${STAGING_BINDIR} \
11 includedir=${STAGING_INCDIR} \
12 libdir=${STAGING_LIBDIR} \
13 datadir=${STAGING_DATADIR} \
14 mandir=${STAGING_DIR_HOST}${mandir}
15}