GNU bug report logs -
#61745
[PATCH] gnu: Add 9base.
Previous Next
Reported by: Antero Mejr <antero <at> mailbox.org>
Date: Fri, 24 Feb 2023 03:19:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* gnu/packages/suckless.scm (9yacc): New variable.
---
gnu/packages/suckless.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
index 7f79e9d7e9..cfd70df027 100644
--- a/gnu/packages/suckless.scm
+++ b/gnu/packages/suckless.scm
@@ -1324,3 +1324,34 @@ (define-public lib9
It also contains the Plan 9 libbio, libregexp, libfmt and libutf libraries.")
(license (list license:expat ;modifications
license:lpl1.02))))) ;original plan9 code
+
+(define-public 9yacc
+ (package
+ (inherit lib9)
+ (name "9yacc")
+ (arguments
+ (substitute-keyword-arguments (package-arguments lib9)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-after 'patch 'patch-for-9yacc
+ (lambda _
+ (substitute* "yacc/yacc.c"
+ (("#9/yacc")
+ (string-append #$output "/lib")))
+ (substitute* "config.mk"
+ (("^CFLAGS.*+=.*$")
+ (string-append "CFLAGS+=-O2 -g -c -DPLAN9PORT "
+ "-DPREFIX=\\\"" #$output "\\\"\n")))))
+ (replace 'chdir
+ (lambda _
+ (chdir "yacc")))
+ (delete 'install-include)
+ (add-after 'install 'install-yaccpar
+ (lambda _
+ (install-file "yaccpar" (string-append #$output "/lib"))
+ (install-file "yaccpars" (string-append #$output "/lib"))))))))
+ (inputs (list lib9))
+ (synopsis "Port of Plan 9's yacc parser generator for Unix")
+ (description
+ "This package provides a ported version of the Plan 9 yacc parser
+generator.")))
--
2.38.1
This bug report was last modified 2 years and 71 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.