From patchwork Mon Mar 1 03:23:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghav Gururajan X-Patchwork-Id: 27365 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 DCD7D27BC4E; Mon, 1 Mar 2021 03:24:14 +0000 (GMT) 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, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham 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 B903527BC4D for ; Mon, 1 Mar 2021 03:24:13 +0000 (GMT) Received: from localhost ([::1]:50586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lGZAK-00074z-SC for patchwork@mira.cbaines.net; Sun, 28 Feb 2021 22:24:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGZAA-00074i-Vl for guix-patches@gnu.org; Sun, 28 Feb 2021 22:24:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:36129) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lGZAA-0003Et-OX for guix-patches@gnu.org; Sun, 28 Feb 2021 22:24:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lGZAA-00039U-J3 for guix-patches@gnu.org; Sun, 28 Feb 2021 22:24:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46788] v2 Resent-From: Raghav Gururajan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 01 Mar 2021 03:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46788 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 46788@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 46788-submit@debbugs.gnu.org id=B46788.161456901212075 (code B ref 46788); Mon, 01 Mar 2021 03:24:02 +0000 Received: (at 46788) by debbugs.gnu.org; 1 Mar 2021 03:23:32 +0000 Received: from localhost ([127.0.0.1]:47675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGZ9g-00038h-2G for submit@debbugs.gnu.org; Sun, 28 Feb 2021 22:23:32 -0500 Received: from out1.migadu.com ([91.121.223.63]:46726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGZ9c-00038W-P4 for 46788@debbugs.gnu.org; Sun, 28 Feb 2021 22:23:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raghavgururajan.name; s=key1; t=1614569006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=b/QhgAc2GOZ/uaLCFEBYdLV3AigD8HWnChDyIP99bvA=; b=cE5GOKFDhvV1jA/URQXfWISZiyQ5QfMwR61WqwJIvhn0uxY6uKTsGhQNT1l/tv/TWBx3XI VFiLgID/v/6fDf1W7FrA+Zh3q/hEQdVLsLrsHJYGUF4b4DoQdExySMU5YFMCq5+IazAJqW VYxzRMzNGGa6yU6E0MhCa3k6Nc9PquH6ekELc4IPk9NvbuEy2Vz8chV4GN1LP0Kp8+uxPp DGgGsFxDo78iWXjQLNdrJX1669Di0BGNbapAIIUL2qpBIbIBDF49xSrbPZC9WP5qIJa9zT Wp4clPmsq3volz+bD6VVNnJfiEc5xxiXHEF7AfUXJmWYOU8b4sCL9T8JO9D9EA== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. References: <1914b75f-156e-7256-85d2-649f5017b0fc@raghavgururajan.name> Message-ID: Date: Sun, 28 Feb 2021 22:23:24 -0500 MIME-Version: 1.0 In-Reply-To: <1914b75f-156e-7256-85d2-649f5017b0fc@raghavgururajan.name> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: rg@raghavgururajan.name 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" Reply-to: Raghav Gururajan X-ACL-Warn: , Raghav Gururajan via Guix-patches X-Patchwork-Original-From: Raghav Gururajan via Guix-patches via From: Raghav Gururajan X-getmail-retrieved-from-mailbox: Patches OOPS! Attached wrong file before. Here is the correct one. From 372becc078d1578ba8177319f9f3b671ec476b6d Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Thu, 25 Feb 2021 19:45:04 -0500 Subject: [PATCH 2/5] gnu: Add qhttp. * gnu/packages/web.scm (qhttp): New variable. --- gnu/packages/web.scm | 78 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index e4ba0d5bf9..3e9fdbb7f6 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -77,6 +77,7 @@ #:use-module (guix build-system ant) #:use-module (guix build-system cargo) #:use-module (guix build-system cmake) + #:use-module (guix build-system copy) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system gnu) #:use-module (guix build-system go) @@ -170,6 +171,83 @@ #:use-module (gnu packages xml) #:use-module ((srfi srfi-1) #:select (delete-duplicates))) +(define-public qhttp + (package + (name "qhttp") + (version "3.1") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/azadkuh/qhttp.git") + (commit + (string-append "version-" version)))) + (file-name + (git-file-name name version)) + (sha256 + (base32 "0cx23g4y4k4v9p5ph6h7gfhp8sfy1gcdv1g6bl44hppar1y0zfdq")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; No target + #:imported-modules + ((guix build copy-build-system) + ,@%gnu-build-system-modules) + #:modules + (((guix build copy-build-system) + #:prefix copy:) + (guix build gnu-build-system) + (guix build utils)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-source + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "commondir.pri" + (("\\$\\$PRJDIR/xbin") + (string-append (assoc-ref outputs "out") "/lib")) + (("-L") + "-lhttp_parser -L") + (("\\$\\$PRJDIR/3rdparty") + "")) + (substitute* "src/src.pro" + (("SOURCES \\+= \\$\\$PRJDIR/3rdparty/http-parser/http_parser.c") + "") + (("HEADERS \\+= \\$\\$PRJDIR/3rdparty/http-parser/http_parser.h") + "")) + (substitute* '("src/private/qhttpbase.hpp" "src/qhttpabstracts.cpp") + (("http-parser/http_parser.h") + "http_parser.h")) + #t)) + (replace 'configure + (lambda _ + (invoke "qmake") + #t)) + (replace 'install + (lambda args + (apply (assoc-ref copy:%standard-phases 'install) + #:install-plan + '(("src" "include" + #:include-regexp ("\\.hpp$"))) + args))) + (add-after 'install 'remove-examples + (lambda* (#:key outputs #:allow-other-keys) + (with-directory-excursion + (string-append (assoc-ref outputs "out") "/lib") + (for-each delete-file + (list + "basic-server" + "helloworld" + "postcollector"))) + #t))))) + (inputs + `(("http-parser" ,http-parser) + ("qtbase" ,qtbase))) + (synopsis "Qt-based HTTP Library") + (description "Qhttp is a light-weight and asynchronous HTTP library +(both server & client) in Qt5 and c++14.") + (home-page "https://github.com/azadkuh/qhttp/") + (license license:expat))) + (define-public httpd (package (name "httpd") -- 2.30.1