From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id YETIBsKuAGCjFAAA0tVLHw (envelope-from ) for ; Thu, 14 Jan 2021 20:51:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id iIexAsKuAGAIMAAAB5/wlQ (envelope-from ) for ; Thu, 14 Jan 2021 20:51:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 16E98940355 for ; Thu, 14 Jan 2021 20:51:13 +0000 (UTC) Received: from localhost ([::1]:50532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l09aJ-0003F1-WD for larch@yhetil.org; Thu, 14 Jan 2021 15:51:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l09aB-0003Da-Bl for guix-patches@gnu.org; Thu, 14 Jan 2021 15:51:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56111) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l09aA-0007Cg-4X for guix-patches@gnu.org; Thu, 14 Jan 2021 15:51:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l09aA-0006PW-3b for guix-patches@gnu.org; Thu, 14 Jan 2021 15:51:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#42885] [PATCH 0/4] gnu: calibre: Update to 4.22.0. Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 14 Jan 2021 20:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42885 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Arun Isaac Received: via spool by 42885-submit@debbugs.gnu.org id=B42885.161065741424580 (code B ref 42885); Thu, 14 Jan 2021 20:51:02 +0000 Received: (at 42885) by debbugs.gnu.org; 14 Jan 2021 20:50:14 +0000 Received: from localhost ([127.0.0.1]:39424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l09ZO-0006OO-B5 for submit@debbugs.gnu.org; Thu, 14 Jan 2021 15:50:14 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l09ZM-0006OG-JH for 42885@debbugs.gnu.org; Thu, 14 Jan 2021 15:50:13 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1610657403; cv=none; d=zohomail.com; s=zohoarc; b=d43IREa89n+G4Bcwo4BjGKVD3PsE9fVMgV3XplvQ8JWxXzQgSTUIKJcHAcE/ReaSPoFstMAdnlaxgokZFZ75l0L8WU0gZFWyE6R+A4bzIBA0odtYS+uMaR/NnxoYMaUXxQwDloAn2xOoOTuTLmGXkxY38bZnT5b8An2q84J/DUc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610657403; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=tCBEQ8omvaeEhqaM/fEIZlb4VLqaYetxRAsFKl+JbXE=; b=N+vYz799GCoNfb5MqW+fnZFLaL+Dlqr7cQigCU0u5sUzPyXveePssRLE0KHLccZMyltjii/kVJ5pixtYsioRwEtTdPUFc31QSoD4qSy0rZrOBRdPaFLHea3k1ySYhlhsnBISeOBVGC0xOT/ZHHo0ASz+Obp0JnjkQk+RUDmpNBs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1610657403; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type; bh=tCBEQ8omvaeEhqaM/fEIZlb4VLqaYetxRAsFKl+JbXE=; b=gnWgBRXQKNvdubB7mh2xE3Wt0NzfZR/7+RP8EIg7awuEuiZ2pnQ977rfLQy+mSo7 Zceq2LrgzTx1lOkVV68uYhzRudrGyhpRwG9RjAF6c5vSqy23BCGJGy/c2k0yBe5MvEU rZy7LT19enFIhFOikua0f3gV+jaTWYdVVLVb4ZH4= Received: from localhost (p54ad4ef9.dip0.t-ipconnect.de [84.173.78.249]) by mx.zohomail.com with SMTPS id 1610657401965676.9803526333802; Thu, 14 Jan 2021 12:50:01 -0800 (PST) References: <87y2lpvrrd.fsf@gnu.org> <87zh65csve.fsf@systemreboot.net> <871rjhfhtt.fsf@elephly.net> <87y2lj1moa.fsf@systemreboot.net> <877dt3ct7u.fsf@elephly.net> <87sgbq20kw.fsf@systemreboot.net> <874knwbtgv.fsf@systemreboot.net> <87a6xove66.fsf@elephly.net> <87y2l3zaa4.fsf@systemreboot.net> <87pn6eid4c.fsf@systemreboot.net> <7d55f6f8-ff58-c548-8bec-8508a71be2cf@brendan.scot> <87ft6zx1rh.fsf@systemreboot.net> <87a6wr29i2.fsf@systemreboot.net> <87blh6q835.fsf@systemreboot.net> <87blh5yg6o.fsf@elephly.net> <87zh4i6on4.fsf@systemreboot.net> <87eeioanm3.fsf_-_@gnu.org> <874kjjsgxr.fsf@systemreboot.net> User-agent: mu4e 1.4.13; emacs 27.1 From: Ricardo Wurmus In-reply-to: <874kjjsgxr.fsf@systemreboot.net> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Thu, 14 Jan 2021 21:49:58 +0100 Message-ID: <87k0sfckg9.fsf@elephly.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-ZohoMailClient: External X-Zoho-Virus-Status: 1 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 42885@debbugs.gnu.org, Brendan Tildesley Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 0.64 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=elephly.net header.s=zoho header.b=gnWgBRXQ; arc=reject (signature check failed: fail, {[1] = sig:zohomail.com:reject}); dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 16E98940355 X-Spam-Score: 0.64 X-Migadu-Scanner: scn1.migadu.com X-TUID: BXocqGq9BMJk --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Arun Isaac writes: > I got a minimal swc (attached in my previous mail) working. This minimal > swc works for compiling typescript to javascript. But, I haven't figured > out how to use it to build web components. We can also try esbuild. > This is blocking packaging > mathjax v3, and thus calibre. I feel that if calibre can go ahead > without mathjax v3, it should. Then, we can close this issue and open a > separate one for web components and mathjax. I=E2=80=99ve been trying to package mathjax v3 for a while, but didn=E2=80= =99t get far enough to present anything yet. Here=E2=80=99s what I have: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=p.patch diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm index 8434836c6f..e6ff5d619d 100644 --- a/gnu/packages/javascript.scm +++ b/gnu/packages/javascript.scm @@ -27,6 +27,7 @@ #:use-module (gnu packages base) #:use-module (gnu packages compression) #:use-module (gnu packages lisp-xyz) + #:use-module (gnu packages node) #:use-module (gnu packages readline) #:use-module (gnu packages web) #:use-module (guix packages) @@ -270,6 +271,95 @@ of wicked-good-xpath together with xmldom.") (license (list license:expat license:lgpl2.0))))) +(define-public js-mathjax-3 + (package + (name "js-mathjax") + (version "3.1.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mathjax/MathJax-src") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0kqcb6pl0zfs4hf8zqb4l50kkfq7isv35vpy05m0lg0yr9w0w4ai")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils) + (ice-9 match)) + (set-path-environment-variable + "PATH" '("bin") (map (match-lambda + ((_ . input) + input)) + %build-inputs)) + (copy-recursively (assoc-ref %build-inputs "source") + "source") + (chdir "source") + + ;; TODO: we can't build this because it depends on + ;; speech-rule-engine. + ;;(delete-file-recursively "ts/a11y") + (delete-file-recursively "components/src/a11y") + + ;;(delete-file-recursively "components/src/sre") + ;; This file copies a11y files, which we don't build (see above). + (delete-file "components/src/node-main/copy.json") + + (substitute* '("components/bin/build" + "components/bin/pack" + "components/bin/copy" + "components/bin/makeAll") + (("/usr/bin/env node") + (which "node"))) + + ;; Make the compiled files of the context menu available. + (mkdir-p "mj-context-menu/js") + (copy-recursively (string-append (assoc-ref %build-inputs "js-context-menu") + "/share/javascript/context-menu") + "mj-context-menu/js") + + (let ((esbuild (string-append (assoc-ref %build-inputs "esbuild") + "/bin/esbuild")) + (node (string-append (assoc-ref %build-inputs "node") + "/bin/node")) + (target (string-append %output "/share/javascript/mathjax"))) + + ;; Transpile TypeScript + (apply invoke esbuild + "--bundle" + "--tsconfig=tsconfig.json" + "--platform=node" + "--outdir=js" + (find-files "ts" "\\.ts$")) + + (setenv "HOME" "/tmp") + (with-directory-excursion "components" + ;; This requires network access + (substitute* "bin/makeAll" + (("processDir\\(fulldir, webpackLib\\);") "")) + (invoke node "bin/makeAll" "src")) + + ;; Build components + (invoke esbuild + "components/src/tex-chtml-full/tex-chtml-full.js" + "--bundle" + "--minify" + "--platform=node" + (string-append "--outfile=" target "/es5/mml-chtml.js")))))) + (native-inputs + `(("esbuild" ,esbuild) + ("node" ,node-10.22) + ("js-context-menu" ,js-context-menu))) + (home-page "https://www.mathjax.org/") + (synopsis "TODO") + (description "TODO") + (license license:asl2.0))) + (define-public js-respond (package (name "js-respond") --=-=-= Content-Type: text/plain -- Ricardo --=-=-=--