diff options
author | Janneke Nieuwenhuizen <janneke@gnu.org> | 2024-11-07 15:46:27 +0100 |
---|---|---|
committer | Janneke Nieuwenhuizen <janneke@gnu.org> | 2024-12-03 08:39:00 +0100 |
commit | 36f9348675b5f06a9906c32c203d174446a8a043 (patch) | |
tree | e21aba421025b33496d9546452c0e94e864848a6 /gnu | |
parent | 5482403f35b2718610a06f906f1b98728dcdae1e (diff) | |
download | guix-36f9348675b5f06a9906c32c203d174446a8a043.tar.gz guix-36f9348675b5f06a9906c32c203d174446a8a043.zip |
gnu: libpciaccess: Support the 64bit Hurd.
* gnu/packages/patches/libpciaccess-hurd64.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/xorg.scm (libpciaccess) [arguments]: Use g-expressions. When
building for the 64bit Hurd, use it in new "apply-hurd64-patch" phase.
Change-Id: I8936377da726681b748cc010e1fbae3fb19dee05
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/patches/libpciaccess-hurd64.patch | 58 | ||||
-rw-r--r-- | gnu/packages/xorg.scm | 23 |
3 files changed, 75 insertions, 7 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 1ca7077000..fc81c459fb 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1713,6 +1713,7 @@ dist_patch_DATA = \ %D%/packages/patches/libmpeg2-global-symbol-test.patch \ %D%/packages/patches/libmygpo-qt-fix-qt-5.11.patch \ %D%/packages/patches/libmygpo-qt-missing-qt5-modules.patch \ + %D%/packages/patches/libpciaccess-hurd64.patch \ %D%/packages/patches/libphonenumber-reproducible-build.patch \ %D%/packages/patches/libqalculate-3.8.0-libcurl-ssl-fix.patch \ %D%/packages/patches/libquicktime-ffmpeg.patch \ diff --git a/gnu/packages/patches/libpciaccess-hurd64.patch b/gnu/packages/patches/libpciaccess-hurd64.patch new file mode 100644 index 0000000000..f7e11059b1 --- /dev/null +++ b/gnu/packages/patches/libpciaccess-hurd64.patch @@ -0,0 +1,58 @@ +Upstream-status: Taken from upstream: + +<https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/commit/6cd5a4afbb70868c7746de8d50dea59e02e9acf2>. + +From 6cd5a4afbb70868c7746de8d50dea59e02e9acf2 Mon Sep 17 00:00:00 2001 +From: Flavio Cruz <flaviocruz@gmail.com> +Date: Wed, 28 Jun 2023 01:02:34 -0400 +Subject: [PATCH] Fix compilation warnings when building against hurd-amd64. +Content-Transfer-Encoding: 8bit +Content-Type: text/plain; charset=UTF-8 + +Passes mach_msg_type_number_t instead of size_t which have different +sizes. Example warning: + +/hurd_pci.c:101:53: warning: passing argument 3 of 'pci_get_dev_regions' from incompatible pointer type [-Wincompatible-pointer-types] + 101 | err = pci_get_dev_regions(d->device_port, &buf, &size); + | ^~~~~ + | | + | size_t * {aka long unsigned int *} +--- + src/hurd_pci.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/hurd_pci.c b/src/hurd_pci.c +index 8653e1b..9ac3813 100644 +--- a/src/hurd_pci.c ++++ b/src/hurd_pci.c +@@ -82,7 +82,7 @@ pci_device_hurd_probe(struct pci_device *dev) + struct pci_bar regions[6]; + struct pci_xrom_bar rom; + struct pci_device_private *d; +- size_t size; ++ mach_msg_type_number_t size; + char *buf; + + /* Many of the fields were filled in during initial device enumeration. +@@ -323,7 +323,7 @@ pciclient_cfg_read(mach_port_t device_port, int reg, char *buf, + size_t * nbytes) + { + int err; +- size_t nread; ++ mach_msg_type_number_t nread; + char *data; + + data = buf; +@@ -473,7 +473,7 @@ simple_readdir(mach_port_t port, uint32_t *first_entry) + { + char *data; + int nentries = 0; +- vm_size_t size; ++ mach_msg_type_number_t size; + + dir_readdir (port, &data, &size, *first_entry, 1, 0, &nentries); + +-- +Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org +Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com + diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index 1897bd583f..7849fbee09 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -36,7 +36,7 @@ ;;; Copyright © 2021 Lu Hui <luhux76@gmail.com> ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com> ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> -;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org> +;;; Copyright © 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2023, 2024 John Kehayias <john.kehayias@protonmail.com> ;;; Copyright © 2023, 2024 Kaelyn Takata <kaelyn.alexi@protonmail.com> ;;; @@ -1169,16 +1169,17 @@ themselves.") "12glp4w1kgvmqn89lk19cgr6jccd3awxra4dxisp7pagi06rsk11")))) (build-system gnu-build-system) (arguments - '(;; Make sure libpciaccess can read compressed 'pci.ids' files as - ;; provided by pciutils. - #:configure-flags - (list "--with-zlib" + (list + ;; Make sure libpciaccess can read compressed 'pci.ids' files as + ;; provided by pciutils. + #:configure-flags + #~(list "--with-zlib" (string-append "--with-pciids-path=" (assoc-ref %build-inputs "pciutils") "/share/hwdata")) #:phases - (modify-phases %standard-phases + #~(modify-phases %standard-phases (add-after 'install 'add-L-zlib (lambda* (#:key inputs outputs #:allow-other-keys) ;; Provide '-LZLIB/lib' next to '-lz' in the .la file. @@ -1187,7 +1188,15 @@ themselves.") (substitute* (string-append out "/lib/libpciaccess.la") (("-lz") (string-append "-L" zlib "/lib -lz"))) - #t)))))) + #t))) + #$@(if (target-hurd64?) + #~((add-after 'unpack 'apply-hurd64-patch + (lambda _ + (let ((patch-file + #$(local-file + (search-patch "libpciaccess-hurd64.patch")))) + (invoke "patch" "--force" "-p1" "-i" patch-file))))) + #~())))) (inputs (list zlib pciutils)) ;for 'pci.ids.gz' (native-inputs |