From fe507d7a3d83169c77b6f73a66ffa0ce59f1119d Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sun, 11 Aug 2019 22:37:12 -0400 Subject: bootstrap: Build bootstrap bash deterministically. * gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/make-bootstrap.scm (static-bash-for-bootstrap): New variable. (%static-inputs): Use 'static-bash-for-bootstrap' instead of 'static-bash'. --- .../patches/bash-4.4-linux-pgrp-pipe.patch | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch b/gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch new file mode 100644 index 0000000000..0d03d7ce37 --- /dev/null +++ b/gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch @@ -0,0 +1,30 @@ +Unconditionally enable PGRP_PIPE on Linux (the kernel), regardless of +the kernel version in use on the build machine. + +--- configure.ac.orig 1969-12-31 19:00:00.000000000 -0500 ++++ configure.ac 2019-08-11 22:28:26.038841961 -0400 +@@ -1092,9 +1092,7 @@ + solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 2.[[456789]]*|[[34]]*) AC_DEFINE(PGRP_PIPE) ;; +- esac ;; ++ AC_DEFINE(PGRP_PIPE) ;; + *qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;; + *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; + powerux*) LOCAL_LIBS="-lgen" ;; +--- configure.orig 1969-12-31 19:00:00.000000000 -0500 ++++ configure 2019-08-11 22:28:10.166763255 -0400 +@@ -16064,10 +16064,7 @@ + solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 2.[456789]*|[34]*) $as_echo "#define PGRP_PIPE 1" >>confdefs.h +- ;; +- esac ;; ++ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;; + *qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;; + *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; + powerux*) LOCAL_LIBS="-lgen" ;; -- cgit v1.2.3 From 2cb81e1ebedc49a5af549d1bcd520add38d9062d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 24 Aug 2019 22:13:36 +0200 Subject: gnu: libextractor: Adapt to exiv2 0.27. This fixes a compilation error. * gnu/packages/patches/libextractor-exiv2.patch: New file. * gnu/packages/gnunet.scm (libextractor)[sources]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/gnunet.scm | 3 +- gnu/packages/patches/libextractor-exiv2.patch | 124 ++++++++++++++++++++++++++ 3 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/libextractor-exiv2.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index aab29beb0a..8b1b5ce6b4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1016,6 +1016,7 @@ dist_patch_DATA = \ %D%/packages/patches/libexif-CVE-2016-6328.patch \ %D%/packages/patches/libexif-CVE-2017-7544.patch \ %D%/packages/patches/libexif-CVE-2018-20030.patch \ + %D%/packages/patches/libextractor-exiv2.patch \ %D%/packages/patches/libgcrypt-make-yat2m-reproducible.patch \ %D%/packages/patches/libgit2-avoid-python.patch \ %D%/packages/patches/libgit2-mtime-0.patch \ diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm index 2653645c5d..2d82f47d99 100644 --- a/gnu/packages/gnunet.scm +++ b/gnu/packages/gnunet.scm @@ -75,7 +75,8 @@ version ".tar.gz")) (sha256 (base32 - "1zz2zvikvfibxnk1va3kgzs7djsmiqy7bmk8y01vbsf54ryjb3zh")))) + "1zz2zvikvfibxnk1va3kgzs7djsmiqy7bmk8y01vbsf54ryjb3zh")) + (patches (search-patches "libextractor-exiv2.patch")))) (build-system gnu-build-system) ;; WARNING: Checks require /dev/shm to be in the build chroot, especially ;; not to be a symbolic link to /run/shm. diff --git a/gnu/packages/patches/libextractor-exiv2.patch b/gnu/packages/patches/libextractor-exiv2.patch new file mode 100644 index 0000000000..b92fef3ca1 --- /dev/null +++ b/gnu/packages/patches/libextractor-exiv2.patch @@ -0,0 +1,124 @@ +This patch allows us to build libextractor against exiv2 0.27.x. +Adapted from this upstream commit: + + commit 1ecee9a47717e36cb8a3925d011d1a6de11d631c + Author: Christian Grothoff + Date: Mon Jul 29 17:58:18 2019 +0200 + + importing patch from Gentoo/AS to address exiv2 build issue (#5820) + +diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc +index 8741d40..ef402a8 100644 +--- a/src/plugins/exiv2_extractor.cc ++++ b/src/plugins/exiv2_extractor.cc +@@ -27,10 +27,7 @@ + #include + #include + #include +-#include +-#include +-#include +-#include ++#include + + /** + * Enable debugging to get error messages. +@@ -180,7 +177,7 @@ public: + * + * @return -1 on error + */ +-#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0) ++#if EXIV2_TEST_VERSION(0,26,0) + virtual size_t size (void) const; + #else + virtual long int size (void) const; +@@ -316,7 +313,11 @@ ExtractorIO::getb () + const unsigned char *r; + + if (1 != ec->read (ec->cls, &data, 1)) ++#if EXIV2_TEST_VERSION(0,27,0) ++ throw Exiv2::BasicError (Exiv2::kerDecodeLangAltQualifierFailed); ++#else + throw Exiv2::BasicError (42 /* error code */); ++#endif + r = (const unsigned char *) data; + return *r; + } +@@ -371,7 +372,11 @@ ExtractorIO::putb (Exiv2::byte data) + void + ExtractorIO::transfer (Exiv2::BasicIo& src) + { ++#if EXIV2_TEST_VERSION(0,27,0) ++ throw Exiv2::BasicError (Exiv2::kerDecodeLangAltQualifierFailed); ++#else + throw Exiv2::BasicError (42 /* error code */); ++#endif + } + + +@@ -416,7 +421,11 @@ ExtractorIO::seek (long offset, + Exiv2::byte * + ExtractorIO::mmap (bool isWritable) + { ++#if EXIV2_TEST_VERSION(0,27,0) ++ throw Exiv2::BasicError (Exiv2::kerDecodeLangAltQualifierFailed); ++#else + throw Exiv2::BasicError (42 /* error code */); ++#endif + } + + +@@ -449,7 +458,7 @@ ExtractorIO::tell (void) const + * + * @return -1 on error + */ +-#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0) ++#if EXIV2_TEST_VERSION(0,26,0) + size_t + #else + long int +@@ -504,7 +513,11 @@ ExtractorIO::eof () const + std::string + ExtractorIO::path () const + { ++#if EXIV2_TEST_VERSION(0,27,0) ++ throw Exiv2::BasicError (Exiv2::kerDecodeLangAltQualifierFailed); ++#else + throw Exiv2::BasicError (42 /* error code */); ++#endif + } + + +@@ -517,7 +530,11 @@ ExtractorIO::path () const + std::wstring + ExtractorIO::wpath () const + { ++#if EXIV2_TEST_VERSION(0,27,0) ++ throw Exiv2::BasicError (Exiv2::kerDecodeLangAltQualifierFailed); ++#else + throw Exiv2::BasicError (42 /* error code */); ++#endif + } + #endif + +@@ -531,7 +548,11 @@ Exiv2::BasicIo::AutoPtr + ExtractorIO::temporary () const + { + fprintf (stderr, "throwing temporary error\n"); ++#if EXIV2_TEST_VERSION(0,27,0) ++ throw Exiv2::BasicError (Exiv2::kerDecodeLangAltQualifierFailed); ++#else + throw Exiv2::BasicError (42 /* error code */); ++#endif + } + + +@@ -697,7 +718,7 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec) + { + try + { +-#if EXIV2_MAKE_VERSION(0,23,0) <= EXIV2_VERSION ++#if !EXIV2_TEST_VERSION(0,24,0) + Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute); + #endif + std::auto_ptr eio(new ExtractorIO (ec)); -- cgit v1.2.3 From dd2031169a334050c740c6772bdc32d984a9fede Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 28 Aug 2019 11:14:30 +0300 Subject: gnu: enlightenment: Update to 0.23.0. * gnu/packages/enlightenment.scm (enlightenment): Update to 0.23.0. [build-system]: Switch to meson-build-system. [arguments]: Add configure-flag to build without systemd. Remove 'bootstrap phase. Update substitutions in custom 'set-system-actions phase. [inputs]: Add bluez, pulseaudio. * gnu/packages/patches/enlightenment-fix-setuid-path.patch: Update. * gnu/services/desktop.scm (enlightenment-setuid-programs): Update location of 'freqset binary. Add 'cpuclock_sys to setuid binaries. --- gnu/packages/enlightenment.scm | 21 ++++-- .../patches/enlightenment-fix-setuid-path.patch | 74 ++++++++++++++++++---- gnu/services/desktop.scm | 40 +++++++----- 3 files changed, 100 insertions(+), 35 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm index 6352801059..5e62f5e3da 100644 --- a/gnu/packages/enlightenment.scm +++ b/gnu/packages/enlightenment.scm @@ -273,7 +273,7 @@ Libraries with some extra bells and whistles.") (define-public enlightenment (package (name "enlightenment") - (version "0.22.4") + (version "0.23.0") (source (origin (method url-fetch) (uri @@ -281,12 +281,14 @@ Libraries with some extra bells and whistles.") "enlightenment/enlightenment-" version ".tar.xz")) (sha256 (base32 - "0ygy891rrw5c7lhk539nhif77j88phvz2h0fhx172iaridy9kx2r")) + "1y7x594gvyvl5zbb1rnf3clj2pm6j97n8wl5mp9x6xjmhx0d1idq")) (patches (search-patches "enlightenment-fix-setuid-path.patch")))) - (build-system gnu-build-system) + (build-system meson-build-system) (arguments - `(#:phases + `(#:configure-flags '("-Dsystemd=false") + #:phases (modify-phases %standard-phases + (delete 'bootstrap) ; We don't want to run the autogen script. (add-before 'configure 'set-system-actions (lambda* (#:key inputs #:allow-other-keys) (setenv "HOME" "/tmp") @@ -294,6 +296,7 @@ Libraries with some extra bells and whistles.") (setxkbmap (assoc-ref inputs "setxkbmap")) (utils (assoc-ref inputs "util-linux")) (libc (assoc-ref inputs "libc")) + (bluez (assoc-ref inputs "bluez")) (efl (assoc-ref inputs "efl"))) ;; We need to patch the path to 'base.lst' to be able ;; to switch the keyboard layout in E. @@ -314,12 +317,14 @@ Libraries with some extra bells and whistles.") (string-append efl "/bin/edje_cc -v %s %s %s\""))) (substitute* "src/modules/everything/evry_plug_apps.c" (("/usr/bin/") "")) - (substitute* "configure" + (substitute* "data/etc/meson.build" (("/bin/mount") (string-append utils "/bin/mount")) (("/bin/umount") (string-append utils "/bin/umount")) (("/usr/bin/eject") (string-append utils "/bin/eject")) - (("/etc/acpi/sleep.sh force") "/run/current-system/profile/bin/loginctl suspend") - (("/etc/acpi/hibernate.sh force") "/run/current-system/profile/bin/loginctl hibernate") + (("/usr/bin/l2ping") (string-append bluez "/bin/l2ling")) + (("/bin/rfkill") (string-append utils "/sbin/rfkill")) + (("SUSPEND = ''") "SUSPEND = '/run/current-system/profile/bin/loginctl suspend'") + (("HIBERNATE = ''") "HIBERNATE = '/run/current-system/profile/bin/loginctl hibernate'") (("/sbin/shutdown -h now") "/run/current-system/profile/bin/loginctl poweroff now") (("/sbin/shutdown -r now") "/run/current-system/profile/bin/loginctl reboot now")) #t)))))) @@ -329,12 +334,14 @@ Libraries with some extra bells and whistles.") ("util-linux" ,util-linux))) (inputs `(("alsa-lib" ,alsa-lib) + ("bluez" ,bluez) ("dbus" ,dbus) ("efl" ,efl) ("freetype" ,freetype) ("libxcb" ,libxcb) ("libxext" ,libxext) ("linux-pam" ,linux-pam) + ("puleseaudio" ,pulseaudio) ("setxkbmap" ,setxkbmap) ("xcb-util-keysyms" ,xcb-util-keysyms) ("xkeyboard-config" ,xkeyboard-config))) diff --git a/gnu/packages/patches/enlightenment-fix-setuid-path.patch b/gnu/packages/patches/enlightenment-fix-setuid-path.patch index 90e16d3e67..c48f18c8ec 100644 --- a/gnu/packages/patches/enlightenment-fix-setuid-path.patch +++ b/gnu/packages/patches/enlightenment-fix-setuid-path.patch @@ -28,7 +28,7 @@ index 2bced6766..208e583ba 100644 } #endif // HAVE_EEZE || __FreeBSD_kernel__ diff --git a/src/bin/e_fm/e_fm_main_eeze.c b/src/bin/e_fm/e_fm_main_eeze.c -index b7d9e3eba..d8a9eb82c 100644 +index 0fcffa249..c1921121d 100644 --- a/src/bin/e_fm/e_fm_main_eeze.c +++ b/src/bin/e_fm/e_fm_main_eeze.c @@ -318,7 +318,7 @@ _e_fm_main_eeze_volume_eject(E_Volume *v) @@ -59,10 +59,10 @@ index b7d9e3eba..d8a9eb82c 100644 } v->guard = ecore_timer_loop_add(E_FM_MOUNT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_mount_timeout, v); diff --git a/src/bin/e_sys.c b/src/bin/e_sys.c -index 6781a9b5a..8cd140f1b 100644 +index 671fbcd9a..90ee04cf1 100644 --- a/src/bin/e_sys.c +++ b/src/bin/e_sys.c -@@ -653,20 +653,16 @@ _e_sys_cb_timer(void *data EINA_UNUSED) +@@ -702,20 +702,16 @@ _e_sys_cb_timer(void *data EINA_UNUSED) e_init_status_set(_("Checking System Permissions")); snprintf(buf, sizeof(buf), @@ -87,9 +87,9 @@ index 6781a9b5a..8cd140f1b 100644 _e_sys_hibernate_check_exe = ecore_exe_run(buf, NULL); return ECORE_CALLBACK_CANCEL; } -@@ -1079,8 +1075,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw) - /* shutdown -h now */ +@@ -1134,8 +1130,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw) if (e_util_immortal_check()) return 0; + e_fm2_die(); snprintf(buf, sizeof(buf), - "%s/enlightenment/utils/enlightenment_sys halt", - e_prefix_lib_get()); @@ -97,9 +97,9 @@ index 6781a9b5a..8cd140f1b 100644 if (_e_sys_exe) { if ((ecore_time_get() - _e_sys_begin_time) > 2.0) -@@ -1114,8 +1109,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw) - /* shutdown -r now */ +@@ -1170,8 +1165,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw) if (e_util_immortal_check()) return 0; + e_fm2_die(); snprintf(buf, sizeof(buf), - "%s/enlightenment/utils/enlightenment_sys reboot", - e_prefix_lib_get()); @@ -107,7 +107,7 @@ index 6781a9b5a..8cd140f1b 100644 if (_e_sys_exe) { if ((ecore_time_get() - _e_sys_begin_time) > 2.0) -@@ -1148,8 +1142,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw) +@@ -1204,8 +1198,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw) case E_SYS_SUSPEND: /* /etc/acpi/sleep.sh force */ snprintf(buf, sizeof(buf), @@ -117,7 +117,7 @@ index 6781a9b5a..8cd140f1b 100644 if (_e_sys_exe) { if ((ecore_time_get() - _e_sys_begin_time) > 2.0) -@@ -1208,8 +1201,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw) +@@ -1265,8 +1258,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw) case E_SYS_HIBERNATE: /* /etc/acpi/hibernate.sh force */ snprintf(buf, sizeof(buf), @@ -152,11 +152,26 @@ index 4b5148634..47d34b07f 100644 autolock_exe = ecore_exe_run(eina_strbuf_string_get(buf), NULL); eina_strbuf_free(buf); +diff --git a/src/modules/bluez5/e_mod_main.c b/src/modules/bluez5/e_mod_main.c +index a581c466c..095d8f360 100644 +--- a/src/modules/bluez5/e_mod_main.c ++++ b/src/modules/bluez5/e_mod_main.c +@@ -321,8 +321,8 @@ ebluez5_rfkill_unblock(const char *name) + if (buf) + { + eina_strbuf_append_printf +- (buf, "%s/enlightenment/utils/enlightenment_sys rfkill-unblock %s", +- e_prefix_lib_get(), name); ++ (buf, "/run/setuid-programs/enlightenment_sys rfkill-unblock %s", ++ name); + _rfkill_exe = ecore_exe_run(eina_strbuf_string_get(buf), NULL); + eina_strbuf_free(buf); + } diff --git a/src/modules/cpufreq/e_mod_main.c b/src/modules/cpufreq/e_mod_main.c -index f4ba259b6..ae228bae3 100644 +index b66b365d8..bab0802cc 100644 --- a/src/modules/cpufreq/e_mod_main.c +++ b/src/modules/cpufreq/e_mod_main.c -@@ -1450,8 +1450,7 @@ e_modapi_init(E_Module *m) +@@ -1452,8 +1452,7 @@ e_modapi_init(E_Module *m) } E_CONFIG_LIMIT(cpufreq_config->poll_interval, 1, 1024); @@ -166,3 +181,40 @@ index f4ba259b6..ae228bae3 100644 cpufreq_config->set_exe_path = strdup(buf); if (stat(buf, &st) < 0) +diff --git a/src/modules/sysinfo/cpuclock/cpuclock.c b/src/modules/sysinfo/cpuclock/cpuclock.c +index 938916e53..00d5067d0 100644 +--- a/src/modules/sysinfo/cpuclock/cpuclock.c ++++ b/src/modules/sysinfo/cpuclock/cpuclock.c +@@ -80,8 +80,7 @@ _cpuclock_set_governor(const char *governor) + char buf[4096 + 100], exe[4096]; + struct stat st; + +- snprintf(exe, 4096, "%s/%s/cpuclock_sysfs", +- e_module_dir_get(sysinfo_config->module), MODULE_ARCH); ++ snprintf(exe, 4096, "/run/setuid-programs/cpuclock_sysfs"); + if (stat(exe, &st) < 0) return; + + snprintf(buf, sizeof(buf), +@@ -108,8 +107,7 @@ _cpuclock_set_frequency(int frequency) + if (system(buf) != 0) + ERR("Error code from trying to run \"%s\"", buf); + #else +- snprintf(exe, 4096, "%s/%s/cpuclock_sysfs", +- e_module_dir_get(sysinfo_config->module), MODULE_ARCH); ++ snprintf(exe, 4096, "/run/setuid-programs/cpuclock_sysfs"); + if (stat(exe, &st) < 0) return; + snprintf(buf, sizeof(buf), + "%s %s %i", exe, "frequency", frequency); +@@ -127,8 +125,7 @@ _cpuclock_set_pstate(int min, int max, int turbo) + char buf[4096 + 100], exe[4096]; + struct stat st; + +- snprintf(exe, 4096, "%s/%s/cpuclock_sysfs", +- e_module_dir_get(sysinfo_config->module), MODULE_ARCH); ++ snprintf(exe, 4096, "/run/setuid-programs/cpuclock_sysfs"); + if (stat(exe, &st) < 0) return; + snprintf(buf, sizeof(buf), + "%s %s %i %i %i", exe, "pstate", min, max, turbo); +-- +2.23.0 + diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 343d507c14..a32756e040 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -963,23 +963,29 @@ with the administrator's password." (match-record enlightenment-desktop-configuration (enlightenment) - (list (file-append enlightenment - "/lib/enlightenment/utils/enlightenment_sys") - (file-append enlightenment - "/lib/enlightenment/utils/enlightenment_backlight") - ;; TODO: Move this binary to a screen-locker service. - (file-append enlightenment - "/lib/enlightenment/utils/enlightenment_ckpasswd") - (file-append enlightenment - (string-append - "/lib/enlightenment/modules/cpufreq/" - (match (string-tokenize (%current-system) - (char-set-complement (char-set #\-))) - ((arch "linux") (string-append "linux-gnu-" arch)) - ((arch "gnu") (string-append "gnu-" arch))) - "-" - (version-major+minor (package-version enlightenment)) - "/freqset"))))) + (let ((module-arch (match (string-tokenize (%current-system) + (char-set-complement (char-set #\-))) + ((arch "linux") (string-append "linux-gnu-" arch)) + ((arch "gnu") (string-append "gnu-" arch))))) + (list (file-append enlightenment + "/lib/enlightenment/utils/enlightenment_sys") + (file-append enlightenment + "/lib/enlightenment/utils/enlightenment_backlight") + ;; TODO: Move this binary to a screen-locker service. + (file-append enlightenment + "/lib/enlightenment/utils/enlightenment_ckpasswd") + (file-append enlightenment + (string-append + "/lib/enlightenment/modules/cpufreq/" + module-arch "-" + (package-version enlightenment) + "/freqset")) + (file-append enlightenment + (string-append + "/lib/enlightenment/modules/sysinfo/" + module-arch "-" + (package-version enlightenment) + "/cpuclock_sysfs")))))) (define enlightenment-desktop-service-type (service-type -- cgit v1.2.3 From 07d7175406210434d1fb9c100dc33a7d095f1627 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 30 Jul 2019 11:05:21 -0400 Subject: gnu: mingw-w64: Update to 6.0.0. * gnu/packages/mingw.scm (mingw-w64): Update to 6.0.0. * gnu/packages/patches/mingw-w64-6.0.0-gcc.patch: New file. * gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch: Delete it. * gnu/local.mk (dist_patch_DATA): Add new patch. Delete old patch. * gnu/build/cross-toolchain.scm (set-cross-path/mingw): Add additional autoconf-like substitutions. --- gnu/build/cross-toolchain.scm | 6 +- gnu/local.mk | 2 +- gnu/packages/mingw.scm | 6 +- .../patches/mingw-w64-5.0rc2-gcc-4.9.3.patch | 218 --------------------- gnu/packages/patches/mingw-w64-6.0.0-gcc.patch | 65 ++++++ 5 files changed, 74 insertions(+), 223 deletions(-) delete mode 100644 gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch create mode 100644 gnu/packages/patches/mingw-w64-6.0.0-gcc.patch (limited to 'gnu/packages/patches') diff --git a/gnu/build/cross-toolchain.scm b/gnu/build/cross-toolchain.scm index 201b36ff7c..7ab0a355b0 100644 --- a/gnu/build/cross-toolchain.scm +++ b/gnu/build/cross-toolchain.scm @@ -130,7 +130,11 @@ C_*INCLUDE_PATH." (substitute* (string-append mingw-headers "/crt/_mingw.h") (("@MINGW_HAS_SECURE_API@") - "#define MINGW_HAS_SECURE_API 1")) + "#define MINGW_HAS_SECURE_API 1") + (("@DEFAULT_WIN32_WINNT@") + "0x502") + (("@DEFAULT_MSVCRT_VERSION@") + "0x700")) (let ((cpath (string-append mingw-headers "/include" ":" mingw-headers "/crt" diff --git a/gnu/local.mk b/gnu/local.mk index a756316f77..d539c3c85b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1098,7 +1098,7 @@ dist_patch_DATA = \ %D%/packages/patches/meson-for-build-rpath.patch \ %D%/packages/patches/metabat-fix-compilation.patch \ %D%/packages/patches/mhash-keygen-test-segfault.patch \ - %D%/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch \ + %D%/packages/patches/mingw-w64-6.0.0-gcc.patch \ %D%/packages/patches/mpc123-initialize-ao.patch \ %D%/packages/patches/module-init-tools-moduledir.patch \ %D%/packages/patches/monero-use-system-miniupnpc.patch \ diff --git a/gnu/packages/mingw.scm b/gnu/packages/mingw.scm index 017f9453ab..fe51780fa3 100644 --- a/gnu/packages/mingw.scm +++ b/gnu/packages/mingw.scm @@ -36,15 +36,15 @@ (let ((triplet (string-append machine "-" "w64-mingw32"))) (package (name (string-append "mingw-w64" "-" machine)) - (version "5.0.4") + (version "6.0.0") (source (origin (method url-fetch) (uri (string-append "https://sourceforge.net/projects/mingw-w64/files/mingw-w64/" "mingw-w64-release/mingw-w64-v" version ".tar.bz2")) (sha256 - (base32 "00zq3z1hbzd5yzmskskjg79xrzwsqx7ihyprfaxy4hb897vf29sm")) - (patches (search-patches "mingw-w64-5.0rc2-gcc-4.9.3.patch")))) + (base32 "1w28mynv500y03h92nh87rgw3fnp82qwnjbxrrzqkmr63q812pl0")) + (patches (search-patches "mingw-w64-6.0.0-gcc.patch")))) (native-inputs `(("xgcc-core" ,(cross-gcc triplet)) ("xbinutils" ,(cross-binutils triplet)))) (build-system gnu-build-system) diff --git a/gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch b/gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch deleted file mode 100644 index e8f841c4fd..0000000000 --- a/gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch +++ /dev/null @@ -1,218 +0,0 @@ -This patch includes - - * mingw-w64-headers/include/winnt.h: compile fixes for1 gcc-4.9.3 - * mingw-w64-headers/crt/math.h: Likewise - * mingw-w64-headers/crt/float.h (FLT_EPSILON,DBL_EPSILON,LDBL_EPSILON): Add - symbols. - * mingw-w64-headers/crt/stat.h (S_ISLNK,S_ISSOCK,S_ISUID,S_ISGID,S_ISLINK): - Add symbols. - (lstat): Add function. - * mingw-w64-headers/crt/_mingw_stat64.h: Likewise - * mingw-w64-headers/crt/stdlib.h (realpath): Add function. - -Needed for building with gcc-4.9.3 and using with cross-libtool-2.4.6. - -Upstream status: not yet presented upstream. - -index 9c5cf87..74a8541 100644 ---- a/mingw-w64-crt/misc/dirname.c -+++ b/mingw-w64-crt/misc/dirname.c -@@ -29,6 +29,12 @@ - #define __cdecl /* this may not be defined. */ - #endif - -+char *__cdecl -+realpath(const char *name, char *resolved) -+{ -+ return resolved ? strcpy (resolved, name) : strdup (name); -+} -+ - char * __cdecl - dirname(char *path) - { -diff --git a/mingw-w64-headers/crt/_mingw_stat64.h b/mingw-w64-headers/crt/_mingw_stat64.h -index 17e754c..7d2339b 100644 ---- a/mingw-w64-headers/crt/_mingw_stat64.h -+++ b/mingw-w64-headers/crt/_mingw_stat64.h -@@ -2,13 +2,17 @@ - - #ifdef _USE_32BIT_TIME_T - #define _fstat32 _fstat -+#define _lstat32 _lstat - #define _stat32 _stat - #define _wstat32 _wstat - #define _fstat32i64 _fstati64 -+#define _lstat32i64 _lstati64 - #define _stat32i64 _stati64 - #define _wstat32i64 _wstati64 - #else - #define _fstat _fstat64i32 -+#define _lstat _lstat64i32 -+#define _lstati64 _lstat64 - #define _fstati64 _fstat64 - #define _stat _stat64i32 - #define _stati64 _stat64 -diff --git a/mingw-w64-headers/crt/float.h b/mingw-w64-headers/crt/float.h -index 5874f4e..bdf4ead 100644 ---- a/mingw-w64-headers/crt/float.h -+++ b/mingw-w64-headers/crt/float.h -@@ -22,6 +22,15 @@ - #if (__GNUC__ < 4) - #error Corrupt install of gcc-s internal headers, or search order was changed. - #else -+ -+ /* From gcc-4.9.3 float.h. */ -+ #undef FLT_EPSILON -+ #undef DBL_EPSILON -+ #undef LDBL_EPSILON -+ #define FLT_EPSILON __FLT_EPSILON__ -+ #define DBL_EPSILON __DBL_EPSILON__ -+ #define LDBL_EPSILON __LDBL_EPSILON__ -+ - /* #include_next */ - - /* Number of decimal digits, q, such that any floating-point number with q -diff --git a/mingw-w64-headers/crt/math.h b/mingw-w64-headers/crt/math.h -index 1e970f4..99a332f 100644 ---- a/mingw-w64-headers/crt/math.h -+++ b/mingw-w64-headers/crt/math.h -@@ -216,6 +216,7 @@ extern "C" { - #endif - } - -+#if 0 - __CRT_INLINE long double __cdecl fabsl (long double x) - { - #ifdef __arm__ -@@ -226,6 +227,7 @@ extern "C" { - return res; - #endif - } -+#endif - - __CRT_INLINE double __cdecl fabs (double x) - { -@@ -905,7 +907,7 @@ __mingw_choose_expr ( \ - /* 7.12.7.3 */ - extern double __cdecl hypot (double, double) __MINGW_ATTRIB_DEPRECATED_MSVC2005; /* in libmoldname.a */ - extern float __cdecl hypotf (float x, float y); --#ifndef __CRT__NO_INLINE -+#if 0 //ndef __CRT__NO_INLINE - __CRT_INLINE float __cdecl hypotf (float x, float y) { return (float) hypot ((double)x, (double)y);} - #endif - extern long double __cdecl hypotl (long double, long double); -diff --git a/mingw-w64-headers/crt/stdlib.h b/mingw-w64-headers/crt/stdlib.h -index dfc5ae4..6f0fee3 100644 ---- a/mingw-w64-headers/crt/stdlib.h -+++ b/mingw-w64-headers/crt/stdlib.h -@@ -8,6 +8,7 @@ - - #include - #include -+#include - - #if defined (__USE_MINGW_ANSI_STDIO) && ((__USE_MINGW_ANSI_STDIO + 0) != 0) && !defined (__USE_MINGW_STRTOX) - #define __USE_MINGW_STRTOX 1 -@@ -676,6 +677,8 @@ unsigned long __cdecl _lrotr(unsigned long,int); - - #endif /* !__NO_ISOCEXT */ - -+char *__cdecl realpath (const char *name, char *resolved); -+ - #ifdef __cplusplus - } - #endif -diff --git a/mingw-w64-headers/crt/sys/stat.h b/mingw-w64-headers/crt/sys/stat.h -index ed60219..d88b4f1 100644 ---- a/mingw-w64-headers/crt/sys/stat.h -+++ b/mingw-w64-headers/crt/sys/stat.h -@@ -58,16 +58,21 @@ extern "C" { - #include <_mingw_stat64.h> - - #define _S_IFMT 0xF000 -+#define _S_IFLNK 0xA000 -+#define _S_IFSOCK 0xC000 - #define _S_IFDIR 0x4000 - #define _S_IFCHR 0x2000 - #define _S_IFIFO 0x1000 - #define _S_IFREG 0x8000 -+#define _S_ISUID 0x0400 -+#define _S_ISGID 0x0200 - #define _S_IREAD 0x0100 - #define _S_IWRITE 0x0080 - #define _S_IEXEC 0x0040 - - _CRTIMP int __cdecl _fstat32(int _FileDes,struct _stat32 *_Stat); - _CRTIMP int __cdecl _stat32(const char *_Name,struct _stat32 *_Stat); -+ static inline int __cdecl _lstat32(const char *_Name,struct _stat32 *_Stat) {return _stat32(_Name, _Stat);} - _CRTIMP int __cdecl _fstat64(int _FileDes,struct _stat64 *_Stat); - _CRTIMP int __cdecl _fstat32i64(int _FileDes,struct _stat32i64 *_Stat); - int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat); -@@ -97,6 +102,9 @@ extern "C" { - _CRTIMP int __cdecl _stat64(const char *_Name,struct _stat64 *_Stat); - _CRTIMP int __cdecl _stat32i64(const char *_Name,struct _stat32i64 *_Stat); - int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat); -+ static inline int __cdecl _lstat64(const char *_Name,struct _stat64 *_Stat) {return _stat64(_Name, _Stat);} -+ static inline int __cdecl _lstat32i64(const char *_Name,struct _stat32i64 *_Stat) {return _stat32i64(_Name, _Stat);} -+ static inline int __cdecl _lstat64i32(const char *_Name,struct _stat64i32 *_Stat) {return _stat64i32(_Name, _Stat);} - #ifndef __CRT__NO_INLINE - __CRT_INLINE int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat) - { -@@ -132,6 +140,8 @@ extern "C" { - #ifndef NO_OLDNAMES - #define _S_IFBLK 0x3000 /* Block: Is this ever set under w32? */ - -+#define S_IFLNK _S_IFLNK -+#define S_IFSOCK _S_IFSOCK - #define S_IFMT _S_IFMT - #define S_IFDIR _S_IFDIR - #define S_IFCHR _S_IFCHR -@@ -162,6 +172,11 @@ extern "C" { - #define S_IXOTH (S_IXGRP >> 3) - #define S_IRWXO (S_IRWXG >> 3) - -+#define S_ISUID _S_ISUID -+#define S_ISGID _S_ISGID -+ -+#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) -+#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) - #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) - #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) - #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) -@@ -174,6 +189,7 @@ extern "C" { - int __cdecl stat(const char *_Filename,struct stat *_Stat); - int __cdecl fstat(int _Desc,struct stat *_Stat); - int __cdecl wstat(const wchar_t *_Filename,struct stat *_Stat); -+static inline int __cdecl lstat(const char *_Filename,struct stat *_Stat){return stat(_Filename, _Stat);} - - #ifndef __CRT__NO_INLINE - #ifdef _USE_32BIT_TIME_T -@@ -262,9 +278,11 @@ __CRT_INLINE int __cdecl - - #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64) - #ifdef _USE_32BIT_TIME_T -+#define lstat _lstat32i64 - #define stat _stat32i64 - #define fstat _fstat32i64 - #else -+#define lstat _lstat64 - #define stat _stat64 - #define fstat _fstat64 - #endif -diff --git a/mingw-w64-headers/include/winnt.h b/mingw-w64-headers/include/winnt.h -index 52af29b..8626396 100644 ---- a/mingw-w64-headers/include/winnt.h -+++ b/mingw-w64-headers/include/winnt.h -@@ -6895,7 +6895,12 @@ __buildmemorybarrier() - DWORD Reg : 3; - DWORD R : 1; - DWORD L : 1; -+/* C is used as a const specifier */ -+#define save_C C -+#undef C - DWORD C : 1; -+#define C save_C -+#undef save_C - DWORD StackAdjust : 10; - } DUMMYSTRUCTNAME; - } DUMMYUNIONNAME; diff --git a/gnu/packages/patches/mingw-w64-6.0.0-gcc.patch b/gnu/packages/patches/mingw-w64-6.0.0-gcc.patch new file mode 100644 index 0000000000..036cf79f91 --- /dev/null +++ b/gnu/packages/patches/mingw-w64-6.0.0-gcc.patch @@ -0,0 +1,65 @@ +This patch includes + + * mingw-w64-headers/include/winnt.h: compile fixes for1 gcc-4.9.3 + * mingw-w64-headers/crt/math.h: Likewise + * mingw-w64-headers/crt/float.h (FLT_EPSILON,DBL_EPSILON,LDBL_EPSILON): Add + symbols. + * mingw-w64-headers/crt/stat.h (S_ISLNK,S_ISSOCK,S_ISUID,S_ISGID,S_ISLINK): + Add symbols. + (lstat): Add function. + * mingw-w64-headers/crt/_mingw_stat64.h: Likewise + * mingw-w64-headers/crt/stdlib.h (realpath): Add function. + +Needed for building with gcc-4.9.3 and using with cross-libtool-2.4.6. + +Upstream status: not yet presented upstream. + +diff --git a/mingw-w64-headers/crt/float.h b/mingw-w64-headers/crt/float.h +index 5874f4e..bdf4ead 100644 +--- a/mingw-w64-headers/crt/float.h ++++ b/mingw-w64-headers/crt/float.h +@@ -22,6 +22,15 @@ + #if (__GNUC__ < 4) + #error Corrupt install of gcc-s internal headers, or search order was changed. + #else ++ ++ /* From gcc-4.9.3 float.h. */ ++ #undef FLT_EPSILON ++ #undef DBL_EPSILON ++ #undef LDBL_EPSILON ++ #define FLT_EPSILON __FLT_EPSILON__ ++ #define DBL_EPSILON __DBL_EPSILON__ ++ #define LDBL_EPSILON __LDBL_EPSILON__ ++ + /* #include_next */ + + /* Number of decimal digits, q, such that any floating-point number with q +diff --git a/mingw-w64-headers/crt/math.h b/mingw-w64-headers/crt/math.h +index 1e970f4..99a332f 100644 +--- a/mingw-w64-headers/crt/math.h ++++ b/mingw-w64-headers/crt/math.h +@@ -216,6 +216,7 @@ extern "C" { + #endif + } + ++#if 0 + __CRT_INLINE long double __cdecl fabsl (long double x) + { + #ifdef __arm__ +@@ -226,6 +227,7 @@ extern "C" { + return res; + #endif + } ++#endif + + __CRT_INLINE double __cdecl fabs (double x) + { +@@ -905,7 +907,7 @@ __mingw_choose_expr ( \ + /* 7.12.7.3 */ + extern double __cdecl hypot (double, double) __MINGW_ATTRIB_DEPRECATED_MSVC2005; /* in libmoldname.a */ + extern float __cdecl hypotf (float x, float y); +-#ifndef __CRT__NO_INLINE ++#if 0 //ndef __CRT__NO_INLINE + __CRT_INLINE float __cdecl hypotf (float x, float y) { return (float) hypot ((double)x, (double)y);} + #endif + extern long double __cdecl hypotl (long double, long double); -- cgit v1.2.3