From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dydvg-0004G1-QF for guix-patches@gnu.org; Sun, 01 Oct 2017 09:05:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dydva-0000lW-NT for guix-patches@gnu.org; Sun, 01 Oct 2017 09:05:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:33142) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dydva-0000lN-KN for guix-patches@gnu.org; Sun, 01 Oct 2017 09:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dydva-0007Dz-Al for guix-patches@gnu.org; Sun, 01 Oct 2017 09:05:02 -0400 Subject: [bug#27344] [PATCH v3 2/8] gnu: Add libngspice and ngspice. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87lglnery8.fsf@foradis.org> <20170909175752.8566-1-theodoros@foradis.org> <20170909175752.8566-2-theodoros@foradis.org> <871smqlh8v.fsf@gnu.org> <87shf6h5z6.fsf@foradis.org> Date: Sun, 01 Oct 2017 15:04:36 +0200 In-Reply-To: <87shf6h5z6.fsf@foradis.org> (Theodoros Foradis's message of "Fri, 29 Sep 2017 00:24:13 +0300") Message-ID: <8760bzqasb.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: Theodoros Foradis Cc: 27344@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, Theodoros Foradis skribis: > Ludovic Court=C3=A8s writes: > >> Theodoros Foradis skribis: >> >>> * gnu/packages/engineering.scm (libngspice): New variable. >>> * gnu/packages/engineering.scm (ngspice): New variable. >> >> I=E2=80=99m sorry for asking this late in the game, but I didn=E2=80=99t= find the >> answer in previous discussions: why two packages? It seems to me that a >> =E2=80=9Clib=E2=80=9D output would achieve the same, no? >> >> (It=E2=80=99s best to leave a comment in such a situation.) >> >> If you tell me I=E2=80=99m wrong, that=E2=80=99s OK, I=E2=80=99ll apply = it right away! > > The way this package's build system is set up, you cannot build both the > libraries and executables in the same run. That is, you need to run > ./configure (with the library-specific flag), make, then ./configure and > make again, to build everything. OK, that makes a lot of sense. > This is why I split the package in two. Initially (in v1 and v2 patch > series), I had libngspice be a non-public package, and ngspice was > copying the library to its normal output. > > After Danny's additions, different phases were added to both > packages, and unneeded files are deleted from their outputs. So, both > were made public, with only the minimal files needed for each > functionality. > > Would it be preferable to have libngspice as a non-public package again, > and have ngspice copy it to a "lib" output? Given that we=E2=80=99re dealing with a limitation of upstream=E2=80=99s bu= ild system, I think it=E2=80=99s OK to do it the way you did. I=E2=80=99ve committed the patch with the cosmetic changes below. Thanks, and sorry again for the delay! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 52a925225..0356fbfe9 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -1180,6 +1180,9 @@ high-performance parallel differential evolution (DE) optimization algorithm.") (license license:gpl2+))) (define-public libngspice + ;; Note: The ngspice's build system does not allow us to build both the + ;; library and the executables in one go. Thus, we have two packages. + ;; See . (package (name "libngspice") (version "26") @@ -1249,6 +1252,7 @@ an embedded event driven algorithm.") license:public-domain)))) ; xspice (define-public ngspice + ;; The ngspice executables (see libngpsice above.) (package (inherit libngspice) (name "ngspice") (arguments @@ -1265,12 +1269,12 @@ an embedded event driven algorithm.") #t)) (add-after 'install 'delete-cmpp-dlmain (lambda* (#:key outputs #:allow-other-keys) - (for-each - (lambda (file) + (for-each (lambda (file) (delete-file (string-append (assoc-ref outputs "out") file))) - '("/bin/cmpp" "/share/ngspice/dlmain.c")))) + '("/bin/cmpp" "/share/ngspice/dlmain.c")) + #t)) (delete 'delete-program-manuals) (delete 'delete-script-files))))) (inputs --=-=-=--