[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#74290] [PATCH v3 30/51] gnu: pciutils: Support the 64bit Hurd.
From: |
Janneke Nieuwenhuizen |
Subject: |
[bug#74290] [PATCH v3 30/51] gnu: pciutils: Support the 64bit Hurd. |
Date: |
Tue, 19 Nov 2024 07:55:00 +0100 |
* gnu/packages/patches/pciutils-hurd64.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/pciutils.scm (pciutils)[arguments]: Use g-expressions. When
building for the 64bit Hurd, use it in new "apply-hurd64-patch" phase.
Change-Id: I8936377da726681b748cc010e1fbae3fb19dee05
---
gnu/local.mk | 1 +
gnu/packages/patches/pciutils-hurd64.patch | 31 ++++++++++++++++++++++
gnu/packages/pciutils.scm | 25 +++++++++++------
3 files changed, 49 insertions(+), 8 deletions(-)
create mode 100644 gnu/packages/patches/pciutils-hurd64.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index a0408d20f2..89042a0716 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1916,6 +1916,7 @@ dist_patch_DATA =
\
%D%/packages/patches/pam-krb5-CVE-2020-10595.patch \
%D%/packages/patches/pango-skip-libthai-test.patch \
%D%/packages/patches/password-store-tree-compat.patch \
+ %D%/packages/patches/pciutils-hurd64.patch \
%D%/packages/patches/pdfpc-build-with-vala-0.56.patch \
%D%/packages/patches/petri-foo-0.1.87-fix-recent-file-not-exist.patch
\
%D%/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch \
diff --git a/gnu/packages/patches/pciutils-hurd64.patch
b/gnu/packages/patches/pciutils-hurd64.patch
new file mode 100644
index 0000000000..316f12e131
--- /dev/null
+++ b/gnu/packages/patches/pciutils-hurd64.patch
@@ -0,0 +1,31 @@
+Upstream-status: Not presented upstream.
+
+--- pciutils-3.8.0/lib/hurd.c.orig 2024-11-07 15:09:20.728973822 +0100
++++ pciutils-3.8.0/lib/hurd.c 2024-11-07 15:05:08.524682813 +0100
+@@ -213,7 +213,7 @@
+ hurd_read(struct pci_dev *d, int pos, byte * buf, int len)
+ {
+ int err;
+- size_t nread;
++ mach_msg_type_number_t nread;
+ char *data;
+ mach_port_t device_port = device_port_lookup(d);
+
+@@ -266,7 +266,7 @@
+ mach_port_t device_port = device_port_lookup(d);
+ struct pci_bar regions[6];
+ char *buf = (char *) ®ions;
+- size_t size = sizeof(regions);
++ mach_msg_type_number_t size = sizeof(regions);
+
+ int err = pci_get_dev_regions(device_port, &buf, &size);
+ if (err)
+@@ -305,7 +305,7 @@
+ struct pci_xrom_bar rom;
+ mach_port_t device_port = device_port_lookup(d);
+ char *buf = (char *) &rom;
+- size_t size = sizeof(rom);
++ mach_msg_type_number_t size = sizeof(rom);
+
+ int err = pci_get_dev_rom(device_port, &buf, &size);
+ if (err)
diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm
index d2a352eb6b..08f1634113 100644
--- a/gnu/packages/pciutils.scm
+++ b/gnu/packages/pciutils.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2022 Brendan Tildesley <mail@brendan.scot>
;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
;;;
@@ -81,25 +81,34 @@ (define-public pciutils
"01aglgw9ds9qiswcbi2lx90lswncikrlyv8mmp4haix8542bvvci"))))
(build-system gnu-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
(add-after 'unpack 'unbundle-pci.ids
(lambda* (#:key native-inputs inputs #:allow-other-keys)
(copy-file (search-input-file (or native-inputs inputs)
"share/hwdata/pci.ids")
"pci.ids")))
+ #$@(if (target-hurd64?)
+ #~((add-after 'unpack 'apply-hurd64-patch
+ (lambda _
+ (let ((patch-file
+ #$(local-file
+ (search-patch "pciutils-hurd64.patch"))))
+ (invoke "patch" "--force" "-p1" "-i" patch-file)))))
+ #~())
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
;; There's no 'configure' script, just a raw makefile.
(substitute* "Makefile"
- ,@(if (%current-target-system)
- `((("^CROSS_COMPILE=.*$")
+ #$@(if (%current-target-system)
+ #~((("^CROSS_COMPILE=.*$")
(string-append "CROSS_COMPILE="
- ,(%current-target-system) "-"
+ #$(%current-target-system) "-"
"\n"))
(("^HOST=.*$")
(string-append "HOST="
- ,(gnu-triplet->nix-system
+ #$(gnu-triplet->nix-system
(%current-target-system)) "\n"))
;; Disable 'install' strip option, that would fail when
;; we are cross-compiling.
@@ -139,7 +148,7 @@ (define-public pciutils
(invoke "make" "install" "install-lib"))))
;; Make sure programs have an RPATH so they can find libpciutils.so.
- #:make-flags (list ,(string-append "CC="
+ #:make-flags #~(list #$(string-append "CC="
(if (%current-target-system)
(cc-for-target)
"gcc"))
--
2.46.0
- [bug#74290] [PATCH v3 27/51] system: image: Add hurd64 image types., (continued)
- [bug#74290] [PATCH v3 27/51] system: image: Add hurd64 image types., Janneke Nieuwenhuizen, 2024/11/19
- [bug#74290] [PATCH v3 25/51] gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/19
- [bug#74290] [PATCH v3 20/51] gnu: netdde: Fix build with gcc-14., Janneke Nieuwenhuizen, 2024/11/19
- [bug#74290] [PATCH v3 22/51] gnu: libssh: Fix [cross-]build with gcc-14 for 32bit., Janneke Nieuwenhuizen, 2024/11/19
- [bug#74290] [PATCH v3 37/51] gnu: inetutils: Fix build for the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/19
- [bug#74290] [PATCH v3 26/51] DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/19
- [bug#74290] [PATCH v3 31/51] gnu: libpciaccess: Support the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/19
- [bug#74290] [PATCH v3 34/51] gnu: rumpkernel: Update to f1ffd6405f225336e595a0f99f01095ed7438337., Janneke Nieuwenhuizen, 2024/11/19
- [bug#74290] [PATCH v3 28/51] gnu: libgpg-error: Support the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/19
- [bug#74290] [PATCH v3 35/51] gnu: rumpkernel: Support the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/19
- [bug#74290] [PATCH v3 30/51] gnu: pciutils: Support the 64bit Hurd.,
Janneke Nieuwenhuizen <=
- [bug#74290] [PATCH v3 36/51] gnu: hurd: Build fixes for the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/19
- [bug#74290] [PATCH v3 29/51] gnu: openssl-3.0: Support the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/19
- [bug#74290] [PATCH v3 33/51] gnu: netdde: Support the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/19
- [bug#74290] [PATCH v3 32/51] gnu: netdde: Update to c0ef248dc7c5ccc1273e2a796f3ece30c5b645df., Janneke Nieuwenhuizen, 2024/11/19
- [bug#74290] [PATCH v3 44/51] gnu: commencement: libstdc++-boot0-gcc7: Replace by make-libstdc++-boot0., Janneke Nieuwenhuizen, 2024/11/19
- [bug#74290] [PATCH v3 41/51] gnu: commencement: gnumach-headers-boot0: Update to 1.8+git20240714., Janneke Nieuwenhuizen, 2024/11/19
- [bug#74290] [PATCH v3 45/51] gnu: gettext: Fix cross-build shebangs., Janneke Nieuwenhuizen, 2024/11/19
- [bug#74290] [PATCH v3 38/51] gnu: grub: Fix build for the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/19
- [bug#74290] [PATCH v3 47/51] gnu: bootstrap: %bootstrap-glibc: Also fix libm.so., Janneke Nieuwenhuizen, 2024/11/19
- [bug#74290] [PATCH v3 46/51] gnu: Add gdb-15.2, with support for the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/19