From fe6067fc248673d6509b557ff010778f7762382f Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Sun, 18 Oct 2020 15:00:55 -0700 Subject: gnu: u-boot: Update to 2020.10. * gnu/packages/bootloaders (u-boot): Update to 2020.10. * gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch: Refresh patch. --- gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch index 29dec4f5e9..d6c1987718 100644 --- a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch +++ b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch @@ -32,9 +32,9 @@ Index: u-boot/configs/sifive_fu540_defconfig =================================================================== --- u-boot.orig/configs/sifive_fu540_defconfig +++ u-boot/configs/sifive_fu540_defconfig -@@ -12,3 +12,5 @@ CONFIG_DISPLAY_BOARDINFO=y - CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00" - CONFIG_SYS_RELOC_GD_ENV_ADDR=y +@@ -27,3 +27,5 @@ CONFIG_SPL_DM_SEQ_ALIAS=y + CONFIG_SPL_CLK=y CONFIG_DM_MTD=y + CONFIG_DM_RESET=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};" -- cgit v1.2.3 From c87646400dbc304e3eaa6c469c11341f8f44ce88 Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Tue, 22 Sep 2020 22:59:47 -0400 Subject: gnu: Add farstream. * gnu/packages/freedesktop.scm (farstream): New variable. * gnu/packages/patches/farstream-make.patch: New file. * gnu/local.mk (dist_PATCH_DATA): Add it. Signed-off-by: Julien Lepiller --- gnu/local.mk | 1 + gnu/packages/freedesktop.scm | 87 +++++++++++++++++++++++++++++++ gnu/packages/patches/farstream-make.patch | 39 ++++++++++++++ 3 files changed, 127 insertions(+) create mode 100644 gnu/packages/patches/farstream-make.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 5a79c79d6f..607f78b1f3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -953,6 +953,7 @@ dist_patch_DATA = \ %D%/packages/patches/exiv2-CVE-2017-14859-14862-14864.patch \ %D%/packages/patches/extempore-unbundle-external-dependencies.patch \ %D%/packages/patches/extundelete-e2fsprogs-1.44.patch \ + %D%/packages/patches/farstream-make.patch \ %D%/packages/patches/fastcap-mulGlobal.patch \ %D%/packages/patches/fastcap-mulSetup.patch \ %D%/packages/patches/fasthenry-spAllocate.patch \ diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index cfb87178fb..6caff14cf2 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -21,6 +21,7 @@ ;;; Copyright © 2020 Rene Saavedra ;;; Copyright © 2020 Nicolò Balzarotti ;;; Copyright © 2020 Anders Thuné +;;; Copyright © 2020 Raghav Gururajan ;;; ;;; This file is part of GNU Guix. ;;; @@ -71,6 +72,7 @@ #:use-module (gnu packages gnome) #:use-module (gnu packages gperf) #:use-module (gnu packages graphviz) + #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) #:use-module (gnu packages image) #:use-module (gnu packages libffi) @@ -79,6 +81,7 @@ #:use-module (gnu packages linux) #:use-module (gnu packages man) #:use-module (gnu packages m4) + #:use-module (gnu packages networking) #:use-module (gnu packages nss) #:use-module (gnu packages package-management) #:use-module (gnu packages perl) @@ -98,6 +101,90 @@ #:use-module (gnu packages xorg) #:use-module (srfi srfi-1)) +(define-public farstream + (package + (name "farstream") + (version "0.2.9") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.freedesktop.org/farstream/farstream.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1sd8syldyq6bphfdm129s3gq554vfv7vh1vcwzk48gjryf101awk")) + (patches + (search-patches "farstream-make.patch")))) + (build-system glib-or-gtk-build-system) + (outputs '("out" "doc")) + (arguments + `(#:tests? #f ; https://gitlab.freedesktop.org/farstream/farstream/-/issues/18 + #:configure-flags + (list + "--enable-gtk-doc" + "--enable-glib-asserts" + (string-append "--with-html-dir=" + (assoc-ref %outputs "doc") + "/share/gtk-doc/html")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'copy-common + (lambda _ + (delete-file "autogen.sh") + (copy-recursively + (assoc-ref %build-inputs "common") + "common") + #t)) + (add-after 'unpack 'patch-docbook-xml + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "docs" + (substitute* '("libs/farstream-libs-docs.sgml" + "plugins/farstream-plugins-docs.sgml") + (("http://www.oasis-open.org/docbook/xml/4.1.2/") + (string-append (assoc-ref inputs "docbook-xml") + "/xml/dtd/docbook/")))) + #t))))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("common" + ,(origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.freedesktop.org/gstreamer/common.git") + (commit "88e512ca7197a45c4114f7fa993108f23245bf50"))) + (file-name + (git-file-name "common" "latest.88e512c")) + (sha256 + (base32 "1nk94pnskjyngqcfb9p32g4yvf4nzpjszisw24r9azl0pawqpsn6")))) + ("docbook-xml" ,docbook-xml-4.1.2) + ("docbook-xsl" ,docbook-xsl) + ("gobject-introspection" ,gobject-introspection) + ("gtk-doc" ,gtk-doc) + ("libtool" ,libtool) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python" ,python-wrapper) + ("xsltproc" ,libxslt))) + (inputs + `(("glib" ,glib) + ("gtk+" ,gtk+) + ("gupnp-igd" ,gupnp-igd) + ("libnice" ,libnice))) + (propagated-inputs + `(("gstreamer" ,gstreamer) + ("gst-plugins-bad" ,gst-plugins-bad) + ("gst-plugins-base" ,gst-plugins-base) + ("gst-plugins-good" ,gst-plugins-good))) + (synopsis "The Farstream VVoIP framework") + (description "Farstream is a collection of GStreamer modules and libraries +for videoconferencing.") + (home-page "https://www.freedesktop.org/wiki/Software/Farstream/") + (license license:lgpl2.1+))) + (define-public libglib-testing (package (name "libglib-testing") diff --git a/gnu/packages/patches/farstream-make.patch b/gnu/packages/patches/farstream-make.patch new file mode 100644 index 0000000000..6c1e9e7119 --- /dev/null +++ b/gnu/packages/patches/farstream-make.patch @@ -0,0 +1,39 @@ +This patch comes from upstream: +https://gitlab.freedesktop.org/farstream/farstream/-/merge_requests/4 + +From 54987d445ea714b467d901b7daf8c09ed0644189 Mon Sep 17 00:00:00 2001 +From: Debarshi Ray +Date: Thu, 12 Mar 2020 14:07:23 +0100 +Subject: [PATCH] build: Adapt to backwards incompatible change in GNU Make 4.3 + +GNU Make 4.3 has a backwards incompatible change affecting the use of +number signs or hashes (ie., #) inside function invocations. See: +https://lists.gnu.org/archive/html/info-gnu/2020-01/msg00004.html + +In this case, it would expand the '\#' in the '\n\#include \"$(h)\"' +argument to the foreach call to '\#', not '#'. This would lead to +spurious backslashes in front of the '#include' directives in the +generated fs-enumtypes.c file. + +Spotted by Ernestas Kulik. +--- + common-modified/gst-glib-gen.mak | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/common-modified/gst-glib-gen.mak b/common-modified/gst-glib-gen.mak +index 14f1ba37..2247a41c 100644 +--- a/common-modified/gst-glib-gen.mak ++++ b/common-modified/gst-glib-gen.mak +@@ -6,7 +6,8 @@ + #glib_gen_prefix=gst_color_balance + #glib_gen_basename=colorbalance + +-enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") ++hash:=\# ++enum_headers=$(foreach h,$(glib_enum_headers),\n$(hash)include \"$(h)\") + + # these are all the rules generating the relevant files + $(glib_gen_basename)-enumtypes.h: $(glib_enum_headers) +-- +GitLab + -- cgit v1.2.3 From 2c1216207efb1198cdebe1072875169876f9cac9 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Tue, 20 Oct 2020 03:39:24 -0400 Subject: gnu: icecat: Update to 78.4.0-guix0-preview1 [security fixes]. Includes fixes for CVE-2020-15683 and CVE-2020-15969. * gnu/packages/gnuzilla.scm (%icecat-version, %icecat-build-id): Update. (icecat-source): Update gnuzilla commit, base version, and hashes. * gnu/packages/patches/icecat-makeicecat.patch: Adapt to new version. --- gnu/packages/gnuzilla.scm | 12 ++++++------ gnu/packages/patches/icecat-makeicecat.patch | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 4dbe864598..f74992e2e3 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -550,8 +550,8 @@ from forcing GEXP-PROMISE." #:system system #:guile-for-build guile))) -(define %icecat-version "78.3.1-guix0-preview1") -(define %icecat-build-id "20200926000000") ;must be of the form YYYYMMDDhhmmss +(define %icecat-version "78.4.0-guix0-preview1") +(define %icecat-build-id "20201019000000") ;must be of the form YYYYMMDDhhmmss ;; 'icecat-source' is a "computed" origin that generates an IceCat tarball ;; from the corresponding upstream Firefox ESR tarball, using the 'makeicecat' @@ -573,11 +573,11 @@ from forcing GEXP-PROMISE." "firefox-" upstream-firefox-version ".source.tar.xz")) (sha256 (base32 - "1savwk91vhvg096w289xwpjvqbbd2ibfad90081hirlzd1kpvljz")))) + "1z3hj45bnd12z3g6ajv9qrgclca7fymi1sxj9l9nh9q6y6xz0g4f")))) - (upstream-icecat-base-version "78.3.1") ; maybe older than base-version + (upstream-icecat-base-version "78.4.0") ; maybe older than base-version ;;(gnuzilla-commit (string-append "v" upstream-icecat-base-version)) - (gnuzilla-commit "cd2af837fce69145effef83def6993d244887b03") + (gnuzilla-commit "05adddbf87a5ee11de7cd90794c331a178bcfd5c") (gnuzilla-source (origin (method git-fetch) @@ -589,7 +589,7 @@ from forcing GEXP-PROMISE." (string-take gnuzilla-commit 8))) (sha256 (base32 - "0266gp8vs4avlfdnr8dj7b47msxv1vkd0xpnifp04v4scvgj0yaj")))) + "128h0gnn1adinjkfmskxdjkvyh60li8czlar2xdjn2b6myiq5yny")))) ;; 'search-patch' returns either a valid file name or #f, so wrap it ;; in 'assume-valid-file-name' to avoid 'local-file' warnings. diff --git a/gnu/packages/patches/icecat-makeicecat.patch b/gnu/packages/patches/icecat-makeicecat.patch index c90950d5ef..e0cdde61ec 100644 --- a/gnu/packages/patches/icecat-makeicecat.patch +++ b/gnu/packages/patches/icecat-makeicecat.patch @@ -25,7 +25,7 @@ index 8be2362..48716f2 100755 -wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc -gpg --recv-keys --keyserver keyserver.ubuntu.com 14F26682D0916CDD81E37B6D61B7B526D98F0353 -gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc --echo -n 5fd27d67689fe60803022035e556146d2dbce5e53d21c14d026fc31dd2e45be9 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - +-echo -n 8e3cf0bbf1062768134db2eb10ab774731ca5ec6694b65def82234bb0a9170fc firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - - -echo Extracting Firefox tarball -tar -xf firefox-${FFVERSION}esr.source.tar.xz @@ -37,7 +37,7 @@ index 8be2362..48716f2 100755 +# wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc +# gpg --recv-keys --keyserver keyserver.ubuntu.com 14F26682D0916CDD81E37B6D61B7B526D98F0353 +# gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc -+# echo -n 5fd27d67689fe60803022035e556146d2dbce5e53d21c14d026fc31dd2e45be9 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - ++# echo -n 8e3cf0bbf1062768134db2eb10ab774731ca5ec6694b65def82234bb0a9170fc firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - +# +# echo Extracting Firefox tarball +# tar -xf firefox-${FFVERSION}esr.source.tar.xz -- cgit v1.2.3 From cad55e91fd5a481279e6286a2728761b8da7c07a Mon Sep 17 00:00:00 2001 From: Malte Frank Gerdes Date: Sat, 10 Oct 2020 15:31:14 +0200 Subject: gnu: openocd: Update to 9a877a83a1c8b1f105cdc0de46c5cbc4d9e8799e. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/embedded.scm (openocd): Update to 9a877a83a1c8b1f105cdc0de46c5cbc4d9e8799e. [version]: Substitute release with current master. [source]: Remove openocd-nrf52.patch [arguments]: Replace bootstrap build phase. * gnu/local.mk: Remove openocd-nrf52.patch. * gnu/packages/patches/openocd-nrf52.patch: Remove file. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 2 +- gnu/packages/embedded.scm | 124 ++--- gnu/packages/patches/openocd-nrf52.patch | 827 ------------------------------- 3 files changed, 65 insertions(+), 888 deletions(-) delete mode 100644 gnu/packages/patches/openocd-nrf52.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 607f78b1f3..31385d0db6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -37,6 +37,7 @@ # Copyright © 2020 Brice Waegeneire # Copyright © 2020 Tanguy Le Carrour # Copyright © 2020 Martin Becze +# Copyright © 2020 Malte Frank Gerdes # # This file is part of GNU Guix. # @@ -1393,7 +1394,6 @@ dist_patch_DATA = \ %D%/packages/patches/openfoam-4.1-cleanup.patch \ %D%/packages/patches/openjdk-10-idlj-reproducibility.patch \ %D%/packages/patches/openmpi-mtl-priorities.patch \ - %D%/packages/patches/openocd-nrf52.patch \ %D%/packages/patches/openssh-hurd.patch \ %D%/packages/patches/openresolv-restartcmd-guix.patch \ %D%/packages/patches/openscad-parser-boost-1.72.patch \ diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index 1eacb72a45..cc26b17ea6 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm @@ -514,67 +514,71 @@ language.") (license license:bsd-2))) (define-public openocd - (package - (name "openocd") - (version "0.10.0") - (source (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/openocd/openocd/" - version "/openocd-" version ".tar.gz")) - (sha256 - (base32 - "09p57y3c2spqx4vjjlz1ljm1lcd0j9q8g76ywxqgn3yc34wv18zd")) - ;; FIXME: Remove after nrf52 patch is merged. - (patches - (search-patches "openocd-nrf52.patch")))) - (build-system gnu-build-system) - (native-inputs - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("libtool" ,libtool) - ("pkg-config" ,pkg-config))) - (inputs - `(("hidapi" ,hidapi) - ("jimtcl" ,jimtcl) - ("libftdi" ,libftdi) - ("libjaylink" ,libjaylink) - ("libusb-compat" ,libusb-compat))) - (arguments - '(#:configure-flags - (append (list "--disable-werror" - "--enable-sysfsgpio" - "--disable-internal-jimtcl" - "--disable-internal-libjaylink") - (map (lambda (programmer) - (string-append "--enable-" programmer)) - '("amtjtagaccel" "armjtagew" "buspirate" "ftdi" - "gw16012" "jlink" "opendous" "osbdm" - "parport" "aice" "cmsis-dap" "dummy" "jtag_vpi" - "remote-bitbang" "rlink" "stlink" "ti-icdi" "ulink" - "usbprog" "vsllink" "usb-blaster-2" "usb_blaster" - "presto" "openjtag"))) - #:phases - (modify-phases %standard-phases - ;; Required because of patched sources. - (add-before 'configure 'autoreconf - (lambda _ (invoke "autoreconf" "-vfi") #t)) - (add-after 'autoreconf 'change-udev-group - (lambda _ - (substitute* "contrib/60-openocd.rules" - (("plugdev") "dialout")) - #t)) - (add-after 'install 'install-udev-rules - (lambda* (#:key outputs #:allow-other-keys) - (install-file "contrib/60-openocd.rules" - (string-append - (assoc-ref outputs "out") - "/lib/udev/rules.d/")) - #t))))) - (home-page "http://openocd.org") - (synopsis "On-Chip Debugger") - (description "OpenOCD provides on-chip programming and debugging support + (let ((commit "9a877a83a1c8b1f105cdc0de46c5cbc4d9e8799e") + (revision "0")) + (package + (name "openocd") + (version (string-append "0.10.0-" revision "." + (string-take commit 7))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.code.sf.net/p/openocd/code") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1q536cp80v2bcy6xwk08f1r2ljyw13jchx3a1z7d3ni3vqql7rc6")))) + (build-system gnu-build-system) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ("which" ,base:which) + ("pkg-config" ,pkg-config))) + (inputs + `(("hidapi" ,hidapi) + ("jimtcl" ,jimtcl) + ("libftdi" ,libftdi) + ("libjaylink" ,libjaylink) + ("libusb-compat" ,libusb-compat))) + (arguments + '(#:configure-flags + (append (list "--disable-werror" + "--enable-sysfsgpio" + "--disable-internal-jimtcl" + "--disable-internal-libjaylink") + (map (lambda (programmer) + (string-append "--enable-" programmer)) + '("amtjtagaccel" "armjtagew" "buspirate" "ftdi" + "gw16012" "jlink" "opendous" "osbdm" + "parport" "aice" "cmsis-dap" "dummy" "jtag_vpi" + "remote-bitbang" "rlink" "stlink" "ti-icdi" "ulink" + "usbprog" "vsllink" "usb-blaster-2" "usb_blaster" + "presto" "openjtag"))) + #:phases + (modify-phases %standard-phases + (replace 'bootstrap + (lambda _ + (patch-shebang "bootstrap") + (invoke "./bootstrap" "nosubmodule"))) + (add-after 'autoreconf 'change-udev-group + (lambda _ + (substitute* "contrib/60-openocd.rules" + (("plugdev") "dialout")) + #t)) + (add-after 'install 'install-udev-rules + (lambda* (#:key outputs #:allow-other-keys) + (install-file "contrib/60-openocd.rules" + (string-append + (assoc-ref outputs "out") + "/lib/udev/rules.d/")) + #t))))) + (home-page "http://openocd.org") + (synopsis "On-Chip Debugger") + (description "OpenOCD provides on-chip programming and debugging support with a layered architecture of JTAG interface and TAP support.") - (license license:gpl2+))) + (license license:gpl2+)))) ;; The commits for all propeller tools are the stable versions published at ;; https://github.com/propellerinc/propgcc in the release_1_0. According to diff --git a/gnu/packages/patches/openocd-nrf52.patch b/gnu/packages/patches/openocd-nrf52.patch deleted file mode 100644 index 0ec4348cb4..0000000000 --- a/gnu/packages/patches/openocd-nrf52.patch +++ /dev/null @@ -1,827 +0,0 @@ -This patch adds support for nRF52 series devices. It is patchset 7 from -, which has been tested, but not -merged yet in master. - -From: Michael Dietz -Date: Mon, 30 May 2016 12:50:44 +0000 (-0700) -Subject: Added support for nRF52 Series Devices. -X-Git-Url: http://openocd.zylin.com/gitweb?p=openocd.git;a=commitdiff_plain;h=9ba15633e221d9d72e320372ba8f49d3f30d4bce - -Added support for nRF52 Series Devices. - -Both nrf52.c and nrf52.cfg are based off of previous nRF51 files. -- Some possible race conditions with NVMC have been fixed in nRF52.c -- Removed nrf51_get_probed_chip_if_halted() as the core does not have to be halted to perform operations where it is called. -- Only registers that are needed by openOCD are defined, some registers in nRF51 don't exist in nRF52 and are removed. -- Some all around cleanup has been done. -- The protection mechanism is completely different on nRF52 and this has not been implemented yet - just prints a warning and returns for now. - -Change-Id: I4dd42c86f33f450709bb981806c2655f04aa6201 -Signed-off-by: Michael Dietz ---- - -diff --git a/src/flash/nor/Makefile.am b/src/flash/nor/Makefile.am -index 727e4f2..839667c 100644 ---- a/src/flash/nor/Makefile.am -+++ b/src/flash/nor/Makefile.am -@@ -36,6 +36,7 @@ NOR_DRIVERS = \ - %D%/niietcm4.c \ - %D%/non_cfi.c \ - %D%/nrf51.c \ -+ %D%/nrf52.c \ - %D%/numicro.c \ - %D%/ocl.c \ - %D%/pic32mx.c \ -diff --git a/src/flash/nor/drivers.c b/src/flash/nor/drivers.c -index 56a5cb2..071273e 100644 ---- a/src/flash/nor/drivers.c -+++ b/src/flash/nor/drivers.c -@@ -48,6 +48,7 @@ extern struct flash_driver mdr_flash; - extern struct flash_driver mrvlqspi_flash; - extern struct flash_driver niietcm4_flash; - extern struct flash_driver nrf51_flash; -+extern struct flash_driver nrf52_flash; - extern struct flash_driver numicro_flash; - extern struct flash_driver ocl_flash; - extern struct flash_driver pic32mx_flash; -@@ -100,6 +101,7 @@ static struct flash_driver *flash_drivers[] = { - &mrvlqspi_flash, - &niietcm4_flash, - &nrf51_flash, -+ &nrf52_flash, - &numicro_flash, - &ocl_flash, - &pic32mx_flash, -diff --git a/src/flash/nor/nrf52.c b/src/flash/nor/nrf52.c -new file mode 100644 -index 0000000..7f2bd35 ---- /dev/null -+++ b/src/flash/nor/nrf52.c -@@ -0,0 +1,733 @@ -+/*************************************************************************** -+ * Copyright (C) 2013 Synapse Product Development * -+ * Andrey Smirnov * -+ * Angus Gratton * -+ * Erdem U. Altunyurt * -+ * * -+ * This program is free software; you can redistribute it and/or modify * -+ * it under the terms of the GNU General Public License as published by * -+ * the Free Software Foundation; either version 2 of the License, or * -+ * (at your option) any later version. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see . * -+ ***************************************************************************/ -+ -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+ -+#include -+ -+#include "imp.h" -+#include -+#include -+#include -+ -+/* nRF52 Register addresses used by openOCD. */ -+#define NRF52_FLASH_BASE_ADDR (0x0) -+ -+#define NRF52_FICR_BASE_ADDR (0x10000000) -+#define NRF52_FICR_CODEPAGESIZE_ADDR (NRF52_FICR_BASE_ADDR | 0x010) -+#define NRF52_FICR_CODESIZE_ADDR (NRF52_FICR_BASE_ADDR | 0x014) -+ -+#define NRF52_UICR_BASE_ADDR (0x10001000) -+ -+#define NRF52_NVMC_BASE_ADDR (0x4001E000) -+#define NRF52_NVMC_READY_ADDR (NRF52_NVMC_BASE_ADDR | 0x400) -+#define NRF52_NVMC_CONFIG_ADDR (NRF52_NVMC_BASE_ADDR | 0x504) -+#define NRF52_NVMC_ERASEPAGE_ADDR (NRF52_NVMC_BASE_ADDR | 0x508) -+#define NRF52_NVMC_ERASEALL_ADDR (NRF52_NVMC_BASE_ADDR | 0x50C) -+#define NRF52_NVMC_ERASEUICR_ADDR (NRF52_NVMC_BASE_ADDR | 0x514) -+ -+/* nRF52 bit fields. */ -+enum nrf52_nvmc_config_bits { -+ NRF52_NVMC_CONFIG_REN = 0x0, -+ NRF52_NVMC_CONFIG_WEN = 0x01, -+ NRF52_NVMC_CONFIG_EEN = 0x02 -+}; -+ -+enum nrf52_nvmc_ready_bits { -+ NRF52_NVMC_BUSY = 0x0, -+ NRF52_NVMC_READY = 0x01 -+}; -+ -+/* nRF52 state information. */ -+struct nrf52_info { -+ uint32_t code_page_size; /* Size of FLASH page in bytes. */ -+ uint32_t code_memory_size; /* Size of Code FLASH region in bytes. */ -+ -+ struct { -+ bool probed; -+ int (*write) (struct flash_bank *bank, -+ struct nrf52_info *chip, -+ const uint8_t *buffer, uint32_t offset, uint32_t count); -+ } bank[2]; /* There are two regions in nRF52 FLASH - Code and UICR. */ -+ struct target *target; -+}; -+ -+static int nrf52_protect_check(struct flash_bank *bank); -+ -+static int nrf52_probe(struct flash_bank *bank) -+{ -+ int res; -+ struct nrf52_info *chip = bank->driver_priv; -+ assert(chip != NULL); -+ -+ res = target_read_u32(chip->target, -+ NRF52_FICR_CODEPAGESIZE_ADDR, -+ &chip->code_page_size); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Couldn't read code page size"); -+ return res; -+ } -+ -+ res = target_read_u32(chip->target, -+ NRF52_FICR_CODESIZE_ADDR, -+ &chip->code_memory_size); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Couldn't read code memory size"); -+ return res; -+ } -+ -+ chip->code_memory_size = chip->code_memory_size * chip->code_page_size; -+ -+ if (bank->base == NRF52_FLASH_BASE_ADDR) { -+ bank->size = chip->code_memory_size; -+ bank->num_sectors = bank->size / chip->code_page_size; -+ bank->sectors = calloc(bank->num_sectors, -+ sizeof((bank->sectors)[0])); -+ if (!bank->sectors) -+ return ERROR_FLASH_BANK_NOT_PROBED; -+ -+ /* Fill out the sector information: All nRF51 sectors are the same size. */ -+ for (int i = 0; i < bank->num_sectors; i++) { -+ bank->sectors[i].size = chip->code_page_size; -+ bank->sectors[i].offset = i * chip->code_page_size; -+ -+ /* Mark as unknown. */ -+ bank->sectors[i].is_erased = -1; -+ bank->sectors[i].is_protected = -1; -+ } -+ -+ nrf52_protect_check(bank); -+ -+ chip->bank[0].probed = true; -+ } else { /* This is the UICR bank. */ -+ bank->size = chip->code_page_size; -+ bank->num_sectors = 1; -+ bank->sectors = calloc(bank->num_sectors, -+ sizeof((bank->sectors)[0])); -+ if (!bank->sectors) -+ return ERROR_FLASH_BANK_NOT_PROBED; -+ -+ bank->sectors[0].size = bank->size; -+ bank->sectors[0].offset = 0; -+ -+ bank->sectors[0].is_erased = -1; -+ bank->sectors[0].is_protected = -1; -+ -+ chip->bank[1].probed = true; -+ } -+ -+ return ERROR_OK; -+} -+ -+static int nrf52_bank_is_probed(struct flash_bank *bank) -+{ -+ struct nrf52_info *chip = bank->driver_priv; -+ assert(chip != NULL); -+ -+ return chip->bank[bank->bank_number].probed; -+} -+ -+static int nrf52_auto_probe(struct flash_bank *bank) -+{ -+ if (!nrf52_bank_is_probed(bank)) -+ return nrf52_probe(bank); -+ else -+ return ERROR_OK; -+} -+ -+static int nrf52_wait_for_nvmc(struct nrf52_info *chip) -+{ -+ int res; -+ uint32_t ready; -+ int timeout = 100; -+ -+ do { -+ res = target_read_u32(chip->target, NRF52_NVMC_READY_ADDR, &ready); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Couldn't read NVMC_READY register"); -+ return res; -+ } -+ -+ if (ready == NRF52_NVMC_READY) -+ return ERROR_OK; -+ -+ alive_sleep(1); -+ } while (timeout--); -+ -+ LOG_DEBUG("Timed out waiting for the NVMC to be ready"); -+ return ERROR_FLASH_BUSY; -+} -+ -+static int nrf52_nvmc_erase_enable(struct nrf52_info *chip) -+{ -+ int res; -+ -+ res = nrf52_wait_for_nvmc(chip); -+ if (res != ERROR_OK) -+ return res; -+ -+ res = target_write_u32(chip->target, -+ NRF52_NVMC_CONFIG_ADDR, -+ NRF52_NVMC_CONFIG_EEN); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Failed to configure the NVMC for erasing"); -+ return res; -+ } -+ -+ return res; -+} -+ -+static int nrf52_nvmc_write_enable(struct nrf52_info *chip) -+{ -+ int res; -+ -+ res = nrf52_wait_for_nvmc(chip); -+ if (res != ERROR_OK) -+ return res; -+ -+ res = target_write_u32(chip->target, -+ NRF52_NVMC_CONFIG_ADDR, -+ NRF52_NVMC_CONFIG_WEN); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Failed to configure the NVMC for writing"); -+ return res; -+ } -+ -+ return res; -+} -+ -+static int nrf52_nvmc_read_only(struct nrf52_info *chip) -+{ -+ int res; -+ -+ res = nrf52_wait_for_nvmc(chip); -+ if (res != ERROR_OK) -+ return res; -+ -+ res = target_write_u32(chip->target, -+ NRF52_NVMC_CONFIG_ADDR, -+ NRF52_NVMC_CONFIG_REN); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Failed to configure the NVMC for read-only"); -+ return res; -+ } -+ -+ return res; -+} -+ -+static int nrf52_nvmc_generic_erase(struct nrf52_info *chip, -+ uint32_t erase_register, -+ uint32_t erase_value) -+{ -+ int res; -+ -+ res = nrf52_nvmc_erase_enable(chip); -+ if (res != ERROR_OK) -+ return res; -+ -+ res = target_write_u32(chip->target, -+ erase_register, -+ erase_value); -+ if (res != ERROR_OK) -+ LOG_ERROR("Failed to write NVMC erase register"); -+ -+ return nrf52_nvmc_read_only(chip); -+} -+ -+static int nrf52_protect_check(struct flash_bank *bank) -+{ -+ LOG_WARNING("nrf52_protect_check() is not implemented for nRF52 series devices yet"); -+ return ERROR_OK; -+} -+ -+static int nrf52_protect(struct flash_bank *bank, int set, int first, int last) -+{ -+ LOG_WARNING("nrf52_protect() is not implemented for nRF52 series devices yet"); -+ return ERROR_OK; -+} -+ -+static struct flash_sector *nrf52_find_sector_by_address(struct flash_bank *bank, uint32_t address) -+{ -+ struct nrf52_info *chip = bank->driver_priv; -+ assert(chip != NULL); -+ -+ for (int i = 0; i < bank->num_sectors; i++) -+ if (bank->sectors[i].offset <= address && -+ address < (bank->sectors[i].offset + chip->code_page_size)) { -+ return &bank->sectors[i]; -+ } -+ -+ return NULL; -+} -+ -+static int nrf52_erase_all(struct nrf52_info *chip) -+{ -+ LOG_DEBUG("Erasing all non-volatile memory"); -+ return nrf52_nvmc_generic_erase(chip, -+ NRF52_NVMC_ERASEALL_ADDR, -+ 0x01); -+} -+ -+static int nrf52_erase_page(struct flash_bank *bank, -+ struct nrf52_info *chip, -+ struct flash_sector *sector) -+{ -+ int res; -+ -+ LOG_DEBUG("Erasing page at 0x%"PRIx32, sector->offset); -+ if (sector->is_protected == 1) { -+ LOG_ERROR("Cannot erase protected sector at 0x%" PRIx32, sector->offset); -+ return ERROR_FAIL; -+ } -+ -+ if (bank->base == NRF52_UICR_BASE_ADDR) { -+ res = nrf52_nvmc_generic_erase(chip, -+ NRF52_NVMC_ERASEUICR_ADDR, -+ 0x00000001); -+ } else { -+ res = nrf52_nvmc_generic_erase(chip, -+ NRF52_NVMC_ERASEPAGE_ADDR, -+ sector->offset); -+ } -+ -+ if (res == ERROR_OK) -+ sector->is_erased = 1; -+ return res; -+} -+ -+static const uint8_t nrf52_flash_write_code[] = { -+ /* See contrib/loaders/flash/cortex-m0.S */ -+ /* : */ -+ 0x0d, 0x68, /* ldr r5, [r1, #0] */ -+ 0x00, 0x2d, /* cmp r5, #0 */ -+ 0x0b, 0xd0, /* beq.n 1e */ -+ 0x4c, 0x68, /* ldr r4, [r1, #4] */ -+ 0xac, 0x42, /* cmp r4, r5 */ -+ 0xf9, 0xd0, /* beq.n 0 */ -+ 0x20, 0xcc, /* ldmia r4!, {r5} */ -+ 0x20, 0xc3, /* stmia r3!, {r5} */ -+ 0x94, 0x42, /* cmp r4, r2 */ -+ 0x01, 0xd3, /* bcc.n 18 */ -+ 0x0c, 0x46, /* mov r4, r1 */ -+ 0x08, 0x34, /* adds r4, #8 */ -+ /* : */ -+ 0x4c, 0x60, /* str r4, [r1, #4] */ -+ 0x04, 0x38, /* subs r0, #4 */ -+ 0xf0, 0xd1, /* bne.n 0 */ -+ /* : */ -+ 0x00, 0xbe /* bkpt 0x0000 */ -+}; -+ -+ -+/* Start a low level flash write for the specified region */ -+static int nrf52_ll_flash_write(struct nrf52_info *chip, uint32_t offset, const uint8_t *buffer, uint32_t bytes) -+{ -+ struct target *target = chip->target; -+ uint32_t buffer_size = 8192; -+ struct working_area *write_algorithm; -+ struct working_area *source; -+ uint32_t address = NRF52_FLASH_BASE_ADDR + offset; -+ struct reg_param reg_params[4]; -+ struct armv7m_algorithm armv7m_info; -+ int retval = ERROR_OK; -+ -+ LOG_DEBUG("Writing buffer to flash offset=0x%"PRIx32" bytes=0x%"PRIx32, offset, bytes); -+ assert(bytes % 4 == 0); -+ -+ /* allocate working area with flash programming code */ -+ if (target_alloc_working_area(target, sizeof(nrf52_flash_write_code), -+ &write_algorithm) != ERROR_OK) { -+ LOG_WARNING("no working area available, falling back to slow memory writes"); -+ -+ for (; bytes > 0; bytes -= 4) { -+ retval = target_write_memory(chip->target, -+ offset, 4, 1, buffer); -+ if (retval != ERROR_OK) -+ return retval; -+ -+ retval = nrf52_wait_for_nvmc(chip); -+ if (retval != ERROR_OK) -+ return retval; -+ -+ offset += 4; -+ buffer += 4; -+ } -+ -+ return ERROR_OK; -+ } -+ -+ LOG_WARNING("using fast async flash loader. This is currently supported"); -+ LOG_WARNING("only with ST-Link and CMSIS-DAP. If you have issues, add"); -+ LOG_WARNING("\"set WORKAREASIZE 0\" before sourcing nrf52.cfg to disable it"); -+ -+ retval = target_write_buffer(target, write_algorithm->address, -+ sizeof(nrf52_flash_write_code), -+ nrf52_flash_write_code); -+ if (retval != ERROR_OK) -+ return retval; -+ -+ /* memory buffer */ -+ while (target_alloc_working_area(target, buffer_size, &source) != ERROR_OK) { -+ buffer_size /= 2; -+ buffer_size &= ~3UL; /* Make sure it's 4 byte aligned */ -+ if (buffer_size <= 256) { -+ /* free working area, write algorithm already allocated */ -+ target_free_working_area(target, write_algorithm); -+ -+ LOG_WARNING("No large enough working area available, can't do block memory writes"); -+ return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; -+ } -+ } -+ -+ armv7m_info.common_magic = ARMV7M_COMMON_MAGIC; -+ armv7m_info.core_mode = ARM_MODE_THREAD; -+ -+ init_reg_param(®_params[0], "r0", 32, PARAM_IN_OUT); /* byte count */ -+ init_reg_param(®_params[1], "r1", 32, PARAM_OUT); /* buffer start */ -+ init_reg_param(®_params[2], "r2", 32, PARAM_OUT); /* buffer end */ -+ init_reg_param(®_params[3], "r3", 32, PARAM_IN_OUT); /* target address */ -+ -+ buf_set_u32(reg_params[0].value, 0, 32, bytes); -+ buf_set_u32(reg_params[1].value, 0, 32, source->address); -+ buf_set_u32(reg_params[2].value, 0, 32, source->address + source->size); -+ buf_set_u32(reg_params[3].value, 0, 32, address); -+ -+ retval = target_run_flash_async_algorithm(target, buffer, bytes/4, 4, -+ 0, NULL, -+ 4, reg_params, -+ source->address, source->size, -+ write_algorithm->address, 0, -+ &armv7m_info); -+ -+ target_free_working_area(target, source); -+ target_free_working_area(target, write_algorithm); -+ -+ destroy_reg_param(®_params[0]); -+ destroy_reg_param(®_params[1]); -+ destroy_reg_param(®_params[2]); -+ destroy_reg_param(®_params[3]); -+ -+ return retval; -+} -+ -+/* Check and erase flash sectors in specified range, then start a low level page write. -+ start/end must be sector aligned. -+*/ -+static int nrf52_write_pages(struct flash_bank *bank, uint32_t start, uint32_t end, const uint8_t *buffer) -+{ -+ int res; -+ uint32_t offset; -+ struct flash_sector *sector; -+ struct nrf52_info *chip = bank->driver_priv; -+ assert(chip != NULL); -+ -+ assert(start % chip->code_page_size == 0); -+ assert(end % chip->code_page_size == 0); -+ -+ /* Erase all sectors */ -+ for (offset = start; offset < end; offset += chip->code_page_size) { -+ sector = nrf52_find_sector_by_address(bank, offset); -+ -+ if (sector == NULL) { -+ LOG_ERROR("Invalid sector @ 0x%08"PRIx32, offset); -+ return ERROR_FLASH_SECTOR_INVALID; -+ } -+ -+ if (sector->is_protected == 1) { -+ LOG_ERROR("Can't erase protected sector @ 0x%08"PRIx32, offset); -+ return ERROR_FAIL; -+ } -+ -+ if (sector->is_erased != 1) { /* 1 = erased, 0= not erased, -1 = unknown */ -+ res = nrf52_erase_page(bank, chip, sector); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Failed to erase sector @ 0x%08"PRIx32, sector->offset); -+ return res; -+ } -+ } -+ sector->is_erased = 1; -+ } -+ -+ res = nrf52_nvmc_write_enable(chip); -+ if (res != ERROR_OK) -+ return res; -+ -+ res = nrf52_ll_flash_write(chip, start, buffer, (end - start)); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Failed to write FLASH"); -+ nrf52_nvmc_read_only(chip); -+ return res; -+ } -+ -+ return nrf52_nvmc_read_only(chip); -+} -+ -+static int nrf52_erase(struct flash_bank *bank, int first, int last) -+{ -+ int res = ERROR_OK; -+ struct nrf52_info *chip = bank->driver_priv; -+ assert(chip != NULL); -+ -+ /* For each sector to be erased */ -+ for (int s = first; s <= last && res == ERROR_OK; s++) -+ res = nrf52_erase_page(bank, chip, &bank->sectors[s]); -+ -+ return res; -+} -+ -+static int nrf52_code_flash_write(struct flash_bank *bank, -+ struct nrf52_info *chip, -+ const uint8_t *buffer, uint32_t offset, uint32_t count) -+{ -+ int res; -+ /* Need to perform reads to fill any gaps we need to preserve in the first page, -+ before the start of buffer, or in the last page, after the end of buffer */ -+ uint32_t first_page = offset / chip->code_page_size; -+ uint32_t last_page = DIV_ROUND_UP(offset+count, chip->code_page_size); -+ -+ uint32_t first_page_offset = first_page * chip->code_page_size; -+ uint32_t last_page_offset = last_page * chip->code_page_size; -+ -+ LOG_DEBUG("Padding write from 0x%08"PRIx32"-0x%08"PRIx32" as 0x%08"PRIx32"-0x%08"PRIx32, -+ offset, offset+count, first_page_offset, last_page_offset); -+ -+ uint32_t page_cnt = last_page - first_page; -+ uint8_t buffer_to_flash[page_cnt * chip->code_page_size]; -+ -+ /* Fill in any space between start of first page and start of buffer */ -+ uint32_t pre = offset - first_page_offset; -+ if (pre > 0) { -+ res = target_read_memory(bank->target, first_page_offset, 1, pre, buffer_to_flash); -+ if (res != ERROR_OK) -+ return res; -+ } -+ -+ /* Fill in main contents of buffer */ -+ memcpy(buffer_to_flash + pre, buffer, count); -+ -+ /* Fill in any space between end of buffer and end of last page */ -+ uint32_t post = last_page_offset - (offset + count); -+ if (post > 0) { -+ /* Retrieve the full row contents from Flash */ -+ res = target_read_memory(bank->target, offset + count, 1, post, buffer_to_flash + pre + count); -+ if (res != ERROR_OK) -+ return res; -+ } -+ -+ return nrf52_write_pages(bank, first_page_offset, last_page_offset, buffer_to_flash); -+} -+ -+static int nrf52_uicr_flash_write(struct flash_bank *bank, -+ struct nrf52_info *chip, -+ const uint8_t *buffer, uint32_t offset, uint32_t count) -+{ -+ int res; -+ uint32_t nrf52_uicr_size = chip->code_page_size; -+ uint8_t uicr[nrf52_uicr_size]; -+ struct flash_sector *sector = &bank->sectors[0]; -+ -+ if ((offset + count) > nrf52_uicr_size) -+ return ERROR_FAIL; -+ -+ res = target_read_memory(bank->target, NRF52_UICR_BASE_ADDR, 1, nrf52_uicr_size, uicr); -+ -+ if (res != ERROR_OK) -+ return res; -+ -+ if (sector->is_erased != 1) { -+ res = nrf52_erase_page(bank, chip, sector); -+ if (res != ERROR_OK) -+ return res; -+ } -+ -+ memcpy(&uicr[offset], buffer, count); -+ -+ res = nrf52_nvmc_write_enable(chip); -+ if (res != ERROR_OK) -+ return res; -+ -+ res = nrf52_ll_flash_write(chip, NRF52_UICR_BASE_ADDR, uicr, nrf52_uicr_size); -+ if (res != ERROR_OK) { -+ nrf52_nvmc_read_only(chip); -+ return res; -+ } -+ -+ return nrf52_nvmc_read_only(chip); -+} -+ -+ -+static int nrf52_write(struct flash_bank *bank, const uint8_t *buffer, -+ uint32_t offset, uint32_t count) -+{ -+ struct nrf52_info *chip = bank->driver_priv; -+ assert(chip != NULL); -+ -+ return chip->bank[bank->bank_number].write(bank, chip, buffer, offset, count); -+} -+ -+ -+FLASH_BANK_COMMAND_HANDLER(nrf52_flash_bank_command) -+{ -+ static struct nrf52_info *chip; -+ -+ assert(bank != NULL); -+ -+ switch (bank->base) { -+ case NRF52_FLASH_BASE_ADDR: -+ bank->bank_number = 0; -+ break; -+ case NRF52_UICR_BASE_ADDR: -+ bank->bank_number = 1; -+ break; -+ default: -+ LOG_ERROR("Invalid bank address 0x%08" PRIx32, bank->base); -+ return ERROR_FAIL; -+ } -+ -+ if (!chip) { -+ /* Create a new chip */ -+ chip = calloc(1, sizeof(*chip)); -+ assert(chip != NULL); -+ -+ chip->target = bank->target; -+ } -+ -+ switch (bank->base) { -+ case NRF52_FLASH_BASE_ADDR: -+ chip->bank[bank->bank_number].write = nrf52_code_flash_write; -+ break; -+ case NRF52_UICR_BASE_ADDR: -+ chip->bank[bank->bank_number].write = nrf52_uicr_flash_write; -+ break; -+ } -+ -+ chip->bank[bank->bank_number].probed = false; -+ bank->driver_priv = chip; -+ -+ return ERROR_OK; -+} -+ -+COMMAND_HANDLER(nrf52_handle_mass_erase_command) -+{ -+ int res; -+ struct flash_bank *bank = NULL; -+ struct target *target = get_current_target(CMD_CTX); -+ -+ res = get_flash_bank_by_addr(target, NRF52_FLASH_BASE_ADDR, true, &bank); -+ if (res != ERROR_OK) -+ return res; -+ -+ assert(bank != NULL); -+ -+ struct nrf52_info *chip = bank->driver_priv; -+ assert(chip != NULL); -+ -+ res = nrf52_erase_all(chip); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Failed to erase the chip"); -+ nrf52_protect_check(bank); -+ return res; -+ } -+ -+ for (int i = 0; i < bank->num_sectors; i++) -+ bank->sectors[i].is_erased = 1; -+ -+ res = nrf52_protect_check(bank); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Failed to check chip's write protection"); -+ return res; -+ } -+ -+ res = get_flash_bank_by_addr(target, NRF52_UICR_BASE_ADDR, true, &bank); -+ if (res != ERROR_OK) -+ return res; -+ -+ bank->sectors[0].is_erased = 1; -+ -+ return ERROR_OK; -+} -+ -+static int nrf52_info(struct flash_bank *bank, char *buf, int buf_size) -+{ -+ int res; -+ uint32_t ficr[2]; -+ struct nrf52_info *chip = bank->driver_priv; -+ assert(chip != NULL); -+ -+ res = target_read_u32(chip->target, NRF52_FICR_CODEPAGESIZE_ADDR, &ficr[0]); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Couldn't read NVMC_READY register"); -+ return res; -+ } -+ -+ res = target_read_u32(chip->target, NRF52_FICR_CODESIZE_ADDR, &ficr[1]); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Couldn't read NVMC_READY register"); -+ return res; -+ } -+ -+ snprintf(buf, buf_size, -+ "\n--------nRF52 Series Device--------\n\n" -+ "\n[factory information control block]\n" -+ "code page size: %"PRIu32"B\n" -+ "code memory size: %"PRIu32"kB\n", -+ ficr[0], -+ (ficr[1] * ficr[0]) / 1024); -+ -+ return ERROR_OK; -+} -+ -+static const struct command_registration nrf52_exec_command_handlers[] = { -+ { -+ .name = "mass_erase", -+ .handler = nrf52_handle_mass_erase_command, -+ .mode = COMMAND_EXEC, -+ .help = "Erase all flash contents of the chip.", -+ }, -+ COMMAND_REGISTRATION_DONE -+}; -+ -+static const struct command_registration nrf52_command_handlers[] = { -+ { -+ .name = "nrf52", -+ .mode = COMMAND_ANY, -+ .help = "nrf52 flash command group", -+ .usage = "", -+ .chain = nrf52_exec_command_handlers, -+ }, -+ COMMAND_REGISTRATION_DONE -+}; -+ -+struct flash_driver nrf52_flash = { -+ .name = "nrf52", -+ .commands = nrf52_command_handlers, -+ .flash_bank_command = nrf52_flash_bank_command, -+ .info = nrf52_info, -+ .erase = nrf52_erase, -+ .protect = nrf52_protect, -+ .write = nrf52_write, -+ .read = default_flash_read, -+ .probe = nrf52_probe, -+ .auto_probe = nrf52_auto_probe, -+ .erase_check = default_flash_blank_check, -+ .protect_check = nrf52_protect_check, -+}; -diff --git a/tcl/target/nrf52.cfg b/tcl/target/nrf52.cfg -index c1cbf1a..41a22ff 100644 ---- a/tcl/target/nrf52.cfg -+++ b/tcl/target/nrf52.cfg -@@ -10,6 +10,13 @@ if { [info exists CHIPNAME] } { - set _CHIPNAME nrf52 - } - -+# Work-area is a space in RAM used for flash programming, by default use 16kB. -+if { [info exists WORKAREASIZE] } { -+ set _WORKAREASIZE $WORKAREASIZE -+} else { -+ set _WORKAREASIZE 0x4000 -+} -+ - if { [info exists CPUTAPID] } { - set _CPUTAPID $CPUTAPID - } else { -@@ -22,7 +29,15 @@ set _TARGETNAME $_CHIPNAME.cpu - target create $_TARGETNAME cortex_m -chain-position $_TARGETNAME - - adapter_khz 10000 -+$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0 - - if { ![using_hla] } { - cortex_m reset_config sysresetreq - } -+ -+flash bank $_CHIPNAME.flash nrf52 0x00000000 0 1 1 $_TARGETNAME -+flash bank $_CHIPNAME.uicr nrf52 0x10001000 0 1 1 $_TARGETNAME -+ -+adapter_khz 1000 -+ -+$_TARGETNAME configure -event reset-end {} -- cgit v1.2.3 From 3b026eb3b1dd92c653d1a640b1280b96cfea3084 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 23 Oct 2020 09:34:50 -0400 Subject: Revert "gnu: u-boot: Update to 2020.10." This reverts commit fe6067fc248673d6509b557ff010778f7762382f. This commit broke u-boot-tools. --- gnu/packages/bootloaders.scm | 4 ++-- gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 05380fc42b..d1de5cea4e 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -446,7 +446,7 @@ tree binary files. These are board description files used by Linux and BSD.") (define u-boot (package (name "u-boot") - (version "2020.10") + (version "2020.07") (source (origin (method url-fetch) (uri (string-append @@ -454,7 +454,7 @@ tree binary files. These are board description files used by Linux and BSD.") "u-boot-" version ".tar.bz2")) (sha256 (base32 - "08m6f1bh4pdcqbxf983qdb66ccd5vak5cbzc114yf3jwq2yinj0d")))) + "0sjzy262x93aaqd6z24ziaq19xjjjk5f577ivf768vmvwsgbzxf1")))) (native-inputs `(("bc" ,bc) ("bison" ,bison) diff --git a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch index d6c1987718..29dec4f5e9 100644 --- a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch +++ b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch @@ -32,9 +32,9 @@ Index: u-boot/configs/sifive_fu540_defconfig =================================================================== --- u-boot.orig/configs/sifive_fu540_defconfig +++ u-boot/configs/sifive_fu540_defconfig -@@ -27,3 +27,5 @@ CONFIG_SPL_DM_SEQ_ALIAS=y - CONFIG_SPL_CLK=y +@@ -12,3 +12,5 @@ CONFIG_DISPLAY_BOARDINFO=y + CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00" + CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM_MTD=y - CONFIG_DM_RESET=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};" -- cgit v1.2.3 From d24e37f36e2a89c0613bf5064e59b9236bca2ae1 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 23 Oct 2020 17:41:55 +0300 Subject: gnu: rcs: Update to 5.10.0. * gnu/packages/version-control.scm (rcs): Update to 5.10.0. [source]: Update patches. [arguments]: Remove field. * gnu/packages/patches/rcs-5.9.4-noreturn.patch: Remove file. * gnu/packages/patches/rcs-5.10.0-no-stdin.patch: Add file. * gnu/local.mk (dist_patch_DATA): Register changes. --- gnu/local.mk | 2 +- gnu/packages/patches/rcs-5.10.0-no-stdin.patch | 57 ++++++++++++++++ gnu/packages/patches/rcs-5.9.4-noreturn.patch | 94 -------------------------- gnu/packages/version-control.scm | 15 +--- 4 files changed, 61 insertions(+), 107 deletions(-) create mode 100644 gnu/packages/patches/rcs-5.10.0-no-stdin.patch delete mode 100644 gnu/packages/patches/rcs-5.9.4-noreturn.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 31385d0db6..1a01360d72 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1542,7 +1542,7 @@ dist_patch_DATA = \ %D%/packages/patches/raptor2-heap-overflow.patch \ %D%/packages/patches/ratpoints-sturm_and_rp_private.patch \ %D%/packages/patches/ratpoison-shell.patch \ - %D%/packages/patches/rcs-5.9.4-noreturn.patch \ + %D%/packages/patches/rcs-5.10.0-no-stdin.patch \ %D%/packages/patches/rct-add-missing-headers.patch \ %D%/packages/patches/readline-link-ncurses.patch \ %D%/packages/patches/readline-6.2-CVE-2014-2524.patch \ diff --git a/gnu/packages/patches/rcs-5.10.0-no-stdin.patch b/gnu/packages/patches/rcs-5.10.0-no-stdin.patch new file mode 100644 index 0000000000..56edfe7b65 --- /dev/null +++ b/gnu/packages/patches/rcs-5.10.0-no-stdin.patch @@ -0,0 +1,57 @@ +http://git.savannah.gnu.org/cgit/rcs.git/patch/?id=8883c4f5a29be18e9ea09bd27a7b660830de45bb + + +From 8883c4f5a29be18e9ea09bd27a7b660830de45bb Mon Sep 17 00:00:00 2001 +From: Thien-Thi Nguyen +Date: Fri, 23 Oct 2020 09:23:49 -0400 +Subject: [v] Don't test signal handling if stdin not ok. + + + +* tests/t632: If stdin is not open and connected to +a tty, skip the signal handling portion of the test. +--- + tests/ChangeLog | 9 +++++++++ + tests/t632 | 9 +++++++++ + 2 files changed, 18 insertions(+) + +diff --git a/tests/ChangeLog b/tests/ChangeLog +index c3715c0..0565058 100644 +--- a/tests/ChangeLog ++++ b/tests/ChangeLog +@@ -1,3 +1,12 @@ ++2020-10-23 Thien-Thi Nguyen ++ ++ [v] Don't test signal handling if stdin not ok. ++ ++ ++ ++ * t632: If stdin is not open and connected to ++ a tty, skip the signal handling portion of the test. ++ + 2020-10-20 Thien-Thi Nguyen + + Release: 5.10.0 +diff --git a/tests/t632 b/tests/t632 +index df6acc9..677ec8c 100644 +--- a/tests/t632 ++++ b/tests/t632 +@@ -40,6 +40,15 @@ echo | co -l -I $w \ + # (This is skipped if GNU coreutils timeout(1) is not available.) + ## + ++# ++# The timeout test needs co(1) to block on input. ++# If stdin is not open and connected to a tty, skip out. ++if test -t 0 ; then ++ echo STDIN OK ++else ++ exit 0 ++fi ++ + # TODO: Don't be lame! Pick one: + # (a) Mimic timeout(1) w/ sh commands. + # (b) Incorporate heart of timeout(1) into ./btdt and use that. +-- +cgit v1.2.1 + diff --git a/gnu/packages/patches/rcs-5.9.4-noreturn.patch b/gnu/packages/patches/rcs-5.9.4-noreturn.patch deleted file mode 100644 index 0c0c044ed5..0000000000 --- a/gnu/packages/patches/rcs-5.9.4-noreturn.patch +++ /dev/null @@ -1,94 +0,0 @@ -Builds with GCC-5 failed due to misplaced `_Noreturn (__attribute__((noreturn)))` -statement. - -Patch copied from upstream source repository: - -http://git.savannah.gnu.org/cgit/rcs.git/commit/?h=p&id=260704a9164dd34cf7128d6b1e88075ffa3be054 - -Upstream bug URL: - -https://savannah.gnu.org/bugs/?49568 - -commit 260704a9164dd34cf7128d6b1e88075ffa3be054 -Author: Thien-Thi Nguyen -Date: Thu Jun 18 21:25:53 2015 +0200 - - [C slog] Move ‘exiting’ to beginning of func decl. - - Apparently, ‘gcc --std=c11’ does not abide the ‘exiting’ - attribute appearing at the end of the func decl. - Reported by Romain Francoise. - See also . - - * src/b-complain.h (generic_fatal, fatal_syntax, fatal_sys) - * src/b-fb.h (Ierror, Oerror) - * src/base.h (unexpected_EOF, thank_you_and_goodnight): - Move ‘exiting’ attribute to beginning of func decl. - -diff --git a/src/b-complain.h b/src/b-complain.h -index 0ffd157..ea0ffc5 100644 ---- a/src/b-complain.h -+++ b/src/b-complain.h -@@ -32,12 +32,14 @@ extern void generic_warn (char const *who, char const *fmt, ...) - printf_string (2, 3); - extern void generic_error (char const *who, char const *fmt, ...) - printf_string (2, 3); -+exiting - extern void generic_fatal (char const *who, char const *fmt, ...) -- printf_string (2, 3) exiting; -+ printf_string (2, 3); -+exiting - extern void fatal_syntax (size_t lno, char const *fmt, ...) -- printf_string (2, 3) exiting; --extern void fatal_sys (char const *who) -- exiting; -+ printf_string (2, 3); -+exiting -+extern void fatal_sys (char const *who); - - /* Idioms. Here, prefix P stands for "program" (general operation); - M for "manifestation"; R for "repository". */ -diff --git a/src/b-fb.h b/src/b-fb.h -index c9850e7..bf5eaf8 100644 ---- a/src/b-fb.h -+++ b/src/b-fb.h -@@ -21,9 +21,11 @@ - */ - - extern int change_mode (int fd, mode_t mode); --extern void Ierror (void) exiting; -+exiting -+extern void Ierror (void); - extern void testIerror (FILE *f); --extern void Oerror (void) exiting; -+exiting -+extern void Oerror (void); - extern void testOerror (FILE *o); - extern FILE *fopen_safer (char const *filename, char const *type); - extern void Ozclose (FILE **p); -diff --git a/src/base.h b/src/base.h -index 163ee09..5e7a9f8 100644 ---- a/src/base.h -+++ b/src/base.h -@@ -755,8 +755,8 @@ int dorewrite (bool lockflag, int changed); - int donerewrite (int changed, time_t newRCStime); - void ORCSclose (void); - void ORCSerror (void); --void unexpected_EOF (void) -- exiting; -+exiting -+void unexpected_EOF (void); - void initdiffcmd (struct diffcmd *dc); - int getdiffcmd (struct fro *finfile, bool delimiter, - FILE *foutfile, struct diffcmd *dc); -@@ -831,8 +831,8 @@ char const *date2str (char const date[datesize], - char datebuf[datesize + zonelenmax]); - - /* rcsutil */ --void thank_you_and_goodnight (int const how) -- exiting; -+exiting -+void thank_you_and_goodnight (int const how); - /* These are for ‘thank_you_and_goodnight’. */ - #define TYAG_ORCSERROR (1 << 3) - #define TYAG_DIRTMPUNLINK (1 << 2) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index fe61bc8fce..0e0e59d1a2 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -1799,26 +1799,17 @@ projects, from individuals to large-scale enterprise operations.") (define-public rcs (package (name "rcs") - (version "5.9.4") + (version "5.10.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/rcs/rcs-" version ".tar.xz")) (sha256 (base32 - "1zsx7bb0rgvvvisiy4zlixf56ay8wbd9qqqcp1a1g0m1gl6mlg86")) - (patches (search-patches "rcs-5.9.4-noreturn.patch")))) + "1if5pa4iip2p70gljm54nggfdnsfjxa4cqz8fpj07lvsijary39s")) + (patches (search-patches "rcs-5.10.0-no-stdin.patch")))) (build-system gnu-build-system) (native-inputs `(("ed" ,ed))) - (arguments - `(#:phases (modify-phases %standard-phases - (add-before 'check 'disable-t810 - ;; See https://savannah.gnu.org/bugs/index.php?52288 - ;; Back-porting the fix is non-trivial, so disable for now. - (lambda _ - (substitute* "tests/Makefile" - ((" t810 \\\\\n") "")) - #t))))) (home-page "https://www.gnu.org/software/rcs/") (synopsis "Per-file local revision control system") (description -- cgit v1.2.3 From 26c5e5af701b82b198c7dabf75e8c96937418e1a Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Sun, 18 Oct 2020 15:00:55 -0700 Subject: gnu: u-boot: Update to 2020.10. * gnu/packages/bootloaders (u-boot): Update to 2020.10. * gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch: Refresh patch. --- gnu/packages/bootloaders.scm | 4 ++-- gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index d1de5cea4e..05380fc42b 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -446,7 +446,7 @@ tree binary files. These are board description files used by Linux and BSD.") (define u-boot (package (name "u-boot") - (version "2020.07") + (version "2020.10") (source (origin (method url-fetch) (uri (string-append @@ -454,7 +454,7 @@ tree binary files. These are board description files used by Linux and BSD.") "u-boot-" version ".tar.bz2")) (sha256 (base32 - "0sjzy262x93aaqd6z24ziaq19xjjjk5f577ivf768vmvwsgbzxf1")))) + "08m6f1bh4pdcqbxf983qdb66ccd5vak5cbzc114yf3jwq2yinj0d")))) (native-inputs `(("bc" ,bc) ("bison" ,bison) diff --git a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch index 29dec4f5e9..d6c1987718 100644 --- a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch +++ b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch @@ -32,9 +32,9 @@ Index: u-boot/configs/sifive_fu540_defconfig =================================================================== --- u-boot.orig/configs/sifive_fu540_defconfig +++ u-boot/configs/sifive_fu540_defconfig -@@ -12,3 +12,5 @@ CONFIG_DISPLAY_BOARDINFO=y - CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00" - CONFIG_SYS_RELOC_GD_ENV_ADDR=y +@@ -27,3 +27,5 @@ CONFIG_SPL_DM_SEQ_ALIAS=y + CONFIG_SPL_CLK=y CONFIG_DM_MTD=y + CONFIG_DM_RESET=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};" -- cgit v1.2.3 From a9291a28b233dba20a523da679bb446643abf977 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 25 Oct 2020 10:20:55 +0000 Subject: gnu: netcdf: Update to 4.7.4. This will fix an issue building qgis. * gnu/packages/maths.scm (netcdf): Update to 4.7.4. [source]: Remove the netcdf-tst_h_par.patch, also change the naming of the source tarball, as the name seems to have changed for recent releases. [inputs]: Update hdf5 and add curl. * gnu/packages/patches/netcdf-tst_h_par.patch: Delete. * gnu/local.mk (dist_patch_DATA): Remove deleted patch. --- gnu/local.mk | 1 - gnu/packages/maths.scm | 18 ++++++++---------- gnu/packages/patches/netcdf-date-time.patch | 6 +++--- gnu/packages/patches/netcdf-tst_h_par.patch | 21 --------------------- 4 files changed, 11 insertions(+), 35 deletions(-) delete mode 100644 gnu/packages/patches/netcdf-tst_h_par.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 1a01360d72..0ada3b727b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1355,7 +1355,6 @@ dist_patch_DATA = \ %D%/packages/patches/m4-gnulib-libio.patch \ %D%/packages/patches/ncompress-fix-softlinks.patch \ %D%/packages/patches/netcdf-date-time.patch \ - %D%/packages/patches/netcdf-tst_h_par.patch \ %D%/packages/patches/netpbm-CVE-2017-2586.patch \ %D%/packages/patches/netpbm-CVE-2017-2587.patch \ %D%/packages/patches/netsurf-message-timestamp.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index f7565dd885..d2631501aa 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -1538,17 +1538,17 @@ similar to MATLAB, GNU Octave or SciPy.") (define-public netcdf (package (name "netcdf") - (version "4.4.1.1") + (version "4.7.4") (source (origin (method url-fetch) - (uri (string-append "ftp://ftp.unidata.ucar.edu/pub/netcdf/" - "netcdf-" version ".tar.gz")) + (uri (string-append + "https://www.unidata.ucar.edu/downloads/netcdf/ftp/" + "netcdf-c-" version ".tar.gz")) (sha256 (base32 - "1blc7ik5yin7i0ls2kag0a9xjk12m0dzx6v1x88az3ras3scci2d")) - (patches (search-patches "netcdf-date-time.patch" - "netcdf-tst_h_par.patch")))) + "1a2fpp15a2rl1m50gcvvzd9y6bavl6vjf9zzf63sz5gdmq06yiqf")) + (patches (search-patches "netcdf-date-time.patch")))) (build-system gnu-build-system) (native-inputs `(("m4" ,m4) @@ -1556,10 +1556,8 @@ similar to MATLAB, GNU Octave or SciPy.") ("graphviz" ,graphviz))) (inputs `(("hdf4" ,hdf4-alt) - - ;; XXX: The 'tst_nccopy4.sh' test fails when using hdf5-1.10. - ("hdf5" ,hdf5-1.8) - + ("hdf5" ,hdf5) + ("curl" ,curl) ("zlib" ,zlib) ("libjpeg" ,libjpeg-turbo))) (arguments diff --git a/gnu/packages/patches/netcdf-date-time.patch b/gnu/packages/patches/netcdf-date-time.patch index a4e7925aa1..0bdfc55299 100644 --- a/gnu/packages/patches/netcdf-date-time.patch +++ b/gnu/packages/patches/netcdf-date-time.patch @@ -3,9 +3,9 @@ @@ -13,7 +13,7 @@ #endif - /* Tell the user the version of netCDF. */ + /** @internal The version string for the library, used by + * nc_inq_libvers(). */ -static const char nc_libvers[] = PACKAGE_VERSION " of "__DATE__" "__TIME__" $"; -+static const char nc_libvers[] = PACKAGE_VERSION" $"; ++static const char nc_libvers[] = PACKAGE_VERSION " $"; /** - \defgroup lib_version Library Version diff --git a/gnu/packages/patches/netcdf-tst_h_par.patch b/gnu/packages/patches/netcdf-tst_h_par.patch deleted file mode 100644 index ac14a4c0a2..0000000000 --- a/gnu/packages/patches/netcdf-tst_h_par.patch +++ /dev/null @@ -1,21 +0,0 @@ -From a83702834938b23cc2e843589aa223e2024a7e6f Mon Sep 17 00:00:00 2001 -From: Orion Poplawski -Date: Tue, 29 Nov 2016 11:48:01 -0700 -Subject: [PATCH] Add missing #include "err_macros.h" to tst_h_par.c - ---- - h5_test/tst_h_par.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/h5_test/tst_h_par.c b/h5_test/tst_h_par.c -index c3da7f4..a419d55 100644 ---- a/h5_test/tst_h_par.c -+++ b/h5_test/tst_h_par.c -@@ -11,6 +11,7 @@ - $Id: tst_h_par.c,v 1.15 2010/05/25 13:53:04 ed Exp $ - */ - #include -+#include "err_macros.h" - #include - - /* Defining USE_MPE causes the MPE trace library to be used (and you -- cgit v1.2.3 From e33c4286ebcc0dcc79985a32c6c2d5ad623d1fbe Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 26 Oct 2020 20:47:29 +0100 Subject: gnu: gdb: Add version 10.1. * gnu/packages/gdb.scm (gdb-9.2): Rename to... (gdb-10): ... this, and upgrade to 10.1. [inputs]: New field. (gdb-minimal): Adjust accordingly. * gnu/packages/patches/gdb-hurd.patch: Remove. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/gdb.scm | 12 ++++--- gnu/packages/patches/gdb-hurd.patch | 69 ------------------------------------- 3 files changed, 7 insertions(+), 75 deletions(-) delete mode 100644 gnu/packages/patches/gdb-hurd.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 0ada3b727b..220b7bd21d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1024,7 +1024,6 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-9-strmov-store-file-names.patch \ %D%/packages/patches/gd-fix-tests-on-i686.patch \ %D%/packages/patches/gd-brect-bounds.patch \ - %D%/packages/patches/gdb-hurd.patch \ %D%/packages/patches/gdm-default-session.patch \ %D%/packages/patches/genimage-signedness.patch \ %D%/packages/patches/geoclue-config.patch \ diff --git a/gnu/packages/gdb.scm b/gnu/packages/gdb.scm index 2eecfb581d..c01c65ce20 100644 --- a/gnu/packages/gdb.scm +++ b/gnu/packages/gdb.scm @@ -152,22 +152,24 @@ written in C, C++, Ada, Objective-C, Pascal and more.") ;; enough to avoid massive rebuilds. gdb-9.1) -(define-public gdb-9.2 +(define-public gdb-10 (package (inherit gdb) - (version "9.2") + (version "10.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/gdb/gdb-" version ".tar.xz")) - (patches (search-patches "gdb-hurd.patch")) (sha256 (base32 - "0mf5fn8v937qwnal4ykn3ji1y2sxk0fa1yfqi679hxmpg6pdf31n")))))) + "1h32dckz1y8fnyxh22iyw8h3hnhxr79v1ng85px3ljn1xv71wbzq")))) + (inputs + `(("guile" ,guile-3.0) + ,@(alist-delete "guile" (package-inputs gdb)))))) (define-public gdb-minimal (package/inherit - gdb-9.2 + gdb-10 (name "gdb-minimal") (inputs (fold alist-delete (package-inputs gdb) '("libxml2" "ncurses" "python-wrapper" "source-highlight"))))) diff --git a/gnu/packages/patches/gdb-hurd.patch b/gnu/packages/patches/gdb-hurd.patch deleted file mode 100644 index 0af8d4dc28..0000000000 --- a/gnu/packages/patches/gdb-hurd.patch +++ /dev/null @@ -1,69 +0,0 @@ -Taken from upstream, removed ChangeLog. - -From 6930bffe3373690b3431d6291f9f7c116d6a1ec4 Mon Sep 17 00:00:00 2001 -From: Samuel Thibault -Date: Sat, 30 May 2020 18:35:59 +0000 -Subject: [PATCH] hurd: fix gnu_debug_flag type -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fixes - -../../gdb/gnu-nat.c:96:6: error: conflicting declaration ‘bool gnu_debug_flag’ - 96 | bool gnu_debug_flag = false; -../../gdb/gnu-nat.c: In function ‘void _initialize_gnu_nat()’: -../../gdb/gnu-nat.c:3511:7: error: cannot - -gdb/ChangeLog: - - * gnu-nat.h (gnu_debug_flag): Set type to bool. ---- - gdb/ChangeLog | 4 ++++ - gdb/gnu-nat.h | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/gdb/gnu-nat.h b/gdb/gnu-nat.h -index 77c57817b2..766f716587 100644 ---- a/gdb/gnu-nat.h -+++ b/gdb/gnu-nat.h -@@ -111,7 +111,7 @@ extern char *proc_string (struct proc *proc); - __proc_pid (__proc), __proc->tid, \ - host_address_to_string (__proc) , ##args); } while (0) - --extern int gnu_debug_flag; -+extern bool gnu_debug_flag; - - #define debug(msg, args...) \ - do { if (gnu_debug_flag) \ --- -Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org -Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com - -commit 366f550a593c7e6bae3699a4b6d65fe937af5603 -Author: Samuel Thibault -Date: Sat May 30 18:41:30 2020 +0000 - - hurd: add missing include - - Fixes - - ../../gdb/gnu-nat.c:2522:14: error: ‘target_gdbarch’ was not declared in this scope; did you mean ‘target_detach’? - 2522 | paddress (target_gdbarch (), memaddr), pulongest (len), - - gdb/Changelog: - - * gnu-nat.c: Include "gdbarch.h". - -diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c -index 3b438a9a43..9b93488b41 100644 ---- a/gdb/gnu-nat.c -+++ b/gdb/gnu-nat.c -@@ -64,6 +64,7 @@ extern "C" - #include "language.h" - #include "target.h" - #include "gdbsupport/gdb_wait.h" -+#include "gdbarch.h" - #include "gdbcmd.h" - #include "gdbcore.h" - #include "gdbthread.h" -- cgit v1.2.3 From d1ecb3bded7ddbbccd9a8720a9aa8cf10809fa5e Mon Sep 17 00:00:00 2001 From: Malte Frank Gerdes Date: Fri, 23 Oct 2020 15:11:52 +0200 Subject: gnu: benchmark: Update to 1.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/benchmark.scm (benchmark): Update to 1.5.2 [native-inputs]: Add googletest-source. [arguments]: Add phase 'unpack-googletest. * gnu/packages/patches/benchmark-unbundle-googletst.patch: Delete file. * gnu/packages/local.mk: Remove benchmark-unbundle-googletest.patch. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 - gnu/packages/benchmark.scm | 21 +++++-- .../patches/benchmark-unbundle-googletest.patch | 69 ---------------------- 3 files changed, 15 insertions(+), 76 deletions(-) delete mode 100644 gnu/packages/patches/benchmark-unbundle-googletest.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 220b7bd21d..aae8e7edcc 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -825,7 +825,6 @@ dist_patch_DATA = \ %D%/packages/patches/beets-werkzeug-compat.patch \ %D%/packages/patches/behave-skip-a-couple-of-tests.patch \ %D%/packages/patches/beignet-correct-file-names.patch \ - %D%/packages/patches/benchmark-unbundle-googletest.patch \ %D%/packages/patches/biber-fix-encoding-write.patch \ %D%/packages/patches/biber-sortinithash.patch \ %D%/packages/patches/bidiv-update-fribidi.patch \ diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm index f9648b5f7c..8a8309ce52 100644 --- a/gnu/packages/benchmark.scm +++ b/gnu/packages/benchmark.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2019 Gábor Boskovits ;;; Copyright © 2019 Ludovic Courtès ;;; Copyright © 2020 Vincent Legoll +;;; Copyright © 2020 malte Frank Gerdes ;;; ;;; This file is part of GNU Guix. ;;; @@ -213,7 +214,7 @@ This can give a much better understanding of the command's performance.") (define-public benchmark (package (name "benchmark") - (version "1.5.0") + (version "1.5.2") (source (origin (method git-fetch) (uri (git-reference @@ -222,16 +223,24 @@ This can give a much better understanding of the command's performance.") (file-name (git-file-name name version)) (sha256 (base32 - "0r9dbg4cbk47gwmayys31a83m3y67k0kh1f6pl8i869rbd609ndh")) - (patches (search-patches "benchmark-unbundle-googletest.patch")))) + "13rxagpzw6bal6ajlmrxlh9kgfvcixn6j734b2bvfqz7lch8n0pa")))) (build-system cmake-build-system) (native-inputs - `(("googletest" ,googletest))) + `(("googletest-source" ,(package-source googletest)) + ("googletest" ,googletest))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-googletest + (lambda* (#:key inputs #:allow-other-keys) + (copy-recursively (assoc-ref inputs "googletest-source") + "googletest") + #t))))) (home-page "https://github.com/google/benchmark") (synopsis "Microbenchmark support library") (description - "Benchmark is a library to benchmark code snippets, -similar to unit tests.") + "Benchmark is a library to benchmark code snippets, similar to unit +tests.") (license license:asl2.0))) (define-public bonnie++ diff --git a/gnu/packages/patches/benchmark-unbundle-googletest.patch b/gnu/packages/patches/benchmark-unbundle-googletest.patch deleted file mode 100644 index 4dce8f59f1..0000000000 --- a/gnu/packages/patches/benchmark-unbundle-googletest.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 5eb306618196ea78b8c9390e22ea2edce20760fe Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= -Date: Fri, 14 Jun 2019 22:15:49 +0200 -Subject: [PATCH] Remove googletest lookup from build system. - ---- - cmake/GoogleTest.cmake | 18 +++++++++--------- - cmake/GoogleTest.cmake.in | 12 ++++++------ - 2 files changed, 15 insertions(+), 15 deletions(-) - -diff --git a/cmake/GoogleTest.cmake b/cmake/GoogleTest.cmake -index fb7c6be..a6c473b 100644 ---- a/cmake/GoogleTest.cmake -+++ b/cmake/GoogleTest.cmake -@@ -27,15 +27,15 @@ endif() - # settings on Windows - set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) - --include(${GOOGLETEST_PREFIX}/googletest-paths.cmake) -+#include(${GOOGLETEST_PREFIX}/googletest-paths.cmake) - - # Add googletest directly to our build. This defines - # the gtest and gtest_main targets. --add_subdirectory(${GOOGLETEST_SOURCE_DIR} -- ${GOOGLETEST_BINARY_DIR} -- EXCLUDE_FROM_ALL) -- --set_target_properties(gtest PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES $) --set_target_properties(gtest_main PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES $) --set_target_properties(gmock PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES $) --set_target_properties(gmock_main PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES $) -+#add_subdirectory(${GOOGLETEST_SOURCE_DIR} -+# ${GOOGLETEST_BINARY_DIR} -+# EXCLUDE_FROM_ALL) -+ -+#set_target_properties(gtest PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES $) -+#set_target_properties(gtest_main PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES $) -+#set_target_properties(gmock PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES $) -+#set_target_properties(gmock_main PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES $) -diff --git a/cmake/GoogleTest.cmake.in b/cmake/GoogleTest.cmake.in -index 28818ee..13b0888 100644 ---- a/cmake/GoogleTest.cmake.in -+++ b/cmake/GoogleTest.cmake.in -@@ -31,7 +31,7 @@ if(EXISTS "${GOOGLETEST_PATH}" AND IS_DIRECTORY "${GOOGLETEST_PATH}" - ) - else() - if(NOT ALLOW_DOWNLOADING_GOOGLETEST) -- message(SEND_ERROR "Did not find Google Test sources! Either pass correct path in GOOGLETEST_PATH, or enable ALLOW_DOWNLOADING_GOOGLETEST, or disable BENCHMARK_ENABLE_GTEST_TESTS / BENCHMARK_ENABLE_TESTING.") -+ message(WARNING "Did not find Google Test sources! Either pass correct path in GOOGLETEST_PATH, or enable ALLOW_DOWNLOADING_GOOGLETEST, or disable BENCHMARK_ENABLE_GTEST_TESTS / BENCHMARK_ENABLE_TESTING.") - else() - message(WARNING "Did not find Google Test sources! Fetching from web...") - ExternalProject_Add( -@@ -51,8 +51,8 @@ else() - endif() - endif() - --ExternalProject_Get_Property(googletest SOURCE_DIR BINARY_DIR) --file(WRITE googletest-paths.cmake --"set(GOOGLETEST_SOURCE_DIR \"${SOURCE_DIR}\") --set(GOOGLETEST_BINARY_DIR \"${BINARY_DIR}\") --") -+#ExternalProject_Get_Property(googletest SOURCE_DIR BINARY_DIR) -+#file(WRITE googletest-paths.cmake -+#"set(GOOGLETEST_SOURCE_DIR \"${SOURCE_DIR}\") -+#set(GOOGLETEST_BINARY_DIR \"${BINARY_DIR}\") -+#") --- -2.22.0 - -- cgit v1.2.3 From ab96f929c6979e9476181ab73256f993674c9a55 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 26 Oct 2020 22:49:29 +0100 Subject: gnu: python-robotframework: Shorten patch file name. * gnu/packages/patches/python-robotframework-honor-source-date-epoch.patch: Rename to... * gnu/packages/patches/python-robotframework-source-date-epoch.patch: ... this. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/python-xyz.scm (python-robotframework)[source]: Likewise. --- gnu/local.mk | 2 +- ...on-robotframework-honor-source-date-epoch.patch | 62 ---------------------- .../python-robotframework-source-date-epoch.patch | 62 ++++++++++++++++++++++ gnu/packages/python-xyz.scm | 2 +- 4 files changed, 64 insertions(+), 64 deletions(-) delete mode 100644 gnu/packages/patches/python-robotframework-honor-source-date-epoch.patch create mode 100644 gnu/packages/patches/python-robotframework-source-date-epoch.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index aae8e7edcc..e9b6181c94 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1512,7 +1512,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-pycrypto-time-clock.patch \ %D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ - %D%/packages/patches/python-robotframework-honor-source-date-epoch.patch \ + %D%/packages/patches/python-robotframework-source-date-epoch.patch \ %D%/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch \ %D%/packages/patches/python2-subprocess32-disable-input-test.patch \ %D%/packages/patches/python-tinycss2-flake8-compat.patch \ diff --git a/gnu/packages/patches/python-robotframework-honor-source-date-epoch.patch b/gnu/packages/patches/python-robotframework-honor-source-date-epoch.patch deleted file mode 100644 index ccd87911d8..0000000000 --- a/gnu/packages/patches/python-robotframework-honor-source-date-epoch.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 3cc41c05fad5601c0dd1832f64a6e9efca017727 Mon Sep 17 00:00:00 2001 -From: Maxim Cournoyer -Date: Mon, 1 Apr 2019 11:36:04 -0400 -Subject: [PATCH] robottime: Honor the SOURCE_DATE_EPOCH environment variable. - -Honoring the SOURCE_DATE_EPOCH environment variable allows building -the documentation using libdoc reproducibly, by setting the generated -timestamp to a fixed value. - -For more background on reproducible builds and the SOURCE_DATE_EPOCH -environment variable, see: -https://reproducible-builds.org/specs/source-date-epoch/. - -* src/robot/utils/robottime.py: import `os'. -(TimestampCache._get_epoch): Retrieve date from SOURCE_DATE_EPOCH if -it is defined, otherwise from time.time(). -* utest/output/test_logger.py (TestLogger.test_write_to_one_logger): -Check for the existance of a timestamp attribute instead of checking -for its content as the later is easy to break when using the -SOURCE_DATE_EPOCH environment variable. ---- - src/robot/utils/robottime.py | 3 +++ - utest/output/test_logger.py | 2 +- - 2 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/robot/utils/robottime.py b/src/robot/utils/robottime.py -index 06432a4a6..91526f826 100644 ---- a/src/robot/utils/robottime.py -+++ b/src/robot/utils/robottime.py -@@ -14,6 +14,7 @@ - # limitations under the License. - - import datetime -+import os - import time - import re - -@@ -395,6 +396,8 @@ class TimestampCache(object): - - # Seam for mocking - def _get_epoch(self): -+ if os.getenv('SOURCE_DATE_EPOCH'): -+ return float(os.getenv('SOURCE_DATE_EPOCH')) - return time.time() - - def _use_cache(self, secs, *separators): -diff --git a/utest/output/test_logger.py b/utest/output/test_logger.py -index 92fe6d77d..e980227aa 100644 ---- a/utest/output/test_logger.py -+++ b/utest/output/test_logger.py -@@ -46,7 +46,7 @@ class TestLogger(unittest.TestCase): - logger = LoggerMock(('Hello, world!', 'INFO')) - self.logger.register_logger(logger) - self.logger.write('Hello, world!', 'INFO') -- assert_true(logger.msg.timestamp.startswith('20')) -+ assert_true(hasattr(logger.msg, 'timestamp')) - - def test_write_to_one_logger_with_trace_level(self): - logger = LoggerMock(('expected message', 'TRACE')) --- -2.20.1 - diff --git a/gnu/packages/patches/python-robotframework-source-date-epoch.patch b/gnu/packages/patches/python-robotframework-source-date-epoch.patch new file mode 100644 index 0000000000..ccd87911d8 --- /dev/null +++ b/gnu/packages/patches/python-robotframework-source-date-epoch.patch @@ -0,0 +1,62 @@ +From 3cc41c05fad5601c0dd1832f64a6e9efca017727 Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer +Date: Mon, 1 Apr 2019 11:36:04 -0400 +Subject: [PATCH] robottime: Honor the SOURCE_DATE_EPOCH environment variable. + +Honoring the SOURCE_DATE_EPOCH environment variable allows building +the documentation using libdoc reproducibly, by setting the generated +timestamp to a fixed value. + +For more background on reproducible builds and the SOURCE_DATE_EPOCH +environment variable, see: +https://reproducible-builds.org/specs/source-date-epoch/. + +* src/robot/utils/robottime.py: import `os'. +(TimestampCache._get_epoch): Retrieve date from SOURCE_DATE_EPOCH if +it is defined, otherwise from time.time(). +* utest/output/test_logger.py (TestLogger.test_write_to_one_logger): +Check for the existance of a timestamp attribute instead of checking +for its content as the later is easy to break when using the +SOURCE_DATE_EPOCH environment variable. +--- + src/robot/utils/robottime.py | 3 +++ + utest/output/test_logger.py | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/robot/utils/robottime.py b/src/robot/utils/robottime.py +index 06432a4a6..91526f826 100644 +--- a/src/robot/utils/robottime.py ++++ b/src/robot/utils/robottime.py +@@ -14,6 +14,7 @@ + # limitations under the License. + + import datetime ++import os + import time + import re + +@@ -395,6 +396,8 @@ class TimestampCache(object): + + # Seam for mocking + def _get_epoch(self): ++ if os.getenv('SOURCE_DATE_EPOCH'): ++ return float(os.getenv('SOURCE_DATE_EPOCH')) + return time.time() + + def _use_cache(self, secs, *separators): +diff --git a/utest/output/test_logger.py b/utest/output/test_logger.py +index 92fe6d77d..e980227aa 100644 +--- a/utest/output/test_logger.py ++++ b/utest/output/test_logger.py +@@ -46,7 +46,7 @@ class TestLogger(unittest.TestCase): + logger = LoggerMock(('Hello, world!', 'INFO')) + self.logger.register_logger(logger) + self.logger.write('Hello, world!', 'INFO') +- assert_true(logger.msg.timestamp.startswith('20')) ++ assert_true(hasattr(logger.msg, 'timestamp')) + + def test_write_to_one_logger_with_trace_level(self): + logger = LoggerMock(('expected message', 'TRACE')) +-- +2.20.1 + diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 63dadb2676..6c5ccac647 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -3684,7 +3684,7 @@ ecosystem, but can naturally be used also by other projects.") (sha256 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds")) (patches (search-patches - "python-robotframework-honor-source-date-epoch.patch")))) + "python-robotframework-source-date-epoch.patch")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases -- cgit v1.2.3 From f161bd2cd7af6a0a7027a2e4ed97912027d5033d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 26 Oct 2020 22:53:30 +0100 Subject: gnu: Remove unused patch. This patch was unused since commit e4070d404d5daa71fcc83a7fecc9b58570d280c2. * gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch: Remove. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - ...ml-bisect-fix-camlp4-in-another-directory.patch | 283 --------------------- 2 files changed, 284 deletions(-) delete mode 100644 gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index e9b6181c94..c6aa58b24f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1373,7 +1373,6 @@ dist_patch_DATA = \ %D%/packages/patches/nvi-db4.patch \ %D%/packages/patches/nyacc-binary-literals.patch \ %D%/packages/patches/oath-toolkit-glibc-compat.patch \ - %D%/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch \ %D%/packages/patches/ocaml-bitstring-fix-configure.patch \ %D%/packages/patches/ocaml-CVE-2015-8869.patch \ %D%/packages/patches/ocaml-Add-a-.file-directive.patch \ diff --git a/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch b/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch deleted file mode 100644 index fd9a4c9401..0000000000 --- a/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch +++ /dev/null @@ -1,283 +0,0 @@ -From bc3b353cb2f26cf10aa5c5caebddf6d3d5b1e318 Mon Sep 17 00:00:00 2001 -From: Julien Lepiller -Date: Fri, 21 Sep 2018 22:31:29 +0200 -Subject: [PATCH] fix camlp4 in another directory - ---- - Makefile | 11 ++++++----- - configure | 13 ++++++++++++- - tests/Makefile | 2 +- - tests/camlp4-comments/Makefile | 2 +- - tests/camlp4-exclude-file/Makefile | 2 +- - tests/camlp4-exclude/Makefile | 2 +- - tests/camlp4-instrument-fast/Makefile | 2 +- - tests/camlp4-instrument/Makefile | 2 +- - tests/combine-expr/Makefile | 2 +- - tests/ppx-comments/Makefile | 2 +- - tests/ppx-exclude-file/Makefile | 2 +- - tests/ppx-exclude/Makefile | 2 +- - tests/ppx-instrument-fast/Makefile | 2 +- - tests/ppx-instrument/Makefile | 2 +- - tests/report/Makefile | 2 +- - 15 files changed, 31 insertions(+), 19 deletions(-) - -diff --git a/Makefile b/Makefile -index b0980ee..6697922 100644 ---- a/Makefile -+++ b/Makefile -@@ -25,7 +25,7 @@ PATH_BUILD=$(PATH_BASE)/_build - PATH_OCAMLDOC=$(PATH_BASE)/ocamldoc - PATH_SRC=$(PATH_BASE)/src - PATH_TESTS=$(PATH_BASE)/tests --PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect -+PATH_INSTALL=$(PREFIX)/lib/ocaml/bisect - - - # DEFINITIONS -@@ -33,7 +33,8 @@ PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect - PROJECT_NAME=bisect - OCAMLBUILD=ocamlbuild - OCAMLBUILD_ENV=WARNINGS=$(WARNINGS) PATH_OCAML_PREFIX=$(PATH_OCAML_PREFIX) --OCAMLBUILD_FLAGS=-classic-display -no-links -+CAMLP4_INCLUDE=$(shell test -z $(CAMLP4_LIBDIR) || echo "-cflags -I,$(CAMLP4_LIBDIR)") -+OCAMLBUILD_FLAGS=-classic-display -no-links $(CAMLP4_INCLUDE) - MODULES_ODOCL=$(PROJECT_NAME).odocl - MODULES_MLPACK=$(PROJECT_NAME).mlpack - MODULES_MLPACK_PP=$(PROJECT_NAME)_pp.mlpack -@@ -80,11 +81,11 @@ veryclean: clean - rm -f $(PATH_OCAMLDOC)/*.html $(PATH_OCAMLDOC)/*.css - - install: FORCE -- cp $(PATH_BUILD)/src/report/report.byte $(PATH_OCAML_PREFIX)/bin/bisect-report; \ -+ cp $(PATH_BUILD)/src/report/report.byte $(PREFIX)/bin/bisect-report; \ - if [ "$(PPX)" = "TRUE" ]; then \ -- cp $(PATH_BUILD)/src/syntax/bisect_ppx.byte $(PATH_OCAML_PREFIX)/bin; \ -+ cp $(PATH_BUILD)/src/syntax/bisect_ppx.byte $(PREFIX)/bin; \ - fi; \ -- (which ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PATH_OCAML_PREFIX)/bin/bisect-report.opt || true); \ -+ (which ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PREFIX)/bin/bisect-report.opt || true); \ - if [ -x "$(PATH_OCAMLFIND)" ]; then \ - $(PATH_OCAMLFIND) query $(PROJECT_NAME) && $(PATH_OCAMLFIND) remove $(PROJECT_NAME) || true; \ - $(PATH_OCAMLFIND) install $(PROJECT_NAME) META -optional \ -diff --git a/configure b/configure -index bb7ebf4..43ef46b 100755 ---- a/configure -+++ b/configure -@@ -21,7 +21,9 @@ - # default values - ocamlbuild=`which ocamlbuild || echo '/usr/local/bin/ocamlbuild'` - bin_path=`dirname $ocamlbuild` -+prefix='' - ocaml_prefix=`dirname $bin_path` -+camlp4_prefix=`dirname $(dirname $(which camlp4of))` - ocamlfind=`which ocamlfind 2> /dev/null || echo ''` - native_dynlink='TRUE' - devel='FALSE' -@@ -32,8 +34,12 @@ ppx='FALSE' - while [ $# -gt 0 ] - do - case "$1" in -+ -prefix) -+ prefix="$2"; shift;; - -ocaml-prefix) - ocaml_prefix="$2"; shift;; -+ -camlp4-prefix) -+ camlp4_prefix="$2"; shift;; - -ocamlfind) - ocamlfind="$2"; shift;; - -no-native-dynlink) -@@ -45,7 +51,7 @@ do - -ppx) - ppx='TRUE';; - *) -- echo "usage: $0 [-ocaml-prefix ] [-ocamlfind ] [-no-native-dynlink] [-devel]"; -+ echo "usage: $0 [-prefix ] [-ocaml-prefix ] [-camlp4-prefix ] [-ocamlfind ] [-no-native-dynlink] [-devel]"; - exit 1;; - esac - shift -@@ -57,6 +63,9 @@ if [ "$no_camlp4" = "TRUE" -a "$ppx" = "FALSE" ]; then - exit 1 - fi - -+# prefix default value -+test -z $prefix && prefix=$ocaml_prefix -+ - # make options - make_quiet=`make -f - < Makefile.config -+echo "PREFIX=$prefix" >> Makefile.config - echo "PATH_OCAML_PREFIX=$ocaml_prefix" >> Makefile.config -+echo "PATH_CAMLP4_PREFIX=$camlp4_prefix" >> Makefile.config - echo "PATH_OCAMLFIND=$ocamlfind" >> Makefile.config - echo "NATIVE_DYNLINK=$native_dynlink" >> Makefile.config - echo "WARNINGS=$devel" >> Makefile.config -diff --git a/tests/Makefile b/tests/Makefile -index 1aba27f..9642323 100644 ---- a/tests/Makefile -+++ b/tests/Makefile -@@ -41,7 +41,7 @@ one: FORCE - else \ - echo "Running tests for '$(NAME)'..." | tee -a _log; \ - (cd $(NAME) && \ -- $(MAKE) PATH_OCAML_BIN=$(PATH_OCAML_PREFIX)/bin \ -+ $(MAKE) PATH_OCAML_BIN=$(PATH_OCAML_PREFIX)/bin PATH_CAMLP4_PREFIX=$(PATH_CAMLP4_PREFIX) \ - COMPILER=ocamlc EXECUTABLE=bytecode RUN=./ LIB_EXT=cma EXE_SUFFIX='' \ - REPORT=../../_build/src/report/report.byte && \ - cd ..) || echo '*** error' >> _log; \ -diff --git a/tests/camlp4-comments/Makefile b/tests/camlp4-comments/Makefile -index 33fca72..a918118 100644 ---- a/tests/camlp4-comments/Makefile -+++ b/tests/camlp4-comments/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cmp - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cmp -diff --git a/tests/camlp4-exclude-file/Makefile b/tests/camlp4-exclude-file/Makefile -index ab13983..e2520fa 100644 ---- a/tests/camlp4-exclude-file/Makefile -+++ b/tests/camlp4-exclude-file/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cmp - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude-file exclusions -o $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude-file exclusions -o $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cmp -diff --git a/tests/camlp4-exclude/Makefile b/tests/camlp4-exclude/Makefile -index 18aada4..d71a7bc 100644 ---- a/tests/camlp4-exclude/Makefile -+++ b/tests/camlp4-exclude/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cmp - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude 'f.*' -o $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude 'f.*' -o $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cmp -diff --git a/tests/camlp4-instrument-fast/Makefile b/tests/camlp4-instrument-fast/Makefile -index f60767f..8506e38 100644 ---- a/tests/camlp4-instrument-fast/Makefile -+++ b/tests/camlp4-instrument-fast/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cmp - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo -mode fast $$file -o $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo -mode fast $$file -o $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cmp -diff --git a/tests/camlp4-instrument/Makefile b/tests/camlp4-instrument/Makefile -index 33fca72..a918118 100644 ---- a/tests/camlp4-instrument/Makefile -+++ b/tests/camlp4-instrument/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cmp - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cmp -diff --git a/tests/combine-expr/Makefile b/tests/combine-expr/Makefile -index 46ae9eb..e8e2af2 100644 ---- a/tests/combine-expr/Makefile -+++ b/tests/combine-expr/Makefile -@@ -1,4 +1,4 @@ --COMPILE_FLAGS=-I ../../_build -pp '$(PATH_OCAML_BIN)/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) -+COMPILE_FLAGS=-I ../../_build -pp '$(PATH_CAMLP4_PREFIX)/bin/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) - - default: clean compile run report - -diff --git a/tests/ppx-comments/Makefile b/tests/ppx-comments/Makefile -index f8c645a..667526f 100644 ---- a/tests/ppx-comments/Makefile -+++ b/tests/ppx-comments/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cm* - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cm* -diff --git a/tests/ppx-exclude-file/Makefile b/tests/ppx-exclude-file/Makefile -index a575a77..0dd1a20 100644 ---- a/tests/ppx-exclude-file/Makefile -+++ b/tests/ppx-exclude-file/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cm* - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -exclude-file exclusions' -dsource $$file 2> $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -exclude-file exclusions' -dsource $$file 2> $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cm* -diff --git a/tests/ppx-exclude/Makefile b/tests/ppx-exclude/Makefile -index a517af4..f502a42 100644 ---- a/tests/ppx-exclude/Makefile -+++ b/tests/ppx-exclude/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cm* - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx "../../_build/src/syntax/bisect_ppx.byte -exclude 'f.*'" -dsource $$file 2> $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx "../../_build/src/syntax/bisect_ppx.byte -exclude 'f.*'" -dsource $$file 2> $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cm* -diff --git a/tests/ppx-instrument-fast/Makefile b/tests/ppx-instrument-fast/Makefile -index da78bb6..1195988 100644 ---- a/tests/ppx-instrument-fast/Makefile -+++ b/tests/ppx-instrument-fast/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cm* - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -mode fast' -dsource $$file 2> $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -mode fast' -dsource $$file 2> $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cm* -diff --git a/tests/ppx-instrument/Makefile b/tests/ppx-instrument/Makefile -index f8c645a..667526f 100644 ---- a/tests/ppx-instrument/Makefile -+++ b/tests/ppx-instrument/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cm* - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cm* -diff --git a/tests/report/Makefile b/tests/report/Makefile -index a7ffe44..a968bf9 100644 ---- a/tests/report/Makefile -+++ b/tests/report/Makefile -@@ -1,4 +1,4 @@ --COMPILE_FLAGS=-I ../../_build -pp '$(PATH_OCAML_BIN)/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) -+COMPILE_FLAGS=-I ../../_build -pp '$(PATH_CAMLP4_PREFIX)/bin/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) - XMLLINT=$(shell which xmllint) - - default: clean compile run report --- -2.18.0 - -- cgit v1.2.3 From e3908ec5fb96a1fbdc144f5585af49668960dfc8 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Sun, 25 Oct 2020 19:47:38 +0100 Subject: gnu: plasma-framework: Fix build errors in dependent packages. Fix build errors in dependent packages if PREFIX is different from ECM's PREFIX - which is the case in Guix. See for details. * gnu/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch: New file. * gnu/local.mk (dist_patch_DATA) Add it. * packages/kde-frameworks.scm (plasma-framework)[source]: Use this patch. --- gnu/local.mk | 1 + gnu/packages/kde-frameworks.scm | 3 ++- ...lasma-framework-fix-KF5PlasmaMacros.cmake.patch | 25 ++++++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index c6aa58b24f..4e425a3e7e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1410,6 +1410,7 @@ dist_patch_DATA = \ %D%/packages/patches/pam-mount-luks2-support.patch \ %D%/packages/patches/pango-skip-libthai-test.patch \ %D%/packages/patches/pciutils-hurd-configure.patch \ + %D%/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch \ %D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \ %D%/packages/patches/samba-fix-fcntl-hint-detection.patch \ %D%/packages/patches/sdl-pango-api_additions.patch \ diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm index c4479de995..cbcb8ff076 100644 --- a/gnu/packages/kde-frameworks.scm +++ b/gnu/packages/kde-frameworks.scm @@ -3449,7 +3449,8 @@ setUrl, setUserAgent and call.") name "-" version ".tar.xz")) (sha256 (base32 - "06cxajsxj62g3c37ssrrcaxb9a12zbyp2kvrjqym329k5vd89272")))) + "06cxajsxj62g3c37ssrrcaxb9a12zbyp2kvrjqym329k5vd89272")) + (patches (search-patches "plasma-framework-fix-KF5PlasmaMacros.cmake.patch")))) (build-system cmake-build-system) (propagated-inputs `(("kpackage" ,kpackage) diff --git a/gnu/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch b/gnu/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch new file mode 100644 index 0000000000..bd55d512cf --- /dev/null +++ b/gnu/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch @@ -0,0 +1,25 @@ +From ff5ed26f21d304e867ab57781878069567deb23d Mon Sep 17 00:00:00 2001 +From: Hartmut Goebel +Date: Mon, 3 Aug 2020 19:49:58 +0000 +Subject: [PATCH] Fix build errors if PREFIX is different from ECM's PREFIX. + +See for details +--- + KF5PlasmaMacros.cmake | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/KF5PlasmaMacros.cmake b/KF5PlasmaMacros.cmake +index 494b42d56..80b3fd8dd 100644 +--- a/KF5PlasmaMacros.cmake ++++ b/KF5PlasmaMacros.cmake +@@ -1,6 +1,5 @@ + +-find_package(ECM 1.6.0 CONFIG REQUIRED) +-include(${ECM_KDE_MODULE_DIR}/KDEInstallDirs.cmake) ++include(KDEInstallDirs) + + set(PLASMA_RELATIVE_DATA_INSTALL_DIR "plasma") + set(PLASMA_DATA_INSTALL_DIR "${KDE_INSTALL_DATADIR}/${PLASMA_RELATIVE_DATA_INSTALL_DIR}") +-- +GitLab + -- cgit v1.2.3 From b4941e30e3a01a11bf0eac6fd1c68aa33b06aaf8 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Sun, 25 Oct 2020 21:29:52 +0100 Subject: gnu: kpackage: Fix build errors in dependent packages. Fix build errors in dependent packages if PREFIX is different from ECM's PREFIX - which is the case in Guix. See for details. * gnu/packages/patches/plasma-framework-fix-KF5PackageMacros.cmake.patch: New file. * gnu/local.mk (dist_patch_DATA) Add it. * packages/kde-frameworks.scm (package)[source]: Use this patch. --- gnu/local.mk | 1 + gnu/packages/kde-frameworks.scm | 3 ++- .../kpackage-fix-KF5PackageMacros.cmake.patch | 25 ++++++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/kpackage-fix-KF5PackageMacros.cmake.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 4e425a3e7e..21dbf3da8c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1197,6 +1197,7 @@ dist_patch_DATA = \ %D%/packages/patches/kmod-module-directory.patch \ %D%/packages/patches/kmscon-runtime-keymap-switch.patch \ %D%/packages/patches/kpackage-allow-external-paths.patch \ + %D%/packages/patches/kpackage-fix-KF5PackageMacros.cmake.patch \ %D%/packages/patches/kmplayer-aarch64.patch \ %D%/packages/patches/kmplayer-upstream_Fix-build-with-Qt-5.9.patch \ %D%/packages/patches/kobodeluxe-paths.patch \ diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm index cbcb8ff076..febdb1f4f0 100644 --- a/gnu/packages/kde-frameworks.scm +++ b/gnu/packages/kde-frameworks.scm @@ -1963,7 +1963,8 @@ covers feedback and persistent events.") "03rp7p7i8ihz5wg58gjs638jk7xbszknfiy2j3r979snc57g95mv")) ;; Default to: external paths/symlinks can be followed by a ;; package - (patches (search-patches "kpackage-allow-external-paths.patch")))) + (patches (search-patches "kpackage-allow-external-paths.patch" + "kpackage-fix-KF5PackageMacros.cmake.patch")))) (build-system cmake-build-system) (native-inputs `(("extra-cmake-modules" ,extra-cmake-modules))) diff --git a/gnu/packages/patches/kpackage-fix-KF5PackageMacros.cmake.patch b/gnu/packages/patches/kpackage-fix-KF5PackageMacros.cmake.patch new file mode 100644 index 0000000000..d677f19a70 --- /dev/null +++ b/gnu/packages/patches/kpackage-fix-KF5PackageMacros.cmake.patch @@ -0,0 +1,25 @@ +From 668010ebc9fd84d9dc60f90b9a4ebf3c7054977f Mon Sep 17 00:00:00 2001 +From: Hartmut Goebel +Date: Sun, 25 Oct 2020 20:11:13 +0000 +Subject: [PATCH] Fix build errors if PREFIX is different from ECM's PREFIX. + +See for details. +--- + KF5PackageMacros.cmake | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/KF5PackageMacros.cmake b/KF5PackageMacros.cmake +index f4c1d1d..acd3798 100644 +--- a/KF5PackageMacros.cmake ++++ b/KF5PackageMacros.cmake +@@ -1,6 +1,5 @@ + +-find_package(ECM 1.6.0 CONFIG REQUIRED) +-include(${ECM_KDE_MODULE_DIR}/KDEInstallDirs.cmake) ++include(KDEInstallDirs) + + set(KPACKAGE_RELATIVE_DATA_INSTALL_DIR "kpackage") + +-- +GitLab + -- cgit v1.2.3 From dc3c27554be14c0fbf3c4668d1eb1a3b25d5ac00 Mon Sep 17 00:00:00 2001 From: Simon South Date: Mon, 15 Jun 2020 11:22:52 -0400 Subject: gnu: icedtea-6: Remove obsolete, architecture-dependent patch. * gnu/packages/java.scm (icedtea-6)[arguments]<#:phases>: Remove special handling of "hotspot-src" input during "unpack" phase. [native-inputs]: Remove patch to "hotspot-src". * gnu/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. Signed-off-by: Efraim Flashner --- gnu/local.mk | 1 - gnu/packages/java.scm | 9 ++--- ...icedtea-6-hotspot-gcc-segfault-workaround.patch | 42 ---------------------- 3 files changed, 2 insertions(+), 50 deletions(-) delete mode 100644 gnu/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 91b7c3a14c..4402c9bc7c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1145,7 +1145,6 @@ dist_patch_DATA = \ %D%/packages/patches/icecat-use-older-reveal-hidden-html.patch \ %D%/packages/patches/icecat-use-system-graphite2+harfbuzz.patch \ %D%/packages/patches/icecat-use-system-media-libs.patch \ - %D%/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch \ %D%/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch \ %D%/packages/patches/icu4c-CVE-2020-10531.patch \ %D%/packages/patches/id3lib-CVE-2007-4460.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 1d6d957eff..8432fa3452 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -889,11 +889,8 @@ machine."))) (assoc-ref inputs (string-append part "-src")) part)) - '("jdk" "corba" + '("jdk" "hotspot" "corba" "langtools" "jaxp" "jaxws"))) - (with-directory-excursion "openjdk" - (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src")) - (rename-file "hg-checkout" "hotspot")) (substitute* "patches/freetypeversion.patch" (("REQUIRED_FREETYPE_VERSION = 2.2.1") "REQUIRED_FREETYPE_VERSION = 2.10.1")) @@ -1119,9 +1116,7 @@ machine."))) (changeset "jdk6-b41"))) (sha256 (base32 - "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd")) - (patches - (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch")))) + "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd")))) ("corba-src" ,(origin (method hg-fetch) diff --git a/gnu/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch b/gnu/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch deleted file mode 100644 index ef090e0ec9..0000000000 --- a/gnu/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch +++ /dev/null @@ -1,42 +0,0 @@ -# HG changeset patch -# User Gábor Boskovits -# Date 1530519413 -7200 -# Mon Jul 02 10:16:53 2018 +0200 -# Node ID 77e5bc9e238a28d17e097647badc04ed67a6a452 -# Parent 1ae05a34e052d1672b4a7894ddf5fc2f662eb861 -Fix gcc segfault. - -diff -r 1ae05a34e052 -r 77e5bc9e238a src/share/vm/opto/output.cpp ---- a/src/share/vm/opto/output.cpp Sun Dec 25 23:52:13 2016 +0000 -+++ b/src/share/vm/opto/output.cpp Mon Jul 02 10:16:53 2018 +0200 -@@ -1758,6 +1758,8 @@ - - // Initializer for class Scheduling - -+volatile const void *eePointer = Pipeline_Use::elaborated_elements; -+ - Scheduling::Scheduling(Arena *arena, Compile &compile) - : _arena(arena), - _cfg(compile.cfg()), -@@ -1802,8 +1804,8 @@ - - // Clear the bundling information - memcpy(_bundle_use_elements, -- Pipeline_Use::elaborated_elements, -- sizeof(Pipeline_Use::elaborated_elements)); -+ (void *)eePointer, -+ 11*sizeof(Pipeline_Use_Element)); - - // Get the last node - Block *bb = _cfg->_blocks[_cfg->_blocks.size()-1]; -@@ -1854,8 +1856,8 @@ - _bundle_use.reset(); - - memcpy(_bundle_use_elements, -- Pipeline_Use::elaborated_elements, -- sizeof(Pipeline_Use::elaborated_elements)); -+ (void *)eePointer, -+ 11*sizeof(Pipeline_Use_Element)); - } - - //------------------------------ScheduleAndBundle------------------------------ -- cgit v1.2.3 From 2fab54f3976a1c4099a30b21e06e725b06914a21 Mon Sep 17 00:00:00 2001 From: Simon South Date: Mon, 15 Jun 2020 11:22:53 -0400 Subject: gnu: icedtea-6: Fix build on aarch64-linux. * gnu/packages/java.scm (icedtea-6)[source]: Add patch. * gnu/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Efraim Flashner --- gnu/local.mk | 1 + gnu/packages/java.scm | 2 + .../icedtea-6-extend-hotspot-aarch64-support.patch | 1831 ++++++++++++++++++++ 3 files changed, 1834 insertions(+) create mode 100644 gnu/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 4402c9bc7c..ff6d64bd66 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1145,6 +1145,7 @@ dist_patch_DATA = \ %D%/packages/patches/icecat-use-older-reveal-hidden-html.patch \ %D%/packages/patches/icecat-use-system-graphite2+harfbuzz.patch \ %D%/packages/patches/icecat-use-system-media-libs.patch \ + %D%/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch \ %D%/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch \ %D%/packages/patches/icu4c-CVE-2020-10531.patch \ %D%/packages/patches/id3lib-CVE-2007-4460.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 8432fa3452..8c1fabb6e2 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -827,6 +827,8 @@ machine."))) (sha256 (base32 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg")) + (patches (search-patches + "icedtea-6-extend-hotspot-aarch64-support.patch")) (modules '((guix build utils))) (snippet '(begin diff --git a/gnu/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch b/gnu/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch new file mode 100644 index 0000000000..9dc112a344 --- /dev/null +++ b/gnu/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch @@ -0,0 +1,1831 @@ +From d51cb8c0f7966ac0b870e90e421cc8a796d98abf Mon Sep 17 00:00:00 2001 +From: Simon South +Date: Tue, 9 Jun 2020 13:48:42 -0400 +Subject: [PATCH] Extend AArch64 support + +This adds to IcedTea 6 a patch that extends the support for AArch64 in +its version of HotSpot, allowing the portable Zero virtual machine to +be built for that platform. + +The patch added is a backport of the one prepared for JDK 9 by the +OpenJDK AArch64 Porting Project, available (as of 11 June 2020) for +download from https://openjdk.java.net/jeps/237. +--- + Makefile.am | 3 +- + Makefile.in | 12 +- + .../hs23/aarch64-extended-support.patch | 1766 +++++++++++++++++ + 3 files changed, 1775 insertions(+), 6 deletions(-) + create mode 100644 patches/hotspot/hs23/aarch64-extended-support.patch + +diff --git a/Makefile.am b/Makefile.am +index 97dac85..f5c917b 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -621,7 +621,8 @@ ICEDTEA_PATCHES = \ + patches/openjdk/6260348-pr3068.patch \ + patches/openjdk/6961123-pr2975.patch \ + patches/pr2800-missing_resources.patch \ +- patches/pr3213-conditional_arm32jit.patch ++ patches/pr3213-conditional_arm32jit.patch \ ++ patches/hotspot/hs23/aarch64-extended-support.patch + + if WITH_RHINO + ICEDTEA_PATCHES += \ +diff --git a/Makefile.in b/Makefile.in +index aced7c2..e3545ee 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -1049,11 +1049,13 @@ ICEDTEA_PATCHES = $(DROP_PATCHES) $(SECURITY_PATCHES) \ + patches/openjdk/6260348-pr3068.patch \ + patches/openjdk/6961123-pr2975.patch \ + patches/pr2800-missing_resources.patch \ +- patches/pr3213-conditional_arm32jit.patch $(am__append_21) \ +- $(am__append_22) $(am__append_23) $(am__append_24) \ +- $(am__append_25) $(am__append_26) $(am__append_27) \ +- $(am__append_28) $(am__append_29) $(am__append_30) \ +- $(am__append_31) $(am__append_32) $(DISTRIBUTION_PATCHES) ++ patches/pr3213-conditional_arm32jit.patch \ ++ patches/hotspot/hs23/aarch64-extended-support.patch \ ++ $(am__append_21) $(am__append_22) $(am__append_23) \ ++ $(am__append_24) $(am__append_25) $(am__append_26) \ ++ $(am__append_27) $(am__append_28) $(am__append_29) \ ++ $(am__append_30) $(am__append_31) $(am__append_32) \ ++ $(DISTRIBUTION_PATCHES) + @ENABLE_NSS_FALSE@NSS_PATCHES = patches/nss-not-enabled-config.patch + @ENABLE_NSS_TRUE@NSS_PATCHES = patches/nss-config.patch + +diff --git a/patches/hotspot/hs23/aarch64-extended-support.patch b/patches/hotspot/hs23/aarch64-extended-support.patch +new file mode 100644 +index 0000000..7817f4d +--- /dev/null ++++ b/patches/hotspot/hs23/aarch64-extended-support.patch +@@ -0,0 +1,1766 @@ ++diff --git openjdk.orig/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c ++index 5771fdd..b23cc17 100644 ++--- openjdk.orig/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c +++++ openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c ++@@ -304,6 +304,9 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo ++ #ifdef amd64 ++ #define NPRGREG sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_NPRGREG ++ #endif +++#ifdef aarch64 +++#define NPRGREG 32 +++#endif ++ #if defined(sparc) || defined(sparcv9) ++ #define NPRGREG sun_jvm_hotspot_debugger_sparc_SPARCThreadContext_NPRGREG ++ #endif ++@@ -406,6 +409,12 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo ++ regs[REG_INDEX(R_O7)] = gregs.u_regs[14]; ++ #endif /* sparc */ ++ +++#if defined(aarch64) +++ +++#define REG_INDEX(reg) sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext_##reg +++ +++#endif /* aarch64 */ +++ ++ ++ (*env)->ReleaseLongArrayElements(env, array, regs, JNI_COMMIT); ++ return array; ++diff --git openjdk.orig/hotspot/agent/src/os/linux/libproc.h openjdk/hotspot/agent/src/os/linux/libproc.h ++index e4d77f7..c02b841 100644 ++--- openjdk.orig/hotspot/agent/src/os/linux/libproc.h +++++ openjdk/hotspot/agent/src/os/linux/libproc.h ++@@ -54,6 +54,10 @@ struct pt_regs { ++ ++ #endif //sparc or sparcv9 ++ +++#if defined(aarch64) +++#include "asm/ptrace.h" +++#endif +++ ++ /************************************************************************************ ++ ++ 0. This is very minimal subset of Solaris libproc just enough for current application. ++@@ -97,6 +101,9 @@ unsigned long regs[IA64_REG_COUNT]; /* integer and fp regs */ ++ #if defined(sparc) || defined(sparcv9) ++ #define user_regs_struct pt_regs ++ #endif +++#if defined(aarch64) +++#define user_regs_struct user_pt_regs +++#endif ++ ++ // This C bool type must be int for compatibility with Linux calls and ++ // it would be a mistake to equivalence it to C++ bool on many platforms ++diff --git openjdk.orig/hotspot/make/defs.make openjdk/hotspot/make/defs.make ++index 44f21f8..4e8d00b 100644 ++--- openjdk.orig/hotspot/make/defs.make +++++ openjdk/hotspot/make/defs.make ++@@ -232,7 +232,7 @@ ifneq ($(OSNAME),windows) ++ ++ # Use uname output for SRCARCH, but deal with platform differences. If ARCH ++ # is not explicitly listed below, it is treated as x86. ++- SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 arm ppc zero,$(ARCH))) +++ SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 arm ppc aarch64 zero,$(ARCH))) ++ ARCH/ = x86 ++ ARCH/sparc = sparc ++ ARCH/sparc64= sparc ++@@ -242,6 +242,7 @@ ifneq ($(OSNAME),windows) ++ ARCH/ppc64 = ppc ++ ARCH/ppc = ppc ++ ARCH/arm = arm +++ ARCH/aarch64= aarch64 ++ ARCH/zero = zero ++ ++ # BUILDARCH is usually the same as SRCARCH, except for sparcv9 ++@@ -267,11 +268,12 @@ ifneq ($(OSNAME),windows) ++ LIBARCH/sparcv9 = sparcv9 ++ LIBARCH/ia64 = ia64 ++ LIBARCH/ppc64 = ppc +++ LIBARCH/aarch64 = aarch64 ++ LIBARCH/ppc = ppc ++ LIBARCH/arm = arm ++ LIBARCH/zero = $(ZERO_LIBARCH) ++ ++- LP64_ARCH = sparcv9 amd64 ia64 zero +++ LP64_ARCH = sparcv9 amd64 ia64 aarch64 zero ++ endif ++ ++ # Required make macro settings for all platforms ++diff --git openjdk.orig/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make ++index 7c3d4f9..3bc7e8a 100644 ++--- openjdk.orig/hotspot/make/linux/makefiles/buildtree.make +++++ openjdk/hotspot/make/linux/makefiles/buildtree.make ++@@ -385,6 +385,7 @@ DATA_MODE/sparc = 32 ++ DATA_MODE/sparcv9 = 64 ++ DATA_MODE/amd64 = 64 ++ DATA_MODE/ia64 = 64 +++DATA_MODE/aarch64 = 64 ++ DATA_MODE/zero = $(ARCH_DATA_MODEL) ++ ++ JAVA_FLAG/32 = -d32 ++diff --git openjdk.orig/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make ++index 7bb3149..39ffda4 100644 ++--- openjdk.orig/hotspot/make/linux/makefiles/defs.make +++++ openjdk/hotspot/make/linux/makefiles/defs.make ++@@ -118,6 +118,15 @@ ifeq ($(ARCH), ppc) ++ HS_ARCH = ppc ++ endif ++ +++# AARCH64 +++ifeq ($(ARCH), aarch64) +++ ARCH_DATA_MODEL = 64 +++ MAKE_ARGS += LP64=1 +++ PLATFORM = linux-aarch64 +++ VM_PLATFORM = linux_aarch64 +++ HS_ARCH = aarch64 +++endif +++ ++ # determine if HotSpot is being built in JDK6 or earlier version ++ JDK6_OR_EARLIER=0 ++ ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1" ++diff --git openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make ++index 897e3a6..44f1673 100644 ++--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make +++++ openjdk/hotspot/make/linux/makefiles/gcc.make ++@@ -104,6 +104,7 @@ endif ++ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH)) ++ ARCHFLAG/i486 = -m32 -march=i586 ++ ARCHFLAG/amd64 = -m64 +++ARCHFLAG/aarch64 = ++ ARCHFLAG/ia64 = ++ ARCHFLAG/sparc = -m32 -mcpu=v9 ++ ARCHFLAG/sparcv9 = -m64 -mcpu=v9 ++diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp ++index c1b0e5c..9f7cda0 100644 ++--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp +++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp ++@@ -296,6 +296,8 @@ static char cpu_arch[] = "sparcv9"; ++ # else ++ static char cpu_arch[] = "sparc"; ++ # endif +++#elif defined(AARCH64) +++static char cpu_arch[] = "aarch64"; ++ #else ++ #error Add appropriate cpu_arch setting ++ #endif ++@@ -1442,7 +1444,7 @@ void os::Linux::clock_init() { ++ #ifndef SYS_clock_getres ++ ++ #if defined(IA32) || defined(AMD64) ++-#define SYS_clock_getres IA32_ONLY(266) AMD64_ONLY(229) +++#define SYS_clock_getres IA32_ONLY(266) AMD64_ONLY(229) AARCH64_ONLY(114) ++ #define sys_clock_getres(x,y) ::syscall(SYS_clock_getres, x, y) ++ #else ++ #warning "SYS_clock_getres not defined for this platform, disabling fast_thread_cpu_time" ++@@ -1930,7 +1932,7 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen) ++ static Elf32_Half running_arch_code=EM_AARCH64; ++ #else ++ #error Method os::dll_load requires that one of following is defined:\ ++- IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, SH +++ IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, SH, AARCH64 ++ #endif ++ ++ // Identify compatability class for VM's architecture and library's architecture ++@@ -3056,7 +3058,7 @@ void os::large_page_init() { ++ ++ #ifndef ZERO ++ _large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M) ++- ARM_ONLY(2 * M) PPC_ONLY(4 * M); +++ ARM_ONLY(2 * M) PPC_ONLY(4 * M) AARCH64_ONLY(2 * M); ++ #endif // ZERO ++ ++ FILE *fp = fopen("/proc/meminfo", "r"); ++@@ -5378,11 +5380,11 @@ void Parker::unpark() { ++ extern char** environ; ++ ++ #ifndef __NR_fork ++-#define __NR_fork IA32_ONLY(2) IA64_ONLY(not defined) AMD64_ONLY(57) +++#define __NR_fork IA32_ONLY(2) IA64_ONLY(not defined) AMD64_ONLY(57) AARCH64_ONLY(1079) ++ #endif ++ ++ #ifndef __NR_execve ++-#define __NR_execve IA32_ONLY(11) IA64_ONLY(1033) AMD64_ONLY(59) +++#define __NR_execve IA32_ONLY(11) IA64_ONLY(1033) AMD64_ONLY(59) AARCH64_ONLY(221) ++ #endif ++ ++ // Run the specified command in a separate process. Return its exit value, ++diff --git openjdk.orig/hotspot/src/share/vm/adlc/main.cpp openjdk/hotspot/src/share/vm/adlc/main.cpp ++index 47e207a..b93504e 100644 ++--- openjdk.orig/hotspot/src/share/vm/adlc/main.cpp +++++ openjdk/hotspot/src/share/vm/adlc/main.cpp ++@@ -244,6 +244,11 @@ int main(int argc, char *argv[]) ++ AD.addInclude(AD._CPP_file, "assembler_arm.inline.hpp"); ++ AD.addInclude(AD._CPP_file, "nativeInst_arm.hpp"); ++ AD.addInclude(AD._CPP_file, "vmreg_arm.inline.hpp"); +++#endif +++#ifdef TARGET_ARCH_aarch64 +++ AD.addInclude(AD._CPP_file, "assembler_aarch64.inline.hpp"); +++ AD.addInclude(AD._CPP_file, "nativeInst_aarch64.hpp"); +++ AD.addInclude(AD._CPP_file, "vmreg_aarch64.inline.hpp"); ++ #endif ++ AD.addInclude(AD._HPP_file, "memory/allocation.hpp"); ++ AD.addInclude(AD._HPP_file, "opto/machnode.hpp"); ++diff --git openjdk.orig/hotspot/src/share/vm/asm/assembler.cpp openjdk/hotspot/src/share/vm/asm/assembler.cpp ++index 2bcdcbc..57787ac 100644 ++--- openjdk.orig/hotspot/src/share/vm/asm/assembler.cpp +++++ openjdk/hotspot/src/share/vm/asm/assembler.cpp ++@@ -43,6 +43,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "assembler_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "assembler_aarch64.inline.hpp" +++#endif ++ ++ ++ // Implementation of AbstractAssembler ++diff --git openjdk.orig/hotspot/src/share/vm/asm/assembler.hpp openjdk/hotspot/src/share/vm/asm/assembler.hpp ++index c25aa3f..4f77825 100644 ++--- openjdk.orig/hotspot/src/share/vm/asm/assembler.hpp +++++ openjdk/hotspot/src/share/vm/asm/assembler.hpp ++@@ -51,6 +51,10 @@ ++ # include "register_ppc.hpp" ++ # include "vm_version_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "register_aarch64.hpp" +++# include "vm_version_aarch64.hpp" +++#endif ++ ++ // This file contains platform-independent assembler declarations. ++ ++@@ -459,6 +463,9 @@ class AbstractAssembler : public ResourceObj { ++ #ifdef TARGET_ARCH_ppc ++ # include "assembler_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "assembler_aarch64.hpp" +++#endif ++ ++ ++ #endif // SHARE_VM_ASM_ASSEMBLER_HPP ++diff --git openjdk.orig/hotspot/src/share/vm/asm/codeBuffer.hpp openjdk/hotspot/src/share/vm/asm/codeBuffer.hpp ++index 685297a..002faef 100644 ++--- openjdk.orig/hotspot/src/share/vm/asm/codeBuffer.hpp +++++ openjdk/hotspot/src/share/vm/asm/codeBuffer.hpp ++@@ -573,6 +573,9 @@ class CodeBuffer: public StackObj { ++ #ifdef TARGET_ARCH_ppc ++ # include "codeBuffer_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "codeBuffer_aarch64.hpp" +++#endif ++ ++ }; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp openjdk/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp ++index c95a23c..2ec31e5 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp +++++ openjdk/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp ++@@ -877,6 +877,13 @@ static bool match(UnsafeRawOp* x, ++ return false; ++ } ++ +++// AARCH64 cannot handle shifts which are not either 0, or log2 of the type size +++#ifdef AARCH64 +++ if (*log2_scale != 0 && +++ (1 << *log2_scale) != type2aelembytes(x->basic_type(), true)) +++ return false; +++#endif +++ ++ // If the value is pinned then it will be always be computed so ++ // there's no profit to reshaping the expression. ++ return !root->is_pinned(); ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_Defs.hpp openjdk/hotspot/src/share/vm/c1/c1_Defs.hpp ++index bebb3b0..ddaceb7 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_Defs.hpp +++++ openjdk/hotspot/src/share/vm/c1/c1_Defs.hpp ++@@ -41,6 +41,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "register_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "register_aarch64.hpp" +++#endif ++ ++ // set frame size and return address offset to these values in blobs ++ // (if the compiled frame uses ebp as link pointer on IA; otherwise, ++@@ -62,6 +65,9 @@ enum { ++ #ifdef TARGET_ARCH_ppc ++ # include "c1_Defs_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c1_Defs_aarch64.hpp" +++#endif ++ ++ ++ // native word offsets from memory address ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp openjdk/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp ++index a1e4c38..491b064 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp +++++ openjdk/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp ++@@ -44,6 +44,9 @@ class FpuStackSim; ++ #ifdef TARGET_ARCH_ppc ++ # include "c1_FpuStackSim_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c1_FpuStackSim_aarch64.hpp" +++#endif ++ ++ ++ #endif // SHARE_VM_C1_C1_FPUSTACKSIM_HPP ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_FrameMap.cpp openjdk/hotspot/src/share/vm/c1/c1_FrameMap.cpp ++index ea50b27..6a3dc63 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_FrameMap.cpp +++++ openjdk/hotspot/src/share/vm/c1/c1_FrameMap.cpp ++@@ -41,6 +41,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "vmreg_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vmreg_aarch64.inline.hpp" +++#endif ++ ++ ++ ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_FrameMap.hpp openjdk/hotspot/src/share/vm/c1/c1_FrameMap.hpp ++index 288fc5c..e9a0250 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_FrameMap.hpp +++++ openjdk/hotspot/src/share/vm/c1/c1_FrameMap.hpp ++@@ -93,6 +93,9 @@ class FrameMap : public CompilationResourceObj { ++ #endif ++ #ifdef TARGET_ARCH_ppc ++ # include "c1_FrameMap_ppc.hpp" +++#endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c1_FrameMap_aarch64.hpp" ++ #endif ++ ++ ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LIR.cpp openjdk/hotspot/src/share/vm/c1/c1_LIR.cpp ++index 776a6a3..6e1a362 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_LIR.cpp +++++ openjdk/hotspot/src/share/vm/c1/c1_LIR.cpp ++@@ -67,7 +67,7 @@ FloatRegister LIR_OprDesc::as_double_reg() const { ++ ++ #endif ++ ++-#ifdef ARM +++#if defined(ARM) || defined (TARGET_ARCH_aarch64) ++ ++ FloatRegister LIR_OprDesc::as_float_reg() const { ++ return as_FloatRegister(fpu_regnr()); ++@@ -147,7 +147,11 @@ void LIR_Address::verify() const { ++ #endif ++ #ifdef _LP64 ++ assert(base()->is_cpu_register(), "wrong base operand"); +++#ifndef TARGET_ARCH_aarch64 ++ assert(index()->is_illegal() || index()->is_double_cpu(), "wrong index operand"); +++#else +++ assert(index()->is_illegal() || index()->is_double_cpu() || index()->is_single_cpu(), "wrong index operand"); +++#endif ++ assert(base()->type() == T_OBJECT || base()->type() == T_LONG, ++ "wrong type for addresses"); ++ #else ++@@ -545,7 +549,7 @@ void LIR_OpVisitState::visit(LIR_Op* op) { ++ assert(opConvert->_info == NULL, "must be"); ++ if (opConvert->_opr->is_valid()) do_input(opConvert->_opr); ++ if (opConvert->_result->is_valid()) do_output(opConvert->_result); ++-#ifdef PPC +++#if defined(PPC) || defined(TARGET_ARCH_aarch64) ++ if (opConvert->_tmp1->is_valid()) do_temp(opConvert->_tmp1); ++ if (opConvert->_tmp2->is_valid()) do_temp(opConvert->_tmp2); ++ #endif ++@@ -1468,6 +1472,11 @@ void LIR_OprDesc::print(outputStream* out) const { ++ out->print("fpu%d", fpu_regnr()); ++ } else if (is_double_fpu()) { ++ out->print("fpu%d", fpu_regnrLo()); +++#elif defined(AARCH64) +++ } else if (is_single_fpu()) { +++ out->print("fpu%d", fpu_regnr()); +++ } else if (is_double_fpu()) { +++ out->print("fpu%d", fpu_regnrLo()); ++ #elif defined(ARM) ++ } else if (is_single_fpu()) { ++ out->print("s%d", fpu_regnr()); ++@@ -1836,7 +1845,7 @@ void LIR_OpConvert::print_instr(outputStream* out) const { ++ print_bytecode(out, bytecode()); ++ in_opr()->print(out); out->print(" "); ++ result_opr()->print(out); out->print(" "); ++-#ifdef PPC +++#if defined(PPC) || defined(TARGET_ARCH_aarch64) ++ if(tmp1()->is_valid()) { ++ tmp1()->print(out); out->print(" "); ++ tmp2()->print(out); out->print(" "); ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LIR.hpp openjdk/hotspot/src/share/vm/c1/c1_LIR.hpp ++index f8589c3..eb3383f 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_LIR.hpp +++++ openjdk/hotspot/src/share/vm/c1/c1_LIR.hpp ++@@ -437,8 +437,8 @@ class LIR_OprDesc: public CompilationResourceObj { ++ XMMRegister as_xmm_double_reg() const; ++ // for compatibility with RInfo ++ int fpu () const { return lo_reg_half(); } ++-#endif // X86 ++-#if defined(SPARC) || defined(ARM) || defined(PPC) +++#endif +++#if defined(SPARC) || defined(ARM) || defined(PPC) || defined(AARCH64) ++ FloatRegister as_float_reg () const; ++ FloatRegister as_double_reg () const; ++ #endif ++@@ -526,7 +526,7 @@ class LIR_Address: public LIR_OprPtr { ++ , _type(type) ++ , _disp(0) { verify(); } ++ ++-#if defined(X86) || defined(ARM) +++#if defined(X86) || defined(ARM) || defined(AARCH64) ++ LIR_Address(LIR_Opr base, LIR_Opr index, Scale scale, intx disp, BasicType type): ++ _base(base) ++ , _index(index) ++@@ -601,7 +601,7 @@ class LIR_OprFact: public AllStatic { ++ LIR_OprDesc::fpu_register | ++ LIR_OprDesc::double_size); } ++ #endif ++-#ifdef X86 +++#if defined(X86) || defined(AARCH64) ++ static LIR_Opr double_fpu(int reg) { return (LIR_Opr)(intptr_t)((reg << LIR_OprDesc::reg1_shift) | ++ (reg << LIR_OprDesc::reg2_shift) | ++ LIR_OprDesc::double_type | ++@@ -1398,7 +1398,7 @@ class LIR_OpConvert: public LIR_Op1 { ++ private: ++ Bytecodes::Code _bytecode; ++ ConversionStub* _stub; ++-#ifdef PPC +++#if defined(PPC) || defined(TARGET_ARCH_aarch64) ++ LIR_Opr _tmp1; ++ LIR_Opr _tmp2; ++ #endif ++@@ -1413,7 +1413,7 @@ class LIR_OpConvert: public LIR_Op1 { ++ #endif ++ , _bytecode(code) {} ++ ++-#ifdef PPC +++#if defined(PPC) || defined(TARGET_ARCH_aarch64) ++ LIR_OpConvert(Bytecodes::Code code, LIR_Opr opr, LIR_Opr result, ConversionStub* stub ++ ,LIR_Opr tmp1, LIR_Opr tmp2) ++ : LIR_Op1(lir_convert, opr, result) ++@@ -1425,7 +1425,7 @@ class LIR_OpConvert: public LIR_Op1 { ++ ++ Bytecodes::Code bytecode() const { return _bytecode; } ++ ConversionStub* stub() const { return _stub; } ++-#ifdef PPC +++#if defined(PPC) || defined(TARGET_ARCH_aarch64) ++ LIR_Opr tmp1() const { return _tmp1; } ++ LIR_Opr tmp2() const { return _tmp2; } ++ #endif ++@@ -1973,7 +1973,14 @@ class LIR_List: public CompilationResourceObj { ++ #ifdef PPC ++ void convert(Bytecodes::Code code, LIR_Opr left, LIR_Opr dst, LIR_Opr tmp1, LIR_Opr tmp2) { append(new LIR_OpConvert(code, left, dst, NULL, tmp1, tmp2)); } ++ #endif +++#if defined (TARGET_ARCH_aarch64) +++ void convert(Bytecodes::Code code, LIR_Opr left, LIR_Opr dst, +++ ConversionStub* stub = NULL, LIR_Opr tmp1 = LIR_OprDesc::illegalOpr()) { +++ append(new LIR_OpConvert(code, left, dst, stub, tmp1, LIR_OprDesc::illegalOpr())); +++ } +++#else ++ void convert(Bytecodes::Code code, LIR_Opr left, LIR_Opr dst, ConversionStub* stub = NULL/*, bool is_32bit = false*/) { append(new LIR_OpConvert(code, left, dst, stub)); } +++#endif ++ ++ void logical_and (LIR_Opr left, LIR_Opr right, LIR_Opr dst) { append(new LIR_Op2(lir_logic_and, left, right, dst)); } ++ void logical_or (LIR_Opr left, LIR_Opr right, LIR_Opr dst) { append(new LIR_Op2(lir_logic_or, left, right, dst)); } ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp openjdk/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp ++index 528f21e..4d83fca 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp +++++ openjdk/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp ++@@ -50,6 +50,10 @@ ++ # include "nativeInst_ppc.hpp" ++ # include "vmreg_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "nativeInst_aarch64.hpp" +++# include "vmreg_aarch64.inline.hpp" +++#endif ++ ++ ++ void LIR_Assembler::patching_epilog(PatchingStub* patch, LIR_PatchCode patch_code, Register obj, CodeEmitInfo* info) { ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp openjdk/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp ++index 58adf59..f4a49b3 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp +++++ openjdk/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp ++@@ -261,6 +261,9 @@ class LIR_Assembler: public CompilationResourceObj { ++ #ifdef TARGET_ARCH_ppc ++ # include "c1_LIRAssembler_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c1_LIRAssembler_aarch64.hpp" +++#endif ++ ++ }; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LinearScan.cpp openjdk/hotspot/src/share/vm/c1/c1_LinearScan.cpp ++index aaae71d..93f9f5f 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_LinearScan.cpp +++++ openjdk/hotspot/src/share/vm/c1/c1_LinearScan.cpp ++@@ -47,6 +47,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "vmreg_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vmreg_aarch64.inline.hpp" +++#endif ++ ++ ++ #ifndef PRODUCT ++@@ -2190,7 +2193,7 @@ LIR_Opr LinearScan::color_lir_opr(LIR_Opr opr, int op_id, LIR_OpVisitState::OprM ++ ++ LIR_Opr res = operand_for_interval(interval); ++ ++-#ifdef X86 +++#if defined(X86) || defined(AARCH64) ++ // new semantic for is_last_use: not only set on definite end of interval, ++ // but also before hole ++ // This may still miss some cases (e.g. for dead values), but it is not necessary that the ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LinearScan.hpp openjdk/hotspot/src/share/vm/c1/c1_LinearScan.hpp ++index 0c06f1b..a152328 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_LinearScan.hpp +++++ openjdk/hotspot/src/share/vm/c1/c1_LinearScan.hpp ++@@ -985,6 +985,9 @@ class LinearScanTimers : public StackObj { ++ #ifdef TARGET_ARCH_ppc ++ # include "c1_LinearScan_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c1_LinearScan_aarch64.hpp" +++#endif ++ ++ ++ #endif // SHARE_VM_C1_C1_LINEARSCAN_HPP ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp openjdk/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp ++index 55d9803..eda2174 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp +++++ openjdk/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp ++@@ -41,6 +41,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "assembler_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "assembler_aarch64.inline.hpp" +++#endif ++ ++ class CodeEmitInfo; ++ ++@@ -73,6 +76,9 @@ class C1_MacroAssembler: public MacroAssembler { ++ #ifdef TARGET_ARCH_ppc ++ # include "c1_MacroAssembler_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c1_MacroAssembler_aarch64.hpp" +++#endif ++ ++ }; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_Runtime1.cpp openjdk/hotspot/src/share/vm/c1/c1_Runtime1.cpp ++index 765dec4..f0b3aae 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_Runtime1.cpp +++++ openjdk/hotspot/src/share/vm/c1/c1_Runtime1.cpp ++@@ -1103,6 +1103,7 @@ JRT_END ++ // completes we can check for deoptimization. This simplifies the ++ // assembly code in the cpu directories. ++ // +++#ifndef TARGET_ARCH_aarch64 ++ int Runtime1::move_klass_patching(JavaThread* thread) { ++ // ++ // NOTE: we are still in Java ++@@ -1150,6 +1151,7 @@ int Runtime1::access_field_patching(JavaThread* thread) { ++ ++ return caller_is_deopted(); ++ JRT_END +++#endif ++ ++ ++ JRT_LEAF(void, Runtime1::trace_block_entry(jint block_id)) ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_Runtime1.hpp openjdk/hotspot/src/share/vm/c1/c1_Runtime1.hpp ++index 2032564..19261be 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_Runtime1.hpp +++++ openjdk/hotspot/src/share/vm/c1/c1_Runtime1.hpp ++@@ -159,6 +159,9 @@ class Runtime1: public AllStatic { ++ static int move_klass_patching(JavaThread* thread); ++ ++ static void patch_code(JavaThread* thread, StubID stub_id); +++#ifdef TARGET_ARCH_aarch64 +++ static void patch_code_aarch64(JavaThread* thread, StubID stub_id); +++#endif ++ ++ public: ++ // initialization ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_globals.hpp openjdk/hotspot/src/share/vm/c1/c1_globals.hpp ++index 15f3cc1..4143a87 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_globals.hpp +++++ openjdk/hotspot/src/share/vm/c1/c1_globals.hpp ++@@ -38,6 +38,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "c1_globals_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c1_globals_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "c1_globals_linux.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/classfile/classFileStream.hpp openjdk/hotspot/src/share/vm/classfile/classFileStream.hpp ++index cf6f0e5..b128b3a 100644 ++--- openjdk.orig/hotspot/src/share/vm/classfile/classFileStream.hpp +++++ openjdk/hotspot/src/share/vm/classfile/classFileStream.hpp ++@@ -41,6 +41,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ // Input stream for reading .class file ++ // ++diff --git openjdk.orig/hotspot/src/share/vm/classfile/stackMapTable.hpp openjdk/hotspot/src/share/vm/classfile/stackMapTable.hpp ++index f876029..ac415b6 100644 ++--- openjdk.orig/hotspot/src/share/vm/classfile/stackMapTable.hpp +++++ openjdk/hotspot/src/share/vm/classfile/stackMapTable.hpp ++@@ -46,6 +46,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ class StackMapReader; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/classfile/verifier.cpp openjdk/hotspot/src/share/vm/classfile/verifier.cpp ++index c5c5e11..9c22a21 100644 ++--- openjdk.orig/hotspot/src/share/vm/classfile/verifier.cpp +++++ openjdk/hotspot/src/share/vm/classfile/verifier.cpp ++@@ -60,6 +60,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ #define NOFAILOVER_MAJOR_VERSION 51 ++ ++diff --git openjdk.orig/hotspot/src/share/vm/code/codeBlob.cpp openjdk/hotspot/src/share/vm/code/codeBlob.cpp ++index 244c320..429e0be 100644 ++--- openjdk.orig/hotspot/src/share/vm/code/codeBlob.cpp +++++ openjdk/hotspot/src/share/vm/code/codeBlob.cpp ++@@ -54,6 +54,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "nativeInst_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "nativeInst_aarch64.hpp" +++#endif ++ #ifdef COMPILER1 ++ #include "c1/c1_Runtime1.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/code/compiledIC.hpp openjdk/hotspot/src/share/vm/code/compiledIC.hpp ++index fe1cfb3..c9f6a2e 100644 ++--- openjdk.orig/hotspot/src/share/vm/code/compiledIC.hpp +++++ openjdk/hotspot/src/share/vm/code/compiledIC.hpp ++@@ -44,6 +44,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "nativeInst_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "nativeInst_aarch64.hpp" +++#endif ++ ++ //----------------------------------------------------------------------------- ++ // The CompiledIC represents a compiled inline cache. ++diff --git openjdk.orig/hotspot/src/share/vm/code/icBuffer.cpp openjdk/hotspot/src/share/vm/code/icBuffer.cpp ++index ed70457..d022482 100644 ++--- openjdk.orig/hotspot/src/share/vm/code/icBuffer.cpp +++++ openjdk/hotspot/src/share/vm/code/icBuffer.cpp ++@@ -52,6 +52,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "assembler_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "assembler_aarch64.inline.hpp" +++#endif ++ ++ ++ DEF_STUB_INTERFACE(ICStub); ++diff --git openjdk.orig/hotspot/src/share/vm/code/relocInfo.cpp openjdk/hotspot/src/share/vm/code/relocInfo.cpp ++index 4fd82df..78310e6 100644 ++--- openjdk.orig/hotspot/src/share/vm/code/relocInfo.cpp +++++ openjdk/hotspot/src/share/vm/code/relocInfo.cpp ++@@ -49,6 +49,10 @@ ++ # include "assembler_ppc.inline.hpp" ++ # include "nativeInst_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "assembler_aarch64.inline.hpp" +++# include "nativeInst_aarch64.hpp" +++#endif ++ ++ ++ const RelocationHolder RelocationHolder::none; // its type is relocInfo::none ++diff --git openjdk.orig/hotspot/src/share/vm/code/relocInfo.hpp openjdk/hotspot/src/share/vm/code/relocInfo.hpp ++index 1d14b44..3823889 100644 ++--- openjdk.orig/hotspot/src/share/vm/code/relocInfo.hpp +++++ openjdk/hotspot/src/share/vm/code/relocInfo.hpp ++@@ -435,6 +435,9 @@ class relocInfo VALUE_OBJ_CLASS_SPEC { ++ #endif ++ #ifdef TARGET_ARCH_ppc ++ # include "relocInfo_ppc.hpp" +++#endif +++#ifdef TARGET_ARCH_aarch64 +++# include "relocInfo_aarch64.hpp" ++ #endif ++ ++ ++diff --git openjdk.orig/hotspot/src/share/vm/code/vmreg.hpp openjdk/hotspot/src/share/vm/code/vmreg.hpp ++index d57e6f8..1c18e47 100644 ++--- openjdk.orig/hotspot/src/share/vm/code/vmreg.hpp +++++ openjdk/hotspot/src/share/vm/code/vmreg.hpp ++@@ -42,6 +42,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "register_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "register_aarch64.hpp" +++#endif ++ #ifdef COMPILER2 ++ #include "opto/adlcVMDeps.hpp" ++ #include "utilities/ostream.hpp" ++@@ -63,6 +66,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/adGlobals_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/adGlobals_aarch64.hpp" +++#endif ++ #endif ++ ++ //------------------------------VMReg------------------------------------------ ++@@ -182,6 +188,9 @@ public: ++ #ifdef TARGET_ARCH_ppc ++ # include "vmreg_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vmreg_aarch64.hpp" +++#endif ++ ++ ++ }; ++diff --git openjdk.orig/hotspot/src/share/vm/compiler/disassembler.cpp openjdk/hotspot/src/share/vm/compiler/disassembler.cpp ++index 9603e86..3a67259 100644 ++--- openjdk.orig/hotspot/src/share/vm/compiler/disassembler.cpp +++++ openjdk/hotspot/src/share/vm/compiler/disassembler.cpp ++@@ -47,6 +47,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "depChecker_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "depChecker_aarch64.hpp" +++#endif ++ #ifdef SHARK ++ #include "shark/sharkEntry.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/compiler/disassembler.hpp openjdk/hotspot/src/share/vm/compiler/disassembler.hpp ++index a70b8cc..4c90c9a 100644 ++--- openjdk.orig/hotspot/src/share/vm/compiler/disassembler.hpp +++++ openjdk/hotspot/src/share/vm/compiler/disassembler.hpp ++@@ -78,6 +78,9 @@ class Disassembler { ++ #endif ++ #ifdef TARGET_ARCH_ppc ++ # include "disassembler_ppc.hpp" +++#endif +++#ifdef TARGET_ARCH_aarch64 +++# include "disassembler_aarch64.hpp" ++ #endif ++ ++ ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp ++index d23f37a..24ca30e 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp ++@@ -44,6 +44,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "interp_masm_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "interp_masm_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "thread_linux.inline.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecode.hpp openjdk/hotspot/src/share/vm/interpreter/bytecode.hpp ++index 107161a..205d0f7 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecode.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/bytecode.hpp ++@@ -43,6 +43,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ class ciBytecodeStream; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp ++index e637414..308ad3b 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp ++@@ -47,6 +47,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ #ifdef CC_INTERP ++ ++@@ -618,6 +621,9 @@ void print(); ++ #ifdef TARGET_ARCH_ppc ++ # include "bytecodeInterpreter_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytecodeInterpreter_aarch64.hpp" +++#endif ++ ++ ++ }; // BytecodeInterpreter ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp ++index 3715a52..0d6a8aa 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp ++@@ -58,6 +58,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytecodeInterpreter_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytecodeInterpreter_aarch64.inline.hpp" +++#endif ++ ++ #endif // CC_INTERP ++ ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeStream.hpp openjdk/hotspot/src/share/vm/interpreter/bytecodeStream.hpp ++index 6106eac..f3dee0a 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeStream.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeStream.hpp ++@@ -43,6 +43,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ // A BytecodeStream is used for fast iteration over the bytecodes ++ // of a methodOop. ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecodes.cpp openjdk/hotspot/src/share/vm/interpreter/bytecodes.cpp ++index 04f3f64..48ef30e 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodes.cpp +++++ openjdk/hotspot/src/share/vm/interpreter/bytecodes.cpp ++@@ -41,6 +41,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ ++ #if defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER < 1600)) ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/cppInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/cppInterpreter.hpp ++index e3a9f2e..8347473 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/cppInterpreter.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/cppInterpreter.hpp ++@@ -101,6 +101,9 @@ class CppInterpreter: public AbstractInterpreter { ++ #ifdef TARGET_ARCH_ppc ++ # include "cppInterpreter_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "cppInterpreter_aarch64.hpp" +++#endif ++ ++ ++ }; ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp openjdk/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp ++index c27805e..272f6e8 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp ++@@ -59,6 +59,9 @@ class CppInterpreterGenerator: public AbstractInterpreterGenerator { ++ #ifdef TARGET_ARCH_ppc ++ # include "cppInterpreterGenerator_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "cppInterpreterGenerator_aarch64.hpp" +++#endif ++ ++ }; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/interpreter.hpp openjdk/hotspot/src/share/vm/interpreter/interpreter.hpp ++index 0ab0be7..6a6822f 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/interpreter.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/interpreter.hpp ++@@ -158,6 +158,9 @@ class Interpreter: public CC_INTERP_ONLY(CppInterpreter) NOT_CC_INTERP(TemplateI ++ #ifdef TARGET_ARCH_ppc ++ # include "interpreter_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "interpreter_aarch64.hpp" +++#endif ++ ++ }; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp openjdk/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp ++index 7bc43ec..0434ca3 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp ++@@ -56,6 +56,9 @@ InterpreterGenerator(StubQueue* _code); ++ #ifdef TARGET_ARCH_ppc ++ # include "interpreterGenerator_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "interpreterGenerator_aarch64.hpp" +++#endif ++ ++ ++ }; ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp openjdk/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp ++index e451c04..37700fb 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp +++++ openjdk/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp ++@@ -71,6 +71,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "vm_version_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vm_version_aarch64.hpp" +++#endif ++ #ifdef COMPILER2 ++ #include "opto/runtime.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp openjdk/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp ++index 93c1a9e..425400e 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp ++@@ -164,6 +164,9 @@ class InterpreterRuntime: AllStatic { ++ #endif ++ #ifdef TARGET_ARCH_ppc ++ # include "interpreterRT_ppc.hpp" +++#endif +++#ifdef TARGET_ARCH_aarch64 +++# include "interpreterRT_aarch64.hpp" ++ #endif ++ ++ ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/templateInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/templateInterpreter.hpp ++index 25d74f7..f78a16e 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/templateInterpreter.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/templateInterpreter.hpp ++@@ -198,6 +198,9 @@ class TemplateInterpreter: public AbstractInterpreter { ++ #ifdef TARGET_ARCH_ppc ++ # include "templateInterpreter_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "templateInterpreter_aarch64.hpp" +++#endif ++ ++ ++ }; ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp openjdk/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp ++index fb7bdc5..6007630 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp ++@@ -101,6 +101,9 @@ class TemplateInterpreterGenerator: public AbstractInterpreterGenerator { ++ #ifdef TARGET_ARCH_ppc ++ # include "templateInterpreterGenerator_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "templateInterpreterGenerator_aarch64.hpp" +++#endif ++ ++ ++ }; ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/templateTable.hpp openjdk/hotspot/src/share/vm/interpreter/templateTable.hpp ++index 5d2a7e8..c5e0f0a 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/templateTable.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/templateTable.hpp ++@@ -43,6 +43,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "interp_masm_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "interp_masm_aarch64.hpp" +++#endif ++ ++ #ifndef CC_INTERP ++ // All the necessary definitions used for (bytecode) template generation. Instead of ++@@ -373,6 +376,9 @@ class TemplateTable: AllStatic { ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "templateTable_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "templateTable_aarch64.hpp" +++#endif ++ ++ }; ++ #endif /* !CC_INTERP */ ++diff --git openjdk.orig/hotspot/src/share/vm/oops/constantPoolOop.hpp openjdk/hotspot/src/share/vm/oops/constantPoolOop.hpp ++index c2f985d..3d0d0fc 100644 ++--- openjdk.orig/hotspot/src/share/vm/oops/constantPoolOop.hpp +++++ openjdk/hotspot/src/share/vm/oops/constantPoolOop.hpp ++@@ -45,6 +45,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ // A constantPool is an array containing class constants as described in the ++ // class file. ++diff --git openjdk.orig/hotspot/src/share/vm/oops/oop.inline.hpp openjdk/hotspot/src/share/vm/oops/oop.inline.hpp ++index db14b2e..c8b326f 100644 ++--- openjdk.orig/hotspot/src/share/vm/oops/oop.inline.hpp +++++ openjdk/hotspot/src/share/vm/oops/oop.inline.hpp ++@@ -58,6 +58,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ // Implementation of all inlined member functions defined in oop.hpp ++ // We need a separate file to avoid circular references ++diff --git openjdk.orig/hotspot/src/share/vm/opto/buildOopMap.cpp openjdk/hotspot/src/share/vm/opto/buildOopMap.cpp ++index fc73160..2c5ec41 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/buildOopMap.cpp +++++ openjdk/hotspot/src/share/vm/opto/buildOopMap.cpp ++@@ -47,6 +47,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "vmreg_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vmreg_aarch64.inline.hpp" +++#endif ++ ++ // The functions in this file builds OopMaps after all scheduling is done. ++ // ++diff --git openjdk.orig/hotspot/src/share/vm/opto/c2_globals.hpp openjdk/hotspot/src/share/vm/opto/c2_globals.hpp ++index f73dcbd..462c875 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/c2_globals.hpp +++++ openjdk/hotspot/src/share/vm/opto/c2_globals.hpp ++@@ -35,6 +35,9 @@ ++ #ifdef TARGET_ARCH_arm ++ # include "c2_globals_arm.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c2_globals_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "c2_globals_linux.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/opto/c2compiler.cpp openjdk/hotspot/src/share/vm/opto/c2compiler.cpp ++index 713e3f1..948e447 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/c2compiler.cpp +++++ openjdk/hotspot/src/share/vm/opto/c2compiler.cpp ++@@ -43,6 +43,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ ++ ++ volatile int C2Compiler::_runtimes = uninitialized; ++diff --git openjdk.orig/hotspot/src/share/vm/opto/compile.cpp openjdk/hotspot/src/share/vm/opto/compile.cpp ++index a7ee07a..91dc290 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/compile.cpp +++++ openjdk/hotspot/src/share/vm/opto/compile.cpp ++@@ -80,6 +80,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ ++ ++ // -------------------- Compile::mach_constant_base_node ----------------------- ++diff --git openjdk.orig/hotspot/src/share/vm/opto/gcm.cpp openjdk/hotspot/src/share/vm/opto/gcm.cpp ++index 8b8f311..4deb0b4 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/gcm.cpp +++++ openjdk/hotspot/src/share/vm/opto/gcm.cpp ++@@ -53,6 +53,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ ++ // Portions of code courtesy of Clifford Click ++ ++diff --git openjdk.orig/hotspot/src/share/vm/opto/lcm.cpp openjdk/hotspot/src/share/vm/opto/lcm.cpp ++index aee6123..4b9aaed 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/lcm.cpp +++++ openjdk/hotspot/src/share/vm/opto/lcm.cpp ++@@ -48,6 +48,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ ++ // Optimization - Graph Style ++ ++diff --git openjdk.orig/hotspot/src/share/vm/opto/locknode.hpp openjdk/hotspot/src/share/vm/opto/locknode.hpp ++index 91b99bc..665594f 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/locknode.hpp +++++ openjdk/hotspot/src/share/vm/opto/locknode.hpp ++@@ -46,6 +46,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ ++ //------------------------------BoxLockNode------------------------------------ ++ class BoxLockNode : public Node { ++diff --git openjdk.orig/hotspot/src/share/vm/opto/matcher.cpp openjdk/hotspot/src/share/vm/opto/matcher.cpp ++index ca2d4e3..d0f55c5 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/matcher.cpp +++++ openjdk/hotspot/src/share/vm/opto/matcher.cpp ++@@ -55,6 +55,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ ++ OptoReg::Name OptoReg::c_frame_pointer; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/opto/output.hpp openjdk/hotspot/src/share/vm/opto/output.hpp ++index 50b6e76..6a920b2 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/output.hpp +++++ openjdk/hotspot/src/share/vm/opto/output.hpp ++@@ -45,6 +45,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ ++ class Arena; ++ class Bundle; ++diff --git openjdk.orig/hotspot/src/share/vm/opto/regmask.cpp openjdk/hotspot/src/share/vm/opto/regmask.cpp ++index ce220f0..20c6028 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/regmask.cpp +++++ openjdk/hotspot/src/share/vm/opto/regmask.cpp ++@@ -43,6 +43,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ ++ #define RM_SIZE _RM_SIZE /* a constant private to the class RegMask */ ++ ++diff --git openjdk.orig/hotspot/src/share/vm/opto/regmask.hpp openjdk/hotspot/src/share/vm/opto/regmask.hpp ++index e50ff84..26c6854 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/regmask.hpp +++++ openjdk/hotspot/src/share/vm/opto/regmask.hpp ++@@ -46,6 +46,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/adGlobals_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/adGlobals_aarch64.hpp" +++#endif ++ ++ // Some fun naming (textual) substitutions: ++ // ++diff --git openjdk.orig/hotspot/src/share/vm/opto/runtime.cpp openjdk/hotspot/src/share/vm/opto/runtime.cpp ++index d315f10..11a58b1 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/runtime.cpp +++++ openjdk/hotspot/src/share/vm/opto/runtime.cpp ++@@ -86,6 +86,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ ++ ++ // For debugging purposes: ++diff --git openjdk.orig/hotspot/src/share/vm/prims/jniCheck.cpp openjdk/hotspot/src/share/vm/prims/jniCheck.cpp ++index 3bf4ecd..2ad9014 100644 ++--- openjdk.orig/hotspot/src/share/vm/prims/jniCheck.cpp +++++ openjdk/hotspot/src/share/vm/prims/jniCheck.cpp ++@@ -51,6 +51,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "jniTypes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "jniTypes_aarch64.hpp" +++#endif ++ ++ ++ // Heap objects are allowed to be directly referenced only in VM code, ++diff --git openjdk.orig/hotspot/src/share/vm/prims/jni_md.h openjdk/hotspot/src/share/vm/prims/jni_md.h ++index 7fa5829..3bd4e31 100644 ++--- openjdk.orig/hotspot/src/share/vm/prims/jni_md.h +++++ openjdk/hotspot/src/share/vm/prims/jni_md.h ++@@ -39,6 +39,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "jni_ppc.h" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "jni_aarch64.h" +++#endif ++ ++ ++ /* ++diff --git openjdk.orig/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp openjdk/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp ++index 97dd154..fd1fa43 100644 ++--- openjdk.orig/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp +++++ openjdk/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp ++@@ -43,6 +43,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ // FIXME: add Deprecated, LVTT attributes ++ // FIXME: fix Synthetic attribute ++ // FIXME: per Serguei, add error return handling for constantPoolOopDesc::copy_cpool_bytes() ++diff --git openjdk.orig/hotspot/src/share/vm/prims/methodHandles.hpp openjdk/hotspot/src/share/vm/prims/methodHandles.hpp ++index 514ba6a..ea747d0 100644 ++--- openjdk.orig/hotspot/src/share/vm/prims/methodHandles.hpp +++++ openjdk/hotspot/src/share/vm/prims/methodHandles.hpp ++@@ -738,6 +738,9 @@ public: ++ #ifdef TARGET_ARCH_ppc ++ # include "methodHandles_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "methodHandles_aarch64.hpp" +++#endif ++ }; ++ ++ ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/atomic.cpp openjdk/hotspot/src/share/vm/runtime/atomic.cpp ++index 80780d7..5a34f15 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/atomic.cpp +++++ openjdk/hotspot/src/share/vm/runtime/atomic.cpp ++@@ -60,6 +60,9 @@ ++ #ifdef TARGET_OS_ARCH_linux_ppc ++ # include "atomic_linux_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_OS_ARCH_linux_aarch64 +++# include "atomic_linux_aarch64.inline.hpp" +++#endif ++ #ifdef TARGET_OS_ARCH_bsd_x86 ++ # include "atomic_bsd_x86.inline.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/deoptimization.cpp openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp ++index 4735588..4e7958a 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/deoptimization.cpp +++++ openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp ++@@ -65,6 +65,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "vmreg_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vmreg_aarch64.inline.hpp" +++#endif ++ #ifdef COMPILER2 ++ #ifdef TARGET_ARCH_MODEL_x86_32 ++ # include "adfiles/ad_x86_32.hpp" ++@@ -84,6 +87,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ #endif ++ ++ bool DeoptimizationMarker::_is_active = false; ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/dtraceJSDT.hpp openjdk/hotspot/src/share/vm/runtime/dtraceJSDT.hpp ++index bff4310..1129cd6 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/dtraceJSDT.hpp +++++ openjdk/hotspot/src/share/vm/runtime/dtraceJSDT.hpp ++@@ -41,6 +41,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "nativeInst_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "nativeInst_aarch64.hpp" +++#endif ++ ++ class RegisteredProbes; ++ typedef jlong OpaqueProbes; ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/frame.cpp openjdk/hotspot/src/share/vm/runtime/frame.cpp ++index 7ae9aa8..6654714 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/frame.cpp +++++ openjdk/hotspot/src/share/vm/runtime/frame.cpp ++@@ -59,6 +59,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "nativeInst_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "nativeInst_aarch64.hpp" +++#endif ++ ++ RegisterMap::RegisterMap(JavaThread *thread, bool update_map) { ++ _thread = thread; ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/frame.hpp openjdk/hotspot/src/share/vm/runtime/frame.hpp ++index c55380e..c13caae 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/frame.hpp +++++ openjdk/hotspot/src/share/vm/runtime/frame.hpp ++@@ -50,6 +50,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/adGlobals_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/adGlobals_aarch64.hpp" +++#endif ++ #endif ++ #ifdef ZERO ++ #ifdef TARGET_ARCH_zero ++@@ -491,6 +494,9 @@ class frame VALUE_OBJ_CLASS_SPEC { ++ #ifdef TARGET_ARCH_ppc ++ # include "frame_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "frame_aarch64.hpp" +++#endif ++ ++ }; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/frame.inline.hpp openjdk/hotspot/src/share/vm/runtime/frame.inline.hpp ++index b80b042..f6e1b0e 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/frame.inline.hpp +++++ openjdk/hotspot/src/share/vm/runtime/frame.inline.hpp ++@@ -46,6 +46,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "jniTypes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "jniTypes_aarch64.hpp" +++#endif ++ #ifdef ZERO ++ #ifdef TARGET_ARCH_zero ++ # include "entryFrame_zero.hpp" ++@@ -100,6 +103,9 @@ inline bool frame::is_first_frame() const { ++ #ifdef TARGET_ARCH_ppc ++ # include "frame_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "frame_aarch64.inline.hpp" +++#endif ++ ++ ++ #endif // SHARE_VM_RUNTIME_FRAME_INLINE_HPP ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp openjdk/hotspot/src/share/vm/runtime/globals.hpp ++index 10d74cd..4cc5dfb 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp +++++ openjdk/hotspot/src/share/vm/runtime/globals.hpp ++@@ -52,6 +52,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "globals_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "globals_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "globals_linux.hpp" ++ #endif ++@@ -88,6 +91,9 @@ ++ #ifdef TARGET_OS_ARCH_linux_ppc ++ # include "globals_linux_ppc.hpp" ++ #endif +++#ifdef TARGET_OS_ARCH_linux_aarch64 +++# include "globals_linux_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_ARCH_bsd_x86 ++ # include "globals_bsd_x86.hpp" ++ #endif ++@@ -107,6 +113,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "c1_globals_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c1_globals_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "c1_globals_linux.hpp" ++ #endif ++@@ -130,6 +139,9 @@ ++ #ifdef TARGET_ARCH_arm ++ # include "c2_globals_arm.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c2_globals_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "c2_globals_linux.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/icache.hpp openjdk/hotspot/src/share/vm/runtime/icache.hpp ++index d460a0f..9a3b9c8 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/icache.hpp +++++ openjdk/hotspot/src/share/vm/runtime/icache.hpp ++@@ -83,6 +83,9 @@ class AbstractICache : AllStatic { ++ #ifdef TARGET_ARCH_ppc ++ # include "icache_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "icache_aarch64.hpp" +++#endif ++ ++ ++ ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/java.cpp openjdk/hotspot/src/share/vm/runtime/java.cpp ++index fc3b67a..46794b0 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/java.cpp +++++ openjdk/hotspot/src/share/vm/runtime/java.cpp ++@@ -78,6 +78,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "vm_version_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vm_version_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "thread_linux.inline.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/javaCalls.hpp openjdk/hotspot/src/share/vm/runtime/javaCalls.hpp ++index d4f8595..bc2ca9b 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/javaCalls.hpp +++++ openjdk/hotspot/src/share/vm/runtime/javaCalls.hpp ++@@ -45,6 +45,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "jniTypes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "jniTypes_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "thread_linux.inline.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp openjdk/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp ++index 8374aa2..6be5f79 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp +++++ openjdk/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp ++@@ -47,6 +47,9 @@ ++ #ifdef TARGET_OS_ARCH_linux_arm ++ # include "orderAccess_linux_arm.inline.hpp" ++ #endif +++#ifdef TARGET_OS_ARCH_linux_aarch64 +++# include "orderAccess_linux_aarch64.inline.hpp" +++#endif ++ #ifdef TARGET_OS_ARCH_linux_ppc ++ # include "orderAccess_linux_ppc.inline.hpp" ++ #endif ++@@ -121,6 +124,9 @@ friend class JavaCallWrapper; ++ #ifdef TARGET_ARCH_ppc ++ # include "javaFrameAnchor_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "javaFrameAnchor_aarch64.hpp" +++#endif ++ ++ ++ public: ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/os.hpp openjdk/hotspot/src/share/vm/runtime/os.hpp ++index 5867deb..0f1fbb4 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/os.hpp +++++ openjdk/hotspot/src/share/vm/runtime/os.hpp ++@@ -719,6 +719,9 @@ class os: AllStatic { ++ #ifdef TARGET_OS_ARCH_linux_ppc ++ # include "os_linux_ppc.hpp" ++ #endif +++#ifdef TARGET_OS_ARCH_linux_aarch64 +++# include "os_linux_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_ARCH_bsd_x86 ++ # include "os_bsd_x86.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/registerMap.hpp openjdk/hotspot/src/share/vm/runtime/registerMap.hpp ++index 5dd677a..7bd425f 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/registerMap.hpp +++++ openjdk/hotspot/src/share/vm/runtime/registerMap.hpp ++@@ -42,6 +42,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "register_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "register_aarch64.hpp" +++#endif ++ ++ class JavaThread; ++ ++@@ -150,6 +153,9 @@ class RegisterMap : public StackObj { ++ #ifdef TARGET_ARCH_ppc ++ # include "registerMap_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "registerMap_aarch64.hpp" +++#endif ++ ++ }; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/relocator.hpp openjdk/hotspot/src/share/vm/runtime/relocator.hpp ++index c34866f..790bd80 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/relocator.hpp +++++ openjdk/hotspot/src/share/vm/runtime/relocator.hpp ++@@ -42,6 +42,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ // This code has been converted from the 1.1E java virtual machine ++ // Thanks to the JavaTopics group for using the code ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/safepoint.cpp openjdk/hotspot/src/share/vm/runtime/safepoint.cpp ++index c29d257..a842bb3 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/safepoint.cpp +++++ openjdk/hotspot/src/share/vm/runtime/safepoint.cpp ++@@ -70,6 +70,10 @@ ++ # include "nativeInst_ppc.hpp" ++ # include "vmreg_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "nativeInst_aarch64.hpp" +++# include "vmreg_aarch64.inline.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "thread_linux.inline.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/sharedRuntime.cpp openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp ++index c25dcfe..aa7caff 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/sharedRuntime.cpp +++++ openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp ++@@ -76,6 +76,10 @@ ++ # include "nativeInst_ppc.hpp" ++ # include "vmreg_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "nativeInst_aarch64.hpp" +++# include "vmreg_aarch64.inline.hpp" +++#endif ++ #ifdef COMPILER1 ++ #include "c1/c1_Runtime1.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/stackValueCollection.cpp openjdk/hotspot/src/share/vm/runtime/stackValueCollection.cpp ++index 110f712..779f994 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/stackValueCollection.cpp +++++ openjdk/hotspot/src/share/vm/runtime/stackValueCollection.cpp ++@@ -39,6 +39,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "jniTypes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "jniTypes_aarch64.hpp" +++#endif ++ ++ jint StackValueCollection::int_at(int slot) const { ++ intptr_t val = at(slot)->get_int(); ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/statSampler.cpp openjdk/hotspot/src/share/vm/runtime/statSampler.cpp ++index 0b24def..c82a214 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/statSampler.cpp +++++ openjdk/hotspot/src/share/vm/runtime/statSampler.cpp ++@@ -48,6 +48,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "vm_version_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vm_version_aarch64.hpp" +++#endif ++ ++ // -------------------------------------------------------- ++ // StatSamplerTask ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp ++index b6068a5..4ef7e38 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp +++++ openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp ++@@ -42,6 +42,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "assembler_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "assembler_aarch64.inline.hpp" +++#endif ++ ++ ++ // Implementation of StubCodeDesc ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/stubRoutines.hpp openjdk/hotspot/src/share/vm/runtime/stubRoutines.hpp ++index 8481dce..f233b56 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/stubRoutines.hpp +++++ openjdk/hotspot/src/share/vm/runtime/stubRoutines.hpp ++@@ -46,6 +46,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "nativeInst_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "nativeInst_aarch64.hpp" +++#endif ++ ++ // StubRoutines provides entry points to assembly routines used by ++ // compiled code and the run-time system. Platform-specific entry ++@@ -116,6 +119,9 @@ class StubRoutines: AllStatic { ++ #endif ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "stubRoutines_ppc.hpp" +++#endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "stubRoutines_aarch64.hpp" ++ #endif ++ ++ ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/thread.hpp openjdk/hotspot/src/share/vm/runtime/thread.hpp ++index 7846cc0..6964c22 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/thread.hpp +++++ openjdk/hotspot/src/share/vm/runtime/thread.hpp ++@@ -1651,6 +1651,9 @@ public: ++ #ifdef TARGET_OS_ARCH_linux_ppc ++ # include "thread_linux_ppc.hpp" ++ #endif +++#ifdef TARGET_OS_ARCH_linux_aarch64 +++# include "thread_linux_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_ARCH_bsd_x86 ++ # include "thread_bsd_x86.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/threadLocalStorage.hpp openjdk/hotspot/src/share/vm/runtime/threadLocalStorage.hpp ++index c2f7a9e..26ef559 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/threadLocalStorage.hpp +++++ openjdk/hotspot/src/share/vm/runtime/threadLocalStorage.hpp ++@@ -68,6 +68,9 @@ class ThreadLocalStorage : AllStatic { ++ #ifdef TARGET_OS_ARCH_linux_ppc ++ # include "threadLS_linux_ppc.hpp" ++ #endif +++#ifdef TARGET_OS_ARCH_linux_aarch64 +++# include "threadLS_linux_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_ARCH_bsd_x86 ++ # include "threadLS_bsd_x86.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/vmStructs.cpp openjdk/hotspot/src/share/vm/runtime/vmStructs.cpp ++index 8afd933..359f9fc 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/vmStructs.cpp +++++ openjdk/hotspot/src/share/vm/runtime/vmStructs.cpp ++@@ -125,6 +125,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "vmStructs_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vmStructs_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "thread_linux.inline.hpp" ++ #endif ++@@ -161,6 +164,9 @@ ++ #ifdef TARGET_OS_ARCH_linux_ppc ++ # include "vmStructs_linux_ppc.hpp" ++ #endif +++#ifdef TARGET_OS_ARCH_linux_aarch64 +++# include "vmStructs_linux_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_ARCH_bsd_x86 ++ # include "vmStructs_bsd_x86.hpp" ++ #endif ++@@ -221,6 +227,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/adGlobals_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/adGlobals_aarch64.hpp" +++#endif ++ #endif ++ ++ // Note: the cross-product of (c1, c2, product, nonproduct, ...), ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp openjdk/hotspot/src/share/vm/runtime/vm_version.cpp ++index 2d51b67..bba9b01 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp +++++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp ++@@ -41,6 +41,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "vm_version_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vm_version_aarch64.hpp" +++#endif ++ ++ const char* Abstract_VM_Version::_s_vm_release = Abstract_VM_Version::vm_release(); ++ const char* Abstract_VM_Version::_s_internal_vm_info_string = Abstract_VM_Version::internal_vm_info_string(); ++@@ -185,6 +188,7 @@ const char* Abstract_VM_Version::jre_release_version() { ++ AMD64_ONLY("amd64") \ ++ ARM_ONLY("arm") \ ++ PPC_ONLY("ppc") \ +++ AARCH64_ONLY("aarch64") \ ++ SPARC_ONLY("sparc") ++ #endif // ZERO ++ ++diff --git openjdk.orig/hotspot/src/share/vm/utilities/copy.hpp openjdk/hotspot/src/share/vm/utilities/copy.hpp ++index 3dcbfee..198590f 100644 ++--- openjdk.orig/hotspot/src/share/vm/utilities/copy.hpp +++++ openjdk/hotspot/src/share/vm/utilities/copy.hpp ++@@ -337,6 +337,9 @@ class Copy : AllStatic { ++ #ifdef TARGET_ARCH_ppc ++ # include "copy_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "copy_aarch64.hpp" +++#endif ++ ++ }; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions.hpp openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp ++index b55b0ac..5d11e26 100644 ++--- openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions.hpp +++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp ++@@ -346,6 +346,9 @@ extern int LogMinObjAlignmentInBytes; ++ #ifdef TARGET_ARCH_ppc ++ # include "globalDefinitions_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "globalDefinitions_aarch64.hpp" +++#endif ++ ++ ++ // The byte alignment to be used by Arena::Amalloc. See bugid 4169348. ++diff --git openjdk.orig/hotspot/src/share/vm/utilities/macros.hpp openjdk/hotspot/src/share/vm/utilities/macros.hpp ++index 003f2af..2aa7f87 100644 ++--- openjdk.orig/hotspot/src/share/vm/utilities/macros.hpp +++++ openjdk/hotspot/src/share/vm/utilities/macros.hpp ++@@ -261,6 +261,14 @@ ++ #define NOT_ARM(code) code ++ #endif ++ +++#ifdef AARCH64 +++#define AARCH64_ONLY(code) code +++#define NOT_AARCH64(code) +++#else +++#define AARCH64_ONLY(code) +++#define NOT_AARCH64(code) code +++#endif +++ ++ #ifdef JAVASE_EMBEDDED ++ #define EMBEDDED_ONLY(code) code ++ #define NOT_EMBEDDED(code) +-- +2.26.2 + -- cgit v1.2.3 From 672ac09586e4bbeae962b115a739a231d715d797 Mon Sep 17 00:00:00 2001 From: Simon South Date: Mon, 15 Jun 2020 11:22:55 -0400 Subject: gnu: icedtea-7: Fix build on aarch64-linux. * gnu/packages/java.scm (icedtea-7)[native-inputs]: Remove obsolete, architecture-dependent patch to "hotspot-drop"; replace with patch to fix build on aarch64-linux. * gnu/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Efraim Flashner --- gnu/local.mk | 1 + gnu/packages/java.scm | 2 +- .../icedtea-7-hotspot-aarch64-use-c++98.patch | 33 ++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index ff6d64bd66..85de4e4995 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1146,6 +1146,7 @@ dist_patch_DATA = \ %D%/packages/patches/icecat-use-system-graphite2+harfbuzz.patch \ %D%/packages/patches/icecat-use-system-media-libs.patch \ %D%/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch \ + %D%/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch \ %D%/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch \ %D%/packages/patches/icu4c-CVE-2020-10531.patch \ %D%/packages/patches/id3lib-CVE-2007-4460.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 9e4e3586bf..38cc43d507 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1659,7 +1659,7 @@ bootstrapping purposes.") (base32 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws")) (patches (search-patches - "icedtea-7-hotspot-gcc-segfault-workaround.patch")))) + "icedtea-7-hotspot-aarch64-use-c++98.patch")))) ("ant" ,ant-bootstrap) ("attr" ,attr) ("coreutils" ,coreutils) diff --git a/gnu/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch b/gnu/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch new file mode 100644 index 0000000000..7ad215f975 --- /dev/null +++ b/gnu/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch @@ -0,0 +1,33 @@ +From 919dd016be1abd213b3a7d0e9a3b79e3286ef6ad Mon Sep 17 00:00:00 2001 +From: Simon South +Date: Wed, 10 Jun 2020 13:02:09 -0400 +Subject: [PATCH] aarch64: Use only C++98 + +This patch removes an unneeded C++ template that causes the build to +fail for aarch64 using gcc 7.5.0 and its default support for only the +C++98 standard. + +It is based on original work by Severin Gehwolf . +See: https://bugzilla.redhat.com/show_bug.cgi?id=1307224 +--- + src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp b/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp +index 0bc0a2b..6f73ca0 100644 +--- a/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp ++++ b/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp +@@ -194,10 +194,6 @@ static int reg2offset_out(VMReg r) { + return (r->reg2stack() + SharedRuntime::out_preserve_stack_slots()) * VMRegImpl::stack_slot_size; + } + +-template static const T& min (const T& a, const T& b) { +- return (a > b) ? b : a; +-} +- + // --------------------------------------------------------------------------- + // Read the array of BasicTypes from a signature, and compute where the + // arguments should go. Values in the VMRegPair regs array refer to 4-byte +-- +2.26.2 + -- cgit v1.2.3 From 0569a832683e686b1ec949bcc3e3e4069929cb95 Mon Sep 17 00:00:00 2001 From: Simon South Date: Mon, 15 Jun 2020 11:22:57 -0400 Subject: gnu: icedtea-8: Fix build on aarch64-linux. * gnu/packages/java.scm (icedtea-8)[native-inputs]: Remove obsolete, architecture-dependent patch to "hotspot-drop". * gnu/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. Signed-off-by: Efraim Flashner --- gnu/local.mk | 1 - gnu/packages/java.scm | 12 +----- ...icedtea-7-hotspot-gcc-segfault-workaround.patch | 45 ---------------------- 3 files changed, 2 insertions(+), 56 deletions(-) delete mode 100644 gnu/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 85de4e4995..04f577399f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1147,7 +1147,6 @@ dist_patch_DATA = \ %D%/packages/patches/icecat-use-system-media-libs.patch \ %D%/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch \ %D%/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch \ - %D%/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch \ %D%/packages/patches/icu4c-CVE-2020-10531.patch \ %D%/packages/patches/id3lib-CVE-2007-4460.patch \ %D%/packages/patches/id3lib-UTF16-writing-bug.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 921526eb02..9ced80cecf 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1855,16 +1855,8 @@ new Date();")) ,(drop "langtools" "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw")) ("hotspot-drop" - ,(origin - (method url-fetch) - (uri (string-append - "http://icedtea.classpath.org/download/drops" - "/icedtea8/" version "/hotspot.tar.xz")) - (sha256 - (base32 - "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm")) - (patches (search-patches - "icedtea-7-hotspot-gcc-segfault-workaround.patch")))) + ,(drop "hotspot" + "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm")) ("nashorn-drop" ,(drop "nashorn" "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa")) diff --git a/gnu/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch b/gnu/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch deleted file mode 100644 index 35cfe38152..0000000000 --- a/gnu/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 2f0ef2c69e99e1096a2a72c7a29025a736b044b4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= -Date: Mon, 2 Jul 2018 23:37:25 +0200 -Subject: [PATCH] Fix gcc segfault. - ---- - src/share/vm/opto/output.cpp | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/src/share/vm/opto/output.cpp b/src/share/vm/opto/output.cpp -index d46cb87..0eb9eda 100644 ---- a/src/share/vm/opto/output.cpp -+++ b/src/share/vm/opto/output.cpp -@@ -1787,6 +1787,8 @@ uint Scheduling::_total_instructions_per_bundle[Pipeline::_max_instrs_per_cycle+ - - // Initializer for class Scheduling - -+volatile const void *eePointer = Pipeline_Use::elaborated_elements; -+ - Scheduling::Scheduling(Arena *arena, Compile &compile) - : _arena(arena), - _cfg(compile.cfg()), -@@ -1829,7 +1831,7 @@ Scheduling::Scheduling(Arena *arena, Compile &compile) - memset(_current_latency, 0, node_max * sizeof(unsigned short)); - - // Clear the bundling information -- memcpy(_bundle_use_elements, Pipeline_Use::elaborated_elements, sizeof(Pipeline_Use::elaborated_elements)); -+ memcpy(_bundle_use_elements, (void *)eePointer, 11*sizeof(Pipeline_Use_Element)); - - // Get the last node - Block* block = _cfg->get_block(_cfg->number_of_blocks() - 1); -@@ -1880,8 +1882,8 @@ void Scheduling::step_and_clear() { - _bundle_use.reset(); - - memcpy(_bundle_use_elements, -- Pipeline_Use::elaborated_elements, -- sizeof(Pipeline_Use::elaborated_elements)); -+ (void *)eePointer, -+ 11*sizeof(Pipeline_Use_Element)); - } - - // Perform instruction scheduling and bundling over the sequence of --- -2.18.0 - -- cgit v1.2.3 From c94367eaaf1662eca13e0ffac5798318c3f8f3da Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Sat, 31 Oct 2020 17:52:04 +0100 Subject: gnu: sbcl-geco: Fix build. * gnu/packages/patches/sbcl-geco-fix-organism-class.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/lisp-xyz.scm (sbcl-geco)[source]: Use it. --- gnu/local.mk | 3 ++- gnu/packages/lisp-xyz.scm | 3 ++- gnu/packages/patches/sbcl-geco-fix-organism-class.patch | 13 +++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/sbcl-geco-fix-organism-class.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 3332f10df8..d4d04c01b8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -20,7 +20,7 @@ # Copyright © 2018, 2019, 2020 Oleg Pykhalov # Copyright © 2018 Stefan Stefanović # Copyright © 2018, 2020 Maxim Cournoyer -# Copyright © 2019 Guillaume Le Vaillant +# Copyright © 2019, 2020 Guillaume Le Vaillant # Copyright © 2019, 2020 John Soo # Copyright © 2019 Jonathan Brielmaier # Copyright © 2019 Evan Straw @@ -1572,6 +1572,7 @@ dist_patch_DATA = \ %D%/packages/patches/rust-reproducible-builds.patch \ %D%/packages/patches/rust-openssl-sys-no-vendor.patch \ %D%/packages/patches/rxvt-unicode-escape-sequences.patch \ + %D%/packages/patches/sbcl-geco-fix-organism-class.patch \ %D%/packages/patches/sbcl-graph-asdf-definitions.patch \ %D%/packages/patches/scalapack-blacs-mpi-deprecations.patch \ %D%/packages/patches/scheme48-tests.patch \ diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm index 260fecb12d..fb85416e38 100644 --- a/gnu/packages/lisp-xyz.scm +++ b/gnu/packages/lisp-xyz.scm @@ -14186,7 +14186,8 @@ XML to Lisp structures or s-expressions and back.") (uri (string-append "https://common-lisp.net/project/geco/download/" "geco-" version ".tar.gz")) (sha256 - (base32 "0kk0bzr1019cfmf2b1jl1rk9shv3gx5z1znifxllg9mb98yqsgw0")))) + (base32 "0kk0bzr1019cfmf2b1jl1rk9shv3gx5z1znifxllg9mb98yqsgw0")) + (patches (search-patches "sbcl-geco-fix-organism-class.patch")))) (build-system asdf-build-system/sbcl) (home-page "https://common-lisp.net/project/geco/") (synopsis "Genetic algorithm toolkit for Common Lisp") diff --git a/gnu/packages/patches/sbcl-geco-fix-organism-class.patch b/gnu/packages/patches/sbcl-geco-fix-organism-class.patch new file mode 100644 index 0000000000..817596241e --- /dev/null +++ b/gnu/packages/patches/sbcl-geco-fix-organism-class.patch @@ -0,0 +1,13 @@ +Fix the ORGANISM class so that SBCL >= 2.0.9 can compile it without error. + +--- a/classes.lisp 2020-10-28 12:11:10.725659464 +0100 ++++ b/classes.lisp 2020-10-31 17:34:36.822752447 +0100 +@@ -148,7 +148,7 @@ + :accessor score + :initarg :score + :initform 'nil +- :type number) ++ :type (or number null)) + (NORMALIZED-SCORE + :accessor normalized-score + :initarg :normalized-score -- cgit v1.2.3 From 95024494f31c3176bcd2238662e7b7868acc2882 Mon Sep 17 00:00:00 2001 From: Vitaliy Shatrov Date: Tue, 25 Aug 2020 18:26:38 +0700 Subject: gnu: Add bsd-games. * gnu/packages/games.scm (bsd-games): New variable. New patches, taken from Arch and Debian: * gnu/packages/patches/bsd-games-2.17-64bit.patch * gnu/packages/patches/bsd-games-bad-ntohl-cast.patch * gnu/packages/patches/bsd-games-gamescreen.h.patch * gnu/packages/patches/bsd-games-getline.patch * gnu/packages/patches/bsd-games-null-check.patch * gnu/packages/patches/bsd-games-number.c-and-test.patch * gnu/packages/patches/bsd-games-prevent-name-collisions.patch * gnu/packages/patches/bsd-games-stdio.h.patch New patches with our customizations (configure-config built after Arch's): * gnu/packages/patches/bsd-games-add-configure-config.patch * gnu/packages/patches/bsd-games-add-wrapper.patch * gnu/packages/patches/bsd-games-dont-install-empty-files.patch Signed-off-by: Nicolas Goaziou --- gnu/local.mk | 11 + gnu/packages/games.scm | 134 +++++++++++ gnu/packages/patches/bsd-games-2.17-64bit.patch | 43 ++++ .../patches/bsd-games-add-configure-config.patch | 22 ++ gnu/packages/patches/bsd-games-add-wrapper.patch | 251 +++++++++++++++++++++ .../patches/bsd-games-bad-ntohl-cast.patch | 22 ++ .../bsd-games-dont-install-empty-files.patch | 87 +++++++ gnu/packages/patches/bsd-games-gamescreen.h.patch | 14 ++ gnu/packages/patches/bsd-games-getline.patch | 194 ++++++++++++++++ gnu/packages/patches/bsd-games-null-check.patch | 24 ++ .../patches/bsd-games-number.c-and-test.patch | 183 +++++++++++++++ .../bsd-games-prevent-name-collisions.patch | 13 ++ gnu/packages/patches/bsd-games-stdio.h.patch | 14 ++ 13 files changed, 1012 insertions(+) create mode 100644 gnu/packages/patches/bsd-games-2.17-64bit.patch create mode 100644 gnu/packages/patches/bsd-games-add-configure-config.patch create mode 100644 gnu/packages/patches/bsd-games-add-wrapper.patch create mode 100644 gnu/packages/patches/bsd-games-bad-ntohl-cast.patch create mode 100644 gnu/packages/patches/bsd-games-dont-install-empty-files.patch create mode 100644 gnu/packages/patches/bsd-games-gamescreen.h.patch create mode 100644 gnu/packages/patches/bsd-games-getline.patch create mode 100644 gnu/packages/patches/bsd-games-null-check.patch create mode 100644 gnu/packages/patches/bsd-games-number.c-and-test.patch create mode 100644 gnu/packages/patches/bsd-games-prevent-name-collisions.patch create mode 100644 gnu/packages/patches/bsd-games-stdio.h.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index d4d04c01b8..2a994bd3b9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -822,6 +822,17 @@ dist_patch_DATA = \ %D%/packages/patches/bastet-change-source-of-unordered_set.patch \ %D%/packages/patches/bazaar-CVE-2017-14176.patch \ %D%/packages/patches/bc-fix-cross-compilation.patch \ + %D%/packages/patches/bsd-games-2.17-64bit.patch \ + %D%/packages/patches/bsd-games-add-configure-config.patch \ + %D%/packages/patches/bsd-games-add-wrapper.patch \ + %D%/packages/patches/bsd-games-bad-ntohl-cast.patch \ + %D%/packages/patches/bsd-games-dont-install-empty-files.patch \ + %D%/packages/patches/bsd-games-gamescreen.h.patch \ + %D%/packages/patches/bsd-games-getline.patch \ + %D%/packages/patches/bsd-games-null-check.patch \ + %D%/packages/patches/bsd-games-number.c-and-test.patch \ + %D%/packages/patches/bsd-games-prevent-name-collisions.patch \ + %D%/packages/patches/bsd-games-stdio.h.patch \ %D%/packages/patches/beancount-disable-googleapis-fonts.patch \ %D%/packages/patches/beets-werkzeug-compat.patch \ %D%/packages/patches/behave-skip-a-couple-of-tests.patch \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 5f906d0a4e..eb29f2a8e5 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -116,6 +116,7 @@ #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) + #:use-module (gnu packages gnu-doc) #:use-module (gnu packages gnupg) #:use-module (gnu packages gnuzilla) #:use-module (gnu packages gperf) @@ -589,6 +590,139 @@ possible, while battling many vicious aliens.") license:lgpl2.1+ license:bsd-2)))) +(define-public bsd-games + (package + (name "bsd-games") + (version "2.17.0") + (source + (origin + (method url-fetch) + (uri "https://ibiblio.org/pub/linux/games/bsd-games-2.17.tar.gz") + (sha256 + (base32 "0q7zdyyfvn15y0w4g54kq3gza89h61py727m8slmw73cxx594vq6")) + (patches + (search-patches + ;; thanks Arch, and Debian + "bsd-games-2.17-64bit.patch" + "bsd-games-bad-ntohl-cast.patch" + "bsd-games-gamescreen.h.patch" + "bsd-games-getline.patch" + "bsd-games-null-check.patch" + "bsd-games-number.c-and-test.patch" + "bsd-games-stdio.h.patch" + "bsd-games-prevent-name-collisions.patch" + ;; Guix customizations + "bsd-games-add-configure-config.patch" + "bsd-games-dont-install-empty-files.patch" + "bsd-games-add-wrapper.patch")))) + (build-system gnu-build-system) + (native-inputs + `(("flex" ,flex) + ("bison" ,bison))) + (inputs + `(("curses" ,ncurses) + ("pager" ,less) + ("miscfiles" ,miscfiles) + ("openssl" ,openssl))) ;used only by 'factor' + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs inputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (doc (string-append out "/share/doc/bsd-games-" ,version)) + (man (string-append out "/share/man")) + (word-list (string-append (assoc-ref inputs "miscfiles") + "/share/web2")) + (static-data (string-append out "/share/games/bsd-games")) + ;; Not a "./" because of substitute* in 'patch-install + ;; below. The .// allow us not to mess with the games' + ;; code any further: we just use a wrapper script that + ;; cd's to a BSD_GAMES_DIR. :] + (save-files ".//")) + (substitute* "configure" + (("/usr/share/man") man) + (("/usr/share/doc/bsd-games") doc) + (("/usr/share/[^\n/]*") static-data) + (("/var/games") save-files) + (("/usr/bin/less") (which "less")) + (("(/usr/bin|/usr/games)") bin)) + (substitute* "config.params" (("WORD_LIST") word-list)) + (substitute* "wrapper" (("STATIC_DATA") static-data)) + (invoke "./configure")) + #t)) + (add-before 'install 'patch-install + ;; Some games need a writable directory containing pre-maded files. + ;; The files get installed to the Store. Then the wrapper kicks in. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (static-data (string-append out "/share/games/bsd-games")) + (save-files ".//")) + (substitute* "Makeconfig" ((save-files) static-data))) + #t)) + (add-after 'install 'install-documents + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (doc (string-append out "/share/doc/bsd-games-" ,version))) + (rename-file "phantasia/COPYRIGHT" "phantasia-COPYRIGHT") + (for-each + (lambda(file) (install-file file doc)) + '("AUTHORS" "BUGS" "README" "SECURITY" "THANKS" + "phantasia-COPYRIGHT"))) + #t))))) + (home-page "https://github.com/vattam/BSDGames") + (synopsis "Collection of the old text-based games and amusements") + (description + "These are the BSD games. See the fortune-mod package for fortunes. + +Action: atc (keep the airplanes safe), hack (explore the dangerous Dungeon), +hunt (kill the others for the Pair of Boots, multi-player only), robots (avoid +the evil robots), sail (game of naval warfare with wooden ships), snake (steal +the $$ from the cave, anger the snake, and get out alive), tetris (game of +lining up the falling bricks of different shapes), and worm (eat, grow big, +and neither bite your tail, nor ram the wall). + +Amusements: banner (prints a large banner), bcd & morse & ppt (print a punch +card, or paper tape, or Morse codes), caesar & rot13 (ciphers and deciphers +the input), factor (factorizes a number), number (translates numbers into +text), pig (translates from English to Pig Latin), pom (should print the +Moon's phase), primes (generates primes), rain & worms (plays an screen-saver +in terminal), random (prints randomly choosen lines from files, or returns a +random exit-code), and wtf (explains what do some acronyms mean). + +Board: backgammon (lead the men out of board faster than the friend do), +boggle (find the words in the square of letters), dab (game of dots and +boxes), gomoku (game of five in a row), hangman (guess a word before man is +hanged), and monop (game of monopoly, hot-seat only). Also the card-games: +canfield, cribbage, fish (juniors game), and mille. + +Quests: adventure (search for treasures with the help of wizard), +battlestar (explore the world around, starting from dying spaceship), +phantasia (role-play as an rogue), trek (hunt the Klingons, and save the +Federation), and wump (hunt the big smelly Wumpus in a dark cave). + +Quizes: arithmetic, and quiz.") + ;; "Auxiliary and data files, distributed with the games in NetBSD, but + ;; not bearing copyright notices, probably fall under the terms of the UCB + ;; or NetBSD copyrights and licences. The file "fortune/Notes" contains a + ;; warning in regard to the fortune databases." + (license (list + ;; Most games. Files: countmail/countmail.6, dab/dab.6, + ;; lib/strlcpy.c, wargames/wargames.6 + license:bsd-3 + ;; dab and hunt. Files: adventure/extern.h, + ;; backgammon/backgammon/backlocal.h, caesar/rot13.in, + ;; countmail/countmail, dm/utmpentry.c, dm/utmpentry.h, + ;; hack/extern.h, robots/auto.c, sail/display.h, + ;; sail/restart.h, wargames/wargames + license:bsd-4 + ;; wtf (the game) + license:public-domain + ;; phantasia (all but phantasia/pathnames.h.in, which is bsd-3) + (license:fsf-free "file:///phantasia/COPYRIGHT"))))) + + (define-public bzflag (package (name "bzflag") diff --git a/gnu/packages/patches/bsd-games-2.17-64bit.patch b/gnu/packages/patches/bsd-games-2.17-64bit.patch new file mode 100644 index 0000000000..e286c1c531 --- /dev/null +++ b/gnu/packages/patches/bsd-games-2.17-64bit.patch @@ -0,0 +1,43 @@ +David Leverton writes about adventure/crc.c: + +The 'adventure' game from the games-misc/bsd-games-2.13 package crashes +when saving the game on AMD64 (and probably other 64-bit systems, but I +haven't checked). Find attached to fix this. + +http://bugs.gentoo.org/show_bug.cgi?id=77032 + + +About utmpentry.c: + +the utmpx structure defines the ut_tv member a little differently on +64bit hosts so that a 32bit and 64bit structure can be shared. So the +ut_tv is a custom 32bit structure rather than the native 64bit timeval +structure. Work around is to assign the submembers instead. + +http://bugs.gentoo.org/show_bug.cgi?id=102667 + +--- bsd-games/adventure/crc.c ++++ bsd-games/adventure/crc.c +@@ -134,7 +134,8 @@ + if (step >= sizeof(crctab) / sizeof(crctab[0])) + step = 0; + } +- crcval = (crcval << 8) ^ crctab[i]; ++ /* Mask to 32 bits. */ ++ crcval = ((crcval << 8) ^ crctab[i]) & 0xffffffff; + } +- return crcval & 0xffffffff; /* Mask to 32 bits. */ ++ return crcval; + } +--- bsd-games/dm/utmpentry.c ++++ bsd-games/dm/utmpentry.c +@@ -291,7 +291,8 @@ + e->line[sizeof(e->line) - 1] = '\0'; + (void)strncpy(e->host, up->ut_host, sizeof(up->ut_host)); + e->name[sizeof(e->host) - 1] = '\0'; +- e->tv = up->ut_tv; ++ e->tv.tv_sec = up->ut_tv.tv_sec; ++ e->tv.tv_usec = up->ut_tv.tv_usec; + adjust_size(e); + } + #endif diff --git a/gnu/packages/patches/bsd-games-add-configure-config.patch b/gnu/packages/patches/bsd-games-add-configure-config.patch new file mode 100644 index 0000000000..d8636addb6 --- /dev/null +++ b/gnu/packages/patches/bsd-games-add-configure-config.patch @@ -0,0 +1,22 @@ +Remove a few 'setenv's from the definition. + +diff -Naur bsd-games-2.17/config.params bsd-games-patch/config.params +--- bsd-games-2.17/config.params 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/config.params 2020-04-22 20:49:40.809695248 +0700 +@@ -0,0 +1,16 @@ ++bsd_games_cfg_do_chown=n ++bsd_games_cfg_non_interactive=y ++ ++# Fix some man-pages: cfscores, morse, ppt, rot13, snscore, teachgammon. ++bsd_games_cfg_use_dot_so=syml ++ ++# Don't build some games: ++# Countmail require some BSD-package called `from`. ++# DM is a toy to restrict access to bsd-games. ++# Fortune seems to be already packaged (fortune-mod). ++# Wargames isn't convenient as a game launcher. ++bsd_games_cfg_no_build_dirs="countmail dm fortune wargames" ++ ++# Those are substitute*'d with GNU miscfiles. ++bsd_games_cfg_hangman_wordsfile=WORD_LIST ++bsd_games_cfg_dictionary_src=WORD_LIST diff --git a/gnu/packages/patches/bsd-games-add-wrapper.patch b/gnu/packages/patches/bsd-games-add-wrapper.patch new file mode 100644 index 0000000000..ad3b1a9860 --- /dev/null +++ b/gnu/packages/patches/bsd-games-add-wrapper.patch @@ -0,0 +1,251 @@ +As we cannot install outside the Store, and those games do not create the +needed writable files on their own, we need a wrapper script. + +diff -Naur bsd-games-2.17/atc/Makefrag bsd-games-patch/atc/Makefrag +--- bsd-games-2.17/atc/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/atc/Makefrag 2020-04-23 20:24:04.446176222 +0700 +@@ -47,7 +47,8 @@ + mv atc/lex.yy.c $@ + + atc_install: atc_all +- $(INSTALL_SCORE_GAME) atc/atc $(INSTALL_PREFIX)$(GAMESDIR)/atc ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/atc ++ $(INSTALL_SCORE_GAME) atc/atc $(INSTALL_PREFIX)$(GAMESDIR)/.atc-real + $(HIDE_GAME) atc + $(INSTALL_SCORE_FILE) $(ATC_SCOREFILE) + $(INSTALL_MANUAL) atc/atc.6 +diff -Naur bsd-games-2.17/battlestar/Makefrag bsd-games-patch/battlestar/Makefrag +--- bsd-games-2.17/battlestar/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/battlestar/Makefrag 2020-04-23 20:24:04.482175771 +0700 +@@ -32,7 +32,8 @@ + battlestar_all: battlestar/battlestar battlestar/battlestar.6 + + battlestar_install: battlestar_all +- $(INSTALL_SCORE_GAME) battlestar/battlestar $(INSTALL_PREFIX)$(GAMESDIR)/battlestar ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/battlestar ++ $(INSTALL_SCORE_GAME) battlestar/battlestar $(INSTALL_PREFIX)$(GAMESDIR)/.battlestar-real + $(HIDE_GAME) battlestar + $(INSTALL_MANUAL) battlestar/battlestar.6 + $(INSTALL_SCORE_FILE) $(BATTLESTAR_SCOREFILE) +diff -Naur bsd-games-2.17/canfield/canfield/Makefrag bsd-games-patch/canfield/canfield/Makefrag +--- bsd-games-2.17/canfield/canfield/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/canfield/canfield/Makefrag 2020-04-23 20:24:04.522175270 +0700 +@@ -31,7 +31,8 @@ + canfield_canfield_all: canfield/canfield/canfield canfield/canfield/canfield.6 + + canfield_canfield_install: canfield_canfield_all +- $(INSTALL_SCORE_GAME) canfield/canfield/canfield $(INSTALL_PREFIX)$(GAMESDIR)/canfield ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/canfield ++ $(INSTALL_SCORE_GAME) canfield/canfield/canfield $(INSTALL_PREFIX)$(GAMESDIR)/.canfield-real + $(HIDE_GAME) canfield + $(INSTALL_MANUAL) canfield/canfield/canfield.6 + $(INSTALL_SCORE_FILE) $(CANFIELD_SCOREFILE) +diff -ur bsd-games-2.17.orig/canfield/cfscores/Makefrag bsd-games-2.17/canfield/cfscores/Makefrag +--- bsd-games-2.17.orig/canfield/cfscores/Makefrag 1970-01-01 07:00:01.000000000 +0700 ++++ bsd-games-2.17/canfield/cfscores/Makefrag 2020-08-06 12:20:10.592076477 +0700 +@@ -32,6 +32,7 @@ + canfield_cfscores_all: canfield/cfscores/cfscores + + canfield_cfscores_install: canfield_cfscores_all +- $(INSTALL_BINARY) canfield/cfscores/cfscores $(INSTALL_PREFIX)$(GAMESDIR)/cfscores ++ $(INSTALL_BINARY) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/cfscores ++ $(INSTALL_BINARY) canfield/cfscores/cfscores $(INSTALL_PREFIX)$(GAMESDIR)/.cfscores-real + $(HIDE_GAME) cfscores + $(INSTALL_MANUAL) canfield.6 cfscores.6 +diff -Naur bsd-games-2.17/cribbage/Makefrag bsd-games-patch/cribbage/Makefrag +--- bsd-games-2.17/cribbage/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/cribbage/Makefrag 2020-04-23 20:24:04.534175120 +0700 +@@ -31,7 +31,8 @@ + cribbage_all: cribbage/cribbage cribbage/cribbage.n cribbage/cribbage.6 + + cribbage_install: cribbage_all +- $(INSTALL_SCORE_GAME) cribbage/cribbage $(INSTALL_PREFIX)$(GAMESDIR)/cribbage ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/cribbage ++ $(INSTALL_SCORE_GAME) cribbage/cribbage $(INSTALL_PREFIX)$(GAMESDIR)/.cribbage-real + $(HIDE_GAME) cribbage + $(INSTALL_DATA) cribbage/cribbage.n $(INSTALL_PREFIX)$(CRIBBAGE_INSTRFILE) + $(INSTALL_SCORE_FILE) $(CRIBBAGE_SCOREFILE) +diff -Naur bsd-games-2.17/hack/Makefrag bsd-games-patch/hack/Makefrag +--- bsd-games-2.17/hack/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/hack/Makefrag 2020-04-23 20:24:04.590174419 +0700 +@@ -53,7 +53,8 @@ + hack/hack.zap.d hack/rnd.d: hack/hack.onames.h + + hack_install: hack_all +- $(INSTALL_SCORE_GAME) hack/hack $(INSTALL_PREFIX)$(GAMESDIR)/hack ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/hack ++ $(INSTALL_SCORE_GAME) hack/hack $(INSTALL_PREFIX)$(GAMESDIR)/.hack-real + $(HIDE_GAME) hack + $(INSTALL_HACK_DIR) $(INSTALL_PREFIX)$(HACK_DIR) + set -e; for f in data help hh rumors; do $(INSTALL_DATA) hack/$$f $(INSTALL_PREFIX)$(HACK_DIR)/$$f; done +diff -Naur bsd-games-2.17/phantasia/Makefrag bsd-games-patch/phantasia/Makefrag +--- bsd-games-2.17/phantasia/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/phantasia/Makefrag 2020-04-23 20:24:04.650173667 +0700 +@@ -38,7 +38,8 @@ + touch phantasia/scorefiles.stamp + + phantasia_install: phantasia_all +- $(INSTALL_SCORE_GAME) phantasia/phantasia $(INSTALL_PREFIX)$(GAMESDIR)/phantasia ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/phantasia ++ $(INSTALL_SCORE_GAME) phantasia/phantasia $(INSTALL_PREFIX)$(GAMESDIR)/.phantasia-real + $(HIDE_GAME) phantasia + (set -e; for f in $(phantasia_VFILES1); do \ + cp phantasia/$$f $(INSTALL_PREFIX)$(PHANTASIA_DIR)/$$f; \ +diff -Naur bsd-games-2.17/robots/Makefrag bsd-games-patch/robots/Makefrag +--- bsd-games-2.17/robots/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/robots/Makefrag 2020-04-23 20:24:04.702173016 +0700 +@@ -32,7 +32,8 @@ + robots_all: robots/robots robots/robots.6 + + robots_install: robots_all +- $(INSTALL_SCORE_GAME) robots/robots $(INSTALL_PREFIX)$(GAMESDIR)/robots ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/robots ++ $(INSTALL_SCORE_GAME) robots/robots $(INSTALL_PREFIX)$(GAMESDIR)/.robots-real + $(HIDE_GAME) robots + $(INSTALL_SCORE_FILE) $(ROBOTS_SCOREFILE) + $(INSTALL_MANUAL) robots/robots.6 +diff -Naur bsd-games-2.17/sail/Makefrag bsd-games-patch/sail/Makefrag +--- bsd-games-2.17/sail/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/sail/Makefrag 2020-04-23 20:24:04.710172917 +0700 +@@ -31,7 +31,8 @@ + sail_all: sail/sail sail/sail.6 + + sail_install: sail_all +- $(INSTALL_SCORE_GAME) sail/sail $(INSTALL_PREFIX)$(GAMESDIR)/sail ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/sail ++ $(INSTALL_SCORE_GAME) sail/sail $(INSTALL_PREFIX)$(GAMESDIR)/.sail-real + $(HIDE_GAME) sail + $(INSTALL_SCORE_FILE) $(SAIL_SCOREFILE) + $(INSTALL_SAIL_DIR) $(INSTALL_PREFIX)$(SAIL_DIR) +diff -Naur bsd-games-2.17/snake/snake/Makefrag bsd-games-patch/snake/snake/Makefrag +--- bsd-games-2.17/snake/snake/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/snake/snake/Makefrag 2020-04-23 20:24:04.722172766 +0700 +@@ -31,7 +31,8 @@ + snake_snake_all: snake/snake/snake snake/snake/snake.6 + + snake_snake_install: snake_snake_all +- $(INSTALL_SCORE_GAME) snake/snake/snake $(INSTALL_PREFIX)$(GAMESDIR)/snake ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/snake ++ $(INSTALL_SCORE_GAME) snake/snake/snake $(INSTALL_PREFIX)$(GAMESDIR)/.snake-real + $(HIDE_GAME) snake + $(INSTALL_SCORE_FILE) $(SNAKE_SCOREFILE) + $(INSTALL_SCORE_FILE) $(SNAKE_RAWSCOREFILE) +--- bsd-games-2.17.orig/snake/snscore/Makefrag 1970-01-01 07:00:01.000000000 +0700 ++++ bsd-games-2.17/snake/snscore/Makefrag 2020-08-06 12:33:09.636089394 +0700 +@@ -32,6 +32,7 @@ + snake_snscore_all: snake/snscore/snscore + + snake_snscore_install: snake_snscore_all +- $(INSTALL_BINARY) snake/snscore/snscore $(INSTALL_PREFIX)$(GAMESDIR)/snscore ++ $(INSTALL_BINARY) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/snscore ++ $(INSTALL_BINARY) snake/snscore/snscore $(INSTALL_PREFIX)$(GAMESDIR)/.snscore-real + $(HIDE_GAME) snscore + $(INSTALL_MANUAL) snake.6 snscore.6 +diff -Naur bsd-games-2.17/tetris/Makefrag bsd-games-patch/tetris/Makefrag +--- bsd-games-2.17/tetris/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/tetris/Makefrag 2020-04-23 20:24:04.734172616 +0700 +@@ -32,7 +32,8 @@ + tetris_all: tetris/tetris tetris/tetris.6 + + tetris_install: tetris_all +- $(INSTALL_SCORE_GAME) tetris/tetris $(INSTALL_PREFIX)$(GAMESDIR)/tetris-bsd ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/tetris-bsd ++ $(INSTALL_SCORE_GAME) tetris/tetris $(INSTALL_PREFIX)$(GAMESDIR)/.tetris-bsd-real + $(HIDE_GAME) tetris-bsd + $(INSTALL_SCORE_FILE) $(TETRIS_SCOREFILE) + ln -f tetris/tetris.6 tetris/tetris-bsd.6 +diff -Naur bsd-games-2.17/wrapper bsd-games-patch/wrapper +--- bsd-games-2.17/wrapper 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/wrapper 2020-04-23 20:24:37.153766719 +0700 +@@ -0,0 +1,91 @@ ++#!/bin/sh ++# This file works around limitations of our read-only Store. ++ ++set -e ++ ++check_empty_files () { ++ # those start empty ++ for f in ${@} ++ do ++ if [[ ! -f ${f} ]] ++ then ++ touch ${f} ++ echo "$(pwd)/${f} RESTORED" ++ fi ++ done ++} ++check_data_files () { ++ # those start with some initial data ++ for f in ${@} ++ do ++ if [[ ! -f ${f} ]] ++ then ++ cp STATIC_DATA/${game}/${f} ${f} ++ chmod u+w ${f} ++ echo "$(pwd)/${f} RESTORED" ++ fi ++ done ++} ++visit_dir () { ++ mkdir -p ${1} ++ cd ${1} ++} ++exit_with_variable_error () { ++ variables="${1}${2:+ or ${2}}" ++ echo "Guix: Please set up the ${variables} variable." ++ echo "Examples:" ++ echo " export ${1}=/var/multiplayer" ++ echo " export ${2:-${1}}=~/.local/share/bsd-games" ++ echo "You can place this in ~/.bashrc or a similar file for Your shell." ++ echo "For multiplayer this directory should be writable for all players." ++ exit 1 ++} ++ ++game=$(basename $0) ++if [[ ${game} == "hack" ]] ++then ++ if [[ -n ${HACKDIR} ]]; then visit_dir "${HACKDIR}" ++ elif [[ -n ${BSD_GAMES_DIR} ]]; then visit_dir "${BSD_GAMES_DIR}/hack" ++ else exit_with_variable_error "HACKDIR" "BSD_GAMES_DIR" ++ fi ++else ++ if [[ -n ${BSD_GAMES_DIR} ]]; then visit_dir "${BSD_GAMES_DIR}" ++ else exit_with_variable_error "BSD_GAMES_DIR" ++ fi ++fi ++ ++case ${game} in ++ ### Games with score-files ++ atc) ++ check_empty_files "atc_score";; ++ battlestar) ++ check_empty_files "battlestar.log";; ++ canfield) ++ check_empty_files "cfscores";; ++ cribbage) ++ check_empty_files "criblog";; ++ robots) ++ check_empty_files "robots_roll";; ++ snake) ++ check_empty_files "snakerawscores" "snake.log";; ++ tetris) ++ check_empty_files "tetris-bsd.scores";; ++ ### Games with saved state ++ hack) ++ check_empty_files "record" "perm" ++ check_data_files "data" "help" "hh" "rumors" ++ visit_dir "save" ++ cd ../../;; ++ phantasia) ++ visit_dir "phantasia" ++ check_empty_files "characs" "gold" "lastdead"\ ++ "mess" "motd" "scoreboard" "void" ++ check_data_files "monsters" ++ cd ../;; ++ sail) ++ visit_dir "sail" ++ check_empty_files "log" "syncfile" ++ cd ../;; ++esac ++ ++exec .${game}-real ${@} diff --git a/gnu/packages/patches/bsd-games-bad-ntohl-cast.patch b/gnu/packages/patches/bsd-games-bad-ntohl-cast.patch new file mode 100644 index 0000000000..caadfa5054 --- /dev/null +++ b/gnu/packages/patches/bsd-games-bad-ntohl-cast.patch @@ -0,0 +1,22 @@ +diff --git a/hunt/hunt/playit.c b/hunt/hunt/playit.c +index 9acf86e..881a4e7 100644 +--- a/hunt/hunt/playit.c ++++ b/hunt/hunt/playit.c +@@ -114,7 +114,7 @@ playit() + bad_con(); + /* NOTREACHED */ + } +- if (ntohl(version) != (unsigned long)HUNT_VERSION) { ++ if (ntohl(version) != (uint32_t)HUNT_VERSION) { + bad_ver(); + /* NOTREACHED */ + } +@@ -649,7 +649,7 @@ do_message() + bad_con(); + /* NOTREACHED */ + } +- if (ntohl(version) != (unsigned long)HUNT_VERSION) { ++ if (ntohl(version) != (uint32_t)HUNT_VERSION) { + bad_ver(); + /* NOTREACHED */ + } diff --git a/gnu/packages/patches/bsd-games-dont-install-empty-files.patch b/gnu/packages/patches/bsd-games-dont-install-empty-files.patch new file mode 100644 index 0000000000..4ee0578177 --- /dev/null +++ b/gnu/packages/patches/bsd-games-dont-install-empty-files.patch @@ -0,0 +1,87 @@ +Those games rely on user to provide the files to write scores in. +Those score-files are initially empty. Anyway, the Store is read-only. +So we do not install those empty files. + +diff -Naur bsd-games-2.17/install-score.in bsd-games-patch/install-score.in +--- bsd-games-2.17/install-score.in 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/install-score.in 2020-04-22 21:41:47.810544804 +0700 +@@ -1,45 +0,0 @@ +-# install-score.in - install a score file +-# +-# Copyright (c) 1997, 1998, 1999 Joseph Samuel Myers. +-# All rights reserved. +-# +-# Redistribution and use in source and binary forms, with or without +-# modification, are permitted provided that the following conditions +-# are met: +-# 1. Redistributions of source code must retain the above copyright +-# notice, this list of conditions and the following disclaimer. +-# 2. Redistributions in binary form must reproduce the above copyright +-# notice, this list of conditions and the following disclaimer in the +-# documentation and/or other materials provided with the distribution. +-# 3. The name of the author may not be used to endorse or promote products +-# derived from this software without specific prior written permission. +-# +-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +-# SUCH DAMAGE. +- +-set -e +- +-if [ "$1" = "-p" ]; then +- scorefile="@install_prefix@$2" +- perms=@vardata_perms_priv@ +-else +- scorefile="@install_prefix@$1" +- perms=@vardata_perms@ +-fi +- +-mkdir -p "$(dirname "$scorefile")" +- +-test -e "$scorefile" || touch "$scorefile" +-if [ @do_chown@ = y ]; then +- chown @vardata_owner@:@vardata_group@ "$scorefile" +-fi +-chmod "$perms" "$scorefile" +diff -Naur bsd-games-2.17/phantasia/Makefrag bsd-games-patch/phantasia/Makefrag +--- bsd-games-2.17/phantasia/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/phantasia/Makefrag 2020-04-22 21:26:00.162409464 +0700 +@@ -27,9 +27,8 @@ + # SUCH DAMAGE. + + phantasia_DIRS := $(GAMESDIR) $(MAN6DIR) $(PHANTASIA_DIR) +-phantasia_VFILES1 := gold lastdead mess monsters motd void +-phantasia_VFILES2 := scoreboard characs +-phantasia_CLEANFILES := $(phantasia_VFILES1) $(phantasia_VFILES2) scorefiles.stamp ++phantasia_VFILES1 := monsters ++phantasia_CLEANFILES := $(phantasia_VFILES1) scorefiles.stamp + + phantasia_all: phantasia/phantasia phantasia/phantasia.6 phantasia/scorefiles.stamp + +@@ -43,9 +42,4 @@ + (set -e; for f in $(phantasia_VFILES1); do \ + cp phantasia/$$f $(INSTALL_PREFIX)$(PHANTASIA_DIR)/$$f; \ + $(INSTALL_SCORE_FILE) $(PHANTASIA_DIR)/$$f; done) +- (set -e; for f in $(phantasia_VFILES2); do \ +- if [ ! -e $(PHANTASIA_DIR)/$$f ]; then \ +- cp phantasia/$$f $(INSTALL_PREFIX)$(PHANTASIA_DIR)/$$f; fi; done; \ +- $(INSTALL_SCORE_FILE) $(PHANTASIA_DIR)/scoreboard; \ +- $(INSTALL_SCORE_FILE) -p $(PHANTASIA_DIR)/characs) + $(INSTALL_MANUAL) phantasia/phantasia.6 +diff -Naur bsd-games-2.17/sail/Makefrag bsd-games-patch/sail/Makefrag +--- bsd-games-2.17/sail/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/sail/Makefrag 2020-04-22 21:26:48.701801676 +0700 +@@ -34,5 +34,4 @@ + $(INSTALL_SCORE_GAME) sail/sail $(INSTALL_PREFIX)$(GAMESDIR)/sail + $(HIDE_GAME) sail + $(INSTALL_SCORE_FILE) $(SAIL_SCOREFILE) +- $(INSTALL_SAIL_DIR) $(INSTALL_PREFIX)$(SAIL_DIR) + $(INSTALL_MANUAL) sail/sail.6 diff --git a/gnu/packages/patches/bsd-games-gamescreen.h.patch b/gnu/packages/patches/bsd-games-gamescreen.h.patch new file mode 100644 index 0000000000..d3c6b4ae50 --- /dev/null +++ b/gnu/packages/patches/bsd-games-gamescreen.h.patch @@ -0,0 +1,14 @@ +--- a/dab/gamescreen.h 2004-01-02 23:34:51.000000000 +0530 ++++ b/dab/gamescreen.h 2008-07-31 23:45:19.000000000 +0530 +@@ -70,9 +70,9 @@ + virtual void redraw(void) = 0; // Refresh + virtual int getinput(void) = 0; // Get user input + virtual void bell(void) = 0; // Beep +- virtual void score(size_t p, const PLAYER& p) = 0; // Post current score +- virtual void games(size_t p, const PLAYER& p) = 0; // Post games won +- virtual void total(size_t p, const PLAYER& p) = 0; // Post total score ++ virtual void score(size_t, const PLAYER&) = 0; // Post current score ++ virtual void games(size_t, const PLAYER&) = 0; // Post games won ++ virtual void total(size_t, const PLAYER&) = 0; // Post total score + virtual void ties(const PLAYER& p) = 0; // Post tie games + }; diff --git a/gnu/packages/patches/bsd-games-getline.patch b/gnu/packages/patches/bsd-games-getline.patch new file mode 100644 index 0000000000..d7c0b4034d --- /dev/null +++ b/gnu/packages/patches/bsd-games-getline.patch @@ -0,0 +1,194 @@ +diff -Naur bsd-games-2.17/boggle/boggle/bog.c bsd-games-2.17.1/boggle/boggle/bog.c +--- bsd-games-2.17/boggle/boggle/bog.c 2004-12-07 07:34:21.000000000 -0600 ++++ bsd-games-2.17.1/boggle/boggle/bog.c 2010-05-22 10:51:23.000000000 -0500 +@@ -336,7 +336,7 @@ + } + + while (1) { +- if (getline(buf) == NULL) { ++ if (boggle_getline(buf) == NULL) { + if (feof(stdin)) + clearerr(stdin); + break; +diff -Naur bsd-games-2.17/boggle/boggle/extern.h bsd-games-2.17.1/boggle/boggle/extern.h +--- bsd-games-2.17/boggle/boggle/extern.h 2004-01-27 14:52:07.000000000 -0600 ++++ bsd-games-2.17.1/boggle/boggle/extern.h 2010-05-22 10:51:23.000000000 -0500 +@@ -43,7 +43,7 @@ + long dictseek(FILE *, long, int); + void findword(void); + void flushin(FILE *); +-char *getline(char *); ++char *boggle_getline(char *); + void getword(char *); + int help(void); + int inputch(void); +diff -Naur bsd-games-2.17/boggle/boggle/mach.c bsd-games-2.17.1/boggle/boggle/mach.c +--- bsd-games-2.17/boggle/boggle/mach.c 2004-12-07 07:34:21.000000000 -0600 ++++ bsd-games-2.17.1/boggle/boggle/mach.c 2010-05-22 10:51:23.000000000 -0500 +@@ -168,7 +168,7 @@ + * - doesn't accept words longer than MAXWORDLEN or containing caps + */ + char * +-getline(q) ++boggle_getline(q) + char *q; + { + int ch, done; +diff -Naur bsd-games-2.17/cribbage/cribbage.h bsd-games-2.17.1/cribbage/cribbage.h +--- bsd-games-2.17/cribbage/cribbage.h 2004-02-08 16:29:14.000000000 -0600 ++++ bsd-games-2.17.1/cribbage/cribbage.h 2010-05-22 10:51:23.000000000 -0500 +@@ -77,7 +77,7 @@ + int fifteens(const CARD [], int); + void game(void); + void gamescore(void); +-char *getline(void); ++char *cribbage_getline(void); + int getuchar(void); + int incard(CARD *); + int infrom(const CARD [], int, const char *); +diff -Naur bsd-games-2.17/cribbage/crib.c bsd-games-2.17.1/cribbage/crib.c +--- bsd-games-2.17/cribbage/crib.c 2004-01-27 14:52:07.000000000 -0600 ++++ bsd-games-2.17.1/cribbage/crib.c 2010-05-22 10:51:23.000000000 -0500 +@@ -221,7 +221,7 @@ + if (!rflag) { /* player cuts deck */ + msg(quiet ? "Cut for crib? " : + "Cut to see whose crib it is -- low card wins? "); +- getline(); ++ cribbage_getline(); + } + i = (rand() >> 4) % CARDS; /* random cut */ + do { /* comp cuts deck */ +@@ -397,7 +397,7 @@ + if (!rflag) { /* random cut */ + msg(quiet ? "Cut the deck? " : + "How many cards down do you wish to cut the deck? "); +- getline(); ++ cribbage_getline(); + } + i = (rand() >> 4) % (CARDS - pos); + turnover = deck[i + pos]; +diff -Naur bsd-games-2.17/cribbage/io.c bsd-games-2.17.1/cribbage/io.c +--- bsd-games-2.17/cribbage/io.c 2004-12-07 07:34:21.000000000 -0600 ++++ bsd-games-2.17.1/cribbage/io.c 2010-05-22 10:51:23.000000000 -0500 +@@ -245,7 +245,7 @@ + + retval = FALSE; + rnk = sut = EMPTY; +- if (!(line = getline())) ++ if (!(line = cribbage_getline())) + goto gotit; + p = p1 = line; + while (*p1 != ' ' && *p1 != '\0') +@@ -346,7 +346,7 @@ + + for (sum = 0;;) { + msg(prompt); +- if (!(p = getline()) || *p == '\0') { ++ if (!(p = cribbage_getline()) || *p == '\0') { + msg(quiet ? "Not a number" : + "That doesn't look like a number"); + continue; +@@ -528,12 +528,12 @@ + } + + /* +- * getline: ++ * cribbage_getline: + * Reads the next line up to '\n' or EOF. Multiple spaces are + * compressed to one space; a space is inserted before a ',' + */ + char * +-getline() ++cribbage_getline() + { + char *sp; + int c, oy, ox; +diff -Naur bsd-games-2.17/gomoku/bdisp.c bsd-games-2.17.1/gomoku/bdisp.c +--- bsd-games-2.17/gomoku/bdisp.c 2003-12-16 20:47:37.000000000 -0600 ++++ bsd-games-2.17.1/gomoku/bdisp.c 2010-05-22 10:51:23.000000000 -0500 +@@ -241,7 +241,7 @@ + } + + int +-getline(buf, size) ++gomoku_getline(buf, size) + char *buf; + int size; + { +diff -Naur bsd-games-2.17/gomoku/gomoku.h bsd-games-2.17.1/gomoku/gomoku.h +--- bsd-games-2.17/gomoku/gomoku.h 2004-01-27 14:52:07.000000000 -0600 ++++ bsd-games-2.17.1/gomoku/gomoku.h 2010-05-22 10:51:23.000000000 -0500 +@@ -263,7 +263,7 @@ + + void bdinit(struct spotstr *); + void init_overlap(void); +-int getline(char *, int); ++int gomoku_getline(char *, int); + void ask(const char *); + void dislog(const char *); + void bdump(FILE *); +diff -Naur bsd-games-2.17/gomoku/main.c bsd-games-2.17.1/gomoku/main.c +--- bsd-games-2.17/gomoku/main.c 2004-01-27 14:52:07.000000000 -0600 ++++ bsd-games-2.17.1/gomoku/main.c 2010-05-22 10:51:23.000000000 -0500 +@@ -155,7 +155,7 @@ + if (inputfp == NULL && test == 0) { + for (;;) { + ask("black or white? "); +- getline(buf, sizeof(buf)); ++ gomoku_getline(buf, sizeof(buf)); + if (buf[0] == 'b' || buf[0] == 'B') { + color = BLACK; + break; +@@ -172,7 +172,7 @@ + } + } else { + setbuf(stdout, 0); +- getline(buf, sizeof(buf)); ++ gomoku_getline(buf, sizeof(buf)); + if (strcmp(buf, "black") == 0) + color = BLACK; + else if (strcmp(buf, "white") == 0) +@@ -244,7 +244,7 @@ + getinput: + if (interactive) + ask("move? "); +- if (!getline(buf, sizeof(buf))) { ++ if (!gomoku_getline(buf, sizeof(buf))) { + curmove = RESIGN; + break; + } +@@ -256,7 +256,7 @@ + FILE *fp; + + ask("save file name? "); +- (void)getline(buf, sizeof(buf)); ++ (void)gomoku_getline(buf, sizeof(buf)); + if ((fp = fopen(buf, "w")) == NULL) { + glog("cannot create save file"); + goto getinput; +@@ -309,14 +309,14 @@ + if (i != RESIGN) { + replay: + ask("replay? "); +- if (getline(buf, sizeof(buf)) && ++ if (gomoku_getline(buf, sizeof(buf)) && + (buf[0] == 'y' || buf[0] == 'Y')) + goto again; + if (strcmp(buf, "save") == 0) { + FILE *fp; + + ask("save file name? "); +- (void)getline(buf, sizeof(buf)); ++ (void)gomoku_getline(buf, sizeof(buf)); + if ((fp = fopen(buf, "w")) == NULL) { + glog("cannot create save file"); + goto replay; +@@ -367,7 +367,7 @@ + quit(); + top: + ask("cmd? "); +- if (!getline(fmtbuf, sizeof(fmtbuf))) ++ if (!gomoku_getline(fmtbuf, sizeof(fmtbuf))) + quit(); + switch (*fmtbuf) { + case '\0': diff --git a/gnu/packages/patches/bsd-games-null-check.patch b/gnu/packages/patches/bsd-games-null-check.patch new file mode 100644 index 0000000000..ba977c95bf --- /dev/null +++ b/gnu/packages/patches/bsd-games-null-check.patch @@ -0,0 +1,24 @@ +diff --git a/hunt/hunt/hunt.c b/hunt/hunt/hunt.c +index 11f4c44..28321bc 100644 +--- a/hunt/hunt/hunt.c ++++ b/hunt/hunt/hunt.c +@@ -394,7 +394,8 @@ broadcast_vec(s, vector) + + vec_cnt = 0; + for (ip = ifp; ip; ip = ip->ifa_next) +- if ((ip->ifa_addr->sa_family == AF_INET) && ++ if (ip->ifa_addr && ++ (ip->ifa_addr->sa_family == AF_INET) && + (ip->ifa_flags & IFF_BROADCAST)) + vec_cnt++; + +@@ -405,7 +406,8 @@ broadcast_vec(s, vector) + + vec_cnt = 0; + for (ip = ifp; ip; ip = ip->ifa_next) +- if ((ip->ifa_addr->sa_family == AF_INET) && ++ if (ip->ifa_addr && ++ (ip->ifa_addr->sa_family == AF_INET) && + (ip->ifa_flags & IFF_BROADCAST)) + memcpy(&(*vector)[vec_cnt++], ip->ifa_broadaddr, + sizeof(struct sockaddr_in)); diff --git a/gnu/packages/patches/bsd-games-number.c-and-test.patch b/gnu/packages/patches/bsd-games-number.c-and-test.patch new file mode 100644 index 0000000000..1cf5ba2822 --- /dev/null +++ b/gnu/packages/patches/bsd-games-number.c-and-test.patch @@ -0,0 +1,183 @@ +Arch's patch, and a fix for the "number" game's test. +--- bsdgames-2.17.orig/number/number.c ++++ bsdgames-2.17/number/number.c +@@ -78,9 +78,9 @@ + + void convert(char *); + int main(int, char *[]); +-int number(const char *, int); +-void pfract(int); +-int unit(int, const char *); ++int number(const char *, int, int *); ++void pfract(int, int); ++int unit(int, const char *, int *); + void usage(void) __attribute__((__noreturn__)); + + int lflag; +@@ -131,7 +131,7 @@ + convert(line) + char *line; + { +- int flen, len, rval; ++ int flen, len, rval, singular; + char *p, *fraction; + + flen = 0; +@@ -174,7 +174,7 @@ + --len; + } + +- rval = len > 0 ? unit(len, line) : 0; ++ rval = len > 0 ? unit(len, line, &singular) : 0; + if (fraction != NULL && flen != 0) + for (p = fraction; *p != '\0'; ++p) + if (*p != '0') { +@@ -182,10 +182,10 @@ + (void)printf("%sand%s", + lflag ? " " : "", + lflag ? " " : "\n"); +- if (unit(flen, fraction)) { ++ if (unit(flen, fraction, &singular)) { + if (lflag) + (void)printf(" "); +- pfract(flen); ++ pfract(flen, singular); + rval = 1; + } + break; +@@ -197,9 +197,10 @@ + } + + int +-unit(len, p) ++unit(len, p, singular) + int len; + const char *p; ++ int *singular; + { + int off, rval; + +@@ -208,7 +209,7 @@ + if (len % 3) { + off = len % 3; + len -= off; +- if (number(p, off)) { ++ if (number(p, off, singular)) { + rval = 1; + (void)printf(" %s%s", + name3[len / 3], lflag ? " " : ".\n"); +@@ -217,14 +218,16 @@ + } + for (; len > 3; p += 3) { + len -= 3; +- if (number(p, 3)) { ++ if (number(p, 3, singular)) { + rval = 1; + (void)printf(" %s%s", + name3[len / 3], lflag ? " " : ".\n"); + } + } + } +- if (number(p, len)) { ++ if (number(p, len, singular)) { ++ if (rval) ++ *singular = 0; + if (!lflag) + (void)printf(".\n"); + rval = 1; +@@ -233,17 +236,20 @@ + } + + int +-number(p, len) ++number(p, len, singular) + const char *p; + int len; ++ int *singular; + { + int val, rval; + + rval = 0; ++ *singular = 1; + switch (len) { + case 3: + if (*p != '0') { + rval = 1; ++ *singular = 0; + (void)printf("%s hundred", name1[*p - '0']); + } + ++p; +@@ -262,33 +268,42 @@ + } + rval = 1; + } ++ if (val != 1) ++ *singular = 0; + break; + case 1: + if (*p != '0') { + rval = 1; + (void)printf("%s", name1[*p - '0']); + } ++ if (*p != '1') ++ *singular = 0; + } + return (rval); + } + + void +-pfract(len) ++pfract(len, singular) + int len; ++ int singular; + { + static const char *const pref[] = { "", "ten-", "hundred-" }; + + switch(len) { + case 1: +- (void)printf("tenths.\n"); ++ (void)printf("tenth"); + break; + case 2: +- (void)printf("hundredths.\n"); ++ (void)printf("hundredth"); + break; + default: +- (void)printf("%s%sths.\n", pref[len % 3], name3[len / 3]); ++ (void)printf("%s%sth", pref[len % 3], name3[len / 3]); + break; + } ++ if (!singular) { ++ printf("s"); ++ } ++ printf(".\n"); + } + + void +diff -Naur bsd-games-2.17/tests/number.-0.1 bsd-games-patch/tests/number.-0.1 +--- bsd-games-2.17/tests/number.-0.1 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/tests/number.-0.1 2020-04-17 15:14:27.831098084 +0700 +@@ -1,3 +1,3 @@ + minus + one. +-tenths. ++tenth. +diff -Naur bsd-games-2.17/tests/number.-0.2 bsd-games-patch/tests/number.-0.2 +--- bsd-games-2.17/tests/number.-0.2 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/tests/number.-0.2 2020-04-17 15:20:48.162336279 +0700 +@@ -0,0 +1,3 @@ ++minus ++two. ++tenths. +diff -Naur bsd-games-2.17/tests/number.test bsd-games-patch/tests/number.test +--- bsd-games-2.17/tests/number.test 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/tests/number.test 2020-04-17 15:20:22.774654155 +0700 +@@ -36,6 +36,8 @@ + testno 1 + number/number -- -0.1 >test.out 2>&1 || failtest + compare test.out tests/number.-0.1 ++number/number -- -0.2 >test.out 2>&1 || failtest ++compare test.out tests/number.-0.2 + rm -f test.out + + testno 2 diff --git a/gnu/packages/patches/bsd-games-prevent-name-collisions.patch b/gnu/packages/patches/bsd-games-prevent-name-collisions.patch new file mode 100644 index 0000000000..855ce59131 --- /dev/null +++ b/gnu/packages/patches/bsd-games-prevent-name-collisions.patch @@ -0,0 +1,13 @@ +There is already a "fish" shell. +diff -ur bsd-games-2.17.orig/fish/Makefrag bsd-games-2.17/fish/Makefrag +--- bsd-games-2.17.orig/fish/Makefrag 1970-01-01 07:00:01.000000000 +0700 ++++ bsd-games-2.17/fish/Makefrag 2020-08-06 19:18:43.204492847 +0700 +@@ -31,7 +31,7 @@ + fish_all: fish/fish fish/fish.instr fish/fish.6 + + fish_install: fish_all +- $(INSTALL_BINARY) fish/fish $(INSTALL_PREFIX)$(GAMESDIR)/fish ++ $(INSTALL_BINARY) fish/fish $(INSTALL_PREFIX)$(GAMESDIR)/fish-game + $(HIDE_GAME) fish + $(INSTALL_DATA) fish/fish.instr $(INSTALL_PREFIX)$(FISH_INSTRFILE) + $(INSTALL_MANUAL) fish/fish.6 diff --git a/gnu/packages/patches/bsd-games-stdio.h.patch b/gnu/packages/patches/bsd-games-stdio.h.patch new file mode 100644 index 0000000000..1c3a402042 --- /dev/null +++ b/gnu/packages/patches/bsd-games-stdio.h.patch @@ -0,0 +1,14 @@ +diff -ru a/include/stdio.h b/include/stdio.h +--- a/include/stdio.h 2000-08-04 10:24:39.000000000 +1000 ++++ b/include/stdio.h 2005-06-18 14:26:35.000000000 +1000 +@@ -34,6 +34,10 @@ + #include + #include_next + ++__BEGIN_DECLS ++ + #ifndef HAVE_fgetln + extern char *fgetln(FILE *stream, size_t *len); + #endif ++ ++__END_DECLS -- cgit v1.2.3 From 867e3830e6a3ee92317379e33d80c58a57107af4 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 23 Oct 2020 10:17:21 +0200 Subject: gnu: ungoogled-chromium: Add search path for installed extensions. * gnu/packages/patches/ungoogled-chromium-extension-search-path.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/chromium.scm (%guix-patches): New variable. (ungoogled-chromium-snippet): Apply %GUIX-PATCHES. (ungoogled-chromium)[arguments]: Don't hard-code extensions directory. [native-search-paths]: New field. --- gnu/local.mk | 1 + gnu/packages/chromium.scm | 18 +++++++------- .../ungoogled-chromium-extension-search-path.patch | 28 ++++++++++++++++++++++ 3 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 gnu/packages/patches/ungoogled-chromium-extension-search-path.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 2a994bd3b9..72f81a9913 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1653,6 +1653,7 @@ dist_patch_DATA = \ %D%/packages/patches/u-boot-riscv64-fix-extlinux.patch \ %D%/packages/patches/ucx-tcp-iface-ioctl.patch \ %D%/packages/patches/udiskie-no-appindicator.patch \ + %D%/packages/patches/ungoogled-chromium-extension-search-path.patch \ %D%/packages/patches/ungoogled-chromium-system-nspr.patch \ %D%/packages/patches/unison-fix-ocaml-4.08.patch \ %D%/packages/patches/unknown-horizons-python-3.8-distro.patch \ diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm index f32a779805..b2191701df 100644 --- a/gnu/packages/chromium.scm +++ b/gnu/packages/chromium.scm @@ -334,6 +334,10 @@ (base32 "18p9a7qffmy8m03nqva7maalgil13lj2mn0s56v3crbs4wk4lalj")))) +(define %guix-patches + (list (local-file (search-patch "ungoogled-chromium-system-nspr.patch")) + (local-file (search-patch "ungoogled-chromium-extension-search-path.patch")))) + ;; This is a source 'snippet' that does the following: ;; *) Applies various patches for unbundling purposes and libstdc++ compatibility. ;; *) Runs the ungoogled patch-, domain substitution-, and scrubbing scripts. @@ -356,9 +360,7 @@ (invoke "patch" "-p1" "--force" "--input" patch "--no-backup-if-mismatch")) (append '#+%debian-patches '#+%arch-patches - '#+(list (local-file - (search-patch - "ungoogled-chromium-system-nspr.patch"))))) + '#+%guix-patches)) (with-directory-excursion #+%ungoogled-origin (format #t "Ungooglifying...~%") @@ -571,11 +573,6 @@ (find-files (string-append "third_party/webrtc/modules" "/audio_coding/codecs/opus"))) - (substitute* "chrome/common/chrome_paths.cc" - (("/usr/share/chromium/extensions") - ;; TODO: Add ~/.guix-profile. - "/run/current-system/profile/share/chromium/extensions")) - ;; Many files try to include ICU headers from "third_party/icu/...". ;; Remove the "third_party/" prefix to use system headers instead. (substitute* (find-files "chrome" "\\.cc$") @@ -840,6 +837,11 @@ ("udev" ,eudev) ("valgrind" ,valgrind) ("vulkan-headers" ,vulkan-headers))) + (native-search-paths + (list (search-path-specification + (variable "CHROMIUM_EXTENSION_DIRECTORY") + (separator #f) ;single entry + (files '("share/chromium/extensions"))))) ;; Building Chromium takes ... a very long time. On a single core, a busy ;; mid-end x86 system may need more than 24 hours to complete the build. diff --git a/gnu/packages/patches/ungoogled-chromium-extension-search-path.patch b/gnu/packages/patches/ungoogled-chromium-extension-search-path.patch new file mode 100644 index 0000000000..5ce219ccc7 --- /dev/null +++ b/gnu/packages/patches/ungoogled-chromium-extension-search-path.patch @@ -0,0 +1,28 @@ +Look for extensions in $CHROMIUM_EXTENSION_DIRECTORY instead of +/usr/share/chromium/extensions. + +--- a/chrome/common/chrome_paths.cc ++++ b/chrome/common/chrome_paths.cc +@@ -4,6 +4,7 @@ + + #include "chrome/common/chrome_paths.h" + ++#include "base/environment.h" + #include "base/files/file_util.h" + #include "base/logging.h" + #include "base/native_library.h" +@@ -511,7 +512,13 @@ + #endif + #if defined(OS_LINUX) || defined(OS_CHROMEOS) + case chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS: { +- cur = base::FilePath(kFilepathSinglePrefExtensions); ++ std::unique_ptr environment(base::Environment::Create()); ++ std::string extension_dir; ++ if (environment->GetVar("CHROMIUM_EXTENSION_DIRECTORY", &extension_dir)) { ++ cur = base::FilePath(extension_dir); ++ } else { ++ cur = base::FilePath(kFilepathSinglePrefExtensions); ++ } + break; + } + #endif -- cgit v1.2.3 From d814246e2ebc4bb65d3714fcd9a6285553a8c092 Mon Sep 17 00:00:00 2001 From: raingloom Date: Sat, 17 Oct 2020 20:57:57 +0200 Subject: gnu: Add yggdrasil. * gnu/packages/networking.scm (yggdrasil): New variable. * gnu/packages/patches/yggdrasil-extra-config.patch: New file. * gnu/local.mk (dist_PATCH_DATA): Add it. Signed-off-by: Julien Lepiller --- gnu/local.mk | 1 + gnu/packages/networking.scm | 95 +++++++++++++++++++++++ gnu/packages/patches/yggdrasil-extra-config.patch | 86 ++++++++++++++++++++ 3 files changed, 182 insertions(+) create mode 100644 gnu/packages/patches/yggdrasil-extra-config.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 72f81a9913..3a8f1e30fc 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1725,6 +1725,7 @@ dist_patch_DATA = \ %D%/packages/patches/xsane-fix-snprintf-buffer-length.patch \ %D%/packages/patches/xsane-support-ipv6.patch \ %D%/packages/patches/xsane-tighten-default-umask.patch \ + %D%/packages/patches/yggdrasil-extra-config.patch \ %D%/packages/patches/zziplib-CVE-2018-16548.patch MISC_DISTRO_FILES = \ diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index fefb9a5bf8..f94c3e410f 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -97,6 +97,7 @@ #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gnupg) + #:use-module (gnu packages golang) #:use-module (gnu packages graphviz) #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) @@ -3821,3 +3822,97 @@ stamps.") client and server. It allows you to use remote block devices over a TCP/IP network.") (license license:gpl2))) + +(define-public yggdrasil + (package + (name "yggdrasil") + (version "0.3.15") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/yggdrasil-network/yggdrasil-go") + (commit (string-append "v" version)) + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0gk7gy8yq5nrnblv4imxzzm2hac4ri0hlw19ajfbc1zll5kj32gf")) + (patches (search-patches "yggdrasil-extra-config.patch")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/yggdrasil-network/yggdrasil-go" + ;; TODO: figure out how tests are run + #:tests? #f + #:install-source? #f + #:phases (modify-phases %standard-phases + (replace 'build + (lambda _ + (for-each + (lambda (c) + (invoke + "go" "build" "-v" "-ldflags=-s -w" + (string-append + "github.com/yggdrasil-network/yggdrasil-go/cmd/" c))) + (list "yggdrasil" "yggdrasilctl")) + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin/")) + (doc (string-append out "/share/doc/yggdrasil/"))) + (mkdir-p bin) + (for-each + (lambda (f) + (install-file f bin)) + (list "yggdrasil" "yggdrasilctl")) + (mkdir-p doc) + (copy-recursively + (string-append + "src/github.com/yggdrasil-network/yggdrasil-go/" + "doc/yggdrasil-network.github.io") + doc)) + #t))))) + ;; https://github.com/kardianos/minwinsvc is windows only + (propagated-inputs + `(("go-github-com-arceliar-phony" ,go-github-com-arceliar-phony) + ("go-github-com-cheggaaa-pb" ,go-github-com-cheggaaa-pb) + ("go-github-com-gologme-log" ,go-github-com-gologme-log) + ("go-github-com-hashicorp-go-syslog" ,go-github-com-hashicorp-go-syslog) + ("go-github-com-hjson-hjson-go" ,go-github-com-hjson-hjson-go) + ("go-github-com-kardianos-minwinsvc" ,go-github-com-kardianos-minwinsvc) + ("go-github-com-mitchellh-mapstructure" + ,go-github-com-mitchellh-mapstructure) + ("go-golang-org-x-crypto" ,go-golang-org-x-crypto) + ("go-golang-org-x-net" ,go-golang-org-x-net) + ("go-golang-org-x-text" ,go-golang-org-x-text) + ("go-golang-zx2c4-com-wireguard" ,go-golang-zx2c4-com-wireguard) + ("go-netlink" ,go-netlink) + ("go-netns" ,go-netns))) + (home-page "https://yggdrasil-network.github.io/blog.html") + (synopsis + "Experiment in scalable routing as an encrypted IPv6 overlay network") + (description + "Yggdrasil is an early-stage implementation of a fully end-to-end encrypted +IPv6 network. It is lightweight, self-arranging, supported on multiple +platforms and allows pretty much any IPv6-capable application to communicate +securely with other Yggdrasil nodes. Yggdrasil does not require you to have +IPv6 Internet connectivity - it also works over IPv4.") + (license + ;; As a special exception to the GNU Lesser General Public License + ;; version 3 ("LGPL3"), the copyright holders of this Library give you + ;; permission to convey to a third party a Combined Work that links + ;; statically or dynamically to this Library without providing any Minimal + ;; Corresponding Source or Minimal Application Code as set out in 4d or + ;; providing the installation information set out in section 4e, provided + ;; that you comply with the other provisions of LGPL3 and provided that you + ;; meet, for the Application the terms and conditions of the license(s) + ;; which apply to the Application. Except as stated in this special + ;; exception, the provisions of LGPL3 will continue to comply in full to + ;; this Library. If you modify this Library, you may apply this exception + ;; to your version of this Library, but you are not obliged to do so. If + ;; you do not wish to do so, delete this exception statement from your + ;; version. This exception does not (and cannot) modify any license terms + ;; which apply to the Application, with which you must still comply + license:lgpl3))) diff --git a/gnu/packages/patches/yggdrasil-extra-config.patch b/gnu/packages/patches/yggdrasil-extra-config.patch new file mode 100644 index 0000000000..c21ca29a84 --- /dev/null +++ b/gnu/packages/patches/yggdrasil-extra-config.patch @@ -0,0 +1,86 @@ +diff --git a/cmd/yggdrasil/main.go b/cmd/yggdrasil/main.go +index 813e950..08d35cc 100644 +--- a/cmd/yggdrasil/main.go ++++ b/cmd/yggdrasil/main.go +@@ -40,11 +40,12 @@ type node struct { + admin module.Module // admin.AdminSocket + } + +-func readConfig(useconf *bool, useconffile *string, normaliseconf *bool) *config.NodeConfig { ++func readConfig(useconf *bool, useconffile *string, extraconffile *string, normaliseconf *bool) *config.NodeConfig { + // Use a configuration file. If -useconf, the configuration will be read + // from stdin. If -useconffile, the configuration will be read from the + // filesystem. + var conf []byte ++ var extraconf []byte + var err error + if *useconffile != "" { + // Read the file from the filesystem +@@ -56,6 +57,21 @@ func readConfig(useconf *bool, useconffile *string, normaliseconf *bool) *config + if err != nil { + panic(err) + } ++ if *extraconffile != "" { ++ extraconf, err = ioutil.ReadFile(*extraconffile); ++ } ++ if err != nil { ++ panic(err) ++ } ++ // Generate a new configuration - this gives us a set of sane defaults - ++ // then parse the configuration we loaded above on top of it. The effect ++ // of this is that any configuration item that is missing from the provided ++ // configuration will use a sane default. ++ cfg := config.GenerateConfig() ++ var confs [2][]byte ++ confs[0]=conf ++ confs[1]=extraconf ++ for _, conf := range confs { if len(conf)>0 { + // If there's a byte order mark - which Windows 10 is now incredibly fond of + // throwing everywhere when it's converting things into UTF-16 for the hell + // of it - remove it and decode back down into UTF-8. This is necessary +@@ -69,11 +85,6 @@ func readConfig(useconf *bool, useconffile *string, normaliseconf *bool) *config + panic(err) + } + } +- // Generate a new configuration - this gives us a set of sane defaults - +- // then parse the configuration we loaded above on top of it. The effect +- // of this is that any configuration item that is missing from the provided +- // configuration will use a sane default. +- cfg := config.GenerateConfig() + var dat map[string]interface{} + if err := hjson.Unmarshal(conf, &dat); err != nil { + panic(err) +@@ -112,6 +123,7 @@ func readConfig(useconf *bool, useconffile *string, normaliseconf *bool) *config + if err = mapstructure.Decode(dat, &cfg); err != nil { + panic(err) + } ++ }} + return cfg + } + +@@ -164,6 +176,7 @@ func main() { + genconf := flag.Bool("genconf", false, "print a new config to stdout") + useconf := flag.Bool("useconf", false, "read HJSON/JSON config from stdin") + useconffile := flag.String("useconffile", "", "read HJSON/JSON config from specified file path") ++ extraconffile := flag.String("extraconffile", "", "extra (usually private) HJSON/JSON config from specified file path") + normaliseconf := flag.Bool("normaliseconf", false, "use in combination with either -useconf or -useconffile, outputs your configuration normalised") + confjson := flag.Bool("json", false, "print configuration from -genconf or -normaliseconf as JSON instead of HJSON") + autoconf := flag.Bool("autoconf", false, "automatic mode (dynamic IP, peer with IPv6 neighbors)") +@@ -187,7 +200,7 @@ func main() { + cfg = config.GenerateConfig() + case *useconffile != "" || *useconf: + // Read the configuration from either stdin or from the filesystem +- cfg = readConfig(useconf, useconffile, normaliseconf) ++ cfg = readConfig(useconf, useconffile, extraconffile, normaliseconf) + // If the -normaliseconf option was specified then remarshal the above + // configuration and print it back to stdout. This lets the user update + // their configuration file with newly mapped names (like above) or to +@@ -332,7 +345,7 @@ func main() { + goto exit + case _ = <-r: + if *useconffile != "" { +- cfg = readConfig(useconf, useconffile, normaliseconf) ++ cfg = readConfig(useconf, useconffile, extraconffile, normaliseconf) + logger.Infoln("Reloading configuration from", *useconffile) + n.core.UpdateConfig(cfg) + n.tuntap.UpdateConfig(cfg) -- cgit v1.2.3 From 02f5ee01c96589fc13f1e21b85b0b48100aec4e8 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 26 Mar 2020 15:06:23 +0100 Subject: gnu: libffi: Fix building on powerpc. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/libffi.scm (libffi)[inputs]: New field. [arguments]: Add 'apply-patch' phase when targeting PowerPC. * gnu/packages/patches/libffi-3.3-powerpc-fixes.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Co-authored-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/libffi.scm | 24 +++- .../patches/libffi-3.3-powerpc-fixes.patch | 138 +++++++++++++++++++++ 3 files changed, 160 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/libffi-3.3-powerpc-fixes.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 72f81a9913..105e4dd28c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1194,6 +1194,7 @@ dist_patch_DATA = \ %D%/packages/patches/jsoncpp-fix-inverted-case.patch \ %D%/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch \ %D%/packages/patches/kdbusaddons-kinit-file-name.patch \ + %D%/packages/patches/libffi-3.3-powerpc-fixes.patch \ %D%/packages/patches/libvirt-create-machine-cgroup.patch \ %D%/packages/patches/libziparchive-add-includes.patch \ %D%/packages/patches/localed-xorg-keyboard.patch \ diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm index ec8703ffdb..d324892330 100644 --- a/gnu/packages/libffi.scm +++ b/gnu/packages/libffi.scm @@ -1,8 +1,8 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014, 2020 Ludovic Courtès ;;; Copyright © 2014 Federico Beffa ;;; Copyright © 2015, 2019 Ricardo Wurmus -;;; Copyright © 2016, 2017 Efraim Flashner +;;; Copyright © 2016, 2017, 2020 Efraim Flashner ;;; Copyright © 2016, 2017 Ben Woodcroft ;;; Copyright © 2017, 2019, 2020 Marius Bakke ;;; Copyright © 2018 Tobias Geerinckx-Rice @@ -55,7 +55,25 @@ (arguments `(;; Prevent the build system from passing -march and -mtune to the ;; compiler. See "ax_cc_maxopt.m4" and "ax_gcc_archflag.m4". - #:configure-flags '("--enable-portable-binary" "--without-gcc-arch"))) + #:configure-flags '("--enable-portable-binary" "--without-gcc-arch") + + ;; TODO: Inline patch on next rebuild cycle. + ,@(if (string-prefix? "powerpc-" (or (%current-target-system) + (%current-system))) + '(#:phases (modify-phases %standard-phases + (add-after 'unpack 'apply-patch + (lambda* (#:key inputs #:allow-other-keys) + (let ((patch (assoc-ref inputs + "powerpc-patch"))) + (invoke "patch" "--batch" "-p1" + "-i" patch)))))) + '()))) + (inputs + (if (string-prefix? "powerpc-" (or (%current-target-system) + (%current-system))) + `(("powerpc-patch" ,@(search-patches + "libffi-3.3-powerpc-fixes.patch"))) + '())) (outputs '("out" "debug")) (synopsis "Foreign function call interface library") (description diff --git a/gnu/packages/patches/libffi-3.3-powerpc-fixes.patch b/gnu/packages/patches/libffi-3.3-powerpc-fixes.patch new file mode 100644 index 0000000000..971ed26180 --- /dev/null +++ b/gnu/packages/patches/libffi-3.3-powerpc-fixes.patch @@ -0,0 +1,138 @@ +This is a combination of the following 4 commits: +https://github.com/libffi/libffi/commit/01a75ed76ea7e57f1b7a5c183e2b1e890e6aa0fd.patch +https://github.com/libffi/libffi/commit/6663047f56c2932a6b10a790f4ac6666dd181326.patch +https://github.com/libffi/libffi/commit/e50b9ef8b910fa642ef158f6642e60d54d7ad740.patch +https://github.com/libffi/libffi/commit/4d6d2866ae43e55325e8ee96561221804602cd7a.patch + +From 2dbfa92a95e3bacabca431b89d2a5925e48a0e40 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Thu, 28 Nov 2019 12:42:41 +0000 + +powerpc: fix build failure on power7 and older (#532) + +Build failure looks as: +``` +libtool: compile: powerpc-unknown-linux-gnu-gcc \ + -O2 -mcpu=powerpc -mtune=powerpc -pipe ... -c src/powerpc/ffi.c ... +In file included from src/powerpc/ffi.c:33: +src/powerpc/ffi_powerpc.h:65:9: error: '__int128' is not supported on this target + 65 | typedef __int128 float128; + | ^~~~~~~~ +``` + +The fix avoids using __int128 in favour of aligned char[16]. + +Closes: https://github.com/libffi/libffi/issues/531 +Signed-off-by: Sergei Trofimovich + +Address platforms with no __int128. + +powerpc64: Use memcpy to help platforms with no __int128. (#534) + +Signed-off-by: Khem Raj + +Update powerpc sysv assembly for ffi_powerpc.h changes (#541) + +Some of the flag bits were moved when adding powerpc64 vector support. + +Fixes #536 +--- + src/powerpc/ffi_linux64.c | 12 ++++++------ + src/powerpc/ffi_powerpc.h | 2 +- + src/powerpc/sysv.S | 12 +++++------- + 3 files changed, 12 insertions(+), 14 deletions(-) + +diff --git a/src/powerpc/ffi_linux64.c b/src/powerpc/ffi_linux64.c +index de0d033..4d50878 100644 +--- a/src/powerpc/ffi_linux64.c ++++ b/src/powerpc/ffi_linux64.c +@@ -547,9 +547,9 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack) + if (next_arg.ul == gpr_end.ul) + next_arg.ul = rest.ul; + if (vecarg_count < NUM_VEC_ARG_REGISTERS64 && i < nfixedargs) +- *vec_base.f128++ = **p_argv.f128; ++ memcpy (vec_base.f128++, *p_argv.f128, sizeof (float128)); + else +- *next_arg.f128 = **p_argv.f128; ++ memcpy (next_arg.f128, *p_argv.f128, sizeof (float128)); + if (++next_arg.f128 == gpr_end.f128) + next_arg.f128 = rest.f128; + vecarg_count++; +@@ -680,9 +680,9 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack) + { + if (vecarg_count < NUM_VEC_ARG_REGISTERS64 + && i < nfixedargs) +- *vec_base.f128++ = *arg.f128++; ++ memcpy (vec_base.f128++, arg.f128, sizeof (float128)); + else +- *next_arg.f128 = *arg.f128++; ++ memcpy (next_arg.f128, arg.f128++, sizeof (float128)); + if (++next_arg.f128 == gpr_end.f128) + next_arg.f128 = rest.f128; + vecarg_count++; +@@ -986,9 +986,9 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif, + do + { + if (pvec < end_pvec && i < nfixedargs) +- *to.f128 = *pvec++; ++ memcpy (to.f128, pvec++, sizeof (float128)); + else +- *to.f128 = *from.f128; ++ memcpy (to.f128, from.f128, sizeof (float128)); + to.f128++; + from.f128++; + } +diff --git a/src/powerpc/ffi_powerpc.h b/src/powerpc/ffi_powerpc.h +index 5ee2a70..8e2f2f0 100644 +--- a/src/powerpc/ffi_powerpc.h ++++ b/src/powerpc/ffi_powerpc.h +@@ -62,7 +62,7 @@ typedef _Float128 float128; + #elif defined(__FLOAT128__) + typedef __float128 float128; + #else +-typedef __int128 float128; ++typedef char float128[16] __attribute__((aligned(16))); + #endif + + void FFI_HIDDEN ffi_closure_SYSV (void); +diff --git a/src/powerpc/sysv.S b/src/powerpc/sysv.S +index 1474ce7..df97734 100644 +--- a/src/powerpc/sysv.S ++++ b/src/powerpc/sysv.S +@@ -104,17 +104,16 @@ ENTRY(ffi_call_SYSV) + bctrl + + /* Now, deal with the return value. */ +- mtcrf 0x01,%r31 /* cr7 */ ++ mtcrf 0x03,%r31 /* cr6-cr7 */ + bt- 31,L(small_struct_return_value) + bt- 30,L(done_return_value) + #ifndef __NO_FPRS__ + bt- 29,L(fp_return_value) + #endif + stw %r3,0(%r30) +- bf+ 28,L(done_return_value) ++ bf+ 27,L(done_return_value) + stw %r4,4(%r30) +- mtcrf 0x02,%r31 /* cr6 */ +- bf 27,L(done_return_value) ++ bf 26,L(done_return_value) + stw %r5,8(%r30) + stw %r6,12(%r30) + /* Fall through... */ +@@ -145,10 +144,9 @@ L(done_return_value): + #ifndef __NO_FPRS__ + L(fp_return_value): + .cfi_restore_state +- bf 28,L(float_return_value) ++ bf 27,L(float_return_value) + stfd %f1,0(%r30) +- mtcrf 0x02,%r31 /* cr6 */ +- bf 27,L(done_return_value) ++ bf 26,L(done_return_value) + stfd %f2,8(%r30) + b L(done_return_value) + L(float_return_value): +-- +2.26.0 + -- cgit v1.2.3 From 9b4a497e38f1845ba85c507af7f3937f1cd25122 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 8 Nov 2020 00:22:21 +0100 Subject: gnu: gdb@9.2: Restore 'gdb-hurd.patch'. This patch got lost when e33c4286ebcc0dcc79985a32c6c2d5ad623d1fbe was merged (commit 32787d652460871a79f99b63230f92759e2e0de2), but was still required on the 'staging' branch. * gnu/packages/patches/gdb-hurd.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 1 + gnu/packages/patches/gdb-hurd.patch | 69 +++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 gnu/packages/patches/gdb-hurd.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 697863ae02..ac6eeba935 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1032,6 +1032,7 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-8-strmov-store-file-names.patch \ %D%/packages/patches/gcc-9-asan-fix-limits-include.patch \ %D%/packages/patches/gcc-9-strmov-store-file-names.patch \ + %D%/packages/patches/gdb-hurd.patch \ %D%/packages/patches/gd-fix-tests-on-i686.patch \ %D%/packages/patches/gd-brect-bounds.patch \ %D%/packages/patches/gdm-default-session.patch \ diff --git a/gnu/packages/patches/gdb-hurd.patch b/gnu/packages/patches/gdb-hurd.patch new file mode 100644 index 0000000000..0af8d4dc28 --- /dev/null +++ b/gnu/packages/patches/gdb-hurd.patch @@ -0,0 +1,69 @@ +Taken from upstream, removed ChangeLog. + +From 6930bffe3373690b3431d6291f9f7c116d6a1ec4 Mon Sep 17 00:00:00 2001 +From: Samuel Thibault +Date: Sat, 30 May 2020 18:35:59 +0000 +Subject: [PATCH] hurd: fix gnu_debug_flag type +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes + +../../gdb/gnu-nat.c:96:6: error: conflicting declaration ‘bool gnu_debug_flag’ + 96 | bool gnu_debug_flag = false; +../../gdb/gnu-nat.c: In function ‘void _initialize_gnu_nat()’: +../../gdb/gnu-nat.c:3511:7: error: cannot + +gdb/ChangeLog: + + * gnu-nat.h (gnu_debug_flag): Set type to bool. +--- + gdb/ChangeLog | 4 ++++ + gdb/gnu-nat.h | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/gdb/gnu-nat.h b/gdb/gnu-nat.h +index 77c57817b2..766f716587 100644 +--- a/gdb/gnu-nat.h ++++ b/gdb/gnu-nat.h +@@ -111,7 +111,7 @@ extern char *proc_string (struct proc *proc); + __proc_pid (__proc), __proc->tid, \ + host_address_to_string (__proc) , ##args); } while (0) + +-extern int gnu_debug_flag; ++extern bool gnu_debug_flag; + + #define debug(msg, args...) \ + do { if (gnu_debug_flag) \ +-- +Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org +Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com + +commit 366f550a593c7e6bae3699a4b6d65fe937af5603 +Author: Samuel Thibault +Date: Sat May 30 18:41:30 2020 +0000 + + hurd: add missing include + + Fixes + + ../../gdb/gnu-nat.c:2522:14: error: ‘target_gdbarch’ was not declared in this scope; did you mean ‘target_detach’? + 2522 | paddress (target_gdbarch (), memaddr), pulongest (len), + + gdb/Changelog: + + * gnu-nat.c: Include "gdbarch.h". + +diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c +index 3b438a9a43..9b93488b41 100644 +--- a/gdb/gnu-nat.c ++++ b/gdb/gnu-nat.c +@@ -64,6 +64,7 @@ extern "C" + #include "language.h" + #include "target.h" + #include "gdbsupport/gdb_wait.h" ++#include "gdbarch.h" + #include "gdbcmd.h" + #include "gdbcore.h" + #include "gdbthread.h" -- cgit v1.2.3 From 74361d3ee8c1524ee3f3496f113b9a8bf644e023 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 10 Nov 2020 16:43:59 +0100 Subject: gnu: python2-pygobject@2: Shorten patch file name. The file would not be included in the tarball produced by "make dist" because its name was too long. * gnu/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch: Rename to... * gnu/packages/patches/python2-pygobject-2-deprecation.patch: ... this. * gnu/packages/glib.scm (python2-pygobject-2)[source]: Adjust accordingly. * gnu/local.mk (dist_patch_DATA): Likewise. --- gnu/local.mk | 2 +- gnu/packages/glib.scm | 3 +- .../patches/python2-pygobject-2-deprecation.patch | 39 ++++++++++++++++++++++ ...on2-pygobject-2-gi-info-type-error-domain.patch | 39 ---------------------- 4 files changed, 41 insertions(+), 42 deletions(-) create mode 100644 gnu/packages/patches/python2-pygobject-2-deprecation.patch delete mode 100644 gnu/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 105e4dd28c..9a8d6dd4d9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1524,7 +1524,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-paste-remove-timing-test.patch \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ %D%/packages/patches/python-pycrypto-time-clock.patch \ - %D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ + %D%/packages/patches/python2-pygobject-2-deprecation.patch \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ %D%/packages/patches/python-robotframework-source-date-epoch.patch \ %D%/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch \ diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index bba9461d44..901222476a 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -698,8 +698,7 @@ useful for C++.") (sha256 (base32 "0nkam61rsn7y3wik3vw46wk5q2cjfh2iph57hl9m39rc8jijb7dv")) - (patches (search-patches - "python2-pygobject-2-gi-info-type-error-domain.patch")))) + (patches (search-patches "python2-pygobject-2-deprecation.patch")))) (build-system gnu-build-system) (native-inputs `(("which" ,which) diff --git a/gnu/packages/patches/python2-pygobject-2-deprecation.patch b/gnu/packages/patches/python2-pygobject-2-deprecation.patch new file mode 100644 index 0000000000..6a08e56351 --- /dev/null +++ b/gnu/packages/patches/python2-pygobject-2-deprecation.patch @@ -0,0 +1,39 @@ +From e5df32ffbf37481dbb6a70c4d4e7b7b9778c5549 Mon Sep 17 00:00:00 2001 +From: "John (J5) Palmieri" +Date: Sat, 13 Aug 2011 04:13:28 -0400 +Subject: remove references to deprecated GI_INFO_TYPE_ERROR_DOMAIN + + +diff --git a/gi/pygi-info.c b/gi/pygi-info.c +index 8729e25..007b609 100644 +--- a/gi/pygi-info.c ++++ b/gi/pygi-info.c +@@ -165,9 +165,6 @@ _pygi_info_new (GIBaseInfo *info) + case GI_INFO_TYPE_CONSTANT: + type = &PyGIConstantInfo_Type; + break; +- case GI_INFO_TYPE_ERROR_DOMAIN: +- type = &PyGIErrorDomainInfo_Type; +- break; + case GI_INFO_TYPE_UNION: + type = &PyGIUnionInfo_Type; + break; +@@ -484,7 +481,6 @@ _pygi_g_type_info_size (GITypeInfo *type_info) + case GI_INFO_TYPE_INVALID: + case GI_INFO_TYPE_FUNCTION: + case GI_INFO_TYPE_CONSTANT: +- case GI_INFO_TYPE_ERROR_DOMAIN: + case GI_INFO_TYPE_VALUE: + case GI_INFO_TYPE_SIGNAL: + case GI_INFO_TYPE_PROPERTY: +@@ -863,7 +859,6 @@ pygi_g_struct_info_is_simple (GIStructInfo *struct_info) + case GI_INFO_TYPE_INVALID: + case GI_INFO_TYPE_FUNCTION: + case GI_INFO_TYPE_CONSTANT: +- case GI_INFO_TYPE_ERROR_DOMAIN: + case GI_INFO_TYPE_VALUE: + case GI_INFO_TYPE_SIGNAL: + case GI_INFO_TYPE_PROPERTY: +-- +cgit v0.10.1 + diff --git a/gnu/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch b/gnu/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch deleted file mode 100644 index 6a08e56351..0000000000 --- a/gnu/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch +++ /dev/null @@ -1,39 +0,0 @@ -From e5df32ffbf37481dbb6a70c4d4e7b7b9778c5549 Mon Sep 17 00:00:00 2001 -From: "John (J5) Palmieri" -Date: Sat, 13 Aug 2011 04:13:28 -0400 -Subject: remove references to deprecated GI_INFO_TYPE_ERROR_DOMAIN - - -diff --git a/gi/pygi-info.c b/gi/pygi-info.c -index 8729e25..007b609 100644 ---- a/gi/pygi-info.c -+++ b/gi/pygi-info.c -@@ -165,9 +165,6 @@ _pygi_info_new (GIBaseInfo *info) - case GI_INFO_TYPE_CONSTANT: - type = &PyGIConstantInfo_Type; - break; -- case GI_INFO_TYPE_ERROR_DOMAIN: -- type = &PyGIErrorDomainInfo_Type; -- break; - case GI_INFO_TYPE_UNION: - type = &PyGIUnionInfo_Type; - break; -@@ -484,7 +481,6 @@ _pygi_g_type_info_size (GITypeInfo *type_info) - case GI_INFO_TYPE_INVALID: - case GI_INFO_TYPE_FUNCTION: - case GI_INFO_TYPE_CONSTANT: -- case GI_INFO_TYPE_ERROR_DOMAIN: - case GI_INFO_TYPE_VALUE: - case GI_INFO_TYPE_SIGNAL: - case GI_INFO_TYPE_PROPERTY: -@@ -863,7 +859,6 @@ pygi_g_struct_info_is_simple (GIStructInfo *struct_info) - case GI_INFO_TYPE_INVALID: - case GI_INFO_TYPE_FUNCTION: - case GI_INFO_TYPE_CONSTANT: -- case GI_INFO_TYPE_ERROR_DOMAIN: - case GI_INFO_TYPE_VALUE: - case GI_INFO_TYPE_SIGNAL: - case GI_INFO_TYPE_PROPERTY: --- -cgit v0.10.1 - -- cgit v1.2.3 From 8515ea12d283632e7d0103286e679542d896058b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 10 Nov 2020 17:49:14 +0100 Subject: gnu: audiofile: Shorten patch file names. At least 'audiofile-division-by-zero-BlockCodec-runPull.patch' could end up not being included in a tarball. * gnu/packages/patches/audiofile-Check-the-number-of-coefficients.patch: Rename to... * gnu/packages/patches/audiofile-check-number-of-coefficients.patch: ... this. * gnu/packages/patches/audiofile-division-by-zero-BlockCodec-runPull.patch: Rename to... * gnu/packages/patches/audiofile-division-by-zero.patch: ....this. * gnu/packages/patches/audiofile-signature-of-multiplyCheckOverflow.patch: Rename to... * gnu/packages/patches/audiofile-function-signature.patch: ... this. * gnu/packages/patches/audiofile-Fix-multiply-overflow-sfconvert.patch: Rename to.... * gnu/packages/patches/audiofile-multiply-overflow.patch: ... this. * gnu/packages/patches/audiofile-Fix-overflow-in-MSADPCM-decodeSam.patch: Rename to... * gnu/packages/patches/audiofile-overflow-in-MSADPCM.patch: ... this. * gnu/packages/audio.scm (audiofile)[source]: Adjust accordingly. * gnu/local.mk (dist_patch_DATA): Likewise. --- gnu/local.mk | 12 +-- gnu/packages/audio.scm | 10 +- ...udiofile-Check-the-number-of-coefficients.patch | 30 ------ ...audiofile-Fix-multiply-overflow-sfconvert.patch | 66 ------------ ...diofile-Fix-overflow-in-MSADPCM-decodeSam.patch | 116 --------------------- .../audiofile-check-number-of-coefficients.patch | 30 ++++++ ...ofile-division-by-zero-BlockCodec-runPull.patch | 21 ---- .../patches/audiofile-division-by-zero.patch | 21 ++++ .../patches/audiofile-function-signature.patch | 35 +++++++ .../patches/audiofile-multiply-overflow.patch | 66 ++++++++++++ .../patches/audiofile-overflow-in-MSADPCM.patch | 116 +++++++++++++++++++++ ...iofile-signature-of-multiplyCheckOverflow.patch | 35 ------- 12 files changed, 279 insertions(+), 279 deletions(-) delete mode 100644 gnu/packages/patches/audiofile-Check-the-number-of-coefficients.patch delete mode 100644 gnu/packages/patches/audiofile-Fix-multiply-overflow-sfconvert.patch delete mode 100644 gnu/packages/patches/audiofile-Fix-overflow-in-MSADPCM-decodeSam.patch create mode 100644 gnu/packages/patches/audiofile-check-number-of-coefficients.patch delete mode 100644 gnu/packages/patches/audiofile-division-by-zero-BlockCodec-runPull.patch create mode 100644 gnu/packages/patches/audiofile-division-by-zero.patch create mode 100644 gnu/packages/patches/audiofile-function-signature.patch create mode 100644 gnu/packages/patches/audiofile-multiply-overflow.patch create mode 100644 gnu/packages/patches/audiofile-overflow-in-MSADPCM.patch delete mode 100644 gnu/packages/patches/audiofile-signature-of-multiplyCheckOverflow.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 9a8d6dd4d9..d5a13cbdbd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -800,14 +800,14 @@ dist_patch_DATA = \ %D%/packages/patches/audiofile-CVE-2015-7747.patch \ %D%/packages/patches/audiofile-CVE-2018-13440.patch \ %D%/packages/patches/audiofile-CVE-2018-17095.patch \ - %D%/packages/patches/audiofile-Check-the-number-of-coefficients.patch \ + %D%/packages/patches/audiofile-check-number-of-coefficients.patch \ %D%/packages/patches/audiofile-Fail-on-error-in-parseFormat.patch \ %D%/packages/patches/audiofile-Fix-index-overflow-in-IMA.cpp.patch \ - %D%/packages/patches/audiofile-Fix-multiply-overflow-sfconvert.patch \ - %D%/packages/patches/audiofile-Fix-overflow-in-MSADPCM-decodeSam.patch \ - %D%/packages/patches/audiofile-division-by-zero-BlockCodec-runPull.patch \ - %D%/packages/patches/audiofile-hurd.patch \ - %D%/packages/patches/audiofile-signature-of-multiplyCheckOverflow.patch \ + %D%/packages/patches/audiofile-multiply-overflow.patch \ + %D%/packages/patches/audiofile-overflow-in-MSADPCM.patch \ + %D%/packages/patches/audiofile-division-by-zero.patch \ + %D%/packages/patches/audiofile-hurd.patch \ + %D%/packages/patches/audiofile-function-signature.patch \ %D%/packages/patches/automake-skip-amhello-tests.patch \ %D%/packages/patches/avahi-localstatedir.patch \ %D%/packages/patches/avogadro-boost148.patch \ diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 6479398cb5..6733c8d212 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -862,16 +862,16 @@ tools.") "audiofile-Fix-index-overflow-in-IMA.cpp.patch" ;; CVE-2017-6827, CVE-2017-6828, CVE-2017-6832, CVE-2017-6835, ;; CVE-2017-6837: - "audiofile-Check-the-number-of-coefficients.patch" + "audiofile-check-number-of-coefficients.patch" ;; CVE-2017-6839: - "audiofile-Fix-overflow-in-MSADPCM-decodeSam.patch" + "audiofile-overflow-in-MSADPCM.patch" ;; CVE-2017-6830, CVE-2017-6834, CVE-2017-6836, CVE-2017-6838: - "audiofile-Fix-multiply-overflow-sfconvert.patch" - "audiofile-signature-of-multiplyCheckOverflow.patch" + "audiofile-multiply-overflow.patch" + "audiofile-function-signature.patch" ;; CVE-2017-6831: "audiofile-Fail-on-error-in-parseFormat.patch" ;; CVE-2017-6833: - "audiofile-division-by-zero-BlockCodec-runPull.patch" + "audiofile-division-by-zero.patch" "audiofile-CVE-2018-13440.patch" "audiofile-CVE-2018-17095.patch")))) (properties `((lint-hidden-cve . ("CVE-2017-6829" diff --git a/gnu/packages/patches/audiofile-Check-the-number-of-coefficients.patch b/gnu/packages/patches/audiofile-Check-the-number-of-coefficients.patch deleted file mode 100644 index f9427cbe61..0000000000 --- a/gnu/packages/patches/audiofile-Check-the-number-of-coefficients.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Antonio Larrosa -Date: Mon, 6 Mar 2017 12:51:22 +0100 -Subject: Always check the number of coefficients - -When building the library with NDEBUG, asserts are eliminated -so it's better to always check that the number of coefficients -is inside the array range. - -This fixes the 00191-audiofile-indexoob issue in #41 ---- - libaudiofile/WAVE.cpp | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/libaudiofile/WAVE.cpp b/libaudiofile/WAVE.cpp -index 9dd8511..0fc48e8 100644 ---- a/libaudiofile/WAVE.cpp -+++ b/libaudiofile/WAVE.cpp -@@ -281,6 +281,12 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size) - - /* numCoefficients should be at least 7. */ - assert(numCoefficients >= 7 && numCoefficients <= 255); -+ if (numCoefficients < 7 || numCoefficients > 255) -+ { -+ _af_error(AF_BAD_HEADER, -+ "Bad number of coefficients"); -+ return AF_FAIL; -+ } - - m_msadpcmNumCoefficients = numCoefficients; - diff --git a/gnu/packages/patches/audiofile-Fix-multiply-overflow-sfconvert.patch b/gnu/packages/patches/audiofile-Fix-multiply-overflow-sfconvert.patch deleted file mode 100644 index 0f17140d6b..0000000000 --- a/gnu/packages/patches/audiofile-Fix-multiply-overflow-sfconvert.patch +++ /dev/null @@ -1,66 +0,0 @@ -From: Antonio Larrosa -Date: Mon, 6 Mar 2017 13:54:52 +0100 -Subject: Check for multiplication overflow in sfconvert - -Checks that a multiplication doesn't overflow when -calculating the buffer size, and if it overflows, -reduce the buffer size instead of failing. - -This fixes the 00192-audiofile-signintoverflow-sfconvert case -in #41 ---- - sfcommands/sfconvert.c | 34 ++++++++++++++++++++++++++++++++-- - 1 file changed, 32 insertions(+), 2 deletions(-) - -diff --git a/sfcommands/sfconvert.c b/sfcommands/sfconvert.c -index 80a1bc4..970a3e4 100644 ---- a/sfcommands/sfconvert.c -+++ b/sfcommands/sfconvert.c -@@ -45,6 +45,33 @@ void printusage (void); - void usageerror (void); - bool copyaudiodata (AFfilehandle infile, AFfilehandle outfile, int trackid); - -+int firstBitSet(int x) -+{ -+ int position=0; -+ while (x!=0) -+ { -+ x>>=1; -+ ++position; -+ } -+ return position; -+} -+ -+#ifndef __has_builtin -+#define __has_builtin(x) 0 -+#endif -+ -+int multiplyCheckOverflow(int a, int b, int *result) -+{ -+#if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) -+ return __builtin_mul_overflow(a, b, result); -+#else -+ if (firstBitSet(a)+firstBitSet(b)>31) // int is signed, so we can't use 32 bits -+ return true; -+ *result = a * b; -+ return false; -+#endif -+} -+ - int main (int argc, char **argv) - { - if (argc == 2) -@@ -323,8 +350,11 @@ bool copyaudiodata (AFfilehandle infile, AFfilehandle outfile, int trackid) - { - int frameSize = afGetVirtualFrameSize(infile, trackid, 1); - -- const int kBufferFrameCount = 65536; -- void *buffer = malloc(kBufferFrameCount * frameSize); -+ int kBufferFrameCount = 65536; -+ int bufferSize; -+ while (multiplyCheckOverflow(kBufferFrameCount, frameSize, &bufferSize)) -+ kBufferFrameCount /= 2; -+ void *buffer = malloc(bufferSize); - - AFframecount totalFrames = afGetFrameCount(infile, AF_DEFAULT_TRACK); - AFframecount totalFramesWritten = 0; diff --git a/gnu/packages/patches/audiofile-Fix-overflow-in-MSADPCM-decodeSam.patch b/gnu/packages/patches/audiofile-Fix-overflow-in-MSADPCM-decodeSam.patch deleted file mode 100644 index 2be930b924..0000000000 --- a/gnu/packages/patches/audiofile-Fix-overflow-in-MSADPCM-decodeSam.patch +++ /dev/null @@ -1,116 +0,0 @@ -From: Antonio Larrosa -Date: Mon, 6 Mar 2017 13:43:53 +0100 -Subject: Check for multiplication overflow in MSADPCM decodeSample - -Check for multiplication overflow (using __builtin_mul_overflow -if available) in MSADPCM.cpp decodeSample and return an empty -decoded block if an error occurs. - -This fixes the 00193-audiofile-signintoverflow-MSADPCM case of #41 ---- - libaudiofile/modules/BlockCodec.cpp | 5 ++-- - libaudiofile/modules/MSADPCM.cpp | 47 +++++++++++++++++++++++++++++++++---- - 2 files changed, 46 insertions(+), 6 deletions(-) - -diff --git a/libaudiofile/modules/BlockCodec.cpp b/libaudiofile/modules/BlockCodec.cpp -index 45925e8..4731be1 100644 ---- a/libaudiofile/modules/BlockCodec.cpp -+++ b/libaudiofile/modules/BlockCodec.cpp -@@ -52,8 +52,9 @@ void BlockCodec::runPull() - // Decompress into m_outChunk. - for (int i=0; i(m_inChunk->buffer) + i * m_bytesPerPacket, -- static_cast(m_outChunk->buffer) + i * m_framesPerPacket * m_track->f.channelCount); -+ if (decodeBlock(static_cast(m_inChunk->buffer) + i * m_bytesPerPacket, -+ static_cast(m_outChunk->buffer) + i * m_framesPerPacket * m_track->f.channelCount)==0) -+ break; - - framesRead += m_framesPerPacket; - } -diff --git a/libaudiofile/modules/MSADPCM.cpp b/libaudiofile/modules/MSADPCM.cpp -index 8ea3c85..ef9c38c 100644 ---- a/libaudiofile/modules/MSADPCM.cpp -+++ b/libaudiofile/modules/MSADPCM.cpp -@@ -101,24 +101,60 @@ static const int16_t adaptationTable[] = - 768, 614, 512, 409, 307, 230, 230, 230 - }; - -+int firstBitSet(int x) -+{ -+ int position=0; -+ while (x!=0) -+ { -+ x>>=1; -+ ++position; -+ } -+ return position; -+} -+ -+#ifndef __has_builtin -+#define __has_builtin(x) 0 -+#endif -+ -+int multiplyCheckOverflow(int a, int b, int *result) -+{ -+#if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) -+ return __builtin_mul_overflow(a, b, result); -+#else -+ if (firstBitSet(a)+firstBitSet(b)>31) // int is signed, so we can't use 32 bits -+ return true; -+ *result = a * b; -+ return false; -+#endif -+} -+ -+ - // Compute a linear PCM value from the given differential coded value. - static int16_t decodeSample(ms_adpcm_state &state, -- uint8_t code, const int16_t *coefficient) -+ uint8_t code, const int16_t *coefficient, bool *ok=NULL) - { - int linearSample = (state.sample1 * coefficient[0] + - state.sample2 * coefficient[1]) >> 8; -+ int delta; - - linearSample += ((code & 0x08) ? (code - 0x10) : code) * state.delta; - - linearSample = clamp(linearSample, MIN_INT16, MAX_INT16); - -- int delta = (state.delta * adaptationTable[code]) >> 8; -+ if (multiplyCheckOverflow(state.delta, adaptationTable[code], &delta)) -+ { -+ if (ok) *ok=false; -+ _af_error(AF_BAD_COMPRESSION, "Error decoding sample"); -+ return 0; -+ } -+ delta >>= 8; - if (delta < 16) - delta = 16; - - state.delta = delta; - state.sample2 = state.sample1; - state.sample1 = linearSample; -+ if (ok) *ok=true; - - return static_cast(linearSample); - } -@@ -212,13 +248,16 @@ int MSADPCM::decodeBlock(const uint8_t *encoded, int16_t *decoded) - { - uint8_t code; - int16_t newSample; -+ bool ok; - - code = *encoded >> 4; -- newSample = decodeSample(*state[0], code, coefficient[0]); -+ newSample = decodeSample(*state[0], code, coefficient[0], &ok); -+ if (!ok) return 0; - *decoded++ = newSample; - - code = *encoded & 0x0f; -- newSample = decodeSample(*state[1], code, coefficient[1]); -+ newSample = decodeSample(*state[1], code, coefficient[1], &ok); -+ if (!ok) return 0; - *decoded++ = newSample; - - encoded++; diff --git a/gnu/packages/patches/audiofile-check-number-of-coefficients.patch b/gnu/packages/patches/audiofile-check-number-of-coefficients.patch new file mode 100644 index 0000000000..f9427cbe61 --- /dev/null +++ b/gnu/packages/patches/audiofile-check-number-of-coefficients.patch @@ -0,0 +1,30 @@ +From: Antonio Larrosa +Date: Mon, 6 Mar 2017 12:51:22 +0100 +Subject: Always check the number of coefficients + +When building the library with NDEBUG, asserts are eliminated +so it's better to always check that the number of coefficients +is inside the array range. + +This fixes the 00191-audiofile-indexoob issue in #41 +--- + libaudiofile/WAVE.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/libaudiofile/WAVE.cpp b/libaudiofile/WAVE.cpp +index 9dd8511..0fc48e8 100644 +--- a/libaudiofile/WAVE.cpp ++++ b/libaudiofile/WAVE.cpp +@@ -281,6 +281,12 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size) + + /* numCoefficients should be at least 7. */ + assert(numCoefficients >= 7 && numCoefficients <= 255); ++ if (numCoefficients < 7 || numCoefficients > 255) ++ { ++ _af_error(AF_BAD_HEADER, ++ "Bad number of coefficients"); ++ return AF_FAIL; ++ } + + m_msadpcmNumCoefficients = numCoefficients; + diff --git a/gnu/packages/patches/audiofile-division-by-zero-BlockCodec-runPull.patch b/gnu/packages/patches/audiofile-division-by-zero-BlockCodec-runPull.patch deleted file mode 100644 index e001133916..0000000000 --- a/gnu/packages/patches/audiofile-division-by-zero-BlockCodec-runPull.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Antonio Larrosa -Date: Thu, 9 Mar 2017 10:21:18 +0100 -Subject: Check for division by zero in BlockCodec::runPull - ---- - libaudiofile/modules/BlockCodec.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libaudiofile/modules/BlockCodec.cpp b/libaudiofile/modules/BlockCodec.cpp -index 4731be1..eb2fb4d 100644 ---- a/libaudiofile/modules/BlockCodec.cpp -+++ b/libaudiofile/modules/BlockCodec.cpp -@@ -47,7 +47,7 @@ void BlockCodec::runPull() - - // Read the compressed data. - ssize_t bytesRead = read(m_inChunk->buffer, m_bytesPerPacket * blockCount); -- int blocksRead = bytesRead >= 0 ? bytesRead / m_bytesPerPacket : 0; -+ int blocksRead = (bytesRead >= 0 && m_bytesPerPacket > 0) ? bytesRead / m_bytesPerPacket : 0; - - // Decompress into m_outChunk. - for (int i=0; i +Date: Thu, 9 Mar 2017 10:21:18 +0100 +Subject: Check for division by zero in BlockCodec::runPull + +--- + libaudiofile/modules/BlockCodec.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libaudiofile/modules/BlockCodec.cpp b/libaudiofile/modules/BlockCodec.cpp +index 4731be1..eb2fb4d 100644 +--- a/libaudiofile/modules/BlockCodec.cpp ++++ b/libaudiofile/modules/BlockCodec.cpp +@@ -47,7 +47,7 @@ void BlockCodec::runPull() + + // Read the compressed data. + ssize_t bytesRead = read(m_inChunk->buffer, m_bytesPerPacket * blockCount); +- int blocksRead = bytesRead >= 0 ? bytesRead / m_bytesPerPacket : 0; ++ int blocksRead = (bytesRead >= 0 && m_bytesPerPacket > 0) ? bytesRead / m_bytesPerPacket : 0; + + // Decompress into m_outChunk. + for (int i=0; i +Date: Fri, 10 Mar 2017 15:40:02 +0100 +Subject: Fix signature of multiplyCheckOverflow. It returns a bool, not an int + +--- + libaudiofile/modules/MSADPCM.cpp | 2 +- + sfcommands/sfconvert.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libaudiofile/modules/MSADPCM.cpp b/libaudiofile/modules/MSADPCM.cpp +index ef9c38c..d8c9553 100644 +--- a/libaudiofile/modules/MSADPCM.cpp ++++ b/libaudiofile/modules/MSADPCM.cpp +@@ -116,7 +116,7 @@ int firstBitSet(int x) + #define __has_builtin(x) 0 + #endif + +-int multiplyCheckOverflow(int a, int b, int *result) ++bool multiplyCheckOverflow(int a, int b, int *result) + { + #if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) + return __builtin_mul_overflow(a, b, result); +diff --git a/sfcommands/sfconvert.c b/sfcommands/sfconvert.c +index 970a3e4..367f7a5 100644 +--- a/sfcommands/sfconvert.c ++++ b/sfcommands/sfconvert.c +@@ -60,7 +60,7 @@ int firstBitSet(int x) + #define __has_builtin(x) 0 + #endif + +-int multiplyCheckOverflow(int a, int b, int *result) ++bool multiplyCheckOverflow(int a, int b, int *result) + { + #if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) + return __builtin_mul_overflow(a, b, result); diff --git a/gnu/packages/patches/audiofile-multiply-overflow.patch b/gnu/packages/patches/audiofile-multiply-overflow.patch new file mode 100644 index 0000000000..0f17140d6b --- /dev/null +++ b/gnu/packages/patches/audiofile-multiply-overflow.patch @@ -0,0 +1,66 @@ +From: Antonio Larrosa +Date: Mon, 6 Mar 2017 13:54:52 +0100 +Subject: Check for multiplication overflow in sfconvert + +Checks that a multiplication doesn't overflow when +calculating the buffer size, and if it overflows, +reduce the buffer size instead of failing. + +This fixes the 00192-audiofile-signintoverflow-sfconvert case +in #41 +--- + sfcommands/sfconvert.c | 34 ++++++++++++++++++++++++++++++++-- + 1 file changed, 32 insertions(+), 2 deletions(-) + +diff --git a/sfcommands/sfconvert.c b/sfcommands/sfconvert.c +index 80a1bc4..970a3e4 100644 +--- a/sfcommands/sfconvert.c ++++ b/sfcommands/sfconvert.c +@@ -45,6 +45,33 @@ void printusage (void); + void usageerror (void); + bool copyaudiodata (AFfilehandle infile, AFfilehandle outfile, int trackid); + ++int firstBitSet(int x) ++{ ++ int position=0; ++ while (x!=0) ++ { ++ x>>=1; ++ ++position; ++ } ++ return position; ++} ++ ++#ifndef __has_builtin ++#define __has_builtin(x) 0 ++#endif ++ ++int multiplyCheckOverflow(int a, int b, int *result) ++{ ++#if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) ++ return __builtin_mul_overflow(a, b, result); ++#else ++ if (firstBitSet(a)+firstBitSet(b)>31) // int is signed, so we can't use 32 bits ++ return true; ++ *result = a * b; ++ return false; ++#endif ++} ++ + int main (int argc, char **argv) + { + if (argc == 2) +@@ -323,8 +350,11 @@ bool copyaudiodata (AFfilehandle infile, AFfilehandle outfile, int trackid) + { + int frameSize = afGetVirtualFrameSize(infile, trackid, 1); + +- const int kBufferFrameCount = 65536; +- void *buffer = malloc(kBufferFrameCount * frameSize); ++ int kBufferFrameCount = 65536; ++ int bufferSize; ++ while (multiplyCheckOverflow(kBufferFrameCount, frameSize, &bufferSize)) ++ kBufferFrameCount /= 2; ++ void *buffer = malloc(bufferSize); + + AFframecount totalFrames = afGetFrameCount(infile, AF_DEFAULT_TRACK); + AFframecount totalFramesWritten = 0; diff --git a/gnu/packages/patches/audiofile-overflow-in-MSADPCM.patch b/gnu/packages/patches/audiofile-overflow-in-MSADPCM.patch new file mode 100644 index 0000000000..2be930b924 --- /dev/null +++ b/gnu/packages/patches/audiofile-overflow-in-MSADPCM.patch @@ -0,0 +1,116 @@ +From: Antonio Larrosa +Date: Mon, 6 Mar 2017 13:43:53 +0100 +Subject: Check for multiplication overflow in MSADPCM decodeSample + +Check for multiplication overflow (using __builtin_mul_overflow +if available) in MSADPCM.cpp decodeSample and return an empty +decoded block if an error occurs. + +This fixes the 00193-audiofile-signintoverflow-MSADPCM case of #41 +--- + libaudiofile/modules/BlockCodec.cpp | 5 ++-- + libaudiofile/modules/MSADPCM.cpp | 47 +++++++++++++++++++++++++++++++++---- + 2 files changed, 46 insertions(+), 6 deletions(-) + +diff --git a/libaudiofile/modules/BlockCodec.cpp b/libaudiofile/modules/BlockCodec.cpp +index 45925e8..4731be1 100644 +--- a/libaudiofile/modules/BlockCodec.cpp ++++ b/libaudiofile/modules/BlockCodec.cpp +@@ -52,8 +52,9 @@ void BlockCodec::runPull() + // Decompress into m_outChunk. + for (int i=0; i(m_inChunk->buffer) + i * m_bytesPerPacket, +- static_cast(m_outChunk->buffer) + i * m_framesPerPacket * m_track->f.channelCount); ++ if (decodeBlock(static_cast(m_inChunk->buffer) + i * m_bytesPerPacket, ++ static_cast(m_outChunk->buffer) + i * m_framesPerPacket * m_track->f.channelCount)==0) ++ break; + + framesRead += m_framesPerPacket; + } +diff --git a/libaudiofile/modules/MSADPCM.cpp b/libaudiofile/modules/MSADPCM.cpp +index 8ea3c85..ef9c38c 100644 +--- a/libaudiofile/modules/MSADPCM.cpp ++++ b/libaudiofile/modules/MSADPCM.cpp +@@ -101,24 +101,60 @@ static const int16_t adaptationTable[] = + 768, 614, 512, 409, 307, 230, 230, 230 + }; + ++int firstBitSet(int x) ++{ ++ int position=0; ++ while (x!=0) ++ { ++ x>>=1; ++ ++position; ++ } ++ return position; ++} ++ ++#ifndef __has_builtin ++#define __has_builtin(x) 0 ++#endif ++ ++int multiplyCheckOverflow(int a, int b, int *result) ++{ ++#if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) ++ return __builtin_mul_overflow(a, b, result); ++#else ++ if (firstBitSet(a)+firstBitSet(b)>31) // int is signed, so we can't use 32 bits ++ return true; ++ *result = a * b; ++ return false; ++#endif ++} ++ ++ + // Compute a linear PCM value from the given differential coded value. + static int16_t decodeSample(ms_adpcm_state &state, +- uint8_t code, const int16_t *coefficient) ++ uint8_t code, const int16_t *coefficient, bool *ok=NULL) + { + int linearSample = (state.sample1 * coefficient[0] + + state.sample2 * coefficient[1]) >> 8; ++ int delta; + + linearSample += ((code & 0x08) ? (code - 0x10) : code) * state.delta; + + linearSample = clamp(linearSample, MIN_INT16, MAX_INT16); + +- int delta = (state.delta * adaptationTable[code]) >> 8; ++ if (multiplyCheckOverflow(state.delta, adaptationTable[code], &delta)) ++ { ++ if (ok) *ok=false; ++ _af_error(AF_BAD_COMPRESSION, "Error decoding sample"); ++ return 0; ++ } ++ delta >>= 8; + if (delta < 16) + delta = 16; + + state.delta = delta; + state.sample2 = state.sample1; + state.sample1 = linearSample; ++ if (ok) *ok=true; + + return static_cast(linearSample); + } +@@ -212,13 +248,16 @@ int MSADPCM::decodeBlock(const uint8_t *encoded, int16_t *decoded) + { + uint8_t code; + int16_t newSample; ++ bool ok; + + code = *encoded >> 4; +- newSample = decodeSample(*state[0], code, coefficient[0]); ++ newSample = decodeSample(*state[0], code, coefficient[0], &ok); ++ if (!ok) return 0; + *decoded++ = newSample; + + code = *encoded & 0x0f; +- newSample = decodeSample(*state[1], code, coefficient[1]); ++ newSample = decodeSample(*state[1], code, coefficient[1], &ok); ++ if (!ok) return 0; + *decoded++ = newSample; + + encoded++; diff --git a/gnu/packages/patches/audiofile-signature-of-multiplyCheckOverflow.patch b/gnu/packages/patches/audiofile-signature-of-multiplyCheckOverflow.patch deleted file mode 100644 index 35627d3869..0000000000 --- a/gnu/packages/patches/audiofile-signature-of-multiplyCheckOverflow.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Antonio Larrosa -Date: Fri, 10 Mar 2017 15:40:02 +0100 -Subject: Fix signature of multiplyCheckOverflow. It returns a bool, not an int - ---- - libaudiofile/modules/MSADPCM.cpp | 2 +- - sfcommands/sfconvert.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libaudiofile/modules/MSADPCM.cpp b/libaudiofile/modules/MSADPCM.cpp -index ef9c38c..d8c9553 100644 ---- a/libaudiofile/modules/MSADPCM.cpp -+++ b/libaudiofile/modules/MSADPCM.cpp -@@ -116,7 +116,7 @@ int firstBitSet(int x) - #define __has_builtin(x) 0 - #endif - --int multiplyCheckOverflow(int a, int b, int *result) -+bool multiplyCheckOverflow(int a, int b, int *result) - { - #if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) - return __builtin_mul_overflow(a, b, result); -diff --git a/sfcommands/sfconvert.c b/sfcommands/sfconvert.c -index 970a3e4..367f7a5 100644 ---- a/sfcommands/sfconvert.c -+++ b/sfcommands/sfconvert.c -@@ -60,7 +60,7 @@ int firstBitSet(int x) - #define __has_builtin(x) 0 - #endif - --int multiplyCheckOverflow(int a, int b, int *result) -+bool multiplyCheckOverflow(int a, int b, int *result) - { - #if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) - return __builtin_mul_overflow(a, b, result); -- cgit v1.2.3 From 6f4c9ff6ec0fad24b6bd433a351613a3990aa561 Mon Sep 17 00:00:00 2001 From: Simon South Date: Sun, 1 Nov 2020 11:56:41 -0500 Subject: gnu: sdcc: Remove non-free code. * gnu/packages/sdcc.scm (sdcc)[source]: Add snippet to remove bundled non-free source code. Add patch to disable use of non-free code in build scripts and compiler and update documentation to match. * gnu/packages/patches/sdcc-disable-non-free-code.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Marius Bakke --- gnu/local.mk | 1 + .../patches/sdcc-disable-non-free-code.patch | 3643 ++++++++++++++++++++ gnu/packages/sdcc.scm | 10 +- 3 files changed, 3653 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/sdcc-disable-non-free-code.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 996b6c7afa..288784b427 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1428,6 +1428,7 @@ dist_patch_DATA = \ %D%/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch \ %D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \ %D%/packages/patches/samba-fix-fcntl-hint-detection.patch \ + %D%/packages/patches/sdcc-disable-non-free-code.patch \ %D%/packages/patches/sdl-pango-api_additions.patch \ %D%/packages/patches/sdl-pango-blit_overflow.patch \ %D%/packages/patches/sdl-pango-fillrect_crash.patch \ diff --git a/gnu/packages/patches/sdcc-disable-non-free-code.patch b/gnu/packages/patches/sdcc-disable-non-free-code.patch new file mode 100644 index 0000000000..545f0cbd69 --- /dev/null +++ b/gnu/packages/patches/sdcc-disable-non-free-code.patch @@ -0,0 +1,3643 @@ +This patch disables the use of non-free code distributed with SDCC by +removing + + - The "--disable-non-free" option to "configure" and the build logic + it controls; + + - All references to the "device/non-free" source directory and the + corresponding "non-free" installation directory; and + + - The "--use-non-free" and "--no-warn-non-free" compiler options and + references to them in build scripts and compiler output. + +It also updates SDCC's documentation to reflect these changes and to +remove instructions that encourage the use of SDCC with non-free +software. + +diff --git a/Makefile.common.in b/Makefile.common.in +index 4c75cfa..9fa306d 100644 +--- a/Makefile.common.in ++++ b/Makefile.common.in +@@ -65,7 +65,6 @@ OPT_DISABLE_PACKIHX = @OPT_DISABLE_PACKIHX@ + OPT_DISABLE_SDBINUTILS = @OPT_DISABLE_SDBINUTILS@ + OPT_DISABLE_SDCPP = @OPT_DISABLE_SDCPP@ + OPT_DISABLE_UCSIM = @OPT_DISABLE_UCSIM@ +-OPT_DISABLE_NON_FREE = @OPT_DISABLE_NON_FREE@ + + SLIB = $(top_builddir)/support/util + +diff --git a/Makefile.in b/Makefile.in +index aac442e..dd73e40 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -82,9 +82,6 @@ endif + ifeq ($(OPT_DISABLE_DEVICE_LIB), 0) + TARGETS += sdcc-device-lib + PKGS += device/lib +-ifeq ($(OPT_DISABLE_NON_FREE), 0) +-PKGS += device/non-free/lib +-endif + endif + + ifeq ($(OPT_DISABLE_PACKIHX), 0) +@@ -105,9 +102,6 @@ endif + TARGETS += sdcc-libs sdcc-cc sdcc-device-inc sdcc-as sdcc-ld sdcc-scripts + + PKGS += $(SDCC_LIBS) src device/include +-ifeq ($(OPT_DISABLE_NON_FREE), 0) +-PKGS += device/non-free/include +-endif + PKGS += $(SDCC_AS) sdas/linksrc $(SDCC_LIBRARIAN) $(SDCC_SCRIPTS) + + PORTS = $(shell cat ports.build) +@@ -156,21 +150,12 @@ sdcc-sdbinutils: + + sdcc-device-inc: + $(MAKE) -C device/include +-ifeq ($(OPT_DISABLE_NON_FREE), 0) +- $(MAKE) -C device/non-free/include +-endif + + sdcc-device-lib: sdcc-cc sdcc-as sdcc-ld $(SDCC_BINUTILS) + $(MAKE) -C device/lib +-ifeq ($(OPT_DISABLE_NON_FREE), 0) +- $(MAKE) -C device/non-free/lib +-endif + + sdcc-device-tini: + $(MAKE) -C device/include +-ifeq ($(OPT_DISABLE_NON_FREE), 0) +- $(MAKE) -C device/non-free/include +-endif + $(MAKE) -C device/lib model-ds390 model-ds400 + + # doc depends on latex and latex2html +diff --git a/configure b/configure +index 42b1c7d..00ecb51 100755 +--- a/configure ++++ b/configure +@@ -632,7 +632,6 @@ LATEX + LATEX2HTML + LYX + OPT_ENABLE_DOC +-OPT_DISABLE_NON_FREE + OPT_DISABLE_SDBINUTILS + OPT_DISABLE_SDCDB + OPT_DISABLE_SDCPP +@@ -654,10 +653,7 @@ OPT_DISABLE_R2K + OPT_DISABLE_Z180 + OPT_DISABLE_Z80 + OPT_DISABLE_MCS51 +-non_free_lib_dir_suffix + lib_dir_suffix +-non_free_include_dir_suffix +-non_free_inclib_dir_suffix + include_dir_suffix + inclib_dir_suffix + LIB_TYPE +@@ -771,7 +767,6 @@ enable_packihx + enable_sdcpp + enable_sdcdb + enable_sdbinutils +-enable_non_free + enable_doc + enable_libgc + ' +@@ -792,10 +787,7 @@ sdccconf_h_dir_separator + LIB_TYPE + inclib_dir_suffix + include_dir_suffix +-non_free_inclib_dir_suffix +-non_free_include_dir_suffix + lib_dir_suffix +-non_free_lib_dir_suffix + docdir' + ac_subdirs_all='support/cpp + support/packihx +@@ -803,9 +795,7 @@ sim/ucsim + debugger/mcs51 + support/sdbinutils + device/lib/pic14 +-device/non-free/lib/pic14 +-device/lib/pic16 +-device/non-free/lib/pic16' ++device/lib/pic16' + + # Initialize some variables set by options. + ac_init_help= +@@ -1452,7 +1442,6 @@ Optional Features: + --disable-sdcpp Disables building sdcpp + --disable-sdcdb Disables building sdcdb + --disable-sdbinutils Disables configuring and building of sdbinutils +- --disable-non-free Disables non-free runtime library parts + --enable-doc Enables building the documentation + --enable-libgc Use the Bohem memory allocator. Lower runtime + footprint. +@@ -1481,16 +1470,8 @@ Some influential environment variables: + appended to datadir to define SDCC's include/lib directory + include_dir_suffix + appended to datadir to define SDCC's include directory +- non_free_inclib_dir_suffix +- appended to datadir to define SDCC's non-free include/lib +- directory +- non_free_include_dir_suffix +- appended to datadir to define SDCC's non-free include directory + lib_dir_suffix + appended to datadir to define SDCC's library root directory +- non_free_lib_dir_suffix +- appended to datadir to define SDCC's non-free library root +- directory + docdir documentation installation directory + + Use these variables to override the choices made by `configure' or to help +@@ -7236,19 +7217,6 @@ if test "${include_dir_suffix}" = ""; then + include_dir_suffix="${inclib_dir_suffix}/include" + fi + +- +-if test "${non_free_inclib_dir_suffix}" = ""; then +- non_free_inclib_dir_suffix="sdcc/non-free" +-fi +- +-# non_free_include_dir_suffix: +-# *nix default: "sdcc/non-free/include" +- +- +-if test "${non_free_include_dir_suffix}" = ""; then +- non_free_include_dir_suffix="${non_free_inclib_dir_suffix}/include" +-fi +- + # lib_dir_suffix: + # *nix default: "sdcc/lib" + +@@ -7256,13 +7224,6 @@ if test "${lib_dir_suffix}" = ""; then + lib_dir_suffix="${inclib_dir_suffix}/lib" + fi + +-# non_free_lib_dir_suffix: +-# *nix default: "sdcc/non-free/lib" +- +-if test "${non_free_lib_dir_suffix}" = ""; then +- non_free_lib_dir_suffix="${non_free_inclib_dir_suffix}/lib" +-fi +- + # docdir: + # *nix default: "${datadir}/sdcc/doc" + +@@ -7429,24 +7390,6 @@ cat >>confdefs.h <<_ACEOF + #define INCLUDE_DIR_SUFFIX DIR_SEPARATOR_STRING "${norm_inc_dir_suffix}" + _ACEOF + +-norm_non_free_inc_dir_suffix=${non_free_include_dir_suffix} +-case ":$norm_non_free_inc_dir_suffix:" in +- ::) norm_non_free_inc_dir_suffix='.' ;; +- :*[\\/]:) norm_non_free_inc_dir_suffix=`echo "$norm_non_free_inc_dir_suffix" | sed 's,[\\/]*$,,'` ;; +- :*:) ;; +-esac +-case $sdccconf_h_dir_separator in +- +- *\\*) norm_non_free_inc_dir_suffix=`echo "$norm_non_free_inc_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g +- s,^[\\/],\\\\\\\\,'` ;; +- +- *) norm_non_free_inc_dir_suffix=`echo "$norm_non_free_inc_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +-esac +- +-cat >>confdefs.h <<_ACEOF +-#define NON_FREE_INCLUDE_DIR_SUFFIX DIR_SEPARATOR_STRING "${norm_non_free_inc_dir_suffix}" +-_ACEOF +- + + norm_lib_dir_suffix=${lib_dir_suffix} + case ":$norm_lib_dir_suffix:" in +@@ -7466,24 +7409,6 @@ cat >>confdefs.h <<_ACEOF + #define LIB_DIR_SUFFIX DIR_SEPARATOR_STRING "${norm_lib_dir_suffix}" + _ACEOF + +-norm_non_free_lib_dir_suffix=${non_free_lib_dir_suffix} +-case ":$norm_non_free_lib_dir_suffix:" in +- ::) norm_non_free_lib_dir_suffix='.' ;; +- :*[\\/]:) norm_non_free_lib_dir_suffix=`echo "$norm_non_free_lib_dir_suffix" | sed 's,[\\/]*$,,'` ;; +- :*:) ;; +-esac +-case $sdccconf_h_dir_separator in +- +- *\\*) norm_non_free_lib_dir_suffix=`echo "$norm_non_free_lib_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g +- s,^[\\/],\\\\\\\\,'` ;; +- +- *) norm_non_free_lib_dir_suffix=`echo "$norm_non_free_lib_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +-esac +- +-cat >>confdefs.h <<_ACEOF +-#define NON_FREE_LIB_DIR_SUFFIX DIR_SEPARATOR_STRING "${norm_non_free_lib_dir_suffix}" +-_ACEOF +- + + # relative paths + for _lcl_i in expanded_bindir:expanded_datadir:bin2data_dir; do +@@ -8411,28 +8336,6 @@ _ACEOF + + + +- # Check whether --enable-non-free was given. +-if test "${enable_non_free+set}" = set; then : +- enableval=$enable_non_free; +-fi +- +- +- arg1=`echo non-free | sed s/-/_/` +- +- if test "`eval echo \\$enable_$arg1`" = "no"; then +- OPT_DISABLE_NON_FREE=1 +- else +- OPT_DISABLE_NON_FREE=0 +- fi +- +- +-cat >>confdefs.h <<_ACEOF +-#define OPT_DISABLE_NON_FREE $OPT_DISABLE_NON_FREE +-_ACEOF +- +- +- +- + + # Check whether --enable-doc was given. + if test "${enable_doc+set}" = set; then : +@@ -8827,20 +8730,12 @@ if test $OPT_DISABLE_PIC14 = 0; then + + test $OPT_DISABLE_DEVICE_LIB = 0 && subdirs="$subdirs device/lib/pic14" + +-fi +-if test $OPT_DISABLE_PIC14 = 0 && test $OPT_DISABLE_NON_FREE = 0; then +- test $OPT_DISABLE_DEVICE_LIB = 0 && subdirs="$subdirs device/non-free/lib/pic14" +- + fi + if test $OPT_DISABLE_PIC16 = 0; then + ac_config_files="$ac_config_files src/pic16/Makefile" + + test $OPT_DISABLE_DEVICE_LIB = 0 && subdirs="$subdirs device/lib/pic16" + +-fi +-if test $OPT_DISABLE_PIC16 = 0 && test $OPT_DISABLE_NON_FREE = 0; then +- test $OPT_DISABLE_DEVICE_LIB = 0 && subdirs="$subdirs device/non-free/lib/pic16" +- + fi + + if test $OPT_DISABLE_Z80 = 0 || test $OPT_DISABLE_Z180 = 0 || test $OPT_DISABLE_R2K = 0 || test $OPT_DISABLE_R3KA = 0 || test $OPT_DISABLE_GBZ80 = 0 || test $OPT_DISABLE_TLCS90 = 0; then +@@ -8885,15 +8780,9 @@ fi + + test $OPT_DISABLE_DEVICE_LIB = 0 && ac_config_files="$ac_config_files device/lib/Makefile" + +-test $OPT_DISABLE_DEVICE_LIB = 0 && test $OPT_DISABLE_NON_FREE = 0 && ac_config_files="$ac_config_files device/non-free/lib/Makefile" +- + + ac_config_files="$ac_config_files main.mk:main_in.mk src/Makefile device/include/Makefile sdas/linksrc/Makefile support/librarian/Makefile support/makebin/Makefile support/regression/Makefile support/valdiag/Makefile support/scripts/Makefile support/regression/ports/host/spec.mk:support/regression/ports/host/spec.mk.in Makefile Makefile.common:Makefile.common.in" + +-if test $OPT_DISABLE_NON_FREE = 0; then +- ac_config_files="$ac_config_files device/non-free/include/Makefile" +- +-fi + cat >confcache <<\_ACEOF + # This file is a shell script that caches the results of configure + # tests run on this system so they can be shared between configure +@@ -9621,7 +9510,6 @@ do + "sdas/asstm8/Makefile") CONFIG_FILES="$CONFIG_FILES sdas/asstm8/Makefile" ;; + "device/lib/stm8/Makefile") CONFIG_FILES="$CONFIG_FILES device/lib/stm8/Makefile" ;; + "device/lib/Makefile") CONFIG_FILES="$CONFIG_FILES device/lib/Makefile" ;; +- "device/non-free/lib/Makefile") CONFIG_FILES="$CONFIG_FILES device/non-free/lib/Makefile" ;; + "main.mk") CONFIG_FILES="$CONFIG_FILES main.mk:main_in.mk" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "device/include/Makefile") CONFIG_FILES="$CONFIG_FILES device/include/Makefile" ;; +@@ -9634,7 +9522,6 @@ do + "support/regression/ports/host/spec.mk") CONFIG_FILES="$CONFIG_FILES support/regression/ports/host/spec.mk:support/regression/ports/host/spec.mk.in" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "Makefile.common") CONFIG_FILES="$CONFIG_FILES Makefile.common:Makefile.common.in" ;; +- "device/non-free/include/Makefile") CONFIG_FILES="$CONFIG_FILES device/non-free/include/Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +@@ -10443,54 +10330,6 @@ esac + incPath3=`echo "$incPath3" | sed 's,\\\\\\\\,\\\\,g'` + + +-nonFreeIncPath1=`echo "/${prefix2data_dir}/${norm_non_free_inc_dir_suffix}" | sed 's,/\./,/,g'` +-case ":$nonFreeIncPath1:" in +- ::) nonFreeIncPath1='.' ;; +- :*[\\/]:) nonFreeIncPath1=`echo "$nonFreeIncPath1" | sed 's,[\\/]*$,,'` ;; +- :*:) ;; +-esac +-case $dirch in +- +- *\\*) nonFreeIncPath1=`echo "$nonFreeIncPath1" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g +- s,^[\\/],\\\\\\\\,'` ;; +- +- *) nonFreeIncPath1=`echo "$nonFreeIncPath1" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +-esac +-nonFreeIncPath1=`echo "$nonFreeIncPath1" | sed 's,\\\\\\\\,\\\\,g'` +- +- +-nonFreeIncPath2=`echo "/${bin2data_dir}/${norm_non_free_inc_dir_suffix}" | sed 's,/\./,/,g'` +-case ":$nonFreeIncPath2:" in +- ::) nonFreeIncPath2='.' ;; +- :*[\\/]:) nonFreeIncPath2=`echo "$nonFreeIncPath2" | sed 's,[\\/]*$,,'` ;; +- :*:) ;; +-esac +-case $dirch in +- +- *\\*) nonFreeIncPath2=`echo "$nonFreeIncPath2" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g +- s,^[\\/],\\\\\\\\,'` ;; +- +- *) nonFreeIncPath2=`echo "$nonFreeIncPath2" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +-esac +-nonFreeIncPath2=`echo "$nonFreeIncPath2" | sed 's,\\\\\\\\,\\\\,g'` +- +- +-nonFreeIncPath3=`echo "${expanded_datadir}/${norm_non_free_inc_dir_suffix}" | sed 's,/\./,/,g'` +-case ":$nonFreeIncPath3:" in +- ::) nonFreeIncPath3='.' ;; +- :*[\\/]:) nonFreeIncPath3=`echo "$nonFreeIncPath3" | sed 's,[\\/]*$,,'` ;; +- :*:) ;; +-esac +-case $dirch in +- +- *\\*) nonFreeIncPath3=`echo "$nonFreeIncPath3" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g +- s,^[\\/],\\\\\\\\,'` ;; +- +- *) nonFreeIncPath3=`echo "$nonFreeIncPath3" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +-esac +-nonFreeIncPath3=`echo "$nonFreeIncPath3" | sed 's,\\\\\\\\,\\\\,g'` +- +- + + libPath1=`echo "/${prefix2data_dir}/${norm_lib_dir_suffix}" | sed 's,/\./,/,g'` + case ":$libPath1:" in +@@ -10540,54 +10379,6 @@ esac + libPath3=`echo "$libPath3" | sed 's,\\\\\\\\,\\\\,g'` + + +-nonFreeLibPath1=`echo "/${prefix2data_dir}/${norm_non_free_lib_dir_suffix}" | sed 's,/\./,/,g'` +-case ":$nonFreeLibPath1:" in +- ::) nonFreeLibPath1='.' ;; +- :*[\\/]:) nonFreeLibPath1=`echo "$nonFreeLibPath1" | sed 's,[\\/]*$,,'` ;; +- :*:) ;; +-esac +-case $dirch in +- +- *\\*) nonFreeLibPath1=`echo "$nonFreeLibPath1" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g +- s,^[\\/],\\\\\\\\,'` ;; +- +- *) nonFreeLibPath1=`echo "$nonFreeLibPath1" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +-esac +-nonFreeLibPath1=`echo "$nonFreeLibPath1" | sed 's,\\\\\\\\,\\\\,g'` +- +- +-nonFreeLibPath2=`echo "/${bin2data_dir}/${norm_non_free_lib_dir_suffix}" | sed 's,/\./,/,g'` +-case ":$nonFreeLibPath2:" in +- ::) nonFreeLibPath2='.' ;; +- :*[\\/]:) nonFreeLibPath2=`echo "$nonFreeLibPath2" | sed 's,[\\/]*$,,'` ;; +- :*:) ;; +-esac +-case $dirch in +- +- *\\*) nonFreeLibPath2=`echo "$nonFreeLibPath2" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g +- s,^[\\/],\\\\\\\\,'` ;; +- +- *) nonFreeLibPath2=`echo "$nonFreeLibPath2" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +-esac +-nonFreeLibPath2=`echo "$nonFreeLibPath2" | sed 's,\\\\\\\\,\\\\,g'` +- +- +-nonFreeLibPath3=`echo "${expanded_datadir}/${norm_non_free_lib_dir_suffix}" | sed 's,/\./,/,g'` +-case ":$nonFreeLibPath3:" in +- ::) nonFreeLibPath3='.' ;; +- :*[\\/]:) nonFreeLibPath3=`echo "$nonFreeLibPath3" | sed 's,[\\/]*$,,'` ;; +- :*:) ;; +-esac +-case $dirch in +- +- *\\*) nonFreeLibPath3=`echo "$nonFreeLibPath3" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g +- s,^[\\/],\\\\\\\\,'` ;; +- +- *) nonFreeLibPath3=`echo "$nonFreeLibPath3" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +-esac +-nonFreeLibPath3=`echo "$nonFreeLibPath3" | sed 's,\\\\\\\\,\\\\,g'` +- +- + { $as_echo "$as_me:${as_lineno-$LINENO}: result: + sdcc ${VERSION} is now configured for + +@@ -10618,7 +10409,6 @@ sdcc ${VERSION} is now configured for + tlcs90 ${enable_tlcs90_port} + stm8 ${enable_stm8_port} + +- Disable non-free lib: ${OPT_DISABLE_NON_FREE} + Disable packihx: ${OPT_DISABLE_PACKIHX} + Disable ucsim: ${OPT_DISABLE_UCSIM} + Disable device lib: ${OPT_DISABLE_DEVICE_LIB} +@@ -10633,9 +10423,6 @@ sdcc ${VERSION} is now configured for + include/library files: ${datadir}/${inclib_dir_suffix} + include files: ${datadir}/${include_dir_suffix} + library files: ${datadir}/${lib_dir_suffix} +- non-free files: ${datadir}/${non_free_inclib_dir_suffix} +- non-free include files: ${datadir}/${non_free_include_dir_suffix} +- non-free library files: ${datadir}/${non_free_lib_dir_suffix} + documentation: ${docdir} + + prefix: ${prefix} +@@ -10647,15 +10434,9 @@ sdcc ${VERSION} is now configured for + include files: ${incPath1} + path(argv[0])${incPath2} + ${incPath3} +- ${nonFreeIncPath1} +- path(argv[0])${nonFreeIncPath2} +- ${nonFreeIncPath3} + library files: \$SDCC_HOME${libPath1}${dirch} + path(argv[0])${libPath2}${dirch} + ${libPath3}${dirch} +- \$SDCC_HOME${nonFreeLibPath1}${dirch} +- path(argv[0])${nonFreeLibPath2}${dirch} +- ${nonFreeLibPath3}${dirch} + " >&5 + $as_echo " + sdcc ${VERSION} is now configured for +@@ -10687,7 +10468,6 @@ sdcc ${VERSION} is now configured for + tlcs90 ${enable_tlcs90_port} + stm8 ${enable_stm8_port} + +- Disable non-free lib: ${OPT_DISABLE_NON_FREE} + Disable packihx: ${OPT_DISABLE_PACKIHX} + Disable ucsim: ${OPT_DISABLE_UCSIM} + Disable device lib: ${OPT_DISABLE_DEVICE_LIB} +@@ -10702,9 +10482,6 @@ sdcc ${VERSION} is now configured for + include/library files: ${datadir}/${inclib_dir_suffix} + include files: ${datadir}/${include_dir_suffix} + library files: ${datadir}/${lib_dir_suffix} +- non-free files: ${datadir}/${non_free_inclib_dir_suffix} +- non-free include files: ${datadir}/${non_free_include_dir_suffix} +- non-free library files: ${datadir}/${non_free_lib_dir_suffix} + documentation: ${docdir} + + prefix: ${prefix} +@@ -10716,14 +10493,8 @@ sdcc ${VERSION} is now configured for + include files: ${incPath1} + path(argv[0])${incPath2} + ${incPath3} +- ${nonFreeIncPath1} +- path(argv[0])${nonFreeIncPath2} +- ${nonFreeIncPath3} + library files: \$SDCC_HOME${libPath1}${dirch} + path(argv[0])${libPath2}${dirch} + ${libPath3}${dirch} +- \$SDCC_HOME${nonFreeLibPath1}${dirch} +- path(argv[0])${nonFreeLibPath2}${dirch} +- ${nonFreeLibPath3}${dirch} + " >&6; } + # End of configure/configure.in +diff --git a/configure.ac b/configure.ac +index 3a16e42..bfba129 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -588,19 +588,6 @@ if test "${include_dir_suffix}" = ""; then + include_dir_suffix="${inclib_dir_suffix}/include" + fi + +-AC_ARG_VAR([non_free_inclib_dir_suffix], [appended to datadir to define SDCC's non-free include/lib directory]) +-if test "${non_free_inclib_dir_suffix}" = ""; then +- non_free_inclib_dir_suffix="sdcc/non-free" +-fi +- +-# non_free_include_dir_suffix: +-# *nix default: "sdcc/non-free/include" +- +-AC_ARG_VAR([non_free_include_dir_suffix], [appended to datadir to define SDCC's non-free include directory]) +-if test "${non_free_include_dir_suffix}" = ""; then +- non_free_include_dir_suffix="${non_free_inclib_dir_suffix}/include" +-fi +- + # lib_dir_suffix: + # *nix default: "sdcc/lib" + AC_ARG_VAR([lib_dir_suffix], [appended to datadir to define SDCC's library root directory]) +@@ -608,13 +595,6 @@ if test "${lib_dir_suffix}" = ""; then + lib_dir_suffix="${inclib_dir_suffix}/lib" + fi + +-# non_free_lib_dir_suffix: +-# *nix default: "sdcc/non-free/lib" +-AC_ARG_VAR([non_free_lib_dir_suffix], [appended to datadir to define SDCC's non-free library root directory]) +-if test "${non_free_lib_dir_suffix}" = ""; then +- non_free_lib_dir_suffix="${non_free_inclib_dir_suffix}/lib" +-fi +- + # docdir: + # *nix default: "${datadir}/sdcc/doc" + AC_ARG_VAR([docdir], [documentation installation directory]) +@@ -655,19 +635,11 @@ norm_inc_dir_suffix=${include_dir_suffix} + adl_NORMALIZE_PATH([norm_inc_dir_suffix], [$sdccconf_h_dir_separator]) + AC_DEFINE_UNQUOTED(INCLUDE_DIR_SUFFIX, + DIR_SEPARATOR_STRING "${norm_inc_dir_suffix}", [XXX]) +-norm_non_free_inc_dir_suffix=${non_free_include_dir_suffix} +-adl_NORMALIZE_PATH([norm_non_free_inc_dir_suffix], [$sdccconf_h_dir_separator]) +-AC_DEFINE_UNQUOTED(NON_FREE_INCLUDE_DIR_SUFFIX, +- DIR_SEPARATOR_STRING "${norm_non_free_inc_dir_suffix}", [XXX]) + + norm_lib_dir_suffix=${lib_dir_suffix} + adl_NORMALIZE_PATH([norm_lib_dir_suffix], [$sdccconf_h_dir_separator]) + AC_DEFINE_UNQUOTED(LIB_DIR_SUFFIX, + DIR_SEPARATOR_STRING "${norm_lib_dir_suffix}", [XXX]) +-norm_non_free_lib_dir_suffix=${non_free_lib_dir_suffix} +-adl_NORMALIZE_PATH([norm_non_free_lib_dir_suffix], [$sdccconf_h_dir_separator]) +-AC_DEFINE_UNQUOTED(NON_FREE_LIB_DIR_SUFFIX, +- DIR_SEPARATOR_STRING "${norm_non_free_lib_dir_suffix}", [XXX]) + + # relative paths + adl_COMPUTE_RELATIVE_PATHS([expanded_bindir:expanded_datadir:bin2data_dir]) +@@ -836,7 +808,6 @@ AC_DO_DISABLER(packihx, PACKIHX, [Disables building packihx]) + AC_DO_DISABLER(sdcpp, SDCPP, [Disables building sdcpp]) + AC_DO_DISABLER(sdcdb, SDCDB, [Disables building sdcdb]) + AC_DO_DISABLER(sdbinutils, SDBINUTILS, [Disables configuring and building of sdbinutils]) +-AC_DO_DISABLER(non-free, NON_FREE, [Disables non-free runtime library parts]) + + AC_DO_ENABLER(doc, DOC, [Enables building the documentation]) + AC_CHECK_PROG([LYX], [lyx], [lyx], [:]) +@@ -907,16 +878,10 @@ if test $OPT_DISABLE_PIC14 = 0; then + AC_CONFIG_FILES(src/pic14/Makefile) + test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_SUBDIRS(device/lib/pic14) + fi +-if test $OPT_DISABLE_PIC14 = 0 && test $OPT_DISABLE_NON_FREE = 0; then +- test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_SUBDIRS(device/non-free/lib/pic14) +-fi + if test $OPT_DISABLE_PIC16 = 0; then + AC_CONFIG_FILES(src/pic16/Makefile) + test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_SUBDIRS(device/lib/pic16) + fi +-if test $OPT_DISABLE_PIC16 = 0 && test $OPT_DISABLE_NON_FREE = 0; then +- test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_SUBDIRS(device/non-free/lib/pic16) +-fi + + if test $OPT_DISABLE_Z80 = 0 || test $OPT_DISABLE_Z180 = 0 || test $OPT_DISABLE_R2K = 0 || test $OPT_DISABLE_R3KA = 0 || test $OPT_DISABLE_GBZ80 = 0 || test $OPT_DISABLE_TLCS90 = 0; then + AC_CONFIG_FILES([src/z80/Makefile]) +@@ -951,7 +916,6 @@ if test $OPT_DISABLE_STM8 = 0; then + fi + + test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_FILES([device/lib/Makefile]) +-test $OPT_DISABLE_DEVICE_LIB = 0 && test $OPT_DISABLE_NON_FREE = 0 && AC_CONFIG_FILES([device/non-free/lib/Makefile]) + + AC_CONFIG_FILES([main.mk:main_in.mk + src/Makefile +@@ -966,9 +930,6 @@ support/regression/ports/host/spec.mk:support/regression/ports/host/spec.mk.in + Makefile + Makefile.common:Makefile.common.in + ]) +-if test $OPT_DISABLE_NON_FREE = 0; then +- AC_CONFIG_FILES([device/non-free/include/Makefile]) +-fi + AC_OUTPUT + + # I found no better place +@@ -986,16 +947,10 @@ adl_NORMALIZE_PATH_MSG(/${prefix2bin_dir}, [binPath], [ + adl_NORMALIZE_PATH_MSG(/${prefix2data_dir}/${norm_inc_dir_suffix}, [incPath1], [$dirch]) + adl_NORMALIZE_PATH_MSG(/${bin2data_dir}/${norm_inc_dir_suffix}, [incPath2], [$dirch]) + adl_NORMALIZE_PATH_MSG(${expanded_datadir}/${norm_inc_dir_suffix}, [incPath3], [$dirch]) +-adl_NORMALIZE_PATH_MSG(/${prefix2data_dir}/${norm_non_free_inc_dir_suffix}, [nonFreeIncPath1], [$dirch]) +-adl_NORMALIZE_PATH_MSG(/${bin2data_dir}/${norm_non_free_inc_dir_suffix}, [nonFreeIncPath2], [$dirch]) +-adl_NORMALIZE_PATH_MSG(${expanded_datadir}/${norm_non_free_inc_dir_suffix}, [nonFreeIncPath3], [$dirch]) + + adl_NORMALIZE_PATH_MSG(/${prefix2data_dir}/${norm_lib_dir_suffix}, [libPath1], [$dirch]) + adl_NORMALIZE_PATH_MSG(/${bin2data_dir}/${norm_lib_dir_suffix}, [libPath2], [$dirch]) + adl_NORMALIZE_PATH_MSG(${expanded_datadir}/${norm_lib_dir_suffix}, [libPath3], [$dirch]) +-adl_NORMALIZE_PATH_MSG(/${prefix2data_dir}/${norm_non_free_lib_dir_suffix}, [nonFreeLibPath1], [$dirch]) +-adl_NORMALIZE_PATH_MSG(/${bin2data_dir}/${norm_non_free_lib_dir_suffix}, [nonFreeLibPath2], [$dirch]) +-adl_NORMALIZE_PATH_MSG(${expanded_datadir}/${norm_non_free_lib_dir_suffix}, [nonFreeLibPath3], [$dirch]) + + AC_MSG_RESULT([ + sdcc ${VERSION} is now configured for +@@ -1027,7 +982,6 @@ sdcc ${VERSION} is now configured for + tlcs90 ${enable_tlcs90_port} + stm8 ${enable_stm8_port} + +- Disable non-free lib: ${OPT_DISABLE_NON_FREE} + Disable packihx: ${OPT_DISABLE_PACKIHX} + Disable ucsim: ${OPT_DISABLE_UCSIM} + Disable device lib: ${OPT_DISABLE_DEVICE_LIB} +@@ -1042,9 +996,6 @@ sdcc ${VERSION} is now configured for + include/library files: ${datadir}/${inclib_dir_suffix} + include files: ${datadir}/${include_dir_suffix} + library files: ${datadir}/${lib_dir_suffix} +- non-free files: ${datadir}/${non_free_inclib_dir_suffix} +- non-free include files: ${datadir}/${non_free_include_dir_suffix} +- non-free library files: ${datadir}/${non_free_lib_dir_suffix} + documentation: ${docdir} + + prefix: ${prefix} +@@ -1056,14 +1007,8 @@ sdcc ${VERSION} is now configured for + include files: ${incPath1} + path(argv[[0]])${incPath2} + ${incPath3} +- ${nonFreeIncPath1} +- path(argv[[0]])${nonFreeIncPath2} +- ${nonFreeIncPath3} + library files: \$SDCC_HOME${libPath1}${dirch} + path(argv[[0]])${libPath2}${dirch} + ${libPath3}${dirch} +- \$SDCC_HOME${nonFreeLibPath1}${dirch} +- path(argv[[0]])${nonFreeLibPath2}${dirch} +- ${nonFreeLibPath3}${dirch} + ]) + # End of configure/configure.in +diff --git a/device/lib/pic14/Makefile.common b/device/lib/pic14/Makefile.common +index e456838..8179255 100644 +--- a/device/lib/pic14/Makefile.common ++++ b/device/lib/pic14/Makefile.common +@@ -3,11 +3,10 @@ EARCH ?= @EARCH@ + + AM_CPPFLAGS = + AM_CPPFLAGS += -I. +-AM_CPPFLAGS += -I$(top_srcdir)/../../include/pic14 -I$(top_srcdir)/../../non-free/include/pic14 ++AM_CPPFLAGS += -I$(top_srcdir)/../../include/pic14 + + AM_CFLAGS = + AM_CFLAGS += -mpic14 -p$(ARCH) +-AM_CFLAGS += --no-warn-non-free + AM_CFLAGS += --std-c99 + #AM_CFLAGS += --asm="$(CCAS)" + ##AM_CFLAGS += -Wa,-q +@@ -29,7 +28,7 @@ AM_CFLAGS += --i-code-in-asm + + AM_CCASFLAGS = + AM_CCASFLAGS += -p$(ARCH) +-AM_CCASFLAGS += -I$(top_srcdir)/../../include/pic14 -I$(top_srcdir)/../../non-free/include/pic14 ++AM_CCASFLAGS += -I$(top_srcdir)/../../include/pic14 + AM_CCASFLAGS += -I$(srcdir) + + clean-local: +diff --git a/device/lib/pic14/Makefile.in b/device/lib/pic14/Makefile.in +index f1c9940..de47dbe 100644 +--- a/device/lib/pic14/Makefile.in ++++ b/device/lib/pic14/Makefile.in +@@ -297,15 +297,13 @@ top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + SUBDIRS = libm libsdcc/regular $(am__append_1) $(am__append_2) +-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 ++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 + #AM_CFLAGS += --asm="$(CCAS)" + + #AM_CFLAGS += --debug-ralloc + #AM_CFLAGS += --debug-xtra + #AM_CFLAGS += --pcode-verbose +-AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ +- --i-code-in-asm ++AM_CFLAGS = -mpic14 -p$(ARCH) --std-c99 --i-code-in-asm + + #AM_CFLAGS += --no-pcode-opt + +@@ -316,8 +314,7 @@ AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 -I$(srcdir) ++AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 -I$(srcdir) + DISTCLEANFILES = a.cod a.hex ./.checkdevices/* + all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive +diff --git a/device/lib/pic14/libm/Makefile.in b/device/lib/pic14/libm/Makefile.in +index fd9fd2e..4a7d250 100644 +--- a/device/lib/pic14/libm/Makefile.in ++++ b/device/lib/pic14/libm/Makefile.in +@@ -299,15 +299,13 @@ libm_a_SOURCES = acosf.c asincosf.c asinf.c atan2f.c atanf.c ceilf.c \ + libm_a_CFLAGS = -p$(ARCH) $(AM_CFLAGS) + libme_a_SOURCES = $(libm_a_SOURCES) + libme_a_CFLAGS = -p$(EARCH) $(AM_CFLAGS) $(am__append_2) +-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 ++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 + #AM_CFLAGS += --asm="$(CCAS)" + + #AM_CFLAGS += --debug-ralloc + #AM_CFLAGS += --debug-xtra + #AM_CFLAGS += --pcode-verbose +-AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ +- --i-code-in-asm ++AM_CFLAGS = -mpic14 -p$(ARCH) --std-c99 --i-code-in-asm + + #AM_CFLAGS += --no-pcode-opt + +@@ -318,8 +316,7 @@ AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 -I$(srcdir) ++AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 -I$(srcdir) + all: all-am + + .SUFFIXES: +diff --git a/device/lib/pic14/libsdcc/enhanced-no-xinst/Makefile.in b/device/lib/pic14/libsdcc/enhanced-no-xinst/Makefile.in +index e946da7..bced941 100644 +--- a/device/lib/pic14/libsdcc/enhanced-no-xinst/Makefile.in ++++ b/device/lib/pic14/libsdcc/enhanced-no-xinst/Makefile.in +@@ -311,15 +311,13 @@ libsdcce_a_SOURCES = ../_divschar.c ../_divsint.c ../_divslong.c \ + _gptrput3.S _gptrput4.S macros.inc + libsdcce_a_CFLAGS = -p$(EARCH) $(AM_CFLAGS) + CLEANFILES = ../*.asm ../*.lst +-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 ++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 + #AM_CFLAGS += --asm="$(CCAS)" + + #AM_CFLAGS += --debug-ralloc + #AM_CFLAGS += --debug-xtra + #AM_CFLAGS += --pcode-verbose +-AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ +- --i-code-in-asm ++AM_CFLAGS = -mpic14 -p$(ARCH) --std-c99 --i-code-in-asm + + #AM_CFLAGS += --no-pcode-opt + +@@ -330,8 +328,7 @@ AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 -I$(srcdir) ++AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 -I$(srcdir) + all: all-am + + .SUFFIXES: +diff --git a/device/lib/pic14/libsdcc/enhanced/Makefile.in b/device/lib/pic14/libsdcc/enhanced/Makefile.in +index 7fe1e25..854f87f 100644 +--- a/device/lib/pic14/libsdcc/enhanced/Makefile.in ++++ b/device/lib/pic14/libsdcc/enhanced/Makefile.in +@@ -311,15 +311,13 @@ libsdcce_a_SOURCES = ../_divschar.c ../_divsint.c ../_divslong.c \ + _gptrput3.S _gptrput4.S macros.inc + libsdcce_a_CFLAGS = -p$(EARCH) $(AM_CFLAGS) + CLEANFILES = ../*.asm ../*.lst +-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 ++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 + #AM_CFLAGS += --asm="$(CCAS)" + + #AM_CFLAGS += --debug-ralloc + #AM_CFLAGS += --debug-xtra + #AM_CFLAGS += --pcode-verbose +-AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ +- --i-code-in-asm ++AM_CFLAGS = -mpic14 -p$(ARCH) --std-c99 --i-code-in-asm + + #AM_CFLAGS += --no-pcode-opt + +@@ -330,8 +328,7 @@ AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 -I$(srcdir) ++AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 -I$(srcdir) + all: all-am + + .SUFFIXES: +diff --git a/device/lib/pic14/libsdcc/regular/Makefile.in b/device/lib/pic14/libsdcc/regular/Makefile.in +index 29a5924..8c60a49 100644 +--- a/device/lib/pic14/libsdcc/regular/Makefile.in ++++ b/device/lib/pic14/libsdcc/regular/Makefile.in +@@ -304,15 +304,13 @@ libsdcc_a_SOURCES = ../_divschar.c ../_divsint.c ../_divslong.c \ + _gptrput3.S _gptrput4.S macros.inc shadowregs.c + libsdcc_a_CFLAGS = -p$(ARCH) $(AM_CFLAGS) + CLEANFILES = ../*.asm ../*.lst +-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 ++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 + #AM_CFLAGS += --asm="$(CCAS)" + + #AM_CFLAGS += --debug-ralloc + #AM_CFLAGS += --debug-xtra + #AM_CFLAGS += --pcode-verbose +-AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ +- --i-code-in-asm ++AM_CFLAGS = -mpic14 -p$(ARCH) --std-c99 --i-code-in-asm + + #AM_CFLAGS += --no-pcode-opt + +@@ -323,8 +321,7 @@ AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 -I$(srcdir) ++AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 -I$(srcdir) + all: all-am + + .SUFFIXES: +diff --git a/device/lib/pic16/Makefile.common b/device/lib/pic16/Makefile.common +index 73200d7..e298bf5 100644 +--- a/device/lib/pic16/Makefile.common ++++ b/device/lib/pic16/Makefile.common +@@ -1,11 +1,10 @@ + AM_CPPFLAGS = + AM_CPPFLAGS += -I. +-AM_CPPFLAGS += -I$(top_srcdir)/../../include/pic16 -I$(top_srcdir)/../../non-free/include/pic16 ++AM_CPPFLAGS += -I$(top_srcdir)/../../include/pic16 + + AM_CFLAGS = + AM_CFLAGS += --std-c99 + AM_CFLAGS += --asm="$(CCAS)" +-AM_CFLAGS += --no-warn-non-free + ##AM_CFLAGS += -Wa,-q + + AM_CFLAGS += --fomit-frame-pointer +@@ -31,7 +30,7 @@ AM_CFLAGS += --i-code-in-asm + AM_CFLAGS += @USE_FLOATS@ + + AM_CCASFLAGS = +-AM_CCASFLAGS += -I$(top_srcdir)/../../include/pic16 -I$(top_srcdir)/../../non-free/include/pic16 ++AM_CCASFLAGS += -I$(top_srcdir)/../../include/pic16 + AM_CCASFLAGS += -I$(srcdir) + + clean-local: +diff --git a/device/lib/pic16/Makefile.in b/device/lib/pic16/Makefile.in +index b17f151..31ecfa4 100644 +--- a/device/lib/pic16/Makefile.in ++++ b/device/lib/pic16/Makefile.in +@@ -87,10 +87,7 @@ PRE_UNINSTALL = : + POST_UNINSTALL = : + subdir = . + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +-am__aclocal_m4_deps = \ +- $(top_srcdir)/../../non-free/lib/pic16/supported-devices.ac \ +- $(top_srcdir)/../../non-free/lib/pic16/processors.ac \ +- $(top_srcdir)/configure.ac ++am__aclocal_m4_deps = $(top_srcdir)/configure.ac + am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) + DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ +@@ -295,8 +292,7 @@ top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + SUBDIRS = debug libc libio libm libsdcc startup +-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ +- -I$(top_srcdir)/../../non-free/include/pic16 ++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 + #AM_CFLAGS += --no-optimize-goto + + #AM_CFLAGS += --debug-ralloc +@@ -310,11 +306,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CFLAGS = --std-c99 --asm="$(CCAS)" --no-warn-non-free \ ++AM_CFLAGS = --std-c99 --asm="$(CCAS)" \ + --fomit-frame-pointer --obanksel=9 --denable-peeps \ + --optimize-cmp --optimize-df --i-code-in-asm @USE_FLOATS@ +-AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 \ +- -I$(top_srcdir)/../../non-free/include/pic16 -I$(srcdir) ++AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 -I$(srcdir) + DISTCLEANFILES = a.cod a.hex ./.checkdevices/* pics.supported + all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive +diff --git a/device/lib/pic16/configure b/device/lib/pic16/configure +index d8760a0..eaea231 100755 +--- a/device/lib/pic16/configure ++++ b/device/lib/pic16/configure +@@ -3657,7 +3657,6 @@ fi + + + +-LIBDEV="${srcdir}/../../non-free/lib/pic16/libdev" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking devices supported by gputils" >&5 + $as_echo_n "checking devices supported by gputils... " >&6; } + GOOD_PICS=""; +diff --git a/device/lib/pic16/configure.ac b/device/lib/pic16/configure.ac +index 3966c11..cdbffc7 100644 +--- a/device/lib/pic16/configure.ac ++++ b/device/lib/pic16/configure.ac +@@ -68,10 +68,6 @@ AC_SUBST(OBJEXT, [o]) + _AM_DEPENDENCIES(CC) + _AM_DEPENDENCIES(CCAS) + +-LIBDEV="${srcdir}/../../non-free/lib/pic16/libdev" +-m4_include([../../non-free/lib/pic16/supported-devices.ac]) +-m4_include([../../non-free/lib/pic16/processors.ac]) +- + # Checks for libraries. + + # Checks for header files. +diff --git a/device/lib/pic16/debug/Makefile.in b/device/lib/pic16/debug/Makefile.in +index bc77b98..724a443 100644 +--- a/device/lib/pic16/debug/Makefile.in ++++ b/device/lib/pic16/debug/Makefile.in +@@ -88,10 +88,7 @@ PRE_UNINSTALL = : + POST_UNINSTALL = : + subdir = debug + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +-am__aclocal_m4_deps = \ +- $(top_srcdir)/../../non-free/lib/pic16/supported-devices.ac \ +- $(top_srcdir)/../../non-free/lib/pic16/processors.ac \ +- $(top_srcdir)/configure.ac ++am__aclocal_m4_deps = $(top_srcdir)/configure.ac + am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) + DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +@@ -290,8 +287,7 @@ top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + lib_LIBRARIES = libdebug.a + libdebug_a_SOURCES = gstack/gstack.c +-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ +- -I$(top_srcdir)/../../non-free/include/pic16 ++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 + #AM_CFLAGS += --no-optimize-goto + + #AM_CFLAGS += --debug-ralloc +@@ -305,11 +301,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CFLAGS = --std-c99 --asm="$(CCAS)" --no-warn-non-free \ ++AM_CFLAGS = --std-c99 --asm="$(CCAS)" \ + --fomit-frame-pointer --obanksel=9 --denable-peeps \ + --optimize-cmp --optimize-df --i-code-in-asm @USE_FLOATS@ +-AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 \ +- -I$(top_srcdir)/../../non-free/include/pic16 -I$(srcdir) ++AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 -I$(srcdir) + all: all-am + + .SUFFIXES: +diff --git a/device/lib/pic16/libc/Makefile.in b/device/lib/pic16/libc/Makefile.in +index 6d2699f..5546319 100644 +--- a/device/lib/pic16/libc/Makefile.in ++++ b/device/lib/pic16/libc/Makefile.in +@@ -88,10 +88,7 @@ PRE_UNINSTALL = : + POST_UNINSTALL = : + subdir = libc + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +-am__aclocal_m4_deps = \ +- $(top_srcdir)/../../non-free/lib/pic16/supported-devices.ac \ +- $(top_srcdir)/../../non-free/lib/pic16/processors.ac \ +- $(top_srcdir)/configure.ac ++am__aclocal_m4_deps = $(top_srcdir)/configure.ac + am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) + DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +@@ -344,8 +341,7 @@ libc18f_a_SOURCES = ctype/iscntrl.c ctype/isdigit.c ctype/isgraph.c \ + string/strpbrk.c string/strrchr.c string/strspn.c \ + string/strstr.c string/strtok.c string/strupr.c \ + utils/cnvfrac.S utils/cnvint.S utils/cvtdec.S +-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ +- -I$(top_srcdir)/../../non-free/include/pic16 ++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 + #AM_CFLAGS += --no-optimize-goto + + #AM_CFLAGS += --debug-ralloc +@@ -359,11 +355,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CFLAGS = --std-c99 --asm="$(CCAS)" --no-warn-non-free \ ++AM_CFLAGS = --std-c99 --asm="$(CCAS)" \ + --fomit-frame-pointer --obanksel=9 --denable-peeps \ + --optimize-cmp --optimize-df --i-code-in-asm @USE_FLOATS@ +-AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 \ +- -I$(top_srcdir)/../../non-free/include/pic16 -I$(srcdir) ++AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 -I$(srcdir) + all: all-am + + .SUFFIXES: +diff --git a/device/lib/pic16/libio/Makefile.in b/device/lib/pic16/libio/Makefile.in +index 0d7c731..64b56c8 100644 +--- a/device/lib/pic16/libio/Makefile.in ++++ b/device/lib/pic16/libio/Makefile.in +@@ -481,10 +481,7 @@ POST_UNINSTALL = : + @ENABLE_18LF8723_TRUE@am__append_393 = libio18lf8723.a + subdir = libio + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +-am__aclocal_m4_deps = \ +- $(top_srcdir)/../../non-free/lib/pic16/supported-devices.ac \ +- $(top_srcdir)/../../non-free/lib/pic16/processors.ac \ +- $(top_srcdir)/configure.ac ++am__aclocal_m4_deps = $(top_srcdir)/configure.ac + am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) + DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +@@ -9826,8 +9823,7 @@ libio18lf8722_a_SOURCES = dummy.c i2c/i2cack.c i2c/i2cclose.c \ + libio18lf8722_a_CFLAGS = -p18lf8722 $(AM_CFLAGS) + libio18lf8723_a_SOURCES = dummy.c + libio18lf8723_a_CFLAGS = -p18lf8723 $(AM_CFLAGS) +-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ +- -I$(top_srcdir)/../../non-free/include/pic16 ++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 + #AM_CFLAGS += --no-optimize-goto + + #AM_CFLAGS += --debug-ralloc +@@ -9841,11 +9837,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CFLAGS = --std-c99 --asm="$(CCAS)" --no-warn-non-free \ ++AM_CFLAGS = --std-c99 --asm="$(CCAS)" \ + --fomit-frame-pointer --obanksel=9 --denable-peeps \ + --optimize-cmp --optimize-df --i-code-in-asm @USE_FLOATS@ +-AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 \ +- -I$(top_srcdir)/../../non-free/include/pic16 -I$(srcdir) ++AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 -I$(srcdir) + all: all-am + + .SUFFIXES: +diff --git a/device/lib/pic16/libio/mkmk.sh b/device/lib/pic16/libio/mkmk.sh +index 211604e..e8896bf 100755 +--- a/device/lib/pic16/libio/mkmk.sh ++++ b/device/lib/pic16/libio/mkmk.sh +@@ -17,40 +17,6 @@ lib_LIBRARIES = + + HEREDOC + +-for f in "../../../non-free/lib/pic16/libdev/pic1"*.c; do +- p="${f##*/pic}"; +- p="${p%.c}"; +- P=$(echo "$p" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ); +- echo "Generating for device >>${p}<<" >&2; +- cat < /dev/null 2>&1 && { echo "No adc." >&2 ; } || cat < /dev/null 2>&1 && { echo "No i2c." >&2 ; } || cat < /dev/null 2>&1 && { echo "No usart." >&2 ; } || cat < ++ + + + +@@ -3694,68 +3621,6 @@ sdcc/include + include + \end_layout + +-\end_inset +- +- +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +- +-\emph on +-NON_FREE_INCLUDE_DIR_SUFFIX +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-sdcc/non-free/include +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-non-free/include +-\end_layout +- +-\end_inset +- +- +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +- +-\emph on +-LIB_DIR_SUFFIX +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-sdcc/lib +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-lib +-\end_layout +- + \end_inset + + +@@ -3766,7 +3631,7 @@ lib + \begin_layout Plain Layout + + \emph on +-NON_FREE_LIB_DIR_SUFFIX ++LIB_DIR_SUFFIX + \end_layout + + \end_inset +@@ -3775,7 +3640,7 @@ NON_FREE_LIB_DIR_SUFFIX + \begin_inset Text + + \begin_layout Plain Layout +-sdcc/non-free/lib ++sdcc/lib + \end_layout + + \end_inset +@@ -3784,7 +3649,7 @@ sdcc/non-free/lib + \begin_inset Text + + \begin_layout Plain Layout +-non-free/lib ++lib + \end_layout + + \end_inset +@@ -4183,20 +4048,6 @@ include + \end_inset + + +-\backslash +- +-\begin_inset Newline newline +-\end_inset +- +-non_free_include_dir_suffix= +-\begin_inset Quotes srd +-\end_inset +- +-non-free/include +-\begin_inset Quotes srd +-\end_inset +- +- + \backslash + + \begin_inset Newline newline +@@ -4211,20 +4062,6 @@ lib + \end_inset + + +-\backslash +- +-\begin_inset Newline newline +-\end_inset +- +-non_free_lib_dir_suffix= +-\begin_inset Quotes srd +-\end_inset +- +-non-free/lib +-\begin_inset Quotes srd +-\end_inset +- +- + \backslash + + \begin_inset Newline newline +@@ -4405,20 +4242,6 @@ include + \end_inset + + +-\backslash +- +-\begin_inset Newline newline +-\end_inset +- +-non_free_include_dir_suffix= +-\begin_inset Quotes srd +-\end_inset +- +-non-free/include +-\begin_inset Quotes srd +-\end_inset +- +- + \backslash + + \begin_inset Newline newline +@@ -4433,20 +4256,6 @@ lib + \end_inset + + +-\backslash +- +-\begin_inset Newline newline +-\end_inset +- +-non_free_lib_dir_suffix= +-\begin_inset Quotes srd +-\end_inset +- +-non-free/lib +-\begin_inset Quotes srd +-\end_inset +- +- + \backslash + + \begin_inset Newline newline +@@ -4543,7 +4352,7 @@ Install paths + \begin_layout Standard + \align center + \begin_inset Tabular +- ++ + + + +@@ -4699,64 +4508,6 @@ include + + \begin_inset Text + +-\begin_layout Plain Layout +-Non-free include files +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +- +-\emph on +-$DATADIR/non-free/ +-\emph default +- +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +-$INCLUDE_DIR_SUFFIX +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-/usr/local/share/ +-\begin_inset Newline newline +-\end_inset +- +-sdcc/non-free/include +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +- +-\backslash +-sdcc +-\backslash +-non-free +-\backslash +-include +-\end_layout +- +-\end_inset +- +- +- +- +-\begin_inset Text +- + \begin_layout Plain Layout + Library file** + \end_layout +@@ -4806,64 +4557,6 @@ sdcc + lib + \end_layout + +-\end_inset +- +- +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-Library file** +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +- +-\emph on +-$DATADIR/non-free/ +-\emph default +- +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +-$LIB_DIR_SUFFIX +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-/usr/local/share/ +-\begin_inset Newline newline +-\end_inset +- +-sdcc/non-free/lib +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +- +-\backslash +-sdcc +-\backslash +-non-free +-\backslash +-lib +-\end_layout +- + \end_inset + + +@@ -5186,7 +4879,7 @@ $PATH + \begin_layout Standard + \align center + \begin_inset Tabular +- ++ + + + +@@ -5464,203 +5157,13 @@ include + + + +- ++ + \begin_inset Text + + \begin_layout Plain Layout + 5 + \end_layout + +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +- +-\emph on +-$DATADIR/ +-\emph default +- +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +-$INCLUDE_DIR_SUFFIX +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-/usr/local/share/ +-\begin_inset Newline newline +-\end_inset +- +-sdcc/include +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-(not on Win32) +-\end_layout +- +-\end_inset +- +- +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-6 +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-$SDCC_HOME/ +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +-$PREFIX2DATA_DIR/ +-\emph default +- +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +-non-free/ +-\emph default +- +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +-$INCLUDE_DIR_SUFFIX +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-$SDCC_HOME/share/ +-\begin_inset Newline newline +-\end_inset +- +-sdcc/non-free/include +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-$SDCC_HOME +-\backslash +-non-free +-\backslash +-include +-\end_layout +- +-\end_inset +- +- +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-7 +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-path(argv[0])/ +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +-$BIN2DATADIR/ +-\emph default +- +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +-non-free/ +-\emph default +- +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +-$INCLUDE_DIR_SUFFIX +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-path(argv[0])/../ +-\begin_inset Newline newline +-\end_inset +- +-sdcc/non-free/include +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-path(argv[0]) +-\backslash +-.. +-\backslash +-non-free +-\backslash +-include +-\end_layout +- +-\end_inset +- +- +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-8 +-\end_layout +- + \end_inset + + +@@ -5676,21 +5179,13 @@ $DATADIR/ + \end_inset + + +-\emph on +-non-free/ +-\emph default +- +-\begin_inset Newline newline +-\end_inset +- +- + \emph on + $INCLUDE_DIR_SUFFIX + \end_layout + + \end_inset + +- ++ + \begin_inset Text + + \begin_layout Plain Layout +@@ -5698,7 +5193,7 @@ $INCLUDE_DIR_SUFFIX + \begin_inset Newline newline + \end_inset + +-sdcc/non-free/include ++sdcc/include + \end_layout + + \end_inset +@@ -5796,7 +5291,7 @@ model + \begin_layout Standard + \align center + \begin_inset Tabular +- ++ + + + +@@ -6076,7 +5571,7 @@ lib + + + +- ++ + \begin_inset Text + + \begin_layout Plain Layout +@@ -6085,7 +5580,7 @@ lib + + \end_inset + +- ++ + \begin_inset Text + + \begin_layout Plain Layout +@@ -6116,7 +5611,7 @@ $LIB_DIR_SUFFIX/ + + \end_inset + +- ++ + \begin_inset Text + + \begin_layout Plain Layout +@@ -6131,7 +5626,7 @@ lib/ + + \end_inset + +- ++ + \begin_inset Text + + \begin_layout Plain Layout +@@ -6154,308 +5649,6 @@ lib + + \end_layout + +-\end_inset +- +- +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-6 +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +- +-\emph on +-$DATADIR/non-free/ +-\emph default +- +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +-$LIB_DIR_SUFFIX/ +-\emph default +- +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +- +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-/usr/local/share/sdcc/ +-\begin_inset Newline newline +-\end_inset +- +-lib/ +-\emph on +- +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-(not on Win32) +-\end_layout +- +-\end_inset +- +- +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-7 +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-$SDCC_HOME/ +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +-$PREFIX2DATA_DIR/ +-\emph default +- +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +-non-free/ +-\emph default +- +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +-$LIB_DIR_SUFFIX/ +-\emph default +- +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +- +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-$SDCC_HOME/share/sdcc/ +-\begin_inset Newline newline +-\end_inset +- +-non-free/lib/ +-\emph on +- +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-$SDCC_HOME +-\backslash +- +-\begin_inset Newline newline +-\end_inset +- +-lib +-\backslash +-non-free +-\emph on +- +-\backslash +- +-\end_layout +- +-\end_inset +- +- +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-8 +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-path(argv[0])/ +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +-$BIN2DATADIR/ +-\emph default +- +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +-non-free/ +-\emph default +- +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +-$LIB_DIR_SUFFIX/ +-\emph default +- +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +- +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-path(argv[0])/../sdcc/ +-\begin_inset Newline newline +-\end_inset +- +-non-free/lib/ +-\emph on +- +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-path(argv[0]) +-\backslash +-.. +-\backslash +- +-\begin_inset Newline newline +-\end_inset +- +-lib +-\backslash +-non-free +-\emph on +- +-\backslash +- +-\end_layout +- +-\end_inset +- +- +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-9 +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +- +-\emph on +-$DATADIR/non-free/ +-\emph default +- +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +-$LIB_DIR_SUFFIX/ +-\emph default +- +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +- +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-/usr/local/share/sdcc/ +-\begin_inset Newline newline +-\end_inset +- +-non-free/lib/ +-\begin_inset Newline newline +-\end_inset +- +- +-\emph on +- +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-(not on Win32) +-\end_layout +- + \end_inset + + +@@ -8723,14 +7916,6 @@ In /share/sdcc/include + the include files + \end_layout + +-\begin_layout Standard +-In /share/sdcc/non-free/include +-\end_layout +- +-\begin_layout Itemize +-the non-free include files +-\end_layout +- + \begin_layout Standard + In /share/sdcc/lib + \end_layout +@@ -8739,14 +7924,6 @@ In /share/sdcc/lib + the src and target subdirectories with the precompiled relocatables. + \end_layout + +-\begin_layout Standard +-In /share/sdcc/non-free/lib +-\end_layout +- +-\begin_layout Itemize +-the src and target subdirectories with the non-free precompiled relocatables. +-\end_layout +- + \begin_layout Standard + In /share/sdcc/doc + \end_layout +@@ -15589,66 +14766,6 @@ splint + myprogram.c + \end_layout + +-\begin_layout Labeling +-\labelwidthstring 00.00.0000 +- +-\series bold +-- +-\begin_inset ERT +-status collapsed +- +-\begin_layout Plain Layout +- +- +-\backslash +-/ +-\end_layout +- +-\end_inset +- +--use-non-free +-\series default +- +-\begin_inset Index idx +-status collapsed +- +-\begin_layout Plain Layout +-- +-\begin_inset ERT +-status collapsed +- +-\begin_layout Plain Layout +- +- +-\backslash +-/ +-\end_layout +- +-\end_inset +- +--use-non-free +-\end_layout +- +-\end_inset +- +- +-\begin_inset CommandInset label +-LatexCommand label +-name "lyx:--use-non-free" +- +-\end_inset +- +- Search / include non-free licensed libraries and header files, located +- under the non-free directory - see section +-\begin_inset CommandInset ref +-LatexCommand ref +-reference "subsec:Search-Paths" +- +-\end_inset +- +- +-\end_layout +- + \begin_layout Subsection + Linker Options + \begin_inset Index idx +@@ -44653,66 +43770,9 @@ http://sourceforge.net/projects/gputils + Pic device specific header and c source files are automatically generated + from MPLAB include files, which are published by Microchip with a special + requirement that they are only to be used with authentic Microchip devices. +- This reqirement prevents to publish generated header and c source files +- under the GPL compatible license, so they are located in non-free directory +- (see section +-\begin_inset CommandInset ref +-LatexCommand ref +-reference "subsec:Search-Paths" +- +-\end_inset +- +-). +- In order to include them in include and library search paths, the +-\series bold +-- +-\begin_inset ERT +-status collapsed +- +-\begin_layout Plain Layout +- +- +-\backslash +-/ +-\end_layout +- +-\end_inset +- +--use-non-free +-\begin_inset Index idx +-status collapsed +- +-\begin_layout Plain Layout +-- +-\begin_inset ERT +-status collapsed +- +-\begin_layout Plain Layout +- +- +-\backslash +-/ +-\end_layout +- +-\end_inset +- +--use-non-free +-\end_layout +- +-\end_inset +- +- +-\series default +- command line option should be defined. +-\begin_inset Newline newline +-\end_inset +- +- +-\begin_inset Newline newline +-\end_inset +- +-NOTE: the compiled code, which use non-free pic device specific libraries, +- is not GPL compatible! ++ As this restriction is incompatible with the goal of software freedom, ++ header files and libraries generated from these files are not included ++ in the SDCC package distributed with Guix. + \begin_inset Newline newline + \end_inset + +@@ -44766,7 +43826,7 @@ Makefile + \begin_inset space ~ + \end_inset + +-sdcc -V --use-non-free -mpic14 -p16f877 -c $< ++sdcc -V -mpic14 -p16f877 -c $< + \begin_inset Newline newline + \end_inset + +@@ -44860,7 +43920,7 @@ Makefile + \begin_inset space ~ + \end_inset + +-sdcc -S -V --use-non-free -mpic14 -p16f877 $< ++sdcc -S -V -mpic14 -p16f877 $< + \begin_inset Newline newline + \end_inset + +@@ -45142,47 +44202,6 @@ status collapsed + \begin_layout Plain Layout + + +-\backslash +-/ +-\end_layout +- +-\end_inset +- +--use-non-free +-\begin_inset Index idx +-status collapsed +- +-\begin_layout Plain Layout +-PIC14!Options!- +-\begin_inset ERT +-status collapsed +- +-\begin_layout Plain Layout +- +- +-\backslash +-/ +-\end_layout +- +-\end_inset +- +--use-non-free +-\end_layout +- +-\end_inset +- +- make non-free device headers and libraries available in the compiler's +- search paths (implicit -I and -L options) +-\end_layout +- +-\begin_layout Description +-- +-\begin_inset ERT +-status collapsed +- +-\begin_layout Plain Layout +- +- + \backslash + / + \end_layout +@@ -46055,47 +45074,6 @@ status collapsed + -all-callee-saves + \end_layout + +-\begin_layout Description +-- +-\begin_inset ERT +-status collapsed +- +-\begin_layout Plain Layout +- +- +-\backslash +-/ +-\end_layout +- +-\end_inset +- +--use-non-free +-\begin_inset Index idx +-status collapsed +- +-\begin_layout Plain Layout +-PIC16!Options!- +-\begin_inset ERT +-status collapsed +- +-\begin_layout Plain Layout +- +- +-\backslash +-/ +-\end_layout +- +-\end_inset +- +--use-non-free +-\end_layout +- +-\end_inset +- +- Make non-free device headers and libraries available in the compiler's +- search paths (implicit -I and -L options). +-\end_layout +- + \begin_layout Subsection + Port Specific Options + \begin_inset Index idx +@@ -47372,188 +46350,6 @@ Linker + \end_inset + + +-\end_layout +- +-\begin_layout Standard +-If the +-\series bold +-- +-\begin_inset ERT +-status collapsed +- +-\begin_layout Plain Layout +- +- +-\backslash +-/ +-\end_layout +- +-\end_inset +- +--use-non-free +-\begin_inset Index idx +-status collapsed +- +-\begin_layout Plain Layout +-- +-\begin_inset ERT +-status collapsed +- +-\begin_layout Plain Layout +- +- +-\backslash +-/ +-\end_layout +- +-\end_inset +- +--use-non-free +-\end_layout +- +-\end_inset +- +- +-\series default +- command line option is specified, non-free directories are searched: +-\begin_inset Newline newline +-\end_inset +- +- +-\begin_inset Separator latexpar +-\end_inset +- +- +-\end_layout +- +-\begin_layout Standard +-\align center +-\begin_inset Tabular +- +- +- +- +- +- +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-Directory +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-Description +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-Target +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-Command prefix +-\end_layout +- +-\end_inset +- +- +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-PREFIX/sdcc/non-free/include/pic16 +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-PIC16 specific non-free headers +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-Compiler +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +--I +-\end_layout +- +-\end_inset +- +- +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-PREFIX/sdcc/non-free/lib/pic16 +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-PIC16 specific non-free libraries +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +-Linker +-\end_layout +- +-\end_inset +- +- +-\begin_inset Text +- +-\begin_layout Plain Layout +--L +-\end_layout +- +-\end_inset +- +- +- +- +-\end_inset +- +- + \end_layout + + \begin_layout Subsection +@@ -48249,66 +47045,9 @@ name "subsec:PIC16_Header-Files-and-Libraries" + Pic device specific header and c source files are automatically generated + from MPLAB include files, which are published by Microchip with a special + requirement that they are only to be used with authentic Microchip devices. +- This requirement prevents to publish generated header and c source files +- under the GPL compatible license, so they are located in the non-free directory +- (see section +-\begin_inset CommandInset ref +-LatexCommand ref +-reference "subsec:Search-Paths" +- +-\end_inset +- +-). +- In order to include them in include and library search paths, the +-\series bold +-- +-\begin_inset ERT +-status collapsed +- +-\begin_layout Plain Layout +- +- +-\backslash +-/ +-\end_layout +- +-\end_inset +- +--use-non-free +-\begin_inset Index idx +-status collapsed +- +-\begin_layout Plain Layout +-- +-\begin_inset ERT +-status collapsed +- +-\begin_layout Plain Layout +- +- +-\backslash +-/ +-\end_layout +- +-\end_inset +- +--use-non-free +-\end_layout +- +-\end_inset +- +- +-\series default +- command line option should be defined. +-\begin_inset Newline newline +-\end_inset +- +- +-\begin_inset Newline newline +-\end_inset +- +-NOTE: the compiled code, which use non-free pic device specific libraries, +- is not GPL compatible! ++ As this restriction is incompatible with the goal of software freedom, ++ header files and libraries generated from these files are not included ++ in the SDCC package distributed with Guix. + \end_layout + + \begin_layout Subsection +@@ -48554,195 +47293,6 @@ vfprintf.c + should also work, but is untested. + \end_layout + +-\begin_layout Subsection +-Adding New Devices to the Port +-\end_layout +- +-\begin_layout Standard +-Adding support for a new 16 +-\begin_inset ERT +-status collapsed +- +-\begin_layout Plain Layout +- +- +-\backslash +-, +-\end_layout +- +-\end_inset +- +-bit PIC MCU requires the following steps: +-\end_layout +- +-\begin_layout Enumerate +-Create picDEVICE.c and picDEVICE.h from pDEVICE.inc using +-\begin_inset Newline newline +-\end_inset +- +- +-\family typewriter +-perl /path/to/sdcc/support/scripts/inc2h-pic16.pl +-\backslash +- +-\begin_inset Newline newline +-\end_inset +- +-/path/to/gputils/header/pDEVICE.inc +-\end_layout +- +-\begin_layout Enumerate +- +-\family typewriter +-mv picDEVICE.h /path/to/sdcc/device/non-free/include/pic16 +-\end_layout +- +-\begin_layout Enumerate +- +-\family typewriter +-mv picDEVICE.c /path/to/sdcc/device/non-free/lib/pic16/libdev +-\end_layout +- +-\begin_layout Enumerate +-Either +-\begin_inset Separator latexpar +-\end_inset +- +- +-\end_layout +- +-\begin_deeper +-\begin_layout Enumerate +-add the new device to +-\family typewriter +-/path/to/sdcc/device/lib/pic16/libio/*.ignore +-\family default +- to suppress building any of the I/O libraries for the new device +-\begin_inset Foot +-status collapsed +- +-\begin_layout Plain Layout +-In fact, the +-\family typewriter +-.ignore +-\family default +- files are only used when auto-generating +-\family typewriter +-Makefile.am +-\family default +- using the +-\family typewriter +-.../libio/mkmk.sh +-\family default +- script. +-\end_layout +- +-\end_inset +- +-, or +-\end_layout +- +-\begin_layout Enumerate +-add the device (family) to +-\family typewriter +-/path/to/sdcc/support/scripts/pic18fam-h-gen.pl +-\family default +- to assign I/O styles, run the +-\family typewriter +-pic18fam-h-gen.pl +-\family default +- script to generate +-\family typewriter +-pic18fam.h.gen +-\family default +-, replace your existing +-\family typewriter +-pic18fam.h +-\family default +- with the generated file, and (if required) implement new I/O styles in +- +-\family typewriter +-/path/to/sdcc/device/include/pic16/{adc,i2c,usart}.h +-\family default +- and +-\family typewriter +-/path/to/sdcc/device/lib/pic16/libio/*/*. +-\end_layout +- +-\end_deeper +-\begin_layout Enumerate +-Edit +-\family typewriter +-/path/to/sdcc/device/include/pic16/pic18fregs.h +-\family default +- +-\begin_inset Newline newline +-\end_inset +- +-The file format is self-explanatory, just add +-\begin_inset Newline newline +-\end_inset +- +- +-\family typewriter +-#elif defined(picDEVICE) +-\begin_inset Newline newline +-\end_inset +- +-# +-\begin_inset ERT +-status collapsed +- +-\begin_layout Plain Layout +- +- +-\backslash +- +-\backslash +- +-\end_layout +- +-\end_inset +- +-include +-\family default +- +-\begin_inset Newline newline +-\end_inset +- +-at the right place (keep the file sorted, please). +-\end_layout +- +-\begin_layout Enumerate +-Edit +-\family typewriter +-/path/to/sdcc/device/include/pic16devices.txt +-\begin_inset Newline newline +-\end_inset +- +- +-\family default +-Copy and modify an existing entry or create a new one and insert it at the +- correct place (keep the file sorted, please). +-\end_layout +- +-\begin_layout Enumerate +- +-\family typewriter +-( cd /path/to/sdcc/device/non-free/lib/pic16 && sh update.sh ) +-\end_layout +- +-\begin_layout Enumerate +-Recompile the pic16 libraries as described in +-\begin_inset CommandInset ref +-LatexCommand ref +-reference "subsec:pic16Libraries" +- +-\end_inset +- +- or just configure and build sdcc again from scratch (recommended). +-\end_layout +- + \begin_layout Subsection + Memory Models + \end_layout +@@ -73525,6 +72075,12 @@ This document was initially written by Sandeep Dutta and updated by SDCC + developers. + \end_layout + ++\begin_layout Standard ++It has been modified from the original to reflect the removal of non-free ++ components and related functionality in the SDCC package distributed with ++ GNU Guix. ++\end_layout ++ + \begin_layout Standard + All product names mentioned herein may be trademarks + \begin_inset Index idx +diff --git a/sdcc.spec b/sdcc.spec +index 9f1eeff..3686228 100644 +--- a/sdcc.spec ++++ b/sdcc.spec +@@ -83,15 +83,15 @@ rm -rf $RPM_BUILD_ROOT + %files common + %defattr(-,root,root) + /usr/share/sdcc/include +-/usr/share/sdcc/non-free/include + /usr/share/sdcc/lib +-/usr/share/sdcc/non-free/lib + + %files doc + %defattr(-,root,root) + %doc %{_defaultdocdir} + + %changelog ++* Sat Oct 31 2020 - simon AT simonsouth.net ++- removed non-free include and lib directories + * Wed Feb 07 2018 - pkk AT spth.de + - version updated to 3.7.0 + * Sun May 29 2016 - sourceforge.brock AT dse.nl +diff --git a/sdcc_vc.h.in b/sdcc_vc.h.in +index 06d8cca..736c325 100644 +--- a/sdcc_vc.h.in ++++ b/sdcc_vc.h.in +@@ -23,8 +23,6 @@ + + #define INCLUDE_DIR_SUFFIX "\\include" + #define LIB_DIR_SUFFIX "\\lib" +-#define NON_FREE_INCLUDE_DIR_SUFFIX "\\non-free\\include" +-#define NON_FREE_LIB_DIR_SUFFIX "\\non-free\\lib" + + #define BIN2DATA_DIR "\\.." + #define PREFIX2BIN_DIR "\\bin" +diff --git a/sdccconf_in.h b/sdccconf_in.h +index 29619bd..dadf310 100644 +--- a/sdccconf_in.h ++++ b/sdccconf_in.h +@@ -106,12 +106,6 @@ + /* XXX */ + #undef LIB_DIR_SUFFIX + +-/* XXX */ +-#undef NON_FREE_INCLUDE_DIR_SUFFIX +- +-/* XXX */ +-#undef NON_FREE_LIB_DIR_SUFFIX +- + /* Define to 1 to disable the AVR port */ + #undef OPT_DISABLE_AVR + +@@ -133,9 +127,6 @@ + /* XXX */ + #undef OPT_DISABLE_MCS51 + +-/* XXX */ +-#undef OPT_DISABLE_NON_FREE +- + /* XXX */ + #undef OPT_DISABLE_PACKIHX + +diff --git a/src/SDCCglobl.h b/src/SDCCglobl.h +index 2ce040b..d72d3b8 100644 +--- a/src/SDCCglobl.h ++++ b/src/SDCCglobl.h +@@ -315,7 +315,6 @@ struct options + int no_pack_iram; /* MCS51/DS390 - Deprecated: Tells the linker not to pack variables in internal ram */ + int acall_ajmp; /* MCS51 - Use acall/ajmp instead of lcall/ljmp */ + int no_ret_without_call; /* MCS51 - Do not use ret independent of acall/lcall */ +- int use_non_free; /* Search / include non-free licensed libraries and header files */ + /* starting address of the segments */ + int xstack_loc; /* initial location of external stack */ + int stack_loc; /* initial value of internal stack pointer */ +diff --git a/src/SDCCmain.c b/src/SDCCmain.c +index a523164..a279d3d 100644 +--- a/src/SDCCmain.c ++++ b/src/SDCCmain.c +@@ -144,7 +144,6 @@ char buffer[PATH_MAX * 2]; + #define OPTION_DATA_SEG "--dataseg" + #define OPTION_DOLLARS_IN_IDENT "--fdollars-in-identifiers" + #define OPTION_SIGNED_CHAR "--fsigned-char" +-#define OPTION_USE_NON_FREE "--use-non-free" + #define OPTION_PEEP_RETURN "--peep-return" + #define OPTION_NO_PEEP_RETURN "--no-peep-return" + #define OPTION_NO_OPTSDCC_IN_ASM "--no-optsdcc-in-asm" +@@ -192,7 +191,6 @@ static const OPTION optionsTable[] = { + {0, OPTION_STD_SDCC11, NULL, "Use ISO C11 standard with SDCC extensions (default)"}, + {0, OPTION_DOLLARS_IN_IDENT, &options.dollars_in_ident, "Permit '$' as an identifier character"}, + {0, OPTION_SIGNED_CHAR, &options.signed_char, "Make \"char\" signed by default"}, +- {0, OPTION_USE_NON_FREE, &options.use_non_free, "Search / include non-free licensed libraries and header files"}, + + {0, NULL, NULL, "Code generation options"}, + {'m', NULL, NULL, "Set the port to use e.g. -mz80."}, +@@ -2045,10 +2043,6 @@ preProcess (char **envp) + else + addSet (&preArgvSet, Safe_strdup ("-D__SDCC_CHAR_UNSIGNED")); + +- /* set the macro for non-free */ +- if (options.use_non_free) +- addSet (&preArgvSet, Safe_strdup ("-D__SDCC_USE_NON_FREE")); +- + /* set the macro for large model */ + switch (options.model) + { +@@ -2262,12 +2256,6 @@ setIncludePath (void) + * 6. - $SDCC_HOME/PREFIX2DATA_DIR/INCLUDE_DIR_SUFFIX + * 7. - path(argv[0])/BIN2DATA_DIR/INCLUDE_DIR_SUFFIX + * 8. - DATADIR/INCLUDE_DIR_SUFFIX (only on *nix) +- * 9. - $SDCC_HOME/PREFIX2DATA_DIR/NON_FREE_INCLUDE_DIR_SUFFIX/target +- * 10. - path(argv[0])/BIN2DATA_DIR/NON_FREE_INCLUDE_DIR_SUFFIX/target +- * 11. - DATADIR/NON_FREE_INCLUDE_DIR_SUFFIX/target (only on *nix) +- * 12. - $SDCC_HOME/PREFIX2DATA_DIR/NON_FREE_INCLUDE_DIR_SUFFIX +- * 13. - path(argv[0])/BIN2DATA_DIR/NON_FREE_INCLUDE_DIR_SUFFIX +- * 14. - DATADIR/NON_FREE_INCLUDE_DIR_SUFFIX (only on *nix) + */ + + if (!options.nostdinc) +@@ -2280,17 +2268,6 @@ setIncludePath (void) + includeDirsSet = processStrSet (includeDirsSet, NULL, port->target, NULL); + mergeSets (&includeDirsSet, tempSet); + +- if (options.use_non_free) +- { +- set *tempSet1; +- +- tempSet = processStrSet (dataDirsSet, NULL, NON_FREE_INCLUDE_DIR_SUFFIX, NULL); +- tempSet1 = processStrSet (tempSet, NULL, DIR_SEPARATOR_STRING, NULL); +- tempSet1 = processStrSet (tempSet1, NULL, port->target, NULL); +- mergeSets (&tempSet1, tempSet); +- mergeSets (&includeDirsSet, tempSet1); +- } +- + if ((p = getenv (SDCC_INCLUDE_NAME)) != NULL) + { + struct dbuf_s dbuf; +@@ -2315,9 +2292,6 @@ setLibPath (void) + * 3. - $SDCC_HOME/PREFIX2DATA_DIR/LIB_DIR_SUFFIX/ + * 4. - path(argv[0])/BIN2DATA_DIR/LIB_DIR_SUFFIX/ + * 5. - DATADIR/LIB_DIR_SUFFIX/ (only on *nix) +- * 6. - $SDCC_HOME/PREFIX2DATA_DIR/NON_FREE_LIB_DIR_SUFFIX/ +- * 7. - path(argv[0])/BIN2DATA_DIR/NON_FREE_LIB_DIR_SUFFIX/ +- * 8. - DATADIR/NON_FREE_LIB_DIR_SUFFIX/ (only on *nix) + */ + + if (!options.nostdlib) +@@ -2334,13 +2308,6 @@ setLibPath (void) + dbuf_makePath (&dbuf, LIB_DIR_SUFFIX, port->general.get_model ? port->general.get_model () : targetname); + libDirsSet = processStrSet (dataDirsSet, NULL, dbuf_c_str (&dbuf), NULL); + +- if (options.use_non_free) +- { +- dbuf_set_length (&dbuf, 0); +- dbuf_makePath (&dbuf, NON_FREE_LIB_DIR_SUFFIX, port->general.get_model ? port->general.get_model () : targetname); +- mergeSets (&libDirsSet, processStrSet (dataDirsSet, NULL, dbuf_c_str (&dbuf), NULL)); +- } +- + if ((p = getenv (SDCC_LIB_NAME)) != NULL) + { + addSetHead (&libDirsSet, Safe_strdup (p)); +diff --git a/src/pic14/main.c b/src/pic14/main.c +index 3d868cc..e8ecaaf 100644 +--- a/src/pic14/main.c ++++ b/src/pic14/main.c +@@ -42,7 +42,6 @@ static OPTION _pic14_poptions[] = + { 0, "--no-pcode-opt", &pic14_options.disable_df, "disable (slightly faulty) optimization on pCode" }, + { 0, OPTION_STACK_SIZE, &options.stack_size, "sets the size if the argument passing stack (default: 16, minimum: 4)", CLAT_INTEGER }, + { 0, "--no-extended-instructions", &pic14_options.no_ext_instr, "forbid use of the extended instruction set (e.g., ADDFSR)" }, +- { 0, "--no-warn-non-free", &pic14_options.no_warn_non_free, "suppress warning on absent --use-non-free option" }, + { 0, NULL, NULL, NULL } + }; + +@@ -153,16 +152,6 @@ _pic14_finaliseOptions (void) + addSet (&preArgvSet, dbuf_detach_c_str (&dbuf)); + } + +- if (!pic14_options.no_warn_non_free && !options.use_non_free) +- { +- fprintf(stderr, +- "WARNING: Command line option --use-non-free not present.\n" +- " When compiling for PIC14/PIC16, please provide --use-non-free\n" +- " to get access to device headers and libraries.\n" +- " If you do not use these, you may provide --no-warn-non-free\n" +- " to suppress this warning (not recommended).\n"); +- } // if +- + } + + static void +diff --git a/src/pic14/main.h b/src/pic14/main.h +index 4275b65..0dc8c86 100644 +--- a/src/pic14/main.h ++++ b/src/pic14/main.h +@@ -5,7 +5,6 @@ typedef struct { + unsigned int isLibrarySource:1; + int disable_df; + int no_ext_instr; +- int no_warn_non_free; + } pic14_options_t; + + extern pic14_options_t pic14_options; +diff --git a/src/pic16/device.h b/src/pic16/device.h +index cdfbba0..5877f09 100644 +--- a/src/pic16/device.h ++++ b/src/pic16/device.h +@@ -99,7 +99,6 @@ typedef struct { + int gstack; + unsigned int debgen; + int xinst; +- int no_warn_non_free; + } pic16_options_t; + + extern pic16_options_t pic16_options; +diff --git a/src/pic16/main.c b/src/pic16/main.c +index 6f194c1..7f7b2f0 100644 +--- a/src/pic16/main.c ++++ b/src/pic16/main.c +@@ -655,7 +655,6 @@ OPTION pic16_optionsTable[]= { + { 0, "--pcode-verbose", &pic16_pcode_verbose, "dump pcode related info"}, + { 0, "--calltree", &pic16_options.dumpcalltree, "dump call tree in .calltree file"}, + { 0, "--gstack", &pic16_options.gstack, "trace stack pointer push/pop to overflow"}, +- { 0, "--no-warn-non-free", &pic16_options.no_warn_non_free, "suppress warning on absent --use-non-free option" }, + { 0, NULL, NULL, NULL} + }; + +@@ -940,16 +939,6 @@ _pic16_finaliseOptions (void) + addSet (&asmOptionsSet, Safe_strdup ("-D__STACK_MODEL_SMALL")); + } + +- if (!pic16_options.no_warn_non_free && !options.use_non_free) +- { +- fprintf(stderr, +- "WARNING: Command line option --use-non-free not present.\n" +- " When compiling for PIC14/PIC16, please provide --use-non-free\n" +- " to get access to device headers and libraries.\n" +- " If you do not use these, you may provide --no-warn-non-free\n" +- " to suppress this warning (not recommended).\n"); +- } // if +- + dbuf_destroy (&dbuf); + } + +@@ -979,7 +968,6 @@ _pic16_setDefaultOptions (void) + pic16_options.ip_stack = 1; /* set to 1 to enable ipop/ipush for stack */ + pic16_options.gstack = 0; + pic16_options.debgen = 0; +- pic16_options.no_warn_non_free = 0; + } + + static const char * +diff --git a/src/regression/Makefile b/src/regression/Makefile +index 26a7ff3..4547295 100644 +--- a/src/regression/Makefile ++++ b/src/regression/Makefile +@@ -65,10 +65,10 @@ TARGETPIC = 18f452 + CFLAGS = -mpic16 -p$(TARGETPIC) + DIR = pic16 + endif +-CFLAGS += -Wl,-q --no-warn-non-free ++CFLAGS += -Wl,-q + CFLAGS += -Wl,--map +-CFLAGS += -I $(SDCC_SRC)/device/include/$(DIR) -I $(SDCC_SRC)/device/non-free/include/$(DIR) +-CFLAGS += -L $(SDCC_BIN)/device/lib/build/$(DIR) -L $(SDCC_BIN)/device/non-free/lib/build/$(DIR) ++CFLAGS += -I $(SDCC_SRC)/device/include/$(DIR) ++CFLAGS += -L $(SDCC_BIN)/device/lib/build/$(DIR) + #CFLAGS += --no-pcode-opt + #CFLAGS += -V + +diff --git a/support/regression/ports/pic14/spec.mk b/support/regression/ports/pic14/spec.mk +index a3dcc05..bef1c45 100644 +--- a/support/regression/ports/pic14/spec.mk ++++ b/support/regression/ports/pic14/spec.mk +@@ -12,13 +12,9 @@ endif + + ifndef SDCC_BIN_PATH + ifndef CROSSCOMPILING +- SDCCFLAGS += --nostdinc -I$(top_srcdir)/device/include/pic14 -I$(top_srcdir)/device/non-free/include/pic14 -I$(top_srcdir) +- LINKFLAGS += --nostdlib -L$(top_builddir)/device/lib/build/pic14 -L$(top_builddir)/device/non-free/lib/build/pic14 +- else +- SDCCFLAGS += --use-non-free ++ SDCCFLAGS += --nostdinc -I$(top_srcdir)/device/include/pic14 -I$(top_srcdir) ++ LINKFLAGS += --nostdlib -L$(top_builddir)/device/lib/build/pic14 + endif +-else +- SDCCFLAGS += --use-non-free + endif + + ifdef CROSSCOMPILING +@@ -26,7 +22,6 @@ ifdef CROSSCOMPILING + endif + + SDCCFLAGS += -mpic14 -pp16f877 --less-pedantic -Wl,-q +-SDCCFLAGS += --no-warn-non-free + LINKFLAGS += libsdcc.lib libm.lib + + OBJEXT = .o +diff --git a/support/regression/ports/pic16/spec.mk b/support/regression/ports/pic16/spec.mk +index 1f94cde..f1ac726 100644 +--- a/support/regression/ports/pic16/spec.mk ++++ b/support/regression/ports/pic16/spec.mk +@@ -12,13 +12,9 @@ endif + + ifndef SDCC_BIN_PATH + ifndef CROSSCOMPILING +- SDCCFLAGS += --nostdinc -I$(top_srcdir)/device/include/pic16 -I$(top_srcdir)/device/non-free/include/pic16 -I$(top_srcdir) +- LINKFLAGS += --nostdlib -L$(top_builddir)/device/lib/build/pic16 -L$(top_builddir)/device/non-free/lib/build/pic16 +- else +- SDCCFLAGS += --use-non-free ++ SDCCFLAGS += --nostdinc -I$(top_srcdir)/device/include/pic16 -I$(top_srcdir) ++ LINKFLAGS += --nostdlib -L$(top_builddir)/device/lib/build/pic16 + endif +-else +- SDCCFLAGS += --use-non-free + endif + + ifdef CROSSCOMPILING +@@ -27,7 +23,6 @@ endif + + SDCCFLAGS += -mpic16 -pp18f452 --less-pedantic -Wl,-q + SDCCFLAGS += --no-peep +-SDCCFLAGS += --no-warn-non-free + LINKFLAGS += libsdcc.lib libc18f.lib libm18f.lib + + OBJEXT = .o +diff --git a/support/scripts/cinc2h.pl b/support/scripts/cinc2h.pl +index 8558135..30d72b7 100755 +--- a/support/scripts/cinc2h.pl ++++ b/support/scripts/cinc2h.pl +@@ -39,58 +39,10 @@ + + ------------------------------------------------- + +- Steps to add a new target device to SDCC/PIC16: +- (Following Raphael Neider ) +- +- 1. Create the picDEVICE.c and picDEVICE.h from pDEVICE.inc using +- ./cinc2h.pl -p 18f4520 -cb -cp -gp "path/to/gputils_source" -o "path/to/output" +- +- 2. mv picDEVICE.h $SDCC/device/non-free/include/pic16 +- 3. mv picDEVICE.c $SDCC/device/non-free/lib/pic16/libdev +- 4. either +- +- (a) adjust $SDCC/device/lib/pic16/libio/*.ignore +- if the device does not support ADC, I2C, or USART +- --- OR --- +- (b) adjust +- * SDCC/scripts/pic18fam-h-gen.pl +- * SDCC/device/include/pic16/adc.h (if required) +- * SDCC/device/include/pic16/usart.h (if required) +- * SDCC/device/lib/pic16/libio/*/* (if required) +- to add the new device to the appropriate I/O style +- and implement new styles (if required). +- +- Having modified pic18fam-h-gen.pl, you need to run the +- script to generate pic18fam.h.gen, which in turn must +- then replace your .../include/pic16/pic18fam.h to take +- effect; see pic18fam-h-gen.pl for usage information. +- 6. edit $SDCC/device/include/pic16/pic18fregs.h +- 7. edit $SDCC/device/include/pic16/pic16devices.txt +- 8. run cd $SDCC/device/non-free/lib/pic16 && sh update.sh +- to regenerate .../libdev/Makefile.am and processors.ac +- +- The file format of steps 6 and 7 is self explanatory, in most +- if not all cases you can copy and paste another device's records +- and adjust them to the newly added device. +- +- ------------------------------------------------- +- +- Steps to add a new target device to SDCC/PIC14: +- +- 1. Create the picDEVICE.c and picDEVICE.h from pDEVICE.inc using +- ./cinc2h.pl -p 16f1503 -cb -cp -gp "path/to/gputils_source" -o "path/to/output" +- +- 2. mv picDEVICE.h $SDCC/device/non-free/include/pic14 +- 3. mv picDEVICE.c $SDCC/device/non-free/lib/pic14/libdev +- 4. add DEVICE to $SDCC/device/non-free/lib/pic14/libdev/devices.txt +- (The names of the enhanced devices the "# enhanced cores" line +- after follow.) +- +- 5. edit $SDCC/device/include/pic14/pic14devices.txt +- +- The file format of step 5 is self explanatory, in most if not all +- cases you can copy and paste another device's records and adjust +- them to the newly added device. ++ For its inclusion in the SDCC package distributed with GNU Guix ++ (https://guix.gnu.org/) this file has been modified from the ++ original to remove instructions on its use with non-free software ++ and to update the output of the print_license subroutine below. + + $Id: cinc2h.pl 9450 2016-01-09 16:47:43Z molnarkaroly $ + =cut +@@ -1345,10 +1297,9 @@ sub print_license($) + * Microchip header (.inc) and linker script (.lkr) files Microchip + * requires that "The header files should state that they are only to be + * used with authentic Microchip devices" which makes them incompatible +- * with the GPL. Pic device libraries and header files are located at +- * non-free/lib and non-free/include directories respectively. +- * Sdcc should be run with the --use-non-free command line option in +- * order to include non-free header files and libraries. ++ * with the GPL. These non-free libraries and header files (and the ++ * build and run-time options that enable their use) are omitted in the ++ * SDCC package distributed with GNU Guix. + * + * See http://sdcc.sourceforge.net/ for the latest information on sdcc. + */ +diff --git a/support/scripts/pic14-header-parser.pl b/support/scripts/pic14-header-parser.pl +index 4413c25..57c6076 100755 +--- a/support/scripts/pic14-header-parser.pl ++++ b/support/scripts/pic14-header-parser.pl +@@ -63,9 +63,7 @@ use constant P_SHOW_ONLY_NAME => 3; + + my @default_paths = + ( +- '/usr/share/sdcc/non-free/include', + '/usr/share/sdcc/include', +- '/usr/local/share/sdcc/non-free/include', + '/usr/local/share/sdcc/include' + ); + +diff --git a/support/scripts/pic16-header-parser.pl b/support/scripts/pic16-header-parser.pl +index 6db417a..4b35225 100755 +--- a/support/scripts/pic16-header-parser.pl ++++ b/support/scripts/pic16-header-parser.pl +@@ -62,9 +62,7 @@ use constant P_SHOW_ONLY_NAME => 3; + + my @default_paths = + ( +- '/usr/share/sdcc/non-free/include', + '/usr/share/sdcc/include', +- '/usr/local/share/sdcc/non-free/include', + '/usr/local/share/sdcc/include' + ); + +diff --git a/support/scripts/sdcc.nsi b/support/scripts/sdcc.nsi +index 5086181..9527244 100644 +--- a/support/scripts/sdcc.nsi ++++ b/support/scripts/sdcc.nsi +@@ -477,11 +477,6 @@ ${Section} "SDCC include files" SEC05 + + SetOutPath "$INSTDIR\include" + File "${DEV_ROOT}\include\*.h" +- +- SetOutPath "$INSTDIR\non-free\include\pic14" +- File "${DEV_ROOT}\non-free\include\pic14\*.h" +- SetOutPath "$INSTDIR\non-free\include\pic16" +- File "${DEV_ROOT}\non-free\include\pic16\*.h" + ${SectionEnd} + + ${Section} "SDCC DS390 library" SEC06 +@@ -579,18 +574,12 @@ ${Section} "SDCC PIC16 library" SEC21 + SetOutPath "$INSTDIR\lib\pic16" + File "${DEV_ROOT}\lib\pic16\*.o" + File "${DEV_ROOT}\lib\pic16\*.lib" +- +- SetOutPath "$INSTDIR\non-free\lib\pic16" +- File "${DEV_ROOT}\non-free\lib\pic16\*.lib" + ${SectionEnd} + + ${Section} "SDCC PIC14 library" SEC22 + SectionIn 1 2 + SetOutPath "$INSTDIR\lib\pic14" + File "${DEV_ROOT}\lib\pic14\*.lib" +- +- SetOutPath "$INSTDIR\non-free\lib\pic14" +- File "${DEV_ROOT}\non-free\lib\pic14\*.lib" + ${SectionEnd} + + ${Section} "SDCC STM8 library" SEC23 +@@ -691,10 +680,6 @@ ${Section} "SDCC library sources" SEC25 + File "${DEV_ROOT}\lib\src\pic14\libsdcc\enhanced\*.inc" + # File "${DEV_ROOT}\lib\src\pic14\libsdcc\Makefile" + +- SetOutPath "$INSTDIR\non-free\lib\src\pic14\libdev" +- File "${DEV_ROOT}\non-free\lib\src\pic14\libdev\*.c" +-# File "${DEV_ROOT}\non-free\lib\src\pic14\libdev\Makefile" +- + SetOutPath "$INSTDIR\lib\src\pic14\libm" + File "${DEV_ROOT}\lib\src\pic14\libm\*.c" + +@@ -746,10 +731,6 @@ ${Section} "SDCC library sources" SEC25 + File "${DEV_ROOT}\lib\src\pic16\libc\utils\*.S" + # File "${DEV_ROOT}\lib\src\pic16\libc\utils\Makefile" + +- SetOutPath "$INSTDIR\non-free\lib\src\pic16\libdev" +- File "${DEV_ROOT}\non-free\lib\src\pic16\libdev\*.c" +-# File "${DEV_ROOT}\non-free\lib\src\pic16\libdev\Makefile" +- + SetOutPath "$INSTDIR\lib\src\pic16\libio" + File "${DEV_ROOT}\lib\src\pic16\libio\*.ignore" + # File "${DEV_ROOT}\lib\src\pic16\libio\Makefile" +@@ -1003,13 +984,9 @@ ${Section} Uninstall SECUNINSTALL + + Delete "$INSTDIR\lib\pic14\*.lib" + +- Delete "$INSTDIR\non-free\lib\pic14\*.lib" +- + Delete "$INSTDIR\lib\pic16\*.o" + Delete "$INSTDIR\lib\pic16\*.lib" + +- Delete "$INSTDIR\non-free\lib\pic16\*.lib" +- + Delete "$INSTDIR\lib\hc08\*.lib" + + Delete "$INSTDIR\lib\s08\*.lib" +@@ -1059,9 +1036,7 @@ ${Section} Uninstall SECUNINSTALL + Delete "$INSTDIR\include\pic14\*.h" + Delete "$INSTDIR\include\pic14\*.txt" + Delete "$INSTDIR\include\pic14\*.inc" +- Delete "$INSTDIR\non-free\include\pic14\*.h" + Delete "$INSTDIR\include\pic16\*.h" +- Delete "$INSTDIR\non-free\include\pic16\*.h" + Delete "$INSTDIR\include\pic16\*.txt" + Delete "$INSTDIR\include\mcs51\*.h" + Delete "$INSTDIR\include\hc08\*.h" +@@ -1119,9 +1094,7 @@ ${Section} Uninstall SECUNINSTALL + Delete "$INSTDIR\uninstall.exe" + + RMDir /r "$INSTDIR\lib\src\pic14" +- RMDir /r "$INSTDIR\non-free\lib\src\pic14" + RMDir /r "$INSTDIR\lib\src\pic16" +- RMDir /r "$INSTDIR\non-free\lib\src\pic16" + RMDir "$INSTDIR\lib\src\small" + RMDir "$INSTDIR\lib\src\medium" + RMDir "$INSTDIR\lib\src\large" +@@ -1138,12 +1111,9 @@ ${Section} Uninstall SECUNINSTALL + RMDir "$INSTDIR\lib\src\s08" + RMDir "$INSTDIR\lib\src\stm8" + RMDir "$INSTDIR\lib\src" +- RMDir "$INSTDIR\non-free\lib\src" + + RMDir "$INSTDIR\lib\pic14" +- RMDir "$INSTDIR\non-free\lib\pic14" + RMDir "$INSTDIR\lib\pic16" +- RMDir "$INSTDIR\non-free\lib\pic16" + RMDir "$INSTDIR\lib\z80" + RMDir "$INSTDIR\lib\z180" + RMDir "$INSTDIR\lib\r2k" +@@ -1160,16 +1130,13 @@ ${Section} Uninstall SECUNINSTALL + RMDir "$INSTDIR\lib\s08" + RMDir "$INSTDIR\lib\stm8" + RMDir "$INSTDIR\lib" +- RMDir "$INSTDIR\non-free\lib" + + RMDir "$INSTDIR\include\asm\z80" + RMDir "$INSTDIR\include\asm\z180" + RMDir "$INSTDIR\include\asm\r2k" + RMDir "$INSTDIR\include\asm\r3ka" + RMDir "$INSTDIR\include\asm\pic16" +- RMDir "$INSTDIR\non-free\include\asm\pic16" + RMDir "$INSTDIR\include\asm\pic14" +- RMDir "$INSTDIR\non-free\include\asm\pic14" + RMDir "$INSTDIR\include\asm\mcs51" + RMDir "$INSTDIR\include\asm\gbz80" + RMDir "$INSTDIR\include\asm\ds390" +@@ -1178,17 +1145,12 @@ ${Section} Uninstall SECUNINSTALL + RMDir "$INSTDIR\include\asm" + RMDir "$INSTDIR\include\z180" + RMDir "$INSTDIR\include\pic14" +- RMDir "$INSTDIR\non-free\include\pic14" + RMDir "$INSTDIR\include\pic16" +- RMDir "$INSTDIR\non-free\include\pic16" + RMDir "$INSTDIR\include\mcs51" + RMDir "$INSTDIR\include\hc08" + RMDir "$INSTDIR\include\ds400" + RMDir "$INSTDIR\include\ds390" + RMDir "$INSTDIR\include" +- RMDir "$INSTDIR\non-free\include" +- +- RMDir "$INSTDIR\non-free" + + !ifdef FULL_DOC + RMDir /r "$INSTDIR\doc" +diff --git a/support/scripts/sdcc_cygwin_mingw32 b/support/scripts/sdcc_cygwin_mingw32 +index 5575663..2588d4f 100755 +--- a/support/scripts/sdcc_cygwin_mingw32 ++++ b/support/scripts/sdcc_cygwin_mingw32 +@@ -6,9 +6,7 @@ + --datarootdir="/sdcc" \ + docdir="\${datarootdir}/doc" \ + include_dir_suffix="include" \ +-non_free_include_dir_suffix="non-free/include" \ + lib_dir_suffix="lib" \ +-non_free_lib_dir_suffix="non-free/lib" \ + sdccconf_h_dir_separator="\\\\" \ + CC="gcc -mno-cygwin" \ + CXX="g++ -mno-cygwin" +diff --git a/support/scripts/sdcc_mingw32 b/support/scripts/sdcc_mingw32 +index 96e3280..050761e 100755 +--- a/support/scripts/sdcc_mingw32 ++++ b/support/scripts/sdcc_mingw32 +@@ -19,9 +19,7 @@ export SDCCCONFIGUREFLAGS=" \ + --datarootdir=/sdcc \ + docdir=\${datarootdir}/doc \ + include_dir_suffix=include \ +-non_free_include_dir_suffix=non-free/include \ + lib_dir_suffix=lib \ +-non_free_lib_dir_suffix=non-free/lib \ + sdccconf_h_dir_separator=\\\\ \ + --disable-device-lib \ + --host=i586-mingw32msvc --build=unknown-unknown-linux-gnu" diff --git a/gnu/packages/sdcc.scm b/gnu/packages/sdcc.scm index 6d05470101..aad2cf9e62 100644 --- a/gnu/packages/sdcc.scm +++ b/gnu/packages/sdcc.scm @@ -18,6 +18,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages sdcc) + #:use-module (gnu packages) #:use-module (gnu packages bison) #:use-module (gnu packages boost) #:use-module (gnu packages flex) @@ -39,7 +40,14 @@ "/" version "/sdcc-src-" version ".tar.bz2")) (sha256 (base32 - "13llvx0j3v5qa7qd4fh7nix4j3alpd3ccprxvx163c4q8q4lfkc5")))) + "13llvx0j3v5qa7qd4fh7nix4j3alpd3ccprxvx163c4q8q4lfkc5")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove non-free source files + (delete-file-recursively "device/non-free") + #t)) + (patches (search-patches "sdcc-disable-non-free-code.patch")))) (build-system gnu-build-system) (native-inputs `(("bison" ,bison) -- cgit v1.2.3 From 29cf85b85793724aa0f1de2b5cda7f70cdb1752f Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Tue, 10 Nov 2020 16:10:17 +0100 Subject: gnu: oath-toolkit: Update to 2.6.3. * gnu/packages/authentication.scm (oath-toolkit): Update to 2.6.3. [source]: Remove obsolete patches. * gnu/packages/patches/oath-toolkit-glibc-compat.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. Signed-off-by: Leo Famulari --- gnu/local.mk | 1 - gnu/packages/authentication.scm | 16 +--- .../patches/oath-toolkit-glibc-compat.patch | 90 ---------------------- 3 files changed, 2 insertions(+), 105 deletions(-) delete mode 100644 gnu/packages/patches/oath-toolkit-glibc-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 288784b427..c2b2143213 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1387,7 +1387,6 @@ dist_patch_DATA = \ %D%/packages/patches/nvi-dbpagesize-binpower.patch \ %D%/packages/patches/nvi-db4.patch \ %D%/packages/patches/nyacc-binary-literals.patch \ - %D%/packages/patches/oath-toolkit-glibc-compat.patch \ %D%/packages/patches/ocaml-bitstring-fix-configure.patch \ %D%/packages/patches/ocaml-CVE-2015-8869.patch \ %D%/packages/patches/ocaml-Add-a-.file-directive.patch \ diff --git a/gnu/packages/authentication.scm b/gnu/packages/authentication.scm index b3ff912c8f..52ab445775 100644 --- a/gnu/packages/authentication.scm +++ b/gnu/packages/authentication.scm @@ -33,26 +33,14 @@ (define-public oath-toolkit (package (name "oath-toolkit") - (version "2.6.2") + (version "2.6.3") (source (origin (method url-fetch) (uri (string-append "https://download.savannah.nongnu.org/releases/" name "/" name "-" version ".tar.gz")) - (patches - (append (search-patches "oath-toolkit-glibc-compat.patch") - (list (origin - ;; This huge commit updates gnulib for GCC 7 compatibility. - (method url-fetch) - (uri (string-append - "https://gitlab.com/oath-toolkit/oath-toolkit/commit/" - "2fffce2a471f74a585939c84cce16ef3015e5d3d.diff")) - (file-name "oath-toolkit-update-gnulib.patch") - (sha256 - (base32 - "088c9s4ay1b54bjqc4mwfs5l3f6357zj5vpw771zlq5g4addd4s0")))))) (sha256 - (base32 "182ah8vfbg0yhv6mh1b6ap944d0na6x7lpfkwkmzb6jl9gx4cd5h")))) + (base32 "1cjial8njck2sd7452jcxspbi5h5fnp3n8v3wbmlw8fzqmgzvxx1")))) (build-system gnu-build-system) (arguments ;; TODO ‘--enable-pskc’ causes xmlsec-related test suite failures. diff --git a/gnu/packages/patches/oath-toolkit-glibc-compat.patch b/gnu/packages/patches/oath-toolkit-glibc-compat.patch deleted file mode 100644 index 22814599e5..0000000000 --- a/gnu/packages/patches/oath-toolkit-glibc-compat.patch +++ /dev/null @@ -1,90 +0,0 @@ -Adjust the bundled Gnulib to cope with removal of libio interface in Glibc 2.28. - -Based on this upstream gnulib patch: -https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4af4a4a71827c0bc5e0ec67af23edef4f15cee8e - ---- a/liboath/gl/fflush.c -+++ b/liboath/gl/fflush.c -@@ -33,7 +33,7 @@ - #undef fflush - - --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - - /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */ - static void -@@ -72,7 +72,7 @@ - - #endif - --#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) -+#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) - - # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT - /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ -@@ -148,7 +148,7 @@ - if (stream == NULL || ! freading (stream)) - return fflush (stream); - --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - - clear_ungetc_buffer_preserving_position (stream); - ---- a/liboath/gl/fpurge.c -+++ b/liboath/gl/fpurge.c -@@ -62,7 +62,7 @@ - /* Most systems provide FILE as a struct and the necessary bitmask in - , because they need it for implementing getc() and putc() as - fast macros. */ --# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - fp->_IO_read_end = fp->_IO_read_ptr; - fp->_IO_write_ptr = fp->_IO_write_base; - /* Avoid memory leak when there is an active ungetc buffer. */ ---- a/libaoth/gl/freading.c -+++ b/liboath/gl/freading.c -@@ -31,7 +31,7 @@ - /* Most systems provide FILE as a struct and the necessary bitmask in - , because they need it for implementing getc() and putc() as - fast macros. */ --# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - return ((fp->_flags & _IO_NO_WRITES) != 0 - || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0 - && fp->_IO_read_base != NULL)); ---- a/liboath/gl/fseeko.c -+++ b/liboath/gl/fseeko.c -@@ -47,7 +47,7 @@ - #endif - - /* These tests are based on fpurge.c. */ --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - if (fp->_IO_read_end == fp->_IO_read_ptr - && fp->_IO_write_ptr == fp->_IO_write_base - && fp->_IO_save_base == NULL) -@@ -123,7 +123,7 @@ - return -1; - } - --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - fp->_flags &= ~_IO_EOF_SEEN; - fp->_offset = pos; - #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ ---- a/liboath/gl/stdio-impl.h -+++ b/liboath/gl/stdio-impl.h -@@ -18,6 +18,11 @@ - the same implementation of stdio extension API, except that some fields - have different naming conventions, or their access requires some casts. */ - -+/* Glibc 2.28 made _IO_IN_BACKUP private, so define it here for now. */ -+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN -+# define _IO_IN_BACKUP 0x100 -+#endif -+ - /* BSD stdio derived implementations. */ - - #if defined __NetBSD__ /* NetBSD */ -- cgit v1.2.3 From d71f9e6f1611e8be13f89379ed4d1b32f72e5e50 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Wed, 11 Nov 2020 00:15:33 -0500 Subject: gnu: icecat: Update to 78.4.1-guix0-preview1 [fixes CVE-2020-26950]. * gnu/packages/gnuzilla.scm (%icecat-version, %icecat-build-id): Update. (icecat-source): Update gnuzilla commit, base version, and hashes. * gnu/packages/patches/icecat-makeicecat.patch: Adapt to new version. --- gnu/packages/gnuzilla.scm | 12 ++++++------ gnu/packages/patches/icecat-makeicecat.patch | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index b6e68c8132..39b4d9f7c1 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -550,8 +550,8 @@ from forcing GEXP-PROMISE." #:system system #:guile-for-build guile))) -(define %icecat-version "78.4.0-guix0-preview1") -(define %icecat-build-id "20201019000000") ;must be of the form YYYYMMDDhhmmss +(define %icecat-version "78.4.1-guix0-preview1") +(define %icecat-build-id "20201110000000") ;must be of the form YYYYMMDDhhmmss ;; 'icecat-source' is a "computed" origin that generates an IceCat tarball ;; from the corresponding upstream Firefox ESR tarball, using the 'makeicecat' @@ -573,11 +573,11 @@ from forcing GEXP-PROMISE." "firefox-" upstream-firefox-version ".source.tar.xz")) (sha256 (base32 - "1z3hj45bnd12z3g6ajv9qrgclca7fymi1sxj9l9nh9q6y6xz0g4f")))) + "0q57b0s6xhps4dzp2cih4ajdj6hdas0j6jx0sidzj72vjzfywy0r")))) - (upstream-icecat-base-version "78.4.0") ; maybe older than base-version + (upstream-icecat-base-version "78.4.1") ; maybe older than base-version ;;(gnuzilla-commit (string-append "v" upstream-icecat-base-version)) - (gnuzilla-commit "05adddbf87a5ee11de7cd90794c331a178bcfd5c") + (gnuzilla-commit "df2c2e22a0c6ea5b4dcaed52884223bfa6ffacde") (gnuzilla-source (origin (method git-fetch) @@ -589,7 +589,7 @@ from forcing GEXP-PROMISE." (string-take gnuzilla-commit 8))) (sha256 (base32 - "128h0gnn1adinjkfmskxdjkvyh60li8czlar2xdjn2b6myiq5yny")))) + "1y1p2g9xvqsg0im58lhdkrp8z0zlxw6i3qqplqdpbidmjwibmqjz")))) ;; 'search-patch' returns either a valid file name or #f, so wrap it ;; in 'assume-valid-file-name' to avoid 'local-file' warnings. diff --git a/gnu/packages/patches/icecat-makeicecat.patch b/gnu/packages/patches/icecat-makeicecat.patch index e0cdde61ec..f82df9f68e 100644 --- a/gnu/packages/patches/icecat-makeicecat.patch +++ b/gnu/packages/patches/icecat-makeicecat.patch @@ -25,7 +25,7 @@ index 8be2362..48716f2 100755 -wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc -gpg --recv-keys --keyserver keyserver.ubuntu.com 14F26682D0916CDD81E37B6D61B7B526D98F0353 -gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc --echo -n 8e3cf0bbf1062768134db2eb10ab774731ca5ec6694b65def82234bb0a9170fc firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - +-echo -n 1978eedd975b1cf95bd4a04b2381560d1ad9a4223032717f23fac26e3458a760 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - - -echo Extracting Firefox tarball -tar -xf firefox-${FFVERSION}esr.source.tar.xz @@ -37,7 +37,7 @@ index 8be2362..48716f2 100755 +# wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc +# gpg --recv-keys --keyserver keyserver.ubuntu.com 14F26682D0916CDD81E37B6D61B7B526D98F0353 +# gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc -+# echo -n 8e3cf0bbf1062768134db2eb10ab774731ca5ec6694b65def82234bb0a9170fc firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - ++# echo -n 1978eedd975b1cf95bd4a04b2381560d1ad9a4223032717f23fac26e3458a760 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - +# +# echo Extracting Firefox tarball +# tar -xf firefox-${FFVERSION}esr.source.tar.xz -- cgit v1.2.3 From ae10ec441aa524bf267f9cefd4a319b44d0b8b44 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 12 Nov 2020 16:35:24 +0100 Subject: gnu: glib: Graft patch to detect changes to the installed applications. Fixes . Reported by sirgazil and others. * gnu/packages/patches/glib-appinfo-watch.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/glib.scm (glib)[replacement]: New field. (glib-with-gio-patch): New variable. (glib-with-documentation): Use 'package/inherit'. --- gnu/local.mk | 1 + gnu/packages/glib.scm | 14 +++- gnu/packages/patches/glib-appinfo-watch.patch | 92 +++++++++++++++++++++++++++ 3 files changed, 105 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/glib-appinfo-watch.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index d5a13cbdbd..2301a04d2f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1050,6 +1050,7 @@ dist_patch_DATA = \ %D%/packages/patches/ghostscript-no-header-id.patch \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ + %D%/packages/patches/glib-appinfo-watch.patch \ %D%/packages/patches/glib-tests-timer.patch \ %D%/packages/patches/glibc-CVE-2018-11236.patch \ %D%/packages/patches/glibc-CVE-2018-11237.patch \ diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 901222476a..43523e516d 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -181,6 +181,7 @@ shared NFS home directories.") (package (name "glib") (version "2.62.6") + (replacement glib-with-gio-patch) (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" @@ -387,11 +388,20 @@ dynamic loading, and an object system.") (home-page "https://developer.gnome.org/glib/") (license license:lgpl2.1+))) +(define glib-with-gio-patch + ;; GLib with a fix for . + ;; TODO: Fold into 'glib' above in the next rebuild cycle. + (package + (inherit glib) + (source (origin + (inherit (package-source glib)) + (patches (cons (search-patch "glib-appinfo-watch.patch") + (origin-patches (package-source glib)))))))) + (define-public glib-with-documentation ;; glib's doc must be built in a separate package since it requires gtk-doc, ;; which in turn depends on glib. - (package - (inherit glib) + (package/inherit glib (properties (alist-delete 'hidden? (package-properties glib))) (outputs (cons "doc" (package-outputs glib))) ; 20 MiB of GTK-Doc reference (native-inputs diff --git a/gnu/packages/patches/glib-appinfo-watch.patch b/gnu/packages/patches/glib-appinfo-watch.patch new file mode 100644 index 0000000000..638a5e0949 --- /dev/null +++ b/gnu/packages/patches/glib-appinfo-watch.patch @@ -0,0 +1,92 @@ +This patch lets GLib's GDesktopAppInfo API watch and notice changes +to the Guix user and system profiles. That way, the list of available +applications shown by the desktop environment is immediately updated +when the user runs "guix install", "guix remove", or "guix system +reconfigure" (see ). + +It does so by monitoring /var/guix/profiles (for changes to the system +profile) and /var/guix/profiles/per-user/USER (for changes to the user +profile) and crawling their share/applications sub-directory when +changes happen. + +diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c +index f1e2fdd..095c110 100644 +--- a/gio/gdesktopappinfo.c ++++ b/gio/gdesktopappinfo.c +@@ -148,6 +148,7 @@ typedef struct + gchar *alternatively_watching; + gboolean is_config; + gboolean is_setup; ++ gchar *guix_profile_watch_dir; + GFileMonitor *monitor; + GHashTable *app_names; + GHashTable *mime_tweaks; +@@ -180,6 +181,7 @@ desktop_file_dir_unref (DesktopFileDir *dir) + { + desktop_file_dir_reset (dir); + g_free (dir->path); ++ g_free (dir->guix_profile_watch_dir); + g_free (dir); + } + } +@@ -204,6 +206,13 @@ desktop_file_dir_get_alternative_dir (DesktopFileDir *dir) + { + gchar *parent; + ++ /* If DIR is a profile, watch the specified directory--e.g., ++ * /var/guix/profiles/per-user/$USER/ for the user profile. Do not watch ++ * ~/.guix-profile or /run/current-system/profile because GFileMonitor does ++ * not pass IN_DONT_FOLLOW and thus cannot notice any change. */ ++ if (dir->guix_profile_watch_dir != NULL) ++ return g_strdup (dir->guix_profile_watch_dir); ++ + /* If the directory itself exists then we need no alternative. */ + if (g_access (dir->path, R_OK | X_OK) == 0) + return NULL; +@@ -249,11 +258,11 @@ desktop_file_dir_changed (GFileMonitor *monitor, + * + * If this is a notification for a parent directory (because the + * desktop directory didn't exist) then we shouldn't fire the signal +- * unless something actually changed. ++ * unless something actually changed or it's in /var/guix/profiles. + */ + g_mutex_lock (&desktop_file_dir_lock); + +- if (dir->alternatively_watching) ++ if (dir->alternatively_watching && dir->guix_profile_watch_dir == NULL) + { + gchar *alternative_dir; + +@@ -1555,6 +1564,32 @@ desktop_file_dirs_lock (void) + for (i = 0; dirs[i]; i++) + g_ptr_array_add (desktop_file_dirs, desktop_file_dir_new (dirs[i])); + ++ { ++ /* Monitor the system and user profile under /var/guix/profiles and ++ * treat modifications to them as if they were modifications to their ++ * /share sub-directory. */ ++ const gchar *user; ++ DesktopFileDir *system_profile_dir, *user_profile_dir; ++ ++ system_profile_dir = ++ desktop_file_dir_new ("/var/guix/profiles/system/profile/share"); ++ system_profile_dir->guix_profile_watch_dir = g_strdup ("/var/guix/profiles"); ++ g_ptr_array_add (desktop_file_dirs, desktop_file_dir_ref (system_profile_dir)); ++ ++ user = g_get_user_name (); ++ if (user != NULL) ++ { ++ gchar *profile_dir, *user_data_dir; ++ ++ profile_dir = g_build_filename ("/var/guix/profiles/per-user", user, NULL); ++ user_data_dir = g_build_filename (profile_dir, "guix-profile", "share", NULL); ++ user_profile_dir = desktop_file_dir_new (user_data_dir); ++ user_profile_dir->guix_profile_watch_dir = profile_dir; ++ g_ptr_array_add (desktop_file_dirs, desktop_file_dir_ref (user_profile_dir)); ++ g_free (user_data_dir); ++ } ++ } ++ + /* The list of directories will never change after this, unless + * g_get_user_config_dir() changes due to %G_TEST_OPTION_ISOLATE_DIRS. */ + desktop_file_dirs_config_dir = user_config_dir; -- cgit v1.2.3 From 9e4c24ef90545e242539a16a5ea28d7effc45933 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 14 Nov 2020 01:10:29 -0500 Subject: gnu: llvm-9: Standardize patch level. Having a non-standard (different than 1) patch level requirement means the patches cannot be composed easily from different origins. The following command was used to remove one level from the llvm-9 patches: sed -e 's|^--- a/|--- |' -e 's|^+++ b/|+++ |' \ gnu/packages/patches/llvm-9* -i * gnu/packages/llvm.scm (llvm-9)[source]: Drop the patch-flags field. Re-indent list of patches. * gnu/packages/patches/llvm-9-fix-bitcast-miscompilation.patch: Strip one level. * gnu/packages/patches/llvm-9-fix-lpad-miscompilation.patch: Likewise. * gnu/packages/patches/llvm-9-fix-scev-miscompilation.patch: Likewise. --- gnu/packages/llvm.scm | 7 +++---- .../patches/llvm-9-fix-bitcast-miscompilation.patch | 8 ++++---- .../patches/llvm-9-fix-lpad-miscompilation.patch | 8 ++++---- .../patches/llvm-9-fix-scev-miscompilation.patch | 20 ++++++++++---------- 4 files changed, 21 insertions(+), 22 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index b2b80572fb..1560d5900b 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -602,11 +602,10 @@ of programming tools as well as libraries with equivalent functionality.") (sha256 (base32 "16hwp3qa54c3a3v7h8nlw0fh5criqh0hlr1skybyk0cz70gyx880")) - (patch-flags '("-p2")) (patches (search-patches - "llvm-9-fix-bitcast-miscompilation.patch" - "llvm-9-fix-scev-miscompilation.patch" - "llvm-9-fix-lpad-miscompilation.patch")))))) + "llvm-9-fix-bitcast-miscompilation.patch" + "llvm-9-fix-scev-miscompilation.patch" + "llvm-9-fix-lpad-miscompilation.patch")))))) (define-public clang-runtime-9 (clang-runtime-from-llvm diff --git a/gnu/packages/patches/llvm-9-fix-bitcast-miscompilation.patch b/gnu/packages/patches/llvm-9-fix-bitcast-miscompilation.patch index fe381acf1b..ec8e888618 100644 --- a/gnu/packages/patches/llvm-9-fix-bitcast-miscompilation.patch +++ b/gnu/packages/patches/llvm-9-fix-bitcast-miscompilation.patch @@ -36,8 +36,8 @@ Differential Revision: https://reviews.llvm.org/D70844 diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp index 2c9ba203fbf3..0af3de300e77 100644 ---- a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp -+++ b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp +--- llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp ++++ llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp @@ -18,6 +18,7 @@ #include "llvm/IR/DIBuilder.h" #include "llvm/IR/PatternMatch.h" @@ -158,8 +158,8 @@ index 2c9ba203fbf3..0af3de300e77 100644 diff --git a/llvm/test/Transforms/InstCombine/cast.ll b/llvm/test/Transforms/InstCombine/cast.ll index b6d1eda0601d..3ce8de033422 100644 ---- a/llvm/test/Transforms/InstCombine/cast.ll -+++ b/llvm/test/Transforms/InstCombine/cast.ll +--- llvm/test/Transforms/InstCombine/cast.ll ++++ llvm/test/Transforms/InstCombine/cast.ll @@ -824,7 +824,7 @@ define i64 @test59(i8 %A, i8 %B) { define <3 x i32> @test60(<4 x i32> %call4) { diff --git a/gnu/packages/patches/llvm-9-fix-lpad-miscompilation.patch b/gnu/packages/patches/llvm-9-fix-lpad-miscompilation.patch index 6cfe07e50a..9a97d82ddc 100644 --- a/gnu/packages/patches/llvm-9-fix-lpad-miscompilation.patch +++ b/gnu/packages/patches/llvm-9-fix-lpad-miscompilation.patch @@ -15,8 +15,8 @@ PR45261 diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index 5ac3606dc662..2638b1e8a05c 100644 ---- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp -+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +--- llvm/lib/CodeGen/SelectionDAG/FastISel.cpp ++++ llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -225,6 +225,21 @@ static bool isRegUsedByPhiNodes(unsigned DefReg, return false; } @@ -50,8 +50,8 @@ index 5ac3606dc662..2638b1e8a05c 100644 } diff --git a/llvm/test/CodeGen/X86/sink-local-value.ll b/llvm/test/CodeGen/X86/sink-local-value.ll index b0e511ac1189..f7d861ac9b6c 100644 ---- a/llvm/test/CodeGen/X86/sink-local-value.ll -+++ b/llvm/test/CodeGen/X86/sink-local-value.ll +--- llvm/test/CodeGen/X86/sink-local-value.ll ++++ llvm/test/CodeGen/X86/sink-local-value.ll @@ -145,6 +145,42 @@ try.cont: ; preds = %entry, %lpad ; CHECK: retl diff --git a/gnu/packages/patches/llvm-9-fix-scev-miscompilation.patch b/gnu/packages/patches/llvm-9-fix-scev-miscompilation.patch index 3f16de5a2b..ec37dc16fd 100644 --- a/gnu/packages/patches/llvm-9-fix-scev-miscompilation.patch +++ b/gnu/packages/patches/llvm-9-fix-scev-miscompilation.patch @@ -21,8 +21,8 @@ llvm-svn: 373184 diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 354ae05bb841..c29fc5dbccfb 100644 ---- a/llvm/lib/Analysis/ScalarEvolution.cpp -+++ b/llvm/lib/Analysis/ScalarEvolution.cpp +--- llvm/lib/Analysis/ScalarEvolution.cpp ++++ llvm/lib/Analysis/ScalarEvolution.cpp @@ -4992,7 +4992,7 @@ const SCEV *ScalarEvolution::createSimpleAffineAddRec(PHINode *PN, // overflow. if (auto *BEInst = dyn_cast(BEValueV)) @@ -34,8 +34,8 @@ index 354ae05bb841..c29fc5dbccfb 100644 } diff --git a/llvm/test/Analysis/ScalarEvolution/limit-depth.ll b/llvm/test/Analysis/ScalarEvolution/limit-depth.ll index db68a4f84c91..6fdf8c5df974 100644 ---- a/llvm/test/Analysis/ScalarEvolution/limit-depth.ll -+++ b/llvm/test/Analysis/ScalarEvolution/limit-depth.ll +--- llvm/test/Analysis/ScalarEvolution/limit-depth.ll ++++ llvm/test/Analysis/ScalarEvolution/limit-depth.ll @@ -46,7 +46,7 @@ define void @test_mul(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f) { define void @test_sext(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f) { ; CHECK-LABEL: @test_sext @@ -47,8 +47,8 @@ index db68a4f84c91..6fdf8c5df974 100644 diff --git a/llvm/test/Analysis/ScalarEvolution/nsw.ll b/llvm/test/Analysis/ScalarEvolution/nsw.ll index 69427368625d..ca24f9d4a04b 100644 ---- a/llvm/test/Analysis/ScalarEvolution/nsw.ll -+++ b/llvm/test/Analysis/ScalarEvolution/nsw.ll +--- llvm/test/Analysis/ScalarEvolution/nsw.ll ++++ llvm/test/Analysis/ScalarEvolution/nsw.ll @@ -163,7 +163,7 @@ bb5: ; preds = %bb2 declare void @f(i32) @@ -60,8 +60,8 @@ index 69427368625d..ca24f9d4a04b 100644 %add = add nsw i32 %v, 1 diff --git a/llvm/test/Analysis/ScalarEvolution/trip-count12.ll b/llvm/test/Analysis/ScalarEvolution/trip-count12.ll index 5e7d72d5e4f3..d0086ee2e6ac 100644 ---- a/llvm/test/Analysis/ScalarEvolution/trip-count12.ll -+++ b/llvm/test/Analysis/ScalarEvolution/trip-count12.ll +--- llvm/test/Analysis/ScalarEvolution/trip-count12.ll ++++ llvm/test/Analysis/ScalarEvolution/trip-count12.ll @@ -1,7 +1,7 @@ ; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s @@ -73,8 +73,8 @@ index 5e7d72d5e4f3..d0086ee2e6ac 100644 define zeroext i16 @test(i16* nocapture %p, i32 %len) nounwind readonly { diff --git a/llvm/test/Analysis/ScalarEvolution/trip-count9.ll b/llvm/test/Analysis/ScalarEvolution/trip-count9.ll index c0a1d12fa00e..9a080b34743f 100644 ---- a/llvm/test/Analysis/ScalarEvolution/trip-count9.ll -+++ b/llvm/test/Analysis/ScalarEvolution/trip-count9.ll +--- llvm/test/Analysis/ScalarEvolution/trip-count9.ll ++++ llvm/test/Analysis/ScalarEvolution/trip-count9.ll @@ -179,7 +179,7 @@ exit: } -- cgit v1.2.3 From 2c560aa217284c3152378e5c79f0519d78cba226 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 14 Nov 2020 15:47:00 +0100 Subject: gnu: perl-www-curl: Fix build with curl@7.69.1. * gnu/packages/web.scm (perl-www-curl)[source]: Add perl-www-curl-fix-struct-void.patch. * gnu/packages/patches/perl-www-curl-remove-symbol.patch: Update. * gnu/packages/patches/perl-www-curl-fix-struct-void.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + .../patches/perl-www-curl-fix-struct-void.patch | 24 +++++++++++++++++++++ .../patches/perl-www-curl-remove-symbol.patch | Bin 1177 -> 984 bytes gnu/packages/web.scm | 4 ++-- 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/perl-www-curl-fix-struct-void.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index b5f9c56324..6a0f378bb0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1450,6 +1450,7 @@ dist_patch_DATA = \ %D%/packages/patches/perl-text-markdown-discount-unbundle.patch \ %D%/packages/patches/perl-module-pluggable-search.patch \ %D%/packages/patches/perl-reproducible-build-date.patch \ + %D%/packages/patches/perl-www-curl-fix-struct-void.patch \ %D%/packages/patches/perl-www-curl-remove-symbol.patch \ %D%/packages/patches/picard-fix-id3-rename-test.patch \ %D%/packages/patches/picprog-non-intel-support.patch \ diff --git a/gnu/packages/patches/perl-www-curl-fix-struct-void.patch b/gnu/packages/patches/perl-www-curl-fix-struct-void.patch new file mode 100644 index 0000000000..b150950668 --- /dev/null +++ b/gnu/packages/patches/perl-www-curl-fix-struct-void.patch @@ -0,0 +1,24 @@ +From: Tobias Geerinckx-Rice +Date: Sat, 14 Nov 2020 15:40:56 +0100 +Subject: [PATCH] gnu: perl-www-curl: Fix struct void* usage. + +Copied verbatim from Gentoo[0]. Fixes: + + Curl.xs:76:12: error: expected ‘{’ before ‘void’ + struct void *curlm; + ^~~~ + Curl.xs:76:12: error: two or more data types in declaration specifiers + +[0]: https://694466.bugs.gentoo.org/attachment.cgi?id=595098 + +--- WWW-Curl-4.17/Curl.xs 2014-02-21 18:08:30.000000000 +0200 ++++ WWW-Curl-4.17.new/Curl.xs 2019-11-05 21:44:55.434395739 +0200 +@@ -73,7 +73,7 @@ typedef struct { + #ifdef __CURL_MULTI_H + struct CURLM *curlm; + #else +- struct void *curlm; ++ void *curlm; + #endif + } perl_curl_multi; + diff --git a/gnu/packages/patches/perl-www-curl-remove-symbol.patch b/gnu/packages/patches/perl-www-curl-remove-symbol.patch index ae3486708b..c32a34897b 100644 Binary files a/gnu/packages/patches/perl-www-curl-remove-symbol.patch and b/gnu/packages/patches/perl-www-curl-remove-symbol.patch differ diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 0bfaa3b9d7..8947889cd7 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -4423,14 +4423,14 @@ RFC 6570.") (uri (string-append "mirror://cpan/authors/id/S/SZ/SZBALINT/WWW-Curl-" version".tar.gz")) - (patches (search-patches "perl-www-curl-remove-symbol.patch")) + (patches (search-patches "perl-www-curl-fix-struct-void.patch" + "perl-www-curl-remove-symbol.patch")) (sha256 (base32 "1fmp9aib1kaps9vhs4dwxn7b15kgnlz9f714bxvqsd1j1q8spzsj")))) (build-system perl-build-system) (arguments '(#:tests? #f ;XXX: tests require network access - #:phases (modify-phases %standard-phases (add-before 'configure 'set-search-path (lambda _ -- cgit v1.2.3 From 80817b509855f2e4f473372fc546c3132fa57fe7 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 15 Nov 2020 00:02:18 +0100 Subject: gnu: multipath-tools: Update to 0.8.5. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/linux.scm (multipath-tools): Update to 0.8.5. [source]: Remove patch. [arguments]: Add a ‘skip-failing-tests’ phase. * gnu/packages/patches/multipath-tools-sans-systemd.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/linux.scm | 17 ++++- .../patches/multipath-tools-sans-systemd.patch | 83 ---------------------- 3 files changed, 14 insertions(+), 87 deletions(-) delete mode 100644 gnu/packages/patches/multipath-tools-sans-systemd.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 6a0f378bb0..91a3295e75 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1357,7 +1357,6 @@ dist_patch_DATA = \ %D%/packages/patches/mozjs38-version-detection.patch \ %D%/packages/patches/mrrescue-support-love-11.patch \ %D%/packages/patches/mtools-mformat-uninitialized.patch \ - %D%/packages/patches/multipath-tools-sans-systemd.patch \ %D%/packages/patches/mumps-build-parallelism.patch \ %D%/packages/patches/mumps-shared-libseq.patch \ %D%/packages/patches/mumps-shared-mumps.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 8abeb976af..39abf6e2ba 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -4430,7 +4430,7 @@ arrays when needed.") (define-public multipath-tools (package (name "multipath-tools") - (version "0.8.4") + (version "0.8.5") (source (origin (method git-fetch) (uri (git-reference @@ -4439,8 +4439,7 @@ arrays when needed.") (file-name (git-file-name name version)) (sha256 (base32 - "14n8pcgnliicqxzc40xvjxk4cafm4qx7a3rsx5qva74r3ydzx8rn")) - (patches (search-patches "multipath-tools-sans-systemd.patch")) + "0gipg0z79h76j0f449cx4wcrfsv69ravjlpphsac11h302g3nrvg")) (modules '((guix build utils))) (snippet '(begin @@ -4498,6 +4497,18 @@ arrays when needed.") (("-lmultipath -lcmocka") "-lmultipath -L$(mpathcmddir) -lmpathcmd -lcmocka")) #t)) + (add-after 'unpack 'skip-failing-tests + (lambda _ + ;; This test and the module's setup() test an arbitrary block + ;; device node name, but the build environment has none. + (substitute* "tests/devt.c" + (("return get_one_devt.*") "return 0;\n") + (("cmocka_unit_test\\(test_devt2devname_devt_good\\),") "")) + ;; The above triggers -Werror=unused-function. Ignore it. + (substitute* "tests/Makefile" + (("CFLAGS \\+= " match) + (string-append match "-Wno-error=unused-function "))) + #t)) (delete 'configure)))) ; no configure script (native-inputs `(("perl" ,perl) diff --git a/gnu/packages/patches/multipath-tools-sans-systemd.patch b/gnu/packages/patches/multipath-tools-sans-systemd.patch deleted file mode 100644 index 8f3144718c..0000000000 --- a/gnu/packages/patches/multipath-tools-sans-systemd.patch +++ /dev/null @@ -1,83 +0,0 @@ -Fix various compiler warnings when built without systemd. - -Submitted upstream at . - -diff --git a/libmultipath/config.c b/libmultipath/config.c ---- a/libmultipath/config.c -+++ b/libmultipath/config.c -@@ -696,7 +696,7 @@ process_config_dir(struct config *conf, char *dir) - pthread_cleanup_pop(1); - } - --static void set_max_checkint_from_watchdog(struct config *conf) -+static void set_max_checkint_from_watchdog(__attribute__((unused)) struct config *conf) - { - #ifdef USE_SYSTEMD - char *envp = getenv("WATCHDOG_USEC"); -diff --git a/multipathd/main.c b/multipathd/main.c ---- a/multipathd/main.c -+++ b/multipathd/main.c -@@ -176,6 +176,7 @@ daemon_status(void) - /* - * I love you too, systemd ... - */ -+#ifdef USE_SYSTEMD - static const char * - sd_notify_status(enum daemon_status state) - { -@@ -195,7 +196,6 @@ sd_notify_status(enum daemon_status state) - return NULL; - } - --#ifdef USE_SYSTEMD - static void do_sd_notify(enum daemon_status old_state, - enum daemon_status new_state) - { -@@ -247,7 +247,9 @@ enum daemon_status wait_for_state_change_if(enum daemon_status oldstate, - static void __post_config_state(enum daemon_status state) - { - if (state != running_state && running_state != DAEMON_SHUTDOWN) { -- enum daemon_status old_state = running_state; -+ /* save state for sd_notify */ -+ enum daemon_status -+ __attribute__((unused)) old_state = running_state; - - running_state = state; - pthread_cond_broadcast(&config_cond); -@@ -272,7 +274,9 @@ int set_config_state(enum daemon_status state) - pthread_cleanup_push(config_cleanup, NULL); - pthread_mutex_lock(&config_lock); - if (running_state != state) { -- enum daemon_status old_state = running_state; -+ /* save state for sd_notify */ -+ enum daemon_status -+ __attribute__((unused)) old_state = running_state; - - if (running_state == DAEMON_SHUTDOWN) - rc = EINVAL; -@@ -2280,7 +2284,6 @@ checkerloop (void *ap) - struct timespec last_time; - struct config *conf; - int foreign_tick = 0; -- bool use_watchdog; - - pthread_cleanup_push(rcu_unregister, NULL); - rcu_register_thread(); -@@ -2292,11 +2295,15 @@ checkerloop (void *ap) - get_monotonic_time(&last_time); - last_time.tv_sec -= 1; - -- /* use_watchdog is set from process environment and never changes */ - conf = get_multipath_config(); -- use_watchdog = conf->use_watchdog; - put_multipath_config(conf); - -+#ifdef USE_SYSTEMD -+ /* use_watchdog is set from process environment and never changes */ -+ bool use_watchdog; -+ use_watchdog = conf->use_watchdog; -+#endif -+ - while (1) { - struct timespec diff_time, start_time, end_time; - int num_paths = 0, strict_timing, rc = 0; -- cgit v1.2.3 From b91e0a5a14009421f9c6a62f6fc8372bed27faf2 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 16 Nov 2020 03:55:24 +0100 Subject: gnu: scribus: Update to 1.5.6. * gnu/packages/scribus.scm (scribus): Update to 1.5.6. [source]: Remove patch. [inputs]: Substitute python for python-2. * gnu/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - .../scribus-1.5.5-poppler-0.86-build-fix.patch | 642 --------------------- gnu/packages/scribus.scm | 9 +- 3 files changed, 4 insertions(+), 648 deletions(-) delete mode 100644 gnu/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 91a3295e75..bc60307094 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1593,7 +1593,6 @@ dist_patch_DATA = \ %D%/packages/patches/scotch-build-parallelism.patch \ %D%/packages/patches/scotch-integer-declarations.patch \ %D%/packages/patches/screen-hurd-path-max.patch \ - %D%/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch \ %D%/packages/patches/sdl-libx11-1.6.patch \ %D%/packages/patches/seed-webkit.patch \ %D%/packages/patches/seq24-rename-mutex.patch \ diff --git a/gnu/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch b/gnu/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch deleted file mode 100644 index 39008cba5c..0000000000 --- a/gnu/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch +++ /dev/null @@ -1,642 +0,0 @@ -Fix build with Poppler 0.86. - -The original series of patches authored by Craig Bradney -and Jean Ghali , taken from -https://gitweb.gentoo.org/repo/gentoo.git/tree/app-office/scribus/files - -diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp ---- a/scribus/plugins/import/pdf/importpdf.cpp -+++ b/scribus/plugins/import/pdf/importpdf.cpp -@@ -75,7 +75,11 @@ PdfPlug::PdfPlug(ScribusDoc* doc, int flags) - QImage PdfPlug::readThumbnail(const QString& fName) - { - QString pdfFile = QDir::toNativeSeparators(fName); -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0) -+ globalParams.reset(new GlobalParams()); -+#else - globalParams = new GlobalParams(); -+#endif - if (globalParams) - { - #if defined(Q_OS_WIN32) && POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 62, 0) -@@ -90,7 +94,9 @@ QImage PdfPlug::readThumbnail(const QString& fName) - if (pdfDoc->getErrorCode() == errEncrypted) - { - delete pdfDoc; -+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0) - delete globalParams; -+#endif - return QImage(); - } - if (pdfDoc->isOk()) -@@ -134,11 +140,15 @@ QImage PdfPlug::readThumbnail(const QString& fName) - image.setText("YSize", QString("%1").arg(h)); - delete dev; - delete pdfDoc; -+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0) - delete globalParams; -+#endif - return image; - } - delete pdfDoc; -+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0) - delete globalParams; -+#endif - } - } - return QImage(); -@@ -387,7 +397,11 @@ bool PdfPlug::convert(const QString& fn) - qApp->processEvents(); - } - -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0) -+ globalParams.reset(new GlobalParams()); -+#else - globalParams = new GlobalParams(); -+#endif - GooString *userPW = nullptr; - if (globalParams) - { -@@ -429,7 +443,9 @@ bool PdfPlug::convert(const QString& fn) - if (progressDialog) - progressDialog->close(); - delete pdfDoc; -+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0) - delete globalParams; -+#endif - return false; - } - if (progressDialog) -@@ -474,7 +490,9 @@ bool PdfPlug::convert(const QString& fn) - progressDialog->close(); - delete optImp; - delete pdfDoc; -+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0) - delete globalParams; -+#endif - return false; - } - pageString = optImp->getPagesString(); -@@ -838,11 +856,20 @@ bool PdfPlug::convert(const QString& fn) - names = catDict.dictLookup("OpenAction"); - if (names.isDict()) - { -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ std::unique_ptr linkAction; -+ linkAction = LinkAction::parseAction(&names, pdfDoc->getCatalog()->getBaseURI()); -+#else - LinkAction *linkAction = nullptr; - linkAction = LinkAction::parseAction(&names, pdfDoc->getCatalog()->getBaseURI()); -+#endif - if (linkAction) - { -- LinkJavaScript *jsa = (LinkJavaScript*)linkAction; -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ LinkJavaScript *jsa = (LinkJavaScript*) linkAction.get(); -+#else -+ LinkJavaScript *jsa = (LinkJavaScript*) linkAction; -+#endif - if (jsa->isOk()) - { - QString script = UnicodeParsedString(jsa->getScript()); -@@ -908,8 +935,12 @@ bool PdfPlug::convert(const QString& fn) - } - delete pdfDoc; - } -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0) -+ globalParams.release(); -+#else - delete globalParams; - globalParams = nullptr; -+#endif - - // qDebug() << "converting finished"; - // qDebug() << "Imported" << Elements.count() << "Elements"; -@@ -1046,3 +1077,43 @@ QString PdfPlug::UnicodeParsedString(POPPLER_CONST GooString *s1) - } - return result; - } -+ -+QString PdfPlug::UnicodeParsedString(const std::string& s1) -+{ -+ if (s1.length() == 0) -+ return QString(); -+ GBool isUnicode; -+ int i; -+ Unicode u; -+ QString result; -+ if ((s1.at(0) & 0xff) == 0xfe && (s1.length() > 1 && (s1.at(1) & 0xff) == 0xff)) -+ { -+ isUnicode = gTrue; -+ i = 2; -+ result.reserve((s1.length() - 2) / 2); -+ } -+ else -+ { -+ isUnicode = gFalse; -+ i = 0; -+ result.reserve(s1.length()); -+ } -+ while (i < s1.length()) -+ { -+ if (isUnicode) -+ { -+ u = ((s1.at(i) & 0xff) << 8) | (s1.at(i+1) & 0xff); -+ i += 2; -+ } -+ else -+ { -+ u = s1.at(i) & 0xff; -+ ++i; -+ } -+ // #15616: imagemagick may write unicode strings incorrectly in PDF -+ if (u == 0) -+ continue; -+ result += QChar( u ); -+ } -+ return result; -+} -diff --git a/scribus/plugins/import/pdf/importpdf.h b/scribus/plugins/import/pdf/importpdf.h ---- a/scribus/plugins/import/pdf/importpdf.h -+++ b/scribus/plugins/import/pdf/importpdf.h -@@ -82,6 +82,7 @@ private: - bool convert(const QString& fn); - QRectF getCBox(int box, int pgNum); - QString UnicodeParsedString(POPPLER_CONST GooString *s1); -+ QString UnicodeParsedString(const std::string& s1); - - QList Elements; - double baseX, baseY; -diff --git a/scribus/plugins/import/pdf/importpdfconfig.h b/scribus/plugins/import/pdf/importpdfconfig.h ---- a/scribus/plugins/import/pdf/importpdfconfig.h -+++ b/scribus/plugins/import/pdf/importpdfconfig.h -@@ -52,4 +52,16 @@ for which a new license (GPL+exception) is in place. - #define POPPLER_REF - #endif - -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 82, 0) -+#define POPPLER_CONST_082 const -+#else -+#define POPPLER_CONST_082 -+#endif -+ -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0) -+#define POPPLER_CONST_083 const -+#else -+#define POPPLER_CONST_083 -+#endif -+ - #endif -diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp ---- a/scribus/plugins/import/pdf/slaoutput.cpp -+++ b/scribus/plugins/import/pdf/slaoutput.cpp -@@ -308,9 +308,15 @@ LinkAction* SlaOutputDev::SC_getAction(AnnotWidget *ano) - } - - /* Replacement for the crippled Poppler function LinkAction* AnnotWidget::getAdditionalAction(AdditionalActionsType type) */ -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+std::unique_ptr SlaOutputDev::SC_getAdditionalAction(const char *key, AnnotWidget *ano) -+{ -+ std::unique_ptr linkAction; -+#else - LinkAction* SlaOutputDev::SC_getAdditionalAction(const char *key, AnnotWidget *ano) - { - LinkAction *linkAction = nullptr; -+#endif - Object obj; - Ref refa = ano->getRef(); - -@@ -455,7 +461,11 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double xCoor, double yCoor, do - POPPLER_CONST GooString *ndst = gto->getNamedDest(); - if (ndst) - { -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ std::unique_ptr dstn = pdfDoc->findDest(ndst); -+#else - LinkDest *dstn = pdfDoc->findDest(ndst); -+#endif - if (dstn) - { - if (dstn->getKind() == destXYZ) -@@ -499,7 +509,11 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double xCoor, double yCoor, do - POPPLER_CONST GooString *ndst = gto->getNamedDest(); - if (ndst) - { -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ std::unique_ptr dstn = pdfDoc->findDest(ndst); -+#else - LinkDest *dstn = pdfDoc->findDest(ndst); -+#endif - if (dstn) - { - if (dstn->getKind() == destXYZ) -@@ -967,7 +981,11 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano) - POPPLER_CONST GooString *ndst = gto->getNamedDest(); - if (ndst) - { -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ std::unique_ptr dstn = pdfDoc->findDest(ndst); -+#else - LinkDest *dstn = pdfDoc->findDest(ndst); -+#endif - if (dstn) - { - if (dstn->getKind() == destXYZ) -@@ -1019,7 +1037,11 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano) - POPPLER_CONST GooString *ndst = gto->getNamedDest(); - if (ndst) - { -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ std::unique_ptr dstn = pdfDoc->findDest(ndst); -+#else - LinkDest *dstn = pdfDoc->findDest(ndst); -+#endif - if (dstn) - { - if (dstn->getKind() == destXYZ) -@@ -1088,96 +1110,148 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano) - else - qDebug() << "Found unsupported Action of type" << Lact->getKind(); - } -- LinkAction *Aact = SC_getAdditionalAction("D", ano); -+ auto Aact = SC_getAdditionalAction("D", ano); - if (Aact) - { - if (Aact->getKind() == actionJavaScript) - { -- LinkJavaScript *jsa = (LinkJavaScript*)Aact; -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get(); -+#else -+ LinkJavaScript *jsa = (LinkJavaScript*) Aact; -+#endif - if (jsa->isOk()) - { - ite->annotation().setD_act(UnicodeParsedString(jsa->getScript())); - ite->annotation().setAAact(true); - } - } -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ Aact.reset(); -+#else - Aact = nullptr; -+#endif - } - Aact = SC_getAdditionalAction("E", ano); - if (Aact) - { - if (Aact->getKind() == actionJavaScript) - { -- LinkJavaScript *jsa = (LinkJavaScript*)Aact; -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get(); -+#else -+ LinkJavaScript *jsa = (LinkJavaScript*) Aact; -+#endif - if (jsa->isOk()) - { - ite->annotation().setE_act(UnicodeParsedString(jsa->getScript())); - ite->annotation().setAAact(true); - } - } -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ Aact.reset(); -+#else - Aact = nullptr; -+#endif - } - Aact = SC_getAdditionalAction("X", ano); - if (Aact) - { - if (Aact->getKind() == actionJavaScript) - { -- LinkJavaScript *jsa = (LinkJavaScript*)Aact; -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get(); -+#else -+ LinkJavaScript *jsa = (LinkJavaScript*) Aact; -+#endif - if (jsa->isOk()) - { - ite->annotation().setX_act(UnicodeParsedString(jsa->getScript())); - ite->annotation().setAAact(true); - } - } -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ Aact.reset(); -+#else - Aact = nullptr; -+#endif - } - Aact = SC_getAdditionalAction("Fo", ano); - if (Aact) - { - if (Aact->getKind() == actionJavaScript) - { -- LinkJavaScript *jsa = (LinkJavaScript*)Aact; -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get(); -+#else -+ LinkJavaScript *jsa = (LinkJavaScript*) Aact; -+#endif - if (jsa->isOk()) - { - ite->annotation().setFo_act(UnicodeParsedString(jsa->getScript())); - ite->annotation().setAAact(true); - } - } -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ Aact.reset(); -+#else - Aact = nullptr; -+#endif - } - Aact = SC_getAdditionalAction("Bl", ano); - if (Aact) - { - if (Aact->getKind() == actionJavaScript) - { -- LinkJavaScript *jsa = (LinkJavaScript*)Aact; -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get(); -+#else -+ LinkJavaScript *jsa = (LinkJavaScript*) Aact; -+#endif - if (jsa->isOk()) - { - ite->annotation().setBl_act(UnicodeParsedString(jsa->getScript())); - ite->annotation().setAAact(true); - } - } -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ Aact.reset(); -+#else - Aact = nullptr; -+#endif - } - Aact = SC_getAdditionalAction("C", ano); - if (Aact) - { - if (Aact->getKind() == actionJavaScript) - { -- LinkJavaScript *jsa = (LinkJavaScript*)Aact; -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get(); -+#else -+ LinkJavaScript *jsa = (LinkJavaScript*) Aact; -+#endif - if (jsa->isOk()) - { - ite->annotation().setC_act(UnicodeParsedString(jsa->getScript())); - ite->annotation().setAAact(true); - } - } -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ Aact.reset(); -+#else - Aact = nullptr; -+#endif - } - Aact = SC_getAdditionalAction("F", ano); - if (Aact) - { - if (Aact->getKind() == actionJavaScript) - { -- LinkJavaScript *jsa = (LinkJavaScript*)Aact; -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get(); -+#else -+ LinkJavaScript *jsa = (LinkJavaScript*) Aact; -+#endif - if (jsa->isOk()) - { - ite->annotation().setF_act(UnicodeParsedString(jsa->getScript())); -@@ -1185,14 +1259,22 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano) - ite->annotation().setFormat(5); - } - } -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ Aact.reset(); -+#else - Aact = nullptr; -+#endif - } - Aact = SC_getAdditionalAction("K", ano); - if (Aact) - { - if (Aact->getKind() == actionJavaScript) - { -- LinkJavaScript *jsa = (LinkJavaScript*)Aact; -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get(); -+#else -+ LinkJavaScript *jsa = (LinkJavaScript*) Aact; -+#endif - if (jsa->isOk()) - { - ite->annotation().setK_act(UnicodeParsedString(jsa->getScript())); -@@ -1200,21 +1282,33 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano) - ite->annotation().setFormat(5); - } - } -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ Aact.reset(); -+#else - Aact = nullptr; -+#endif - } - Aact = SC_getAdditionalAction("V", ano); - if (Aact) - { - if (Aact->getKind() == actionJavaScript) - { -- LinkJavaScript *jsa = (LinkJavaScript*)Aact; -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get(); -+#else -+ LinkJavaScript *jsa = (LinkJavaScript*) Aact; -+#endif - if (jsa->isOk()) - { - ite->annotation().setV_act(UnicodeParsedString(jsa->getScript())); - ite->annotation().setAAact(true); - } - } -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ Aact.reset(); -+#else - Aact = nullptr; -+#endif - } - } - -@@ -1224,6 +1318,11 @@ void SlaOutputDev::startDoc(PDFDoc *doc, XRef *xrefA, Catalog *catA) - catalog = catA; - pdfDoc = doc; - updateGUICounter = 0; -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 84, 0) -+ m_fontEngine = new SplashFontEngine(true, true, true, true); -+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 61, 0) -+ m_fontEngine = new SplashFontEngine(globalParams->getEnableFreeType(), true, true, true); -+#else - m_fontEngine = new SplashFontEngine( - #if HAVE_T1LIB_H - globalParams->getEnableT1lib(), -@@ -1234,6 +1333,7 @@ void SlaOutputDev::startDoc(PDFDoc *doc, XRef *xrefA, Catalog *catA) - true, - #endif - true); -+#endif - } - - void SlaOutputDev::startPage(int pageNum, GfxState *, XRef *) -@@ -2784,7 +2884,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str, i - delete[] mbuffer; - } - --void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg) -+void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, POPPLER_CONST_082 int* maskColors, GBool inlineImg) - { - ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits()); - // qDebug() << "Image Components" << colorMap->getNumPixelComps() << "Mask" << maskColors; -@@ -3365,7 +3465,7 @@ err1: - fontsrc->unref(); - } - --void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, Unicode *u, int uLen) -+void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, POPPLER_CONST_082 Unicode *u, int uLen) - { - double x1, y1, x2, y2; - int render; -@@ -3452,7 +3552,7 @@ void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, doub - } - } - --GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, Unicode *u, int uLen) -+GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, POPPLER_CONST_082 Unicode *u, int uLen) - { - // qDebug() << "beginType3Char"; - GfxFont *gfxFont; -@@ -3705,7 +3805,7 @@ QString SlaOutputDev::getAnnotationColor(const AnnotColor *color) - return fNam; - } - --QString SlaOutputDev::convertPath(GfxPath *path) -+QString SlaOutputDev::convertPath(POPPLER_CONST_083 GfxPath *path) - { - if (! path) - return QString(); -@@ -3715,7 +3815,7 @@ QString SlaOutputDev::convertPath(GfxPath *path) - - for (int i = 0; i < path->getNumSubpaths(); ++i) - { -- GfxSubpath * subpath = path->getSubpath(i); -+ POPPLER_CONST_083 GfxSubpath * subpath = path->getSubpath(i); - if (subpath->getNumPoints() > 0) - { - output += QString("M %1 %2").arg(subpath->getX(0)).arg(subpath->getY(0)); -@@ -3922,6 +4022,46 @@ QString SlaOutputDev::UnicodeParsedString(POPPLER_CONST GooString *s1) - return result; - } - -+QString SlaOutputDev::UnicodeParsedString(const std::string& s1) -+{ -+ if (s1.length() == 0) -+ return QString(); -+ GBool isUnicode; -+ int i; -+ Unicode u; -+ QString result; -+ if ((s1.at(0) & 0xff) == 0xfe && (s1.length() > 1 && (s1.at(1) & 0xff) == 0xff)) -+ { -+ isUnicode = gTrue; -+ i = 2; -+ result.reserve((s1.length() - 2) / 2); -+ } -+ else -+ { -+ isUnicode = gFalse; -+ i = 0; -+ result.reserve(s1.length()); -+ } -+ while (i < s1.length()) -+ { -+ if (isUnicode) -+ { -+ u = ((s1.at(i) & 0xff) << 8) | (s1.at(i+1) & 0xff); -+ i += 2; -+ } -+ else -+ { -+ u = s1.at(i) & 0xff; -+ ++i; -+ } -+ // #15616: imagemagick may write unicode strings incorrectly in PDF -+ if (u == 0) -+ continue; -+ result += QChar( u ); -+ } -+ return result; -+} -+ - bool SlaOutputDev::checkClip() - { - bool ret = false; -diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h ---- a/scribus/plugins/import/pdf/slaoutput.h -+++ b/scribus/plugins/import/pdf/slaoutput.h -@@ -20,6 +20,8 @@ for which a new license (GPL+exception) is in place. - #include - #include - -+#include -+ - #include "fpointarray.h" - #include "importpdfconfig.h" - #include "pageitem.h" -@@ -159,7 +161,11 @@ public: - virtual ~SlaOutputDev(); - - LinkAction* SC_getAction(AnnotWidget *ano); -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ std::unique_ptr SC_getAdditionalAction(const char *key, AnnotWidget *ano); -+#else - LinkAction* SC_getAdditionalAction(const char *key, AnnotWidget *ano); -+#endif - static GBool annotations_callback(Annot *annota, void *user_data); - bool handleTextAnnot(Annot* annota, double xCoor, double yCoor, double width, double height); - bool handleLinkAnnot(Annot* annota, double xCoor, double yCoor, double width, double height); -@@ -229,7 +235,7 @@ public: - - //----- image drawing - void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg) override; -- void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg) override; -+ void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, POPPLER_CONST_082 int *maskColors, GBool inlineImg) override; - void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, -@@ -261,8 +267,8 @@ public: - //----- text drawing - void beginTextObject(GfxState *state) override; - void endTextObject(GfxState *state) override; -- void drawChar(GfxState *state, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode /*code*/, int /*nBytes*/, Unicode * /*u*/, int /*uLen*/) override; -- GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, Unicode * /*u*/, int /*uLen*/) override; -+ void drawChar(GfxState *state, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode /*code*/, int /*nBytes*/, POPPLER_CONST_082 Unicode * /*u*/, int /*uLen*/) override; -+ GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, POPPLER_CONST_082 Unicode * /*u*/, int /*uLen*/) override; - void endType3Char(GfxState * /*state*/) override; - void type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/) override; - void type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) override; -@@ -282,11 +288,12 @@ private: - void getPenState(GfxState *state); - QString getColor(GfxColorSpace *color_space, POPPLER_CONST_070 GfxColor *color, int *shade); - QString getAnnotationColor(const AnnotColor *color); -- QString convertPath(GfxPath *path); -+ QString convertPath(POPPLER_CONST_083 GfxPath *path); - int getBlendMode(GfxState *state); - void applyMask(PageItem *ite); - void pushGroup(const QString& maskName = "", GBool forSoftMask = gFalse, GBool alpha = gFalse, bool inverted = false); - QString UnicodeParsedString(POPPLER_CONST GooString *s1); -+ QString UnicodeParsedString(const std::string& s1); - bool checkClip(); - bool pathIsClosed; - QString CurrColorFill; diff --git a/gnu/packages/scribus.scm b/gnu/packages/scribus.scm index 6519ce7a7f..e380a2ef12 100644 --- a/gnu/packages/scribus.scm +++ b/gnu/packages/scribus.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2017, 2018 Nicolas Goaziou ;;; Copyright © 2018 Clément Lassieur ;;; Copyright © 2019 Marius Bakke +;;; Copyright © 2020 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; @@ -48,16 +49,14 @@ (define-public scribus (package (name "scribus") - (version "1.5.5") + (version "1.5.6") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/scribus/scribus-devel/" version "/scribus-" version ".tar.xz")) - (patches (search-patches "scribus-1.5.5-poppler-0.86-build-fix.patch")) (sha256 - (base32 - "0w9zzsiaq3f7vpxybk01c9z2b4qqg67mzpyfb2gjchz8dhdb423r")))) + (base32 "1qj7mzf2gmdyil27a4hl2pr1i3h3zzy2h33x74lnwp48mzp0cyap")))) (build-system cmake-build-system) (arguments `(#:tests? #f ;no test target @@ -99,7 +98,7 @@ ("openssl" ,openssl) ("podofo" ,podofo) ("poppler" ,poppler) - ("python" ,python-2) ;need Python library + ("python" ,python) ; need Python library ("qtbase" ,qtbase) ("qtdeclarative" ,qtdeclarative) ("zlib" ,zlib))) -- cgit v1.2.3 From f2c6375449d085393eb538240200840ff242a743 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Mon, 16 Nov 2020 14:54:04 +0100 Subject: gnu: gcc-vc4: Update to commit 0fe4b83897341742f9df65797474cb0feab4b377. * gnu/packages/patches/gcc-6-fix-buffer-size.patch: New file. * gnu/packages/patches/gcc-6-fix-isl-includes.patch: New file. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/embedded.scm (gcc-vc4): Update to commit 0fe4b83897341742f9df65797474cb0feab4b377. [source]: Add the patches from above. --- gnu/local.mk | 2 ++ gnu/packages/embedded.scm | 9 ++++++--- gnu/packages/patches/gcc-6-fix-buffer-size.patch | 15 +++++++++++++++ gnu/packages/patches/gcc-6-fix-isl-includes.patch | 16 ++++++++++++++++ 4 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/gcc-6-fix-buffer-size.patch create mode 100644 gnu/packages/patches/gcc-6-fix-isl-includes.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index bc60307094..d2c3a471e7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1013,6 +1013,8 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-4.9-libsanitizer-ustat.patch \ %D%/packages/patches/gcc-libsanitizer-ustat.patch \ %D%/packages/patches/gcc-4.9-libsanitizer-mode-size.patch \ + %D%/packages/patches/gcc-6-fix-isl-includes.patch \ + %D%/packages/patches/gcc-6-fix-buffer-size.patch \ %D%/packages/patches/gcc-6-libsanitizer-mode-size.patch \ %D%/packages/patches/gcc-7-libsanitizer-mode-size.patch \ %D%/packages/patches/gcc-libvtv-runpath.patch \ diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index 3a64c75109..89d4aaf97e 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm @@ -1024,8 +1024,8 @@ the Raspberry Pi chip.") (home-page "https://github.com/puppeh/vc4-toolchain/")))) (define-public gcc-vc4 - (let ((commit "165f6d0e11d2e76ee799533bb45bd5c92bf60dc2") - (xgcc (cross-gcc "vc4-elf" #:xbinutils binutils-vc4))) + (let ((commit "0fe4b83897341742f9df65797474cb0feab4b377") + (xgcc (cross-gcc "vc4-elf" #:xgcc gcc-6 #:xbinutils binutils-vc4))) (package (inherit xgcc) (name "gcc-vc4") (source (origin @@ -1039,7 +1039,10 @@ the Raspberry Pi chip.") "-checkout")) (sha256 (base32 - "13h30qjcwnlz6lfma1d82nnvfmjnhh7abkagip4vly6vm5fpnvf2")))) + "0kvaq4s0assvinmmicwqp07d0wwldcw0fv6f4k13whp3q5909jnr")) + (patches + (search-patches "gcc-6-fix-buffer-size.patch" + "gcc-6-fix-isl-includes.patch")))) (native-inputs `(("flex" ,flex) ,@(package-native-inputs xgcc))) diff --git a/gnu/packages/patches/gcc-6-fix-buffer-size.patch b/gnu/packages/patches/gcc-6-fix-buffer-size.patch new file mode 100644 index 0000000000..5fcd769d45 --- /dev/null +++ b/gnu/packages/patches/gcc-6-fix-buffer-size.patch @@ -0,0 +1,15 @@ +Fixes a possible buffer overflow. (There are others) +Author: Danny Milosavljevic +Date: 2020-11-16 + +--- a/gcc/gimplify.c.orig 2020-10-29 08:45:11.532479774 +0100 ++++ b/gcc/gimplify.c 2020-10-29 08:45:49.584637018 +0100 +@@ -5229,7 +5229,7 @@ + flexibility, split it into separate input and output + operands. */ + tree input; +- char buf[10]; ++ char buf[12]; + + /* Turn the in/out constraint into an output constraint. */ + char *p = xstrdup (constraint); diff --git a/gnu/packages/patches/gcc-6-fix-isl-includes.patch b/gnu/packages/patches/gcc-6-fix-isl-includes.patch new file mode 100644 index 0000000000..ab3c5634ea --- /dev/null +++ b/gnu/packages/patches/gcc-6-fix-isl-includes.patch @@ -0,0 +1,16 @@ +See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86724 +Author: Rainer Jung +Date: 2018-07-29 + +isl 0.20 stopped including other unused header files in their header files. +Therefore,now it's necessary to include the stuff ourselves. +--- .../gcc/graphite.h 2018-01-03 11:03:58.000000000 +0000 ++++ .../gcc/graphite.h 2018-07-29 17:42:55.836121000 +0000 +@@ -37,6 +37,8 @@ + #include + #include + #include ++#include ++#include + + typedef struct poly_dr *poly_dr_p; -- cgit v1.2.3 From 3aec121e95581e34a47e3a2d175af97579961206 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Tue, 17 Nov 2020 09:52:04 -0600 Subject: gnu: tomb: Update to 2.8. Fixes CVE-2020-28638. * gnu/packages/crypto.scm (tomb): Update to 2.8 [source]: Remove obsolete patch. * gnu/packages/patches/tomb-fix-errors-on-open.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/crypto.scm | 9 ++++---- gnu/packages/patches/tomb-fix-errors-on-open.patch | 25 ---------------------- 3 files changed, 4 insertions(+), 31 deletions(-) delete mode 100644 gnu/packages/patches/tomb-fix-errors-on-open.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index d2c3a471e7..d4d10bc32b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1650,7 +1650,6 @@ dist_patch_DATA = \ %D%/packages/patches/tk-find-library.patch \ %D%/packages/patches/transcode-ffmpeg.patch \ %D%/packages/patches/ttf2eot-cstddef.patch \ - %D%/packages/patches/tomb-fix-errors-on-open.patch \ %D%/packages/patches/tup-unbundle-dependencies.patch \ %D%/packages/patches/tuxpaint-stamps-path.patch \ %D%/packages/patches/twinkle-bcg729.patch \ diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm index aa6f80f731..1b51366d7e 100644 --- a/gnu/packages/crypto.scm +++ b/gnu/packages/crypto.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2016 Lukas Gradl ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2016, 2017 Nikita -;;; Copyright © 2016, 2017, 2019 Eric Bavier +;;; Copyright © 2016, 2017, 2019, 2020 Eric Bavier ;;; Copyright © 2017 Pierre Langlois ;;; Copyright © 2018, 2020 Efraim Flashner ;;; Copyright © 2018 Arun Isaac @@ -444,15 +444,14 @@ total number of shares generated.") (define-public tomb (package (name "tomb") - (version "2.7") + (version "2.8") (source (origin (method url-fetch) - (uri (string-append "https://files.dyne.org/tomb/" + (uri (string-append "https://files.dyne.org/tomb/releases/" "Tomb-" version ".tar.gz")) (sha256 (base32 - "0x3al02796vx1cvy6y6h685c367qx70dwv471g0hmks2gr10f0cn")) - (patches (search-patches "tomb-fix-errors-on-open.patch")))) + "0bggzzqmpfiknr76lyl8iszybrcpyqlbgiqk47fxq08h2b5ln1ic")))) (build-system gnu-build-system) (native-inputs `(("sudo" ,sudo))) ;presence needed for 'check' phase (inputs diff --git a/gnu/packages/patches/tomb-fix-errors-on-open.patch b/gnu/packages/patches/tomb-fix-errors-on-open.patch deleted file mode 100644 index 5f41c9ee8f..0000000000 --- a/gnu/packages/patches/tomb-fix-errors-on-open.patch +++ /dev/null @@ -1,25 +0,0 @@ -Description: Avoid error messages when opening a new tomb - Make sure control file exists and has user ownership before user writes to it. -Author: Sven Geuer -Bug: https://github.com/dyne/Tomb/issues/369 -Last-Update: 2019-11-04 ---- a/tomb -+++ b/tomb -@@ -2197,14 +2197,15 @@ - # {{{ Open - - _update_control_file() { -- # replaces a control file with new contents and gives it user ownership -+ # make sure a control file exists, gives it user ownership -+ # and replaces it with new contents - # stdin = contents - # $1 = path to control file - # $2 = contents - [[ "$2" = "" ]] && return 1 - _sudo touch "$1" -- print "$2" > "$1" - _sudo chown ${_UID}:${_GID} "$1" -+ print "$2" > "$1" - _verbose "updated control file $1 = $2" - } - -- cgit v1.2.3 From 8ec5415c9e1f6d932cddee18d0abc05984a70fda Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Tue, 17 Nov 2020 17:21:05 -0500 Subject: gnu: icecat: Update to 78.5.0-guix0-preview1 [security fixes]. Includes fixes for CVE-2020-15999, CVE-2020-16012, CVE-2020-26951, CVE-2020-26953, CVE-2020-26956, CVE-2020-26958, CVE-2020-26959, CVE-2020-26960, CVE-2020-26961, CVE-2020-26965, CVE-2020-26966, and CVE-2020-26968. * gnu/packages/gnuzilla.scm (%icecat-version, %icecat-build-id): Update. (icecat-source): Update gnuzilla commit, base version, and hashes. * gnu/packages/patches/icecat-makeicecat.patch: Adapt to new version. --- gnu/packages/gnuzilla.scm | 12 ++++++------ gnu/packages/patches/icecat-makeicecat.patch | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 9176f4fcbe..bfa04a3c30 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -550,8 +550,8 @@ from forcing GEXP-PROMISE." #:system system #:guile-for-build guile))) -(define %icecat-version "78.4.1-guix0-preview1") -(define %icecat-build-id "20201110000000") ;must be of the form YYYYMMDDhhmmss +(define %icecat-version "78.5.0-guix0-preview1") +(define %icecat-build-id "20201117000000") ;must be of the form YYYYMMDDhhmmss ;; 'icecat-source' is a "computed" origin that generates an IceCat tarball ;; from the corresponding upstream Firefox ESR tarball, using the 'makeicecat' @@ -573,11 +573,11 @@ from forcing GEXP-PROMISE." "firefox-" upstream-firefox-version ".source.tar.xz")) (sha256 (base32 - "0q57b0s6xhps4dzp2cih4ajdj6hdas0j6jx0sidzj72vjzfywy0r")))) + "1442yjmwz69hkfcvh8kkb60jf4c9ms0pac04nc3xw2da13v4zxai")))) - (upstream-icecat-base-version "78.4.1") ; maybe older than base-version + (upstream-icecat-base-version "78.5.0") ; maybe older than base-version ;;(gnuzilla-commit (string-append "v" upstream-icecat-base-version)) - (gnuzilla-commit "df2c2e22a0c6ea5b4dcaed52884223bfa6ffacde") + (gnuzilla-commit "bcfe407570cae32d00dd33a268de0e0593166f7b") (gnuzilla-source (origin (method git-fetch) @@ -589,7 +589,7 @@ from forcing GEXP-PROMISE." (string-take gnuzilla-commit 8))) (sha256 (base32 - "1y1p2g9xvqsg0im58lhdkrp8z0zlxw6i3qqplqdpbidmjwibmqjz")))) + "1pg8fjjg91qyrv7za585ds1xrdvmybbkf2jmkff107fh5y23lxrg")))) ;; 'search-patch' returns either a valid file name or #f, so wrap it ;; in 'assume-valid-file-name' to avoid 'local-file' warnings. diff --git a/gnu/packages/patches/icecat-makeicecat.patch b/gnu/packages/patches/icecat-makeicecat.patch index f82df9f68e..9a6e40df4b 100644 --- a/gnu/packages/patches/icecat-makeicecat.patch +++ b/gnu/packages/patches/icecat-makeicecat.patch @@ -25,7 +25,7 @@ index 8be2362..48716f2 100755 -wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc -gpg --recv-keys --keyserver keyserver.ubuntu.com 14F26682D0916CDD81E37B6D61B7B526D98F0353 -gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc --echo -n 1978eedd975b1cf95bd4a04b2381560d1ad9a4223032717f23fac26e3458a760 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - +-echo -n 51f54ff608aa09de07b304307581ae89112781597322b8999b3099cfabf48290 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - - -echo Extracting Firefox tarball -tar -xf firefox-${FFVERSION}esr.source.tar.xz @@ -37,7 +37,7 @@ index 8be2362..48716f2 100755 +# wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc +# gpg --recv-keys --keyserver keyserver.ubuntu.com 14F26682D0916CDD81E37B6D61B7B526D98F0353 +# gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc -+# echo -n 1978eedd975b1cf95bd4a04b2381560d1ad9a4223032717f23fac26e3458a760 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - ++# echo -n 51f54ff608aa09de07b304307581ae89112781597322b8999b3099cfabf48290 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - +# +# echo Extracting Firefox tarball +# tar -xf firefox-${FFVERSION}esr.source.tar.xz -- cgit v1.2.3 From fa268b28e1ccc392c85846810d836034c96df3c0 Mon Sep 17 00:00:00 2001 From: Simon South Date: Fri, 6 Nov 2020 18:15:28 -0500 Subject: gnu: bitcoin-core: Update to 0.20.1. * gnu/packages/finance.scm (bitcoin-core): Update to 0.20.1. [source]: Remove obsolete patch. [native-inputs]: Add autoconf, automake and libtool. [inputs]: Remove protobuf. [arguments]: Add "set-no-git-flag" phase to indicate the build is not taking place within a git repository. * gnu/packages/patches/bitcoin-core-python-compat.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. Signed-off-by: Christopher Baines --- gnu/local.mk | 1 - gnu/packages/finance.scm | 18 ++++++++++---- .../patches/bitcoin-core-python-compat.patch | 28 ---------------------- 3 files changed, 13 insertions(+), 34 deletions(-) delete mode 100644 gnu/packages/patches/bitcoin-core-python-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 217c05eab6..a1da838aee 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -846,7 +846,6 @@ dist_patch_DATA = \ %D%/packages/patches/binutils-loongson-workaround.patch \ %D%/packages/patches/binutils-mingw-w64-timestamp.patch \ %D%/packages/patches/binutils-mingw-w64-deterministic.patch \ - %D%/packages/patches/bitcoin-core-python-compat.patch \ %D%/packages/patches/blender-2.79-gcc8.patch \ %D%/packages/patches/blender-2.79-gcc9.patch \ %D%/packages/patches/blender-2.79-newer-ffmpeg.patch \ diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index 7b87bde50c..7ef40f544f 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -108,7 +108,7 @@ (define-public bitcoin-core (package (name "bitcoin-core") - (version "0.19.1") + (version "0.20.1") (source (origin (method url-fetch) (uri @@ -116,11 +116,13 @@ version "/bitcoin-" version ".tar.gz")) (sha256 (base32 - "1h3w7brc18145np920vy7j5ms5hym59hvr40swdjx34fbdaisngj")) - (patches (search-patches "bitcoin-core-python-compat.patch")))) + "0y5rad68b398arh0abr2wgiwybdw0i5a4dxz9s3fk9fgdbyn5gab")))) (build-system gnu-build-system) (native-inputs - `(("pkg-config" ,pkg-config) + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config) ("python" ,python) ; for the tests ("util-linux" ,util-linux) ; provides the hexdump command for tests ("qttools" ,qttools))) @@ -130,7 +132,6 @@ ("libevent" ,libevent) ("miniupnpc" ,miniupnpc) ("openssl" ,openssl) - ("protobuf" ,protobuf) ("qtbase" ,qtbase))) (arguments `(#:configure-flags @@ -154,6 +155,13 @@ ;; Make Qt deterministic. (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1") #t)) + (add-before 'build 'set-no-git-flag + (lambda _ + ;; Make it clear we are not building from within a git repository + ;; (and thus no information regarding this build is available + ;; from git). + (setenv "BITCOIN_GENBUILD_NO_GIT" "1") + #t)) (add-before 'check 'set-home (lambda _ (setenv "HOME" (getenv "TMPDIR")) ; tests write to $HOME diff --git a/gnu/packages/patches/bitcoin-core-python-compat.patch b/gnu/packages/patches/bitcoin-core-python-compat.patch deleted file mode 100644 index 6bf744124d..0000000000 --- a/gnu/packages/patches/bitcoin-core-python-compat.patch +++ /dev/null @@ -1,28 +0,0 @@ -Get rid of deprecation warning emitted by Python 3.8, which causes a test failure(!). - -https://github.com/bitcoin/bitcoin/pull/17931 - -Taken from upstream: - -https://github.com/bitcoin/bitcoin/commit/f117fb00da747147cddfb071c1427a2754c278cd - -diff --git a/test/functional/p2p_invalid_messages.py b/test/functional/p2p_invalid_messages.py -index 20864881c165..07eacf410d88 100755 ---- a/test/functional/p2p_invalid_messages.py -+++ b/test/functional/p2p_invalid_messages.py -@@ -145,13 +145,13 @@ def run_test(self): - def test_magic_bytes(self): - conn = self.nodes[0].add_p2p_connection(P2PDataStore()) - -- def swap_magic_bytes(): -+ async def swap_magic_bytes(): - conn._on_data = lambda: None # Need to ignore all incoming messages from now, since they come with "invalid" magic bytes - conn.magic_bytes = b'\x00\x11\x22\x32' - - # Call .result() to block until the atomic swap is complete, otherwise - # we might run into races later on -- asyncio.run_coroutine_threadsafe(asyncio.coroutine(swap_magic_bytes)(), NetworkThread.network_event_loop).result() -+ asyncio.run_coroutine_threadsafe(swap_magic_bytes(), NetworkThread.network_event_loop).result() - - with self.nodes[0].assert_debug_log(['PROCESSMESSAGE: INVALID MESSAGESTART ping']): - conn.send_message(messages.msg_ping(nonce=0xff)) -- cgit v1.2.3 From c18803f28dce7f9beb2c81aead253d86b05618e7 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Thu, 19 Nov 2020 15:20:14 +0100 Subject: gnu: gajim: Honour $GAJIM_PLUGIN_PATH. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows Gajim to find plug-ins installed with Guix. Reported at . However, at the time of pushing both packaged plug-ins (gajim-omemo and gajim-openpgp) require an unstable version of Gajim and will not load. * gnu/packages/messaging.scm (gajim)[arguments]: Replace the ‘add-plugin-dirs’ substitution phase with a... [source]: ...patch that won't silently break in the future. * gnu/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/messaging.scm | 13 ++----------- gnu/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch | 11 +++++++++++ 3 files changed, 14 insertions(+), 11 deletions(-) create mode 100644 gnu/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index a1da838aee..e728ed28d1 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -990,6 +990,7 @@ dist_patch_DATA = \ %D%/packages/patches/freedink-engine-fix-sdl-hints.patch \ %D%/packages/patches/freeimage-unbundle.patch \ %D%/packages/patches/fuse-overlapping-headers.patch \ + %D%/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch \ %D%/packages/patches/ganeti-deterministic-manual.patch \ %D%/packages/patches/ganeti-disable-version-symlinks.patch \ %D%/packages/patches/ganeti-drbd-compat.patch \ diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index 624ad72c23..99131dcf05 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -743,7 +743,8 @@ of xmpppy.") (version-major+minor version) "/gajim-" version ".tar.gz")) (sha256 - (base32 "1gfcp3b5nq43xxz5my8vfhfxnnli726j3hzcgwh9fzrzzd9ic3gx")))) + (base32 "1gfcp3b5nq43xxz5my8vfhfxnnli726j3hzcgwh9fzrzzd9ic3gx")) + (patches (search-patches "gajim-honour-GAJIM_PLUGIN_PATH.patch")))) (build-system python-build-system) (arguments `(#:imported-modules @@ -756,16 +757,6 @@ of xmpppy.") (guix build utils)) #:phases (modify-phases %standard-phases - (add-after 'unpack 'add-plugin-dirs - (lambda _ - (substitute* "gajim/common/configpaths.py" - (("_paths\\['PLUGINS_USER'\\]\\]") - "_paths['PLUGINS_USER']] + \ -([os.getenv('GAJIM_PLUGIN_PATH')] \ -if os.getenv('GAJIM_PLUGIN_PATH') \ -and Path(os.getenv('GAJIM_PLUGIN_PATH')).is_dir() \ -else [])")) - #t)) (replace 'check (lambda _ ;; Tests require a running X server. diff --git a/gnu/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch b/gnu/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch new file mode 100644 index 0000000000..cb3313197c --- /dev/null +++ b/gnu/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch @@ -0,0 +1,11 @@ +--- a/gajim/common/configpaths.py 2020-11-19 12:12:02.004414323 +0100 ++++ a/gajim/common/configpaths.py 2020-11-19 15:34:52.211476895 +0100 +@@ -47,7 +47,7 @@ + return [Path(_paths['PLUGINS_BASE']), + Path('/app/plugins')] + return [Path(_paths['PLUGINS_BASE']), +- Path(_paths['PLUGINS_USER'])] ++ Path(_paths['PLUGINS_USER'])] + ([Path(os.getenv('GAJIM_PLUGIN_PATH'))] if os.getenv('GAJIM_PLUGIN_PATH') and Path(os.getenv('GAJIM_PLUGIN_PATH')).is_dir() else []) + + + def get_paths(type_: PathType) -> Generator[str, None, None]: -- cgit v1.2.3 From 02b4b10568c248d03268be550146d14d8e19c217 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 19 Nov 2020 23:59:20 +0100 Subject: gnu: grim: Remove obsolete patch. * gnu/packages/patches/grim-revert-output-rotation.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/image.scm (grim)[source](patches): Remove. --- gnu/local.mk | 1 - gnu/packages/image.scm | 3 +-- .../patches/grim-revert-output-rotation.patch | 27 ---------------------- 3 files changed, 1 insertion(+), 30 deletions(-) delete mode 100644 gnu/packages/patches/grim-revert-output-rotation.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index cf85fa737e..42a0e09e47 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1105,7 +1105,6 @@ dist_patch_DATA = \ %D%/packages/patches/gpsbabel-qstring.patch \ %D%/packages/patches/grantlee-merge-theme-dirs.patch \ %D%/packages/patches/grep-timing-sensitive-test.patch \ - %D%/packages/patches/grim-revert-output-rotation.patch \ %D%/packages/patches/grocsvs-dont-use-admiral.patch \ %D%/packages/patches/gromacs-tinyxml2.patch \ %D%/packages/patches/groovy-add-exceptionutilsgenerator.patch \ diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 5044a527ce..2027441bf5 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -1913,8 +1913,7 @@ identical visual appearance.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0fjmjq0ws9rlblkcqxxw2lv7zvvyi618jqzlnz5z9zb477jwdfib")) - (patches (search-patches "grim-revert-output-rotation.patch")))) + (base32 "0fjmjq0ws9rlblkcqxxw2lv7zvvyi618jqzlnz5z9zb477jwdfib")))) (build-system meson-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("scdoc" ,scdoc))) diff --git a/gnu/packages/patches/grim-revert-output-rotation.patch b/gnu/packages/patches/grim-revert-output-rotation.patch deleted file mode 100644 index cbf0a86502..0000000000 --- a/gnu/packages/patches/grim-revert-output-rotation.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 80b17ceaff90b81b28b44004d2aca4cc40f365be Mon Sep 17 00:00:00 2001 -From: Tobias Geerinckx-Rice -Date: Fri, 2 Oct 2020 00:07:30 +0200 -Subject: [PATCH] Revert "Correct interpretation of output rotation" - -This reverts commit 8f9d60885ce2f9bd66cd93d3378dcb6866d4588a. -It is incompatible with the current Sway version (1.4) in Guix. ---- - render.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/render.c b/render.c -index 8f31e7e..a6b0b12 100644 ---- a/render.c -+++ b/render.c -@@ -104,7 +104,7 @@ cairo_surface_t *render(struct grim_state *state, struct grim_box *geometry, - cairo_matrix_translate(&matrix, - (double)output->geometry.width / 2, - (double)output->geometry.height / 2); -- cairo_matrix_rotate(&matrix, get_output_rotation(output->transform)); -+ cairo_matrix_rotate(&matrix, -get_output_rotation(output->transform)); - cairo_matrix_scale(&matrix, - (double)raw_output_width / output_width * output_flipped_x, - (double)raw_output_height / output_height * output_flipped_y); --- -2.28.0 - -- cgit v1.2.3 From 155e3c775aab2f1e09be356d2ab06fb69b99d8f6 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Fri, 20 Nov 2020 20:47:19 +0100 Subject: gnu: xpra: Update to 4.0.5. * gnu/packages/xorg.scm (xpra): Update to 4.0.5. [source]: Remove xpra-4.0.4-norequests.patch. * gnu/packages/patches/xpra-4.0.4-norequests.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/patches/xpra-4.0.4-norequests.patch | 39 ------------------------ gnu/packages/xorg.scm | 7 ++--- 3 files changed, 3 insertions(+), 44 deletions(-) delete mode 100644 gnu/packages/patches/xpra-4.0.4-norequests.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 35369063f1..60155b0d3b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1724,7 +1724,6 @@ dist_patch_DATA = \ %D%/packages/patches/xplanet-1.3.1-libimage_gif.c.patch \ %D%/packages/patches/xplanet-1.3.1-xpUtil-Add2017LeapSecond.cpp.patch \ %D%/packages/patches/xpra-4.0.1-systemd-run.patch \ - %D%/packages/patches/xpra-4.0.4-norequests.patch \ %D%/packages/patches/xsane-fix-memory-leak.patch \ %D%/packages/patches/xsane-fix-pdf-floats.patch \ %D%/packages/patches/xsane-fix-snprintf-buffer-length.patch \ diff --git a/gnu/packages/patches/xpra-4.0.4-norequests.patch b/gnu/packages/patches/xpra-4.0.4-norequests.patch deleted file mode 100644 index e545be7f1d..0000000000 --- a/gnu/packages/patches/xpra-4.0.4-norequests.patch +++ /dev/null @@ -1,39 +0,0 @@ -Remove python-requests dependency, r27626 upstream. - ---- a/xpra/net/websockets/common.py (revision 27625) -+++ b/xpra/net/websockets/common.py (revision 27626) -@@ -7,7 +7,6 @@ - import uuid - from hashlib import sha1 - from base64 import b64encode --from requests.structures import CaseInsensitiveDict - - from xpra.os_util import strtobytes, bytestostr, monotonic_time - from xpra.log import Logger -@@ -77,7 +76,7 @@ - for line in lines: - parts = line.split(b": ", 1) - if len(parts)==2: -- headers[parts[0]] = parts[1] -+ headers[parts[0].lower()] = parts[1] - return headers - - def verify_response_headers(headers, key): -@@ -84,14 +83,13 @@ - log("verify_response_headers(%s)", headers) - if not headers: - raise Exception("no http headers found in response") -- headers = CaseInsensitiveDict(headers) -- upgrade = headers.get(b"Upgrade", b"") -+ upgrade = headers.get(b"upgrade", b"") - if upgrade!=b"websocket": - raise Exception("invalid http upgrade: '%s'" % upgrade) -- protocol = headers.get(b"Sec-WebSocket-Protocol", b"") -+ protocol = headers.get(b"sec-websocket-protocol", b"") - if protocol!=b"binary": - raise Exception("invalid websocket protocol: '%s'" % protocol) -- accept_key = headers.get(b"Sec-WebSocket-Accept", b"") -+ accept_key = headers.get(b"sec-websocket-accept", b"") - if not accept_key: - raise Exception("websocket accept key is missing") - expected_key = make_websocket_accept_hash(key) diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index 658fe3132d..23fe8a987f 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -6304,16 +6304,15 @@ basic eye-candy effects.") (define-public xpra (package (name "xpra") - (version "4.0.4") + (version "4.0.5") (source (origin (method url-fetch) (uri (string-append "https://www.xpra.org/src/xpra-" version ".tar.xz")) (sha256 - (base32 "10alqdfmgml9ixdi1nyd9xlw8a5q0j8m2sv4g9p83pd6z1a0rpv2")) - (patches (search-patches "xpra-4.0.1-systemd-run.patch" - "xpra-4.0.4-norequests.patch")))) + (base32 "11ml66z8vbc0fa567kkmp2j20l5l60aflnkrz5ay8arw3w92nmnz")) + (patches (search-patches "xpra-4.0.1-systemd-run.patch")))) (build-system python-build-system) ;; see also http://xpra.org/trac/wiki/Dependencies (inputs `( -- cgit v1.2.3 From 0ada181aa1a3a675a1d189744429665e0f4cb301 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Sun, 22 Nov 2020 21:02:59 -0600 Subject: gnu: ocaml-cairo2: Patch test phase. * gnu/local.mk (ocaml-cairo2-caml_ba_array_fix.patch): Add ref. * gnu/packages/ocaml.scm (ocaml-cairo2): Utilize patch. * gnu/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch: Add file. --- gnu/local.mk | 1 + gnu/packages/ocaml.scm | 12 ++-- .../patches/ocaml-cairo2-caml_ba_array-fix.patch | 68 ++++++++++++++++++++++ 3 files changed, 76 insertions(+), 5 deletions(-) create mode 100644 gnu/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 60155b0d3b..f0a5560b8f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1392,6 +1392,7 @@ dist_patch_DATA = \ %D%/packages/patches/nvi-db4.patch \ %D%/packages/patches/nyacc-binary-literals.patch \ %D%/packages/patches/ocaml-bitstring-fix-configure.patch \ + %D%/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch \ %D%/packages/patches/ocaml-CVE-2015-8869.patch \ %D%/packages/patches/ocaml-Add-a-.file-directive.patch \ %D%/packages/patches/ocaml-enable-ocamldoc-reproducibility.patch \ diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 706def4f43..369e819573 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -5797,16 +5797,18 @@ convenience functions for vectors and matrices.") (url "https://github.com/Chris00/ocaml-cairo") (commit version))) (file-name (git-file-name name version)) + (patches + (search-patches + ;; NOTE: This patch will be obsolete on the + ;; next tagged release. Remove it at that + ;; point. + "ocaml-cairo2-caml_ba_array-fix.patch")) (sha256 (base32 "0wzysis9fa850s68qh8vrvqc6svgllhwra3kzll2ibv0wmdqrich")))) (build-system dune-build-system) (arguments - `(;; NOTE: GC reclaims bigarrays packed into a custom structure - ;; regardless of their refcounts. Affects OCaml >= 4.10.x - ;; https://github.com/ocaml/ocaml/issues/9360 - #:tests? #f - #:test-target "tests")) + `(#:test-target "tests")) (inputs `(("cairo" ,cairo) ("gtk+-2" ,gtk+-2) diff --git a/gnu/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch b/gnu/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch new file mode 100644 index 0000000000..1ebde1997f --- /dev/null +++ b/gnu/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch @@ -0,0 +1,68 @@ +From 3c70f2ff18650c4794556049cd4ea22a58cc719e Mon Sep 17 00:00:00 2001 +From: Christophe Troestler +Date: Sun, 27 Sep 2020 23:20:52 +0200 +Subject: [PATCH] Do not store the Caml_ba_array_val pointer during surface + creation + +Extracted from Cairo git-tree on November 22, 2020 by +Brett Gilio +--- + src/cairo_stubs.c | 3 ++- + tests/image_create.ml | 5 +++-- + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/cairo_stubs.c b/src/cairo_stubs.c +index 641ee2c..200abf3 100644 +--- a/src/cairo_stubs.c ++++ b/src/cairo_stubs.c +@@ -1580,6 +1580,7 @@ static cairo_status_t caml_cairo_image_bigarray_attach_proxy + caml_cairo_image_bigarray_finalize); + } + ++#define b (Caml_ba_array_val(vb)) + #define SURFACE_CREATE_DATA(name) \ + CAMLexport value caml_cairo_image_surface_create_for_##name \ + (value vb, value vformat, value vwidth, value vheight, value vstride) \ +@@ -1588,7 +1589,6 @@ static cairo_status_t caml_cairo_image_bigarray_attach_proxy + CAMLlocal1(vsurf); \ + cairo_surface_t* surf; \ + const int width = Int_val(vwidth); \ +- struct caml_ba_array *b = Caml_ba_array_val(vb); \ + cairo_status_t status; \ + \ + if ((b->flags & CAML_BA_MANAGED_MASK) == CAML_BA_MAPPED_FILE) \ +@@ -1610,6 +1610,7 @@ static cairo_status_t caml_cairo_image_bigarray_attach_proxy + + SURFACE_CREATE_DATA(data8) + SURFACE_CREATE_DATA(data32) ++#undef b + + #define SURFACE_GET_DATA(type, num_dims, dims ...) \ + CAMLexport value caml_cairo_image_surface_get_##type(value vsurf) \ +diff --git a/tests/image_create.ml b/tests/image_create.ml +index eec98d6..b13c206 100644 +--- a/tests/image_create.ml ++++ b/tests/image_create.ml +@@ -10,6 +10,7 @@ let create() = + + let () = + let cr = create() in ++ printf "With Cairo handle:\n%!"; + set_source_rgb cr 1. 1. 1.; + rectangle cr 0. 0. ~w:300. ~h:300.; + fill cr; +@@ -21,9 +22,9 @@ let () = + show_text cr "Hello"; + Gc.compact(); Gc.compact(); + +- eprintf "Write image\n%!"; ++ eprintf "- Write image\n%!"; + PNG.write (get_target cr) "test_image.png"; +- eprintf "Finish surface\n%!"; ++ eprintf "- Finish surface\n%!"; + Surface.finish (get_target cr); + Gc.compact() + +-- +2.29.2 + -- cgit v1.2.3 From 2bf502138c9c8cad945866061772fe0e1f4b7175 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 23 Nov 2020 05:06:08 +0100 Subject: gnu: lsof: Make test failures fatal. * gnu/packages/lsof.scm (lsof)[source]: Add patch to make test suite failures stop the build. * gnu/packages/patches/lsof-fatal-test-failures.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/lsof.scm | 4 +- .../patches/lsof-fatal-test-failures.patch | 58 ++++++++++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/lsof-fatal-test-failures.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index f0a5560b8f..f105f559f7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1313,6 +1313,7 @@ dist_patch_DATA = \ %D%/packages/patches/lrcalc-includes.patch \ %D%/packages/patches/lrzip-CVE-2017-8842.patch \ %D%/packages/patches/lsh-fix-x11-forwarding.patch \ + %D%/packages/patches/lsof-fatal-test-failures.patch \ %D%/packages/patches/lua-CVE-2014-5461.patch \ %D%/packages/patches/lua-pkgconfig.patch \ %D%/packages/patches/lua51-liblua-so.patch \ diff --git a/gnu/packages/lsof.scm b/gnu/packages/lsof.scm index 0421ca7e9d..77d93e99c7 100644 --- a/gnu/packages/lsof.scm +++ b/gnu/packages/lsof.scm @@ -24,6 +24,7 @@ #:use-module (guix packages) #:use-module (guix git-download) #:use-module (guix build-system gnu) + #:use-module (gnu packages) #:use-module (gnu packages groff) #:use-module (gnu packages perl)) @@ -39,7 +40,8 @@ (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0yxv2jg6rnzys49lyrz9yjb4knamah4xvlqj596y6ix3vm4k3chp")))) + (base32 "0yxv2jg6rnzys49lyrz9yjb4knamah4xvlqj596y6ix3vm4k3chp")) + (patches (search-patches "lsof-fatal-test-failures.patch")))) (build-system gnu-build-system) (native-inputs `(("groff" ,groff) ; for soelim diff --git a/gnu/packages/patches/lsof-fatal-test-failures.patch b/gnu/packages/patches/lsof-fatal-test-failures.patch new file mode 100644 index 0000000000..e874ba6ad4 --- /dev/null +++ b/gnu/packages/patches/lsof-fatal-test-failures.patch @@ -0,0 +1,58 @@ +From: Tobias Geerinckx-Rice +Date: Mon, 23 Nov 2020 05:36:53 +0100 +Subject: [PATCH] gnu: lsof: Make test failures fatal. + +Submitted upstream[0]. + +[0]: https://github.com/lsof-org/lsof/pull/144 + +diff --git a/tests/Makefile b/tests/Makefile +index 08574a0..2923bb8 100644 +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -27,7 +27,7 @@ all: ${CKTSTDB} ${BASTST} ${STDTST} FRC + exit 1 ;\ + fi + @rm -f config.LT* +- -@err=0; \ ++ @err=0; \ + echo ""; \ + echo "Basic test:"; \ + ./${BASTST}; \ +@@ -54,8 +54,11 @@ all: ${CKTSTDB} ${BASTST} ${STDTST} FRC + echo "Suggestion: try the optional tests: \"make opt\""; \ + echo ""; \ + fi; \ +- fi; +- @rm -f config.LT* ++ fi; \ ++ rm -f config.LT*; \ ++ if [ $$err -ne 0 ]; then \ ++ exit 1; \ ++ fi + + auto: ckDB silent FRC + +@@ -112,7 +115,7 @@ LTunix: LTunix.c ${CONFIG} ${LIBOBJ} ${HDR} config.ldflags + + opt: ${CKTSTDB} ${OPTTST} FRC + @rm -f config.LT* +- -@err=0; \ ++ @err=0; \ + echo ""; \ + echo "Optional tests:"; \ + for i in ${OPTTST}; do \ +@@ -126,8 +129,11 @@ opt: ${CKTSTDB} ${OPTTST} FRC + else \ + echo "All optional tests succeeded."; \ + fi; \ +- echo ""; +- @rm -f config.LT* ++ echo ""; \ ++ rm -f config.LT*; \ ++ if [ $$err -ne 0 ]; then \ ++ exit 1; \ ++ fi + + optional: opt + -- cgit v1.2.3 From b1aac582caee711020c078217c58b15aeeef550e Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 23 Nov 2020 09:44:57 +0200 Subject: gnu: python-pydot: Run tests. * gnu/packges/graphviz.scm (python-pydot)[source]: Add patch. [arguments]: Override check phase. [native-inputs]: Add graphviz. * gnu/packages/patches/python-pydot-regression-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/graphviz.scm | 18 ++++- .../patches/python-pydot-regression-test.patch | 79 ++++++++++++++++++++++ 3 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/python-pydot-regression-test.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index f105f559f7..2bde6e604b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1532,6 +1532,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-paste-remove-timing-test.patch \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ %D%/packages/patches/python-pycrypto-time-clock.patch \ + %D%/packages/patches/python-pydot-regression-test.patch \ %D%/packages/patches/python2-pygobject-2-deprecation.patch \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ %D%/packages/patches/python-robotframework-source-date-epoch.patch \ diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm index bd70c87c9a..86f20bf23f 100644 --- a/gnu/packages/graphviz.scm +++ b/gnu/packages/graphviz.scm @@ -32,6 +32,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) + #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages bison) #:use-module (gnu packages check) @@ -331,11 +332,24 @@ can be used either as a standalone application, or as a Python library.") (uri (pypi-uri "pydot" version)) (sha256 (base32 - "00az4cbf8bv447lkk9xi6pjm7gcc7ia33y4pm71fwfwis56rv76l")))) + "00az4cbf8bv447lkk9xi6pjm7gcc7ia33y4pm71fwfwis56rv76l")) + (patches (search-patches "python-pydot-regression-test.patch")))) (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'check + ;; Taken from .travis.yaml + (lambda* (#:key tests? inputs outputs #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (with-directory-excursion "test" + (invoke "python" "pydot_unittest.py"))) + #t))))) (native-inputs ;; For tests. - `(("python-chardet" ,python-chardet))) + `(("graphviz" ,graphviz) + ("python-chardet" ,python-chardet))) (propagated-inputs `(("python-pyparsing" ,python-pyparsing))) (home-page "https://github.com/erocarrera/pydot") diff --git a/gnu/packages/patches/python-pydot-regression-test.patch b/gnu/packages/patches/python-pydot-regression-test.patch new file mode 100644 index 0000000000..d2f0f5996e --- /dev/null +++ b/gnu/packages/patches/python-pydot-regression-test.patch @@ -0,0 +1,79 @@ +This patch is taken from the upstream repository +https://github.com/pydot/pydot/commit/a10ced4d132361027a545a471af4541dea8c5cf5.patch +It should be included in the 1.4.2 release. + + +From a10ced4d132361027a545a471af4541dea8c5cf5 Mon Sep 17 00:00:00 2001 +From: Peter Nowee +Date: Wed, 26 Jun 2019 15:43:38 +0800 +Subject: [PATCH] Fix multi.dot Graphviz regression test + +Commit d6602ad of 2018-12-01 fixed the regression test broken by commit +2d55978 of 2016-07-01. This revealed that `test/graphs/multi.dot` was +failing. + +`multi.dot` was introduced in commit 2b3f088 of 2010-11-07 together +with many of the other tests still here today. It has not been touched +since. It is a DOT-file containing two digraphs. The regression test +compares the JPEG images rendered from the DOT-file by pydot with those +rendered by Graphviz's dot directly. + +Commit 66734d2 of 2016-07-01 is the actual cause of the failure. It +changed one of the render methods of the regression test, +`_render_with_pydot`, from calculating a single hash for all the JPEG +images to calculating separate hashes for each JPEG image and then +concatenating those hashes in one long string. The other render method, +`_render_with_graphviz`, still calculates a single hash over all data. +For DOT-files that generate only one image the end result is the same, +but because `multi.dot` has two graphs, it produces two images and this +leads to comparing a string of two hashes with one single hash. + +I do not think the change in generating the hash was intentional, for +the following reasons: +- Commit 66734d2 states that its purpose was to adapt the test to an + API change in pydot. It does not mention a deliberate choice to + change the testing method. +- There was no effort to change `_render_with_graphviz` to also produce + multiple hashes. +- Except for easier debugging in case of a failing test with multiple + images (AFAICT, only `multi.dot`), I do not see much added benefit in + checking a concatenation of the hashes of all images vs. checking one + hash of all images together: In both cases the test will fail if one + or more images is rendered differently. +- Given that there were many commits authored that same hour, including + commit 2d55978 which broke the regression tests, I suspect the author + did not run the tests for each individual commit, but only at the end + of that batch, and was therefore also not alerted of this change by + the test suite. + +Assuming that the change was not intended, this commit will now revert +`_render_with_pydot` to the old behavior of calculating a single hash +from all JPEG image data. + +Tested with Debian 9.9, Graphviz 2.38.0-17, Python 2.7.13-2 and 3.5.3-1. + +Fixes https://github.com/pydot/pydot/issues/204. +--- + test/pydot_unittest.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/test/pydot_unittest.py b/test/pydot_unittest.py +index 881ee16..64aa856 100644 +--- a/test/pydot_unittest.py ++++ b/test/pydot_unittest.py +@@ -194,11 +194,11 @@ def _render_with_graphviz(self, filename, encoding): + + def _render_with_pydot(self, filename, encoding): + c = pydot.graph_from_dot_file(filename, encoding=encoding) +- sha = '' ++ jpe_data = bytearray() + for g in c: +- jpe_data = g.create(prog=TEST_PROGRAM, format='jpe', encoding=encoding) +- sha += sha256(jpe_data).hexdigest() +- return sha ++ jpe_data.extend(g.create(prog=TEST_PROGRAM, format='jpe', ++ encoding=encoding)) ++ return sha256(jpe_data).hexdigest() + + def test_my_regression_tests(self): + path = os.path.join(test_dir, TESTS_DIR_1) -- cgit v1.2.3 From ba902a15987b5ea2cd7adf2487229c2fe444931c Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 23 Nov 2020 19:22:00 +0100 Subject: gnu: eigen: Add upstream bugfix patch. This fixes the build of nanopolish, imp, and others. Reported by apteryx in #guix. * gnu/packages/algebra.scm (eigen)[source]: Add patch. * gnu/packages/patches/eigen-remove-openmp-error-counting.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/algebra.scm | 3 +- .../eigen-remove-openmp-error-counting.patch | 64 ++++++++++++++++++++++ 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/eigen-remove-openmp-error-counting.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 2bde6e604b..14b626c600 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -935,6 +935,7 @@ dist_patch_DATA = \ %D%/packages/patches/ecl-16-format-directive-limit.patch \ %D%/packages/patches/ecl-16-ignore-stderr-write-error.patch \ %D%/packages/patches/ecl-16-libffi.patch \ + %D%/packages/patches/eigen-remove-openmp-error-counting.patch \ %D%/packages/patches/eigen-stabilise-sparseqr-test.patch \ %D%/packages/patches/einstein-build.patch \ %D%/packages/patches/elfutils-tests-ptrace.patch \ diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index 1c485a3f07..5b391449a0 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -1017,7 +1017,8 @@ Optional thin wrappers allow usage of the library from other languages.") (base32 "1vxrsncfnkyq6gwxpsannpryp12mk7lc8f42ybvz3saf7icwc582")) (file-name (string-append name "-" version ".tar.bz2")) - (patches (search-patches "eigen-stabilise-sparseqr-test.patch")) + (patches (search-patches "eigen-remove-openmp-error-counting.patch" + "eigen-stabilise-sparseqr-test.patch")) (modules '((guix build utils))) (snippet ;; There are 3 test failures in the "unsupported" directory, diff --git a/gnu/packages/patches/eigen-remove-openmp-error-counting.patch b/gnu/packages/patches/eigen-remove-openmp-error-counting.patch new file mode 100644 index 0000000000..556474e8b3 --- /dev/null +++ b/gnu/packages/patches/eigen-remove-openmp-error-counting.patch @@ -0,0 +1,64 @@ +From ef3cc72cb65e2d500459c178c63e349bacfa834f Mon Sep 17 00:00:00 2001 +From: Luke Peterson +Date: Thu, 8 Oct 2020 12:16:53 -0700 +Subject: [PATCH] Remove error counting in OpenMP parallelize_gemm + +This resolves a compilation error associated with +Eigen::eigen_assert_exception. It also eliminates the counting of +exceptions that may occur in the OpenMP parallel section. If an +unhandled exception occurs in this section, the behavior is non-conforming +according to the OpenMP specification. +--- + Eigen/src/Core/products/Parallelizer.h | 14 +++++--------- + test/CMakeLists.txt | 2 +- + 2 files changed, 6 insertions(+), 10 deletions(-) + +diff --git a/Eigen/src/Core/products/Parallelizer.h b/Eigen/src/Core/products/Parallelizer.h +index 67b2442b5..a3cc05b77 100644 +--- a/Eigen/src/Core/products/Parallelizer.h ++++ b/Eigen/src/Core/products/Parallelizer.h +@@ -132,8 +132,7 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth, + + ei_declare_aligned_stack_constructed_variable(GemmParallelInfo,info,threads,0); + +- int errorCount = 0; +- #pragma omp parallel num_threads(threads) reduction(+: errorCount) ++ #pragma omp parallel num_threads(threads) + { + Index i = omp_get_thread_num(); + // Note that the actual number of threads might be lower than the number of request ones. +@@ -152,14 +151,11 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth, + info[i].lhs_start = r0; + info[i].lhs_length = actualBlockRows; + +- EIGEN_TRY { +- if(transpose) func(c0, actualBlockCols, 0, rows, info); +- else func(0, rows, c0, actualBlockCols, info); +- } EIGEN_CATCH(...) { +- ++errorCount; +- } ++ if(transpose) ++ func(c0, actualBlockCols, 0, rows, info); ++ else ++ func(0, rows, c0, actualBlockCols, info); + } +- if (errorCount) EIGEN_THROW_X(Eigen::eigen_assert_exception()); + #endif + } + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 0747aa6cb..b02577780 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -163,7 +163,7 @@ ei_add_test(constructor) + ei_add_test(linearstructure) + ei_add_test(integer_types) + ei_add_test(unalignedcount) +-if(NOT EIGEN_TEST_NO_EXCEPTIONS) ++if(NOT EIGEN_TEST_NO_EXCEPTIONS AND NOT EIGEN_TEST_OPENMP) + ei_add_test(exceptions) + endif() + ei_add_test(redux) +-- +GitLab + -- cgit v1.2.3 From 689d88451e7f1db62df5989ac3ff82f540424061 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 22 Nov 2020 16:20:36 +0100 Subject: gnu: ungoogled-chromium: Update to 87.0.4280.66-0.1f7cdef. * gnu/packages/chromium.scm (%preserved-third-party-files): Adjust for 87. (arch-patch, %arch-revision, %arch-patches): Remove. (ungoogled-chromium-snippet): Remove %ARCH-PATCHES. (%ungoogled-revision): Set to 1f7cdef6dfa8f612afde8f988131f210612333e0. (%chromium-version): Set to 87.0.4280.66. (ungoogled-chromium)[source]: Update hash. [arguments]: Adjust #:configure-flags for changes in 87. Enable Pipewire support in WebRTC. [native-inputs]: Add WAYLAND. [inputs]: Add PIPEWIRE and WAYLAND. (ungoogled-chromium/wayland): Implement as a wrapper over UNGOOGLED-CHROMIUM. * gnu/packages/patches/ungoogled-chromium-system-nspr.patch: Adjust for 87. --- gnu/packages/chromium.scm | 118 ++++++++++++--------- .../patches/ungoogled-chromium-system-nspr.patch | 22 ++-- 2 files changed, 81 insertions(+), 59 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm index 3d6a1b03ec..73ef209100 100644 --- a/gnu/packages/chromium.scm +++ b/gnu/packages/chromium.scm @@ -27,9 +27,11 @@ #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial) #:use-module (gnu packages) #:use-module (gnu packages assembly) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages build-tools) #:use-module (gnu packages compression) @@ -141,6 +143,7 @@ "third_party/depot_tools/owners.py" ;BSD-3 "third_party/devtools-frontend" ;BSD-3 "third_party/devtools-frontend/src/front_end/third_party/acorn" ;Expat + "third_party/devtools-frontend/src/front_end/third_party/axe-core" ;MPL2.0 "third_party/devtools-frontend/src/front_end/third_party/chromium" ;BSD-3 "third_party/devtools-frontend/src/front_end/third_party/codemirror" ;Expat "third_party/devtools-frontend/src/front_end/third_party/fabricjs" ;Expat @@ -150,8 +153,8 @@ "third_party/devtools-frontend/src/front_end/third_party/lit-html" ;BSD-3 "third_party/devtools-frontend/src/front_end/third_party/lodash-isequal" ;Expat "third_party/devtools-frontend/src/front_end/third_party/marked" ;Expat, BSD-3 + "third_party/devtools-frontend/src/front_end/third_party/puppeteer" ;ASL2.0 "third_party/devtools-frontend/src/front_end/third_party/wasmparser" ;ASL2.0 - "third_party/devtools-frontend/src/third_party/axe-core" ;MPL2.0 "third_party/devtools-frontend/src/third_party/pyjson5" ;ASL2.0 "third_party/devtools-frontend/src/third_party/typescript" ;ASL2.0 "third_party/dom_distiller_js" ;BSD-3 @@ -219,6 +222,7 @@ "third_party/pffft" ;the "FFTPACK" license, similar to BSD-3 "third_party/ply" ;BSD-3 "third_party/polymer" ;BSD-3 + "third_party/private_membership" ;ASL2.0 "third_party/private-join-and-compute" ;ASL2.0 "third_party/protobuf" ;BSD-3 "third_party/protobuf/third_party/six" ;Expat @@ -231,6 +235,8 @@ "third_party/s2cellid" ;ASL2.0 "third_party/schema_org" ;CC-BY-SA3.0 "third_party/securemessage" ;ASL2.0 + "third_party/shaka-player" ;ASL2.0 + "third_party/shell-encryption" ;ASL2.0 "third_party/skia" ;BSD-3 "third_party/skia/include/third_party/skcms" ;BSD-3 "third_party/skia/third_party/skcms" ;BSD-3 @@ -252,6 +258,8 @@ "third_party/usb_ids" ;BSD-3 "third_party/usrsctp" ;BSD-2 "third_party/vulkan_memory_allocator" ;Expat + "third_party/wayland/protocol" ;Expat + "third_party/wayland/stubs" ;BSD-3, Expat "third_party/wayland/wayland_scanner_wrapper.py" ;BSD-3 "third_party/wayland-protocols" ;Expat "third_party/web-animations-js" ;ASL2.0 @@ -294,17 +302,9 @@ (string-append "ungoogled-chromium-" category "-" name)))) (sha256 (base32 hash)))) -(define (arch-patch name revision hash) - (origin - (method url-fetch) - (uri (string-append "https://raw.githubusercontent.com/archlinux" - "/svntogit-packages/" revision "/trunk/" name)) - (sha256 (base32 hash)))) - -(define %chromium-version "86.0.4240.198") -(define %ungoogled-revision "b68e17f32e9eff56615a07b44e457835bb9460c6") +(define %chromium-version "87.0.4280.66") +(define %ungoogled-revision "1f7cdef6dfa8f612afde8f988131f210612333e0") (define %debian-revision "debian/84.0.4147.105-1") -(define %arch-revision "2cbe439471932d30ff2c8ded6b3dfd51b312bbc9") (define %debian-patches (list (debian-patch "system/zlib.patch" %debian-revision @@ -312,17 +312,6 @@ (debian-patch "system/openjpeg.patch" %debian-revision "0zd6v5njx1pc7i0y6mslxvpx5j4cq01mmyx55qcqx8qzkm0gm48j"))) -(define %arch-patches - (list (arch-patch "check-for-enable-accelerated-video-decode-on-Linux.patch" - %arch-revision - "12qj23dcp2g2ivyfyj13m4fzf68nllb9djwcxf1h195gn8wkml03") - (arch-patch "only-fall-back-to-the-i965-driver-if-we-re-on-iHD.patch" - %arch-revision - "0073qjp0dp9kj2ix2j6cxrima01rpdpkcjj9crxlb9b43b4cc53m") - (arch-patch "fix-invalid-end-iterator-usage-in-CookieMonster.patch" - %arch-revision - "1p1wy3dfncw0hhz77a1km0xjhix69ksgbpa569qz86nv76jbgn39"))) - (define %ungoogled-origin (origin (method git-fetch) @@ -332,7 +321,7 @@ (string-take %ungoogled-revision 7))) (sha256 (base32 - "0visyhz321ykrmbjndvx31yd8xlmha9gas0xbkavc2i45rpfahjq")))) + "1cka9h7znkmilz9ld4s8pw1jjq2p7br03g3agcnqrk591y5h141i")))) (define %guix-patches (list (local-file @@ -363,8 +352,7 @@ (for-each (lambda (patch) (invoke "patch" "-p1" "--force" "--input" patch "--no-backup-if-mismatch")) - (append '#+%debian-patches '#+%arch-patches - '#+%guix-patches)) + (append '#+%debian-patches '#+%guix-patches)) (with-directory-excursion #+%ungoogled-origin (format #t "Ungooglifying...~%") @@ -455,7 +443,7 @@ %chromium-version ".tar.xz")) (sha256 (base32 - "0i3s1il0x5yi3528gdsg3bhnyhs2x24zh7p1nd5apv3va9g85ax0")) + "0hgpg31gkksqgyvycsan7l7vjypc7cr6ikjfygf2zv7dhbmf9a19")) (modules '((guix build utils))) (snippet (force ungoogled-chromium-snippet)))) (build-system gnu-build-system) @@ -469,7 +457,7 @@ #:configure-flags ;; See tools/gn/docs/cookbook.md and ;; https://www.chromium.org/developers/gn-build-configuration - ;; for usage. Run "./gn args . --list" in the Release + ;; for usage. Run "gn args . --list" in the Release ;; directory for an exhaustive list of supported flags. ;; (Note: The 'configure' phase will do that for you.) (list "is_debug=false" @@ -477,8 +465,10 @@ ;; a developer build. "is_official_build=true" (string-append "max_jobs_per_link=" - (number->string (parallel-job-count))) + ;; Respect the default cap of 8 jobs. + (number->string (max 8 (parallel-job-count)))) "clang_use_chrome_plugins=false" + "chrome_pgo_phase=0" "use_sysroot=false" "goma_dir=\"\"" "enable_nacl=false" @@ -512,6 +502,11 @@ "use_system_libjpeg=true" "use_system_libopenjpeg2=true" "use_system_libpng=true" + "use_system_wayland_scanner=true" + (string-append "system_wayland_scanner_path=\"" + (assoc-ref %build-inputs "wayland-scanner") + "/bin/wayland-scanner\"") + "use_system_zlib=true" "use_gnome_keyring=false" ;deprecated by libsecret "use_openh264=true" @@ -535,6 +530,8 @@ ;; WebRTC stuff. "rtc_use_h264=true" + "rtc_use_pipewire=true" + "rtc_link_pipewire=true" ;; Don't use bundled sources. "rtc_build_json=true" ;FIXME: libc++ std::string ABI difference "rtc_build_libevent=false" @@ -790,7 +787,8 @@ ("python-beautifulsoup4" ,python2-beautifulsoup4) ("python-html5lib" ,python2-html5lib) - ("python" ,python-2))) + ("python" ,python-2) + ("wayland-scanner" ,wayland))) (inputs `(("alsa-lib" ,alsa-lib) ("atk" ,atk) @@ -840,12 +838,14 @@ ("opus" ,opus+custom) ("pango" ,pango) ("pciutils" ,pciutils) + ("pipewire" ,pipewire) ("pulseaudio" ,pulseaudio) ("snappy" ,snappy) ("speech-dispatcher" ,speech-dispatcher) ("udev" ,eudev) ("valgrind" ,valgrind) - ("vulkan-headers" ,vulkan-headers))) + ("vulkan-headers" ,vulkan-headers) + ("wayland" ,wayland))) (native-search-paths (list (search-path-specification (variable "CHROMIUM_EXTENSION_DIRECTORY") @@ -878,24 +878,46 @@ disabled in order to protect the users privacy.") license:lgpl2.1+)))) (define-public ungoogled-chromium/wayland - (package/inherit ungoogled-chromium + (package + (inherit ungoogled-chromium) (name "ungoogled-chromium-wayland") + (native-inputs '()) (inputs - `(("wayland" ,wayland) - ("wayland-protocols" ,wayland-protocols) - ,@(package-inputs ungoogled-chromium))) + `(("bash" ,bash-minimal) + ("glibc-locales" ,glibc-utf8-locales) + ("ungoogled-chromium" ,ungoogled-chromium))) + (build-system trivial-build-system) (arguments - (substitute-keyword-arguments (package-arguments ungoogled-chromium) - ((#:configure-flags flags) - `(append (list "use_ozone=true" - "ozone_platform_wayland=true" - "ozone_platform_x11=true" - "ozone_auto_platforms=false" - "ozone_platform=\"wayland\"" - "use_xkbcommon=true" - "use_system_minigbm=true" - "use_system_libwayland=true" - (string-append "system_wayland_scanner_path=\"" - (assoc-ref %build-inputs "wayland") - "/bin/wayland-scanner\"")) - (delete "use_vaapi=true" ,flags))))))) + '(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let* ((bash (assoc-ref %build-inputs "bash")) + (chromium (assoc-ref %build-inputs "ungoogled-chromium")) + (locales (assoc-ref %build-inputs "glibc-locales")) + (out (assoc-ref %outputs "out")) + (exe (string-append out "/bin/chromium"))) + + ;; Use a Unicode locale so we can substitute the file below. + (setenv "GUIX_LOCPATH" (string-append locales "/lib/locale")) + (setlocale LC_ALL "en_US.utf8") + + (mkdir-p (dirname exe)) + (symlink (string-append chromium "/bin/chromedriver") + (string-append out "/bin/chromedriver")) + + (call-with-output-file exe + (lambda (port) + (format port "#!~a +exec ~a --enable-features=UseOzonePlatform --ozone-platform=wayland $@" + (string-append bash "/bin/bash") + (string-append chromium "/bin/chromium")))) + (chmod exe #o555) + + ;; Provide the manual and .desktop file. + (copy-recursively (string-append chromium "/share") + (string-append out "/share")) + (substitute* (string-append + out "/share/applications/chromium.desktop") + ((chromium) out)) + #t)))))) diff --git a/gnu/packages/patches/ungoogled-chromium-system-nspr.patch b/gnu/packages/patches/ungoogled-chromium-system-nspr.patch index 6fbc0a56a7..988296b143 100644 --- a/gnu/packages/patches/ungoogled-chromium-system-nspr.patch +++ b/gnu/packages/patches/ungoogled-chromium-system-nspr.patch @@ -17,8 +17,8 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys --- a/base/time/time.cc +++ b/base/time/time.cc @@ -14,7 +14,7 @@ - #include "base/macros.h" - #include "base/no_destructor.h" + #include "base/optional.h" + #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" -#include "base/third_party/nspr/prtime.h" +#include @@ -27,7 +27,7 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -107,6 +107,9 @@ config("base_flags") { +@@ -102,6 +102,9 @@ "-Wglobal-constructors", ] } @@ -37,7 +37,7 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys } config("base_implementation") { -@@ -712,8 +715,6 @@ jumbo_component("base") { +@@ -720,8 +723,6 @@ "third_party/cityhash_v103/src/city_v103.h", "third_party/icu/icu_utf.cc", "third_party/icu/icu_utf.h", @@ -48,19 +48,19 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys "threading/hang_watcher.cc", --- a/tools/gn/build/gen.py +++ b/tools/gn/build/gen.py -@@ -339,6 +339,9 @@ def WriteGNNinja(path, platform, host, o +@@ -380,6 +380,9 @@ if not options.no_static_libstdcpp: ldflags.append('-static-libstdc++') + # Additional system libraries that are used. + libs.append('-lnspr4') + - # This is needed by libc++. - if not platform.is_mingw(): - libs.append('-ldl') + if platform.is_mingw() or platform.is_msys(): + cflags.remove('-std=c++17') + cflags.extend([ --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn -@@ -103,6 +103,9 @@ +@@ -110,6 +110,9 @@ "//build/win:default_exe_manifest", "//third_party/icu", ] @@ -72,7 +72,7 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys # This isn't strictly necessary since we can just add the deps to "platform", --- a/third_party/crashpad/crashpad/handler/BUILD.gn +++ b/third_party/crashpad/crashpad/handler/BUILD.gn -@@ -140,6 +140,9 @@ +@@ -144,6 +144,9 @@ "../third_party/mini_chromium:base", "../tools:tool_support", ] @@ -104,7 +104,7 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys + "-lnspr4", + ] if (is_ios) { - libs = [ "UIKit.framework" ] + frameworks = [ "UIKit.framework" ] } --- a/components/schema_org/BUILD.gn +++ b/components/schema_org/BUILD.gn -- cgit v1.2.3 From 8b6ce47ccc6bb8c734b72786a6c4df10dad08643 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 24 Nov 2020 12:15:09 +0100 Subject: gnu: mupdf: Use only dynamic linking. * gnu/packages/pdf.scm (mupdf)[source]: Add patch. [arguments]: Build and find the shared library. (zathura-pdf-mupdf)[arguments]: Add a 'remove-libmupdfthird.a-requirement phase to deal with the now-missing static one. * gnu/packages/patches/mupdf-fix-linkage.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/patches/mupdf-fix-linkage.patch | 27 +++++++++++++++++++++++++++ gnu/packages/pdf.scm | 11 +++++++++++ 3 files changed, 39 insertions(+) create mode 100644 gnu/packages/patches/mupdf-fix-linkage.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 14b626c600..5277403196 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1367,6 +1367,7 @@ dist_patch_DATA = \ %D%/packages/patches/mumps-shared-libseq.patch \ %D%/packages/patches/mumps-shared-mumps.patch \ %D%/packages/patches/mumps-shared-pord.patch \ + %D%/packages/patches/mupdf-fix-linkage.patch \ %D%/packages/patches/mupen64plus-ui-console-notice.patch \ %D%/packages/patches/mupen64plus-video-z64-glew-correct-path.patch \ %D%/packages/patches/musl-cross-locale.patch \ diff --git a/gnu/packages/patches/mupdf-fix-linkage.patch b/gnu/packages/patches/mupdf-fix-linkage.patch new file mode 100644 index 0000000000..4ffd1c6a77 --- /dev/null +++ b/gnu/packages/patches/mupdf-fix-linkage.patch @@ -0,0 +1,27 @@ +From: Tobias Geerinckx-Rice +Date: Tue, 24 Nov 2020 10:29:28 +0000 +Subject: [PATCH] gnu: mupdf: Fix linkage. + +Replace broken linkage to ‘build/shared-release/libmupdf.so’ with the +proper ‘-L$(libdir) -lmupdf’ incantation, and fix libmupdf.so's mode. + +--- mupdf-1.18.0-source.org/Makefile ++++ mupdf-1.18.0-source/Makefile +@@ -61,7 +61,7 @@ + ifdef RANLIB + RANLIB_CMD = $(QUIET_RANLIB) $(RANLIB) $@ + endif +-LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) ++LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(CC) $(LDFLAGS) -o $@ $(subst $(MUPDF_LIB),-L$(libdir) -L$(OUT) -lmupdf,$^) $(LIBS) + TAGS_CMD = $(QUIET_TAGS) ctags -R --c-kinds=+p + WINDRES_CMD = $(QUIET_WINDRES) $(MKTGTDIR) ; $(WINDRES) $< $@ + OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(LD) -r -b binary -z noexecstack -o $@ $< +@@ -364,7 +364,7 @@ install: libs apps + install -m 644 include/mupdf/pdf/*.h $(DESTDIR)$(incdir)/mupdf/pdf + + install -d $(DESTDIR)$(libdir) +- install -m 644 $(INSTALL_LIBS) $(DESTDIR)$(libdir) ++ install -m 755 $(INSTALL_LIBS) $(DESTDIR)$(libdir) + + install -d $(DESTDIR)$(bindir) + install -m 755 $(TOOL_APPS) $(VIEW_APPS) $(DESTDIR)$(bindir) diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 9cb460972f..1899501122 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -526,6 +526,12 @@ using the DjVuLibre library.") "-Dlink-external=true") #:phases (modify-phases %standard-phases + (add-after 'unpack 'remove-libmupdfthird.a-requirement + (lambda _ + ;; Ignore a missing (apparently superfluous) static library. + (substitute* "meson.build" + ((".*mupdfthird.*") "")) + #t)) (add-before 'configure 'add-mujs-to-dependencies (lambda _ ;; Add mujs to the 'build_dependencies'. @@ -692,6 +698,7 @@ extracting content or merging files.") "mupdf-" version "-source.tar.xz")) (sha256 (base32 "16m5sksil22sshxy70xkslsb2qhvcqb1d95i9savnhds1xn4ybar")) + (patches (search-patches "mupdf-fix-linkage.patch")) (modules '((guix build utils))) (snippet '(begin @@ -730,6 +737,10 @@ extracting content or merging files.") "XCFLAGS=-fpic" "USE_SYSTEM_LIBS=yes" "USE_SYSTEM_MUJS=yes" + "shared=yes" + ;; Even with the linkage patch we must fix RUNPATH. + (string-append "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib") (string-append "prefix=" (assoc-ref %outputs "out"))) #:phases (modify-phases %standard-phases (delete 'configure)))) ; no configure script -- cgit v1.2.3 From e9f5dfc00497e3b5340166d029075d9bb29b2ad6 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 25 Nov 2020 13:18:15 -0500 Subject: gnu: Mutt: Update to 2.0.2 [fixes CVE-2020-28896]. * gnu/packages/mail.scm (mutt): Update to 2.0.2. * gnu/packages/patches/mutt-store-references.patch: Adjust to changes in Mutt 2.0.2. --- gnu/packages/mail.scm | 4 ++-- gnu/packages/patches/mutt-store-references.patch | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index aa26a75c48..84b1f1c6d3 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -444,7 +444,7 @@ aliasing facilities to work just as they would on normal mail.") (define-public mutt (package (name "mutt") - (version "1.14.7") + (version "2.0.2") (source (origin (method url-fetch) (uri (list @@ -454,7 +454,7 @@ aliasing facilities to work just as they would on normal mail.") version ".tar.gz"))) (sha256 (base32 - "0r58xnjgkw0kmnnzhb32mk5gkkani5kbi5krybpbag156fqhgxg4")) + "1j0i2jmlk5sc78af9flj3ynj0iiwa8biw7jgf12qm5lppsx1h4j7")) (patches (search-patches "mutt-store-references.patch")))) (build-system gnu-build-system) (inputs diff --git a/gnu/packages/patches/mutt-store-references.patch b/gnu/packages/patches/mutt-store-references.patch index 3b69c7b0bd..77d1680d60 100644 --- a/gnu/packages/patches/mutt-store-references.patch +++ b/gnu/packages/patches/mutt-store-references.patch @@ -2,15 +2,16 @@ By default 'mutt' embeds configure flags and the output of 'gcc -v', which contains the store file name of Bash and GCC. This patch makes sure we don't embed a reference to these in 'mutt'. ---- mutt-1.5.23/txt2c.sh 2015-06-26 22:56:56.500731643 +0200 -+++ mutt-1.5.23/txt2c.sh 2015-06-26 22:57:26.664583900 +0200 +diff --git a/txt2c.sh b/txt2c.sh +index f634bb9..53845cf 100755 +--- a/txt2c.sh ++++ b/txt2c.sh @@ -21,6 +21,8 @@ txt2c_fallback () { echo ";" } +echo "unsigned char $1[] = \"value of '$1' not kept\";" +exit 0 - ./txt2c test /dev/null 2>&1 && - ./txt2c "$1" || - txt2c_fallback "$1" - + if ./txt2c test /dev/null 2>&1; then + ./txt2c "$1" + else -- cgit v1.2.3 From 81fbe03b509414aa1ede960141a7ffd241d5f9ee Mon Sep 17 00:00:00 2001 From: Jesse Gibbons Date: Wed, 25 Nov 2020 19:12:08 -0700 Subject: gnu: openssh: Fix ssh-copy-id. * gnu/packages/patches/openssh-fix-ssh-copy-id.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/ssh.scm (openssh)[source]: Use it. Signed-off-by: Leo Famulari --- gnu/local.mk | 1 + gnu/packages/patches/openssh-fix-ssh-copy-id.patch | 38 ++++++++++++++++++++++ gnu/packages/ssh.scm | 3 +- 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/openssh-fix-ssh-copy-id.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 5277403196..e188f8f94f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1412,6 +1412,7 @@ dist_patch_DATA = \ %D%/packages/patches/openfoam-4.1-cleanup.patch \ %D%/packages/patches/openjdk-10-idlj-reproducibility.patch \ %D%/packages/patches/openmpi-mtl-priorities.patch \ + %D%/packages/patches/openssh-fix-ssh-copy-id.patch \ %D%/packages/patches/openssh-hurd.patch \ %D%/packages/patches/openresolv-restartcmd-guix.patch \ %D%/packages/patches/openscad-parser-boost-1.72.patch \ diff --git a/gnu/packages/patches/openssh-fix-ssh-copy-id.patch b/gnu/packages/patches/openssh-fix-ssh-copy-id.patch new file mode 100644 index 0000000000..6adba639a3 --- /dev/null +++ b/gnu/packages/patches/openssh-fix-ssh-copy-id.patch @@ -0,0 +1,38 @@ +Fix a bug where ssh-copy-id would fail with "EOF: command not found": + +https://github.com/openssh/openssh-portable/pull/206 + +Patch copied from upstream source repository: + +https://github.com/openssh/openssh-portable/commit/d9e727dcc04a52caaac87543ea1d230e9e6b5604 + +From d9e727dcc04a52caaac87543ea1d230e9e6b5604 Mon Sep 17 00:00:00 2001 +From: Oleg +Date: Thu, 1 Oct 2020 12:09:08 +0300 +Subject: [PATCH] Fix `EOF: command not found` error in ssh-copy-id + +--- + contrib/ssh-copy-id | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id +index 392f64f94..a76907717 100644 +--- a/contrib/ssh-copy-id ++++ b/contrib/ssh-copy-id +@@ -247,7 +247,7 @@ installkeys_sh() { + # the -z `tail ...` checks for a trailing newline. The echo adds one if was missing + # the cat adds the keys we're getting via STDIN + # and if available restorecon is used to restore the SELinux context +- INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF) ++ INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF + cd; + umask 077; + mkdir -p $(dirname "${AUTH_KEY_FILE}") && +@@ -258,6 +258,7 @@ installkeys_sh() { + restorecon -F .ssh ${AUTH_KEY_FILE}; + fi + EOF ++ ) + + # to defend against quirky remote shells: use 'exec sh -c' to get POSIX; + printf "exec sh -c '%s'" "${INSTALLKEYS_SH}" diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm index e5bcac33f2..7b363e6d2d 100644 --- a/gnu/packages/ssh.scm +++ b/gnu/packages/ssh.scm @@ -189,7 +189,8 @@ a server that supports the SSH-2 protocol.") (method url-fetch) (uri (string-append "mirror://openbsd/OpenSSH/portable/" "openssh-" version ".tar.gz")) - (patches (search-patches "openssh-hurd.patch")) + (patches (search-patches "openssh-hurd.patch" + "openssh-fix-ssh-copy-id.patch")) (sha256 (base32 "091b3pxdlj47scxx6kkf4agkx8c8sdacdxx8m1dw1cby80pd40as")))) -- cgit v1.2.3 From 00a85828b06744a8b53a55f52a651ff88e071044 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 26 Nov 2020 18:59:27 +0100 Subject: gnu: python-aiohttp: Update to 3.7.3. * gnu/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/python-web.scm (python-aiohttp)[source](patches): Remove. [arguments]: Use UTIME instead of calling out to 'touch'. Don't delete now-working tests; but disable some new ones. Replace the 'check' phase. [propagated-inputs]: Add PYTHON-TYPING-EXTENSIONS. [native-inputs]: Remove PYTHON-PYTEST-RUNNER, PYTHON-PYTEST-XDIST, PYTHON-PYTEST-TIMEOUT, and PYTHON-PYTEST-FORKED. Add PYTHON-PYTEST and PYTHON-RE-ASSERT. --- gnu/local.mk | 1 - .../python-aiohttp-3.6.2-no-warning-fail.patch | 34 --------------- gnu/packages/python-web.scm | 49 ++++++++++++---------- 3 files changed, 28 insertions(+), 56 deletions(-) delete mode 100644 gnu/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index e188f8f94f..289f510c11 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1511,7 +1511,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-3-fix-tests.patch \ %D%/packages/patches/python-3.8-fix-tests.patch \ %D%/packages/patches/python-CVE-2018-14647.patch \ - %D%/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch \ %D%/packages/patches/python-aionotify-0.2.0-py3.8.patch \ %D%/packages/patches/python-argcomplete-1.11.1-fish31.patch \ %D%/packages/patches/python-axolotl-AES-fix.patch \ diff --git a/gnu/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch b/gnu/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch deleted file mode 100644 index 6cdddefd50..0000000000 --- a/gnu/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch +++ /dev/null @@ -1,34 +0,0 @@ -Do not fail test on runtime warning like: RuntimeWarning: coroutine 'noop2' was -never awaited. This could be related to -https://github.com/aio-libs/aiohttp/commit/60f01cca36b9f9d8d35dd351384eaae2f8fd0d4b, -which does not fix this issue though. - ---- a/aiohttp/pytest_plugin.py 2019-10-09 18:52:31.000000000 +0200 -+++ b/aiohttp/pytest_plugin.py 2020-03-05 08:35:48.230396025 +0100 -@@ -120,15 +120,6 @@ - """ - with warnings.catch_warnings(record=True) as _warnings: - yield -- rw = ['{w.filename}:{w.lineno}:{w.message}'.format(w=w) -- for w in _warnings # type: ignore -- if w.category == RuntimeWarning] -- if rw: -- raise RuntimeError('{} Runtime Warning{},\n{}'.format( -- len(rw), -- '' if len(rw) == 1 else 's', -- '\n'.join(rw) -- )) - - - @contextlib.contextmanager ---- a/tests/test_pytest_plugin.py 2020-03-05 09:26:58.502284893 +0100 -+++ a/tests/test_pytest_plugin.py 2020-03-05 09:27:06.074284619 +0100 -@@ -170,7 +170,7 @@ - expected_outcomes = ( - {'failed': 0, 'passed': 2} - if IS_PYPY and bool(os.environ.get('PYTHONASYNCIODEBUG')) -- else {'failed': 1, 'passed': 1} -+ else {'failed': 0, 'passed': 2} - ) - """Under PyPy "coroutine 'foobar' was never awaited" does not happen.""" - result.assert_outcomes(**expected_outcomes) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 172c36d6f9..f5ffc2e0f0 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -92,14 +92,13 @@ (define-public python-aiohttp (package (name "python-aiohttp") - (version "3.6.3") + (version "3.7.3") (source (origin (method url-fetch) (uri (pypi-uri "aiohttp" version)) (sha256 - (base32 "0i9n7h8n06m2d8ryqyk4fv1si1m44ibq7blbfaxq46vx7jydg339")) - (patches (search-patches "python-aiohttp-3.6.2-no-warning-fail.patch")))) + (base32 "1i3p4yrfgrf1zpbgnywqmb33ps4k51wylcxykhf2cwky0spq26lw")))) (build-system python-build-system) (arguments '(#:phases @@ -112,33 +111,41 @@ " @pytest.mark.xfail\n async def test_feed_eof_no_err_brotli")) ;; make sure the timestamp of this file is > 1990, because a few ;; tests like test_static_file_if_modified_since_past_date depend on it - (invoke "touch" "-d" "2020-01-01" "tests/data.unknown_mime_type") - - ;; FIXME: These tests are failing due to deprecation warnings - ;; in Python 3.8. Remove this when updating to aiohttp >= 3.7. - ;; https://github.com/aio-libs/aiohttp/issues/4477 - ;; https://github.com/aio-libs/aiohttp/issues/4525 - (with-directory-excursion "tests" - (for-each delete-file '("test_client_session.py" - "test_multipart.py" - "test_web_middleware.py" - "test_web_protocol.py" - "test_web_urldispatcher.py"))) - #t))))) + (let ((late-90s (* 60 60 24 365 30))) + (utime "tests/data.unknown_mime_type" late-90s late-90s)) + + ;; Disable test that attempts to access httpbin.org. + (substitute* "tests/test_formdata.py" + (("async def test_mark_formdata_as_processed.*" all) + (string-append "@pytest.mark.xfail\n" all))) + + ;; Don't test the aiohttp pytest plugin to avoid a dependency loop. + (delete-file "tests/test_pytest_plugin.py") + #t)) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (setenv "PYTHONPATH" + (string-append ".:" (getenv "PYTHONPATH"))) + (if tests? + (invoke "pytest" "-vv" + ;; Disable loading the aiohttp coverage plugin + ;; to avoid a circular dependency (code coverage + ;; is not very interesting to us anyway). + "-o" "addopts=''") + (format #t "test suite not run~%"))))))) (propagated-inputs `(("python-aiodns" ,python-aiodns) ("python-async-timeout" ,python-async-timeout) - ("python-attrs" ,python-attrs) + ("python-attrs" ,python-attrs) ;note: remove for > 3.7 ("python-chardet" ,python-chardet) ("python-idna-ssl" ,python-idna-ssl) ("python-multidict" ,python-multidict) + ("python-typing-extensions" ,python-typing-extensions) ("python-yarl" ,python-yarl))) (native-inputs - `(("python-pytest-runner" ,python-pytest-runner) - ("python-pytest-xdit" ,python-pytest-xdist) - ("python-pytest-timeout" ,python-pytest-timeout) - ("python-pytest-forked" ,python-pytest-forked) + `(("python-pytest" ,python-pytest) ("python-pytest-mock" ,python-pytest-mock) + ("python-re-assert" ,python-re-assert) ("gunicorn" ,gunicorn-bootstrap) ("python-freezegun" ,python-freezegun) ("python-async-generator" ,python-async-generator))) -- cgit v1.2.3 From 1d63445168d0102adf08637ed3be4609a044c9e6 Mon Sep 17 00:00:00 2001 From: Simon South Date: Fri, 27 Nov 2020 16:35:46 -0500 Subject: gnu: Transmission: Fix localization of transmission-gtk. * gnu/packages/bittorrent.scm (transmission)[source]: Add patch to make Transmission honor the "localedir" option to its configure script. [arguments]: Use "localedir" to set the "gui" output as the location for (GTK-specific) localization data. : Update "move-gui" to remove a now-superfluous call to "mkdir" and omit "share/locale" from the list of directories needing to be moved between outputs. * gnu/packages/patches/transmission-honor-localedir.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Leo Famulari --- gnu/local.mk | 1 + gnu/packages/bittorrent.scm | 12 +++++--- .../patches/transmission-honor-localedir.patch | 34 ++++++++++++++++++++++ 3 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/transmission-honor-localedir.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 289f510c11..fe94bcfc2e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1656,6 +1656,7 @@ dist_patch_DATA = \ %D%/packages/patches/tipp10-remove-license-code.patch \ %D%/packages/patches/tk-find-library.patch \ %D%/packages/patches/transcode-ffmpeg.patch \ + %D%/packages/patches/transmission-honor-localedir.patch \ %D%/packages/patches/ttf2eot-cstddef.patch \ %D%/packages/patches/tup-unbundle-dependencies.patch \ %D%/packages/patches/tuxpaint-stamps-path.patch \ diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm index ab44caa06a..08e61d7ba2 100644 --- a/gnu/packages/bittorrent.scm +++ b/gnu/packages/bittorrent.scm @@ -75,12 +75,17 @@ version ".tar.xz")) (sha256 (base32 - "1wjmn96zrvmk8j1yz2ysmqd7a2x6ilvnwwapcvfzgxs2wwpnai4i")))) + "1wjmn96zrvmk8j1yz2ysmqd7a2x6ilvnwwapcvfzgxs2wwpnai4i")) + (patches (search-patches "transmission-honor-localedir.patch")))) (build-system glib-or-gtk-build-system) (outputs '("out" ; library and command-line interface "gui")) ; graphical user interface (arguments - '(#:glib-or-gtk-wrap-excluded-outputs '("out") + '(#:configure-flags + (list (string-append "--localedir=" + (assoc-ref %outputs "gui") + "/share/locale")) + #:glib-or-gtk-wrap-excluded-outputs '("out") #:phases (modify-phases %standard-phases (add-after 'install 'move-gui @@ -93,12 +98,11 @@ (rename-file (string-append out "/bin/transmission-gtk") (string-append gui "/bin/transmission-gtk")) - (mkdir (string-append gui "/share")) (for-each (lambda (dir) (rename-file (string-append out "/share/" dir) (string-append gui "/share/" dir))) - '("appdata" "applications" "icons" "locale" "pixmaps")) + '("appdata" "applications" "icons" "pixmaps")) (mkdir-p (string-append gui "/share/man/man1")) (rename-file diff --git a/gnu/packages/patches/transmission-honor-localedir.patch b/gnu/packages/patches/transmission-honor-localedir.patch new file mode 100644 index 0000000000..70c66bfb2b --- /dev/null +++ b/gnu/packages/patches/transmission-honor-localedir.patch @@ -0,0 +1,34 @@ +This patch modifies Transmission so it honors the "localedir" option +passed to its configure script, allowing GTK-specific localization +data to be placed in the package's "gui" output. + +Without this patch, localization of transmission-gtk can break as the +application will expect to find this data in the package's default +output (as a result of the call to bindtextdomain in gtk/main.c). + +diff --git a/configure b/configure +index a29e24f..3ae8ef4 100755 +--- a/configure ++++ b/configure +@@ -21305,7 +21305,7 @@ $as_echo "$LINGUAS" >&6; } + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES + +- transmissionlocaledir='${prefix}/${DATADIRNAME}/locale' ++ transmissionlocaledir='${localedir}' + + fi + +diff --git a/configure.ac b/configure.ac +index 57d3cae..ab62093 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -563,7 +563,7 @@ if test "x$enable_nls" = "xyes" ; then + AC_SUBST(GETTEXT_PACKAGE) + AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package]) + AM_GLIB_GNU_GETTEXT +- transmissionlocaledir='${prefix}/${DATADIRNAME}/locale' ++ transmissionlocaledir='${localedir}' + AC_SUBST(transmissionlocaledir) + fi + AC_SUBST(INTLLIBS) -- cgit v1.2.3 From c76d0201f7cc639f51dbf259779d86dad62417cd Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Wed, 25 Nov 2020 14:18:56 -0300 Subject: gnu: Add gnash. * gnu/packages/animation.scm (gnash): New variable. * gnu/packages/patches/gnash-fix-giflib-version: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Christopher Baines --- gnu/local.mk | 2 + gnu/packages/animation.scm | 97 +++++++++++++++++++++- .../patches/gnash-fix-giflib-version.patch | 17 ++++ 3 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/gnash-fix-giflib-version.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index fe94bcfc2e..773234980d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -38,6 +38,7 @@ # Copyright © 2020 Tanguy Le Carrour # Copyright © 2020 Martin Becze # Copyright © 2020 Malte Frank Gerdes +# Copyright © 2020 Vinicius Monego # # This file is part of GNU Guix. # @@ -1090,6 +1091,7 @@ dist_patch_DATA = \ %D%/packages/patches/glibc-supported-locales.patch \ %D%/packages/patches/gmp-arm-asm-nothumb.patch \ %D%/packages/patches/gmp-faulty-test.patch \ + %D%/packages/patches/gnash-fix-giflib-version.patch \ %D%/packages/patches/gnome-shell-theme.patch \ %D%/packages/patches/gnome-shell-disable-test.patch \ %D%/packages/patches/gnome-settings-daemon-gc.patch \ diff --git a/gnu/packages/animation.scm b/gnu/packages/animation.scm index 3176a1237a..6bfe8f0a12 100644 --- a/gnu/packages/animation.scm +++ b/gnu/packages/animation.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2015, 2017 Ricardo Wurmus ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2019 Pkill -9 +;;; Copyright © 2020 Vinicius Monego ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,19 +28,30 @@ #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages algebra) + #:use-module (gnu packages autotools) #:use-module (gnu packages boost) #:use-module (gnu packages compression) + #:use-module (gnu packages curl) + #:use-module (gnu packages dejagnu) #:use-module (gnu packages fontutils) + #:use-module (gnu packages gettext) + #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages graphics) #:use-module (gnu packages gtk) #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) + #:use-module (gnu packages jemalloc) + #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pulseaudio) + #:use-module (gnu packages python) #:use-module (gnu packages qt) - #:use-module (gnu packages video)) + #:use-module (gnu packages sdl) + #:use-module (gnu packages tls) + #:use-module (gnu packages video) + #:use-module (gnu packages xiph)) ;; ETL, synfig, and Synfig Studio are updated in tandem. (define synfig-version "1.2.2") @@ -192,6 +204,89 @@ need for tweening, preventing the need to hand-draw each frame. This package contains the graphical user interface for synfig.") (license license:gpl3+))) +;; This package provides a standalone (no browser plugin) version of Gnash. +(define-public gnash + ;; The last tagged release of Gnash was in 2013. + (let ((commit "583ccbc1275c7701dc4843ec12142ff86bb305b4") + (revision "0")) + (package + (name "gnash") + (version (git-version "0.8.11" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/gnash.git/") + (commit commit))) + (file-name (git-file-name name version)) + (patches (search-patches "gnash-fix-giflib-version.patch")) + (sha256 + (base32 "0fh0bljn0i6ypyh6l99afi855p7ki7lm869nq1qj6k8hrrwhmfry")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list "--disable-static" + ;; Plugins are based on XULRunner and NPAPI only. Disable. + "--disable-plugins" + "--enable-gui=gtk" + "--enable-media=ffmpeg" + (string-append "--with-boost-incl=" + (assoc-ref %build-inputs "boost") "/include") + (string-append "--with-boost-lib=" + (assoc-ref %build-inputs "boost") "/lib") + (string-append "--with-ffmpeg-incl=" + (assoc-ref %build-inputs "ffmpeg") + "/include/libavcodec") + (string-append "--with-speex-incl=" + (assoc-ref %build-inputs "speex") "/include") + (string-append "--with-jemalloc-incl=" + (assoc-ref %build-inputs "jemalloc") + "/include/jemalloc") + (string-append "--with-speex-lib=" + (assoc-ref %build-inputs "speex") "/lib") + (string-append "--with-jpeg-incl=" + (assoc-ref %build-inputs "libjpeg") "/include") + (string-append "--with-zlib-incl=" + (assoc-ref %build-inputs "zlib") "/include") + (string-append "--with-png-incl=" + (assoc-ref %build-inputs "libpng") + "/include")))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("dejagnu" ,dejagnu) ;for tests + ("gettext" ,gettext-minimal) + ("libtool" ,libtool) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python" ,python-wrapper))) + (inputs + `(("agg" ,agg) + ("atk" ,atk) + ("boost" ,boost) + ("curl" ,curl) + ("ffmpeg" ,ffmpeg-2.8) + ("freeglut" ,freeglut) + ("gconf" ,gconf) + ("giflib" ,giflib) + ("glib" ,glib) + ("gtk+" ,gtk+-2) + ("gtkglext" ,gtkglext) + ("jemalloc" ,jemalloc) + ("libjpeg" ,libjpeg-turbo) + ("libltdl" ,libltdl) + ("libpng" ,libpng) + ("pangox-compat" ,pangox-compat) + ("sdl" ,sdl) + ("speex" ,speex))) + (synopsis "Flash movie player") + (description + "Gnash is a Flash movie player. It supports SWF version v7 and some +of v8 and v9. It is possible to configure Gnash to use several different +audio or video backends, ensuring good performance.") + (home-page "https://www.gnu.org/software/gnash/") + (license license:gpl3+)))) + (define-public papagayo (let ((commit "e143684b30e59fe4a554f965cb655d23cbe93ee7") (revision "1")) diff --git a/gnu/packages/patches/gnash-fix-giflib-version.patch b/gnu/packages/patches/gnash-fix-giflib-version.patch new file mode 100644 index 0000000000..44816d2a14 --- /dev/null +++ b/gnu/packages/patches/gnash-fix-giflib-version.patch @@ -0,0 +1,17 @@ +Description: Change GIFLIB_MINOR to allow matching with v5.2+ +Source: https://savannah.gnu.org/patch/index.php?9873 +Author: marius851000 + +diff --git a/libbase/GnashImageGif.cpp b/libbase/GnashImageGif.cpp +index 2ae5ddb..b87b1e7 100644 +--- a/libbase/GnashImageGif.cpp ++++ b/libbase/GnashImageGif.cpp +@@ -120,7 +120,7 @@ GifInput::GifInput(std::shared_ptr in) + GifInput::~GifInput() + { + // Clean up allocated data. +-#if GIFLIB_MAJOR==5 && GIFLIB_MINOR==1 ++#if GIFLIB_MAJOR==5 && GIFLIB_MINOR!=0 + DGifCloseFile(_gif, 0); + #else + DGifCloseFile(_gif); -- cgit v1.2.3