[PATCH] gnu: add bmake

  • Done
  • quality assurance status badge
Details
2 participants
  • Nicolas Goaziou
  • qblade
Owner
unassigned
Submitted by
qblade
Severity
normal
Q
Q
qblade wrote on 22 Feb 2021 07:33
(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
E7Qpz20wDnxkH9EMr_sSqYVJxFll3zNTfHV4CwBtwTUprV_zfwhfo8o9faxuShmQxAGcTws9kKae8RtsQkPhnlH9DY5I8oep5T1LTaq4LWs=@protonmail.com
Empty Message
From 24d03e78dc8c2fa9dd82ad20f4c861d4128a7ee5 Mon Sep 17 00:00:00 2001
From: qblade <qblade@protonmail.com>
Date: Mon, 22 Feb 2021 01:24:53 +0000
Subject: [PATCH] gnu: add bmake

* gnu/packages/build-tools.scm (bmake): New variable.
---
gnu/packages/build-tools.scm | 48 ++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)

Toggle diff (72 lines)
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 63417e5b81..81299e435c 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -12,6 +12,7 @@
;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
;;; Copyright © 2020 Jakub K?dzio?ka <kuba@kadziolka.net>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 qblade <qblade@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -37,6 +38,8 @@
#:use-module (guix build-system cmake)
#:use-module (gnu packages)
#:use-module (gnu packages adns)
+ #:use-module (gnu packages bash)
+ #:use-module (gnu packages base)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages cpp)
@@ -481,3 +484,48 @@ besides executing the make build command, updates the JSON compilation
database file corresponding to that build, resulting in a command-line
interface similar to Bear.")
(license license:gpl3)))
+
+(define-public bmake
+ (package
+ (name "bmake")
+ (version "20200902")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://www.crufty.net/ftp/pub/sjg/bmake-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1v1v81llsiy8qbpy38nml1x08dhrihwh040pqgwbwb9zy1108b08"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("bash" ,bash-minimal)))
+ (native-inputs
+ `(("coreutils" ,coreutils)))
+ (arguments
+ `(#:tests? #f ;; test in build
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'configure 'fix-test ;; fix from nixpkgs
+ (lambda _
+ (substitute* "unit-tests/unexport-env.mk"
+ (("PATH = /bin:/usr/bin:/sbin:/usr/sbin")
+ "PATH := ${PATH}"))))
+ (add-after 'configure 'remove-fail-test ;; need fix
+ (lambda _
+ (substitute* "unit-tests/Makefile"
+ (("cmd-interrupt")
+ "")))))
+ #:configure-flags
+ (list
+ (string-append
+ "--with-defshell=" (assoc-ref %build-inputs "bash") "/bin/bash")
+ (string-append
+ "--with-default-sys-path=" (assoc-ref %outputs "out") "/share/mk"))
+ #:make-flags
+ (list "INSTALL=install"))) ;; use coreutils install
+ (home-page "http://www.crufty.net/help/sjg/bmake.htm")
+ (synopsis "BSD's make")
+ (description "Program designed to simplify the maintenance of
+other programs.")
+ (license license:bsd-3)))
--
2.29.2
N
N
Nicolas Goaziou wrote on 27 Feb 2021 15:15
(name . qblade via Guix-patches via)(address . guix-patches@gnu.org)
87k0qt1ts2.fsf@nicolasgoaziou.fr
Hello,

qblade via Guix-patches via <guix-patches@gnu.org> writes:

Toggle quote (2 lines)
> * gnu/packages/build-tools.scm (bmake): New variable.

Thank you. Some comments follow.

Toggle quote (3 lines)
> + (name "bmake")
> + (version "20200902")

There is a newer version available. Could you provide it instead?

I tried to quickly update it (hash
"07n9avzdg6gifrzyddnyzada5s5rzklvbqfpv5drljpxcgpqpvwg") but there are
additional failing tests.

Toggle quote (3 lines)
> + (arguments
> + `(#:tests? #f ;; test in build

You need a single semicolon for end-of-line comments. Also (nitpick),
I find ";test during build" clearer.

Toggle quote (4 lines)
> + #:phases
> + (modify-phases %standard-phases
> + (add-after 'configure 'fix-test ;; fix from nixpkgs

See above for comment syntax.

Toggle quote (3 lines)
> + (description "Program designed to simplify the maintenance of
> +other programs.")

I suggest:

"bmake is a program designed to simplify the maintenance of other
programs. Its input is a list of specifications as to the files upon which
programs and other files depend."

Could you send an updated patch?

Regards,
--
Nicolas Goaziou
Q
Q
qblade wrote on 28 Feb 2021 05:27
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)
QZ-GMnnNuclj89vhmSiC7J0PvEmsjRBaDyU4aiyRmG7072MjVci29V8P2dvYIrony2cyW-qrAsjpz25cTzJnSCJrjcI5ysnwOrhK1pL9P3Y=@protonmail.com
OK
From 3f04fd4d572ba8bf141324d60f3b0d3cc6fb2e4f Mon Sep 17 00:00:00 2001
From: qblade <qblade@protonmail.com>
Date: Sun, 28 Feb 2021 02:48:39 +0000
Subject: [PATCH] gnu: Add bmake

* gnu/packages/build-tools.scm (bmake): New variable.
---
gnu/packages/build-tools.scm | 52 ++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)

Toggle diff (76 lines)
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 63417e5b81..5cb2e5de5d 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -12,6 +12,7 @@
;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
;;; Copyright © 2020 Jakub K?dzio?ka <kuba@kadziolka.net>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 qblade <qblade@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -37,6 +38,8 @@
#:use-module (guix build-system cmake)
#:use-module (gnu packages)
#:use-module (gnu packages adns)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages cpp)
@@ -481,3 +484,52 @@ besides executing the make build command, updates the JSON compilation
database file corresponding to that build, resulting in a command-line
interface similar to Bear.")
(license license:gpl3)))
+
+(define-public bmake
+ (package
+ (name "bmake")
+ (version "20210206")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://www.crufty.net/ftp/pub/sjg/bmake-" version ".tar.gz"))
+ (sha256
+ (base32
+ "07n9avzdg6gifrzyddnyzada5s5rzklvbqfpv5drljpxcgpqpvwg"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("bash" ,bash-minimal)))
+ (native-inputs
+ `(("coreutils" ,coreutils)))
+ (arguments
+ `(#:tests? #f ; test during build
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'configure 'fix-test ; fix from nixpkgs
+ (lambda _
+ (substitute* "unit-tests/unexport-env.mk"
+ (("PATH=\t/bin:/usr/bin:/sbin:/usr/sbin")
+ "PATH := ${PATH}"))))
+ (add-after 'configure 'remove-fail-tests ;; need fix
+ (lambda _
+ (substitute* "unit-tests/Makefile"
+ (("cmd-interrupt")
+ ""))
+ (substitute* "unit-tests/Makefile"
+ (("varmod-localtime")
+ "")))))
+ #:configure-flags
+ (list
+ (string-append
+ "--with-defshell=" (assoc-ref %build-inputs "bash") "/bin/bash")
+ (string-append
+ "--with-default-sys-path=" (assoc-ref %outputs "out") "/share/mk"))
+ #:make-flags
+ (list "INSTALL=install"))) ;; use coreutils install
+ (home-page "http://www.crufty.net/help/sjg/bmake.htm")
+ (synopsis "BSD's make")
+ (description "bmake is a program designed to simplify the maintenance of
+ other programs. Its input is a list of specifications as to the files upon
+ which programs and other files depend.")
+ (license license:bsd-3)))
--
2.29.2
N
N
Nicolas Goaziou wrote on 2 Mar 2021 11:58
(name . qblade)(address . qblade@protonmail.com)
877dmpesaq.fsf@nicolasgoaziou.fr
Hello,

qblade <qblade@protonmail.com> writes:

Toggle quote (2 lines)
> Subject: [PATCH] gnu: Add bmake

Applied. Thank you.

Toggle quote (9 lines)
> + (add-after 'configure 'remove-fail-tests ;; need fix
> + (lambda _
> + (substitute* "unit-tests/Makefile"
> + (("cmd-interrupt")
> + ""))
> + (substitute* "unit-tests/Makefile"
> + (("varmod-localtime")
> + "")))))

I merged the two substitutions within the same substitute* call.

Regards,
--
Nicolas Goaziou
?