diff options
author | David Woodfall <dave@unrealize.co.uk> | 2010-05-12 17:43:34 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-12 17:43:34 +0200 |
commit | 15858a58c6471e5b001c75b96de23064be19c7f3 (patch) | |
tree | 7c0c8aa024236ec90024da6ba2878fde61807f79 | |
parent | ae10280ca1d124c82b4bf4422ad554f884e34beb (diff) | |
download | slackbuilds-15858a58c6471e5b001c75b96de23064be19c7f3.tar.gz |
network/js: Updated for version 1.7.0
-rw-r--r-- | network/js/README | 13 | ||||
-rw-r--r-- | network/js/dynamic-link.patch | 13 | ||||
-rw-r--r-- | network/js/js-1.5-rc6a+elinks.patch | 61 | ||||
-rw-r--r-- | network/js/js.SlackBuild | 57 | ||||
-rw-r--r-- | network/js/js.info | 10 | ||||
-rw-r--r-- | network/js/slack-desc | 30 |
6 files changed, 80 insertions, 104 deletions
diff --git a/network/js/README b/network/js/README index e101b47dab..9842a83b18 100644 --- a/network/js/README +++ b/network/js/README @@ -1,10 +1,9 @@ -js (SpiderMonkey JavaScript-C Engine) +js (SpiderMonkey, Mozilla's JavaScript 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. +SpiderMonkey is the code-name for the Mozilla's C implementation of +JavaScript. It can be used by applications such as elinks and others. -This version includes a patch (from the ELinks) project to compile it easier. +This is the standalone version of the engine used by Firefox and other +Mozilla applications. -After installation, run: ldconfig -v | grep libjs.so -and you should see: libjs.so -> libjs.so +See /usr/doc/spidermonkey-1.7.0/README.html for examples. diff --git a/network/js/dynamic-link.patch b/network/js/dynamic-link.patch new file mode 100644 index 0000000000..5a62c74fbb --- /dev/null +++ b/network/js/dynamic-link.patch @@ -0,0 +1,13 @@ +--- js.orig/src/Makefile.ref 2006-07-26 20:16:47.000000000 +0100 ++++ js/src/Makefile.ref 2009-01-03 19:05:28.000000000 +0000 +@@ -335,8 +335,8 @@ + $(PROGRAM): $(PROG_OBJS) $(LIBRARY) + link.exe -out:"$@" $(EXE_LINK_FLAGS) $^ + else +-$(PROGRAM): $(PROG_OBJS) $(LIBRARY) +- $(CC) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) $(OTHER_LIBS) \ ++$(PROGRAM): $(PROG_OBJS) $(SHARED_LIBRARY) ++ $(CC) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) -L$(OBJDIR) -ljs $(OTHER_LIBS) \ + $(PROG_LIBS) + endif + diff --git a/network/js/js-1.5-rc6a+elinks.patch b/network/js/js-1.5-rc6a+elinks.patch deleted file mode 100644 index fe8c06a555..0000000000 --- a/network/js/js-1.5-rc6a+elinks.patch +++ /dev/null @@ -1,61 +0,0 @@ -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 index 61485c1423..aebc298c0e 100644 --- a/network/js/js.SlackBuild +++ b/network/js/js.SlackBuild @@ -1,15 +1,20 @@ #!/bin/sh -# Slackware build script for js (SpiderMonkey) +# Slackware build script for SpiderMonkey -# Written by Dugan Chen (dugan_c@fastmail.fm) -# Modified by Robby Workman <rworkman@slackbuilds.org> +# Written by David Woodfall dave@unrealize.co.uk +# aka dive irc.freenode.net #slackware & #slackbuilds + +# Feel free to edit this script as you feel fit but +# please acknowledge me somewhere in it and contact +# me if you make any nice improvements. PRGNAM=js -VERSION=1.60 +VERSION=${VERSION:-1.7.0} ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -17,34 +22,54 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" -elif [ "$ARCH" = "i687" ]; then +elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" fi -set -e +set -e # Exit on most errors + +SOURCE=$TMP/$PRGNAM # For convenience rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM +rm -rf $SOURCE tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM +cd $SOURCE chown -R root:root . chmod -R u+w,go+r-w,a-s . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; -patch -p1 < $CWD/js-1.5-rc6a+elinks.patch +# Dynamic linking patch +patch -p1 < $CWD/dynamic-link.patch + +# Set some flags +CFLAGS="$SLKCFLAGS" ; export CFLAGS +CXXFLAGS="$SLKCFLAGS" ; export CXXFLAGS +XLDFLAGS="-s" ; export XLDFLAGS +OPTIMIZER="$SLKCFLAGS" ; export OPTIMIZER 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 +gmake -f Makefile.ref all export BUILD_OPT=1 +mv -v ../../dist $PKG/usr + +unset CFLAGS CXXFLAGS XLDFLAGS OPTIMIZER -mkdir -p $PKG/usr -cp -a dist/* $PKG/usr -strip --strip-unneeded $PKG/usr/bin/js $PKG/usr/lib/libjs.so +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp $TMP/$PRGNAM/README $PKG/usr/doc/$PRGNAM-$VERSION +cp ../README README.html $PKG/usr/doc/$PRGNAM-$VERSION/ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/network/js/js.info b/network/js/js.info index 0fc795f1ed..b20e94c57a 100644 --- a/network/js/js.info +++ b/network/js/js.info @@ -1,8 +1,8 @@ PRGNAM="js" -VERSION="1.60" +VERSION="1.7.0" 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" +DOWNLOAD="http://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz" +MD5SUM="5571134c3863686b623ebe4e6b1f6fe6" +MAINTAINER="David Woodfall" +EMAIL="dave@unrealize.co.uk" APPROVED="rworkman" diff --git a/network/js/slack-desc b/network/js/slack-desc index 2ff3f95aed..b4c9fd547d 100644 --- a/network/js/slack-desc +++ b/network/js/slack-desc @@ -1,19 +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 ':'. +# 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) + |-----handy-ruler-------------------------------------------------------| +js: SpiderMonkey, Mozilla's JavaScript Engine +js: +js: SpiderMonkey is the code-name for the Mozilla's C implementation of +js: JavaScript. It can be used by applications such as elinks and others. +js: +js: This is the standalone version of the engine used by Firefox and other +js: Mozilla applications. +js: +js: Homepage: http://www.mozilla.org/js/spidermonkey +js: 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: |