spidermonkey: cleanup and rename versions

This commit is contained in:
Nikolay Amiantov
2016-11-21 02:46:35 +03:00
parent 0c6b3a3647
commit c2274cdfb5
14 changed files with 30 additions and 116 deletions
@@ -1,36 +0,0 @@
{ stdenv, fetchurl, readline, nspr }:
stdenv.mkDerivation rec {
version = "1.8.0-rc1";
name = "spidermonkey-${version}";
src = fetchurl {
url = "mirror://mozilla/js/js-${version}.tar.gz";
sha256 = "374398699ac3fd802d98d642486cf6b0edc082a119c9c9c499945a0bc73e3413";
};
buildInputs = [ readline nspr ];
postUnpack = "sourceRoot=\${sourceRoot}/src";
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.isi686 "pic";
makefileExtra = ./Makefile.extra;
makefile = "Makefile.ref";
patchPhase =
''
cat ${makefileExtra} >> ${makefile}
sed -e 's/ -ltermcap/ -lncurses/' -i ${makefile}
'';
preConfigure = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr.dev}/include/nspr"
'';
makeFlags = "-f ${makefile} JS_DIST=\${out} BUILD_OPT=1 JS_READLINE=1 JS_THREADSAFE=1";
meta = {
platforms = stdenv.lib.platforms.linux;
};
}
@@ -1,11 +1,11 @@
{ stdenv, autoconf213, fetchurl, pkgconfig, nspr, perl, python2, zip }:
{ stdenv, lib, autoconf213, fetchurl, pkgconfig, nspr, perl, python2, zip }:
stdenv.mkDerivation rec {
version = "185-1.0.0";
name = "spidermonkey-${version}";
version = "1.8.5";
src = fetchurl {
url = "mirror://mozilla/js/js${version}.tar.gz";
url = "mirror://mozilla/js/js185-1.0.0.tar.gz";
sha256 = "5d12f7e1f5b4a99436685d97b9b7b75f094d33580227aa998c406bbae6f2a687";
};
@@ -19,14 +19,14 @@ stdenv.mkDerivation rec {
preConfigure = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr.dev}/include/nspr"
export LIBXUL_DIST=$out
${if stdenv.isArm then "autoreconf --verbose --force" else ""}
${lib.optionalString stdenv.isArm "autoreconf --verbose --force"}
'';
patches = stdenv.lib.optionals stdenv.isArm [
# Explained below in configureFlags for ARM
./findvanilla.patch
./1.8.5-findvanilla.patch
# Fix for hard float flags.
./arm-flags.patch
./1.8.5-arm-flags.patch
];
patchFlags = "-p3";
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, nspr, perl, python2, zip, libffi, readline }:
{ stdenv, fetchurl, pkgconfig, nspr, perl, python2, zip, libffi, readline, icu }:
stdenv.mkDerivation rec {
version = "24.2.0";
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ nspr ];
buildInputs = [ pkgconfig perl python2 zip libffi readline ];
buildInputs = [ pkgconfig perl python2 zip libffi readline icu ];
postPatch = ''
# Fixes an issue with version detection under perl 5.22.x
@@ -32,6 +32,7 @@ stdenv.mkDerivation rec {
"--libdir=$(lib)/lib"
"--includedir=$(dev)/include"
"--enable-threadsafe"
"--with-system-icu"
"--with-system-nspr"
"--with-system-ffi"
"--enable-readline"
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, perl, python2, zip, libffi, readline }:
{ stdenv, fetchurl, pkgconfig, perl, python2, zip, libffi, nspr, icu, readline }:
stdenv.mkDerivation rec {
version = "31.5.0";
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
sha256 = "1q8icql5hh1g3gzg5fp4rl9rfagyhm9gilfn3dgi7qn4i1mrfqsd";
};
buildInputs = [ pkgconfig perl python2 zip libffi readline ];
buildInputs = [ pkgconfig perl python2 zip libffi readline nspr icu ];
postUnpack = "sourceRoot=\${sourceRoot}/js/src";
@@ -25,6 +25,8 @@ stdenv.mkDerivation rec {
configureFlags = [
"--enable-threadsafe"
"--with-system-ffi"
"--with-system-nspr"
"--with-system-icu"
"--enable-readline"
# enabling these because they're wanted by 0ad. They may or may
@@ -1,10 +0,0 @@
install: $(PROGRAM) $(SHARED_LIBRARY)
mkdir -pv $(DIST)/{bin,lib}
mkdir -pv $(DIST)/include
cp -v $(PROGRAM) $(DIST)/bin
cp -v $(SHARED_LIBRARY) $(LIBRARY) $(DIST)/lib
cp -v $(JS_HFILES) $(API_HFILES) $(OTHER_HFILES) $(DIST)/include
mkdir -pv $(DIST)/include/js
find . -name '*.h' -exec cp '{}' $(DIST)/include/js ';'
find . -name '*.msg' -exec cp '{}' $(DIST)/include/js ';'
@@ -1,37 +0,0 @@
{ stdenv, fetchurl, readline }:
stdenv.mkDerivation rec {
name = "spidermonkey-1.7";
src = fetchurl {
url = mirror://mozilla/js/js-1.7.0.tar.gz;
sha256 = "12v6v2ccw1y6ng3kny3xw0lfs58d1klylqq707k0x04m707kydj4";
};
hardeningDisable = [ "format" ]
++ stdenv.lib.optional stdenv.isi686 "stackprotector";
buildInputs = [ readline ];
postUnpack = "sourceRoot=\${sourceRoot}/src";
makefileExtra = ./Makefile.extra;
makefile = "Makefile.ref";
patchPhase =
''
cat ${makefileExtra} >> ${makefile}
sed -e 's/ -ltermcap/ -lncurses/' -i ${makefile}
'';
CFLAGS = "-DPIC -fPIC -DJS_C_STRINGS_ARE_UTF8";
makeFlags = "-f ${makefile} JS_DIST=\${out} BUILD_OPT=1 JS_READLINE=1";
meta = with stdenv.lib; {
description = "Mozilla's JavaScript engine written in C/C++";
homepage = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey";
license = licenses.mpl20;
platforms = platforms.all;
};
}