all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#72729] [PATCH] gnu: protobuf-c: Fix cross-compilation.
@ 2024-08-20  9:08 Zheng Junjie
  2024-08-23 14:44 ` bug#72729: " Zheng Junjie
  0 siblings, 1 reply; 2+ messages in thread
From: Zheng Junjie @ 2024-08-20  9:08 UTC (permalink / raw)
  To: 72729

* gnu/packages/protobuf.scm (protobuf-c): Fix cross-compilation.
[native-inputs]: When cross-compilation, add protobuf.
[arguments]<#:configure-flags>: When cross-compilation, Set PROTOC variable.

Change-Id: Idd660f526b7c90277cb4399997cdb7ce72e4f1c5
---
 gnu/packages/protobuf.scm | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/protobuf.scm b/gnu/packages/protobuf.scm
index d47b67fa61..b8679eff25 100644
--- a/gnu/packages/protobuf.scm
+++ b/gnu/packages/protobuf.scm
@@ -8,7 +8,7 @@
 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
-;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -262,7 +262,17 @@ (define-public protobuf-c
                 "17rk42r3gcc46c2svd1mxs542wnl4mi77a6klkhg6wl1a36zmi2c"))))
     (build-system gnu-build-system)
     (inputs (list protobuf))
-    (native-inputs (list pkg-config))
+    (native-inputs (append (if (%current-target-system)
+                               (list protobuf)
+                               '())
+                           (list pkg-config)))
+    (arguments (if (%current-target-system)
+                   (list #:configure-flags
+                         #~(list
+                            (string-append
+                             "PROTOC="
+                             (search-input-file %build-inputs "bin/protoc"))))
+                   (list)))
     (home-page "https://github.com/protobuf-c/protobuf-c")
     (synopsis "Protocol Buffers implementation in C")
     (description

base-commit: 7f14eda95f5f5694cb62decb1bcff46685b9c287
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#72729: [PATCH] gnu: protobuf-c: Fix cross-compilation.
  2024-08-20  9:08 [bug#72729] [PATCH] gnu: protobuf-c: Fix cross-compilation Zheng Junjie
@ 2024-08-23 14:44 ` Zheng Junjie
  0 siblings, 0 replies; 2+ messages in thread
From: Zheng Junjie @ 2024-08-23 14:44 UTC (permalink / raw)
  To: 72729-done

[-- Attachment #1: Type: text/plain, Size: 1980 bytes --]

Zheng Junjie <zhengjunjie@iscas.ac.cn> writes:

> * gnu/packages/protobuf.scm (protobuf-c): Fix cross-compilation.
> [native-inputs]: When cross-compilation, add protobuf.
> [arguments]<#:configure-flags>: When cross-compilation, Set PROTOC variable.
>
> Change-Id: Idd660f526b7c90277cb4399997cdb7ce72e4f1c5
> ---
>  gnu/packages/protobuf.scm | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/protobuf.scm b/gnu/packages/protobuf.scm
> index d47b67fa61..b8679eff25 100644
> --- a/gnu/packages/protobuf.scm
> +++ b/gnu/packages/protobuf.scm
> @@ -8,7 +8,7 @@
>  ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
>  ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
>  ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
> -;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
> +;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -262,7 +262,17 @@ (define-public protobuf-c
>                  "17rk42r3gcc46c2svd1mxs542wnl4mi77a6klkhg6wl1a36zmi2c"))))
>      (build-system gnu-build-system)
>      (inputs (list protobuf))
> -    (native-inputs (list pkg-config))
> +    (native-inputs (append (if (%current-target-system)
> +                               (list protobuf)
> +                               '())
> +                           (list pkg-config)))
> +    (arguments (if (%current-target-system)
> +                   (list #:configure-flags
> +                         #~(list
> +                            (string-append
> +                             "PROTOC="
> +                             (search-input-file %build-inputs "bin/protoc"))))
> +                   (list)))
>      (home-page "https://github.com/protobuf-c/protobuf-c")
>      (synopsis "Protocol Buffers implementation in C")
>      (description
>
> base-commit: 7f14eda95f5f5694cb62decb1bcff46685b9c287

push, close.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-23 15:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-20  9:08 [bug#72729] [PATCH] gnu: protobuf-c: Fix cross-compilation Zheng Junjie
2024-08-23 14:44 ` bug#72729: " Zheng Junjie

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.