blob: 4e3054b9ab67e50ed5726493b7234c7c4cd8919f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
SECTION = "x11/utils"
DEPENDS += "gnu-config-native virtual/libintl xt libxi \
zip-native gtk+ orbit2 libidl-native"
LICENSE = "MPL NPL"
SRC_URI += "file://mozconfig"
inherit gettext pkgconfig
# Parallel make is special in mozilla.
OLD_PARALLEL_MAKE := "${PARALLEL_MAKE}"
PARALLEL_MAKE = ""
EXTRA_OECONF = "--target=${TARGET_SYS} --host=${BUILD_SYS} \
--build=${BUILD_SYS} --prefix=${prefix}"
SELECTED_OPTIMIZATION = "-Os -fsigned-char -fno-strict-aliasing"
export CROSS_COMPILE = "1"
export MOZCONFIG = "${WORKDIR}/mozconfig"
export MOZ_OBJDIR = "${S}"
export CONFIGURE_ARGS = "${EXTRA_OECONF}"
export HOST_CC = "${BUILD_CC}"
export HOST_CXX = "${BUILD_CXX}"
export HOST_CFLAGS = "${BUILD_CFLAGS}"
export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}"
export HOST_LDFLAGS = "${BUILD_LDFLAGS}"
export HOST_RANLIB = "${BUILD_RANLIB}"
export HOST_AR = "${BUILD_AR}"
mozilla_do_configure() {
(
set -e
for cg in `find ${S} -name config.guess`; do
install -m 0755 \
${STAGING_DATADIR_NATIVE}/gnu-config/config.guess \
${STAGING_DATADIR_NATIVE}/gnu-config/config.sub \
`dirname $cg`/
done
)
# Put PARALLEL_MAKE into mozconfig
if [ ! -z "${OLD_PARALLEL_MAKE}" ] ; then
echo mk_add_options MOZ_MAKE_FLAGS=\"${OLD_PARALLEL_MAKE}\" \
>> ${MOZCONFIG}
fi
# Set the host libIDL stuff correctly.
export HOST_LIBIDL_CONFIG="PKG_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/pkgconfig pkg-config libIDL-2.0"
# Due to sysroot we need to sed out references to the target staging
# when building the native version of xpidl Symptons of the failure
# include "gthread.h:344: error: size of array 'type name' is negative"
export HOST_LIBIDL_CFLAGS="`${HOST_LIBIDL_CONFIG} --cflags | sed -e s:${STAGING_DIR_TARGET}:${STAGING_DIR_NATIVE}:g`"
export HOST_LIBIDL_LIBS="`${HOST_LIBIDL_CONFIG} --libs`"
if [ -e ${MOZ_OBJDIR}/Makefile ] ; then
oe_runmake -f client.mk ${MOZ_OBJDIR}/Makefile \
${MOZ_OBJDIR}/config.status
fi
}
mozilla_do_compile() {
oe_runmake -f client.mk build_all
}
mozilla_do_install() {
oe_runmake DESTDIR="${D}" destdir="${D}" install
}
EXPORT_FUNCTIONS do_configure do_compile do_install
|