gcolor2: pull patch pending upstream inclusion for -fno-common toolchains
Without the change build on upstream gcc-10 fails as: ld: callbacks.o:src/callbacks.h:44: multiple definition of `gcolor2'; main.o:src/callbacks.h:44: first defined here ld: callbacks.o:src/callbacks.h:46: multiple definition of `colorvalue'; main.o:src/callbacks.h:46: first defined here ld: callbacks.o:src/callbacks.h:45: multiple definition of `menu'; main.o:src/callbacks.h:45: first defined here
This commit is contained in:
parent
4ae74bbc94
commit
72ed5665a2
@ -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 ]
|
||||
|
Loading…
Reference in New Issue
Block a user