summaryrefslogtreecommitdiff
path: root/community/spidermonkey
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/spidermonkey
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/spidermonkey')
-rw-r--r--community/spidermonkey/PKGBUILD36
-rw-r--r--community/spidermonkey/spidermonkey-1.7-threadsafe.patch16
-rw-r--r--community/spidermonkey/spidermonkey-Makefile.patch22
3 files changed, 74 insertions, 0 deletions
diff --git a/community/spidermonkey/PKGBUILD b/community/spidermonkey/PKGBUILD
new file mode 100644
index 000000000..5b0f66f55
--- /dev/null
+++ b/community/spidermonkey/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 76943 2010-04-09 06:43:22Z dgriffiths $
+# Contributor: Aaron Griffin <aaron@archlinux.org>
+# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
+
+pkgname=spidermonkey
+pkgver=1.7.0
+pkgrel=3
+pkgdesc="Mozilla's C implementation of JavaScript."
+url="http://www.mozilla.org/js/spidermonkey/"
+arch=('i686' 'x86_64')
+license=('MPL' 'GPL' 'LGPL')
+depends=('nspr')
+options=('!makeflags')
+source=("http://ftp.mozilla.org/pub/mozilla.org/js/js-${pkgver}.tar.gz" \
+ 'spidermonkey-1.7-threadsafe.patch' 'spidermonkey-Makefile.patch')
+md5sums=('5571134c3863686b623ebe4e6b1f6fe6'
+ 'b2ef9be017b6aa1857354b5223975a4f'
+ '161d4c0f2c604d15cba29dab60b1f7a7')
+
+build() {
+ cd ${srcdir}/js/src
+ patch -p0 < ${srcdir}/spidermonkey-Makefile.patch || return 1
+ sed -i 's|include|include/js|' rules.mk || return 1
+ # fix for the lib location
+ [ "$CARCH" = 'x86_64' ] && (sed -i -e 's|lib64|lib|g' config.mk || return 1)
+ # patch Makefile for threadsafe support with native nspr
+ patch -p2 -i ${srcdir}/spidermonkey-1.7-threadsafe.patch || return 1
+ # FS#16673
+ export CFLAGS=${CFLAGS} -DJS_C_STRINGS_ARE_UTF8
+ # build - threadsafe
+}
+
+package() {
+ cd ${srcdir}/js/src
+ make -f Makefile.ref BUILD_OPT=1 JS_THREADSAFE=1 DIST=${pkgdir}/usr all export || return 1
+}
diff --git a/community/spidermonkey/spidermonkey-1.7-threadsafe.patch b/community/spidermonkey/spidermonkey-1.7-threadsafe.patch
new file mode 100644
index 000000000..da6c78d1d
--- /dev/null
+++ b/community/spidermonkey/spidermonkey-1.7-threadsafe.patch
@@ -0,0 +1,16 @@
+--- js/src/Makefile.ref.orig 2008-05-28 19:51:32.000000000 -0400
++++ js/src/Makefile.ref 2008-05-28 19:52:17.000000000 -0400
+@@ -63,11 +63,11 @@
+
+ ifdef JS_THREADSAFE
+ DEFINES += -DJS_THREADSAFE
+-INCLUDES += -I$(DIST)/include/nspr
++INCLUDES += -I/usr/include/nspr
+ ifdef USE_MSVC
+ OTHER_LIBS += $(DIST)/lib/libnspr$(NSPR_LIBSUFFIX).lib
+ else
+-OTHER_LIBS += -L$(DIST)/lib -lnspr$(NSPR_LIBSUFFIX)
++OTHER_LIBS += -L/usr/$(LIBDIR)/nspr -lnspr${NSPR_LIBSUFFIX}
+ endif
+ endif
+
diff --git a/community/spidermonkey/spidermonkey-Makefile.patch b/community/spidermonkey/spidermonkey-Makefile.patch
new file mode 100644
index 000000000..abf1f3164
--- /dev/null
+++ b/community/spidermonkey/spidermonkey-Makefile.patch
@@ -0,0 +1,22 @@
+*** Makefile.ref.orig 2009-02-16 09:56:29.000000000 -0600
+--- Makefile.ref 2009-02-16 09:58:59.000000000 -0600
+***************
+*** 169,184 ****
+--- 169,185 ----
+ jstypes.h \
+ jsprvtd.h \
+ jspubtd.h \
+ jsregexp.h \
+ jsscan.h \
+ jsscope.h \
+ jsscript.h \
+ jsstr.h \
++ jsutil.h \
+ jsxdrapi.h \
+ jsxml.h \
+ $(NULL)
+
+ API_HFILES = \
+ jsapi.h \
+ jsdbgapi.h \
+ $(NULL)