gnome ver. bump

This commit is contained in:
Rmys
2022-11-02 11:37:11 +03:00
parent 425e703b2a
commit fbc3dcb523
13 changed files with 756 additions and 62 deletions
@@ -0,0 +1,70 @@
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
#WorkDir = "mozjs%s/js/src" % get.srcVERSION()
shelltools.export("SHELL","/bin/sh")
WorkDir = "firefox-%s" %get.srcVERSION()
def setup():
#shelltools.cd("js/src")
#shelltools.system("sed -i 's/(defined\((@TEMPLATE_FILE)\))/\1/' config/milestone.pl ")
shelltools.export("CC", "gcc")
shelltools.export("CXX", "g++")
shelltools.system("mkdir -p build-js")
shelltools.cd("build-js")
shelltools.system("sh ../js/src/configure.in \
--prefix=/usr \
--libdir=/usr/lib \
--enable-readline \
--with-intl-api \
--disable-debug \
--disable-debug-symbols \
--disable-jemalloc \
--disable-strip \
--enable-hardening \
--enable-linker=gold \
--enable-optimize \
--enable-readline \
--enable-release \
--enable-shared-js \
--enable-tests \
--with-intl-api \
--with-system-zlib \
--with-system-nspr \
--without-system-icu")
def build():
shelltools.cd("build-js")
autotools.make()
def check():
shelltools.cd("build-js")
#autotools.make("-C js/src check-jstests")
#autotools.make("-C js/src check-jit-test")
def install():
shelltools.cd("build-js")
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
pisitools.remove("/usr/lib/*.ajs")
#for polkit
#pisitools.rename("/usr/lib/pkgconfig/mozjs-..pc", "mozjs-17.0.pc")
#pisitools.remove("usr/lib/libmozjs-..a")
shelltools.cd("..")
pisitools.dodoc("README*")
# add link for polkit
#pisitools.dosym("libmozjs-..so", "/usr/lib/libmozjs-17.0.so")
@@ -0,0 +1,72 @@
Description: Remove unused LLVM and Rust build dependencies
Since the Javascript engine is normally part of Firefox, its build
system has dependencies on the LLVM and Rust toolchains. This limits
the number of architectures which mozjs68 can be built on.
.
It turns out, however, that neither LLVM nor Rust are used when mozjs68
is being built and these build dependencies are therefore not necessary.
.
This patch removes them and allows mozjs68 to be built on any architecture.
.
Author: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959144
Forwarded: no
Last-Update: 2020-04-30
Index: mozjs68-68.6.0/js/moz.configure
===================================================================
--- mozjs68-68.6.0.orig/js/moz.configure
+++ mozjs68-68.6.0/js/moz.configure
@@ -18,11 +18,6 @@ def building_js(build_project):
option(env='JS_STANDALONE', default=building_js,
help='Reserved for internal use')
-include('../build/moz.configure/rust.configure',
- when='--enable-compile-environment')
-include('../build/moz.configure/bindgen.configure',
- when='--enable-compile-environment')
-
@depends('JS_STANDALONE')
def js_standalone(value):
if value:
Index: mozjs68-68.6.0/moz.configure
===================================================================
--- mozjs68-68.6.0.orig/moz.configure
+++ mozjs68-68.6.0/moz.configure
@@ -598,36 +598,6 @@ set_config('MAKENSISU_FLAGS', nsis_flags
check_prog('7Z', ('7z', '7za'), allow_missing=True, when=target_is_windows)
-
-@depends(host_c_compiler, c_compiler, bindgen_config_paths)
-def llvm_objdump(host_c_compiler, c_compiler, bindgen_config_paths):
- clang = None
- for compiler in (host_c_compiler, c_compiler):
- if compiler and compiler.type == 'clang':
- clang = compiler.compiler
- break
- elif compiler and compiler.type == 'clang-cl':
- clang = os.path.join(os.path.dirname(compiler.compiler), 'clang')
- break
-
- if not clang and bindgen_config_paths:
- clang = bindgen_config_paths.clang_path
- llvm_objdump = 'llvm-objdump'
- if clang:
- out = check_cmd_output(clang, '--print-prog-name=llvm-objdump',
- onerror=lambda: None)
- if out:
- llvm_objdump = out.rstrip()
- return (llvm_objdump,)
-
-
-llvm_objdump = check_prog('LLVM_OBJDUMP', llvm_objdump, what='llvm-objdump',
- when='--enable-compile-environment',
- paths=toolchain_search_path)
-
-add_old_configure_assignment('LLVM_OBJDUMP', llvm_objdump)
-
-
# Please do not add configure checks from here on.
# Fallthrough to autoconf-based configure
@@ -0,0 +1,127 @@
# HG changeset patch
# User André Bargull <andre.bargull@gmail.com>
# Date 1510140221 28800
# Wed Nov 08 03:23:41 2017 -0800
# Node ID 8bf5e7460a7c5ba3430b501d1659c469a862a929
# Parent 60fd4a5b01ec70ded9ddfd560fd5be191b1c74b9
Bug 1415202: Always use the equivalent year to determine the time zone offset and name. r=Waldo
diff --git a/js/src/jsdate.cpp b/js/src/jsdate.cpp
--- a/js/src/jsdate.cpp
+++ b/js/src/jsdate.cpp
@@ -2348,22 +2348,26 @@ static PRMJTime ToPRMJTime(double localT
prtm.tm_isdst = (DaylightSavingTA(utcTime) != 0);
return prtm;
}
static size_t FormatTime(char* buf, int buflen, const char* fmt, double utcTime,
double localTime) {
PRMJTime prtm = ToPRMJTime(localTime, utcTime);
- int eqivalentYear = IsRepresentableAsTime32(utcTime)
+
+ // If an equivalent year was used to compute the date/time components, use
+ // the same equivalent year to determine the time zone name and offset in
+ // PRMJ_FormatTime(...).
+ int timeZoneYear = IsRepresentableAsTime32(utcTime)
? prtm.tm_year
: EquivalentYearForDST(prtm.tm_year);
int offsetInSeconds = (int)floor((localTime - utcTime) / msPerSecond);
- return PRMJ_FormatTime(buf, buflen, fmt, &prtm, eqivalentYear,
+ return PRMJ_FormatTime(buf, buflen, fmt, &prtm, timeZoneYear,
offsetInSeconds);
}
enum class FormatSpec { DateTime, Date, Time };
static bool FormatDate(JSContext* cx, double utcTime, FormatSpec format,
MutableHandleValue rval) {
JSString* str;
diff --git a/js/src/vm/Time.cpp b/js/src/vm/Time.cpp
--- a/js/src/vm/Time.cpp
+++ b/js/src/vm/Time.cpp
@@ -242,17 +242,17 @@ static void PRMJ_InvalidParameterHandler
const wchar_t* file, unsigned int line,
uintptr_t pReserved) {
/* empty */
}
#endif
/* Format a time value into a buffer. Same semantics as strftime() */
size_t PRMJ_FormatTime(char* buf, int buflen, const char* fmt,
- const PRMJTime* prtm, int equivalentYear,
+ const PRMJTime* prtm, int timeZoneYear,
int offsetInSeconds) {
size_t result = 0;
#if defined(XP_UNIX) || defined(XP_WIN)
struct tm a;
#ifdef XP_WIN
_invalid_parameter_handler oldHandler;
#ifndef __MINGW32__
int oldReportMode;
@@ -275,39 +275,33 @@ size_t PRMJ_FormatTime(char* buf, int bu
*/
#if defined(HAVE_LOCALTIME_R) && defined(HAVE_TM_ZONE_TM_GMTOFF)
char emptyTimeZoneId[] = "";
{
/*
* Fill out |td| to the time represented by |prtm|, leaving the
* timezone fields zeroed out. localtime_r will then fill in the
* timezone fields for that local time according to the system's
- * timezone parameters.
+ * timezone parameters. Use |timeZoneYear| for the year to ensure the
+ * time zone name matches the time zone offset used by the caller.
*/
struct tm td;
memset(&td, 0, sizeof(td));
td.tm_sec = prtm->tm_sec;
td.tm_min = prtm->tm_min;
td.tm_hour = prtm->tm_hour;
td.tm_mday = prtm->tm_mday;
td.tm_mon = prtm->tm_mon;
td.tm_wday = prtm->tm_wday;
- td.tm_year = prtm->tm_year - 1900;
+ td.tm_year = timeZoneYear - 1900;
td.tm_yday = prtm->tm_yday;
td.tm_isdst = prtm->tm_isdst;
time_t t = mktime(&td);
- // If |prtm| cannot be represented in |time_t| the year is probably
- // out of range, try again with the DST equivalent year.
- if (t == static_cast<time_t>(-1)) {
- td.tm_year = equivalentYear - 1900;
- t = mktime(&td);
- }
-
// If either mktime or localtime_r failed, fill in the fallback time
// zone offset |offsetInSeconds| and set the time zone identifier to
// the empty string.
if (t != static_cast<time_t>(-1) && localtime_r(&t, &td)) {
a.tm_gmtoff = td.tm_gmtoff;
a.tm_zone = td.tm_zone;
} else {
a.tm_gmtoff = offsetInSeconds;
diff --git a/js/src/vm/Time.h b/js/src/vm/Time.h
--- a/js/src/vm/Time.h
+++ b/js/src/vm/Time.h
@@ -44,17 +44,17 @@ inline void PRMJ_NowInit() {}
#ifdef XP_WIN
extern void PRMJ_NowShutdown();
#else
inline void PRMJ_NowShutdown() {}
#endif
/* Format a time value into a buffer. Same semantics as strftime() */
extern size_t PRMJ_FormatTime(char* buf, int buflen, const char* fmt,
- const PRMJTime* tm, int equivalentYear,
+ const PRMJTime* tm, int timeZoneYear,
int offsetInSeconds);
/**
* Requesting the number of cycles from the CPU.
*
* `rdtsc`, or Read TimeStamp Cycle, is an instruction provided by
* x86-compatible CPUs that lets processes request the number of
* cycles spent by the CPU executing instructions since the CPU was
@@ -0,0 +1,25 @@
diff --git i/js/src/build/Makefile.in w/js/src/build/Makefile.in
index ee19104e0ef5..a0f06fd35a18 100644
--- i/js/src/build/Makefile.in
+++ w/js/src/build/Makefile.in
@@ -89,6 +89,8 @@ ifneq (,$(REAL_LIBRARY))
endif
ifneq (,$(SHARED_LIBRARY))
$(SYSINSTALL) $(SHARED_LIBRARY) $(DESTDIR)$(libdir)
+ mv -f $(DESTDIR)$(libdir)/$(SHARED_LIBRARY) $(DESTDIR)$(libdir)/$(SHARED_LIBRARY).0
+ ln -s $(SHARED_LIBRARY).0 $(DESTDIR)$(libdir)/$(SHARED_LIBRARY)
ifeq ($(OS_ARCH),Darwin)
install_name_tool -id $(abspath $(libdir)/$(SHARED_LIBRARY)) $(DESTDIR)$(libdir)/$(SHARED_LIBRARY)
endif
diff --git i/js/src/build/moz.build w/js/src/build/moz.build
index a7f5fa4ce8eb..726687c13fb0 100644
--- i/js/src/build/moz.build
+++ w/js/src/build/moz.build
@@ -23,6 +23,7 @@ if not CONFIG['JS_STANDALONE']:
if CONFIG['JS_SHARED_LIBRARY']:
GeckoSharedLibrary('js', linkage=None)
SHARED_LIBRARY_NAME = CONFIG['JS_LIBRARY_NAME']
+ LDFLAGS += ['-Wl,-soname,lib{}.so.0'.format(SHARED_LIBRARY_NAME)]
else:
Library('js')
@@ -0,0 +1,38 @@
"Carried over from mozjs68"
--- a/js/src/build/Makefile.in
+++ b/js/src/build/Makefile.in
@@ -78,6 +78,8 @@
endif
ifneq (,$(SHARED_LIBRARY))
$(SYSINSTALL) $(SHARED_LIBRARY) $(DESTDIR)$(libdir)
+ mv -f $(DESTDIR)$(libdir)/$(SHARED_LIBRARY) $(DESTDIR)$(libdir)/$(SHARED_LIBRARY).0
+ ln -s $(SHARED_LIBRARY).0 $(DESTDIR)$(libdir)/$(SHARED_LIBRARY)
ifeq ($(OS_ARCH),Darwin)
install_name_tool -id $(abspath $(libdir)/$(SHARED_LIBRARY)) $(DESTDIR)$(libdir)/$(SHARED_LIBRARY)
endif
--- a/js/src/build/moz.build 2022-03-13 17:31:39.000000000 +0300
+++ b/js/src/build/moz.build 2022-03-21 23:32:34.252893769 +0300
@@ -26,6 +26,7 @@
if CONFIG["JS_SHARED_LIBRARY"]:
GeckoSharedLibrary("js", linkage=None)
SHARED_LIBRARY_NAME = CONFIG["JS_LIBRARY_NAME"]
+ LDFLAGS += ['-Wl,-soname,lib{}.so.0'.format(SHARED_LIBRARY_NAME)]
# Ensure symbol versions of shared library on Linux do not conflict
# with those in libxul.
diff --git a/config/rules.mk b/config/rules.mk
index 0f9b2ac..f6b4efe 100644
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -285,6 +285,8 @@ ifeq ($(OS_ARCH),GNU)
OS_CPPFLAGS += -DPATH_MAX=1024 -DMAXPATHLEN=1024
endif
+EXTRA_DSO_LDOPTS += -Wl,-soname,lib$(JS_LIBRARY_NAME).so.0
+
#
# MINGW32
#
--
2.31.1
@@ -0,0 +1,27 @@
"Carried over + updated from mozjs68"
Upstream: no
From 9ad10569e11a2fb96377188f895bc66abcc9511d Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Wed, 5 Sep 2018 15:05:24 +0200
Subject: [PATCH] silence sandbox violations
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
python/mozbuild/mozbuild/frontend/emitter.py | 5 -----
1 file changed, 5 deletions(-)
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -1239,12 +1239,6 @@ class TreeMetadataEmitter(LoggingMixin):
'is a filename, but a directory is required: %s '
'(resolved to %s)' % (local_include, full_path),
context)
- if (full_path == context.config.topsrcdir or
- full_path == context.config.topobjdir):
- raise SandboxValidationError(
- 'Path specified in LOCAL_INCLUDES '
- '(%s) resolves to the topsrcdir or topobjdir (%s), which is '
- 'not allowed' % (local_include, full_path), context)
include_obj = LocalInclude(context, local_include)
local_includes.append(include_obj.path.full_path)
yield include_obj
@@ -0,0 +1,162 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>mozjs-102</Name>
<Homepage>http://www.mozilla.org/js/spidermonkey/</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>NPL-1.1</License>
<IsA>library</IsA>
<Summary>Stand-alone JavaScript C Library</Summary>
<Description>Spidermonkey is Mozilla's C implementation of JavaScript.</Description>
<Archive type="tarxz" sha1sum="f7e549cbc2b244e58ab34d3379b73b6615a6ab35">https://ftp.mozilla.org/pub/firefox/releases/102.2.0esr/source/firefox-102.2.0esr.source.tar.xz</Archive>
<BuildDependencies>
<Dependency>python3-devel</Dependency>
<Dependency>zlib-devel</Dependency>
<Dependency>nspr-devel</Dependency>
<Dependency>readline-devel</Dependency>
<Dependency>autoconf213</Dependency>
<Dependency>rust</Dependency>
<Dependency>llvm</Dependency>
</BuildDependencies>
<Patches>
<!-- <Patch level="1">mozjs78-silence-sandbox-violations.patch</Patch> -->
<Patch level="1">mozjs78-fix-soname.patch</Patch>
<!--Patch level="1">Remove-unused-LLVM-and-Rust-build-dependencies.patch</Patch-->
</Patches>
</Source>
<Package>
<Name>mozjs-102</Name>
<RuntimeDependencies>
<Dependency>nspr</Dependency>
<Dependency>zlib</Dependency>
<Dependency>libgcc</Dependency>
<Dependency>readline</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="doc">/usr/share/doc</Path>
</Files>
</Package>
<Package>
<Name>mozjs-102-devel</Name>
<PartOf>system.devel</PartOf>
<Summary>Development files for spidermonkey</Summary>
<RuntimeDependencies>
<Dependency release="current">mozjs-102</Dependency>
<Dependency>nspr-devel</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="header">/usr/include</Path>
<Path fileType="data">/usr/lib/pkgconfig</Path>
<!--Path fileType="executable">/usr/bin/js17-config</Path-->
</Files>
</Package>
<History>
<Update release="14">
<Date>2022-09-18</Date>
<Version>102.2.0</Version>
<Comment>Version bump.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="13">
<Date>2022-06-01</Date>
<Version>91.9.1</Version>
<Comment>Version bump.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="12">
<Date>2021-08-07</Date>
<Version>78.12.0</Version>
<Comment>Version bump.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="11">
<Date>2021-05-28</Date>
<Version>78.10.1</Version>
<Comment>Version bump</Comment>
<Name>Berk Çakar</Name>
<Email>berk2238@hotmail.com</Email>
</Update>
<Update release="10">
<Date>2020-12-09</Date>
<Version>68.12.0</Version>
<Comment>Rebuild.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="9">
<Date>2020-10-19</Date>
<Version>68.12.0</Version>
<Comment>Version bump.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="8">
<Date>2020-08-06</Date>
<Version>68.11.0</Version>
<Comment>Version bump.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="7">
<Date>2019-10-03</Date>
<Version>60.9.0</Version>
<Comment>Version bump.</Comment>
<Name>Idris Kalp</Name>
<Email>idriskalp@gmail.com</Email>
</Update>
<Update release="6">
<Date>2018-07-23</Date>
<Version>52.2.1</Version>
<Comment>Version bump.</Comment>
<Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email>
</Update>
<Update release="5">
<Date>2018-07-22</Date>
<Version>52.2.1</Version>
<Comment>Version bump.</Comment>
<Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email>
</Update>
<Update release="4">
<Date>2018-07-19</Date>
<Version>17.0.0</Version>
<Comment>Rebuild</Comment>
<Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email>
</Update>
<Update release="3">
<Date>2017-01-29</Date>
<Version>17.0.0</Version>
<Comment>Rebuild.</Comment>
<Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email>
</Update>
<Update release="2">
<Date>2016-04-27</Date>
<Version>17.0.0</Version>
<Comment>Release Bump</Comment>
<Name>PisiLinux Community</Name>
<Email>admin@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2016-03-06</Date>
<Version>17.0.0</Version>
<Comment>First release</Comment>
<Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email>
</Update>
</History>
</PISI>
@@ -0,0 +1,15 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>spidermonkey</Name>
<Summary xml:lang="tr">Javascript C Kitaplığı</Summary>
<Description xml:lang="tr">Mozilla'nın Javascript'in C implementasyonu.</Description>
<Description xml:lang="fr">Spidermonkey est l'Implémentation C de Javascript par Mozilla.</Description>
<Description xml:lang="es">Spidermonkey es la implementación de JavaScript con C de Mozilla.</Description>
</Source>
<Package>
<Name>spidermonkey-devel</Name>
<Summary xml:lang="tr">spidermonkey için geliştirme dosyaları</Summary>
</Package>
</PISI>