vpcs: fix build with glibc 2.26

Tracking issue: #31696

+20 -5
+6 -5
pkgs/applications/virtualization/vpcs/default.nix
··· 6 6 version = "0.8"; 7 7 8 8 src = fetchurl { 9 + name = "${name}.tar.bz2"; 9 10 url = "mirror://sourceforge/project/${pname}/${version}/${name}-src.tbz"; 10 11 sha256 = "14y9nflcyq486vvw0na0fkfmg5dac004qb332v4m5a0vaz8059nw"; 11 12 }; 12 13 13 - unpackCmd = "tar -xjf $src"; 14 + patches = [ ./vpcs-0.8-glibc-2.26.patch ]; 14 15 15 16 buildInputs = [ glibc.static ]; 16 17 17 - buildPhase = '' 18 + buildPhase = ''( 18 19 cd src 19 20 ./mk.sh ${buildPlatform.platform.kernelArch} 20 - ''; 21 + )''; 21 22 22 23 installPhase = '' 23 - cd .. 24 - 25 24 install -D -m555 src/vpcs $out/bin/vpcs; 26 25 install -D -m444 man/vpcs.1 $out/share/man/man1/vpcs.1; 27 26 ''; 27 + 28 + enableParallelBuilding = true; 28 29 29 30 meta = with stdenv.lib; { 30 31 description = "Virtual PC simulator";
+14
pkgs/applications/virtualization/vpcs/vpcs-0.8-glibc-2.26.patch
··· 1 + diff --git a/src/getopt.h b/src/getopt.h 2 + index 4394aa2..bf59e10 100644 3 + --- a/src/getopt.h 4 + +++ b/src/getopt.h 5 + @@ -49,9 +49,6 @@ extern int optind; 6 + extern int opterr; 7 + extern int optopt; 8 + 9 + -#ifndef FreeBSD 10 + -int getopt(int argc, char** argv, char* optstr); 11 + -#endif 12 + int arg_to_int(const char* arg, int min, int max, int defalt); 13 + 14 + #ifdef __cplusplus