From patchwork Wed Jun 21 01:28:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jose Ortiz X-Patchwork-Id: 51135 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 C419027BBE9; Wed, 21 Jun 2023 13:50:37 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 633E527BBE2 for ; Wed, 21 Jun 2023 13:50:36 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBxHd-0002IY-EC; Wed, 21 Jun 2023 08:50:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBw0Q-0002Fc-TT for guix-patches@gnu.org; Wed, 21 Jun 2023 07:28:10 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qBw0K-0001MF-FM for guix-patches@gnu.org; Wed, 21 Jun 2023 07:28:09 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qBw0K-0001Td-A8 for guix-patches@gnu.org; Wed, 21 Jun 2023 07:28:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64206] [PATCH] gnu: webview: Tiny cross-platform webview library. Resent-From: Jose Ortiz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Jun 2023 11:28:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64206 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64206@debbugs.gnu.org Cc: Jose Ortiz X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16873468645616 (code B ref -1); Wed, 21 Jun 2023 11:28:04 +0000 Received: (at submit) by debbugs.gnu.org; 21 Jun 2023 11:27:44 +0000 Received: from localhost ([127.0.0.1]:60781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBvzz-0001SM-4L for submit@debbugs.gnu.org; Wed, 21 Jun 2023 07:27:44 -0400 Received: from lists.gnu.org ([209.51.188.17]:40546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBmeQ-0006Sj-4k for submit@debbugs.gnu.org; Tue, 20 Jun 2023 21:28:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBmeP-0000w5-AK for guix-patches@gnu.org; Tue, 20 Jun 2023 21:28:49 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qBmeN-0006fu-Co for guix-patches@gnu.org; Tue, 20 Jun 2023 21:28:49 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1b6824141b4so9415815ad.1 for ; Tue, 20 Jun 2023 18:28:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687310925; x=1689902925; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=pguNfLvO2xozTo8E/Ermg+9Ny47B06rYdTWPzJ/Pxzs=; b=dvEpX8RnZsx3oXwXiWBMVJG7LfyAJnLQjDMtCYiMCC6atHXMX5888K3QWPXnm9xo3+ UwzNcfgnSHzeVDI7TAr2iQfu0FdSGJlQeWmgIAqQVFelxtRk1VB3S9fZK3HJbXtBgbD1 RZ7kJ1HEcp7D647DdW1Y4r3eLH/hjSH7cH1G4jSLogJizzqBpQFv9VwcNdF5d26a6s3W 6A5zI/cSTFGhJkINx0HDZlYNq957RniX+NTw5YCP4i5VF0TC51nY9MCKEII++StsuR3a j8U9IoRHG2mQf/MK3lNfqc+pQY85d7DbDrFkUJNnSKJSOWI6zqA/qGl/sovMXl5Dd2Ap cwkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687310925; x=1689902925; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pguNfLvO2xozTo8E/Ermg+9Ny47B06rYdTWPzJ/Pxzs=; b=aiFsruMgfN073Q85ligCcvFlsqtGefWKF4Wpn5RDv8Bb+6QzMUV3qho2J2paP/2pjk Bbcafw7KMtyFjlqjyOA0HwwfbkYhhEBvsF2nJwZz4PkcWceQ3nUoSiS3TMSb+CoQgUz5 Hjym5Epc3rU/pBKAwbAMDQXgGfek81VuhbpoIAIuwd3QRzMVb8cDmNjLk5TPYNvSqmiK xksbJSG86tE/LD3QoR88ngFxD0ZXEdyzJZ7tkfmUK4lF5iPLNaJLwH/yBVcZlRxd6enW qs5g9hqkoGC08qrTxBi/QgF50SWtw7xX0kDA+79wp7ys5MNFVEzTHDXYICl2BKYnQ2D7 hNXw== X-Gm-Message-State: AC+VfDyjbHRrHmmCHqviGRBa0GdwIl0TOlGj8/wWqE6ETNEVynkqiyGK hf8aOxf1BAp97lrBodalrDIiIsmieA0ioA== X-Google-Smtp-Source: ACHHUZ61jJlDNCZDK+rBXw8JLmwVnewvjFO5Wj4JdgfGCw12shiAugXeyECCxWiehFWoJzj6nOKg1A== X-Received: by 2002:a17:902:e5cc:b0:1b5:1475:2f21 with SMTP id u12-20020a170902e5cc00b001b514752f21mr23463675plf.20.1687310925180; Tue, 20 Jun 2023 18:28:45 -0700 (PDT) Received: from localhost.localdomain ([68.72.208.140]) by smtp.gmail.com with ESMTPSA id n11-20020a170902d2cb00b001ab01598f40sm2192366plc.173.2023.06.20.18.28.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 18:28:44 -0700 (PDT) From: Jose Ortiz Date: Tue, 20 Jun 2023 18:28:39 -0700 Message-Id: X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=kotshie@gmail.com; helo=mail-pl1-x634.google.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 21 Jun 2023 07:27:39 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Wed, 21 Jun 2023 08:49:59 -0400 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/webview.scm (libwebview): Tiny cross-platform webview library for C/C++/Golang. Uses Webkit(Gtk/Cocoa) and Edge(Windows). --- gnu/packages/webview.scm | 81 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 gnu/packages/webview.scm base-commit: d884fc9e2efecfba09af4694f5a13ad7fc6f704f diff --git a/gnu/packages/webview.scm b/gnu/packages/webview.scm new file mode 100644 index 0000000000..ee3977ba6a --- /dev/null +++ b/gnu/packages/webview.scm @@ -0,0 +1,81 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2023 Jose Ortiz +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages webview) + #:use-module (gnu packages) + #:use-module (guix packages) + #:use-module (guix build-system gnu) + #:use-module (guix git-download) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages gtk) + #:use-module (gnu packages webkit) + #:use-module ((guix licenses) #:prefix license:)) + + +(define-public webview + (package + (name "webview") + (version "899018a") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/webview/webview") + (commit "899018ad0e5cc22a18cd734393ccae4d55e3b2b4"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "008bk2l6spsixsyk0dssnhnwdhmhwbm3qypk1rrz02rza28dzigb")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f + #:phases (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (use-modules (ice-9 popen) + (ice-9 rdelim)) + (define (webview-flags) + (let* ((port (open-input-pipe (string-append + "pkg-config --cflags --libs " + "gtk+-3.0 webkit2gtk-4.0"))) + (results (string-split (read-line port) #\space))) + results)) + (apply invoke + `("g++" "webview.cc" + "-fPIC" + "-shared" + "-DWEBVIEW_GTK" + "-std=c++11" + ,@(webview-flags) + "-o" + "libwebview.so")))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((output (assoc-ref outputs "out")) + (lib (string-append output "/lib")) + (include (string-append output "/include"))) + (install-file "libwebview.so" lib) + (mkdir-p include) + (install-file "webview.h" include))))))) + (native-inputs (list pkg-config)) + (inputs (list gtk+ webkitgtk-with-libsoup2)) + (home-page "https://github.com/webview/webview") + (synopsis "Tiny cross-platform webview library") + (description "Tiny cross-platform webview library for C/C++/Golang. +Uses WebKit (Gtk/Cocoa) and Edge (Windows).") + (license license:expat)))