summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-10-22 09:31:35 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-10-22 09:31:54 +0000
commitce95a5b57de16d961d1f8be7eb4ef12b440b4e9e (patch)
tree1848347ece0b3d5e4cfcd425ebd17c2aa50b93e6
parent6c3c58aa6f88e50ba3869ab38464df59c1b120ed (diff)
downloadaports-ce95a5b57de16d961d1f8be7eb4ef12b440b4e9e.tar.bz2
aports-ce95a5b57de16d961d1f8be7eb4ef12b440b4e9e.tar.xz
testing/js: new aport
JavaScript interpreter and libraries http://www.mozilla.org/js/
-rw-r--r--testing/js/APKBUILD70
-rw-r--r--testing/js/isfinite.patch11
-rw-r--r--testing/js/js185-destdir.patch15
3 files changed, 96 insertions, 0 deletions
diff --git a/testing/js/APKBUILD b/testing/js/APKBUILD
new file mode 100644
index 000000000..fb986990f
--- /dev/null
+++ b/testing/js/APKBUILD
@@ -0,0 +1,70 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=js
+pkgver=1.8.5
+_ver=${pkgver//./}-1.0.0
+pkgrel=0
+pkgdesc="JavaScript interpreter and libraries"
+url="http://www.mozilla.org/js/"
+arch="all"
+license="GPLv2+ or LGPLv2+ or MPLv1.1"
+depends=""
+depends_dev="nspr-dev"
+makedepends="$depends_dev zip readline-dev ncurses-dev python perl"
+install=""
+subpackages="$pkgname-dev"
+source="http://ftp.mozilla.org/pub/mozilla.org/js/js$_ver.tar.gz
+ js185-destdir.patch
+ isfinite.patch"
+
+_builddir="$srcdir"/js-1.8.5/js/src
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ # create pkg-config file
+ cat > libjs.pc << EOF
+prefix=/usr
+exec_prefix=/usr
+libdir=/usr/lib
+includedir=/usr/include
+
+Name: libjs
+Description: JS library
+Requires: nspr >= 4.7
+Version: $pkgver
+Libs: -L\${libdir} -ljs
+Cflags: -DXP_UNIX=1 -DJS_THREADSAFE=1 -I\${includedir}/js
+EOF
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --with-system-nspr \
+ --enable-threadsafe \
+ --enable-readline \
+ --disable-warnings-as-errors \
+ || return 1
+ make
+}
+
+package() {
+ cd "$_builddir"
+ make install DESTDIR="$pkgdir" || return 1
+ install -Dm 0644 libjs.pc "$pkgdir"/usr/lib/pkgconfig/
+ # compat symlinks
+ ln -s libmozjs185.so.1.0 "$pkgdir"/usr/lib/libmozjs.so.1
+ ln -s libmozjs185.so.1.0 "$pkgdir"/usr/lib/libjs.so.1
+ ln -s libmozjs185.so "$pkgdir"/usr/lib/libmozjs.so
+ ln -s libmozjs185.so "$pkgdir"/usr/lib/libjs.so
+
+}
+
+md5sums="a4574365938222adca0a6bd33329cb32 js185-1.0.0.tar.gz
+ca5cd660341767b60c09701f8dd6bf38 js185-destdir.patch
+8f5db1b780888900c7fa8caec9c37275 isfinite.patch"
diff --git a/testing/js/isfinite.patch b/testing/js/isfinite.patch
new file mode 100644
index 000000000..e0f09f389
--- /dev/null
+++ b/testing/js/isfinite.patch
@@ -0,0 +1,11 @@
+--- ./jsnum.h.orig
++++ ./jsnum.h
+@@ -101,7 +101,7 @@
+ #ifdef WIN32
+ return _finite(d);
+ #else
+- return finite(d);
++ return isfinite(d);
+ #endif
+ }
+
diff --git a/testing/js/js185-destdir.patch b/testing/js/js185-destdir.patch
new file mode 100644
index 000000000..e648e3c41
--- /dev/null
+++ b/testing/js/js185-destdir.patch
@@ -0,0 +1,15 @@
+#https://bugzilla.mozilla.org/show_bug.cgi?id=628723
+
+--- ./Makefile.in.old 2011-04-10 04:21:19.918608008 -0700
++++ ./Makefile.in 2011-04-10 04:21:58.088607992 -0700
+@@ -888,8 +888,8 @@
+ ifeq (,$(HOST_BIN_SUFFIX))
+ mv -f $(SHLIB_ANY_VER) $(SHLIB_EXACT_VER)
+ @[ ! -h $(SHLIB_ABI_VER) ] || rm -f $(SHLIB_ABI_VER)
+- ln -s $(SHLIB_EXACT_VER) $(SHLIB_ABI_VER)
+- ln -s $(SHLIB_ABI_VER) $(SHLIB_ANY_VER)
++ ln -s $(notdir $(SHLIB_EXACT_VER)) $(SHLIB_ABI_VER)
++ ln -s $(notdir $(SHLIB_ABI_VER)) $(SHLIB_ANY_VER)
+ endif
+ endif
+ ifneq (,$(IMPORT_LIBRARY))