bmake: 20240301 -> 20240520
- The first patch is now unneeded - The second one needs an update - Now Musl is working 100%... strange...
This commit is contained in:
parent
e62df55210
commit
074c45769c
@ -1,10 +0,0 @@
|
|||||||
--- bmake/make-bootstrap.sh.in.orig 2019-02-19 10:55:21.733606117 -0800
|
|
||||||
+++ bmake/make-bootstrap.sh.in 2019-02-19 10:56:02.150771541 -0800
|
|
||||||
@@ -4,6 +4,7 @@
|
|
||||||
|
|
||||||
srcdir=@srcdir@
|
|
||||||
|
|
||||||
+prefix="@prefix@"
|
|
||||||
DEFAULT_SYS_PATH="@default_sys_path@"
|
|
||||||
|
|
||||||
case "@use_meta@" in
|
|
@ -1,17 +1,17 @@
|
|||||||
diff -Naur bmake-old/boot-strap bmake-new/boot-strap
|
diff -Naur bmake-old/boot-strap bmake-new/boot-strap
|
||||||
--- bmake-old/boot-strap 2023-06-27 18:02:19.000000000 -0300
|
--- bmake-old/boot-strap 2024-03-10 14:51:10.000000000 -0300
|
||||||
+++ bmake-new/boot-strap 2023-07-23 22:31:02.334720661 -0300
|
+++ bmake-new/boot-strap 2024-05-30 21:49:13.689803511 -0300
|
||||||
@@ -413,9 +413,6 @@
|
@@ -435,9 +435,6 @@
|
||||||
[ -s make-bootstrap.sh ] || op_configure
|
[ -s make-bootstrap.sh ] || op_configure
|
||||||
chmod 755 make-bootstrap.sh || exit 1
|
chmod 755 make-bootstrap.sh || exit 1
|
||||||
./make-bootstrap.sh || exit 1
|
./make-bootstrap.sh || exit 1
|
||||||
- case "$op" in
|
- case "$op" in
|
||||||
- build) op_test;;
|
- build) rm -f tested; op_test;;
|
||||||
- esac
|
- esac
|
||||||
}
|
}
|
||||||
|
|
||||||
op_test() {
|
op_test() {
|
||||||
@@ -434,7 +431,6 @@
|
@@ -461,7 +458,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
op_install() {
|
op_install() {
|
||||||
|
@ -1,25 +1,24 @@
|
|||||||
{ lib
|
{
|
||||||
, stdenv
|
lib,
|
||||||
, fetchurl
|
bc,
|
||||||
, getopt
|
fetchurl,
|
||||||
, ksh
|
getopt,
|
||||||
, bc
|
ksh,
|
||||||
, tzdata
|
pkgsMusl,
|
||||||
, pkgsMusl # for passthru.tests
|
stdenv,
|
||||||
|
tzdata,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "bmake";
|
pname = "bmake";
|
||||||
version = "20240301";
|
version = "20240520";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://www.crufty.net/ftp/pub/sjg/bmake-${finalAttrs.version}.tar.gz";
|
url = "https://www.crufty.net/ftp/pub/sjg/bmake-${finalAttrs.version}.tar.gz";
|
||||||
hash = "sha256-JM4L46z8i5PHWgeWxi7swWN246fAVXCzAtIEgOOOn1k=";
|
hash = "sha256-IhDM1FWwCN95Ufbb00e/zBg3xGRzAU5LjdX/MJGuKJQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
# make bootstrap script aware of the prefix in /nix/store
|
|
||||||
./001-bootstrap-fix.diff
|
|
||||||
# decouple tests from build phase
|
# decouple tests from build phase
|
||||||
./002-dont-test-while-installing.diff
|
./002-dont-test-while-installing.diff
|
||||||
# preserve PATH from build env in unit tests
|
# preserve PATH from build env in unit tests
|
||||||
@ -28,6 +27,43 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
./004-unconditional-ksh-test.diff
|
./004-unconditional-ksh-test.diff
|
||||||
];
|
];
|
||||||
|
|
||||||
|
outputs = [ "out" "man" ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ getopt ];
|
||||||
|
|
||||||
|
nativeCheckInputs = [
|
||||||
|
bc
|
||||||
|
tzdata
|
||||||
|
] ++ lib.optionals (stdenv.hostPlatform.libc != "musl") [
|
||||||
|
ksh
|
||||||
|
];
|
||||||
|
|
||||||
|
# The generated makefile is a small wrapper for calling ./boot-strap with a
|
||||||
|
# given op. On a case-insensitive filesystem this generated makefile clobbers
|
||||||
|
# a distinct, shipped Makefile and causes infinite recursion during tests
|
||||||
|
# which eventually fail with "fork: Resource temporarily unavailable"
|
||||||
|
configureFlags = [
|
||||||
|
"--without-makefile"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Disabled tests:
|
||||||
|
# * directive-export{,-gmake}: another failure related to TZ variables
|
||||||
|
# * opt-chdir: ofborg complains about it somehow
|
||||||
|
# * opt-keep-going-indirect: not yet known
|
||||||
|
# * varmod-localtime: musl doesn't support TZDIR and this test relies on
|
||||||
|
# impure, implicit paths
|
||||||
|
env.BROKEN_TESTS = builtins.concatStringsSep " " [
|
||||||
|
"directive-export"
|
||||||
|
"directive-export-gmake"
|
||||||
|
"opt-chdir" # works on my machine -- AndersonTorres
|
||||||
|
"opt-keep-going-indirect"
|
||||||
|
"varmod-localtime"
|
||||||
|
];
|
||||||
|
|
||||||
|
strictDeps = true;
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
# Make tests work with musl
|
# Make tests work with musl
|
||||||
# * Disable deptgt-delete_on_error test (alpine does this too)
|
# * Disable deptgt-delete_on_error test (alpine does this too)
|
||||||
# * Disable shell-ksh test (ksh doesn't compile with musl)
|
# * Disable shell-ksh test (ksh doesn't compile with musl)
|
||||||
@ -39,16 +75,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
substituteInPlace unit-tests/opt-chdir.exp --replace "File name" "Filename"
|
substituteInPlace unit-tests/opt-chdir.exp --replace "File name" "Filename"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ getopt ];
|
|
||||||
|
|
||||||
# The generated makefile is a small wrapper for calling ./boot-strap with a
|
|
||||||
# given op. On a case-insensitive filesystem this generated makefile clobbers
|
|
||||||
# a distinct, shipped, Makefile and causes infinite recursion during tests
|
|
||||||
# which eventually fail with "fork: Resource temporarily unavailable"
|
|
||||||
configureFlags = [
|
|
||||||
"--without-makefile"
|
|
||||||
];
|
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
@ -65,29 +91,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doCheck = true;
|
|
||||||
|
|
||||||
nativeCheckInputs = [
|
|
||||||
bc
|
|
||||||
tzdata
|
|
||||||
] ++ lib.optionals (stdenv.hostPlatform.libc != "musl") [
|
|
||||||
ksh
|
|
||||||
];
|
|
||||||
|
|
||||||
# Disabled tests:
|
|
||||||
# directive-export{,-gmake}: another failure related to TZ variables
|
|
||||||
# opt-chdir: ofborg complains about it somehow
|
|
||||||
# opt-keep-going-indirect: not yet known
|
|
||||||
# varmod-localtime: musl doesn't support TZDIR and this test relies on impure,
|
|
||||||
# implicit paths
|
|
||||||
env.BROKEN_TESTS = builtins.concatStringsSep " " [
|
|
||||||
"directive-export"
|
|
||||||
"directive-export-gmake"
|
|
||||||
"opt-chdir" # works on my machine -- AndersonTorres
|
|
||||||
"opt-keep-going-indirect"
|
|
||||||
"varmod-localtime"
|
|
||||||
];
|
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
runHook preCheck
|
runHook preCheck
|
||||||
|
|
||||||
@ -96,22 +99,24 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
runHook postCheck
|
runHook postCheck
|
||||||
'';
|
'';
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
setupHook = ./setup-hook.sh;
|
setupHook = ./setup-hook.sh;
|
||||||
|
|
||||||
passthru.tests.bmakeMusl = pkgsMusl.bmake;
|
passthru = {
|
||||||
|
tests = {
|
||||||
|
bmakeMusl = pkgsMusl.bmake;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://www.crufty.net/help/sjg/bmake.html";
|
homepage = "https://www.crufty.net/help/sjg/bmake.html";
|
||||||
description = "Portable version of NetBSD 'make'";
|
description = "Portable version of NetBSD 'make'";
|
||||||
license = lib.licenses.bsd3;
|
license = lib.licenses.bsd3;
|
||||||
mainProgram = "bmake";
|
mainProgram = "bmake";
|
||||||
maintainers = with lib.maintainers; [ thoughtpolice AndersonTorres ];
|
maintainers = with lib.maintainers; [ thoughtpolice AndersonTorres ];
|
||||||
platforms = lib.platforms.unix;
|
platforms = lib.platforms.unix;
|
||||||
# ofborg: x86_64-linux builds the musl package, aarch64-linux doesn't
|
# requires strip
|
||||||
broken = stdenv.hostPlatform.isMusl && stdenv.buildPlatform.isAarch64;
|
badPlatforms = [ lib.systems.inspect.platformPatterns.isStatic ];
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
# TODO: report the quirks and patches to bmake devteam (especially the Musl one)
|
# TODO: report the quirks and patches to bmake devteam (especially the Musl one)
|
||||||
# TODO: investigate Musl support
|
# TODO: investigate static support
|
||||||
|
Loading…
Reference in New Issue
Block a user