summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Zack2021-06-22 17:27:12 +1000
committerSimon Zack2021-06-22 17:37:00 +1000
commit1253f0b960c306ba9b5a05ffd704d7220cc65168 (patch)
treee0c9a86d35d4aafc475bdca221400bf4504e19a5
parentc63cbd2f14b5db139be49708e23a1497fa631668 (diff)
downloadaur-1253f0b960c306ba9b5a05ffd704d7220cc65168.tar.gz
use `patchelf` to add the required library `unwind` instead, as this is a lot simpler than including own patched copy of `binding.gyp`
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD16
-rw-r--r--binding.gyp65
3 files changed, 8 insertions, 78 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b22a7658ce85..be1fd4b5e255 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,19 @@
pkgbase = ijavascript
pkgdesc = IJavascript is a JavaScript kernel for the Jupyter notebook
pkgver = 5.2.0
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/n-riesco/ijavascript
arch = any
license = BSD-3-Clause
makedepends = npm
+ makedepends = patchelf
depends = nodejs
depends = jupyter
optdepends = jupyterlab: JupyterLab support
optdepends = jupyter-notebook: Jupyter Notebook support
source = https://registry.npmjs.org/ijavascript/-/ijavascript-5.2.0.tgz
source = kernel.json
- source = binding.gyp
sha256sums = f2b2799f3af99ec33e8f4386087462744b55270fa127dda7bc3b6649a2a591c0
sha256sums = 8b81b89b41548b732733bc65bf3919a346ad9c037bb668ce94369971fb96e4c8
- sha256sums = a33173c96cfbd957e5010746cdd6814c7fa839e366490559276866bb6b3f97cf
pkgname = ijavascript
diff --git a/PKGBUILD b/PKGBUILD
index ae0e459f7fd0..66fd36c7a933 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
# Contributor: Andreas Gerlach <andigerlach76@gmail.com>
pkgname=ijavascript
pkgver=5.2.0
-pkgrel=2
+pkgrel=3
pkgdesc="IJavascript is a JavaScript kernel for the Jupyter notebook"
arch=(any)
url="https://github.com/n-riesco/ijavascript"
@@ -10,23 +10,19 @@ license=('BSD-3-Clause')
depends=('nodejs' 'jupyter')
optdepends=('jupyterlab: JupyterLab support'
'jupyter-notebook: Jupyter Notebook support')
-makedepends=('npm')
+makedepends=('npm' 'patchelf')
source=(https://registry.npmjs.org/${pkgname}/-/${pkgname}-${pkgver}.tgz
- kernel.json
- binding.gyp)
+ kernel.json)
sha256sums=('f2b2799f3af99ec33e8f4386087462744b55270fa127dda7bc3b6649a2a591c0'
- '8b81b89b41548b732733bc65bf3919a346ad9c037bb668ce94369971fb96e4c8'
- 'a33173c96cfbd957e5010746cdd6814c7fa839e366490559276866bb6b3f97cf')
+ '8b81b89b41548b732733bc65bf3919a346ad9c037bb668ce94369971fb96e4c8')
_npmdir="/usr/lib/node_modules/ijavascript"
package() {
npm install -g --omit=dev --prefix="${pkgdir}/usr" --cache="${srcdir}/npm-cache" "${pkgname}-${pkgver}.tgz"
- # Build *ZeroMQ* with our custom `binding.gyp`, as the official one doesn't link the required library `unwind`
- cp "${srcdir}/binding.gyp" "${pkgdir}/usr/lib/node_modules/ijavascript/node_modules/zeromq/"
- cd "${pkgdir}${_npmdir}/node_modules/zeromq"
- npm run build:libzmq
+ # Add the required library `unwind` to *ZeroMQ*, as `binding.gyp` doesn't link it
+ patchelf --add-needed libunwind.so "${pkgdir}${_npmdir}/node_modules/zeromq/build/Release/zmq.node"
# Can't run `ijsinstall --install=global` as we have permission errors. Do things manually.
mkdir -p "${srcdir}/kernel/javascript"
diff --git a/binding.gyp b/binding.gyp
deleted file mode 100644
index 13116f16c302..000000000000
--- a/binding.gyp
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- 'variables': {
- 'zmq_external%': 'false',
- },
- 'targets': [
- {
- 'target_name': 'libzmq',
- 'type': 'none',
- 'actions': [{
- 'action_name': 'prepare-build',
- 'inputs': [],
- 'conditions': [
- ['OS=="win"', {
- 'outputs': ['windows/lib/libzmq.lib'],
- }, {
- 'outputs': ['zmq/BUILD_SUCCESS'],
- }],
- ],
- 'action': ['node', '<(PRODUCT_DIR)/../../scripts/prepare.js'],
- }],
- },
- {
- 'target_name': 'zmq',
- 'dependencies': ['libzmq'],
- 'sources': ['binding.cc'],
- 'include_dirs' : ["<!(node -e \"require('nan')\")"],
- 'cflags!': ['-fno-exceptions'],
- 'cflags_cc!': ['-fno-exceptions'],
- 'link_settings': { 'libraries': ['-lunwind'] },
- 'conditions': [
- ["zmq_external == 'true'", {
- 'link_settings': {
- 'libraries': ['-lzmq'],
- },
- }, {
- 'conditions': [
- ['OS=="win"', {
- 'defines': ['ZMQ_STATIC'],
- 'include_dirs': ['windows/include'],
- 'libraries': [
- '<(PRODUCT_DIR)/../../windows/lib/libzmq',
- 'ws2_32.lib',
- 'iphlpapi',
- ],
- }],
- ['OS=="mac" or OS=="solaris"', {
- 'xcode_settings': {
- 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
- 'MACOSX_DEPLOYMENT_TARGET': '10.15',
- },
- 'libraries': ['<(PRODUCT_DIR)/../../zmq/lib/libzmq.a'],
- 'include_dirs': ['<(PRODUCT_DIR)/../../zmq/include'],
- }],
- ['OS=="openbsd" or OS=="freebsd"', {
- }],
- ['OS=="linux"', {
- 'libraries': ['<(PRODUCT_DIR)/../../zmq/lib/libzmq.a'],
- 'include_dirs': ['<(PRODUCT_DIR)/../../zmq/include'],
- }],
- ],
- }],
- ],
- }
- ]
-}