merge of 'ebb880278ddb813fb7b527d822caeb57adc81179'
[openembedded.git] / classes / mozilla.bbclass
blobbd8e9193d92fb50b471a77d35b36ef2b710d1ef8
1 SECTION = "x11/utils"
2 DEPENDS += "gnu-config-native virtual/libintl xt libxi \
3             zip-native gtk+ orbit2 libidl-native"
4 LICENSE = "MPL NPL"
5 SRC_URI += "file://mozconfig"
7 inherit gettext pkgconfig
9 EXTRA_OECONF = "--target=${TARGET_SYS} --host=${BUILD_SYS} \
10                 --build=${BUILD_SYS} --prefix=${prefix}"
11 EXTRA_OEMAKE = "'HOST_LIBIDL_LIBS=${HOST_LIBIDL_LIBS}' \
12                 'HOST_LIBIDL_CFLAGS=${HOST_LIBIDL_CFLAGS}'"
13 SELECTED_OPTIMIZATION = "-Os -fsigned-char -fno-strict-aliasing"
15 export CROSS_COMPILE = "1"
16 export MOZCONFIG = "${WORKDIR}/mozconfig"
17 export MOZ_OBJDIR = "${S}"
19 export CONFIGURE_ARGS = "${EXTRA_OECONF}"
20 export HOST_LIBIDL_CFLAGS = "`${HOST_LIBIDL_CONFIG} --cflags`"
21 export HOST_LIBIDL_LIBS = "`${HOST_LIBIDL_CONFIG} --libs`"
22 export HOST_LIBIDL_CONFIG = "PKG_CONFIG_PATH=${STAGING_DIR}/${BUILD_SYS}/share/pkgconfig pkg-config libIDL-2.0"
23 export HOST_CC = "${BUILD_CC}"
24 export HOST_CXX = "${BUILD_CXX}"
25 export HOST_CFLAGS = "${BUILD_CFLAGS}"
26 export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}"
27 export HOST_LDFLAGS = "${BUILD_LDFLAGS}"
28 export HOST_RANLIB = "${BUILD_RANLIB}"
29 export HOST_AR = "${BUILD_AR}"
31 mozilla_do_configure() {
32         (
33                 set -e
34                 for cg in `find ${S} -name config.guess`; do
35                         install -m 0755 \
36                         ${STAGING_DIR}/${BUILD_SYS}/share/gnu-config/config.guess \
37                         ${STAGING_DIR}/${BUILD_SYS}/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
45 mozilla_do_compile() {
46         oe_runmake -f client.mk build_all
49 mozilla_do_install() {
50         oe_runmake DESTDIR="${D}" destdir="${D}" install
53 EXPORT_FUNCTIONS do_configure do_compile do_install