all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: Danny Milosavljevic <dannym@scratchpost.org>,
	Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: Add fpc. (version 2)
Date: Mon, 05 Jun 2017 15:33:55 +0200	[thread overview]
Message-ID: <87lgp6y2ws.fsf@fastmail.com> (raw)
In-Reply-To: <20170605152024.732db174@scratchpost.org>


[-- Attachment #1.1: Type: text/plain, Size: 129 bytes --]

Just to piggy-back on this discussion, I'm attempting to package
"Hedgewars" and needed this patch to get fpc working properly:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-fpc-Make-sure-it-finds-gcc-and-ld-at-runtime.patch --]
[-- Type: text/x-patch, Size: 2355 bytes --]

From 4f76fb12f031652e11063c0fb37949229caa45cc Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Tue, 25 Apr 2017 15:39:30 +0200
Subject: [PATCH] gnu: fpc: Make sure it finds gcc and ld at runtime.

* gnu/packages/fpc.scm (fpc)[inputs]: Add GCC and LD-WRAPPER.
[arguments]: Add 'wrap' phase.
---
 gnu/packages/pascal.scm | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/pascal.scm b/gnu/packages/pascal.scm
index a343ddcd6..fbb5b1d10 100644
--- a/gnu/packages/pascal.scm
+++ b/gnu/packages/pascal.scm
@@ -24,7 +24,9 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bootstrap)
+  #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages xml))
 
@@ -67,6 +69,8 @@
       (supported-systems '("i686-linux" "x86_64-linux"))
       (inputs
        `(("expat" ,expat)
+         ("glibc" ,glibc/linux)
+         ("ld-wrapper" ,ld-wrapper)
          ("ncurses" ,ncurses)
          ("zlib" ,zlib)))
       (native-inputs
@@ -168,7 +172,19 @@
                     (system*
                      (string-append out "/lib/fpc/" ,version "/samplecfg")
                      (string-append out "/lib/fpc/" ,version)
-                     (string-append out "/etc"))))))))))
+                     (string-append out "/etc"))))))
+             (add-after 'install 'wrap
+               (lambda* (#:key inputs outputs #:allow-other-keys)
+                 (let* ((out (assoc-ref outputs "out"))
+                        (fpc (string-append out "/bin/fpc"))
+                        (ld (assoc-ref inputs "ld-wrapper"))
+                        (glibc (assoc-ref inputs "glibc")))
+                   (wrap-program fpc
+                     `("PATH" ":" prefix (,(string-append ld "/bin")))
+                     `("LIBRARY_PATH" ":" prefix (,(string-append glibc "/lib"))))
+                   #t)))))))
+      ;; fpc invokes gcc, so make sure LIBRARY_PATH et.al are set.
+      ;(native-search-paths (package-native-search-paths gcc))
       (home-page "http://www.freepascal.org")
       (synopsis "The Free Pascal Compiler")
       (description
-- 
2.13.1


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

  reply	other threads:[~2017-06-05 13:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26 22:44 [PATCH] gnu: Add fpc Kei Kebreau
2017-01-27  4:01 ` [PATCH] gnu: Add fpc. (version 2) Kei Kebreau
2017-01-27  4:52   ` Kei Kebreau
2017-01-27  6:00     ` Kei Kebreau
2017-03-12 12:47       ` Danny Milosavljevic
2017-03-13 21:22         ` Kei Kebreau
2017-03-14 21:45       ` Danny Milosavljevic
2017-03-20 15:02         ` Kei Kebreau
2017-03-20 19:59         ` Ricardo Wurmus
2017-03-20 22:54           ` Kei Kebreau
2017-06-05 13:20           ` Danny Milosavljevic
2017-06-05 13:33             ` Marius Bakke [this message]
2017-06-05 13:42               ` Marius Bakke
2017-06-09  1:30                 ` Kei Kebreau
2017-06-05 19:55             ` Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lgp6y2ws.fsf@fastmail.com \
    --to=mbakke@fastmail.com \
    --cc=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.