From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45285) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtFiK-00007W-79 for guix-patches@gnu.org; Sat, 16 Sep 2017 12:13:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtFiI-0007eZ-Ky for guix-patches@gnu.org; Sat, 16 Sep 2017 12:13:04 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:35502) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dtFiI-0007eE-Gb for guix-patches@gnu.org; Sat, 16 Sep 2017 12:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dtFiI-000656-7k for guix-patches@gnu.org; Sat, 16 Sep 2017 12:13:02 -0400 Subject: bug#28444: [PATCH 3/3] build-system: Add 'meson-build-system'. Resent-To: guix-patches@gnu.org Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170913125003.13313-1-petermikkelsen10@gmail.com> <20170913125003.13313-3-petermikkelsen10@gmail.com> <87a81vllgk.fsf@gnu.org> Date: Sat, 16 Sep 2017 18:11:59 +0200 In-Reply-To: (Peter Mikkelsen's message of "Sat, 16 Sep 2017 13:08:37 +0200") Message-ID: <87ingik4hc.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Peter Mikkelsen Cc: 28444-done@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Peter, Peter Mikkelsen skribis: [...] >> According to this description, half of it corresponds to the >> =E2=80=98validate-runpath=E2=80=99 phase, no? > > To my understanding 'validate-runpath' just checks and complains, but > this phase checks if it can find any dependencies in directories that > are local to the package, and if it can, it adds them to the runpath. > I have tried to update the description :) I see. Out of curiosity, which libraries did you find to be present in RUNPATH but not in NEEDED? I=E2=80=99d consider it a Meson bug (or a bug in how the package uses Meson= ) if test libraries are passed as -l when linking non-test binaries. At any rate, we should implement =E2=80=98shrink-runpath=E2=80=99 in (guix = build gremlin) someday! > From 8185c2a154c7473d3b50351246cc83b792ec6a57 Mon Sep 17 00:00:00 2001 > From: Peter Mikkelsen > Date: Wed, 13 Sep 2017 14:37:39 +0200 > Subject: [PATCH] build-system: Add 'meson-build-system'. > > * Makefile.am (MODULES): Add 'guix/build-system/meson.scm' and > 'guix/build/meson-build-system.scm'. > * guix/build-system/meson.scm: New file. > * guix/build/meson-build-system.scm: New file. > * doc/guix.texi (Build Systems): Add 'meson-build-system'. Pushed with the changes below. Thank you! Now to upgrade GNOME? :-) Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/doc/guix.texi b/doc/guix.texi index 1fee21314..1356a357c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -3814,16 +3814,16 @@ locations in the output directory. @defvr {Scheme Variable} meson-build-system This variable is exported by @code{(guix build-system meson)}. It implements the build procedure for packages that use -@url{http://mesonbuild.com, meson} as their build system. +@url{http://mesonbuild.com, Meson} as their build system. -It adds both @code{meson} and @code{ninja} to the set of inputs, and they -can be changed with the parameters @code{#:meson} and @code{#:ninja} if needed. -The default @code{meson} is @code{meson-for-build} which is special because -it doesn't clear the @code{RUNPATH} of binaries and libraries when they are -installed. +It adds both Meson and @uref{https://ninja-build.org/, Ninja} to the set +of inputs, and they can be changed with the parameters @code{#:meson} +and @code{#:ninja} if needed. The default Meson is +@code{meson-for-build}, which is special because it doesn't clear the +@code{RUNPATH} of binaries and libraries when they are installed. -The build-system is an extension of @var{gnu-build-system}, but with the -following phases changed to some specific for meson: +This build system is an extension of @var{gnu-build-system}, but with the +following phases changed to some specific for Meson: @table @code @@ -3838,7 +3838,7 @@ this can be changed with @code{#:parallel-build?}. @item check The phase runs @code{ninja} with the target specified in @code{#:test-target}, -which is @var{``test''} by default. +which is @code{"test"} by default. @item install The phase runs @code{ninja install} and can not be changed. @@ -3857,11 +3857,11 @@ when they are build, but often that is not the @code{RUNPATH} we want. Therefor it is also shrinked to the minimum needed by the program. @item glib-or-gtk-wrap -This phase is the phase provided by @var{glib-or-gtk-build-system}, and it +This phase is the phase provided by @code{glib-or-gtk-build-system}, and it is not enabled by default. It can be enabled with @code{#:glib-or-gtk?}. @item glib-or-gtk-compile-schemas -This phase is the phase provided by @var{glib-or-gtk-build-system}, and it +This phase is the phase provided by @code{glib-or-gtk-build-system}, and it is not enabled by default. It can be enabled with @code{#:glib-or-gtk?}. @end table @end defvr diff --git a/guix/build/meson-build-system.scm b/guix/build/meson-build-system.scm index 51542974e..2b92240c5 100644 --- a/guix/build/meson-build-system.scm +++ b/guix/build/meson-build-system.scm @@ -27,7 +27,6 @@ #:use-module (rnrs io ports) #:use-module (srfi srfi-1) #:export (%standard-phases - %glib-or-gtk-phases meson-build)) ;; Commentary: @@ -61,8 +60,10 @@ (define* (check #:key test-target parallel-tests? tests? #:allow-other-keys) - (unless parallel-tests? - (setenv "MESON_TESTTHREADS" "1")) + (setenv "MESON_TESTTHREADS" + (if parallel-tests? + (number->string (parallel-job-count)) + "1")) (if tests? (zero? (system* "ninja" test-target)) (begin @@ -114,7 +115,7 @@ for example libraries only needed for the tests." (let* ((elf-dirnames (map (lambda (subdir) (string-append directory "/" subdir)) elf-directories)) - (excisting-elf-dirs (filter (lambda (dir) + (existing-elf-dirs (filter (lambda (dir) (and (file-exists? dir) (file-is-directory? dir))) elf-dirnames)) @@ -122,7 +123,7 @@ for example libraries only needed for the tests." (elf-file? name))) (elf-list (concatenate (map (lambda (dir) (find-files dir elf-pred)) - excisting-elf-dirs)))) + existing-elf-dirs)))) (for-each (lambda (elf-file) (system* "patchelf" "--shrink-rpath" elf-file) (handle-file elf-file elf-list)) --=-=-=--