From patchwork Sat Apr 2 10:15:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danny Milosavljevic X-Patchwork-Id: 38288 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 31C7E27BBEA; Sat, 2 Apr 2022 11:19:16 +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.9 required=5.0 tests=BAYES_00,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 88F0827BBE9 for ; Sat, 2 Apr 2022 11:19:15 +0100 (BST) Received: from localhost ([::1]:39770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naaqg-00043K-L1 for patchwork@mira.cbaines.net; Sat, 02 Apr 2022 06:19:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naaqU-00040l-Eh for guix-patches@gnu.org; Sat, 02 Apr 2022 06:19:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50787) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naaqU-0006sz-53 for guix-patches@gnu.org; Sat, 02 Apr 2022 06:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1naaqT-0003pD-Pp for guix-patches@gnu.org; Sat, 02 Apr 2022 06:19:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54680] [PATCH] gnu: xterm: Make big cursors work. Resent-From: dannym@scratchpost.org Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Apr 2022 10:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54680 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54680@debbugs.gnu.org Cc: Danny Milosavljevic X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164889468914625 (code B ref -1); Sat, 02 Apr 2022 10:19:01 +0000 Received: (at submit) by debbugs.gnu.org; 2 Apr 2022 10:18:09 +0000 Received: from localhost ([127.0.0.1]:44680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naapc-0003no-Th for submit@debbugs.gnu.org; Sat, 02 Apr 2022 06:18:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:55106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naapb-0003ng-1Z for submit@debbugs.gnu.org; Sat, 02 Apr 2022 06:18:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naapa-0003Zf-S4 for guix-patches@gnu.org; Sat, 02 Apr 2022 06:18:06 -0400 Received: from dd30410.kasserver.com ([85.13.145.193]:59436) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naapR-0006Wk-MS for guix-patches@gnu.org; Sat, 02 Apr 2022 06:18:03 -0400 Received: from dayas.lan (84-115-234-55.cable.dynamic.surfer.at [84.115.234.55]) by dd30410.kasserver.com (Postfix) with ESMTPSA id 3A6B3112065D; Sat, 2 Apr 2022 12:17:53 +0200 (CEST) From: dannym@scratchpost.org Date: Sat, 2 Apr 2022 12:15:48 +0200 Message-Id: <20220402101548.6760-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Received-SPF: none client-ip=85.13.145.193; envelope-from=dannym@scratchpost.org; helo=dd30410.kasserver.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 From: Danny Milosavljevic * gnu/packages/patches/xterm-370-explicit-xcursor.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/xorg.scm (xterm)[source]: Add it. [arguments]<#:configure-flags>: Add "-lXcursor". --- gnu/local.mk | 1 + .../patches/xterm-370-explicit-xcursor.patch | 37 +++++++++++++++++++ gnu/packages/xorg.scm | 7 +++- 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/xterm-370-explicit-xcursor.patch diff --git a/gnu/local.mk b/gnu/local.mk index ac8992885e..3896f13074 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1975,6 +1975,7 @@ dist_patch_DATA = \ %D%/packages/patches/xsane-fix-snprintf-buffer-length.patch \ %D%/packages/patches/xsane-support-ipv6.patch \ %D%/packages/patches/xsane-tighten-default-umask.patch \ + %D%/packages/patches/xterm-370-explicit-xcursor.patch \ %D%/packages/patches/xygrib-fix-finding-data.patch \ %D%/packages/patches/yggdrasil-extra-config.patch \ %D%/packages/patches/ytfzf-programs.patch \ diff --git a/gnu/packages/patches/xterm-370-explicit-xcursor.patch b/gnu/packages/patches/xterm-370-explicit-xcursor.patch new file mode 100644 index 0000000000..2500ccf0c8 --- /dev/null +++ b/gnu/packages/patches/xterm-370-explicit-xcursor.patch @@ -0,0 +1,37 @@ +From: Danny Milosavljevic +Date: Thu, 2 Apr 2022 12:10:00 +0200 +Subject: Make xterm use libxcursor directly + +Fixes . + +This patch makes xterm use libxcursor directly. +Without it, libx11 would try to dlopen("libXcursor.so.1") and fail. + +--- xterm-370/misc.c.orig 2022-04-02 11:52:26.225131854 +0200 ++++ xterm-370/misc.c 2022-04-02 12:06:13.091482385 +0200 +@@ -79,6 +79,9 @@ + #ifdef HAVE_LIBXPM + #include + #endif ++#ifdef HAVE_LIB_XCURSOR ++#include ++#endif + + #ifdef HAVE_LANGINFO_CODESET + #include +@@ -866,7 +869,14 @@ + * 0, 2 a shape, 3 a mask for 2, etc. + * contains defined names for each shape. + */ +- c = XCreateGlyphCursor(dpy, ++ c = XcursorTryShapeCursor(dpy, ++ myFont.fs->fid, /* source_font */ ++ myFont.fs->fid, /* mask_font */ ++ c_index + 0, /* source_char */ ++ c_index + 1, /* mask_char */ ++ &foreground, ++ &background); ++ if (c == None) c = XCreateGlyphCursor(dpy, + myFont.fs->fid, /* source_font */ + myFont.fs->fid, /* mask_font */ + c_index + 0, /* source_char */ diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index 14cd3bc789..75a7bbd01c 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -6144,12 +6144,15 @@ (define-public xterm (string-append "ftp://ftp.invisible-island.net/xterm/" "xterm-" version ".tgz"))) (sha256 - (base32 "10lc72spa69n9d7zg9nwhgwz70qzidp5i17jgw3lq3qg1a25sg4n")))) + (base32 "10lc72spa69n9d7zg9nwhgwz70qzidp5i17jgw3lq3qg1a25sg4n")) + (patches + (search-patches "xterm-370-explicit-xcursor.patch")))) (build-system gnu-build-system) (arguments '(#:configure-flags '("--enable-wide-chars" "--enable-load-vt-fonts" "--enable-i18n" "--enable-doublechars" - "--enable-luit" "--enable-mini-luit") + "--enable-luit" "--enable-mini-luit" + "X_EXTRA_LIBS=-lXcursor") #:tests? #f ; no test suite #:phases (modify-phases %standard-phases