gtkpod: add -fcommon workaround

Workaround build failure on -fno-common toolchains like upstream
gcc-10. Otherwise build fails as:

    ld: .libs/autodetection.o:/build/gtkpod-2.1.5/libgtkpod/gtkpod_app_iface.h:248: multiple definition of
      `gtkpod_app'; .libs/gtkpod_app_iface.o:/build/gtkpod-2.1.5/libgtkpod/gtkpod_app_iface.h:248: first defined here
This commit is contained in:
Sergei Trofimovich 2022-05-14 18:15:05 +01:00
parent 197681059f
commit 8feed1d215

View file

@ -11,6 +11,9 @@ stdenv.mkDerivation rec {
url = "mirror://sourceforge/gtkpod/${pname}-${version}.tar.gz";
sha256 = "0xisrpx069f7bjkyc8vqxb4k0480jmx1wscqxr6cpq1qj6pchzd5";
};
postPatch = ''
sed -i 's/which/type -P/' scripts/*.sh
'';
nativeBuildInputs = [ pkg-config wrapGAppsHook intltool ];
buildInputs = [
@ -19,15 +22,17 @@ stdenv.mkDerivation rec {
gdl gnome.adwaita-icon-theme gnome.anjuta
] ++ (with perlPackages; [ perl XMLParser ]);
patchPhase = ''
sed -i 's/which/type -P/' scripts/*.sh
'';
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: .libs/autodetection.o:/build/gtkpod-2.1.5/libgtkpod/gtkpod_app_iface.h:248: multiple definition of
# `gtkpod_app'; .libs/gtkpod_app_iface.o:/build/gtkpod-2.1.5/libgtkpod/gtkpod_app_iface.h:248: first defined here
NIX_CFLAGS_COMPILE = "-fcommon";
enableParallelBuilding = true;
meta = with lib; {
description = "GTK Manager for an Apple ipod";
homepage = "http://gtkpod.sourceforge.net";
homepage = "https://sourceforge.net/projects/gtkpod/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = [ maintainers.skeidel ];