Archived
1
0
Fork 0

gnu: altermime: Use G-expressions.

* gnu/packages/mail.scm (altermime)[arguments]:
Rewrite as G-expressions.  Don't explicitly return #t from phases.
This commit is contained in:
Tobias Geerinckx-Rice 2023-07-09 02:00:02 +02:00
parent 1d7e1fbc38
commit bce8c88f42
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -837,37 +837,36 @@ Extension (MIME).")
"15zxg6spcmd35r6xbidq2fgcg2nzyv1sbbqds08lzll70mqx4pj7")))) "15zxg6spcmd35r6xbidq2fgcg2nzyv1sbbqds08lzll70mqx4pj7"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:make-flags (list "CC=gcc" (list
(string-append "PREFIX=" (assoc-ref %outputs "out"))) #:make-flags
#:tests? #f ; there are none #~(list "CC=gcc"
#:phases (string-append "PREFIX=" #$output))
(modify-phases %standard-phases #:tests? #f ; there are none
(delete 'configure) #:phases
(add-after 'unpack 'fix-bugs #~(modify-phases %standard-phases
(lambda _ (delete 'configure)
(substitute* "MIME_headers.c" (add-after 'unpack 'fix-bugs
(("hinfo->filename, sizeof\\(hinfo->name\\)") (lambda _
"hinfo->filename, sizeof(hinfo->filename)") (substitute* "MIME_headers.c"
(("memset\\(hinfo->defects, 0, _MIMEH_DEFECT_ARRAY_SIZE\\);") (("hinfo->filename, sizeof\\(hinfo->name\\)")
"memset(hinfo->defects, 0, sizeof(hinfo->defects));")) "hinfo->filename, sizeof(hinfo->filename)")
(substitute* "pldstr.c" (("memset\\(hinfo->defects, 0, _MIMEH_DEFECT_ARRAY_SIZE\\);")
(("if \\(\\(st->start\\)&&\\(st->start != '\\\\0'\\)\\)") "memset(hinfo->defects, 0, sizeof(hinfo->defects));"))
"if ((st->start)&&(*st->start != '\\0'))")) (substitute* "pldstr.c"
(substitute* "qpe.c" (("if \\(\\(st->start\\)&&\\(st->start != '\\\\0'\\)\\)")
(("if \\(lineend != '\\\\0'\\)") "if ((st->start)&&(*st->start != '\\0'))"))
"if (*lineend != '\\0')")) (substitute* "qpe.c"
#t)) (("if \\(lineend != '\\\\0'\\)")
(add-after 'unpack 'install-to-prefix "if (*lineend != '\\0')"))))
(lambda _ (add-after 'unpack 'install-to-prefix
(substitute* "Makefile" (lambda _
(("/usr/local") "${PREFIX}") (substitute* "Makefile"
(("cp altermime.*") "install -D -t ${PREFIX}/bin altermime\n")) (("/usr/local") "${PREFIX}")
#t)) (("cp altermime.*") "install -D -t ${PREFIX}/bin altermime\n"))))
(add-after 'unpack 'disable-Werror (add-after 'unpack 'disable-Werror
(lambda _ (lambda _
(substitute* "Makefile" (substitute* "Makefile"
(("-Werror") "")) (("-Werror") "")))))))
#t)))))
(home-page "https://pldaniels.com/altermime/") (home-page "https://pldaniels.com/altermime/")
(synopsis "Modify MIME-encoded messages") (synopsis "Modify MIME-encoded messages")
(description (description