Commit a585c294 authored by langsjo's avatar langsjo
Browse files

brickstore: 2024.5.2 -> 2024.12.3

Update to its newest release
(https://github.com/rgriebl/brickstore/releases/tag/v2024.12.3) and
refactored changing the qcoro CMake file to use patches for relevant
parts
parent b22909a5
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -16,13 +16,13 @@ let
in
stdenv.mkDerivation (finalAttrs: {
  pname = "brickstore";
  version = "2024.5.2";
  version = "2024.12.3";

  src = fetchFromGitHub {
    owner = "rgriebl";
    repo = "brickstore";
    rev = "v${finalAttrs.version}";
    hash = "sha256-Bu9oNbZm3lx/CfYAReHyWe/kW+kaefDWeBtWLHOCORU=";
    hash = "sha256-4sxPplZ1t8sSfwTCeeBtfU4U0gcE9FROt6dKvkfyO6Q=";
    fetchSubmodules = true;
  };

@@ -45,16 +45,14 @@ stdenv.mkDerivation (finalAttrs: {
    tbb
  ];

  preConfigure = ''
    sed -i '/^)$/d' cmake/BuildQCoro.cmake
  patches = [
    ./qcoro-cmake.patch # Don't have CMake fetch qcoro from github, get it from nixpkgs
    ./qjsonvalue-include.patch # Add a required '#include <QtCore/QJsonValue>'
  ];

  # Since we get qcoro from nixpkgs instead, change the CMake file to reflect the right directory
  preConfigure = ''
    substituteInPlace cmake/BuildQCoro.cmake \
      --replace-fail 'FetchContent_Declare(' ' ' \
      --replace-fail '    qcoro' ' ' \
      --replace-fail '    GIT_REPOSITORY https://github.com/danvratil/qcoro.git' ' ' \
      --replace-fail '    GIT_TAG        v''${QCORO_VERSION}' ' ' \
      --replace-fail 'FetchContent_GetProperties(qcoro)' ' ' \
      --replace-fail 'FetchContent_Populate(qcoro)' ' ' \
      --replace-fail \
        'add_subdirectory(''${qcoro_SOURCE_DIR} ''${qcoro_BINARY_DIR} EXCLUDE_FROM_ALL)' \
        'add_subdirectory(${qcoro.src} ${qcoro}bin/qcoro)'
+20 −0
Original line number Diff line number Diff line
diff --git a/cmake/BuildQCoro.cmake b/cmake/BuildQCoro.cmake
index 941e813..41c88c6 100644
--- a/cmake/BuildQCoro.cmake
+++ b/cmake/BuildQCoro.cmake
@@ -14,14 +14,6 @@ if (BACKEND_ONLY)
     set(QCORO_WITH_QML OFF)
 endif()
 
-FetchContent_Declare(
-    qcoro
-    GIT_REPOSITORY https://github.com/danvratil/qcoro.git
-    GIT_TAG        v${QCORO_VERSION}
-    SOURCE_SUBDIR  "NeedManualAddSubDir" # make it possible to add_subdirectory below
-)
-
-FetchContent_MakeAvailable(qcoro)
 
 set(mll ${CMAKE_MESSAGE_LOG_LEVEL})
 if (NOT VERBOSE_FETCH)
+12 −0
Original line number Diff line number Diff line
diff --git a/src/bricklink/order.cpp b/src/bricklink/order.cpp
index 14426e5b..59856f0c 100755
--- a/src/bricklink/order.cpp
+++ b/src/bricklink/order.cpp
@@ -16,6 +16,7 @@
 #include <QtSql/QSqlError>
 #include <QtSql/QSqlQueryModel>
 #include <QtCore/QLoggingCategory>
+#include <QtCore/QJsonValue>
 
 #include "bricklink/core.h"
 #include "bricklink/io.h"