unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#68166] [PATCH 1/2] plan9port: Install into "$output/plan9" instead of "$output".
@ 2023-12-31  9:15 iyzsong--- via Guix-patches via
  2023-12-31  9:18 ` [bug#68166] [PATCH 2/2] plan9port: Update to 0.1.0-1.f8681ac iyzsong--- via Guix-patches via
  0 siblings, 1 reply; 3+ messages in thread
From: iyzsong--- via Guix-patches via @ 2023-12-31  9:15 UTC (permalink / raw)
  To: 68166; +Cc: 宋文武

From: 宋文武 <iyzsong@member.fsf.org>

This fixes <https://issues.guix.gnu.org/67329>.

* gnu/packages/plan9.scm (plan9port)[arguments]: Add 'strip-directories'.
<phases>: 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(-)

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))

base-commit: 9d148d08be9d77781e8103915b1f498b03fd3dd2
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#68166] [PATCH 2/2] plan9port: Update to 0.1.0-1.f8681ac.
  2023-12-31  9:15 [bug#68166] [PATCH 1/2] plan9port: Install into "$output/plan9" instead of "$output" iyzsong--- via Guix-patches via
@ 2023-12-31  9:18 ` iyzsong--- via Guix-patches via
  2024-01-07  2:42   ` bug#68166: " 宋文武 via Guix-patches via
  0 siblings, 1 reply; 3+ messages in thread
From: iyzsong--- via Guix-patches via @ 2023-12-31  9:18 UTC (permalink / raw)
  To: 68166; +Cc: 宋文武

From: 宋文武 <iyzsong@member.fsf.org>

* gnu/packages/plan9.scm (plan9port): Update to 0.1.0-1.f8681ac.

Change-Id: I35eb40eb4213478db48989d8ed2c5865e7ce7afc
---
 gnu/packages/plan9.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/plan9.scm b/gnu/packages/plan9.scm
index 5af0f2f74f..b2d8d75471 100644
--- a/gnu/packages/plan9.scm
+++ b/gnu/packages/plan9.scm
@@ -73,8 +73,8 @@ (define-public drawterm
 
 (define-public plan9port
   ;; no releases
-  (let ((commit "cc4571fec67407652b03d6603ada6580de2194dc")
-        (revision "0"))
+  (let ((commit "f8681acb374fa0d5ed1568dbedb00a4abe1ca6f1")
+        (revision "1"))
     (package
       (name "plan9port")
       (version (git-version "0.1.0" revision commit))
@@ -86,7 +86,7 @@ (define-public plan9port
                 (file-name (git-file-name name version))
                 (sha256
                  (base32
-                  "1g2kzlghcghs560na6xalfsjq5zwp015wv9wk8wxn26981zs759x"))
+                  "01343jvn8kr63i78h8xlgscn6wihdsr44xzh1cylvhigjbqw8n2x"))
                 (modules '((guix build utils)))
                 (snippet #~(for-each delete-file-recursively
                                      '("font/luc" ;nonfree
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#68166: [PATCH 2/2] plan9port: Update to 0.1.0-1.f8681ac.
  2023-12-31  9:18 ` [bug#68166] [PATCH 2/2] plan9port: Update to 0.1.0-1.f8681ac iyzsong--- via Guix-patches via
@ 2024-01-07  2:42   ` 宋文武 via Guix-patches via
  0 siblings, 0 replies; 3+ messages in thread
From: 宋文武 via Guix-patches via @ 2024-01-07  2:42 UTC (permalink / raw)
  To: 68166-done; +Cc: 宋文武


Pushed now.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-07  3:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-31  9:15 [bug#68166] [PATCH 1/2] plan9port: Install into "$output/plan9" instead of "$output" iyzsong--- via Guix-patches via
2023-12-31  9:18 ` [bug#68166] [PATCH 2/2] plan9port: Update to 0.1.0-1.f8681ac iyzsong--- via Guix-patches via
2024-01-07  2:42   ` bug#68166: " 宋文武 via Guix-patches via

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).