Merge pull request #173058 from trofi/workaround-fno-common-for-gtkpod

gtkpod: add -fcommon workaround
This commit is contained in:
Jörg Thalheim 2022-05-15 07:43:00 +01:00 committed by GitHub
commit 6185626f12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 ];