Merge pull request #147728 from trofi/fix-libviper-for-ncurses-6.3

This commit is contained in:
Sandro 2021-11-29 20:22:52 +01:00 committed by GitHub
commit 24d158cc2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,8 +7,18 @@ stdenv.mkDerivation rec {
sha256 = "1jvm7wdgw6ixyhl0pcfr9lnr9g6sg6whyrs9ihjiz0agvqrgvxwc";
};
patchPhase = ''
postPatch = ''
sed -i -e s@/usr/local@$out@ -e /ldconfig/d -e '/cd vdk/d' Makefile
# Fix pending upstream inclusion for ncurses-6.3 support:
# https://github.com/TragicWarrior/libviper/pull/16
# Not applied as it due to unrelated code changes in context.
substituteInPlace viper_msgbox.c --replace \
'mvwprintw(window,height-3,tmp,prompt);' \
'mvwprintw(window,height-3,tmp,"%s",prompt);'
substituteInPlace w_decorate.c --replace \
'mvwprintw(window,0,x,title);' \
'mvwprintw(window,0,x,"%s",title);'
'';
preInstall = ''