diff options
Diffstat (limited to 'meta-moblin/packages/mozilla-headless/mozilla-headless_hg.bb')
| -rw-r--r-- | meta-moblin/packages/mozilla-headless/mozilla-headless_hg.bb | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/meta-moblin/packages/mozilla-headless/mozilla-headless_hg.bb b/meta-moblin/packages/mozilla-headless/mozilla-headless_hg.bb new file mode 100644 index 0000000000..669c526163 --- /dev/null +++ b/meta-moblin/packages/mozilla-headless/mozilla-headless_hg.bb | |||
| @@ -0,0 +1,99 @@ | |||
| 1 | |||
| 2 | #file://0001-Adds-initial-Gtk-clipboard-support-to-moz-headless.patch;patch=1 \ | ||
| 3 | SRC_URI = "hg://hg.mozilla.org/incubator;protocol=http;module=offscreen \ | ||
| 4 | file://configurefix-1a622cb7c384.patch;patch=1;rev=1a622cb7c384 \ | ||
| 5 | file://configurefix.patch;patch=1;notrev=1a622cb7c384 \ | ||
| 6 | file://mozilla-jemalloc.patch;patch=1 \ | ||
| 7 | file://removebadrpath-1a622cb7c384.patch;patch=1;rev=1a622cb7c384 \ | ||
| 8 | file://removebadrpath.patch;patch=1;notrev=1a622cb7c384 \ | ||
| 9 | file://buildfixhack.patch;patch=1;notrev=1a622cb7c384 \ | ||
| 10 | file://autoconffix.patch;patch=1 \ | ||
| 11 | file://jsautocfg.h \ | ||
| 12 | file://mozconfig" | ||
| 13 | PV = "0.2+hg-1.0+${SRCPV}" | ||
| 14 | PR = "r10" | ||
| 15 | |||
| 16 | S = "${WORKDIR}/offscreen" | ||
| 17 | |||
| 18 | DEPENDS = "gconf gnome-vfs pango dbus-glib alsa-lib libidl-native sqlite3 libidl" | ||
| 19 | |||
| 20 | FILES_${PN} += "${libdir}/xulrunner-${XULVERSION} ${libdir}/xulrunner-devel-${XULVERSION}/sdk/lib/*.so" | ||
| 21 | FILES_${PN}-dev += "${libdir}/xulrunner-devel-${XULVERSION}" | ||
| 22 | FILES_${PN}-dbg += "${libdir}/xulrunner-devel-${XULVERSION}/sdk/lib/.debug" | ||
| 23 | |||
| 24 | # Mozilla's build rules search for -L paths to find libraries. Its | ||
| 25 | # not clever enough to know where the sysroot is and hence finds host | ||
| 26 | # object files which is bad. We therefore tell pkg-config not to hide | ||
| 27 | # paths. See config/rules.mk and the LIBS_DEPS and _LIBDIRS variables. | ||
| 28 | export PKG_CONFIG_ALLOW_SYSTEM_LIBS = "1" | ||
| 29 | |||
| 30 | TARGET_CC_ARCH = "" | ||
| 31 | |||
| 32 | CFLAGS = "${TARGET_CFLAGS}" | ||
| 33 | TARGET_CFLAGS = "-Os -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse -fasynchronous-unwind-tables" | ||
| 34 | |||
| 35 | LDFLAGS = "${TARGET_LDFLAGS}" | ||
| 36 | TARGET_LDFLAGS = "-Wl,-rpath,${libdir}/xulrunner-${XULVERSION}" | ||
| 37 | |||
| 38 | export target_alias=${TARGET_PREFIX} | ||
| 39 | |||
| 40 | inherit autotools mozilla | ||
| 41 | |||
| 42 | acpaths = "-I ${S}/build/autoconf " | ||
| 43 | |||
| 44 | export topsrcdir = "${S}" | ||
| 45 | |||
| 46 | do_configure () { | ||
| 47 | if [ "${SRCREV}" != "1a622cb7c384" ]; then | ||
| 48 | rm -rf ${S}/build/autoconf/acwinpaths.m4 | ||
| 49 | rm -rf ${S}/js/src/build/autoconf/acwinpaths.m4 | ||
| 50 | rm -rf ${S}/nsprpub/build/autoconf/acwinpaths.m4 | ||
| 51 | mkdir -p ${S}/js/src/dist/include | ||
| 52 | ln -fs ../../../../nsprpub/dist/include/nspr ${S}/js/src/dist/include/nsprpub | ||
| 53 | fi | ||
| 54 | cp ${S}/build/autoconf/install-sh ${S} | ||
| 55 | autotools_do_configure | ||
| 56 | # Yes, we run this twice. The first pass sets up npsrpub-config which then | ||
| 57 | # sets the values correctly on the second try. Ick. | ||
| 58 | autotools_do_configure | ||
| 59 | } | ||
| 60 | |||
| 61 | do_compile () { | ||
| 62 | cp ${WORKDIR}/jsautocfg.h ${S}/js/src/ | ||
| 63 | #oe_runmake -f client.mk build_all | ||
| 64 | base_do_compile | ||
| 65 | } | ||
| 66 | |||
| 67 | XULVERSION = "1.9.3a1pre" | ||
| 68 | |||
| 69 | do_install_append () { | ||
| 70 | install -d ${D}${sysconfdir}/ld.so.conf.d/ | ||
| 71 | echo ${libdir}/xulrunner-${XULVERSION}/ > ${D}${sysconfdir}/ld.so.conf.d/mozilla-headless | ||
| 72 | } | ||
| 73 | |||
| 74 | EXTRA_OECONF =+ "--enable-application=xulrunner --enable-default-toolkit=cairo-headless --with-pthreads \ | ||
| 75 | --enable-pango --enable-optimize --disable-debug --disable-tests \ | ||
| 76 | --disable-printing --disable-crashreporter --disable-accessibility \ | ||
| 77 | --disable-javaxpcom --enable-plugins --enable-system-sqlite --disable-necko-wifi" | ||
| 78 | |||
| 79 | export LIBXUL_DIST="${S}/dist" | ||
| 80 | |||
| 81 | SYSROOT_PREPROCESS_FUNCS += "mozilla_sysroot_preprocess" | ||
| 82 | |||
| 83 | mozilla_sysroot_preprocess () { | ||
| 84 | autotools_stage_dir ${D}/${libdir}/xulrunner-${XULVERSION} ${SYSROOT_DESTDIR}${STAGING_DIR_HOST}${libdir}/xulrunner-${XULVERSION}/ | ||
| 85 | autotools_stage_dir ${D}/${libdir}/xulrunner-devel-${XULVERSION} ${SYSROOT_DESTDIR}${STAGING_DIR_HOST}${libdir}/xulrunner-devel-${XULVERSION}/ | ||
| 86 | |||
| 87 | ln -fs ${STAGING_DIR_HOST}${libdir}/xulrunner-${XULVERSION}/ ${SYSROOT_DESTDIR}${STAGING_DIR_HOST}${libdir}/xulrunner-devel-${XULVERSION}/bin | ||
| 88 | ln -fs ${STAGING_DIR_HOST}${datadir}/xulrunner-${XULVERSION}/unstable/ ${SYSROOT_DESTDIR}${STAGING_DIR_HOST}${libdir}/xulrunner-devel-${XULVERSION}/idl | ||
| 89 | ln -fs ${STAGING_DIR_HOST}${includedir}/xulrunner-${XULVERSION}/unstable/ ${SYSROOT_DESTDIR}${STAGING_DIR_HOST}${libdir}/xulrunner-devel-${XULVERSION}/include | ||
| 90 | ln -fs ${STAGING_DIR_HOST}${libdir}/xulrunner-devel-${XULVERSION}/sdk/lib/ ${SYSROOT_DESTDIR}${STAGING_DIR_HOST}${libdir}/xulrunner-devel-${XULVERSION}/lib | ||
| 91 | |||
| 92 | install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS} | ||
| 93 | install -m 755 ${S}/dist/host/bin/host_xpidl ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/xpidl | ||
| 94 | } | ||
| 95 | |||
| 96 | __anonymous () { | ||
| 97 | if bb.data.getVar("SRCREV", d, True) == "1a622cb7c384": | ||
| 98 | bb.data.setVar("XULVERSION", "1.9.2a1pre", d) | ||
| 99 | } | ||
