diff options
-rw-r--r-- | network/js/README | 10 | ||||
-rw-r--r-- | network/js/js-1.5-rc6a+elinks.patch | 61 | ||||
-rw-r--r-- | network/js/js.SlackBuild | 54 | ||||
-rw-r--r-- | network/js/js.info | 8 | ||||
-rw-r--r-- | network/js/slack-desc | 19 |
5 files changed, 152 insertions, 0 deletions
diff --git a/network/js/README b/network/js/README new file mode 100644 index 0000000000..e101b47dab --- /dev/null +++ b/network/js/README @@ -0,0 +1,10 @@ +js (SpiderMonkey JavaScript-C Engine) + +The SpiderMonkey engine is Mozilla's C implementation of JavaScript. It is +intended to be embedded into other programs. In particular, it's used by ELinks +for JavaScript support. + +This version includes a patch (from the ELinks) project to compile it easier. + +After installation, run: ldconfig -v | grep libjs.so +and you should see: libjs.so -> libjs.so diff --git a/network/js/js-1.5-rc6a+elinks.patch b/network/js/js-1.5-rc6a+elinks.patch new file mode 100644 index 0000000000..fe8c06a555 --- /dev/null +++ b/network/js/js-1.5-rc6a+elinks.patch @@ -0,0 +1,61 @@ +This quick'n'dirty patch enables relatively painless SpiderMonkey installation. +See doc/ecmascript.txt for details. + +diff -ru js-1.5-rc6a/src/config.mk js-1.5-rc6a+elinks/src/config.mk +--- js-1.5-rc6a/src/config.mk Sat Nov 15 01:10:55 2003 ++++ js-1.5-rc6a+elinks/src/config.mk Wed Sep 22 16:32:12 2004 +@@ -37,10 +37,15 @@ + # + # ***** END LICENSE BLOCK ***** + ++BUILD_OPT=1 ++ifndef PREFIX ++PREFIX = /opt/spidermonkey ++endif ++ + ifdef JS_DIST + DIST = $(JS_DIST) + else +-DIST = $(DEPTH)/../../dist/$(OBJDIR) ++DIST = dist/ + endif + + # Set os+release dependent make variables +diff -ru js-1.5-rc6a/src/jsconfig.mk js-1.5-rc6a+elinks/src/jsconfig.mk +--- js-1.5-rc6a/src/jsconfig.mk Sat Nov 15 01:10:56 2003 ++++ js-1.5-rc6a+elinks/src/jsconfig.mk Wed Sep 22 16:34:28 2004 +@@ -104,8 +104,8 @@ + echo $(NSPR_VERSION) > $(NSPR_VERSIONFILE) + endif + +-SHIP_DIST = $(MOZ_DEPTH)/dist/$(OBJDIR) +-SHIP_DIR = $(SHIP_DIST)/SHIP ++SHIP_DIST = $(DIST) ++SHIP_DIR = $(PREFIX) + + SHIP_LIBS = libjs.$(SO_SUFFIX) libjs.a + ifdef JS_LIVECONNECT +@@ -117,7 +117,7 @@ + SHIP_LIBS += jsj.dll jsj.lib + endif + endif +-SHIP_LIBS += $(LCJAR) ++#SHIP_LIBS += $(LCJAR) + SHIP_LIBS := $(addprefix $(SHIP_DIST)/lib/, $(SHIP_LIBS)) + + SHIP_INCS = js*.h prmjtime.h resource.h *.msg *.tbl +@@ -144,6 +144,14 @@ + JSREFJAR = jsref_dbg.jar + endif + endif ++ ++install: ++ mkdir -p $(SHIP_DIR)/$(LIBDIR) ++ mkdir -p $(SHIP_DIR)/include ++ mkdir -p $(SHIP_DIR)/bin ++ cp $(SHIP_LIBS) $(SHIP_DIR)/$(LIBDIR) ++ cp $(SHIP_INCS) $(SHIP_DIR)/include ++ cp $(SHIP_BINS) $(SHIP_DIR)/bin + + ship: + mkdir -p $(SHIP_DIR)/$(LIBDIR) diff --git a/network/js/js.SlackBuild b/network/js/js.SlackBuild new file mode 100644 index 0000000000..61485c1423 --- /dev/null +++ b/network/js/js.SlackBuild @@ -0,0 +1,54 @@ +#!/bin/sh + +# Slackware build script for js (SpiderMonkey) + +# Written by Dugan Chen (dugan_c@fastmail.fm) +# Modified by Robby Workman <rworkman@slackbuilds.org> + +PRGNAM=js +VERSION=1.60 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i687" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +patch -p1 < $CWD/js-1.5-rc6a+elinks.patch + +cd src +sed -i 's#^PREFIX = /opt/spidermonkey#PREFIX = /usr#' config.mk +CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" make -f Makefile.ref +CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" make -f Makefile.ref export + +mkdir -p $PKG/usr +cp -a dist/* $PKG/usr +strip --strip-unneeded $PKG/usr/bin/js $PKG/usr/lib/libjs.so + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp $TMP/$PRGNAM/README $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz diff --git a/network/js/js.info b/network/js/js.info new file mode 100644 index 0000000000..0fc795f1ed --- /dev/null +++ b/network/js/js.info @@ -0,0 +1,8 @@ +PRGNAM="js" +VERSION="1.60" +HOMEPAGE="http://www.mozilla.org/js/spidermonkey/" +DOWNLOAD="ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.60.tar.gz" +MD5SUM="bd8f021e43a8fbbec55ac2cd3d483243" +MAINTAINER="Dugan Chen" +EMAIL="dugan_c@fastmail.fm" +APPROVED="rworkman" diff --git a/network/js/slack-desc b/network/js/slack-desc new file mode 100644 index 0000000000..2ff3f95aed --- /dev/null +++ b/network/js/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' on +# the right side marks the last column you can put a character in. You must make +# exactly 11 lines for the formatting to be correct. It's also customary to +# leave one space after the ':'. + + |-----handy-ruler--------------------------------------------------------| +js: js (SpiderMonkey JavaScript-C Engine) +js: +js: The SpiderMonkey engine is Mozilla's C implementation of JavaScript. +js: It is intended to be embedded into other programs. In particular, +js: it's used by ELinks for JavaScript support. +js: +js: Homepage: http://www.mozilla.org/js/spidermonkey/ +js: +js: +js: +js: |