unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#70999: Meson-build system fails to install license files
@ 2024-05-17  9:26 Dariqq
  2024-05-25  9:37 ` Ludovic Courtès
  2024-05-25 14:02 ` bug#70999: [PATCH] build-system/meson: Add #:out-of-source? argument to build system Dariqq
  0 siblings, 2 replies; 3+ messages in thread
From: Dariqq @ 2024-05-17  9:26 UTC (permalink / raw)
  To: 70999

Hi Guix,

I was trying to update a package using meson build system to its newest 
version and noticed in the build log

starting phase `install-license-files'
installing 0 license files from '.'
phase `install-license-files' succeeded after 0.0 seconds

Also other packages built using meson don't seem to have license files 
in the output.

I think the problem is that the "." directory is the "build" directory 
and not the source directory because in  meson configure phase we change 
directory to the build-dir.

The install-license-files function has an argument for specifying 
out-of-source builds and calling it with that set to #t seems to be able 
to find license files in the source directory in my limited testing.

Another option would be to specify the build dir in the ninja 
invocations without changing to it.

As meson only supports out-of-source builds I think this should be 
changed though I am unsure how to best do this.




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

* bug#70999: Meson-build system fails to install license files
  2024-05-17  9:26 bug#70999: Meson-build system fails to install license files Dariqq
@ 2024-05-25  9:37 ` Ludovic Courtès
  2024-05-25 14:02 ` bug#70999: [PATCH] build-system/meson: Add #:out-of-source? argument to build system Dariqq
  1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2024-05-25  9:37 UTC (permalink / raw)
  To: Dariqq; +Cc: 70999

Hi Dariqq,

Dariqq <dariqq@posteo.net> skribis:

> The install-license-files function has an argument for specifying
> out-of-source builds and calling it with that set to #t seems to be
> able to find license files in the source directory in my limited
> testing.

Yes, ‘meson-build-system’ should pass #:out-of-source? #t exactly like
‘cmake-build-system’ does.  That should solve the problem.

Thanks,
Ludo’.




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

* bug#70999: [PATCH] build-system/meson: Add #:out-of-source? argument to build system.
  2024-05-17  9:26 bug#70999: Meson-build system fails to install license files Dariqq
  2024-05-25  9:37 ` Ludovic Courtès
@ 2024-05-25 14:02 ` Dariqq
  1 sibling, 0 replies; 3+ messages in thread
From: Dariqq @ 2024-05-25 14:02 UTC (permalink / raw)
  To: 70999; +Cc: Dariqq, ludo

Meson currently supports only out-of-source builds. Add the argument out-of-source? with default to #t such that the install-license-files phase searches for the license files in the source directory.

* guix/build-system/meson.scm (meson-build): Add out-of-source? argument.
(meson-cross-build): Likewise.

Change-Id: Ib59d9d93b34fd567f05f5f9a10293f6ab924e399
---
I have tested this with the tio package (both natively building and cross compiling) and seems to work. This will cause a lot of rebuild!
For the position of the argument I've put it above build-type to match the order in cmake-build-system.

 guix/build-system/meson.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm
index bf9ca15ecc..6c085fa1fe 100644
--- a/guix/build-system/meson.scm
+++ b/guix/build-system/meson.scm
@@ -176,6 +176,7 @@ (define* (meson-build name inputs
                       (outputs '("out"))
                       (configure-flags ''())
                       (search-paths '())
+                      (out-of-source? #t)
                       (build-type "debugoptimized")
                       (tests? #t)
                       (test-options ''())
@@ -225,6 +226,7 @@ (define* (meson-build name inputs
                              #$(if (pair? configure-flags)
                                    (sexp->gexp configure-flags)
                                    configure-flags)
+                             #:out-of-source? #$out-of-source?
                              #:build-type #$build-type
                              #:tests? #$tests?
                              #:test-options #$(sexp->gexp test-options)
@@ -257,7 +259,7 @@ (define* (meson-cross-build name
                             (configure-flags ''())
                             (search-paths '())
                             (native-search-paths '())
-
+                            (out-of-source? #t)
                             (build-type "debugoptimized")
                             (tests? #f)
                             (test-options ''())
@@ -338,6 +340,7 @@ (define* (meson-cross-build name
                                            ,@#$(if (pair? configure-flags)
                                                    (sexp->gexp configure-flags)
                                                    configure-flags))
+                       #:out-of-source? #$out-of-source?
                        #:build-type #$build-type
                        #:tests? #$tests?
                        #:test-options #$(sexp->gexp test-options)

base-commit: 9756d9d6345fb142944261174453ab0a597cc2e7
-- 
2.41.0





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

end of thread, other threads:[~2024-05-25 14:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-17  9:26 bug#70999: Meson-build system fails to install license files Dariqq
2024-05-25  9:37 ` Ludovic Courtès
2024-05-25 14:02 ` bug#70999: [PATCH] build-system/meson: Add #:out-of-source? argument to build system Dariqq

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).