Unverified Commit ee75d2f1 authored by Philip Taron's avatar Philip Taron Committed by GitHub
Browse files

various: fix build with boost 1.89 (#505830)

parents 80b2c62d b7dd6ebb
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -19,6 +19,13 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-BQg2rVYe1wJOX7YnvgDVpmN6hwBJZKH0fxm+8HC8bvY=";
  };

  # boost 1.89 removed the boost_system stub library
  postPatch = ''
    substituteInPlace CMakeLists.txt --replace-fail \
      'FIND_PACKAGE(Boost REQUIRED COMPONENTS system filesystem iostreams program_options unit_test_framework)' \
      'FIND_PACKAGE(Boost REQUIRED COMPONENTS filesystem iostreams program_options unit_test_framework)'
  '';

  nativeBuildInputs = [
    cmake
  ];
+5 −0
Original line number Diff line number Diff line
@@ -27,6 +27,11 @@ stdenv.mkDerivation (finalAttrs: {
    substituteInPlace CMakeLists.txt --replace-fail \
      "cmake_minimum_required(VERSION 3.2.2)" \
      "cmake_minimum_required(VERSION 3.10)"

    # boost 1.89 removed the boost_system stub library
    substituteInPlace CMakeLists.txt --replace-fail \
      'list(APPEND BOOST_COMPONENTS thread date_time chrono filesystem system program_options)' \
      'list(APPEND BOOST_COMPONENTS thread date_time chrono filesystem program_options)'
  '';

  env.NIX_CFLAGS_COMPILE = "-Wno-error";
+5 −0
Original line number Diff line number Diff line
@@ -24,6 +24,11 @@ stdenv.mkDerivation (finalAttrs: {

  postPatch = ''
    sed -i '1i #include <algorithm>' src/fileshelter/ui/ShareCreateFormView.cpp

    # boost 1.89 removed the boost_system stub library
    substituteInPlace CMakeLists.txt --replace-fail \
      'find_package(Boost REQUIRED COMPONENTS system program_options)' \
      'find_package(Boost REQUIRED COMPONENTS program_options)'
  '';

  enableParallelBuilding = true;
+8 −0
Original line number Diff line number Diff line
@@ -44,6 +44,14 @@ stdenv.mkDerivation (finalAttrs: {

    substituteInPlace CMakeLists.txt \
      --replace-fail "cmake_minimum_required (VERSION 3.1)" "cmake_minimum_required(VERSION 3.10)"

    # boost 1.89 removed the boost_system stub library
    substituteInPlace \
      src/general/CMakeLists.txt \
      src/test/CMakeLists.txt \
      src/gripgen/CMakeLists.txt \
      src/grip/CMakeLists.txt \
      --replace-fail ' system' ""
  '';

  meta = {
+5 −0
Original line number Diff line number Diff line
@@ -37,6 +37,11 @@ stdenv.mkDerivation (finalAttrs: {
  postPatch = ''
    substituteInPlace CMakeLists.txt \
      --replace-fail 'cmake_minimum_required(VERSION 2.8)' 'cmake_minimum_required(VERSION 3.10)'

    # boost 1.89 removed the boost_system stub library
    substituteInPlace libgrive/CMakeLists.txt --replace-fail \
      'find_package(Boost 1.40.0 COMPONENTS program_options filesystem unit_test_framework regex system REQUIRED)' \
      'find_package(Boost 1.40.0 COMPONENTS program_options filesystem unit_test_framework regex REQUIRED)'
  '';

  nativeBuildInputs = [
Loading