From: Maxime Devos <maximedevos@telenet.be>
To: Ivan Gankevich <i.gankevich@spbu.ru>, 49685@debbugs.gnu.org
Subject: [bug#49685] [PATCH] gnu: Add task-spooler.
Date: Wed, 21 Jul 2021 21:00:26 +0200 [thread overview]
Message-ID: <e653b01880415556c8f30e0508be89618cecaddd.camel@telenet.be> (raw)
In-Reply-To: <20210721183504.9388-1-i.gankevich@spbu.ru>
[-- Attachment #1: Type: text/plain, Size: 2922 bytes --]
Ivan Gankevich schreef op wo 21-07-2021 om 21:35 [+0300]:
> +(define-public task-spooler
> + (package
> + (name "task-spooler")
> + (version "1.0.1")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://vicerveza.homeunix.net/~viric/soft/ts/ts-" version ".tar.gz"))
> + (sha256 (base32 "0y32sm2i2jxs88c307h76449fynk75p9qfw1k11l5ixrn03z67pl"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:make-flags
> + (let ((c-flags "-g -O2"))
> + (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
> + "CC=gcc"
This shoul be ,(string-append "CC=" (cc-for-target)), such that the cross-compiler
is used when cross-compililng.
> + (string-append "CFLAGS=" c-flags)
> + (string-append "LDFLAGS=" c-flags)))
Why are you adding "-g -O2" to LDFLAGS? I understand adding it to CFLAGS,
but I don't see why it would be added to CFLAGS.
> + #:phases
> + (modify-phases %standard-phases
> + (delete 'configure) ;; no configuration script
> + (add-after 'unpack 'rename-and-patch-paths
> + (lambda _
> + ;; Rename "ts" to "tsp" to not interfere with "ts" command
> + ;; from moreutils package.
> + (rename-file "ts.1" "tsp.1");
> + (substitute* '("Makefile" "testbench.sh")
> + (("\\bts\\b") "tsp"))
> + ;; Patch gzip/sendmail/shell paths.
> + (substitute* "execute.c"
> + (("execlp\\(\"gzip\"") (format #f "execlp(\"~a\"" (which "gzip"))))
This needs to be (search-input-file "bin/gzip") instead of (which "gzip")
for cross-compilation purposes ('which' searches for a native "gzip" in $PATH)
'search-input-file' is not yet defined on 'master' (it's only on 'core-updates'
currently), so you could do something like
(string-append (assoc-ref inputs "gzip") "/bin/gzip")
> + (substitute* "list.c"
> + (("/bin/sh\\b") (which "sh")))
Ditto (and you need to add "bash-minimal" to "inputs").
> + (substitute* "env.c"
> + (("execlp\\(\"/bin/sh\"") (format #f "execlp(\"~a\"" (which "sh"))))
Ditto.
> + (substitute* "mail.c"
> + (("execl\\(\"/usr/sbin/sendmail\"")
> + (format #f "execl(\"~a/usr/sbin/sendmail\""
> + (assoc-ref %build-inputs "sendmail"))))))
If you fix 'sendemail' to install things in "sbin" instead of
"usr/sbin", then you can do (search-input-file inputs "bin/sendmail").
> + (replace 'check
> + (lambda* (#:key tests? #:allow-other-keys)
> + (when tests?
> + (setenv "PATH" (string-join (list (getenv "PATH") (getcwd)) ":"))
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
next prev parent reply other threads:[~2021-07-21 19:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-21 18:35 [bug#49685] [PATCH] gnu: Add task-spooler Ivan Gankevich
2021-07-21 19:00 ` Maxime Devos [this message]
2021-07-23 18:22 ` Ivan Gankevich
2021-07-23 18:15 ` [bug#49685] [PATCH] gnu: sendmail: Install executables to $prefix/sbin and $prefix/bin directories Ivan Gankevich
2021-08-10 15:20 ` bug#49685: [PATCH] gnu: Add task-spooler Ludovic Courtès
2021-07-23 18:19 ` [bug#49685] " Ivan Gankevich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e653b01880415556c8f30e0508be89618cecaddd.camel@telenet.be \
--to=maximedevos@telenet.be \
--cc=49685@debbugs.gnu.org \
--cc=i.gankevich@spbu.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.