From patchwork Thu May 6 10:35:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: luhui X-Patchwork-Id: 29148 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9BD1127BC82; Thu, 6 May 2021 11:37:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 210D827BC81 for ; Thu, 6 May 2021 11:37:10 +0100 (BST) Received: from localhost ([::1]:39738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lebNV-00056u-5Z for patchwork@mira.cbaines.net; Thu, 06 May 2021 06:37:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lebNO-000562-N5 for guix-patches@gnu.org; Thu, 06 May 2021 06:37:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53996) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lebNO-0007YV-G4 for guix-patches@gnu.org; Thu, 06 May 2021 06:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lebNO-0000LI-DE for guix-patches@gnu.org; Thu, 06 May 2021 06:37:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48253] [PATCH] gnu: Add edbrowse Resent-From: luhui Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 06 May 2021 10:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48253 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48253@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16202973751297 (code B ref -1); Thu, 06 May 2021 10:37:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 May 2021 10:36:15 +0000 Received: from localhost ([127.0.0.1]:37309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lebMZ-0000Kr-Cd for submit@debbugs.gnu.org; Thu, 06 May 2021 06:36:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:40794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lebMX-0000Kl-9a for submit@debbugs.gnu.org; Thu, 06 May 2021 06:36:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lebMW-0004oN-CC for guix-patches@gnu.org; Thu, 06 May 2021 06:36:09 -0400 Received: from m12-12.163.com ([220.181.12.12]:49764) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lebMN-0006kC-JK for guix-patches@gnu.org; Thu, 06 May 2021 06:36:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Date:From:Subject:Message-ID:MIME-Version; bh=jv4C1 1P8uFe8RhE32++YPBPSQAPcM8PUkoq44MExO9Y=; b=SFrPaClVqSruBwrxa4ijo SMO5E4Wh/7qz69F7+YeusChrpErc/eztMhHZ/yaSsgLmX8FHSHR6RZyiGo/lLf+g BSeKFkydnBzC9CcFXEZPseIn4suSPnbmWyEEfEoIw+mV5M7KMq0z4bawkZqxOspp f7fHaRQTo++rfG/firzfng= Received: from localhost (unknown [110.183.3.128]) by smtp8 (Coremail) with SMTP id DMCowADHjVKBxpNgd5JGCg--.10671S3; Thu, 06 May 2021 18:35:45 +0800 (CST) Date: Thu, 6 May 2021 18:35:49 +0800 From: luhui Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-CM-TRANSID: DMCowADHjVKBxpNgd5JGCg--.10671S3 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxUk75rDUUUU X-Originating-IP: [110.183.3.128] X-CM-SenderInfo: 5oxk3xlqv6il2tof0z/1tbiWwGKDFSIp8IpNgAAs6 Received-SPF: pass client-ip=220.181.12.12; envelope-from=luhuins@163.com; helo=m12-12.163.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches New Package: From d71b99abca69c8a151723dbd960aafa5fe05ae0d Mon Sep 17 00:00:00 2001 From: luhui Date: Thu, 6 May 2021 18:31:58 +0800 Subject: [PATCH] gnu: Add edbrowse * gnu/packages/ed.scm (edbrowse): New variable. --- gnu/packages/ed.scm | 74 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/gnu/packages/ed.scm b/gnu/packages/ed.scm index da4c3ddf04..746cba13d0 100644 --- a/gnu/packages/ed.scm +++ b/gnu/packages/ed.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2012 Nikita Karetnikov ;;; Copyright © 2013, 2014 Ludovic Courtès ;;; Copyright © 2016, 2019 Efraim Flashner +;;; Copyright © 2021 lu hui ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,8 +23,16 @@ #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix build-system gnu) - #:use-module (gnu packages compression)) + #:use-module (gnu packages compression) + #:use-module (gnu packages curl) + #:use-module (gnu packages javascript) + #:use-module (gnu packages readline) + #:use-module (gnu packages pcre) + #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages web)) (define-public ed (package @@ -56,3 +65,66 @@ interactively and via shell scripts. Its method of command input allows complex tasks to be performed in an automated way. GNU ed offers several extensions over the standard utility.") (license gpl3+))) + +(define-public edbrowse + (let ((commit "09508a0f3d9b87f8aa8dec612671527c81a6122d") + (revision "0")) + (package + (name "edbrowse") + (version "3.8.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/CMB/edbrowse") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "15a12la56z3m552m9c5wqfwws59cqgx87sn8vq6bkfr621076z35")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (list (string-append "CC=" ,(cc-for-target)) + (string-append "PREFIX=" (assoc-ref %outputs "out"))) + #:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'patch-replace-harcode-path + (lambda* (#:key inputs #:allow-other-keys) + (let* ((perl + (string-append + (assoc-ref inputs "perl") "/bin/perl"))) + (substitute* "tools/buildebrcstring.pl" + (("/usr/bin/perl") perl))) + #t)) + (add-before 'build 'fix-quickjs-libdir + (lambda* (#:key inputs #:allow-other-keys) + (let* ((libdir-quickjs + (string-append + (assoc-ref inputs "quickjs") "/lib/quickjs"))) + (substitute* "src/makefile" + (("-L/usr/local/lib/quickjs") + (string-append + "-L" libdir-quickjs))) + #t))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (mkdir-p (string-append out "/bin/")) + (install-file "src/edbrowse" + (string-append out "/bin/")))))))) + (inputs + `(("readline" ,readline) + ("pcre" ,pcre) + ("curl" ,curl) + ("tidy-html" ,tidy-html) + ("quickjs" ,quickjs))) + (native-inputs + `(("perl" ,perl) + ("pkg-config" ,pkg-config))) + (home-page "https://github.com/CMB/edbrowse") + (synopsis "Line oriented editor browser") + (description "Ed-like web browser with javascript support") + (license gpl3+))))