Merge pull request #176264 from trofi/fix-fno-common-for-gcolor2

gcolor2: pull patch pending upstream inclusion for -fno-common toolch…
This commit is contained in:
Sergei Trofimovich 2022-06-11 11:21:26 +00:00 committed by GitHub
commit 41642735e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{lib, stdenv, fetchurl, gtk2, perlPackages, pkg-config } :
{lib, stdenv, fetchurl, fetchpatch, gtk2, perlPackages, pkg-config } :
let version = "0.4"; in
stdenv.mkDerivation {
@ -16,9 +16,18 @@ stdenv.mkDerivation {
'';
# from https://github.com/PhantomX/slackbuilds/tree/master/gcolor2/patches
patches = if stdenv.hostPlatform.system == "x86_64-linux" then
patches = (if stdenv.hostPlatform.system == "x86_64-linux" then
[ ./gcolor2-amd64.patch ] else
[ ];
[ ])
++ [
# Pull patch pending upstream inclusion for -fno-common toolchains:
# https://sourceforge.net/p/gcolor2/patches/8/
(fetchpatch {
name = "fno-common.patch";
url = "https://sourceforge.net/p/gcolor2/patches/8/attachment/0001-gcolor2-fix-build-on-gcc-10-fno-common.patch";
sha256 = "0187zc8as9g3d6mpm3isg87jfpryj0hajb4inwvii8gxrzbi5l5f";
})
];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ gtk2 ]