From d03e27da962797cc9f4a4dc4e1b51361abf3f989 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Thu, 21 Mar 2024 22:28:02 +0100 Subject: antara-gaming-sdk: include loguru as dependency --- packages/komodo/antara-gaming-sdk.scm | 43 +++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 7 deletions(-) (limited to 'packages/komodo/antara-gaming-sdk.scm') diff --git a/packages/komodo/antara-gaming-sdk.scm b/packages/komodo/antara-gaming-sdk.scm index 8f2137c..61ddfea 100644 --- a/packages/komodo/antara-gaming-sdk.scm +++ b/packages/komodo/antara-gaming-sdk.scm @@ -5,6 +5,7 @@ #:use-module (gnu packages pretty-print) #:use-module (guix build utils) #:use-module (guix build-system cmake) + #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module ((guix licenses) @@ -28,18 +29,45 @@ (define antara-gaming-sdk-version "1.1.0-alpha") +(define build-path-prefix "../build/_deps/") + (define find-entt "find_package(EnTT)\n") (define find-fmt "find_package(fmt)\n") +(define loguru-hash + (content-hash "1lig80s99kk5yjs7yn5nfm7jfz8982hink5ff7pzi4afkab2hbcd")) + +(define loguru-src "loguru-src/") + +;;; ABSTRACTION LAYER -5 + +(define build-path-loguru + (string-append build-path-prefix loguru-src)) + +(define loguru-origin + (origin (uri "https://github.com/emilk/loguru/archive/v2.1.0.zip") + (method url-fetch) + (hash loguru-hash))) + ;;; ABSTRACTION LAYER -4 +(define download-loguru + `(string-append "3.14)\n\n" "file(ARCHIVE_EXTRACT INPUT " ,loguru-origin " " + "DESTINATION " ,build-path-loguru ")\n" + "file(COPY " ,build-path-loguru "/loguru-2.1.0/ " + "DESTINATION " ,build-path-loguru ")\n")) + (define find-package-calls (string-append "Dependancies\n" "\n" find-fmt find-entt "\n")) ;;; ABSTRACTION LAYER -3 -(define find-more-packages +(define get-loguru + `(substitute* "CMakeLists.txt" + (("3.14\\)") ,download-loguru))) + +(define get-more-packages `(substitute* "cmake/dependencies.cmake" (("Dependancies") ,find-package-calls))) @@ -51,18 +79,19 @@ ;;; ABSTRACTION LAYER -2 -(define patch-cmake +(define supplement-libs `(lambda _ - ,find-more-packages + ,get-loguru + ,get-more-packages ,rename-doom-targets)) ;;; ABSTRACTION LAYER -1 (define antara-gaming-sdk-phases - `(modify-phases %standard-phases - (add-after 'unpack - 'patch-cmake - ,patch-cmake))) + #~ (modify-phases %standard-phases + (add-after 'unpack + 'supplement-libs + #+ supplement-libs))) (define antara-gaming-sdk-git-reference (git-reference (url antara-gaming-sdk-github) -- cgit v1.2.3