mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-18 10:04:08 +00:00
freebsd.{libncurses,libncurses-tinfo}: init
These packages are preferred over libncurses proper for some in-tree FreeBSD packages.
This commit is contained in:
parent
61d6d34b42
commit
3360a8c409
@ -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"
|
15
pkgs/os-specific/bsd/freebsd/pkgs/libncurses-tinfo.nix
Normal file
15
pkgs/os-specific/bsd/freebsd/pkgs/libncurses-tinfo.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{ mkDerivation, pkgsBuildBuild }:
|
||||
mkDerivation {
|
||||
path = "lib/ncurses/tinfo";
|
||||
extraPaths = [
|
||||
"lib/ncurses"
|
||||
"contrib/ncurses"
|
||||
"lib/Makefile.inc"
|
||||
];
|
||||
CC_HOST = "${pkgsBuildBuild.stdenv.cc}/bin/cc";
|
||||
MK_TESTS = "no";
|
||||
preBuild = ''
|
||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -D_VA_LIST -D_VA_LIST_DECLARED -Dva_list=__builtin_va_list -D_SIZE_T -D_WCHAR_T"
|
||||
make $makeFlags "CFLAGS=-D_VA_LIST -D_VA_LIST_DECLARED -Dva_list=__builtin_va_list -I$BSDSRCDIR/contrib/ncurses/ncurses -I$BSDSRCDIR/contrib/ncurses/include -I." ncurses_dll.h make_hash make_keys
|
||||
'';
|
||||
}
|
25
pkgs/os-specific/bsd/freebsd/pkgs/libncurses.nix
Normal file
25
pkgs/os-specific/bsd/freebsd/pkgs/libncurses.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
lib,
|
||||
versionData,
|
||||
mkDerivation,
|
||||
libncurses-tinfo,
|
||||
...
|
||||
}:
|
||||
mkDerivation {
|
||||
path = "lib/ncurses/ncurses";
|
||||
extraPaths = [
|
||||
"lib/ncurses"
|
||||
"contrib/ncurses"
|
||||
"lib/Makefile.inc"
|
||||
];
|
||||
MK_TESTS = "no";
|
||||
preBuild = lib.optionalString (versionData.major == 14) ''
|
||||
make -C ../tinfo $makeFlags curses.h ncurses_dll.h ncurses_def.h
|
||||
'';
|
||||
buildInputs = lib.optionals (versionData.major == 14) [ libncurses-tinfo ];
|
||||
|
||||
# some packages depend on libncursesw.so.8
|
||||
postInstall = ''
|
||||
ln -s $out/lib/libncursesw.so.9 $out/lib/libncursesw.so.8
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user