Merge pull request #43759 from dtzWill/fix/gpm-musl

gpm: patch to fix w/musl, good for general use
This commit is contained in:
Will Dietz 2018-07-18 23:02:37 -05:00 committed by GitHub
commit ac551299e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, automake, autoconf, libtool, flex, bison, texinfo
{ stdenv, fetchurl, automake, autoconf, libtool, flex, bison, texinfo, fetchpatch
# Optional Dependencies
, ncurses ? null
@ -13,7 +13,6 @@ stdenv.mkDerivation rec {
};
postPatch = ''
sed '1i#include <sys/types.h>' -i src/daemon/open_console.c
substituteInPlace src/prog/gpm-root.y --replace __sigemptyset sigemptyset
'';
@ -22,6 +21,22 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ];
patches = [
# musl compat patches, safe everywhere
(fetchpatch {
url = "https://raw.githubusercontent.com/gentoo/musl/5aed405d87dfa92a5cab1596f898e9dea07169b8/sys-libs/gpm/files/gpm-1.20.7-musl-missing-headers.patch";
sha256 = "1g338m6j1sba84wlqp1r6rpabj5nm6ki577hjalg46czg0lfp20h";
})
# Touches same code as glibc fix in postPatch above, but on the non-glibc route
(fetchpatch {
url = "https://raw.githubusercontent.com/gentoo/musl/5aed405d87dfa92a5cab1596f898e9dea07169b8/sys-libs/gpm/files/gpm-1.20.7-musl-portable-sigaction.patch";
sha256 = "0hfdqm9977hd5dpzn05y0a6jbj55w1kp4hd9gyzmg9wslmxni4rg";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/gentoo/musl/5aed405d87dfa92a5cab1596f898e9dea07169b8/sys-libs/gpm/files/gpm-1.20.7-sysmacros.patch";
sha256 = "0lg4l9phvy2n8gy17qsn6zn0qq52vm8g01pgq5kqpr8sd3fb21c2";
})
];
preConfigure = ''
./autogen.sh
'';