-
-
Notifications
You must be signed in to change notification settings - Fork 18k
freebsd: various improvements and new packages #315176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bcaca23
295c645
2785d4f
ba5f1b4
6120256
d78f853
95fa436
d792ea2
9858706
a753d38
ae993bd
7853602
892f600
ce0a5ce
2c41534
fe0a405
2bf3507
1bc374d
8d5db1d
41c2bba
ae7c4ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 |
| 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> |
| 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" |
| 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" | ||
| ]; | ||
| } | ||
| 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) | ||
Ericson2314 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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[@]}" | ||
| '' | ||
| ) | ||
| 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' "" | ||
| ''; | ||
| } |
| 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 | ||
| ]; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
| }: | ||
|
|
||
| mkDerivation { | ||
| isStatic = true; | ||
| noLibc = true; | ||
| path = "include"; | ||
|
|
||
| extraPaths = [ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Complicates things in what way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like I misremembered where this patch came from. This patch actually dates back to 0afe9d1, and is just being added back now after an accidental deletion. I'll update the commit message.