summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Korotkiy2017-11-14 01:57:18 +0300
committerNikolay Korotkiy2017-11-14 01:57:18 +0300
commit8bac5b21f74673c36f0258db6bf88d6675aeb367 (patch)
treed7159292a50692c76a7c9c17c48a1c25da45dc62
parentf33f585deab57e132f81935d3cd3f85f803b3e08 (diff)
downloadaur-8bac5b21f74673c36f0258db6bf88d6675aeb367.tar.gz
Fix build
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD60
-rw-r--r--patch_js_src_configure.diff12
3 files changed, 55 insertions, 34 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fd1f80ebbb64..06f03ddb1309 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,17 @@
pkgbase = spidermonkey
- pkgdesc = Mozilla's JavaScript engine.
+ pkgdesc = Mozilla's JavaScript engine
pkgver = 45.0.2
- pkgrel = 1
- url = http://www.mozilla.org/js/spidermonkey/
+ pkgrel = 2
+ url = http://developer.mozilla.org/en/SpiderMonkey
arch = i686
arch = x86_64
- license = MPL
- makedepends = gcc
- source = spidermonkey-45.0.2.tar.bz2::https://people.mozilla.org/~sfink/mozjs-45.0.2.tar.bz2
- md5sums = 2ca34f998d8b5ea79d8616dd26b5fbab
+ license = MPL2
+ provides = spidermonkey=45.0.2
+ conflicts = spidermonkey-git
+ source = https://ftp.mozilla.org/pub/spidermonkey/releases/45.0.2/mozjs-45.0.2.tar.bz2
+ source = patch_js_src_configure.diff
+ sha256sums = 570530b1e551bf4a459d7cae875f33f99d5ef0c29ccc7742a1b6f588e5eadbee
+ sha256sums = 4a3688e7232a9fef0d5c48edc7b28c918e878415af49572008eefc9aa709cdd7
pkgname = spidermonkey
diff --git a/PKGBUILD b/PKGBUILD
index e8aa21df9b6a..4e3426cc7b75 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,40 +1,46 @@
# Contributor: Cyker Way <cykerway at gmail dot com>
# Maintainer: Cyker Way <cykerway at gmail dot com>
-
+# Maintainer: Nikolay Korotkiy <sikmir at gmail dot com>
pkgname=spidermonkey
pkgver=45.0.2
-pkgrel=1
-#epoch=
-pkgdesc="Mozilla's JavaScript engine."
+pkgrel=2
+pkgdesc="Mozilla's JavaScript engine"
arch=('i686' 'x86_64')
-url="http://www.mozilla.org/js/spidermonkey/"
-license=('MPL')
-#groups=()
-#depends=()
-makedepends=('gcc')
-#checkdepends=()
-#optdepends=()
-#provides=()
-#conflicts=()
-#replaces=()
-#backup=()
-#options=()
-#install=
-#changelog=
-#noextract=()
-#validpgpkeys=()
-source=("$pkgname-$pkgver.tar.bz2::https://people.mozilla.org/~sfink/mozjs-45.0.2.tar.bz2")
-md5sums=('2ca34f998d8b5ea79d8616dd26b5fbab')
+url="http://developer.mozilla.org/en/SpiderMonkey"
+license=('MPL2')
+provides=("${pkgname}=${pkgver}")
+conflicts=(${pkgname}-git)
+source=("https://ftp.mozilla.org/pub/$pkgname/releases/$pkgver/mozjs-$pkgver.tar.bz2"
+ "patch_js_src_configure.diff")
+sha256sums=('570530b1e551bf4a459d7cae875f33f99d5ef0c29ccc7742a1b6f588e5eadbee'
+ '4a3688e7232a9fef0d5c48edc7b28c918e878415af49572008eefc9aa709cdd7')
+
+prepare() {
+ cd mozjs-$pkgver
+ patch -Np1 < ../patch_js_src_configure.diff
+}
build() {
- cd mozjs-45.0.2/js/src
- CPPFLAGS="$CPPFLAGS -O2"
- ./configure --prefix=/usr
+ cd mozjs-$pkgver/js/src
+ mkdir build_OPT.OBJ
+ cd build_OPT.OBJ
+ CPPFLAGS="-mno-avx -O2" \
+ ../configure \
+ --with-system-nspr \
+ --with-system-icu \
+ --enable-release \
+ --disable-tests \
+ --prefix=/usr
make
}
package() {
- cd mozjs-45.0.2/js/src
+ cd mozjs-$pkgver/js/src/build_OPT.OBJ
make DESTDIR="$pkgdir/" install
+ # Resolve symlinks so they don't point to $srcdir
+ for l in $(find "$pkgdir/usr/include/" -type l); do
+ cp --remove-destination $(readlink $l) $l
+ done
+ chmod -x $pkgdir/usr/include/mozjs-45/js-config.h
+ rename .ajs .a $pkgdir/usr/lib/libjs_static.ajs
}
-
diff --git a/patch_js_src_configure.diff b/patch_js_src_configure.diff
new file mode 100644
index 000000000000..48baaa362f7f
--- /dev/null
+++ b/patch_js_src_configure.diff
@@ -0,0 +1,12 @@
+diff -Naur mozjs-45.0.2-orig/js/src/configure mozjs-45.0.2/js/src/configure
+--- mozjs-45.0.2-orig/js/src/configure 2017-11-13 22:49:15.192084078 +0300
++++ mozjs-45.0.2/js/src/configure 2017-11-13 22:50:13.352676505 +0300
+@@ -15906,7 +15906,7 @@
+ fi
+ fi
+
+- version=`sed -n 's/^[:space:]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"`
++ version=`sed -n 's/^[[:space:]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "/usr/include/unicode/uvernum.h"`
+ if test x"$version" = x; then
+ { echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&2; echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&5; exit 1; }
+ fi