unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Jean Pierre De Jesus DIAZ via Guix-patches via <guix-patches@gnu.org>
To: 56151@debbugs.gnu.org
Subject: [bug#56151] [PATCH]: gnu: ppp: Fix cross-compilation
Date: Wed, 22 Jun 2022 18:40:36 +0000	[thread overview]
Message-ID: <uoHyGcjHXQz3A3tZiXk1zJx5QfIvpzVMCByEQHwIF2I_pJ7bizBAbKlA5WwrwuByotihc8RWfunxIOVAssLwF0TTdXCdemo57I9SAcwxurg=@jeandudey.tech> (raw)

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

Building `ppp` right now fails when cross-compiling for other
systems. Discovered it while generating an installation image for
RockPro64 on a `x86-64-linux-gnu` system.

guix build ppp --keep-failed \
               --target=aarch64-linux-gnu

This patch removes an outdated substitution, and modifies the existing ones to match what the source code expects.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-ppp-Fix-cross-compilation.patch --]
[-- Type: text/x-patch; name=0001-gnu-ppp-Fix-cross-compilation.patch, Size: 3020 bytes --]

From 99ed433400d7d33b4b9811ac22fdfb4b637492fd Mon Sep 17 00:00:00 2001
Message-Id: <99ed433400d7d33b4b9811ac22fdfb4b637492fd.1655922891.git.me@jeandudey.tech>
From: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
Date: Wed, 22 Jun 2022 20:29:05 +0200
Subject: [PATCH] gnu: ppp: Fix cross-compilation.

* gnu/packages/samba.scm (ppp)[arguments]: Use G-Expressions. Remove
unused substitution. Fix OpenSSL and libpcap include paths.
---
 gnu/packages/samba.scm | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm
index b775ad905c..208dca94ca 100644
--- a/gnu/packages/samba.scm
+++ b/gnu/packages/samba.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2020, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022 Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -469,23 +470,22 @@ (define-public ppp
                 "1bhhksdclsnkw54a517ndrw55q5zljjbh9pcqz1z4a2z2flxpsgk"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:tests? #f                    ; no check target
-       #:make-flags '("CC=gcc")
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'patch-Makefile
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((libc    (assoc-ref inputs "libc"))
-                   (openssl (assoc-ref inputs "openssl"))
-                   (libpcap (assoc-ref inputs "libpcap")))
-               (substitute* "pppd/Makefile.linux"
-                 (("/usr/include/crypt\\.h")
-                  (string-append libc "/include/crypt.h"))
-                 (("/usr/include/openssl")
-                  (string-append openssl "/include/openssl"))
-                 (("/usr/include/pcap-bpf.h")
-                  (string-append libpcap "/include/pcap-bpf.h")))
-               #t))))))
+      (list #:tests? #f                    ;; No "check" target
+            #:make-flags #~(list (string-append "CC=" #$(cc-for-target)))
+            #:phases
+            #~(modify-phases %standard-phases
+                (add-before 'configure 'patch-Makefile
+                  (lambda* (#:key inputs #:allow-other-keys)
+                    (let ((openssl (assoc-ref inputs "openssl"))
+                          (libpcap (assoc-ref inputs "libpcap")))
+                      (substitute* "pppd/Makefile.linux"
+                        (("/usr/include/openssl")
+                         (string-append openssl "/include"))
+                        (("-DPPP_FILTER")
+                         (string-append "-DPPP_FILTER -I" libpcap "/include")))
+                      (substitute* "pppd/pppcrypt.h"
+                        (("des\\.h") "openssl/des.h")))
+                    #t)))))
     (inputs
      (list libpcap
            (@ (gnu packages tls) openssl)))
-- 
2.36.1


             reply	other threads:[~2022-06-22 19:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22 18:40 Jean Pierre De Jesus DIAZ via Guix-patches via [this message]
2022-06-25 16:45 ` bug#56151: [PATCH]: gnu: ppp: Fix cross-compilation Guillaume Le Vaillant

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='uoHyGcjHXQz3A3tZiXk1zJx5QfIvpzVMCByEQHwIF2I_pJ7bizBAbKlA5WwrwuByotihc8RWfunxIOVAssLwF0TTdXCdemo57I9SAcwxurg=@jeandudey.tech' \
    --to=guix-patches@gnu.org \
    --cc=56151@debbugs.gnu.org \
    --cc=me@jeandudey.tech \
    /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).