Unverified Commit 221a025b authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

pslib: fix build (#455608)

parents 355d9864 a5f9102d
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 58a5b45..b41e6a3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,3 +1,5 @@
+cmake_minimum_required(VERSION 3.10)
+
 PROJECT(pslib C)
 option(ENABLE_BMP   "Build with BMP support" ON)

@@ -73,7 +75,6 @@ INCLUDE(CheckFunctionExists)
 INCLUDE(TestBigEndian)
 test_big_endian(WORDS_BIGENDIAN)

-SUBDIRS( src )
 SET(SOURCES
        src/pslib.c
        src/ps_memory.c
 No newline at end of file
+4 −4
Original line number Diff line number Diff line
@@ -21,6 +21,10 @@ stdenv.mkDerivation rec {
    sha256 = "sha256-gaWNvBLuUUy0o+HWCOyG6KmzxDrYCY6PV3WbA/jjH64=";
  };

  patches = [
    ./cmake4.patch
  ];

  nativeBuildInputs = [
    cmake
    pkg-config
@@ -33,10 +37,6 @@ stdenv.mkDerivation rec {
    libtiff
  ];

  env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
    NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
  };

  doCheck = true;

  outputs = [
+9 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  stdenv,
  fetchFromGitHub,
  fetchpatch,
  cmake,
  wrapGAppsHook3,
  readline,
@@ -121,6 +122,14 @@ stdenv.mkDerivation (finalAttrs: {
    fetchSubmodules = true;
  };

  patches = [
    (fetchpatch {
      url = "https://github.com/gnudatalanguage/gdl/commit/b648a63c5070f38e90167f858a79ba6f01dad1d3.patch?full_index=1";
      includes = [ "CMakeLists.txt" ];
      hash = "sha256-lYtAstI21Up4RArf6pXnjiTwJ3Omoisw43Ih1H2Wc0s=";
    })
  ];

  postPatch = ''
    substituteInPlace CMakeLists.txt \
      --replace-fail 'FATAL_ERROR "The src' 'WARNING "The src' \