From patchwork Sun Dec 31 09:15:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "ashish.is--- via Guix-patches\" via" X-Patchwork-Id: 58233 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 9364B27BBE2; Sun, 31 Dec 2023 09:17:29 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 5349227BBE9 for ; Sun, 31 Dec 2023 09:17:27 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJrwP-0000Ke-7B; Sun, 31 Dec 2023 04:17:05 -0500 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 1rJrwL-0000Jm-Of for guix-patches@gnu.org; Sun, 31 Dec 2023 04:17:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rJrwL-00067Y-Gb for guix-patches@gnu.org; Sun, 31 Dec 2023 04:17:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rJrwM-0001ig-4r for guix-patches@gnu.org; Sun, 31 Dec 2023 04:17:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68166] [PATCH 1/2] plan9port: Install into "$output/plan9" instead of "$output". Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 31 Dec 2023 09:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 68166 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68166@debbugs.gnu.org Cc: =?utf-8?b?5a6L5paH5q2m?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17040142196590 (code B ref -1); Sun, 31 Dec 2023 09:17:01 +0000 Received: (at submit) by debbugs.gnu.org; 31 Dec 2023 09:16:59 +0000 Received: from localhost ([127.0.0.1]:45626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJrwI-0001iE-T9 for submit@debbugs.gnu.org; Sun, 31 Dec 2023 04:16:59 -0500 Received: from lists.gnu.org ([2001:470:142::17]:42938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJrwE-0001ht-1h for submit@debbugs.gnu.org; Sun, 31 Dec 2023 04:16:57 -0500 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 1rJrw3-0000EJ-MI for guix-patches@gnu.org; Sun, 31 Dec 2023 04:16:45 -0500 Received: from mail.envs.net ([5.199.136.28]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJrw0-00063W-9Z for guix-patches@gnu.org; Sun, 31 Dec 2023 04:16:43 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 5439C38A0395; Sun, 31 Dec 2023 09:16:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1704014182; bh=lEfVTBKmtCo0OnGAdBhpxzJYgObKjEC+ajJVYUVlqvM=; h=From:To:Cc:Subject:Date:From; b=epQs9EAGQQj5YqCiQVrZDaBsrqaPCVRT9tGmcKh0iR2PG5KBKk/l+lGjR/JD1nvKx iDVgUZ3pIN5JkQHFOnExYbwiikAb9ReyieBuTQ3DrC0osh9MGbDRlC8neArOyizP+A xBNdsqq0LuTmKFOTuiyBjC22K+x9svvCC7A3W3a4mRIFe4kx/adUCkN2fQizKcMQZD HIJweJMyJ1aXYNrM4gUvwrhuNyfEgjAWy0PB9LY0IzWhLmsxrBWp2h9lUUyj4IQVjf oYE/6iDR/tURqCPmeq3uGVOmzVLxsC6trSbGqJiOc9FRBSoA/2dW7gXHRRggrgXqr4 Els4kEwcUvAYI575/xUVC8beQQxU84LM96Kr67yHWiNlS2+Midckl8QBqKD2c6y/iT OUyojlC6n+mwDIUCeE5A2TkTaNATrmYPugnSWEGx+Noe4SbeNUk2Var24ueNhEq1wB 7xlNyKlURbhQOXuycpa+FD5NuZzxNb1qZi7oDs2J1j5ye8BJTw9Hx4drc/gphjk4Yz 7o5mdWD5ttdQSiW79wbuCZeppTL+UEC3c8AbvXL5iNcMoGuhDs62lsS3jwvPurmLdN g3RHEslGvME4dK6026PR6CxxvFmJuNuKaeKq1a233ZKVSi5Fbrp9PGDvn9sZOtj3/p l2ExGluyU4vcepsEPp2EEicw= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Jt6IC39BDEZd; Sun, 31 Dec 2023 09:16:18 +0000 (UTC) Received: from localhost (unknown [36.170.59.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Sun, 31 Dec 2023 09:16:18 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 0604973f; Sun, 31 Dec 2023 09:16:02 +0000 (UTC) Date: Sun, 31 Dec 2023 17:15:57 +0800 Message-ID: <91d97c04df0f0ba32bdfaf85ecf81a0d58d4cb9b.1704014134.git.iyzsong@member.fsf.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=5.199.136.28; envelope-from=iyzsong@envs.net; helo=mail.envs.net 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, 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-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: , Reply-to: iyzsong@envs.net X-ACL-Warn: , iyzsong--- via Guix-patches X-Patchwork-Original-From: iyzsong--- via Guix-patches via From: "ashish.is--- via Guix-patches\" via" 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 From: 宋文武 This fixes . * gnu/packages/plan9.scm (plan9port)[arguments]: Add 'strip-directories'. : Use "$output/plan9" as PLAN9_TARGET. Remove 'wrap-executables phase, instead invoke "./INSTALL -c" to change hard-coded /usr/local/plan9 paths. Change-Id: I7e24f64445c9b6cdcc0d803239e10b226931a845 --- gnu/packages/plan9.scm | 130 ++++++++++++++++++++--------------------- 1 file changed, 63 insertions(+), 67 deletions(-) base-commit: 9d148d08be9d77781e8103915b1f498b03fd3dd2 diff --git a/gnu/packages/plan9.scm b/gnu/packages/plan9.scm index f78c26e215..5af0f2f74f 100644 --- a/gnu/packages/plan9.scm +++ b/gnu/packages/plan9.scm @@ -94,73 +94,69 @@ (define-public plan9port (build-system gnu-build-system) (arguments (list #:tests? #f ;no tests - #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'setup - (lambda _ - (delete-file "src/cmd/mk/mk.pdf") - (substitute* "src/cmd/acme/acme.c" - (("/lib/font/bit/lucsans/euro.8.font") - (string-append #$output - "/font/fixed/unicode.5x8.font")) - (("/lib/font/bit/lucm/unicode.9.font") - (string-append #$output - "/font/fixed/unicode.6x9.font"))) - (substitute* (find-files "src") - (("/lib/font/bit") - (string-append #$output "/font"))) - (substitute* "bin/9c" - (("which") - (which "which"))) - (substitute* "src/cmd/fontsrv/freetyperules.sh" - (("'\\$i'/freetype2") - (string-append "-I" - #$freetype - "/include/freetype2"))) - (with-output-to-file "LOCAL.config" - (lambda _ - (format #t "CC9=~a~%" #$(cc-for-target)) - (format #t "FONTSRV=fontsrv~%"))) - (setenv "X11" - #$libx11) - (setenv "PLAN9" - (getcwd)) - (setenv "PLAN9_TARGET" - #$output))) - (delete 'configure) ;no configure - (replace 'build - (lambda _ - (invoke "./INSTALL" "-b"))) - (replace 'install - (lambda _ - (for-each (lambda (x) - (let ((out (string-append #$output - "/" x))) - (mkdir-p out) - (copy-recursively x out))) - ;; TODO: use external sky and dict packages - '("bin" "face" - "font" - "include" - "lib" - "lp" - "mail" - "man" - "ndb" - "plumb" - "tmac" - "troff" - "postscript")) - (install-file "rcmain" #$output))) - (add-after 'install 'wrap-executables - (lambda _ - (for-each (lambda (exe) - (wrap-program exe - `("PLAN9" ":" prefix - (,#$output)))) - (find-files - (string-append #$output "/bin"))))) - ;; Plan9 doesn't compress man pages - (delete 'compress-documentation)))) + #:strip-directories #~'("plan9/bin") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'setup + (lambda _ + (let ((dest (string-append #$output "/plan9"))) + (delete-file "src/cmd/mk/mk.pdf") + (substitute* "src/cmd/acme/acme.c" + (("/lib/font/bit/lucsans/euro.8.font") + (string-append dest + "/font/fixed/unicode.5x8.font")) + (("/lib/font/bit/lucm/unicode.9.font") + (string-append dest + "/font/fixed/unicode.6x9.font"))) + (substitute* (find-files "src") + (("/lib/font/bit") + (string-append dest "/font"))) + (substitute* "bin/9c" + (("which") + (which "which"))) + (substitute* "src/cmd/fontsrv/freetyperules.sh" + (("'\\$i'/freetype2") + (string-append "-I" + #$freetype + "/include/freetype2"))) + (with-output-to-file "LOCAL.config" + (lambda _ + (format #t "CC9=~a~%" #$(cc-for-target)) + (format #t "FONTSRV=fontsrv~%"))) + (setenv "X11" #$libx11) + (setenv "PLAN9" (getcwd)) + (setenv "PLAN9_TARGET" dest)))) + (delete 'configure) ;no configure + (replace 'build + (lambda _ + (invoke "./INSTALL" "-b"))) + (replace 'install + (lambda _ + (invoke "./INSTALL" "-c") + (let ((dest (getenv "PLAN9_TARGET"))) + (for-each (lambda (x) + (let ((out (string-append dest "/" x))) + (mkdir-p out) + (copy-recursively x out))) + ;; TODO: use external sky and dict packages + '("bin" "face" + "font" + "include" + "lib" + "lp" + "mail" + "man" + "ndb" + "plumb" + "tmac" + "troff" + "postscript")) + (install-file "rcmain" dest) + (mkdir-p (string-append #$output "/bin")) + (symlink (string-append dest "/bin/9") + (string-append #$output "/bin/9"))))) + ;; Plan9 doesn't compress man pages + (delete 'compress-documentation)))) (native-inputs (list perl which)) (inputs (list bash-minimal ;for 'wrap-program' fontconfig libx11 libxext libxt))