From patchwork Fri Mar 17 07:40:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Trofimov X-Patchwork-Id: 48063 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 9FE0D16EA0; Fri, 17 Mar 2023 07:41:28 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,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 2409A16E93 for ; Fri, 17 Mar 2023 07:41:25 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pd4i2-00046Q-Ey; Fri, 17 Mar 2023 03:41:06 -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 1pd4i0-00046I-FR for guix-patches@gnu.org; Fri, 17 Mar 2023 03:41:04 -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 1pd4i0-0002PP-5i for guix-patches@gnu.org; Fri, 17 Mar 2023 03:41:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pd4hy-0006Ok-Gj; Fri, 17 Mar 2023 03:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62228] [PATCH v1] gnu: Add sgt-puzzles. References: <20230316211925.5145-1-sarg@sarg.org.ru> In-Reply-To: <20230316211925.5145-1-sarg@sarg.org.ru> Resent-From: Sergey Trofimov Original-Sender: "Debbugs-submit" Resent-CC: mirai@makinata.eu, iyzsong@envs.net, liliana.prikler@gmail.com, guix-patches@gnu.org Resent-Date: Fri, 17 Mar 2023 07:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62228 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62228@debbugs.gnu.org Cc: Sergey Trofimov , mirai@makinata.eu, iyzsong@envs.net, liliana.prikler@gmail.com X-Debbugs-Original-Xcc: mirai@makinata.eu, iyzsong@envs.net, liliana.prikler@gmail.com Received: via spool by 62228-submit@debbugs.gnu.org id=B62228.167903882424539 (code B ref 62228); Fri, 17 Mar 2023 07:41:02 +0000 Received: (at 62228) by debbugs.gnu.org; 17 Mar 2023 07:40:24 +0000 Received: from localhost ([127.0.0.1]:43505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pd4hI-0006Na-Kb for submit@debbugs.gnu.org; Fri, 17 Mar 2023 03:40:24 -0400 Received: from mail-ed1-f50.google.com ([209.85.208.50]:37630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pd4hC-0006NE-Bp for 62228@debbugs.gnu.org; Fri, 17 Mar 2023 03:40:19 -0400 Received: by mail-ed1-f50.google.com with SMTP id z21so16986923edb.4 for <62228@debbugs.gnu.org>; Fri, 17 Mar 2023 00:40:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1679038808; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=mBgDqzdQOe0sv7V+DqmJKXl725SsKqgL4kRVYvsO9Ng=; b=jYWTCRSgvTdYkRemwJRHq68nn9+oX2HxY9MGhk8utGx3y3diUFGTlCuKqpoooQ9fSz QaziEq7HoWhS9yPXctJL6A8sX18Q2onIiswIpEJ8rVk8Ge++9l5ExX4Vecyz6+9Yn1dB uvbJ+K9CojRexb9+3buYTHGmYEJ7b+kwpvHzc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679038808; 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=mBgDqzdQOe0sv7V+DqmJKXl725SsKqgL4kRVYvsO9Ng=; b=IkCuoLcnaw9sfFPkf7v3gVYX/hIq6Y2Kpwncufq7lGhlGJUP6Jy9GtIKwcMtvI3eYs 5LEq8CfJFjJjnX+NWcRm9h8XrEKowasSsNngIo5Qpj8yCG1ugk0qFtXYzDGydj1ry1Gr qKGZzgVTysJ2isoTKHClLPTU0g0cCRfvzvFnu0uZUAmHyORxUxuPiNORMLZ7Fk/nXbBZ svYkHpx2XrLaqi2nHiM9uaEsVhVNLWBG3H3od1KUEfVe9tPqq8jbZ1UjW/eln8JuQ1Jm loyAyW32ksmlXqYC0CoPLYDDaRo+mcQSLlUQBComF+iZs6CW89s5DM+JJjZ9RLVHijJR abRQ== X-Gm-Message-State: AO0yUKWzhNFkMF9KoVOeQzVO5cK8eSBfH+CbXbJ3K7NKSgUcrw3G1WDg kSXXZwCfuWYGb99UddubfAI2jUk52/ZLayXW0rI= X-Google-Smtp-Source: AK7set8mDA+a4N9Eahg1rsbdv2FC0Sj3CFzSys3Lx6d3RvCo9NgQnjLcYJYrerOgwBuwv4mmR4dtRA== X-Received: by 2002:a17:906:6a28:b0:930:ba36:2211 with SMTP id qw40-20020a1709066a2800b00930ba362211mr6154691ejc.0.1679038808068; Fri, 17 Mar 2023 00:40:08 -0700 (PDT) Received: from localhost ([95.168.147.255]) by smtp.gmail.com with ESMTPSA id gq20-20020a170906e25400b008dffda52d71sm630669ejb.124.2023.03.17.00.40.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Mar 2023 00:40:07 -0700 (PDT) From: Sergey Trofimov Date: Fri, 17 Mar 2023 08:40:18 +0100 Message-Id: <20230317074018.3525-1-sarg@sarg.org.ru> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/games.scm (sgt-puzzles): New variable. * gnu/packages/patches/sgt-puzzles-install-two-icon-sizes.patch: New file. * gnu/local.mk: Add it. --- gnu/local.mk | 1 + gnu/packages/games.scm | 73 +++++++++++++++++++ .../sgt-puzzles-install-two-icon-sizes.patch | 35 +++++++++ 3 files changed, 109 insertions(+) create mode 100644 gnu/packages/patches/sgt-puzzles-install-two-icon-sizes.patch diff --git a/gnu/local.mk b/gnu/local.mk index e96dceb4d5..7da0446e22 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1843,6 +1843,7 @@ dist_patch_DATA = \ %D%/packages/patches/scons-test-environment.patch \ %D%/packages/patches/screen-hurd-path-max.patch \ %D%/packages/patches/scsh-nonstring-search-path.patch \ + %D%/packages/patches/sgt-puzzles-install-two-icon-sizes.patch \ %D%/packages/patches/sdl-libx11-1.6.patch \ %D%/packages/patches/seed-webkit.patch \ %D%/packages/patches/sendgmail-accept-ignored-gsuite-flag.patch \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 31523777bd..9ab9bc1db0 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -873,6 +873,79 @@ (define-public bsd-games ;; phantasia (all but phantasia/pathnames.h.in, which is bsd-3) (license:fsf-free "file:///phantasia/COPYRIGHT"))))) +(define-public sgt-puzzles + (package + (name "sgt-puzzles") + (version "20230313.adf2a09") + (source (origin + (method url-fetch) + (uri (string-append + "https://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles-" + version ".tar.gz")) + (sha256 + (base32 + "0205wrshf2y27fzaqxv4gfpgmnlj4klwjcadwjrzjx7fkkzlr51j")) + (patches (search-patches + "sgt-puzzles-install-two-icon-sizes.patch")))) + (build-system cmake-build-system) + (inputs (list gtk+ xdg-utils)) + (native-inputs (list pkg-config perl imagemagick halibut)) + (arguments + (list #:tests? #f ;No tests. + #:configure-flags #~(list "-DNAME_PREFIX=sgt-") + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'set-xdg-open-path + (lambda _ + (substitute* "gtk.c" + (("(#define HELP_BROWSER_PATH ).+" all define) + (string-append define "\"" + #$(this-package-input + "xdg-utils") + "/bin/xdg-open\"\n")))))))) + (home-page "https://www.chiark.greenend.org.uk/~sgtatham/puzzles/") + (synopsis "Simon Tatham's portable puzzle collection") + (description + "Simon Tatham's Portable Puzzle Collection contains a number of +popular puzzle games for one player. It currently consists of these games: +@itemize +@item Black Box, ball-finding puzzle +@item Bridges, bridge-placing puzzle +@item Cube, rolling cube puzzle +@item Dominosa, domino tiling puzzle +@item Fifteen, sliding block puzzle +@item Filling, polyomino puzzle +@item Flip, tile inversion puzzle +@item Galaxies, symmetric polyomino puzzle +@item Guess, combination-guessing puzzle +@item Inertia, gem-collecting puzzle +@item Keen, arithmetic Latin square puzzle +@item Light Up, light-bulb placing puzzle +@item Loopy, loop-drawing puzzle +@item Magnets, magnet-placing puzzle +@item Map, map-colouring puzzle +@item Mines, mine-finding puzzle +@item Net, network jigsaw puzzle +@item Netslide, toroidal sliding network puzzle +@item Pattern +@item Pearl, loop-drawing puzzle +@item Pegs, peg solitaire puzzle +@item Range, visible-distance puzzle +@item Rectangles +@item Same Game, block-clearing puzzle +@item Signpost, square-connecting puzzle +@item Singles, number-removing puzzle +@item Sixteen, toroidal sliding block puzzle +@item Slant, maze-drawing puzzle +@item Solo, number placement puzzle +@item Tents, tent-placing puzzle +@item Towers, tower-placing Latin square puzzle +@item Twiddle, rotational sliding block puzzle +@item Undead, monster-placing puzzle +@item Unequal, Latin square puzzle +@item Unruly, black and white grid puzzle +@item Untangle, planar graph layout puzzle +@end itemize") + (license license:expat))) (define-public bzflag (package diff --git a/gnu/packages/patches/sgt-puzzles-install-two-icon-sizes.patch b/gnu/packages/patches/sgt-puzzles-install-two-icon-sizes.patch new file mode 100644 index 0000000000..3bacd2120c --- /dev/null +++ b/gnu/packages/patches/sgt-puzzles-install-two-icon-sizes.patch @@ -0,0 +1,35 @@ +From: Ben Hutchings +Date: Sun, 22 Jan 2023 22:58:43 +0100 +Subject: Install both 48x48 and 96x96 icons +Bug-Debian: https://bugs.debian.org/887982 + +gnome-shell prefers to use 96x96 icons, so install them as well as the +48x48 icons. Install them in size-specific directories instead of +using suffixes to the filename, and change the desktop files +accordingly. + +--- +--- a/cmake/platforms/unix.cmake ++++ b/cmake/platforms/unix.cmake +@@ -107,7 +107,9 @@ function(set_platform_puzzle_target_prop + endif() + configure_file(${CMAKE_SOURCE_DIR}/puzzle.desktop.in ${binary_name}.desktop) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/icons/${NAME}-48d24.png +- DESTINATION share/pixmaps OPTIONAL RENAME ${binary_name}-48d24.png) ++ DESTINATION share/icons/hicolor/48x48/apps OPTIONAL RENAME ${binary_name}.png) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/icons/${NAME}-96d24.png ++ DESTINATION share/icons/hicolor/96x96/apps OPTIONAL RENAME ${binary_name}.png) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${binary_name}.desktop + DESTINATION share/applications) + endif() +--- a/puzzle.desktop.in ++++ b/puzzle.desktop.in +@@ -4,7 +4,7 @@ Type=Application + Name=${displayname} + Comment=${description} + Exec=${binary_name} +-Icon=${binary_name}-48d24 ++Icon=${binary_name} + StartupNotify=false + Categories=Game;LogicGame; + Terminal=false