aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory M. Tuner <gmt@be-evil.net>2014-03-24 09:01:38 -0700
committerGregory M. Tuner <gmt@be-evil.net>2014-03-24 09:01:38 -0700
commit2bf87671528e8e773c024938831c8e8ebf74393c (patch)
tree5abb6a8d77b477c1e8660b347cf5dbd58312e919 /dev-lang/spidermonkey
parentdev-libs/nspr-4.10.4-r1: revbump/merge (diff)
downloadgmt-2bf87671528e8e773c024938831c8e8ebf74393c.tar.gz
gmt-2bf87671528e8e773c024938831c8e8ebf74393c.tar.bz2
gmt-2bf87671528e8e773c024938831c8e8ebf74393c.zip
dev-lang/spidermonkey: revbump, merge, update all versions
Signed-off-by: Gregory M. Tuner <gmt@be-evil.net>
Diffstat (limited to 'dev-lang/spidermonkey')
-rw-r--r--dev-lang/spidermonkey/ChangeLog69
-rw-r--r--dev-lang/spidermonkey/Manifest15
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-17-ia64-mmap.patch67
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-17.0.0-fix-file-permissions.patch37
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-24-system-icu.patch199
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-24.2.0-fix-file-permissions.patch29
-rw-r--r--dev-lang/spidermonkey/metadata.xml1
-rw-r--r--dev-lang/spidermonkey/spidermonkey-1.8.7-r4.ebuild176
-rw-r--r--dev-lang/spidermonkey/spidermonkey-17.0.0-r4.ebuild (renamed from dev-lang/spidermonkey/spidermonkey-17.0.0-r2.ebuild)30
-rw-r--r--dev-lang/spidermonkey/spidermonkey-24.2.0-r2.ebuild161
10 files changed, 763 insertions, 21 deletions
diff --git a/dev-lang/spidermonkey/ChangeLog b/dev-lang/spidermonkey/ChangeLog
index e43b52f..b172b91 100644
--- a/dev-lang/spidermonkey/ChangeLog
+++ b/dev-lang/spidermonkey/ChangeLog
@@ -1,6 +1,71 @@
# ChangeLog for dev-lang/spidermonkey
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/spidermonkey/ChangeLog,v 1.128 2013/09/14 10:01:29 ago Exp $
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/spidermonkey/ChangeLog,v 1.142 2014/03/08 14:38:51 anarchy Exp $
+
+*spidermonkey-24.2.0-r1 (08 Mar 2014)
+*spidermonkey-17.0.0-r3 (08 Mar 2014)
+
+ 08 Mar 2014; <anarchy@gentoo.org>
+ +files/spidermonkey-17.0.0-fix-file-permissions.patch,
+ +files/spidermonkey-24.2.0-fix-file-permissions.patch,
+ +spidermonkey-17.0.0-r3.ebuild, +spidermonkey-24.2.0-r1.ebuild,
+ -spidermonkey-17.0.0-r2.ebuild, -spidermonkey-24.2.0.ebuild:
+ Fix bug #502348
+
+ 03 Mar 2014; Samuli Suominen <ssuominen@gentoo.org>
+ spidermonkey-17.0.0-r2.ebuild:
+ Document -mips keyword in a comment for clarity.
+
+ 02 Mar 2014; Andreas K. Huettel <dilfridge@gentoo.org>
+ spidermonkey-24.2.0.ebuild:
+ Add subslot dependency on dev-libs/icu
+
+ 25 Feb 2014; Markus Meier <maekke@gentoo.org> spidermonkey-17.0.0-r2.ebuild:
+ arm stable, bug #500758
+
+ 24 Feb 2014; Ian Stakenvicius (_AxS_) <axs@gentoo.org>
+ -spidermonkey-17.0.0-r1.ebuild, spidermonkey-17.0.0-r2.ebuild,
+ spidermonkey-24.2.0.ebuild:
+ added missing zlib dep, bug 502332 ; remove old
+
+ 23 Feb 2014; Pacho Ramos <pacho@gentoo.org> spidermonkey-17.0.0-r2.ebuild:
+ x86 stable, bug #500758
+
+ 23 Feb 2014; Pacho Ramos <pacho@gentoo.org> spidermonkey-17.0.0-r2.ebuild:
+ amd64 stable, bug #500758
+
+ 22 Feb 2014; Jeroen Roovers <jer@gentoo.org> spidermonkey-17.0.0-r1.ebuild,
+ spidermonkey-17.0.0-r2.ebuild:
+ Marked -hppa (bug #502124).
+
+ 03 Feb 2014; Ian Stakenvicius <axs@gentoo.org> spidermonkey-24.2.0.ebuild:
+ restricted tests for ia64 on sm24
+
+*spidermonkey-17.0.0-r2 (20 Jan 2014)
+
+ 20 Jan 2014; Ian Stakenvicius <axs@gentoo.org>
+ +files/spidermonkey-17-ia64-mmap.patch, +spidermonkey-17.0.0-r2.ebuild:
+ backport mmap patch to fix ia64 on spidermonkey-17
+
+*spidermonkey-24.2.0 (06 Jan 2014)
+
+ 06 Jan 2014; Ian Stakenvicius <axs@gentoo.org>
+ +files/spidermonkey-24-system-icu.patch, +spidermonkey-24.2.0.ebuild,
+ -spidermonkey-1.8.2.15-r1.ebuild, -spidermonkey-1.8.2.15.ebuild, metadata.xml,
+ spidermonkey-17.0.0-r1.ebuild:
+ add new version for slot 24, remove old 1.8.2 ebuilds
+
+ 06 Jan 2014; Agostino Sarubbo <ago@gentoo.org>
+ spidermonkey-1.8.2.15-r2.ebuild:
+ Stable for sparc, wrt bug #480392
+
+ 24 Dec 2013; Anthony G. Basile <blueness@gentoo.org>
+ spidermonkey-17.0.0-r1.ebuild:
+ Add -mips to 17.0.0-r1, bug #491294
+
+ 24 Dec 2013; Anthony G. Basile <blueness@gentoo.org>
+ spidermonkey-17.0.0-r1.ebuild:
+ Remove keyword ~mips on 17.0.0-r1, bug #491294
14 Sep 2013; Agostino Sarubbo <ago@gentoo.org>
spidermonkey-1.8.2.15-r2.ebuild:
diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest
index 8f52c02..2b8ea02 100644
--- a/dev-lang/spidermonkey/Manifest
+++ b/dev-lang/spidermonkey/Manifest
@@ -16,10 +16,19 @@ AUX spidermonkey-1.8.7-freebsd-pthreads.patch 175 SHA256 0cc365e8c43c2eeae316382
AUX spidermonkey-1.8.7-symbol-versions.patch 1011 SHA256 a0706551d4ff71a984b2b9444901dc98b60a390488c8b99691c7d0d01f7111e7 SHA512 16fa4bab5da4724a8b3c925133a85975bf1bfb47e4b6bfcae1c2f76eed824ea82b321928fc478966686a3582e0cd03630177b041ab75f2c572f7f00d3e3e2242 WHIRLPOOL 8118ea4845394b36c6f5ec8914b66e5b9fadc83bc6f696d0814ff68167e397c3e685a96b4fa3ce0647fe76337b592b778e640b6429095ec0fea2883d0e44777a
AUX spidermonkey-1.8.7-x32.patch 753 SHA256 0b223162cf7067d1dbbb950708265ccf20637fe4906564080d9c9c38b85e826d SHA512 ae9c0241fd1cc02b5f21865adb1efb750246850dcf93ee1b81c5faf19c5d4d5b0ab6e853527899c438d2139601e8a177f7ee6c9a3700d2816df32f5e09d273e8 WHIRLPOOL 8b43164a8a7cc4d82092e81d4a2d0d21a8614dfe7964f3fbb49d0f70e25178ba0197bd525e9f08cb1c621d991dd4aefc97be15901d3f482fce180e8d90bf8706
AUX spidermonkey-1.9.2.13-as-needed.patch 623 SHA256 5163be062d23265cc19e9b1acb441ec42ceb2fd678b03076880869b7b9f92f8f SHA512 0acc2dc178396302518a2ac868ff1ab5710615bebe0c9ece31dba59037a92c741c5f02ba24cb76fe239e1b39946ff3362e5414e63f5ff64e48b64012b48a9779 WHIRLPOOL 75bc285dc9bb437a4ae4350eb755bbb2d0418a4f854ce4daeda4ca805ca31e16dabda0e35ac2a05dc0f5fcf6dfe1929547252a63553664921fd24a6ca76a30fa
+AUX spidermonkey-17-ia64-mmap.patch 2284 SHA256 b4890afa3732f08acd9c720967980c4f3ee29d01509f2f97a6871bf3556d0074 SHA512 dfb51a3379d81e6ea6a6e05332b58bdde6716f5e1c042a4737bc5d1f21cda09f412f8affee87f5edd04d9392fbcb60e28809b903b6f96eed39914c4b9dc7380e WHIRLPOOL 52975848ac8d03126827696f4d35c8d82d211f6bc24d09638f53bfd5d66700ecb23b40ce1695219f638e973948acad2ea11791b0f93680cc6d24e113c602b24f
AUX spidermonkey-17-js-config-shebang.patch 987 SHA256 030d1841d1613a32f5074c39e86a893ece5ad7f4ff5cd1357bd4c731c4046d4d SHA512 1015a1d65c9b80c826041ebe833f1437703c18394eff3dc1e40e938e8e4f4d9545ac8e62062458132cbe6e35defe167d0d9317c03eede7b05693ecdee8b8bad2 WHIRLPOOL a05d7f7baae61ec5f84cdc922b0368dac067ac9682b837a0fc5173213e5424bfce12f1184e6c0a3b912bebf0eeb5953c6357080d11b1e3d4ce16716ba1734d89
+AUX spidermonkey-17.0.0-fix-file-permissions.patch 1338 SHA256 6169b9cd73c5f756598c1a90572253a9d7a60e2f87daa41fa7179916b0cba3fe SHA512 06770e7c257b3414096f33fb311bde417862bde6c26748969fb3929b5912538225826193d30c0b1985bbde574c450686ced9812ac0989ee20c07da8184ccbbe6 WHIRLPOOL 36d528dc25fed8f43925e1d4a96ae954653ec98d6c83e64fbfae2de64a7dcb6d38fa11db99e32bec413c4ee36067af88cbb090d32349a759be99fcf52c7dc37e
+AUX spidermonkey-24-system-icu.patch 5981 SHA256 893fba496bac1a2c321a9e978cdd7fb1d79e3aee0c916773865b2be9113069dc SHA512 394d3f07e14599735df0d66809bfeb9e2d003615b07f2bb7c8b7a5884f08e729670d422f266d13164d6a00782d4e6a0fba02ee77c0e0359fe21d78b145270672 WHIRLPOOL d8979d84d928d07258d1eb154c7ed5d4fc6ff9a3cba0638703093301c9ad3ed006fafca2859875e1becb0961df9e2e277bb9025d14c98e885323853ef61d5dfc
+AUX spidermonkey-24.2.0-fix-file-permissions.patch 1068 SHA256 5c1b2a29c8fc0fad09f47e848f80f2f8194f8ba9fcab9b5a487ed9643c3ab1b7 SHA512 4c1257371b7535ec7c27599d895aeaf6fb347bbe1437dec1c43581a00c4f3e2a8368cc49beb9a68f1963dd1888529a83a7b417ccc1a966d8a7657a9516c76fb1 WHIRLPOOL 7035e0a7120192ea305d9da8379a2caf470b6a1b9b0604df42196d36acfd7801cac0d78f2520a89f36db944bc8886068c6ebaafd70308cbbc69278a283a62c62
DIST js185-1.0.0.tar.gz 6164605 SHA256 5d12f7e1f5b4a99436685d97b9b7b75f094d33580227aa998c406bbae6f2a687 SHA512 2af7122a7c7007fd7b6668776fe1222515a810b3e43bbf0f76b8f94e1ef406ffd3fb5ccec393021b00274c05b38a77235bc8d6886994c56762fcaf0aa7cf6718 WHIRLPOOL 58b372713275874d3ae3c6b58c12c56bf8d17d024d591e321538bcdd8e615332e41655954368ce86b90e970209e3fd650c39d931000880f5ec22cb044b5d7a4e
+DIST js187-1.0.0.tar.gz 7106870 SHA256 ce80a9eabdaf22d2a1c4830ea36120e6af207bb336bea8f6d34cba32f59fe2b4 SHA512 7df55daac1eac0a7a7b31df044f7d5cc40a1f5079907b661f7c8489614b0ddff35e4f7cd13214bfc4baf9bdb37d392e4118f63ab589a051978d6ceef63d1e9f2 WHIRLPOOL d0f2ea8add0c7c1ac34ff8a6f887e931768091696dda037e7778ecd7eb02889b455747cfaa9a362844983eb2bdda6bddab46bf542cecf81f91ec5165efc0b9a3
+DIST mozjs-24.2.0.tar.bz2 15624530 SHA256 e62f3f331ddd90df1e238c09d61a505c516fe9fd8c5c95336611d191d18437d8 SHA512 49805e256f6fa797505c01b7596d5bb941ed7a2454862c52ed42ad48b5ae4540b777e77ed8da1b98c89f8622ed2c76052187983687008a4ff53594addb328df4 WHIRLPOOL ea74d19c79b1a0fe407e2803900c49c23e8b76444fb4e20995072c3c59427e8df1895df04f2f4de779a1c58cd1166dd97aeaf7564350832011efe89dbcf9583e
DIST mozjs17.0.0.tar.gz 6778934 SHA256 321e964fe9386785d3bf80870640f2fa1c683e32fe988eeb201b04471c172fba SHA512 39b68aeb9f712f146778d8b68ee795709a1372c8ab893a222af4eb34882427d6f5cf877e743d6cb2f1b4348c194d8f3774f00cb775b03515b34b49560b748be4 WHIRLPOOL 4df7b51577787194065162b09d2c3dda849c13fa901305f9925d4ca5d38bb7f8e2daa943099e003fb9d11f9264ae2d77ccf04e5eea11e3ddcb624b504b99d52f
+DIST spidermonkey-1.8.7-patches-0.1.tar.xz 4796 SHA256 ddc0431ed9a96b67c27787fa824f4456693b9361dbb41366f8196d1a3425a353 SHA512 bd1976b12940390e7d5db6078ca6339006428874788688e4ea4f6bd86afd341c3edd356bac801883637f46085c6d971d4f79e44fa9f6e44b3b715186355be175 WHIRLPOOL 5614bcb99d7101751e6f5be24b20e8a6acd5a682640025830f0c4a4fb74e724e5d71eb56c3e09d0ced4bbfa6c6c93daf42a7bc326c3cf0b07bee777901f25039
EBUILD spidermonkey-1.8.5-r5.ebuild 5331 SHA256 29aab77a2377c45c683c7d36be704f98305f81ba27222b16215ebab91ac16637 SHA512 90e7b3d5f9cdb49c2930a7f978027e368305173a7c6136c747c0ad4e5de7006cb7fe62cc5612e028ffcff71cc0e74fa75d15405eb0bbcf7852bfac41f95c665e WHIRLPOOL 684143d56491687f2f83295f8aae6516d6822173028f8f449c10b9fef5fbab8b3f71d72f2dcadce4aa22bc4907bfa91d854990b74434c8c5205cf2f8d57fc776
-EBUILD spidermonkey-17.0.0-r2.ebuild 4353 SHA256 1990aa0a4ffb5155e4131e619b4d670272a2d8dfd006d60963c6e3035eb60f7e SHA512 71ee44e59ea7bff8469d8e66465d1b3a4d6d68ebd5bcfb49c3da7de6bfad032aefa236b792fa38eb5669e111e047ef0f92bb502a045bb0bef0d07d4c9fbd2449 WHIRLPOOL 902a2390b4b4c61dec4ef8f94b1e26ab207e2a25d7ac4e4bd4e0352d9f13b7f1effd322f74de59dc39a7d85316378d0d83a2abd0e5021922b8853c3152e3bff3
-MISC ChangeLog 20583 SHA256 492db7daaad7a5ba75b66aa9b4bdef23fd1e0cebabd46f88014c762eb67e8c56 SHA512 4f439117588070d8cc96265d4cb5488d66b4d74decc244eb72d7e26f9b0cb04f1c5b9b3e4b1e2bd9502b079c7e22c75b453a94b0c8639c43c899a0afc25078e7 WHIRLPOOL 929a1dd8d1588e36ef77b2953ed402a4b38dfb06dc824e45addc79cc2fdc9085d2f6471595a613137df22a5b5c5cb620bc69af69d0102ff943e7fff655a25820
-MISC metadata.xml 518 SHA256 3e269ca10769d6bb9bc488f481a4487be5108d5e440775f865b4178daf89412e SHA512 9b767bf335e523d410ccdca16bcd44bd701ae7255ad9dcda1bc092708e0f69be3805001b7cf39688dcece38b35f67b375edd09aa712fce6ef5aec250dcac8896 WHIRLPOOL 90481c9ff831e4cd25d94443de5cdfac49238747587841d3ceb4493c1b6acf16dda648e368f2058936efbb2d24c0c4d481eb9905b15e412834f682b9accfdae8
+EBUILD spidermonkey-1.8.7-r4.ebuild 4913 SHA256 9f49ec91fe379d29d1d625f2c60503c0cbfd2a0b95479d2f4750b5a676ec8985 SHA512 e8841eae3fb0bfd0b99ad42245760d728c5932c8e878d5ab31e1e7f138f973a6b54c6d573becc20ada46ca5769839b1a3729eaf89abb27c6e0c9032800570bf5 WHIRLPOOL 3b2cb3777bd9651f957ec52801542337299badf323df8666ca50b38083b3e2f56ec76f5bf75a63621d88b451a40f43646c86c1d70a5fc8ef959a52103c2c0756
+EBUILD spidermonkey-17.0.0-r4.ebuild 4321 SHA256 b862d39675e19f7ebb7c54251d4c236f646ee8a108098d469cb7fa6c97c7c5a7 SHA512 e2824a66587106e83ee3aab899fb528557207f4883fa9241295b67983dfffc735bfc730584fefbf563fd14e830443e27c6d16e77ffebc4d47eda521bfec07280 WHIRLPOOL 3b7de0f005ecbb2b67d56231261498acca963548e7a5a4c37ab2bd05fad0d4d56867220580506dd21d96d27961ed5be79907939a61b541900119071d98d27863
+EBUILD spidermonkey-24.2.0-r2.ebuild 4532 SHA256 e50677f6a0ce3ecff6eb95df66b17a031f0af7bc27b255d9c7f7042537416c4d SHA512 7783f25f01d994c8914a1add44f4536b134985eaa366daec8e1120ae23b905766a7615e3fd8c0aae44dea250d167cfc8d80e27ce5bfb8d11fe18493e593c1b62 WHIRLPOOL eab43b12f7b0f48c501e03aa6d3527fb746707db673fc6196789d807045dc3b530e568da16af74c7bee56e07303d32c087aee943f236d5ee4938af54d9175e53
+MISC ChangeLog 22936 SHA256 af7b90185bccbcf62f289693a796e43e970c5e5434129bb1c31778d81ae90b65 SHA512 a569b1525c9386878b0c102ed1a79ae6d0af001a7419dce1e8eccb149b630ffab8e602ef2fc95dce7de43e8e46a6c10eecfa5c54d7c132de06e5ddf23278b485 WHIRLPOOL bc9aba921d2eedad16d418484fbf2554608b7b60ed13167ba786cc3f5f3181eab34dc4c1b1a2996315899e675b62fec351b69f45f52887775c99cce908274513
+MISC metadata.xml 666 SHA256 c7c78c882b67a3f4c72a6cefcd83abe58f8fcecd9e5dfdec7ddb133b64a85f8f SHA512 3a94dc13bf8f417d2f760a18765a58e7d8118ceb52b90ef3ae646830d745d10e5e09d7b60828b27381d16c8008c0c1dd00fa0a88e9a447d45cf76312b780f12e WHIRLPOOL 34e73fb374d36c0e29d6ea472c3e9751b42bc1cd061b795b56efd9df3021cc27d7f00beb971adfee8785016b9d24575228bc8d2de985fbc49c36596962bbb2de
diff --git a/dev-lang/spidermonkey/files/spidermonkey-17-ia64-mmap.patch b/dev-lang/spidermonkey/files/spidermonkey-17-ia64-mmap.patch
new file mode 100644
index 0000000..7adbd11
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-17-ia64-mmap.patch
@@ -0,0 +1,67 @@
+--- a/js/src/gc/Memory.cpp 2013-02-11 17:33:22.000000000 -0500
++++ b/js/src/gc/Memory.cpp 2014-01-08 12:36:29.406851422 -0500
+@@ -302,10 +302,46 @@
+ void
+ InitMemorySubsystem()
+ {
++#if !defined(__ia64__)
+ if (size_t(sysconf(_SC_PAGESIZE)) != PageSize)
+ MOZ_CRASH();
++#endif
+ }
+
++static inline void *
++MapMemory(size_t length, int prot, int flags, int fd, off_t offset)
++{
++#if defined(__ia64__)
++ /*
++ * The JS engine assumes that all allocated pointers have their high 17 bits clear,
++ * which ia64's mmap doesn't support directly. However, we can emulate it by passing
++ * mmap an "addr" parameter with those bits clear. The mmap will return that address,
++ * or the nearest available memory above that address, providing a near-guarantee
++ * that those bits are clear. If they are not, we return NULL below to indicate
++ * out-of-memory.
++ *
++ * The addr is chosen as 0x0000070000000000, which still allows about 120TB of virtual
++ * address space.
++ *
++ * See Bug 589735 for more information.
++ */
++ void *region = mmap((void*)0x0000070000000000, length, prot, flags, fd, offset);
++ if (region == MAP_FAILED)
++ return MAP_FAILED;
++ /*
++ * If the allocated memory doesn't have its upper 17 bits clear, consider it
++ * as out of memory.
++ */
++ if ((uintptr_t(region) + (length - 1)) & 0xffff800000000000) {
++ JS_ALWAYS_TRUE(0 == munmap(region, length));
++ return MAP_FAILED;
++ }
++ return region;
++#else
++ return mmap(NULL, length, prot, flags, fd, offset);
++#endif
++}
++
+ void *
+ MapAlignedPages(size_t size, size_t alignment)
+ {
+@@ -319,12 +353,15 @@
+
+ /* Special case: If we want page alignment, no further work is needed. */
+ if (alignment == PageSize) {
+- return mmap(NULL, size, prot, flags, -1, 0);
++ void *region = MapMemory(size, prot, flags, -1, 0);
++ if (region == MAP_FAILED)
++ return NULL;
++ return region;
+ }
+
+ /* Overallocate and unmap the region's edges. */
+ size_t reqSize = Min(size + 2 * alignment, 2 * size);
+- void *region = mmap(NULL, reqSize, prot, flags, -1, 0);
++ void *region = MapMemory(reqSize, prot, flags, -1, 0);
+ if (region == MAP_FAILED)
+ return NULL;
+
diff --git a/dev-lang/spidermonkey/files/spidermonkey-17.0.0-fix-file-permissions.patch b/dev-lang/spidermonkey/files/spidermonkey-17.0.0-fix-file-permissions.patch
new file mode 100644
index 0000000..f4eee93
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-17.0.0-fix-file-permissions.patch
@@ -0,0 +1,37 @@
+diff -urN a/js/src/Makefile.in b/js/src/Makefile.in
+--- a/js/src/Makefile.in 2013-03-25 15:34:20.000000000 -0500
++++ b/js/src/Makefile.in 2014-03-08 08:26:36.726979744 -0600
+@@ -788,7 +788,7 @@
+ $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(JS_CONFIG_SUBSTITUTIONS) $< > $@
+
+ install:: $(LIBRARY_NAME).pc
+- $(SYSINSTALL) $^ $(DESTDIR)$(libdir)/pkgconfig
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(libdir)/pkgconfig
+
+ ######################################################
+ # BEGIN SpiderMonkey header installation
+@@ -836,19 +836,19 @@
+ #
+
+ install:: $(INSTALLED_HEADERS)
+- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(MODULE)
+
+ install:: $(EXPORTS_ds)
+- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)/ds
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(MODULE)/ds
+
+ install:: $(EXPORTS_gc)
+- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)/gc
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(MODULE)/gc
+
+ install:: $(EXPORTS_js)
+- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)/js
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(MODULE)/js
+
+ install:: $(EXPORTS_mozilla)
+- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)/mozilla
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(MODULE)/mozilla
+
+ #
+ # END SpiderMonkey header installation
diff --git a/dev-lang/spidermonkey/files/spidermonkey-24-system-icu.patch b/dev-lang/spidermonkey/files/spidermonkey-24-system-icu.patch
new file mode 100644
index 0000000..59ba0c9
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-24-system-icu.patch
@@ -0,0 +1,199 @@
+diff --git a/js/src/Makefile.in b/js/src/Makefile.in
+index 4944d31..4176e14 100644
+--- a/js/src/Makefile.in
++++ b/js/src/Makefile.in
+@@ -237,12 +237,17 @@ endif
+ # ICU headers need to be available whether we build with the complete
+ # Internationalization API or not - ICU stubs rely on them.
+
++ifdef MOZ_NATIVE_ICU
++LOCAL_INCLUDES += $(MOZ_ICU_CFLAGS)
++else
+ LOCAL_INCLUDES += \
+ -I$(topsrcdir)/../../intl/icu/source/common \
+ -I$(topsrcdir)/../../intl/icu/source/i18n \
+ $(NULL)
++endif
+
+ ifdef ENABLE_INTL_API
++ifndef MOZ_NATIVE_ICU
+
+ ifeq ($(OS_ARCH),WINNT)
+ # Parallel gmake is buggy on Windows
+@@ -271,6 +276,7 @@ distclean clean::
+ $(call SUBMAKE,$@,intl/icu)
+
+ endif
++endif
+
+ #
+ # END ECMAScript Internationalization API
+@@ -403,7 +409,11 @@ ifneq (,$(MOZ_ZLIB_LIBS)$(MOZ_GLUE_LDFLAGS))
+ DEFINES += -DUSE_ZLIB
+ endif
+
+-SHARED_LIBRARY_LIBS += $(ICU_LIBS)
++ifdef MOZ_NATIVE_ICU
++EXTRA_DSO_LDOPTS += $(MOZ_ICU_LIBS)
++else
++SHARED_LIBRARY_LIBS += $(MOZ_ICU_LIBS)
++endif
+
+ # Prevent floating point errors caused by VC++ optimizations
+ ifdef _MSC_VER
+diff --git a/js/src/config/Makefile.in b/js/src/config/Makefile.in
+index 5f60d15..e1fe1f8 100644
+--- a/js/src/config/Makefile.in
++++ b/js/src/config/Makefile.in
+@@ -59,6 +59,7 @@ export:: \
+ $(call mkdir_deps,system_wrappers_js) \
+ $(NULL)
+ $(PYTHON) $(srcdir)/Preprocessor.py $(DEFINES) $(ACDEFINES) \
++ -DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \
+ $(srcdir)/system-headers | $(PERL) $(srcdir)/make-system-wrappers.pl system_wrappers_js
+ $(INSTALL) system_wrappers_js $(DIST)
+
+diff --git a/js/src/config/system-headers b/js/src/config/system-headers
+index b52aed6..1ca7420 100644
+--- a/js/src/config/system-headers
++++ b/js/src/config/system-headers
+@@ -1132,3 +1132,14 @@ kvm.h
+ spawn.h
+ err.h
+ xlocale.h
++#if MOZ_NATIVE_ICU==1
++unicode/locid.h
++unicode/numsys.h
++unicode/ucal.h
++unicode/ucol.h
++unicode/udat.h
++unicode/udatpg.h
++unicode/uenum.h
++unicode/unum.h
++unicode/ustring.h
++#endif
+diff --git a/js/src/configure.in b/js/src/configure.in
+index 4bccbe3..d535491 100644
+--- a/js/src/configure.in
++++ b/js/src/configure.in
+@@ -4409,6 +4409,16 @@ fi
+ dnl ========================================================
+ dnl ECMAScript Internationalization API Support (uses ICU)
+ dnl ========================================================
++ICU_LIB_NAMES=
++MOZ_NATIVE_ICU=
++MOZ_ARG_WITH_BOOL(system-icu,
++[ --with-system-icu
++ Use system icu (located with pkgconfig)],
++ MOZ_NATIVE_ICU=1)
++
++if test -n "$MOZ_NATIVE_ICU"; then
++ PKG_CHECK_MODULES(MOZ_ICU, icu-i18n >= 50.1)
++fi
+
+ if test -n "$JS_STANDALONE"; then
+ ENABLE_INTL_API=1
+@@ -4421,37 +4431,34 @@ MOZ_ARG_ENABLE_BOOL(intl-api,
+ dnl Settings for the implementation of the ECMAScript Internationalization API
+ if test -n "$ENABLE_INTL_API"; then
+ AC_DEFINE(ENABLE_INTL_API)
+- # We build ICU as a static library.
+- AC_DEFINE(U_STATIC_IMPLEMENTATION)
+-
+- case "$OS_TARGET" in
+- WINNT)
+- ICU_LIB_NAMES="icuin icuuc icudt"
+- ;;
+- Darwin|Linux)
+- ICU_LIB_NAMES="icui18n icuuc icudata"
+- ;;
+- *)
+- AC_MSG_ERROR([ECMAScript Internationalization API is not yet supported on this platform])
+- esac
+-
+- ICU_LIBS='$(call EXPAND_LIBNAME_PATH,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/lib)'
+-else
+- ICU_LIB_NAMES=
+- ICU_LIBS=
++ if test -z "$MOZ_NATIVE_ICU"; then
++ case "$OS_TARGET" in
++ WINNT)
++ ICU_LIB_NAMES="icuin icuuc icudt"
++ ;;
++ Darwin|Linux|DragonFly|FreeBSD|NetBSD|OpenBSD)
++ ICU_LIB_NAMES="icui18n icuuc icudata"
++ ;;
++ *)
++ AC_MSG_ERROR([ECMAScript Internationalization API is not yet supported on this platform])
++ esac
++ MOZ_ICU_LIBS='$(call EXPAND_LIBNAME_PATH,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/lib)'
++ fi
+ fi
+
+ AC_SUBST(ENABLE_INTL_API)
+ AC_SUBST(ICU_LIB_NAMES)
+-AC_SUBST(ICU_LIBS)
+-
+-dnl Source files that use ICU should have control over which parts of the ICU
+-dnl namespace they want to use.
+-AC_DEFINE(U_USING_ICU_NAMESPACE,0)
+-
++AC_SUBST(MOZ_ICU_LIBS)
++AC_SUBST(MOZ_NATIVE_ICU)
+
+ dnl Settings for ICU
+-if test -n "$ENABLE_INTL_API" ; then
++if test -n "$ENABLE_INTL_API" -a -z "$MOZ_NATIVE_ICU"; then
++ dnl We build ICU as a static library.
++ AC_DEFINE(U_STATIC_IMPLEMENTATION)
++
++ dnl Source files that use ICU should have control over which parts of the ICU
++ dnl namespace they want to use.
++ AC_DEFINE(U_USING_ICU_NAMESPACE,0)
+ # Set ICU compile options
+ ICU_CPPFLAGS=""
+ # don't use icu namespace automatically in client code
+diff --git a/js/src/gdb/Makefile.in b/js/src/gdb/Makefile.in
+index 288934a..a582dfe 100644
+--- a/js/src/gdb/Makefile.in
++++ b/js/src/gdb/Makefile.in
+@@ -19,6 +19,10 @@ LIBS = $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(NSPR_LIBS) $(MOZ_ZLIB_LIB
+
+ LOCAL_INCLUDES += -I$(topsrcdir) -I..
+
++ifdef MOZ_NATIVE_ICU
++EXTRA_LIBS += $(MOZ_ICU_LIBS)
++endif
++
+ EXTRA_LIBS += $(MOZ_FFI_LIBS)
+
+ # Place a GDB Python auto-load file next to the gdb-tests executable, both
+diff --git a/js/src/jsapi-tests/Makefile.in b/js/src/jsapi-tests/Makefile.in
+index 5f7d594..10d7054 100644
+--- a/js/src/jsapi-tests/Makefile.in
++++ b/js/src/jsapi-tests/Makefile.in
+@@ -20,6 +20,10 @@ LIBS = $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(NSPR_LIBS) $(MOZ_ZLI
+
+ LOCAL_INCLUDES += -I$(topsrcdir) -I..
+
++ifdef MOZ_NATIVE_ICU
++EXTRA_LIBS += $(MOZ_ICU_LIBS)
++endif
++
+ EXTRA_LIBS += $(MOZ_FFI_LIBS)
+
+ ifdef QEMU_EXE
+diff --git a/js/src/shell/Makefile.in b/js/src/shell/Makefile.in
+index 2e1df09..db66c69 100644
+--- a/js/src/shell/Makefile.in
++++ b/js/src/shell/Makefile.in
+@@ -27,6 +27,9 @@ LIBS = $(NSPR_LIBS) $(EDITLINE_LIBS) $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_
+ ifdef MOZ_NATIVE_FFI
+ EXTRA_LIBS += $(MOZ_FFI_LIBS)
+ endif
++ifdef MOZ_NATIVE_ICU
++EXTRA_LIBS += $(MOZ_ICU_LIBS)
++endif
+
+ LOCAL_INCLUDES += -I$(topsrcdir) -I..
+
diff --git a/dev-lang/spidermonkey/files/spidermonkey-24.2.0-fix-file-permissions.patch b/dev-lang/spidermonkey/files/spidermonkey-24.2.0-fix-file-permissions.patch
new file mode 100644
index 0000000..a224716
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-24.2.0-fix-file-permissions.patch
@@ -0,0 +1,29 @@
+diff -urN a/js/src/Makefile.in b/js/src/Makefile.in
+--- a/js/src/Makefile.in 2013-11-19 13:42:43.000000000 -0600
++++ b/js/src/Makefile.in 2014-03-08 08:07:28.331006149 -0600
+@@ -542,7 +542,7 @@
+ $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(JS_CONFIG_SUBSTITUTIONS) $< > $@
+
+ install:: $(LIBRARY_NAME).pc
+- $(SYSINSTALL) $^ $(DESTDIR)$(libdir)/pkgconfig
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(libdir)/pkgconfig
+
+ ######################################################
+ # BEGIN SpiderMonkey header installation
+@@ -569,13 +569,13 @@
+ #
+
+ install:: $(EXPORTS)
+- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(LIBRARY_NAME)
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(LIBRARY_NAME)
+
+ install:: $(EXPORTS_js)
+- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(LIBRARY_NAME)/js
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(LIBRARY_NAME)/js
+
+ install:: $(EXPORTS_mozilla)
+- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(LIBRARY_NAME)/mozilla
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(LIBRARY_NAME)/mozilla
+
+ #
+ # END SpiderMonkey header installation
diff --git a/dev-lang/spidermonkey/metadata.xml b/dev-lang/spidermonkey/metadata.xml
index 0163cea..ec0cd3c 100644
--- a/dev-lang/spidermonkey/metadata.xml
+++ b/dev-lang/spidermonkey/metadata.xml
@@ -8,6 +8,7 @@
<use>
<flag name='debug'>Enable assertions to allow for easier debugging of programs that link to spidermonkey -- note this will often crash software on regular end-user systems</flag>
<flag name='threadsafe'>Build a threadsafe version of spidermonkey</flag>
+ <flag name='system-icu'>Use the system-wide <pkg>dev-libs/icu</pkg> instead of bundled -- note, only takes effect when icu flag is enabled</flag>
</use>
</pkgmetadata>
diff --git a/dev-lang/spidermonkey/spidermonkey-1.8.7-r4.ebuild b/dev-lang/spidermonkey/spidermonkey-1.8.7-r4.ebuild
new file mode 100644
index 0000000..e3768b9
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-1.8.7-r4.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="5"
+WANT_AUTOCONF="2.1"
+PYTHON_COMPAT=( python2_{6,7} )
+PYTHON_REQ_USE="threads"
+inherit autotools-multilib autotools eutils toolchain-funcs multilib python-any-r1 versionator pax-utils
+
+MY_PN="js"
+TARBALL_PV="$(replace_all_version_separators '' $(get_version_component_range 1-3))"
+MY_P="${MY_PN}-${PV}"
+TARBALL_P="${MY_PN}${TARBALL_PV}-1.0.0"
+SPIDERPV="${PV}-patches-0.1"
+DESCRIPTION="Stand-alone JavaScript C library"
+HOMEPAGE="http://www.mozilla.org/js/spidermonkey/"
+SRC_URI="http://people.mozilla.com/~dmandelin/${TARBALL_P}.tar.gz
+ http://dev.gentoo.org/~anarchy/mozilla/patchsets/spidermonkey-${SPIDERPV}.tar.xz"
+
+LICENSE="NPL-1.1"
+SLOT="0/mozjs187"
+KEYWORDS="~amd64"
+IUSE="debug jit minimal static-libs test"
+
+S="${WORKDIR}/${MY_P}"
+BUILDDIR="${S}/js/src"
+
+RDEPEND=">=dev-libs/nspr-4.7.0[${MULTILIB_USEDEP}]
+ virtual/libffi[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ app-arch/zip
+ virtual/pkgconfig"
+
+MULTILIB_PARALLEL_PHASES="src_configure src_compile src_test"
+MULTILIB_WRAPPED_EXECUTABLES="@/usr/bin/js-config"
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/js/js-config.h
+ /usr/include/js/NativeX64.h
+)
+
+abi_builddir() {
+ echo "${BUILD_DIR}"/js/src
+}
+
+pkg_setup(){
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ export LC_ALL="C"
+ fi
+}
+
+ehook autotools-multilib-global-pre_src_prepare pre_prepare
+pre_prepare() {
+ # Apply patches that are required for misc archs
+ EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ epatch "${WORKDIR}/spidermonkey"
+
+ epatch "${FILESDIR}"/${PN}-1.8.5-fix-install-symlinks.patch
+ epatch "${FILESDIR}"/${PN}-1.8.7-filter_desc.patch
+ epatch "${FILESDIR}"/${PN}-1.8.7-freebsd-pthreads.patch
+ epatch "${FILESDIR}"/${PN}-1.8.7-x32.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=439260
+ epatch "${FILESDIR}"/${P}-symbol-versions.patch
+
+ epatch_user
+
+ cd "${BUILDDIR}" || die
+ eautoconf
+ return 1
+}
+
+ehook autotools-multilib-global-pre_src_configure pre_configure
+pre_configure() {
+ ECONF_SOURCE="${BUILDDIR}"
+ myeconfargs=(
+ ${myopts}
+ --enable-jemalloc
+ --enable-readline
+ --enable-threadsafe
+ --enable-system-ffi
+ --enable-jemalloc
+ $(use_enable debug)
+ $(use_enable jit tracejit)
+ $(use_enable jit methodjit)
+ $(use_enable static-libs static)
+ $(use_enable test tests)
+ )
+}
+
+ehook autotools-multilib-per-abi-pre_src_configure pre_abi_configure
+pre_abi_configure() {
+ mkdir -p "$(abi_builddir)"
+ cd "$(abi_builddir)" || die
+ if multilib_is_native_abi ; then
+ myeconfargs+=(--with-system-nspr)
+ else
+ myeconfargs+=(
+ --with-nspr-cflags="$(nspr-config-${ABI} --cflags)"
+ --with-nspr-libs="$(nspr-config-${ABI} --libs)"
+ --with-nspr-prefix="$(nspr-config-${ABI} --prefix)"
+ --with-nspr-exec-prefix="$(nspr-config-${ABI} --exec-prefix)"
+ )
+ fi
+ MULTILIB_TC_EXPORT_VARS="CC CXX AR RANLIB LD" multilib_tc_export \
+ econf "${myeconfargs[@]}" "${othereconfargs[@]}"
+ return 1
+}
+
+ehook autotools-multilib-per-abi-pre_src_compile pre_abi_compile
+pre_abi_compile() {
+ cd "$(abi_builddir)" || die
+ if tc-is-cross-compiler; then
+ make CFLAGS="" CXXFLAGS="" \
+ CC=$(tc-getBUILD_CC) CXX=$(tc-getBUILD_CXX) \
+ AR=$(tc-getBUILD_AR) RANLIB=$(tc-getBUILD_RANLIB) \
+ jscpucfg host_jsoplengen host_jskwgen || die
+ make CFLAGS="" CXXFLAGS="" \
+ CC=$(tc-getBUILD_CC) CXX=$(tc-getBUILD_CXX) \
+ AR=$(tc-getBUILD_AR) RANLIB=$(tc-getBUILD_RANLIB) \
+ -C config nsinstall || die
+ mv {,native-}jscpucfg || die
+ mv {,native-}host_jskwgen || die
+ mv {,native-}host_jsoplengen || die
+ mv config/{,native-}nsinstall || die
+ sed -e 's@./jscpucfg@./native-jscpucfg@' \
+ -e 's@./host_jskwgen@./native-host_jskwgen@' \
+ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \
+ -i Makefile || die
+ sed -e 's@/nsinstall@/native-nsinstall@' -i config/config.mk || die
+ rm -f config/host_nsinstall.o \
+ config/host_pathsub.o \
+ host_jskwgen.o \
+ host_jsoplengen.o || die
+ fi
+}
+
+ehook autotools-multilib-per-abi-pre_src_test pre_abi_test
+pre_abi_test() {
+ cd "$(abi_builddir)/jsapi-tests" || die
+}
+
+ehook autotools-multilib-per-abi-pre_src_install pre_abi_install
+pre_abi_install() {
+ cd "$(abi_builddir)" || die
+}
+
+ehook autotools-multilib-native-post_src_install post_native_install
+post_native_install() {
+ cd "$(abi_builddir)" || die
+ if ! use minimal; then
+ dobin shell/js
+ if use jit; then
+ pax-mark m "${ED}/usr/bin/js"
+ fi
+ fi
+}
+
+ehook autotools-multilib-global-post_src_install post_install
+post_install() {
+ cd "${BUILDDIR}"
+ dodoc ../../README
+ dohtml README.html
+ # install header files needed but not part of build system
+ insinto /usr/include/js
+ doins ../public/*.h
+ insinto /usr/include/js/mozilla
+ doins "${S}"/mfbt/*.h
+
+ if ! use static-libs; then
+ # We can't actually disable building of static libraries
+ # They're used by the tests and in a few other places
+ find "${D}" -iname '*.a' -delete || die
+ fi
+}
diff --git a/dev-lang/spidermonkey/spidermonkey-17.0.0-r2.ebuild b/dev-lang/spidermonkey/spidermonkey-17.0.0-r4.ebuild
index 5ac4201..b733177 100644
--- a/dev-lang/spidermonkey/spidermonkey-17.0.0-r2.ebuild
+++ b/dev-lang/spidermonkey/spidermonkey-17.0.0-r4.ebuild
@@ -20,21 +20,23 @@ KEYWORDS="~amd64"
IUSE="debug jit minimal static-libs test"
REQUIRED_USE="debug? ( jit )"
+RESTRICT="ia64? ( test )"
S="${WORKDIR}/${MY_P}"
BUILDDIR="${S}/js/src"
-abi_builddir() {
- echo "${BUILD_DIR}"/js/src
-}
-
RDEPEND=">=dev-libs/nspr-4.9.4[${MULTILIB_USEDEP}]
- virtual/libffi[${MULTILIB_USEDEP}]"
+ virtual/libffi[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.1.4[${MULTILIB_USEDEP}]"
DEPEND="${RDEPEND}
${PYTHON_DEPS}
app-arch/zip
virtual/pkgconfig"
+abi_builddir() {
+ echo "${BUILD_DIR}"/js/src
+}
+
pkg_setup(){
if [[ ${MERGE_TYPE} != "binary" ]]; then
python-any-r1_pkg_setup
@@ -42,8 +44,13 @@ pkg_setup(){
fi
}
-PATCHES=("${FILESDIR}"/${PN}-${SLOT}-js-config-shebang.patch)
+PATCHES=(
+ "${FILESDIR}"/${PN}-${SLOT}-js-config-shebang.patch
+ "${FILESDIR}"/${PN}-${SLOT}-ia64-mmap.patch
+ "${FILESDIR}"/${PN}-17.0.0-fix-file-permissions.patch
+)
MULTILIB_WRAPPED_HEADERS=(/usr/include/js-17.0/js-config.h)
+MULTILIB_WRAPPED_EXECUTABLES=(@/usr/bin/js17-config)
MULTILIB_PARALLEL_PHASES="src_configure src_compile src_test"
ehook autotools-multilib-global-pre_src_prepare pre_prepare
@@ -76,7 +83,7 @@ ehook autotools-multilib-per-abi-pre_src_configure pre_abi_configure
pre_abi_configure() {
mkdir -p "$(abi_builddir)" || die
cd "$(abi_builddir)" || die
- if multilib_is_native_abi ; then
+ if multilib_is_best_abi ; then
myeconfargs+=(--with-system-nspr)
else
myeconfargs+=(
@@ -129,15 +136,6 @@ pre_abi_install() {
cd "$(abi_builddir)" || die
}
-ehook autotools-multilib-per-abi-post_src_install post_abi_install
-post_abi_install() {
- if multilib_is_native_abi ; then
- ln -s js17-config "${ED}"usr/bin/js17-config-${ABI}
- else
- mv "${ED}"usr/bin/js17-config "${ED}"usr/bin/js17-config-${ABI}
- fi
-}
-
ehook autotools-multilib-global-post_src_install post_install
post_install() {
if ! use minimal; then
diff --git a/dev-lang/spidermonkey/spidermonkey-24.2.0-r2.ebuild b/dev-lang/spidermonkey/spidermonkey-24.2.0-r2.ebuild
new file mode 100644
index 0000000..a8e8643
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-24.2.0-r2.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="5"
+WANT_AUTOCONF="2.1"
+PYTHON_COMPAT=( python2_{6,7} )
+PYTHON_REQ_USE="threads"
+inherit autotools eutils toolchain-funcs multilib python-any-r1 versionator pax-utils autotools-multilib
+
+MY_PN="mozjs"
+MY_P="${MY_PN}-${PV/_/.}"
+DESCRIPTION="Stand-alone JavaScript C library"
+HOMEPAGE="http://www.mozilla.org/js/spidermonkey/"
+SRC_URI="https://ftp.mozilla.org/pub/mozilla.org/js/${MY_P}.tar.bz2"
+LICENSE="NPL-1.1"
+SLOT="24"
+KEYWORDS="~amd64"
+IUSE="debug icu jit minimal static-libs +system-icu test"
+
+RESTRICT="ia64? ( test )"
+
+S="${WORKDIR}/${MY_P%.rc*}"
+BUILDDIR="${S}/js/src"
+
+RDEPEND=">=dev-libs/nspr-4.9.4[${MULTILIB_USEDEP}]
+ virtual/libffi[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.1.4[${MULTILIB_USEDEP}]
+ system-icu? ( >=dev-libs/icu-1.51:=[${MULTILIB_USEDEP}] )"
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ app-arch/zip
+ virtual/pkgconfig"
+
+abi_builddir() {
+ echo "${BUILD_DIR}"/js/src
+}
+
+pkg_setup(){
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ python-any-r1_pkg_setup
+ export LC_ALL="C"
+ fi
+}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-${SLOT}-system-icu.patch
+ "${FILESDIR}"/${PN}-24.2.0-fix-file-permissions.patch
+)
+MULTILIB_WRAPPED_HEADERS=(/usr/include/mozjs-24/js-config.h)
+MULTILIB_WRAPPED_EXECUTABLES=(@/usr/bin/js24-config)
+MULTILIB_PARALLEL_PHASES="src_configure src_compile src_test"
+
+ehook autotools-multilib-global-pre_src_prepare pre_prepare
+pre_prepare() {
+ if [[ ${CHOST} == *-freebsd* ]]; then
+ # Don't try to be smart, this does not work in cross-compile anyway
+ ln -sfn "${BUILDDIR}/config/Linux_All.mk" "${S}/config/$(uname -s)$(uname -r).mk" || die
+ fi
+}
+
+ehook autotools-multilib-global-pre_src_configure pre_configure
+pre_configure() {
+ ECONF_SOURCE="${BUILDDIR}"
+
+ if use icu; then # make sure system-icu flag only affects icu-enabled build
+ myeconfargs+=( $(use_with system-icu) )
+ else
+ myeconfargs+=( --without-system-icu )
+ fi
+
+ myeconfargs+=(
+ ${myopts}
+ --enable-jemalloc
+ --enable-readline
+ --enable-threadsafe
+ --enable-system-ffi
+ --enable-jemalloc
+ $(use_enable icu intl-api)
+ $(use_enable debug)
+ $(use_enable jit tracejit)
+ $(use_enable jit methodjit)
+ $(use_enable static-libs static)
+ $(use_enable test tests)
+ )
+}
+
+ehook autotools-multilib-per-abi-pre_src_configure pre_abi_configure
+pre_abi_configure() {
+ mkdir -p "$(abi_builddir)" || die
+ cd "$(abi_builddir)" || die
+ if multilib_is_best_abi ; then
+ myeconfargs+=(--with-system-nspr)
+ else
+ myeconfargs+=(
+ --with-nspr-cflags="$(nspr-config-${ABI} --cflags)"
+ --with-nspr-libs="$(nspr-config-${ABI} --libs)"
+ --with-nspr-prefix="$(nspr-config-${ABI} --prefix)"
+ --with-nspr-exec-prefix="$(nspr-config-${ABI} --exec-prefix)"
+ )
+ fi
+ MULTILIB_TC_EXPORT_VARS="CC CXX AR RANLIB LD" multilib_tc_export \
+ econf "${myeconfargs[@]}" "${othereconfargs[@]}"
+ return 1
+}
+
+ehook autotools-multilib-per-abi-pre_src_compile pre_abi_compile
+pre_abi_compile() {
+ cd "$(abi_builddir)" || die
+ if tc-is-cross-compiler; then
+ make CFLAGS="" CXXFLAGS="" \
+ CC=$(tc-getBUILD_CC) CXX=$(tc-getBUILD_CXX) \
+ AR=$(tc-getBUILD_AR) RANLIB=$(tc-getBUILD_RANLIB) \
+ jscpucfg host_jsoplengen host_jskwgen || die
+ make CFLAGS="" CXXFLAGS="" \
+ CC=$(tc-getBUILD_CC) CXX=$(tc-getBUILD_CXX) \
+ AR=$(tc-getBUILD_AR) RANLIB=$(tc-getBUILD_RANLIB) \
+ -C config nsinstall || die
+ mv {,native-}jscpucfg || die
+ mv {,native-}host_jskwgen || die
+ mv {,native-}host_jsoplengen || die
+ mv config/{,native-}nsinstall || die
+ sed -e 's@./jscpucfg@./native-jscpucfg@' \
+ -e 's@./host_jskwgen@./native-host_jskwgen@' \
+ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \
+ -i Makefile || die
+ sed -e 's@/nsinstall@/native-nsinstall@' -i config/config.mk || die
+ rm -f config/host_nsinstall.o \
+ config/host_pathsub.o \
+ host_jskwgen.o \
+ host_jsoplengen.o || die
+ fi
+}
+
+ehook autotools-multilib-per-abi-pre_src_test pre_abi_test
+pre_abi_test() {
+ cd "$(abi_builddir)/jsapi-tests" || die
+}
+
+ehook autotools-multilib-per-abi-pre_src_install pre_abi_install
+pre_abi_install() {
+ cd "$(abi_builddir)" || die
+}
+
+ehook autotools-multilib-global-post_src_install post_install
+post_install() {
+ if ! use minimal; then
+ if use jit; then
+ pax-mark m "${ED}/usr/bin/js${SLOT}"
+ fi
+ else
+ rm -f "${ED}/usr/bin/js${SLOT}"
+ fi
+
+ if ! use static-libs; then
+ # We can't actually disable building of static libraries
+ # They're used by the tests and in a few other places
+ find "${D}" -iname '*.a' -delete || die
+ fi
+}