From patchwork Sun Sep 29 14:24:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kyle Andrews X-Patchwork-Id: 15514 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 9477617454; Sun, 29 Sep 2019 15:25:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 36A4117451 for ; Sun, 29 Sep 2019 15:25:14 +0100 (BST) Received: from localhost ([::1]:39622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEa8P-0000M3-5z for patchwork@mira.cbaines.net; Sun, 29 Sep 2019 10:25:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35633) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEa8G-0000Lw-95 for guix-patches@gnu.org; Sun, 29 Sep 2019 10:25:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iEa8E-0001w6-PW for guix-patches@gnu.org; Sun, 29 Sep 2019 10:25:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46578) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iEa8E-0001vs-Lu for guix-patches@gnu.org; Sun, 29 Sep 2019 10:25:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iEa8E-0006ey-FG for guix-patches@gnu.org; Sun, 29 Sep 2019 10:25:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#37465] add xftwidth displayed textwidth calculator package Resent-From: Kyle Andrews Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 29 Sep 2019 14:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37465 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: 37465@debbugs.gnu.org Received: via spool by 37465-submit@debbugs.gnu.org id=B37465.156976708325568 (code B ref 37465); Sun, 29 Sep 2019 14:25:02 +0000 Received: (at 37465) by debbugs.gnu.org; 29 Sep 2019 14:24:43 +0000 Received: from localhost ([127.0.0.1]:55399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEa7u-0006eJ-UX for submit@debbugs.gnu.org; Sun, 29 Sep 2019 10:24:43 -0400 Received: from mail-qt1-f175.google.com ([209.85.160.175]:39401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEa7t-0006e8-V5 for 37465@debbugs.gnu.org; Sun, 29 Sep 2019 10:24:42 -0400 Received: by mail-qt1-f175.google.com with SMTP id n7so13506609qtb.6 for <37465@debbugs.gnu.org>; Sun, 29 Sep 2019 07:24:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version; bh=H8vmudLHhPWR9Wbr7LVTEaamkiAnnkCdTrrkNPPT8Xg=; b=Z0sdqicGHDou5VNRMSXZYRWfOwJ6Y0CmFfMGYiqsk8kUY1omqNA4yRcbPIoEjQrmxq i7F/h1R0XqCI+G2MDbNPkS+G0KEt6/9RMBzgVis4jxlZXx8cKeI4VyjDVT9XimnG115+ mvg9HIa7g3k4Ijx+FMpe8tV6S3e6LtsKvuC4ggKDxqH7XdybdDNvHWQZu+7Lj7qNLWtR 3ntXrhMbF13X2qnhPLXZkR7uKrAyQQIUhXCD7S5KJSWn4g4oZS7PKi2YFdFwzhYW0vod g52neAuvzGQHJ9mzMSxKP067ho1EqaCOXVxN0HWp3Yac9W1UMiETOVBel1fzgj46HIxe PsNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version; bh=H8vmudLHhPWR9Wbr7LVTEaamkiAnnkCdTrrkNPPT8Xg=; b=GKxKCNZwCF/daRQLHYCl5NWJrzqVDmzbDHYuKVZVoAsPVNBtgiiu3ShQy8IzclM1S1 yzomCHzbsJ8BbQZgalcOPS2UfA6xfd55uccG8hVgyt/uN1VVZ2Fm0Dw64H6+4pdrKuXV JDMfXf61Fy/vb1f+hD0y8s8YXtOA14ytm2DBFGfSRFRN1gjZy52IXFsS/LlgTj/TiH7B tq9X6QB/NTKA9vGq2XEpKEhK0dYd/3xL377koZ1ssF3xmWDTQN1SrTe667nekXAn56W3 OWoWzx+bh3Nge6zHzzB1BbS/exljwgMvoOpkGoOKE5x6Vub4LY2w4NdKUbry7C+rKL4u 82tg== X-Gm-Message-State: APjAAAUNR6XhcOZs6H3JhBK3sUf0Xmz2xlxXUtbUN2yG95E9gMc030jj Rr77IxF2e1ZUG42GX2m5bhtzAbSoKko= X-Google-Smtp-Source: APXvYqx0bni6x/HIE6mSIH1Yl2o6N5ReBQqpmZAiZPcfTm8FX1cNVvfTE3kI8m+/cdXkO0AtZf2Y1A== X-Received: by 2002:ac8:2d09:: with SMTP id n9mr20208381qta.10.1569767076259; Sun, 29 Sep 2019 07:24:36 -0700 (PDT) Received: from [192.168.2.52] (71-82-69-114.dhcp.bycy.mi.charter.com. [71.82.69.114]) by smtp.googlemail.com with ESMTPSA id u43sm6746417qte.19.2019.09.29.07.24.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Sep 2019 07:24:34 -0700 (PDT) Message-ID: From: Kyle Andrews Date: Sun, 29 Sep 2019 10:24:32 -0400 In-Reply-To: <87wodwlcwf.fsf@gnu.org> References: <4e2e655c245cfc810b0faaf4c63b8fd99b384269.camel@gmail.com> <87wodwlcwf.fsf@gnu.org> X-Mailer: Evolution 3.28.1 Mime-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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 Hi Ludo, On Wed, 2019-09-25 at 15:32 +0200, Ludovic Courtès wrote: > Hello Kyle, > > Kyle Andrews skribis: > > > From 60deaa526b4a6ca5a66f3b67ba77aa353409d542 Mon Sep 17 00:00:00 > > 2001 > > From: Kyle Andrews > > Date: Thu, 19 Sep 2019 20:16:28 -0400 > > Subject: [PATCH] gnu: Add xftwidth. > > > > * gnu/packages/wm.scm: added xftwidth package. > > I think this should rather go to xdisorg.scm, WDYT? That makes sense to me. I have added fontutils as an additional module dependency in xdisorg.scm to satisfy the inputs. > > + (build-system gnu-build-system) > > + (inputs `(("freetype" ,freetype) > > + ("libx11" ,libx11) > > + ("fontconfig" ,fontconfig) > > + ("libxft" ,libxft))) > > Nitpicking: we don’t usually align input tuples like that. :-) > Okay. I've removed the alignment. However, note that the dzen package in xdisorg.scm uses this same aligned format for it's inputs. > > + (synopsis "Calculator for determining displayed text widths > > using Xft fonts.") > > + (description "A small C program to calculate pixel widths for > > displayed > > +text using Xft fonts (given a specific font name and size). It is > > ideal for > > +scripts including text into the custom (e.g. dzen and xmobar > > based) panels > > +often used in conjunction with minimalistic window managers.") > > Could you address the warnings reported by ‘guix lint’ here? Also, > make > sure to write full sentences in the description: > > https://guix.gnu.org/manual/en/html_node/Synopses-and-Descriptions. > html > The rest LGTM! Could you send an updated patch? > > Thanks, > Ludo’. I've fixed the notes I saw from guix lint: 1. https -> http for github urls 2. Removed period from synopsis 3. Rewrote the description using full sentences Please see the attached patch. Regards, Kyle From 1c23edb9bdd7a7678636c97ad256995dc31c22d2 Mon Sep 17 00:00:00 2001 From: Kyle Andrews Date: Sun, 29 Sep 2019 10:06:49 -0400 Subject: [PATCH] gnu: Add xftwidth. * gnu/packages/xdisorg.scm: added xftwidth package. --- gnu/packages/xdisorg.scm | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index 0b40ca6909..79e0f617fd 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -26,6 +26,7 @@ ;;; Copyright © 2018, 2019 Pierre Neidhardt ;;; Copyright © 2018 Nam Nguyen ;;; Copyright © 2019 Wiktor Żelazny +;;; Copyright © 2019 Kyle Andrews ;;; ;;; This file is part of GNU Guix. ;;; @@ -83,6 +84,7 @@ #:use-module (gnu packages xml) #:use-module (gnu packages gtk) #:use-module (gnu packages xorg) + #:use-module (gnu packages fontutils) #:use-module (gnu packages bison) #:use-module (ice-9 match)) @@ -1322,6 +1324,46 @@ program for X11. It was designed to be fast, tiny and scriptable in any languag (home-page "https://github.com/robm/dzen") (license license:expat)))) +(define-public xftwidth + (package + (name "xftwidth") + (version "20170402") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "http://github.com/vixus0/xftwidth") + (commit "35ff963908d41a8a6a7101c434c88255728025ee"))) + (sha256 + (base32 + "1jwl25785li24kbp0m1wxfwk4dgxkliynn03nsj813cjr34kq16h")) + (file-name (string-append name "-" version "-checkout")))) + (build-system gnu-build-system) + (inputs `(("freetype" ,freetype) + ("libx11" ,libx11) + ("fontconfig" ,fontconfig) + ("libxft" ,libxft))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-makefile ; /usr/bin doesn't show up in PATH + (lambda _ (substitute* "Makefile" (("usr/") "")) #t)) + (delete 'check) ; no check included in Makefile + (delete 'configure)) + #:make-flags + (let ((out (assoc-ref %outputs "out"))) + (list (string-append "DESTDIR=" out))))) + (synopsis "Calculator for determining pixel widths of displayed text using Xft fonts") + (description "xftwidth is a small C program for calculating the pixel +widths of displayed text using Xft fonts. It is especially useful in scripts +for displaying text in graphical panels, menus, popups, and notification +windows generated using dzen. These scripts are often used in conjunction with +minimalistic tiling window managers such as herbstluftwm and bspwm.") + (home-page "http://github.com/vixus0/xftwidth") + (license license:expat))) + (define-public xcb-util-xrm (package (name "xcb-util-xrm") -- 2.23.0