summaryrefslogtreecommitdiffstats
path: root/meta/classes/mozilla.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/mozilla.bbclass')
-rw-r--r--meta/classes/mozilla.bbclass53
1 files changed, 53 insertions, 0 deletions
diff --git a/meta/classes/mozilla.bbclass b/meta/classes/mozilla.bbclass
new file mode 100644
index 0000000000..629f2531da
--- /dev/null
+++ b/meta/classes/mozilla.bbclass
@@ -0,0 +1,53 @@
1SECTION = "x11/utils"
2DEPENDS += "gnu-config-native virtual/libintl xt libxi \
3 zip-native gtk+ orbit2 libidl-native"
4LICENSE = "MPL NPL"
5SRC_URI += "file://mozconfig"
6
7inherit gettext
8
9EXTRA_OECONF = "--target=${TARGET_SYS} --host=${BUILD_SYS} \
10 --build=${BUILD_SYS} --prefix=${prefix}"
11EXTRA_OEMAKE = "'HOST_LIBIDL_LIBS=${HOST_LIBIDL_LIBS}' \
12 'HOST_LIBIDL_CFLAGS=${HOST_LIBIDL_CFLAGS}'"
13SELECTED_OPTIMIZATION = "-Os -fsigned-char -fno-strict-aliasing"
14
15export CROSS_COMPILE = "1"
16export MOZCONFIG = "${WORKDIR}/mozconfig"
17export MOZ_OBJDIR = "${S}"
18
19export CONFIGURE_ARGS = "${EXTRA_OECONF}"
20export HOST_LIBIDL_CFLAGS = "`${HOST_LIBIDL_CONFIG} --cflags`"
21export HOST_LIBIDL_LIBS = "`${HOST_LIBIDL_CONFIG} --libs`"
22export HOST_LIBIDL_CONFIG = "PKG_CONFIG_PATH=${STAGING_BINDIR}/../share/pkgconfig pkg-config libIDL-2.0"
23export HOST_CC = "${BUILD_CC}"
24export HOST_CXX = "${BUILD_CXX}"
25export HOST_CFLAGS = "${BUILD_CFLAGS}"
26export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}"
27export HOST_LDFLAGS = "${BUILD_LDFLAGS}"
28export HOST_RANLIB = "${BUILD_RANLIB}"
29export HOST_AR = "${BUILD_AR}"
30
31mozilla_do_configure() {
32 (
33 set -e
34 for cg in `find ${S} -name config.guess`; do
35 install -m 0755 \
36 ${STAGING_BINDIR}/../share/gnu-config/config.guess \
37 ${STAGING_BINDIR}/../share/gnu-config/config.sub \
38 `dirname $cg`/
39 done
40 )
41 oe_runmake -f client.mk ${MOZ_OBJDIR}/Makefile \
42 ${MOZ_OBJDIR}/config.status
43}
44
45mozilla_do_compile() {
46 oe_runmake -f client.mk build_all
47}
48
49mozilla_do_install() {
50 oe_runmake DESTDIR="${D}" destdir="${D}" install
51}
52
53EXPORT_FUNCTIONS do_configure do_compile do_install