unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "\( via Guix-patches" via <guix-patches@gnu.org>
To: <dannym@scratchpost.org>, <62424@debbugs.gnu.org>
Subject: [bug#62424] [PATCH] gnu: Add lazarus.
Date: Wed, 29 Mar 2023 20:26:00 +0100	[thread overview]
Message-ID: <CRJ43ZL98OHJ.RNA86541QQ2X@guix-framework> (raw)
In-Reply-To: <20230323101604.17976-1-dannym@scratchpost.org>

[-- Attachment #1: Type: text/plain, Size: 3149 bytes --]

Heya,

Adding on to what Maxim said:

On Thu Mar 23, 2023 at 10:16 AM GMT,  wrote:
> +    (arguments
> +     `(#:tests? #f ; No tests exist
> +       #:phases
> +       (modify-phases %standard-phases
> +        (delete 'configure)
> +        (replace 'build
> +          (lambda* (#:key inputs outputs #:allow-other-keys)
> +            ;; RUNPATH -k-rpath=
> +            ;; -Xr<x> rlink-path
> +            (let* ((libdirs
> +                    (map (lambda (x)
> +                           (assoc-ref inputs x))
> +                         '("glib" "gdk-pixbuf" "gtk+" "libx11"
> +                           "libx11" "pango" "cairo" "atk")))
> +                   (libs (append
> +                          (map (lambda (name)
> +                                 (string-append "-Fl" name "/lib"))
> +                               libdirs)
> +                          (map (lambda (name)
> +                                 (string-append "-k-rpath=" name "/lib"))
> +                               libdirs))))
> +              (setenv "LAZARUS_LIBPATHS"
> +                      (string-append ;"-XD "
> +                                     (string-join libs " ")))
> +              (setenv "MAKEFLAGS"
> +                      (string-append "LHELP_OPT="
> +                                     (string-join libs "\\ "))))
> +            (setenv "INSTALL_PREFIX" (assoc-ref outputs "out"))
> +            (invoke "make" "bigide"))))))

Please make sure you use the new-ish LIST/GEXP style for ARGUMENTS; also, much
of your modified BUILD phase could be replaced by modifying #:MAKE-FLAGS, and
LIBS could be generated in a much simpler way with FOLD from (SRFI SRFI-1):

---
> +    (arguments
> +     (list #:tests? #f ;no tests
> +           #:make-flags
> +           #~(begin
> +               (use-modules (srfi srfi-1))
> +               (let* ((lib-dirs
> +                       (list #$@(map this-package-input
> +                                     '("glib" "gdk-pixbuf" "gtk+"
> +                                       "libx11" "pango" "cairo" "atk"))))
> +                      (lib-flags
> +                       (fold (lambda (pkg flags)
> +                               (cons* (string-append "-Fl" pkg "/lib")
> +                                      (string-append "-k-rpath=" pkg "/lib")
> +                                      flags))
> +                             lib-dirs)))
> +                 (list (string-append "LAZARUS_LIBPATHS="
> +                                      (string-join lib-flags))
> +                       (string-append "LHELP_OPT="
> +                                      (string-join lib-flags "\\ "))
> +                       (string-append "INSTALL_PREFIX=" #$output))))
> +           #:phases
> +           #~(modify-phases %standard-phases
> +               (delete 'configure)
> +               (replace 'build
> +                 (lambda _
> +                   (invoke "make" "bigide"))))))
---

Note that I have not tested that this modification actually works, but I'd be
surprised if it didn't.

    -- (

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

  parent reply	other threads:[~2023-03-29 19:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23 10:16 [bug#62424] [PATCH] gnu: Add lazarus dannym
2023-03-29 18:57 ` Maxim Cournoyer
2023-03-29 19:26 ` ( via Guix-patches via [this message]
2023-04-02 20:26   ` Danny Milosavljevic
2023-05-01 15:21   ` bug#62424: " Danny Milosavljevic
2023-05-01 17:35     ` [bug#62424] " ( via Guix-patches via

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=CRJ43ZL98OHJ.RNA86541QQ2X@guix-framework \
    --to=guix-patches@gnu.org \
    --cc=62424@debbugs.gnu.org \
    --cc=dannym@scratchpost.org \
    --cc=paren@disroot.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).