RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  j...@rpm5.org
  Module: rpm                              Date:   05-Jul-2017 17:34:28
  Branch: rpm-5_4                          Handle: 2017070515342800

  Added files:              (Branch: rpm-5_4)
    rpm/js                  extract.sh gen-config.sh
  Modified files:           (Branch: rpm-5_4)
    rpm/js                  .cvsignore Makefile.am

  Log:
    - js: automate mozjs download/build/extract/configure.

  Summary:
    Revision    Changes     Path
    1.4.4.1     +5  -0      rpm/js/.cvsignore
    1.44.2.7    +26 -0      rpm/js/Makefile.am
    1.1.2.1     +234 -0     rpm/js/extract.sh
    1.1.2.1     +34 -0      rpm/js/gen-config.sh
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/js/.cvsignore
  ============================================================================
  $ cvs diff -u -r1.4 -r1.4.4.1 .cvsignore
  --- rpm/js/.cvsignore 20 Jan 2010 01:39:20 -0000      1.4
  +++ rpm/js/.cvsignore 5 Jul 2017 15:34:28 -0000       1.4.4.1
  @@ -11,3 +11,8 @@
   jsd
   rpmdb
   src
  +firefox-*
  +mozilla-release
  +include
  +extract
  +platform
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.44.2.6 -r1.44.2.7 Makefile.am
  --- rpm/js/Makefile.am        13 Mar 2016 23:44:46 -0000      1.44.2.6
  +++ rpm/js/Makefile.am        5 Jul 2017 15:34:28 -0000       1.44.2.7
  @@ -90,6 +90,32 @@
   v8_CPPFLAGS =                ${CPPFLAGS} -fPIC
   v8_LDFLAGS =         -fsanitize=address -lv8
   
  +#MOZJS_VERSION = 45.4.0esr
  +MOZJS_VERSION = 45.9.0esr
  +
  +MOZJS_TARBALL = firefox-${MOZJS_VERSION}.source.tar.xz
  +MOZJS_URL =  
https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${MOZJS_VERSION}/source/${MOZJS_TARBALL}
  +
  +${MOZJS_TARBALL}:
  +     @echo "-- fetch $@ --"
  +     wget ${MOZJS_URL}
  +
  +mozilla-release: ${MOZJS_TARBALL}
  +     @echo "-- $@ --"
  +     xzcat ${MOZJS_TARBALL} | tar -xf-
  +     mv firefox-${MOZJS_VERSION} $@
  +
  +extract: mozilla-release
  +     @echo "-- $@ --"
  +     @sh ./extract.sh
  +
  +platform: extract
  +     @echo "-- $@ --"
  +     @sh ./gen-config.sh `uname -m` linux
  +
  +clean-local:
  +     rm -rf platform extract include mozilla-release
  +
   .PHONY:      lint
   lint:
        $(LINT) $(DEFS) $(INCLUDES) $(librpmjs_la_sources)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/extract.sh
  ============================================================================
  $ cvs diff -u -r0 -r1.1.2.1 extract.sh
  --- /dev/null 2017-07-05 17:33:00.000000000 +0200
  +++ extract.sh        2017-07-05 17:34:28.236324233 +0200
  @@ -0,0 +1,234 @@
  +#!/bin/sh
  +
  +#run this with a mozilla-release directory with the untarred firefox download
  +
  +rm -rf extract
  +
  +mkdir extract
  +mkdir extract/js
  +mkdir -p extract/intl/icu/source/common/unicode
  +
  +cp -r mozilla-release/js/src mozilla-release/js/public extract/js/
  +cp -r mozilla-release/mfbt extract/
  +
  +# We need these even without ICU
  +cp mozilla-release/intl/icu/source/common/unicode/platform.h 
extract/intl/icu/source/common/unicode
  +cp mozilla-release/intl/icu/source/common/unicode/ptypes.h 
extract/intl/icu/source/common/unicode
  +cp mozilla-release/intl/icu/source/common/unicode/uconfig.h 
extract/intl/icu/source/common/unicode
  +cp mozilla-release/intl/icu/source/common/unicode/umachine.h 
extract/intl/icu/source/common/unicode
  +cp mozilla-release/intl/icu/source/common/unicode/urename.h 
extract/intl/icu/source/common/unicode
  +cp mozilla-release/intl/icu/source/common/unicode/utypes.h 
extract/intl/icu/source/common/unicode
  +cp mozilla-release/intl/icu/source/common/unicode/uvernum.h 
extract/intl/icu/source/common/unicode
  +cp mozilla-release/intl/icu/source/common/unicode/uversion.h 
extract/intl/icu/source/common/unicode
  +
  +cd mozilla-release/js/src
  +
  +# skipping icu and relying on posix nspr emulation all helps.  After that we
  +# only need js/src, js/public and mfbt.  Well, we also need 8 of the icu
  +# headers, but only to stub out functions that fail at runtime
  +PYTHON=python ./configure --without-intl-api --enable-posix-nspr-emulation
  +
  +# we have to run make to generate a byte code version of the self hosted js 
and
  +# a switch table
  +make -j4
  +
  +cd ../../..
  +
  +cp mozilla-release/js/src/js/src/selfhosted.out.h extract/js/src
  +cp mozilla-release/js/src/js/src/jsautokw.h extract/js/src
  +
  +# mfbt doesn't change by arch or platform, so keep the same unified cpp
  +mkdir extract/js/src/mfbt
  +cp mozilla-release/js/src/mfbt/Unified_cpp_mfbt0.cpp extract/js/src/mfbt
  +
  +sed 's/#include ".*\/mfbt\//#include "/' < 
extract/js/src/mfbt/Unified_cpp_mfbt0.cpp > t1
  +sed 's/#error ".*\/mfbt\//#error "/' < t1 > 
extract/js/src/mfbt/Unified_cpp_mfbt0.cpp
  +rm t1
  +
  +# stuff we can toss
  +rm -rf \
  +    extract/js/src/all-tests.json \
  +    extract/js/src/backend.mk \
  +    extract/js/src/backend.RecursiveMakeBackend \
  +    extract/js/src/backend.RecursiveMakeBackend.pp \
  +    extract/js/src/_build_manifests \
  +    extract/js/src/config \
  +    extract/js/src/config.cache \
  +    extract/js/src/config.log \
  +    extract/js/src/config.status \
  +    extract/js/src/configure \
  +    extract/js/src/configure.in \
  +    extract/js/src/ctypes \
  +    extract/js/src/doc \
  +    extract/js/src/editline \
  +    extract/js/src/gdb \
  +    extract/js/src/ipc \
  +    extract/js/src/jit-test \
  +    extract/js/src/jsapi-tests \
  +    extract/js/src/Makefile \
  +    extract/js/src/Makefile.in \
  +    extract/js/src/make-source-package.sh \
  +    extract/js/src/octane \
  +    extract/js/src/python \
  +    extract/js/src/README.html \
  +    extract/js/src/root-deps.mk \
  +    extract/js/src/root.mk \
  +    extract/js/src/shell \
  +    extract/js/src/skip_subconfigures \
  +    extract/js/src/subconfigures \
  +    extract/js/src/tests \
  +    extract/js/src/_virtualenv
  +
  +# stuff we have to replace
  +rm -rf \
  +    extract/js/src/vm/PosixNSPR.cpp \
  +    extract/js/src/vm/PosixNSPR.h \
  +
  +# stuff we don't want to deal with due to licensing
  +rm -rf \
  +    extract/mfbt/decimal \
  +    extract/mfbt/tests \
  +    extract/js/src/vm/make_unicode.py \
  +    extract/js/src/vtune
  +
  +# this is all of the EXPORTS files from the moz.build's
  +mkdir include
  +cp extract/js/src/js.msg include
  +cp extract/js/src/jsalloc.h include
  +cp extract/js/src/jsapi.h include
  +cp extract/js/src/jsbytecode.h include
  +cp extract/js/src/jsclist.h include
  +cp extract/js/src/jscpucfg.h include
  +cp extract/js/src/jsfriendapi.h include
  +cp extract/js/src/jsprf.h include
  +cp extract/js/src/jsprototypes.h include
  +cp extract/js/src/jspubtd.h include
  +cp extract/js/src/jstypes.h include
  +cp extract/js/src/jsversion.h include
  +cp extract/js/src/jswrapper.h include
  +cp extract/js/src/perf/jsperf.h include
  +
  +# this is all of the EXPORTS.js files from the moz.build's
  +mkdir include/js
  +cp extract/js/public/CallArgs.h include/js
  +cp extract/js/public/CallNonGenericMethod.h include/js
  +cp extract/js/public/CharacterEncoding.h include/js
  +cp extract/js/public/Class.h include/js
  +cp extract/js/public/Conversions.h include/js
  +cp extract/js/public/Date.h include/js
  +cp extract/js/public/Debug.h include/js
  +cp extract/js/public/GCAPI.h include/js
  +cp extract/js/public/GCHashTable.h include/js
  +cp extract/js/public/HashTable.h include/js
  +cp extract/js/public/HeapAPI.h include/js
  +cp extract/js/public/Id.h include/js
  +cp extract/js/public/Initialization.h include/js
  +cp extract/js/public/LegacyIntTypes.h include/js
  +cp extract/js/public/MemoryMetrics.h include/js
  +cp extract/js/public/Principals.h include/js
  +cp extract/js/public/ProfilingFrameIterator.h include/js
  +cp extract/js/public/ProfilingStack.h include/js
  +cp extract/js/public/Proxy.h include/js
  +cp extract/js/public/RequiredDefines.h include/js
  +cp extract/js/public/RootingAPI.h include/js
  +cp extract/js/public/SliceBudget.h include/js
  +cp extract/js/public/StructuredClone.h include/js
  +cp extract/js/public/TraceKind.h include/js
  +cp extract/js/public/TraceableVector.h include/js
  +cp extract/js/public/TracingAPI.h include/js
  +cp extract/js/public/TrackedOptimizationInfo.h include/js
  +cp extract/js/public/TypeDecls.h include/js
  +cp extract/js/public/UbiNode.h include/js
  +cp extract/js/public/UbiNodeBreadthFirst.h include/js
  +cp extract/js/public/UbiNodeCensus.h include/js
  +cp extract/js/public/Utility.h include/js
  +cp extract/js/public/Value.h include/js
  +cp extract/js/public/Vector.h include/js
  +cp extract/js/public/WeakMapPtr.h include/js
  +
  +# this is all of the EXPORTS.mozilla files from the moz.build's
  +mkdir include/mozilla
  +cp extract/mfbt/Alignment.h include/mozilla
  +cp extract/mfbt/AllocPolicy.h include/mozilla
  +cp extract/mfbt/AlreadyAddRefed.h include/mozilla
  +cp extract/mfbt/Array.h include/mozilla
  +cp extract/mfbt/ArrayUtils.h include/mozilla
  +cp extract/mfbt/Assertions.h include/mozilla
  +cp extract/mfbt/Atomics.h include/mozilla
  +cp extract/mfbt/Attributes.h include/mozilla
  +cp extract/mfbt/BinarySearch.h include/mozilla
  +cp extract/mfbt/BloomFilter.h include/mozilla
  +cp extract/mfbt/Casting.h include/mozilla
  +cp extract/mfbt/ChaosMode.h include/mozilla
  +cp extract/mfbt/Char16.h include/mozilla
  +cp extract/mfbt/CheckedInt.h include/mozilla
  +cp extract/mfbt/Compiler.h include/mozilla
  +cp extract/mfbt/Compression.h include/mozilla
  +cp extract/mfbt/DebugOnly.h include/mozilla
  +cp extract/mfbt/double-conversion/double-conversion.h include/mozilla
  +cp extract/mfbt/double-conversion/utils.h include/mozilla
  +cp extract/mfbt/Endian.h include/mozilla
  +cp extract/mfbt/EnumeratedArray.h include/mozilla
  +cp extract/mfbt/EnumeratedRange.h include/mozilla
  +cp extract/mfbt/EnumSet.h include/mozilla
  +cp extract/mfbt/FastBernoulliTrial.h include/mozilla
  +cp extract/mfbt/FloatingPoint.h include/mozilla
  +cp extract/mfbt/GuardObjects.h include/mozilla
  +cp extract/mfbt/HashFunctions.h include/mozilla
  +cp extract/mfbt/IntegerPrintfMacros.h include/mozilla
  +cp extract/mfbt/IntegerRange.h include/mozilla
  +cp extract/mfbt/IntegerTypeTraits.h include/mozilla
  +cp extract/mfbt/JSONWriter.h include/mozilla
  +cp extract/mfbt/Likely.h include/mozilla
  +cp extract/mfbt/LinkedList.h include/mozilla
  +cp extract/mfbt/LinuxSignal.h include/mozilla
  +cp extract/mfbt/WindowsVersion.h include/mozilla
  +cp extract/mfbt/MacroArgs.h include/mozilla
  +cp extract/mfbt/MacroForEach.h include/mozilla
  +cp extract/mfbt/MathAlgorithms.h include/mozilla
  +cp extract/mfbt/Maybe.h include/mozilla
  +cp extract/mfbt/MaybeOneOf.h include/mozilla
  +cp extract/mfbt/MemoryChecking.h include/mozilla
  +cp extract/mfbt/MemoryReporting.h include/mozilla
  +cp extract/mfbt/Move.h include/mozilla
  +cp extract/mfbt/NullPtr.h include/mozilla
  +cp extract/mfbt/NumericLimits.h include/mozilla
  +cp extract/mfbt/Opaque.h include/mozilla
  +cp extract/mfbt/Pair.h include/mozilla
  +cp extract/mfbt/PodOperations.h include/mozilla
  +cp extract/mfbt/Poison.h include/mozilla
  +cp extract/mfbt/Range.h include/mozilla
  +cp extract/mfbt/RangedPtr.h include/mozilla
  +cp extract/mfbt/RefCountType.h include/mozilla
  +cp extract/mfbt/ReentrancyGuard.h include/mozilla
  +cp extract/mfbt/RefPtr.h include/mozilla
  +cp extract/mfbt/ReverseIterator.h include/mozilla
  +cp extract/mfbt/RollingMean.h include/mozilla
  +cp extract/mfbt/Scoped.h include/mozilla
  +cp extract/mfbt/ScopeExit.h include/mozilla
  +cp extract/mfbt/SegmentedVector.h include/mozilla
  +cp extract/mfbt/SHA1.h include/mozilla
  +cp extract/mfbt/SizePrintfMacros.h include/mozilla
  +cp extract/mfbt/Snprintf.h include/mozilla
  +cp extract/mfbt/SplayTree.h include/mozilla
  +cp extract/mfbt/TaggedAnonymousMemory.h include/mozilla
  +cp extract/mfbt/TemplateLib.h include/mozilla
  +cp extract/mfbt/ThreadLocal.h include/mozilla
  +cp extract/mfbt/ToString.h include/mozilla
  +cp extract/mfbt/TypedEnumBits.h include/mozilla
  +cp extract/mfbt/Types.h include/mozilla
  +cp extract/mfbt/TypeTraits.h include/mozilla
  +cp extract/mfbt/UniquePtr.h include/mozilla
  +cp extract/mfbt/Variant.h include/mozilla
  +cp extract/mfbt/Vector.h include/mozilla
  +cp extract/mfbt/WeakPtr.h include/mozilla
  +cp extract/mfbt/unused.h include/mozilla
  +cp extract/mfbt/XorShift128PlusRNG.h include/mozilla
  +
  +# Apply a local patch
  +if [ -d mongo_patches ]; then
  +  git apply -p4 \
  +    mongo_patches/SERVER-23358.patch \
  +    mongo_patches/SERVER-24400.patch \
  +    mongo_patches/SERVER-22927-x86_64.patch
  +fi
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/gen-config.sh
  ============================================================================
  $ cvs diff -u -r0 -r1.1.2.1 gen-config.sh
  --- /dev/null 2017-07-05 17:33:00.000000000 +0200
  +++ gen-config.sh     2017-07-05 17:34:28.246324251 +0200
  @@ -0,0 +1,34 @@
  +#!/bin/sh
  +
  +if [ $# -ne 2 ]
  +then
  +    echo "Please supply an arch: x86_64, i386, etc and a platform: osx, 
linux, windows, etc"
  +    exit 0;
  +fi
  +
  +# the two files we need are js-confdefs.h which get used for the build and
  +# js-config.h for library consumers.  We also get different unity source 
files
  +# based on configuration, so save those too.
  +
  +cd mozilla-release/js/src
  +
  +PYTHON=python ./configure --without-intl-api --enable-posix-nspr-emulation 
--disable-trace-logging
  +
  +cd ../../..
  +
  +rm -rf platform/$1/$2/
  +
  +mkdir -p platform/$1/$2/build
  +mkdir platform/$1/$2/include
  +
  +cp mozilla-release/js/src/js/src/js-confdefs.h platform/$1/$2/build
  +cp mozilla-release/js/src/js/src/*.cpp platform/$1/$2/build
  +cp mozilla-release/js/src/js/src/js-config.h platform/$1/$2/include
  +
  +for unified_file in $(ls -1 platform/$1/$2/build/*.cpp) ; do
  +     sed 's/#include ".*\/js\/src\//#include "/' < $unified_file > t1
  +     sed 's/#error ".*\/js\/src\//#error "/' < t1 > $unified_file
  +     rm t1
  +done
  +
  +
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to