From 4fc2a31536f4ee18b0540abc4435cbcc5dc9baed Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 21 May 2022 10:38:52 +0100 Subject: [PATCH] glabels: pull fix pending upstream inclusion for -fno-common toolchain support Without the change builds fails on upstream gcc-10 as: ld: label.o:src/template-history.h:31: multiple definition of `gl_template_history'; glabels-batch.o:src/template-history.h:31: first defined here ld: label-text.o:src/font-history.h:31: multiple definition of `gl_font_history'; glabels-batch.o:src/font-history.h:31: first defined here ld: font-history.o:src/font-history.h:31: multiple definition of `gl_font_history'; glabels-batch.o:src/font-history.h:31: first defined here ld: template-history.o:src/template-history.h:31: multiple definition of `gl_template_history'; glabels-batch.o:src/template-history.h:31: first defined here --- pkgs/applications/graphics/glabels/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/graphics/glabels/default.nix b/pkgs/applications/graphics/glabels/default.nix index fdf6831b974e..97fc3d1f8ff9 100644 --- a/pkgs/applications/graphics/glabels/default.nix +++ b/pkgs/applications/graphics/glabels/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, barcode, gnome, autoreconfHook +{ lib, stdenv, fetchurl, fetchpatch, barcode, gnome, autoreconfHook , gtk3, gtk-doc, libxml2, librsvg , libtool, libe-book, gsettings-desktop-schemas , intltool, itstool, makeWrapper, pkg-config, yelp-tools }: @@ -12,6 +12,16 @@ stdenv.mkDerivation rec { sha256 = "0f2rki8i27pkd9r0gz03cdl1g4vnmvp0j49nhxqn275vi8lmgr0q"; }; + patches = [ + # Pull patch pending upstream inclusion for -fno-common toolchain support: + # https://github.com/jimevins/glabels/pull/76 + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/jimevins/glabels/commit/f64e3f34e3631330fff2fb48ab271ff9c6160229.patch"; + sha256 = "13q6g4bxzvzwjnvzkvijds2b6yvc4xqbdwgqnwmj65ln6ngxz8sa"; + }) + ]; + nativeBuildInputs = [ autoreconfHook pkg-config makeWrapper intltool ]; buildInputs = [ barcode gtk3 gtk-doc yelp-tools