Unverified Commit 088045a7 authored by Matteo Pacini's avatar Matteo Pacini Committed by GitHub
Browse files

lincity: fix darwin (#452710)

parents b8acebe3 53bae333
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
  stdenv,
  fetchurl,
  fetchpatch,
  gettext,
  libX11,
  libXext,
  xorgproto,
@@ -21,6 +22,8 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-e0y9Ef/Uy+15oKrbJfKxw04lqCARgvuyWc4vRQ/lAV0=";
  };

  nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ gettext ];

  buildInputs = [
    libICE
    libpng12
@@ -66,6 +69,10 @@ stdenv.mkDerivation (finalAttrs: {

  postPatch = ''
    sed -e 's@\[MPS_INFO_CHARS\]@[MPS_INFO_CHARS+8]@' -i mps.c -i mps.h

    ${lib.optionalString stdenv.hostPlatform.isDarwin ''
      sed -i '/\#include \"malloc.h\"/d' readpng.c
    ''}
  '';

  meta = {
@@ -74,7 +81,5 @@ stdenv.mkDerivation (finalAttrs: {
    license = lib.licenses.gpl2Plus;
    homepage = "https://sourceforge.net/projects/lincity";
    maintainers = with lib.maintainers; [ iedame ];
    # ../lcintl.h:14:10: fatal error: 'libintl.h' file not found
    broken = stdenv.hostPlatform.isDarwin;
  };
})