cdk: enable and fix parallel build

Without the change parallel build occasionally fails due to missing
dependency on generated headers:

Fixes the follow build failure on make -j16:

build flags: -j16 -l16 SHELL=/bin/bash
bash ./gen-scale.sh DSCALE DScale Double double ./include/gen-scale.h>include/dscale.h
bash ./gen-scale.sh FSCALE FScale Float float ./include/gen-scale.h>include/fscale.h
bash ./gen-scale.sh FSLIDER FSlider Float float ./include/gen-slider.h>include/fslider.h
bash ./gen-scale.sh SCALE Scale Int int ./include/gen-scale.h>include/scale.h
gcc -g -O2 -DHAVE_CONFIG_H -I./include -I./include -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -c cdkscreen.c
gcc -g -O2 -DHAVE_CONFIG_H -I./include -I./include -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -c debug.c
In file included from ./include/cdk_int.h:13,
from cdkscreen.c:1:
./include/cdk.h:321:10: fatal error: uscale.h: No such file or directory
321 | #include <uscale.h>
| ^~~~~~~~~~

+21
+8
pkgs/development/libraries/cdk/default.nix
··· 16 16 sha256 = "sha256-xBbJh793tPGycD18XkM7qUWMi+Uma/RUy/gBrYfnKTY="; 17 17 }; 18 18 19 + patches = [ 20 + # Proposed upstream as https://lists.gnu.org/archive/html/bug-ncurses/2021-12/msg00004.html 21 + ./parallel.patch 22 + ]; 23 + 24 + enableParallelBuilding = true; 25 + 19 26 meta = with lib; { 20 27 description = "Curses development kit"; 28 + homepage = "https://invisible-island.net/cdk/"; 21 29 license = licenses.bsdOriginal ; 22 30 maintainers = [ maintainers.raskin ]; 23 31 platforms = platforms.linux;
+13
pkgs/development/libraries/cdk/parallel.patch
··· 1 + --- a/Makefile.in 2 + +++ b/Makefile.in 3 + @@ -296,7 +296,9 @@ LIB_OBJECT = @LIB_OBJECT@ 4 + 5 + all sources :: $(AUTO_SRC) 6 + 7 + -$(OBJECTS) : include/cdk_config.h 8 + +# make sure we generate all headers before trying 9 + +# to build first source file. 10 + +$(OBJECTS) : $(MY_HDR) 11 + 12 + # 13 + # Standard library directive.