Marius Bakke <mba...@fastmail.com> writes:

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

Oops, found one more patch in that old branch. @Kei, feel free to squash
this into the original patch:

From cb94a2c4c697541183cb912039399df54ece5ec3 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mba...@fastmail.com>
Date: Mon, 24 Apr 2017 21:37:13 +0200
Subject: [PATCH] gnu: fpc: Patch /bin/sh reference.

* gnu/packages/pascal.scm (fpc)[arguments]<#:phases>: Add new
'patch-inline-shebangs' phase.
---
 gnu/packages/pascal.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/pascal.scm b/gnu/packages/pascal.scm
index 0e7b9f3ab..a343ddcd6 100644
--- a/gnu/packages/pascal.scm
+++ b/gnu/packages/pascal.scm
@@ -106,6 +106,11 @@
                                       fpcmake-tarball))
                       (zero? (system* "tar" "xvf" compiler-tarball "-C.."))
                       (zero? (system* "tar" "xvf" fpcmake-tarball "-C..")))))))
+             (add-after 'patch-source-shebangs 'patch-inline-shebangs
+               (lambda _
+                 (substitute* "fpcsrc/compiler/script.pas"
+                   (("#!/bin/sh") (string-append "#!" (which "sh"))))
+                 #t))
              (replace 'configure
                (lambda* (#:key inputs outputs #:allow-other-keys)
                  (substitute* "fpcsrc/compiler/systems/t_linux.pas"
-- 
2.13.1

Attachment: signature.asc
Description: PGP signature

Reply via email to