Unverified Commit 7b443cf2 authored by Masum Reza's avatar Masum Reza Committed by GitHub
Browse files

Fix cmake builds #445447 (#451892)

parents da929ff6 ee13958a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -20,6 +20,12 @@ stdenv.mkDerivation (finalAttrs: {
    sha256 = "0ipqna7a9mxqm0fl9ggwhbc7i9yxz3jfyi0w3dymjp40v7jw1n20";
  };

  postPatch = ''
    substituteInPlace CMakeLists.txt --replace-fail \
      'cmake_minimum_required(VERSION 2.8)' \
      'cmake_minimum_required(VERSION 3.5)'
  '';

  nativeBuildInputs = [
    cmake
    pkg-config
+3 −1
Original line number Diff line number Diff line
@@ -28,7 +28,9 @@ stdenv.mkDerivation (finalAttrs: {
  # TODO: check with other distros and report upstream
  postPatch = ''
    substituteInPlace CMakeLists.txt \
      --replace "-m64" ""
      --replace-fail "-m64" "" \
      --replace-fail 'cmake_minimum_required(VERSION 3.1 FATAL_ERROR)' \
        'cmake_minimum_required(VERSION 3.5 FATAL_ERROR)'
  '';

  nativeBuildInputs = [ cmake ];
+6 −0
Original line number Diff line number Diff line
@@ -23,6 +23,12 @@ stdenv.mkDerivation rec {

  buildInputs = [ zlib ];

  postPatch = ''
    substituteInPlace CMakeLists.txt --replace-fail \
      'cmake_minimum_required(VERSION 2.8.12)' \
      'cmake_minimum_required(VERSION 3.5)'
  '';

  passthru.tests.version = testers.testVersion {
    package = bustools;
    command = "bustools version";
+3 −0
Original line number Diff line number Diff line
@@ -28,6 +28,9 @@ stdenv.mkDerivation rec {

  postPatch = ''
    sed -i '/-m64/d;/-m32/d' CMakeLists.txt
    substituteInPlace CMakeLists.txt --replace-fail \
      'cmake_minimum_required( VERSION 2.6 )' \
      'cmake_minimum_required( VERSION 3.5 ) '
  '';

  nativeBuildInputs = [ cmake ];
+4 −1
Original line number Diff line number Diff line
@@ -67,7 +67,10 @@ stdenv.mkDerivation (finalAttrs: {
    substituteInPlace CMakeLists.txt \
      --replace-fail \
        "find_package(Qt5 REQUIRED COMPONENTS Core Widgets Xml" \
        "find_package(Qt5 REQUIRED COMPONENTS Core Widgets Xml Multimedia"
        "find_package(Qt5 REQUIRED COMPONENTS Core Widgets Xml Multimedia" \
      --replace-fail \
        "cmake_minimum_required(VERSION 3.0.2)" \
        "cmake_minimum_required(VERSION 3.5)"
    grep -rl 'qwt' . | xargs sed -i 's@<qwt/qwt_slider.h>@<qwt_slider.h>@g'
  '';

Loading