From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e85TV-0000lw-DK for guix-patches@gnu.org; Fri, 27 Oct 2017 10:19:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e85TS-0005eg-7N for guix-patches@gnu.org; Fri, 27 Oct 2017 10:19:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:57033) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e85TS-0005eJ-40 for guix-patches@gnu.org; Fri, 27 Oct 2017 10:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e85TR-0002AZ-Vc for guix-patches@gnu.org; Fri, 27 Oct 2017 10:19:01 -0400 Subject: [bug#27344] [PATCH v4 1/3] gnu: freehdl: Fix gvhdl and freehdl-gennodes scripts. Resent-Message-ID: From: Theodoros Foradis Date: Fri, 27 Oct 2017 17:18:17 +0300 Message-Id: <20171027141819.21006-1-theodoros@foradis.org> In-Reply-To: <87tvyksmyt.fsf@foradis.org> References: <87tvyksmyt.fsf@foradis.org> 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: 27344@debbugs.gnu.org * gnu/packages/engineering.scm (freehdl): [arguments] : Add patch-gvhdl and patch-freehdl-gennodes phases. Wrap-program "/bin/gvhdl" in make-wrapper phase. [inputs]: Add guile-2.2. --- gnu/packages/engineering.scm | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 9f9949ef8..3ce6879d6 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -42,6 +42,7 @@ #:use-module (gnu packages bison) #:use-module (gnu packages boost) #:use-module (gnu packages check) + #:use-module (gnu packages commencement) #:use-module (gnu packages compression) #:use-module (gnu packages curl) #:use-module (gnu packages flex) @@ -1441,25 +1442,59 @@ parallel computing platforms. It also supports serial execution.") (string-append (assoc-ref inputs "coreutils") "/bin/cat"))) #t)) + (add-after 'patch-pkg-config 'setenv + (lambda* (#:key inputs #:allow-other-keys) + (setenv "CXX" (string-append (assoc-ref inputs "gcc") + "/bin/g++")) + (setenv "SYSTEM_LIBTOOL" (string-append (assoc-ref inputs "libtool") + "/bin/libtool")) + #t)) + (add-after 'setenv 'patch-gvhdl + (lambda _ + (substitute* "v2cc/gvhdl.in" + (("--mode=link") "--mode=link --tag=CXX") + (("-lm") "-lm FREEHDL/lib/freehdl/libieee.la")) + #t)) + (add-after 'patch-gvhdl 'patch-freehdl-gennodes + (lambda _ + (substitute* "freehdl/freehdl-gennodes.in" + (("guile") (which "guile")) + (("\\(debug") ";(debug") + (("\\(@ ") "(apply-emit") + (("\\(@@ ") "(apply-mini-format")) + #t)) (add-after 'configure 'patch-freehdl-pc (lambda* (#:key inputs #:allow-other-keys) (substitute* "freehdl.pc" (("=g\\+\\+") - (string-append "=" (assoc-ref inputs "gcc") + (string-append "=" (assoc-ref inputs "gcc-toolchain") "/bin/g++")) (("=libtool") (string-append "=" (assoc-ref inputs "libtool") "/bin/libtool"))) #t)) (add-after 'install-scripts 'make-wrapper - (lambda* (#:key outputs #:allow-other-keys) + (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) + (wrap-program (string-append out "/bin/gvhdl") + `("CPLUS_INCLUDE_PATH" ":" prefix + (,(string-append (assoc-ref inputs "gcc-toolchain") + "/include"))) + `("LIBRARY_PATH" ":" prefix + (,(string-append (assoc-ref inputs "gcc-toolchain") + "/lib"))) + `("PATH" ":" prefix + (,(string-append (assoc-ref inputs "gcc-toolchain") + "/bin") + ,(string-append (assoc-ref inputs "coreutils") + "/bin")))) (wrap-program (string-append out "/bin/freehdl-config") `("PKG_CONFIG_PATH" ":" prefix (,(string-append out "/lib/pkgconfig"))))) #t))))) (inputs `(("coreutils" ,coreutils) - ("gcc" ,gcc) + ("gcc-toolchain" ,gcc-toolchain-5) + ("guile" ,guile-2.2) ("perl" ,perl) ("pkg-config" ,pkg-config) ("libtool" ,libtool))) -- 2.14.1