From d3e6e03a0e5b91470e177afa88687d71e95991c9 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Mon, 22 Jan 2024 02:49:41 -0800 Subject: [PATCH] mozjs102: update to 102.15.1. --- srcpkgs/mozjs102/patches/armv6l-isb.patch | 2 +- .../patches/python3.12-looseversion.patch | 22 +++++++++++++++++++ srcpkgs/mozjs102/template | 20 ++++++++++++----- 3 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 srcpkgs/mozjs102/patches/python3.12-looseversion.patch diff --git a/srcpkgs/mozjs102/patches/armv6l-isb.patch b/srcpkgs/mozjs102/patches/armv6l-isb.patch index c08c776261e35..1a7f3e45ee42a 100644 --- a/srcpkgs/mozjs102/patches/armv6l-isb.patch +++ b/srcpkgs/mozjs102/patches/armv6l-isb.patch @@ -13,4 +13,4 @@ diff -rup Architecture-arm.cpp.orig Architecture-arm.cpp +# endif #else // We assume the icache flushing routines on other platforms take care of this - #endif \ No newline at end of file + #endif diff --git a/srcpkgs/mozjs102/patches/python3.12-looseversion.patch b/srcpkgs/mozjs102/patches/python3.12-looseversion.patch new file mode 100644 index 0000000000000..d66008b34178e --- /dev/null +++ b/srcpkgs/mozjs102/patches/python3.12-looseversion.patch @@ -0,0 +1,22 @@ +diff --git a/python/mozbuild/mozbuild/configure/util.py b/python/mozbuild/mozbuild/configure/util.py +index fe6f90f960661..31a6daa2e1fd1 100644 +--- a/python/mozbuild/mozbuild/configure/util.py ++++ b/python/mozbuild/mozbuild/configure/util.py +@@ -14,7 +14,7 @@ + import sys + from collections import deque + from contextlib import contextmanager +-from distutils.version import LooseVersion ++from looseversion import LooseVersion + + + def getpreferredencoding(): +@@ -34,7 +34,7 @@ def getpreferredencoding(): + + + class Version(LooseVersion): +- """A simple subclass of distutils.version.LooseVersion. ++ """A simple subclass of looseversion.LooseVersion. + Adds attributes for `major`, `minor`, `patch` for the first three + version components so users can easily pull out major/minor + versions, like: diff --git a/srcpkgs/mozjs102/template b/srcpkgs/mozjs102/template index 13151396d7563..8f8cda6bdce0e 100644 --- a/srcpkgs/mozjs102/template +++ b/srcpkgs/mozjs102/template @@ -1,7 +1,7 @@ # Template file for 'mozjs102' pkgname=mozjs102 -version=102.8.0 -revision=3 +version=102.15.1 +revision=1 build_wrksrc=js/src build_style=gnu-configure build_helper=rust @@ -11,16 +11,16 @@ configure_args="--disable-jemalloc --disable-strip --disable-tests \ --enable-shared-js --enable-system-ffi --with-intl-api --with-system-icu \ --with-system-nspr --with-system-zlib --enable-hardening --enable-release" hostmakedepends="make pkg-config python3 python3-setuptools python3-six perl m4 - rust cargo llvm12 clang" + rust cargo llvm12 clang python3-looseversion" makedepends="icu-devel libffi-devel nspr-devel python3-devel readline-devel zlib-devel rust-std" checkdepends="python3" short_desc="SpiderMonkey JavaScript interpreter and library (102.x)" -maintainer="Orphaned " +maintainer="oreo639 " license="MPL-2.0" homepage="https://spidermonkey.dev" distfiles="${MOZILLA_SITE}/firefox/releases/${version}esr/source/firefox-${version}esr.source.tar.xz" -checksum=47f8f6243bce8c2ef51adf8c9626bbf643e1c225dcb9ba5653a055ed5e76ca48 +checksum=09194fb765953bc6979a35aa8834118c453b9d6060bf1ec4e134551bad740113 LDFLAGS="-Wl,-z,stack-size=1048576" @@ -46,6 +46,16 @@ pre_configure() { chmod 0755 ../../build/autoconf/autoconf.sh sh ../../build/autoconf/autoconf.sh configure.in > configure chmod 0755 configure + + local _sitedir=$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])') + rm -rf ${wrksrc}/third_party/python/six + mkdir ${wrksrc}/third_party/python/six + ln -s ${_sitedir}/six.py ${wrksrc}/third_party/python/six + + rm -rf ${wrksrc}/third_party/python/looseversion + mkdir ${wrksrc}/third_party/python/looseversion + ln -s ${_sitedir}/looseversion/__init__.py ${wrksrc}/third_party/python/looseversion/looseversion.py + echo "vendored:third_party/python/looseversion" >> ${wrksrc}/python/sites/mach.txt } post_install() {