citadel/meta-gnome/recipes-support/mozjs78/mozjs78_78.0.1.bb
Bruce Leidl 64d91cb68c Big Upgrade: GNOME 40 Yocto 3.3 meta-rust meta-clang meta-intel
Updated Recipes

  * colord 1.4.5
  * dconf 0.40.0
  * gdm 40.0
  * geoclue 2.5.7
  * geocode-glib 3.26.2
  * gevix2_ 0.12.1
  * gjs 1.68.0
  * glib2 2.68.0
  * gnome-autoar 0.3.1
  * gnome-backgrounds 40.0
  * gnome-control-center 40.0
  * gnome-desktop 40.0
  * gnome-disk-utility 40.1
  * gnome-keyring 40.0
  * gnome-screenshot 40.0
  * gnome-session 40.1.1
  * gnome-settings-daemon 40.0.1
  * gnome-shell 40.0
  * gnome-system-monitor 40.1
  * gnome-terminal 3.40.1
  * gsettings-desktop-schemas 40.0
  * ibus 1.5.23
  * iwd 1.13
  * kernel 5.12.1
  * keyutils 1.6.1
  * libgee 0.20.4
  * libgit2  1.1.0
  * libgweather 40.0
  * libhandy 1.2.0 (poky)
  * libseccomp 2.5.1
  * libssh2 1.9.0 (poky)
  * lvm2 2.03.11
  * meson 0.57.1 (poky)
  * mutter 40.0
  * nano 5.6
  * NetworkManager 1.30.2
  * network-manager-applet 1.18.0
  * nspr 4.29
  * pango 1.48.2 (poky)
  * plymouth 0.9.5+git
  * udisks 2.9.2
  * upower 0.99.11
  * vte 0.64.0
  * yelp-tools 3.32.2
  * yelp-xsl 3.36.0
2021-05-05 08:45:55 -04:00

118 lines
4.2 KiB
BlitzBasic

SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++"
HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf"
# Path: /teams/releng/tarballs-needing-help/mozjs/mozjs-78.0.1gnome.tar.xz
SRC_URI = "https://download.gnome.org/teams/releng/tarballs-needing-help/mozjs/mozjs-78.0.1gnome.tar.xz;downloadfilename=mozjs78-78.0.1.tar.xz \
file://avoid-running-autoconf2.13.patch \
file://0001-Force-the-correct-target-string-with-environment-var.patch \
file://0003-Set-rust-host-and-target-correctly.patch \
file://0004-Do-not-add-RequiredDefines.h-here-instead-add-to-gjs.patch \
file://0005-Remove-Abort-Panic-Strategy.patch \
"
SRC_URI[md5sum] = "09bf510150144238dd31f7f4e1582cf8"
SRC_URI[sha256sum] = "78d762012be9eb460b5805da4f919d1a12b15f4040f126c98a42c4dddac7339e"
S = "${WORKDIR}/mozjs-78.0.1gnome"
inherit autotools pkgconfig perlnative python3native
inherit rust
inherit features_check
CONFLICT_DISTRO_FEATURES_mipsarchn32 = "ld-is-gold"
TOOLCHAIN = "clang"
DEPENDS += "nspr zlib rust-native cargo-native clang-native cbindgen-native nasm-native yasm-native python3"
# nspr's package-config is ignored so set libs manually
EXTRA_OECONF = " \
--target=${TARGET_SYS} \
--host=${HOST_SYS} \
--prefix=${prefix} \
--libdir=${libdir} \
--disable-tests \
--disable-jemalloc \
--disable-debug-symbols \
${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \
"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
PACKAGECONFIG[x11] = "--x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--x-includes=no --x-libraries=no,virtual/libx11"
EXTRA_OEMAKE_task-compile += "OS_LDFLAGS='-Wl,-latomic ${LDFLAGS}'"
EXTRA_OEMAKE_task-install += "STATIC_LIBRARY_NAME=js_static"
export TMP="${B}"
export RUST_HOST="${BUILD_SYS}"
export RUST_TARGET="${TARGET_SYS}"
export RUSTFLAGS=" -L ${STAGING_LIBDIR}/rust"
export RUST_TARGET_PATH="${STAGING_LIBDIR_NATIVE}/rustlib"
export BINDGEN_MFLOAT="${@bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', '-mfloat-abi=hard', '', d)}"
export BINDGEN_CFLAGS="--target=${RUST_TARGET_SYS} --sysroot=${RECIPE_SYSROOT} ${BINDGEN_MFLOAT}"
export INSTALL_SDK="0"
export STAGING_LIBDIR
#
# Silence a host leak while linking native binary (nsinstall_real) used during the
# mozjs build. This should be fixed, but I was unable to find a way to do so.
#
# log.do_compile:
#
# recipe-sysroot-native/usr/bin/x86_64-oe-linux/x86_64-oe-linux-clang -std=gnu99 -o nsinstall_real -DXP_UNIX -O3 host_nsinstall.o host_pathsub.o
#
# recipe-sysroot-native/usr/bin/x86_64-oe-linux-ld:
#
# warning: library search path "/usr/lib/gcc/x86_64-linux-gnu/9" is unsafe for cross-compilation
# warning: library search path "/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu" is unsafe for cross-compilation
# warning: library search path "/usr/lib/gcc/x86_64-linux-gnu/9/../../../lib64" is unsafe for cross-compilation
# warning: library search path "/usr/lib/gcc/x86_64-linux-gnu/9/../../.." is unsafe for cross-compilation
#
ERROR_QA_remove = "compile-host-path"
setup_pythonpath() {
export SHELL="/bin/sh"
cd ${S}
PYTHONPATH="${S}/config:${S}/build"
for mod in which pytoml jsmin distro six pyyaml/lib3; do
PYTHONPATH="$PYTHONPATH:${S}/third_party/python/${mod}"
done
for sub_dir in python testing/mozbase; do
for module_dir in `ls $sub_dir -1`;do
if [ -d "${S}/$sub_dir/$module_dir" ];then
PYTHONPATH="$PYTHONPATH:${S}/$sub_dir/$module_dir"
fi
done
done
export PYTHONPATH
cd ${B}
}
do_configure() {
setup_pythonpath
mkdir -p "${B}/_virtualenvs"
ln -s "../../recipe-sysroot-native/usr/lib" "${B}/_virtualenvs/lib"
${S}/js/src/configure ${EXTRA_OECONF}
}
do_compile_prepend() {
setup_pythonpath
}
do_install_prepend() {
setup_pythonpath
}
do_install_append() {
rm -f ${D}/${libdir}/libjs.a
}
PACKAGES =+ "lib${BPN}"
FILES_lib${BPN} += "${libdir}/lib*.so"
FILES_${PN}-dev += "${bindir}/js78-config"
RPROVIDES_lib${BPN} += "libmozjs-78"
DISABLE_STATIC = ""