-
-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #315176 from rhelmot/freebsd-minimal3/freebsd-various
freebsd: various improvements and new packages
- Loading branch information
Showing
27 changed files
with
598 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
pkgs/os-specific/bsd/freebsd/patches/14.0/libcxxrt-headers.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- freebsd/lib/libcxxrt/Makefile 2024-05-30 14:27:42.328086005 -0700 | ||
+++ freebsd/lib/libcxxrt/Makefile.mod 2024-05-30 14:27:48.048014581 -0700 | ||
@@ -19,6 +19,8 @@ | ||
SRCS+= terminate.cc | ||
SRCS+= typeinfo.cc | ||
|
||
+INCS+=cxxabi.h unwind.h unwind-arm.h unwind-itanium.h | ||
+ | ||
WARNS?= 0 | ||
CFLAGS+= -isystem ${SRCDIR} -nostdinc++ | ||
CXXSTD?= c++14 |
158 changes: 158 additions & 0 deletions
158
pkgs/os-specific/bsd/freebsd/patches/14.0/localedef.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
diff --git a/include/_ctype.h b/include/_ctype.h | ||
index 91e6b1d14f6b..a6896b598da3 100644 | ||
--- a/include/_ctype.h | ||
+++ b/include/_ctype.h | ||
@@ -44,7 +44,7 @@ | ||
#define __CTYPE_H_ | ||
|
||
#include <sys/cdefs.h> | ||
-#include <sys/_types.h> | ||
+#include <sys/types.h> | ||
|
||
#define _CTYPE_A 0x00000100L /* Alpha */ | ||
#define _CTYPE_C 0x00000200L /* Control */ | ||
diff --git a/lib/libc/locale/collate.h b/lib/libc/locale/collate.h | ||
index 2d3723b49f5b..6bbff732b9d7 100644 | ||
--- a/lib/libc/locale/collate.h | ||
+++ b/lib/libc/locale/collate.h | ||
@@ -36,6 +36,7 @@ | ||
#ifndef _COLLATE_H_ | ||
#define _COLLATE_H_ | ||
|
||
+#include <stdint.h> | ||
#include <sys/cdefs.h> | ||
#include <sys/types.h> | ||
#include <limits.h> | ||
diff --git a/usr.bin/localedef/charmap.c b/usr.bin/localedef/charmap.c | ||
index 44b7e3292eae..79c30b7cf372 100644 | ||
--- a/usr.bin/localedef/charmap.c | ||
+++ b/usr.bin/localedef/charmap.c | ||
@@ -31,6 +31,7 @@ | ||
/* | ||
* CHARMAP file handling for localedef. | ||
*/ | ||
+#include <stdint.h> | ||
#include <sys/cdefs.h> | ||
#include <sys/types.h> | ||
#include <sys/tree.h> | ||
diff --git a/usr.bin/localedef/collate.c b/usr.bin/localedef/collate.c | ||
index 2a080773a95e..3f0030c638f5 100644 | ||
--- a/usr.bin/localedef/collate.c | ||
+++ b/usr.bin/localedef/collate.c | ||
@@ -31,6 +31,7 @@ | ||
/* | ||
* LC_COLLATE database generation routines for localedef. | ||
*/ | ||
+#include <stdint.h> | ||
#include <sys/cdefs.h> | ||
#include <sys/types.h> | ||
#include <sys/tree.h> | ||
diff --git a/usr.bin/localedef/ctype.c b/usr.bin/localedef/ctype.c | ||
index ab7b76e57b2d..846c6d6480a8 100644 | ||
--- a/usr.bin/localedef/ctype.c | ||
+++ b/usr.bin/localedef/ctype.c | ||
@@ -32,6 +32,7 @@ | ||
/* | ||
* LC_CTYPE database generation routines for localedef. | ||
*/ | ||
+#include <stdint.h> | ||
#include <sys/cdefs.h> | ||
#include <sys/tree.h> | ||
|
||
diff --git a/usr.bin/localedef/localedef.c b/usr.bin/localedef/localedef.c | ||
index 5ff146d6f655..ed69aa1f0c0e 100644 | ||
--- a/usr.bin/localedef/localedef.c | ||
+++ b/usr.bin/localedef/localedef.c | ||
@@ -32,7 +32,7 @@ | ||
* POSIX localedef. | ||
*/ | ||
#include <sys/cdefs.h> | ||
-#include <sys/endian.h> | ||
+#include <endian.h> | ||
#include <sys/stat.h> | ||
#include <sys/types.h> | ||
|
||
diff --git a/usr.bin/localedef/messages.c b/usr.bin/localedef/messages.c | ||
index 6b8eb9d684dd..0155821d0e56 100644 | ||
--- a/usr.bin/localedef/messages.c | ||
+++ b/usr.bin/localedef/messages.c | ||
@@ -31,6 +31,7 @@ | ||
/* | ||
* LC_MESSAGES database generation routines for localedef. | ||
*/ | ||
+#include <stdint.h> | ||
#include <sys/cdefs.h> | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
diff --git a/usr.bin/localedef/monetary.c b/usr.bin/localedef/monetary.c | ||
index 7a77ac7e256c..7636c4deca1f 100644 | ||
--- a/usr.bin/localedef/monetary.c | ||
+++ b/usr.bin/localedef/monetary.c | ||
@@ -31,6 +31,7 @@ | ||
/* | ||
* LC_MONETARY database generation routines for localedef. | ||
*/ | ||
+#include <stdint.h> | ||
#include <sys/cdefs.h> | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
diff --git a/usr.bin/localedef/numeric.c b/usr.bin/localedef/numeric.c | ||
index 5533b7c10e1a..9c47494f815c 100644 | ||
--- a/usr.bin/localedef/numeric.c | ||
+++ b/usr.bin/localedef/numeric.c | ||
@@ -31,6 +31,7 @@ | ||
/* | ||
* LC_NUMERIC database generation routines for localedef. | ||
*/ | ||
+#include <stdint.h> | ||
#include <sys/cdefs.h> | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
diff --git a/usr.bin/localedef/parser.y b/usr.bin/localedef/parser.y | ||
index 23b3b54f8a6e..e01330f0152d 100644 | ||
--- a/usr.bin/localedef/parser.y | ||
+++ b/usr.bin/localedef/parser.y | ||
@@ -33,6 +33,7 @@ | ||
* POSIX localedef grammar. | ||
*/ | ||
|
||
+#include <stdint.h> | ||
#include <wchar.h> | ||
#include <stdio.h> | ||
#include <limits.h> | ||
diff --git a/usr.bin/localedef/scanner.c b/usr.bin/localedef/scanner.c | ||
index c6d45a993f28..b17670ef4b4a 100644 | ||
--- a/usr.bin/localedef/scanner.c | ||
+++ b/usr.bin/localedef/scanner.c | ||
@@ -32,6 +32,7 @@ | ||
* This file contains the "scanner", which tokenizes the input files | ||
* for localedef for processing by the higher level grammar processor. | ||
*/ | ||
+#include <stdint.h> | ||
#include <sys/cdefs.h> | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
diff --git a/usr.bin/localedef/time.c b/usr.bin/localedef/time.c | ||
index 7a56e244c921..0e409a742d0a 100644 | ||
--- a/usr.bin/localedef/time.c | ||
+++ b/usr.bin/localedef/time.c | ||
@@ -31,6 +31,7 @@ | ||
/* | ||
* LC_TIME database generation routines for localedef. | ||
*/ | ||
+#include <stdint.h> | ||
#include <sys/cdefs.h> | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
diff --git a/usr.bin/localedef/wide.c b/usr.bin/localedef/wide.c | ||
index 062e120e6912..a199cddb198d 100644 | ||
--- a/usr.bin/localedef/wide.c | ||
+++ b/usr.bin/localedef/wide.c | ||
@@ -34,6 +34,7 @@ | ||
* to the wide character forms used internally by libc. Unfortunately, | ||
* this approach means that we need a method for each and every encoding. | ||
*/ | ||
+#include <stdint.h> | ||
#include <sys/cdefs.h> | ||
#include <ctype.h> | ||
#include <stdlib.h> |
15 changes: 15 additions & 0 deletions
15
pkgs/os-specific/bsd/freebsd/patches/14.0/tinfo-host-cc.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- a/lib/ncurses/tinfo/Makefile 2023-12-26 23:02:07.827892619 -0800 | ||
+++ b/lib/ncurses/tinfo/Makefile 2023-12-26 23:01:24.175546100 -0800 | ||
@@ -282,10 +282,10 @@ | ||
build-tools: make_hash make_keys | ||
|
||
make_keys: make_keys.c names.c ncurses_def.h ${HEADERS} ${BUILD_TOOLS_META} | ||
- ${CC:N${CCACHE_BIN}} -o $@ ${CFLAGS} ${NCURSES_DIR}/ncurses/tinfo/make_keys.c | ||
+ ${CC_HOST:N${CCACHE_BIN}} -o $@ ${CFLAGS} ${NCURSES_DIR}/ncurses/tinfo/make_keys.c | ||
|
||
make_hash: make_hash.c hashsize.h ncurses_def.h ${HEADERS} ${BUILD_TOOLS_META} | ||
- ${CC:N${CCACHE_BIN}} -o $@ ${CFLAGS} -DMAIN_PROGRAM \ | ||
+ ${CC_HOST:N${CCACHE_BIN}} -o $@ ${CFLAGS} -DMAIN_PROGRAM \ | ||
${NCURSES_DIR}/ncurses/tinfo/make_hash.c | ||
.endif | ||
.if ${MK_DIRDEPS_BUILD} == "yes" && ${MACHINE} != "host" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{ | ||
mkDerivation, | ||
pkgsBuildBuild, | ||
libjail, | ||
libmd, | ||
libnetbsd, | ||
libcapsicum, | ||
libcasper, | ||
libelf, | ||
libxo, | ||
libncurses-tinfo, | ||
libedit, | ||
lib, | ||
stdenv, | ||
bsdSetupHook, | ||
freebsdSetupHook, | ||
makeMinimal, | ||
install, | ||
tsort, | ||
lorder, | ||
mandoc, | ||
groff, | ||
byacc, | ||
gencat, | ||
}: | ||
mkDerivation { | ||
pname = "bins"; | ||
path = "bin"; | ||
extraPaths = [ | ||
"sys/conf" | ||
"sys/sys/param.h" | ||
"contrib/sendmail" | ||
"contrib/tcsh" | ||
"usr.bin/printf" | ||
"lib/libsm" | ||
]; | ||
buildInputs = [ | ||
libjail | ||
libmd | ||
libnetbsd | ||
libcapsicum | ||
libcasper | ||
libelf | ||
libxo | ||
libncurses-tinfo | ||
libedit | ||
]; | ||
nativeBuildInputs = [ | ||
bsdSetupHook | ||
freebsdSetupHook | ||
makeMinimal | ||
install | ||
tsort | ||
lorder | ||
mandoc | ||
groff | ||
|
||
byacc | ||
gencat | ||
]; | ||
|
||
MK_TESTS = "no"; | ||
|
||
postPatch = '' | ||
sed -E -i -e '/#define\tBSD.*/d' $BSDSRCDIR/sys/sys/param.h | ||
sed -E -i -e '/^SYMLINKS.*/d' $BSDSRCDIR/bin/*/Makefile | ||
sed -E -i -e 's/mktemp -t ka/mktemp -t kaXXXXXX/' $BSDSRCDIR/bin/sh/mkbuiltins $BSDSRCDIR/bin/sh/mktokens | ||
''; | ||
|
||
preBuild = '' | ||
export NIX_CFLAGS_COMPILE="-I$BSDSRCDIR/sys $NIX_CFLAGS_COMPILE" | ||
make -C $BSDSRCDIR/lib/libsm $makeFlags | ||
make -C $BSDSRCDIR/bin/sh $makeFlags "CC=${pkgsBuildBuild.stdenv.cc}/bin/cc" CFLAGS="-D__unused= -D__printf0like\(a,b\)= -D__dead2=" ${ | ||
lib.optionalString (!stdenv.buildPlatform.isFreeBSD) "MK_PIE=no " | ||
}mkbuiltins mksyntax mktokens mknodes | ||
make -C $BSDSRCDIR/bin/csh $makeFlags "CC=${pkgsBuildBuild.stdenv.cc}/bin/cc" CFLAGS="-D__unused= -D__printf0like\(a,b\)= -D__dead2= -I$BSDSRCDIR/contrib/tcsh -I." ${ | ||
lib.optionalString (!stdenv.buildPlatform.isFreeBSD) "MK_PIE=no " | ||
}gethost | ||
''; | ||
|
||
preInstall = '' | ||
makeFlags="$makeFlags ROOTDIR=$out/root" | ||
''; | ||
|
||
outputs = [ | ||
"out" | ||
"man" | ||
"debug" | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
{ buildPackages, freebsd-lib }: | ||
|
||
# Wrap NetBSD's install | ||
# Wrap GNU coreutils' install | ||
# The -l flag causes a symlink instead of a copy to be installed, so | ||
# it is safe to discard during bootstrap since coreutils does not support it. | ||
|
||
buildPackages.writeShellScriptBin "boot-install" ( | ||
freebsd-lib.install-wrapper | ||
+ '' | ||
fixed_args=() | ||
while [[ ''${#args[0]} > 0 ]]; do | ||
case "''${args[0]}" in | ||
-l) | ||
args=("''${args[@]:2}") | ||
continue | ||
esac | ||
fixed_args+=("''${args[0]}") | ||
args=("''${args[@]:1}") | ||
done | ||
${buildPackages.netbsd.install}/bin/xinstall "''${args[@]}" | ||
${buildPackages.coreutils}/bin/install "''${fixed_args[@]}" | ||
'' | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ mkDerivation }: | ||
mkDerivation { | ||
path = "bin/cp"; | ||
|
||
extraPaths = [ "sys" ]; | ||
|
||
postPatch = '' | ||
substituteInPlace $BSDSRCDIR/bin/cp/Makefile --replace 'tests' "" | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
mkDerivation, | ||
libcapsicum, | ||
libcasper, | ||
}: | ||
mkDerivation { | ||
path = "usr.bin/iconv"; | ||
buildInputs = [ | ||
libcapsicum | ||
libcasper | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
}: | ||
|
||
mkDerivation { | ||
isStatic = true; | ||
noLibc = true; | ||
path = "include"; | ||
|
||
extraPaths = [ | ||
|
Oops, something went wrong.