bsd: BSD_PATH rename to COMPONENT_PATH

@alyssais and I agreed this is clearer.
This commit is contained in:
John Ericson 2022-10-06 14:44:14 -04:00
parent e3137f73fd
commit 044163d6ef
2 changed files with 14 additions and 14 deletions

View file

@ -94,7 +94,7 @@ in lib.makeScopeWithSplicing
}.${stdenv'.hostPlatform.parsed.cpu.name}
or stdenv'.hostPlatform.parsed.cpu.name;
BSD_PATH = attrs.path;
COMPONENT_PATH = attrs.path;
makeFlags = defaultMakeFlags;
@ -126,7 +126,7 @@ in lib.makeScopeWithSplicing
postPatch = lib.optionalString (!stdenv'.hostPlatform.isNetBSD) ''
set +e
grep -Zlr "^__RCSID
^__BEGIN_DECLS" $BSD_PATH | xargs -0r grep -FLZ nbtool_config.h |
^__BEGIN_DECLS" $COMPONENT_PATH | xargs -0r grep -FLZ nbtool_config.h |
xargs -0tr sed -i '0,/^#/s//#include <nbtool_config.h>\n\0/'
set -e
'' + attrs.postPatch or "";
@ -146,7 +146,7 @@ in lib.makeScopeWithSplicing
skipIncludesPhase = true;
postPatch = ''
patchShebangs $BSD_PATH/configure
patchShebangs $COMPONENT_PATH/configure
${self.make.postPatch}
'';
@ -707,10 +707,10 @@ in lib.makeScopeWithSplicing
SHLIBINSTALLDIR = "$(out)/lib";
makeFlags = defaultMakeFlags ++ [ "LIBDO.terminfo=${self.libterminfo}/lib" ];
postPatch = ''
sed -i '1i #undef bool_t' $BSD_PATH/el.h
substituteInPlace $BSD_PATH/config.h \
sed -i '1i #undef bool_t' $COMPONENT_PATH/el.h
substituteInPlace $COMPONENT_PATH/config.h \
--replace "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" ""
substituteInPlace $BSD_PATH/readline/Makefile --replace /usr/include "$out/include"
substituteInPlace $COMPONENT_PATH/readline/Makefile --replace /usr/include "$out/include"
'';
NIX_CFLAGS_COMPILE = [
"-D__noinline="
@ -730,8 +730,8 @@ in lib.makeScopeWithSplicing
buildInputs = with self; compatIfNeeded;
SHLIBINSTALLDIR = "$(out)/lib";
postPatch = ''
substituteInPlace $BSD_PATH/term.c --replace /usr/share $out/share
substituteInPlace $BSD_PATH/setupterm.c \
substituteInPlace $COMPONENT_PATH/term.c --replace /usr/share $out/share
substituteInPlace $COMPONENT_PATH/setupterm.c \
--replace '#include <curses.h>' 'void use_env(bool);'
'';
postBuild = ''
@ -759,10 +759,10 @@ in lib.makeScopeWithSplicing
MKDOC = "no"; # missing vfontedpr
makeFlags = defaultMakeFlags ++ [ "LIBDO.terminfo=${self.libterminfo}/lib" ];
postPatch = lib.optionalString (!stdenv.isDarwin) ''
substituteInPlace $BSD_PATH/printw.c \
substituteInPlace $COMPONENT_PATH/printw.c \
--replace "funopen(win, NULL, __winwrite, NULL, NULL)" NULL \
--replace "__strong_alias(vwprintw, vw_printw)" 'extern int vwprintw(WINDOW*, const char*, va_list) __attribute__ ((alias ("vw_printw")));'
substituteInPlace $BSD_PATH/scanw.c \
substituteInPlace $COMPONENT_PATH/scanw.c \
--replace "__strong_alias(vwscanw, vw_scanw)" 'extern int vwscanw(WINDOW*, const char*, va_list) __attribute__ ((alias ("vw_scanw")));'
'';
};
@ -987,7 +987,7 @@ in lib.makeScopeWithSplicing
# man0 generates a man.pdf using ps2pdf, but doesn't install it later,
# so we can avoid the dependency on ghostscript
postPatch = ''
substituteInPlace $BSD_PATH/man0/Makefile --replace "ps2pdf" "echo noop "
substituteInPlace $COMPONENT_PATH/man0/Makefile --replace "ps2pdf" "echo noop "
'';
makeFlags = defaultMakeFlags ++ [
"FILESDIR=$(out)/share"

View file

@ -66,9 +66,9 @@ setBSDSourceDir() {
}
cdBSDPath() {
if [ -d "$BSD_PATH" ]
then sourceRoot=$sourceRoot/$BSD_PATH
cd $BSD_PATH
if [ -d "$COMPONENT_PATH" ]
then sourceRoot=$sourceRoot/$COMPONENT_PATH
cd $COMPONENT_PATH
fi
}