spidermonkey: cleanup and rename versions

This commit is contained in:
Nikolay Amiantov 2016-11-11 01:26:11 +03:00
parent 0c6b3a3647
commit c2274cdfb5
14 changed files with 30 additions and 116 deletions

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, perl, ncurses, xlibsWrapper, bzip2, zlib, openssl
, spidermonkey, gpm
, spidermonkey_1_8_5, gpm
, enableGuile ? false, guile ? null # Incompatible licenses, LGPLv3 - GPLv2
, enablePython ? false, python ? null
}:
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
patches = [ ./gc-init.patch ];
buildInputs = [ perl ncurses xlibsWrapper bzip2 zlib openssl spidermonkey gpm ]
buildInputs = [ perl ncurses xlibsWrapper bzip2 zlib openssl spidermonkey_1_8_5 gpm ]
++ stdenv.lib.optional enableGuile guile
++ stdenv.lib.optional enablePython python;
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
''
--enable-finger --enable-html-highlight
--with-perl --enable-gopher --enable-cgi --enable-bittorrent
--with-spidermonkey=${spidermonkey}
--with-spidermonkey=${spidermonkey_1_8_5}
--enable-nntp --with-openssl=${openssl.dev}
'' + stdenv.lib.optionalString enableGuile " --with-guile"
+ stdenv.lib.optionalString enablePython " --with-python";

View file

@ -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;
};
}

View file

@ -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";

View file

@ -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"

View file

@ -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

View file

@ -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 ';'

View file

@ -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;
};
}

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, glib, expat, pam, intltool, spidermonkey
{ stdenv, fetchurl, pkgconfig, glib, expat, pam, intltool, spidermonkey_17
, gobjectIntrospection, libxslt, docbook_xsl, docbook_xml_dtd_412
, useSystemd ? stdenv.isLinux, systemd }:
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
outputs = [ "bin" "dev" "out" ]; # small man pages in $bin
buildInputs =
[ pkgconfig glib expat pam intltool spidermonkey gobjectIntrospection ]
[ pkgconfig glib expat pam intltool spidermonkey_17 gobjectIntrospection ]
++ [ libxslt docbook_xsl docbook_xml_dtd_412 ] # man pages
++ stdenv.lib.optional useSystemd systemd;

View file

@ -1,9 +1,8 @@
{ stdenv, fetchgit
, sqlite, expat, mp4v2, flac, spidermonkey, taglib, libexif, curl, ffmpeg, file
, sqlite, expat, mp4v2, flac, spidermonkey_1_8_5, taglib, libexif, curl, ffmpeg, file
, pkgconfig, autoreconfHook }:
stdenv.mkDerivation rec {
name = "mediatomb-${version}";
version = "0.12.1";
@ -13,7 +12,7 @@ stdenv.mkDerivation rec {
sha256 = "1mimslr4q6mky865y6561rr64cbn4gf0qc2dhgb31hxp4rc1kmzd";
};
buildInputs = [ sqlite expat spidermonkey taglib libexif curl ffmpeg file mp4v2 flac
buildInputs = [ sqlite expat spidermonkey_1_8_5 taglib libexif curl ffmpeg file mp4v2 flac
pkgconfig autoreconfHook ];
meta = with stdenv.lib; {

View file

@ -5700,12 +5700,11 @@ in
spark = callPackage ../applications/networking/cluster/spark { };
spidermonkey = callPackage ../development/interpreters/spidermonkey { };
spidermonkey_1_8_0rc1 = callPackage ../development/interpreters/spidermonkey/1.8.0-rc1.nix { };
spidermonkey_185 = callPackage ../development/interpreters/spidermonkey/185-1.0.0.nix { };
spidermonkey_17 = callPackage ../development/interpreters/spidermonkey/17.0.nix { };
spidermonkey_24 = callPackage ../development/interpreters/spidermonkey/24.2.nix { };
spidermonkey_31 = callPackage ../development/interpreters/spidermonkey/31.5.nix { };
spidermonkey_1_8_5 = callPackage ../development/interpreters/spidermonkey/1.8.5.nix { };
spidermonkey_17 = callPackage ../development/interpreters/spidermonkey/17.nix { };
spidermonkey_24 = callPackage ../development/interpreters/spidermonkey/24.nix { };
spidermonkey_31 = callPackage ../development/interpreters/spidermonkey/31.nix { };
spidermonkey = spidermonkey_31;
supercollider = callPackage ../development/interpreters/supercollider {
fftw = fftwSinglePrec;
@ -8843,9 +8842,7 @@ in
polarssl = mbedtls;
polkit = callPackage ../development/libraries/polkit {
spidermonkey = spidermonkey_17;
};
polkit = callPackage ../development/libraries/polkit { };
polkit_qt4 = callPackage ../development/libraries/polkit-qt-1/qt-4.nix { };
@ -10002,7 +9999,7 @@ in
charybdis = callPackage ../servers/irc/charybdis {};
couchdb = callPackage ../servers/http/couchdb {
spidermonkey = spidermonkey_185;
spidermonkey = spidermonkey_1_8_5;
python = python27;
sphinx = python27Packages.sphinx;
erlang = erlangR16;
@ -10105,9 +10102,7 @@ in
mattermost = callPackage ../servers/mattermost { };
matterircd = callPackage ../servers/mattermost/matterircd.nix { };
mediatomb = callPackage ../servers/mediatomb {
spidermonkey = spidermonkey_185;
};
mediatomb = callPackage ../servers/mediatomb { };
memcached = callPackage ../servers/memcached {};

View file

@ -79,10 +79,10 @@ let
sha256 = "1ywrsp90w6rlgq3v2vmvp2zvvykkgqqasab7h9bf3vgvgv3qasbg";
configureFlags = [
"--with-spidermonkey=${pkgs.spidermonkey_185}"
"--with-spidermonkey=${pkgs.spidermonkey_1_8_5}"
];
buildInputs = [ pkgs.spidermonkey_185 ];
buildInputs = [ pkgs.spidermonkey_1_8_5 ];
};
xdebug = if isPhp7 then xdebug24 else xdebug23;