lol

pkgsMusl.directfb: unbreak (#228345)

authored by

Yureka and committed by
GitHub
2a75232c e494bbff

+20 -4
+20 -4
pkgs/development/libraries/directfb/default.nix
··· 23 23 url = "https://github.com/deniskropp/DirectFB/commit/3a236241bbec3f15b012b6f0dbe94353d8094557.patch"; 24 24 sha256 = "0rj3gv0zlb225sqjz04p4yagy4xacf3210aa8vra8i1f0fv0w4kw"; 25 25 }) 26 + 27 + # Fixes for build of `pkgsMusl.directfb`; applied everywhere to prevent patchrot 28 + (fetchpatch { 29 + url = "https://git.alpinelinux.org/aports/plain/community/directfb/0001-directfb-fix-musl-compile.patch?id=f8158258493fc0c3eb5de2302e40f4bc44ecfb09"; 30 + sha256 = "sha256-hmwzbaXu30ZkAqUn1NmvtlJkM6ctddKcO4hxh+1LSS4="; 31 + }) 32 + (fetchpatch { 33 + url = "https://git.alpinelinux.org/aports/plain/community/directfb/0002-Fix-musl-PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP-comp.patch?id=f8158258493fc0c3eb5de2302e40f4bc44ecfb09"; 34 + sha256 = "sha256-j3+mcP6hV9LKuba1GOdcM1cZfmXuJtRgx4vE484jIns="; 35 + }) 26 36 ]; 27 37 28 38 postPatch = '' ··· 31 41 # if switching to cmake then a similar substitution has to be done 32 42 substituteInPlace src/core/Makefile.am \ 33 43 --replace '`date -u "+%Y-%m-%d %H:%M"`' "`date -u \"+%Y-%m-%d %H:%M\" --date="@''${SOURCE_DATE_EPOCH}"`" 44 + '' + lib.optionalString stdenv.hostPlatform.isMusl '' 45 + # Specifically patch out two drivers that have build errors with musl libc, 46 + # while leaving the rest of the default selection enabled 47 + substituteInPlace configure.in \ 48 + --replace checkfor_lirc={yes,no} \ 49 + --replace checkfor_matrox={yes,no} 34 50 ''; 35 51 36 52 nativeBuildInputs = [ autoreconfHook perl pkg-config flux ]; ··· 53 69 "--enable-mmx" 54 70 "--enable-sse" 55 71 "--with-software" 56 - "--with-smooth-scaling" 57 - ] ++ lib.optional enableX11 "--enable-x11"; 72 + ] 73 + ++ lib.optional (!stdenv.hostPlatform.isMusl) "--with-smooth-scaling" 74 + ++ lib.optional enableX11 "--enable-x11" 75 + ; 58 76 59 77 # Disable parallel building as parallel builds fail due to incomplete 60 78 # depends between autogenerated CoreSlave.h and it's include sites: ··· 83 101 license = licenses.lgpl21; 84 102 platforms = platforms.linux; 85 103 maintainers = [ maintainers.bjornfor ]; 86 - broken = stdenv.hostPlatform.isMusl; # Broken at 2022-02-25 87 - # See https://github.com/NixOS/nixpkgs/issues/218274 88 104 }; 89 105 }