diff options
Diffstat (limited to 'gnu/packages/patches')
32 files changed, 2207 insertions, 602 deletions
diff --git a/gnu/packages/patches/alsa-lib-add-environment-variable.patch b/gnu/packages/patches/alsa-lib-add-environment-variable.patch deleted file mode 100644 index a468a7fc4f..0000000000 --- a/gnu/packages/patches/alsa-lib-add-environment-variable.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 1822fb453128a1b5de93b4c590cd272d6488a077 Mon Sep 17 00:00:00 2001 -From: Julien Lepiller <julien@lepiller.eu> -Date: Fri, 25 May 2018 19:26:58 +0200 -Subject: [PATCH] Add support for a ALSA_PLUGIN_DIR environment variable. - -If it is not set, default to previous behavior. ---- - src/control/control.c | 6 +++++- - src/dlmisc.c | 9 +++++++-- - src/pcm/pcm.c | 9 +++++++-- - src/pcm/pcm_rate.c | 13 +++++++++---- - 4 files changed, 28 insertions(+), 9 deletions(-) - -diff --git a/src/control/control.c b/src/control/control.c -index 11f7815..9dba7dd 100644 ---- a/src/control/control.c -+++ b/src/control/control.c -@@ -1331,7 +1331,11 @@ static int snd_ctl_open_conf(snd_ctl_t **ctlp, const char *name, - build_in++; - } - if (*build_in == NULL) { -- buf1 = malloc(strlen(str) + sizeof(ALSA_PLUGIN_DIR) + 32); -+ char* plugdir = ALSA_PLUGIN_DIR; -+ char* envplugdir = getenv("ALSA_PLUGIN_DIR"); -+ if(envplugdir != NULL) -+ plugdir = envplugdir; -+ buf1 = malloc(strlen(str) + strlen(plugdir) + 32); - if (buf1 == NULL) { - err = -ENOMEM; - goto _err; -diff --git a/src/dlmisc.c b/src/dlmisc.c -index 3757d33..92aa864 100644 ---- a/src/dlmisc.c -+++ b/src/dlmisc.c -@@ -82,9 +82,14 @@ void *snd_dlopen(const char *name, int mode, char *errbuf, size_t errbuflen) - char *filename = NULL; - - if (name && name[0] != '/') { -- filename = alloca(sizeof(ALSA_PLUGIN_DIR) + 1 + strlen(name) + 1); -+ char* plugdir = ALSA_PLUGIN_DIR; -+ char* envplugdir = getenv("ALSA_PLUGIN_DIR"); -+ if(envplugdir != NULL) -+ plugdir = envplugdir; -+ -+ filename = malloc(strlen(plugdir) + 1 + strlen(name) + 1); - if (filename) { -- strcpy(filename, ALSA_PLUGIN_DIR); -+ strcpy(filename, plugdir); - strcat(filename, "/"); - strcat(filename, name); - handle = dlopen(filename, mode); -diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c -index 11aec80..590e8b6 100644 ---- a/src/pcm/pcm.c -+++ b/src/pcm/pcm.c -@@ -2496,13 +2496,18 @@ static int snd_pcm_open_conf(snd_pcm_t **pcmp, const char *name, - build_in++; - } - if (*build_in == NULL) { -- buf1 = malloc(strlen(str) + sizeof(ALSA_PLUGIN_DIR) + 32); -+ char* plugdir = ALSA_PLUGIN_DIR; -+ char* envplugdir = getenv("ALSA_PLUGIN_DIR"); -+ if(envplugdir != NULL) -+ plugdir = envplugdir; -+ buf1 = malloc(strlen(str) + strlen(plugdir) + 32); -+ - if (buf1 == NULL) { - err = -ENOMEM; - goto _err; - } - lib = buf1; -- sprintf(buf1, "%s/libasound_module_pcm_%s.so", ALSA_PLUGIN_DIR, str); -+ sprintf(buf1, "%s/libasound_module_pcm_%s.so", plugdir, str); - } - } - #ifndef PIC -diff --git a/src/pcm/pcm_rate.c b/src/pcm/pcm_rate.c -index 4e0c7ca..8694a38 100644 ---- a/src/pcm/pcm_rate.c -+++ b/src/pcm/pcm_rate.c -@@ -1260,7 +1260,8 @@ static const char *const default_rate_plugins[] = { - - static int rate_open_func(snd_pcm_rate_t *rate, const char *type, const snd_config_t *converter_conf, int verbose) - { -- char open_name[64], open_conf_name[64], lib_name[128], *lib = NULL; -+ char open_name[64], open_conf_name[64], *lib = NULL; -+ char *buf1; - snd_pcm_rate_open_func_t open_func; - snd_pcm_rate_open_conf_func_t open_conf_func; - int err; -@@ -1268,9 +1269,13 @@ static int rate_open_func(snd_pcm_rate_t *rate, const char *type, const snd_conf - snprintf(open_name, sizeof(open_name), "_snd_pcm_rate_%s_open", type); - snprintf(open_conf_name, sizeof(open_conf_name), "_snd_pcm_rate_%s_open_conf", type); - if (!is_builtin_plugin(type)) { -- snprintf(lib_name, sizeof(lib_name), -- "%s/libasound_module_rate_%s.so", ALSA_PLUGIN_DIR, type); -- lib = lib_name; -+ char* plugdir = ALSA_PLUGIN_DIR; -+ char* envplugdir = getenv("ALSA_PLUGIN_DIR"); -+ if(envplugdir != NULL) -+ plugdir = envplugdir; -+ buf1 = malloc(strlen(type) + strlen(plugdir) + 32); -+ sprintf(buf1, "%s/libasound_module_rate_%s.so", plugdir, type); -+ lib = buf1; - } - - rate->rate_min = SND_PCM_PLUGIN_RATE_MIN; --- -2.17.0 - diff --git a/gnu/packages/patches/bind-CVE-2018-5738.patch b/gnu/packages/patches/bind-CVE-2018-5738.patch deleted file mode 100644 index ddef014651..0000000000 --- a/gnu/packages/patches/bind-CVE-2018-5738.patch +++ /dev/null @@ -1,100 +0,0 @@ -Fix CVE-2018-5738: - -https://kb.isc.org/article/AA-01616/0/CVE-2018-5738 -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-5738 - -diff --git a/bin/named/server.c b/bin/named/server.c -index f63554e..847c4ff 100644 ---- a/bin/named/server.c -+++ b/bin/named/server.c -@@ -3725,10 +3725,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, - CHECKM(named_config_getport(config, &port), "port"); - dns_view_setdstport(view, port); - -- CHECK(configure_view_acl(vconfig, config, named_g_config, -- "allow-query", NULL, actx, -- named_g_mctx, &view->queryacl)); -- - /* - * Make the list of response policy zone names for a view that - * is used for real lookups and so cares about hints. -@@ -4692,21 +4688,35 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, - "allow-query-cache-on", NULL, actx, - named_g_mctx, &view->cacheonacl)); - /* -- * Set "allow-query-cache", "allow-recursion", and -- * "allow-recursion-on" acls if configured in named.conf. -- * (Ignore the global defaults for now, because these ACLs -- * can inherit from each other when only some of them set at -- * the options/view level.) -+ * Set the "allow-query", "allow-query-cache", "allow-recursion", -+ * and "allow-recursion-on" ACLs if configured in named.conf, but -+ * NOT from the global defaults. This is done by leaving the third -+ * argument to configure_view_acl() NULL. -+ * -+ * We ignore the global defaults here because these ACLs -+ * can inherit from each other. If any are still unset after -+ * applying the inheritance rules, we'll look up the defaults at -+ * that time. - */ -- CHECK(configure_view_acl(vconfig, config, NULL, "allow-query-cache", -- NULL, actx, named_g_mctx, &view->cacheacl)); -+ -+ /* named.conf only */ -+ CHECK(configure_view_acl(vconfig, config, NULL, -+ "allow-query", NULL, actx, -+ named_g_mctx, &view->queryacl)); -+ -+ /* named.conf only */ -+ CHECK(configure_view_acl(vconfig, config, NULL, -+ "allow-query-cache", NULL, actx, -+ named_g_mctx, &view->cacheacl)); - - if (strcmp(view->name, "_bind") != 0 && - view->rdclass != dns_rdataclass_chaos) - { -+ /* named.conf only */ - CHECK(configure_view_acl(vconfig, config, NULL, - "allow-recursion", NULL, actx, - named_g_mctx, &view->recursionacl)); -+ /* named.conf only */ - CHECK(configure_view_acl(vconfig, config, NULL, - "allow-recursion-on", NULL, actx, - named_g_mctx, &view->recursiononacl)); -@@ -4744,18 +4754,21 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, - * the global config. - */ - if (view->recursionacl == NULL) { -+ /* global default only */ - CHECK(configure_view_acl(NULL, NULL, named_g_config, - "allow-recursion", NULL, - actx, named_g_mctx, - &view->recursionacl)); - } - if (view->recursiononacl == NULL) { -+ /* global default only */ - CHECK(configure_view_acl(NULL, NULL, named_g_config, - "allow-recursion-on", NULL, - actx, named_g_mctx, - &view->recursiononacl)); - } - if (view->cacheacl == NULL) { -+ /* global default only */ - CHECK(configure_view_acl(NULL, NULL, named_g_config, - "allow-query-cache", NULL, - actx, named_g_mctx, -@@ -4769,6 +4782,14 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, - CHECK(dns_acl_none(mctx, &view->cacheacl)); - } - -+ if (view->queryacl == NULL) { -+ /* global default only */ -+ CHECK(configure_view_acl(NULL, NULL, named_g_config, -+ "allow-query", NULL, -+ actx, named_g_mctx, -+ &view->queryacl)); -+ } -+ - /* - * Ignore case when compressing responses to the specified - * clients. This causes case not always to be preserved, diff --git a/gnu/packages/patches/emacs-browse-at-remote-cgit-gnu.patch b/gnu/packages/patches/emacs-browse-at-remote-cgit-gnu.patch deleted file mode 100644 index b90017fdb4..0000000000 --- a/gnu/packages/patches/emacs-browse-at-remote-cgit-gnu.patch +++ /dev/null @@ -1,59 +0,0 @@ -Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com> - -This patch adds a support for Git repositories hosted on git.savannah.gnu.org. - -Upstream bug URL: - -https://github.com/rmuslimov/browse-at-remote/pull/46 - -From cd2ccdaef8b1d97337d790175f71cc3dbcfcff64 Mon Sep 17 00:00:00 2001 -From: Oleg Pykhalov <go.wigust@gmail.com> -Date: Fri, 26 Jan 2018 00:05:30 +0300 -Subject: [PATCH] Add support for repositories that are hosted on gnu cgit - ---- - browse-at-remote.el | 21 ++++++++++++++++++++- - 1 file changed, 20 insertions(+), 1 deletion(-) - -diff --git a/browse-at-remote.el b/browse-at-remote.el -index 66967b3..e210d18 100644 ---- a/browse-at-remote.el -+++ b/browse-at-remote.el -@@ -44,7 +44,8 @@ - (defcustom browse-at-remote-remote-type-domains - '(("bitbucket.org" ."bitbucket") - ("github.com" . "github") -- ("gitlab.com" . "gitlab")) -+ ("gitlab.com" . "gitlab") -+ ("git.savannah.gnu.org" . "gnu")) - "Alist of domain patterns to remote types." - - :type '(alist :key-type (string :tag "Domain") -@@ -199,6 +200,24 @@ If HEAD is detached, return nil." - (if (fboundp formatter) - formatter nil))) - -+(defun browse-at-remote-gnu-format-url (repo-url) -+ "Get a gnu formatted URL." -+ (replace-regexp-in-string -+ (concat "https://" (car (rassoc "gnu" browse-at-remote-remote-type-domains)) -+ "/\\(git\\).*\\'") -+ "cgit" repo-url nil nil 1)) -+ -+(defun browse-at-remote--format-region-url-as-gnu (repo-url location filename &optional linestart lineend) -+ "URL formatter for gnu." -+ (let ((repo-url (browse-at-remote-gnu-format-url repo-url))) -+ (cond -+ (linestart (format "%s.git/tree/%s?h=%s#n%d" repo-url filename location linestart)) -+ (t (format "%s.git/tree/%s?h=%s" repo-url filename location))))) -+ -+(defun browse-at-remote--format-commit-url-as-gnu (repo-url commithash) -+ "Commit URL formatted for gnu" -+ (format "%s.git/commit/?id=%s" (browse-at-remote-gnu-format-url repo-url) commithash)) -+ - (defun browse-at-remote--format-region-url-as-github (repo-url location filename &optional linestart lineend) - "URL formatted for github." - (cond --- -2.15.1 - diff --git a/gnu/packages/patches/file-CVE-2017-1000249.patch b/gnu/packages/patches/file-CVE-2017-1000249.patch deleted file mode 100644 index 505acf1592..0000000000 --- a/gnu/packages/patches/file-CVE-2017-1000249.patch +++ /dev/null @@ -1,27 +0,0 @@ -https://github.com/file/file/commit/35c94dc6acc418f1ad7f6241a6680e5327495793.patch -http://openwall.com/lists/oss-security/2017/09/05/3 - -The patch is minorly modified to apply to file-5.30 - -From 35c94dc6acc418f1ad7f6241a6680e5327495793 Mon Sep 17 00:00:00 2001 -From: Christos Zoulas <christos@zoulas.com> -Date: Sun, 27 Aug 2017 07:55:02 +0000 -Subject: [PATCH] Fix always true condition (Thomas Jarosch) - ---- - src/readelf.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/readelf.c b/src/readelf.c -index 81451827..5f425c97 100644 ---- a/src/readelf.c -+++ b/src/readelf.c -@@ -511,7 +511,7 @@ do_bid_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type, - size_t noff, size_t doff, int *flags) - { - if (namesz == 4 && strcmp((char *)&nbuf[noff], "GNU") == 0 && -- type == NT_GNU_BUILD_ID && (descsz >= 4 || descsz <= 20)) { -+ type == NT_GNU_BUILD_ID && (descsz >= 4 && descsz <= 20)) { - uint8_t desc[20]; - const char *btype; - uint32_t i; diff --git a/gnu/packages/patches/fltk-shared-lib-defines.patch b/gnu/packages/patches/fltk-shared-lib-defines.patch deleted file mode 100644 index d36a50ff5e..0000000000 --- a/gnu/packages/patches/fltk-shared-lib-defines.patch +++ /dev/null @@ -1,51 +0,0 @@ -This patch from upstream revision 10588. - ---- fltk-1.3.3/src/Xutf8.h -+++ fltk-1.3.3/src/Xutf8.h -@@ -25,6 +25,7 @@ - #include <X11/Xlib.h> - #include <X11/Xlocale.h> - #include <X11/Xutil.h> -+#include <FL/Fl_Export.H> - - typedef struct { - int nb_font; -@@ -98,8 +99,8 @@ - XUtf8FontStruct *font_set, - unsigned int ucs); - --int --XGetUtf8FontAndGlyph( -+FL_EXPORT int -+fl_XGetUtf8FontAndGlyph( - XUtf8FontStruct *font_set, - unsigned int ucs, - XFontStruct **fnt, ---- fltk-1.3.3/src/gl_draw.cxx -+++ fltk-1.3.3/src/gl_draw.cxx -@@ -114,7 +114,7 @@ - for (int i = 0; i < 0x400; i++) { - XFontStruct *font = NULL; - unsigned short id; -- XGetUtf8FontAndGlyph(gl_fontsize->font, ii, &font, &id); -+ fl_XGetUtf8FontAndGlyph(gl_fontsize->font, ii, &font, &id); - if (font) glXUseXFont(font->fid, id, 1, gl_fontsize->listbase+ii); - ii++; - } ---- fltk-1.3.3/src/xutf8/utf8Wrap.c -+++ fltk-1.3.3/src/xutf8/utf8Wrap.c -@@ -816,10 +816,10 @@ - /** get the X font and glyph ID of a UCS char **/ - /*****************************************************************************/ - int --XGetUtf8FontAndGlyph(XUtf8FontStruct *font_set, -- unsigned int ucs, -- XFontStruct **fnt, -- unsigned short *id) { -+fl_XGetUtf8FontAndGlyph(XUtf8FontStruct *font_set, -+ unsigned int ucs, -+ XFontStruct **fnt, -+ unsigned short *id) { - - /* int x; */ - int *encodings; /* encodings array */ diff --git a/gnu/packages/patches/fltk-xfont-on-demand.patch b/gnu/packages/patches/fltk-xfont-on-demand.patch deleted file mode 100644 index cdcdd9af05..0000000000 --- a/gnu/packages/patches/fltk-xfont-on-demand.patch +++ /dev/null @@ -1,45 +0,0 @@ -Fixes undefined reference to `Fl_XFont_On_Demand::value()'. -From <http://www.fltk.org/str.php?L3156+P0+S0+C0+I0+E0+V1+QOn_Demand>. - -Index: src/fl_font.cxx -=================================================================== ---- fltk-1.3.3/src/fl_font.cxx (revision 10503) -+++ fltk-1.3.3/src/fl_font.cxx (revision 10504) -@@ -55,6 +55,12 @@ - # include "fl_font_x.cxx" - #endif // WIN32 - -+#if ! (defined(WIN32) || defined(__APPLE__)) -+XFontStruct *fl_X_core_font() -+{ -+ return fl_xfont.value(); -+} -+#endif - - double fl_width(const char* c) { - if (c) return fl_width(c, (int) strlen(c)); -Index: src/gl_draw.cxx -=================================================================== ---- fltk-1.3.3/src/gl_draw.cxx (revision 10503) -+++ fltk-1.3.3/src/gl_draw.cxx (revision 10504) -@@ -81,7 +81,7 @@ - * then sorting through them at draw time (for normal X rendering) to find which one can - * render the current glyph... But for now, just use the first font in the list for GL... - */ -- XFontStruct *font = fl_xfont; -+ XFontStruct *font = fl_X_core_font(); - int base = font->min_char_or_byte2; - int count = font->max_char_or_byte2-base+1; - fl_fontsize->listbase = glGenLists(256); -Index: FL/x.H -=================================================================== ---- fltk-1.3.3/FL/x.H (revision 10503) -+++ fltk-1.3.3/FL/x.H (revision 10504) -@@ -132,6 +132,7 @@ - XFontStruct *ptr; - }; - extern FL_EXPORT Fl_XFont_On_Demand fl_xfont; -+extern FL_EXPORT XFontStruct* fl_X_core_font(); - - // this object contains all X-specific stuff about a window: - // Warning: this object is highly subject to change! diff --git a/gnu/packages/patches/ghostscript-CVE-2018-10194.patch b/gnu/packages/patches/ghostscript-CVE-2018-10194.patch new file mode 100644 index 0000000000..242e57c27c --- /dev/null +++ b/gnu/packages/patches/ghostscript-CVE-2018-10194.patch @@ -0,0 +1,52 @@ +Fix CVE-2018-10194: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-10194 +https://bugs.ghostscript.com/show_bug.cgi?id=699255 + +Patch copied from upstream source repository: + +https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=39b1e54b2968620723bf32e96764c88797714879 + +From 39b1e54b2968620723bf32e96764c88797714879 Mon Sep 17 00:00:00 2001 +From: Ken Sharp <ken.sharp@artifex.com> +Date: Wed, 18 Apr 2018 15:46:32 +0100 +Subject: [PATCH] pdfwrite - Guard against trying to output an infinite number + +Bug #699255 " Buffer overflow on pprintg1 due to mishandle postscript file data to pdf" + +The file uses an enormous parameter to xyxhow, causing an overflow in +the calculation of text positioning (value > 1e39). + +Since this is basically a nonsense value, and PostScript only supports +real values up to 1e38, this patch follows the same approach as for +a degenerate CTM, and treats it as 0. + +Adobe Acrobat Distiller throws a limitcheck error, so we could do that +instead if this approach proves to be a problem. +--- + devices/vector/gdevpdts.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/devices/vector/gdevpdts.c b/devices/vector/gdevpdts.c +index 848ad781f..172fe6bc3 100644 +--- a/devices/vector/gdevpdts.c ++++ b/devices/vector/gdevpdts.c +@@ -103,9 +103,14 @@ append_text_move(pdf_text_state_t *pts, double dw) + static int + set_text_distance(gs_point *pdist, double dx, double dy, const gs_matrix *pmat) + { +- int code = gs_distance_transform_inverse(dx, dy, pmat, pdist); ++ int code; + double rounded; + ++ if (dx > 1e38 || dy > 1e38) ++ code = gs_error_undefinedresult; ++ else ++ code = gs_distance_transform_inverse(dx, dy, pmat, pdist); ++ + if (code == gs_error_undefinedresult) { + /* The CTM is degenerate. + Can't know the distance in user space. +-- +2.18.0 + diff --git a/gnu/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch b/gnu/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch new file mode 100644 index 0000000000..ef090e0ec9 --- /dev/null +++ b/gnu/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch @@ -0,0 +1,42 @@ +# HG changeset patch +# User Gábor Boskovits <boskovits@gmail.com> +# 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------------------------------ diff --git a/gnu/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch b/gnu/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch new file mode 100644 index 0000000000..35cfe38152 --- /dev/null +++ b/gnu/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch @@ -0,0 +1,45 @@ +From 2f0ef2c69e99e1096a2a72c7a29025a736b044b4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= <boskovits@gmail.com> +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 + diff --git a/gnu/packages/patches/jamvm-arm.patch b/gnu/packages/patches/jamvm-arm.patch new file mode 100644 index 0000000000..9e998e18db --- /dev/null +++ b/gnu/packages/patches/jamvm-arm.patch @@ -0,0 +1,1313 @@ +From 67faeb7d58e0d25a50d36788ed49ed383b92e090 Mon Sep 17 00:00:00 2001 +From: Efraim Flashner <efraim@flashner.co.il> +Date: Mon, 26 Mar 2018 11:08:17 +0300 +Subject: [PATCH] add ARMv7 support + +--- + src/arch/arm.h | 75 +++++- + src/os/linux/arm/Makefile.am | 9 +- + src/os/linux/arm/Makefile.in | 166 ++++++++---- + src/os/linux/arm/callNative.S | 12 +- + src/os/linux/arm/callNativeEABI.S | 8 +- + src/os/linux/arm/callNativeEABIHard.S | 315 +++++++++++++++++++++++ + src/os/linux/arm/callNativeEABIHardARM.S | 266 +++++++++++++++++++ + src/os/linux/arm/dll_md.c | 61 ++++- + 8 files changed, 843 insertions(+), 69 deletions(-) + create mode 100644 src/os/linux/arm/callNativeEABIHard.S + create mode 100644 src/os/linux/arm/callNativeEABIHardARM.S + +diff --git a/src/arch/arm.h b/src/arch/arm.h +index ccf68c4..d2c0318 100644 +--- a/src/arch/arm.h ++++ b/src/arch/arm.h +@@ -1,6 +1,6 @@ + /* +- * Copyright (C) 2003, 2004, 2005, 2006, 2007 +- * Robert Lougher <rob@lougher.org.uk>. ++ * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, ++ * 2014 Robert Lougher <rob@jamvm.org.uk>. + * + * This file is part of JamVM. + * +@@ -21,10 +21,16 @@ + + #define OS_ARCH "arm" + +-/* Override default min and max heap sizes. ARM machines are +- usually embedded, and the standard defaults are too large. */ +-#define DEFAULT_MAX_HEAP 16*MB ++/* Override minimum min heap size. The initial heap size is a ratio ++ of the physical memory, but it must be at least the minimum min ++ size. The normal setting is too large for ARM machines as they ++ are usually embedded. */ ++#define MIN_MIN_HEAP 1*MB ++ ++/* Likewise, override the default min/max heap sizes used when the ++ size of physical memory is not available */ + #define DEFAULT_MIN_HEAP 1*MB ++#define DEFAULT_MAX_HEAP 64*MB + + #ifdef DIRECT + #define HANDLER_TABLE_T static const void +@@ -51,6 +57,36 @@ + /* Needed for i386 -- empty here */ + #define FPU_HACK + ++#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_7A__) ++#define COMPARE_AND_SWAP_32(addr, old_val, new_val) \ ++({ \ ++ int result, read_val; \ ++ __asm__ __volatile__ (" \ ++ 1: mov %0, #0; \ ++ ldrex %1, [%2]; \ ++ cmp %3, %1; \ ++ bne 2f; \ ++ strex %0, %4, [%2]; \ ++ cmp %0, #1; \ ++ beq 1b; \ ++ mov %0, #1; \ ++ 2:" \ ++ : "=&r" (result), "=&r" (read_val) \ ++ : "r" (addr), "r" (old_val), "r" (new_val) \ ++ : "cc", "memory"); \ ++ result; \ ++}) ++ ++#define COMPARE_AND_SWAP(addr, old_val, new_val) \ ++ COMPARE_AND_SWAP_32(addr, old_val, new_val) ++ ++#define LOCKWORD_READ(addr) *addr ++#define LOCKWORD_WRITE(addr, value) *addr = value ++#define LOCKWORD_COMPARE_AND_SWAP(addr, old_val, new_val) \ ++ COMPARE_AND_SWAP(addr, old_val, new_val) ++ ++#else ++ + #define LOCKWORD_COMPARE_AND_SWAP(addr, old_val, new_val) \ + ({ \ + int result, read_val; \ +@@ -94,7 +130,7 @@ do { \ + : "r" (addr), "r" (new_val) \ + : "cc", "memory"); \ + } while(0) +- ++#endif + + #ifdef __ARM_EABI__ + #define FLUSH_CACHE(addr, length) \ +@@ -124,8 +160,33 @@ do { \ + } + #endif + ++#define GEN_REL_JMP(target_addr, patch_addr, patch_size) \ ++({ \ ++ int patched = FALSE; \ ++ \ ++ if(patch_size >= 4) { \ ++ /* Guard against the pointer difference being \ ++ larger than the signed range */ \ ++ long long offset = (uintptr_t)(target_addr) - \ ++ (uintptr_t)(patch_addr) - 8; \ ++ \ ++ if(offset >= -1<<25 && offset < 1<<25) { \ ++ *(int*)(patch_addr) = offset>>2 & 0x00ffffff \ ++ | 0xea000000; \ ++ patched = TRUE; \ ++ } \ ++ } \ ++ patched; \ ++}) ++ ++#ifdef __ARM_ARCH_7A__ ++#define MBARRIER() __asm__ __volatile__ ("dmb" ::: "memory") ++#define UNLOCK_MBARRIER() __asm__ __volatile__ ("dmb" ::: "memory") ++#define JMM_LOCK_MBARRIER() __asm__ __volatile__ ("dmb" ::: "memory") ++#define JMM_UNLOCK_MBARRIER() __asm__ __volatile__ ("dmb" ::: "memory") ++#else + #define MBARRIER() __asm__ __volatile__ ("" ::: "memory") + #define UNLOCK_MBARRIER() __asm__ __volatile__ ("" ::: "memory") + #define JMM_LOCK_MBARRIER() __asm__ __volatile__ ("" ::: "memory") + #define JMM_UNLOCK_MBARRIER() __asm__ __volatile__ ("" ::: "memory") +- ++#endif +diff --git a/src/os/linux/arm/Makefile.am b/src/os/linux/arm/Makefile.am +index d18ea5a..74e7786 100644 +--- a/src/os/linux/arm/Makefile.am ++++ b/src/os/linux/arm/Makefile.am +@@ -1,6 +1,6 @@ + ## +-## Copyright (C) 2003, 2004, 2005, 2006, 2007 +-## Robert Lougher <rob@lougher.org.uk>. ++## Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010, 2011, 2012 ++## Robert Lougher <rob@jamvm.org.uk>. + ## + ## This file is part of JamVM. + ## +@@ -19,10 +19,11 @@ + ## Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + ## + +-EXTRA_DIST = callNativeOABI.S callNativeEABI.S ++EXTRA_DIST = callNativeOABI.S callNativeEABI.S callNativeEABIHard.S \ ++ callNativeEABIHardARM.S + + noinst_LTLIBRARIES = libnative.la + libnative_la_SOURCES = init.c dll_md.c callNative.S + +-AM_CPPFLAGS = -I$(top_builddir)/src ++AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src + AM_CCASFLAGS = -I$(top_builddir)/src +diff --git a/src/os/linux/arm/Makefile.in b/src/os/linux/arm/Makefile.in +index 63b21ad..6d44ea9 100644 +--- a/src/os/linux/arm/Makefile.in ++++ b/src/os/linux/arm/Makefile.in +@@ -1,8 +1,9 @@ +-# Makefile.in generated by automake 1.10 from Makefile.am. ++# Makefile.in generated by automake 1.11.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. ++# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software ++# Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -15,9 +16,27 @@ + @SET_MAKE@ + + VPATH = @srcdir@ ++am__make_dryrun = \ ++ { \ ++ am__dry=no; \ ++ case $$MAKEFLAGS in \ ++ *\\[\ \ ]*) \ ++ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ ++ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ ++ *) \ ++ for am__flg in $$MAKEFLAGS; do \ ++ case $$am__flg in \ ++ *=*|--*) ;; \ ++ *n*) am__dry=yes; break;; \ ++ esac; \ ++ done;; \ ++ esac; \ ++ test $$am__dry = yes; \ ++ } + pkgdatadir = $(datadir)/@PACKAGE@ +-pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ ++pkglibdir = $(libdir)/@PACKAGE@ ++pkglibexecdir = $(libexecdir)/@PACKAGE@ + am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd + install_sh_DATA = $(install_sh) -c -m 644 + install_sh_PROGRAM = $(install_sh) -c +@@ -42,13 +61,15 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs + CONFIG_HEADER = $(top_builddir)/src/config.h + CONFIG_CLEAN_FILES = ++CONFIG_CLEAN_VPATH_FILES = + LTLIBRARIES = $(noinst_LTLIBRARIES) + libnative_la_LIBADD = + am_libnative_la_OBJECTS = init.lo dll_md.lo callNative.lo + libnative_la_OBJECTS = $(am_libnative_la_OBJECTS) +-DEFAULT_INCLUDES = -I. -I$(top_builddir)/src@am__isrc@ ++DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles ++am__mv = mv -f + CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) + LTCPPASCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ +@@ -65,6 +86,11 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + $(LDFLAGS) -o $@ + SOURCES = $(libnative_la_SOURCES) + DIST_SOURCES = $(libnative_la_SOURCES) ++am__can_run_installinfo = \ ++ case $$AM_UPDATE_INFO_DIR in \ ++ n|no|NO) false;; \ ++ *) (install-info --version) >/dev/null 2>&1;; \ ++ esac + ETAGS = etags + CTAGS = ctags + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +@@ -84,21 +110,18 @@ CCDEPMODE = @CCDEPMODE@ + CFLAGS = @CFLAGS@ + CPP = @CPP@ + CPPFLAGS = @CPPFLAGS@ +-CXX = @CXX@ +-CXXCPP = @CXXCPP@ +-CXXDEPMODE = @CXXDEPMODE@ +-CXXFLAGS = @CXXFLAGS@ + CYGPATH_W = @CYGPATH_W@ + DEFS = @DEFS@ + DEPDIR = @DEPDIR@ +-ECHO = @ECHO@ ++DLLTOOL = @DLLTOOL@ ++DSYMUTIL = @DSYMUTIL@ ++DUMPBIN = @DUMPBIN@ + ECHO_C = @ECHO_C@ + ECHO_N = @ECHO_N@ + ECHO_T = @ECHO_T@ + EGREP = @EGREP@ + EXEEXT = @EXEEXT@ +-F77 = @F77@ +-FFLAGS = @FFLAGS@ ++FGREP = @FGREP@ + GREP = @GREP@ + INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ +@@ -106,21 +129,30 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + JAVAC = @JAVAC@ ++LD = @LD@ + LDFLAGS = @LDFLAGS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ ++LIPO = @LIPO@ + LN_S = @LN_S@ + LTLIBOBJS = @LTLIBOBJS@ + MAINT = @MAINT@ + MAKEINFO = @MAKEINFO@ ++MANIFEST_TOOL = @MANIFEST_TOOL@ + MKDIR_P = @MKDIR_P@ ++NM = @NM@ ++NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ ++OTOOL = @OTOOL@ ++OTOOL64 = @OTOOL64@ + PACKAGE = @PACKAGE@ + PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + RANLIB = @RANLIB@ +@@ -133,9 +165,9 @@ abs_builddir = @abs_builddir@ + abs_srcdir = @abs_srcdir@ + abs_top_builddir = @abs_top_builddir@ + abs_top_srcdir = @abs_top_srcdir@ ++ac_ct_AR = @ac_ct_AR@ + ac_ct_CC = @ac_ct_CC@ +-ac_ct_CXX = @ac_ct_CXX@ +-ac_ct_F77 = @ac_ct_F77@ ++ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ + am__include = @am__include@ + am__leading_dot = @am__leading_dot@ + am__quote = @am__quote@ +@@ -149,6 +181,7 @@ build_cpu = @build_cpu@ + build_os = @build_os@ + build_vendor = @build_vendor@ + builddir = @builddir@ ++classlib = @classlib@ + datadir = @datadir@ + datarootdir = @datarootdir@ + docdir = @docdir@ +@@ -181,15 +214,18 @@ sharedstatedir = @sharedstatedir@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + use_zip_no = @use_zip_no@ + use_zip_yes = @use_zip_yes@ + with_classpath_install_dir = @with_classpath_install_dir@ +-EXTRA_DIST = callNativeOABI.S callNativeEABI.S ++EXTRA_DIST = callNativeOABI.S callNativeEABI.S callNativeEABIHard.S \ ++ callNativeEABIHardARM.S ++ + noinst_LTLIBRARIES = libnative.la + libnative_la_SOURCES = init.c dll_md.c callNative.S +-AM_CPPFLAGS = -I$(top_builddir)/src ++AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src + AM_CCASFLAGS = -I$(top_builddir)/src + all: all-am + +@@ -199,14 +235,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/os/linux/arm/Makefile'; \ +- cd $(top_srcdir) && \ +- $(AUTOMAKE) --gnu src/os/linux/arm/Makefile ++ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/os/linux/arm/Makefile'; \ ++ $(am__cd) $(top_srcdir) && \ ++ $(AUTOMAKE) --gnu src/os/linux/arm/Makefile + .PRECIOUS: Makefile + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ +@@ -224,6 +260,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ++$(am__aclocal_m4_deps): + + clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) +@@ -233,7 +270,7 @@ clean-noinstLTLIBRARIES: + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +-libnative.la: $(libnative_la_OBJECTS) $(libnative_la_DEPENDENCIES) ++libnative.la: $(libnative_la_OBJECTS) $(libnative_la_DEPENDENCIES) $(EXTRA_libnative_la_DEPENDENCIES) + $(LINK) $(libnative_la_OBJECTS) $(libnative_la_LIBADD) $(LIBS) + + mostlyclean-compile: +@@ -248,42 +285,42 @@ distclean-compile: + + .S.o: + @am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +-@am__fastdepCCAS_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po ++@am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ $< + + .S.obj: + @am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +-@am__fastdepCCAS_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po ++@am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + + .S.lo: + @am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +-@am__fastdepCCAS_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo ++@am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo + @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCCAS_FALSE@ $(LTCPPASCOMPILE) -c -o $@ $< + + .c.o: + @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po ++@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(COMPILE) -c $< + + .c.obj: + @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po ++@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + + .c.lo: + @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo ++@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@@ -299,45 +336,49 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ +- $(AWK) ' { files[$$0] = 1; } \ +- END { for (i in files) print i; }'`; \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS + + TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) +- tags=; \ ++ set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ +- $(AWK) ' { files[$$0] = 1; } \ +- END { for (i in files) print i; }'`; \ +- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ ++ shift; \ ++ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ +- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ +- $$tags $$unique; \ ++ if test $$# -gt 0; then \ ++ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ "$$@" $$unique; \ ++ else \ ++ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ $$unique; \ ++ fi; \ + fi + ctags: CTAGS + CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) +- tags=; \ +- here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ +- $(AWK) ' { files[$$0] = 1; } \ +- END { for (i in files) print i; }'`; \ +- test -z "$(CTAGS_ARGS)$$tags$$unique" \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ ++ test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ +- $$tags $$unique ++ $$unique + + GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ +- && cd $(top_srcdir) \ +- && gtags -i $(GTAGS_ARGS) $$here ++ && $(am__cd) $(top_srcdir) \ ++ && gtags -i $(GTAGS_ARGS) "$$here" + + distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +@@ -358,13 +399,17 @@ distdir: $(DISTFILES) + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ ++ if test -d "$(distdir)/$$file"; then \ ++ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ ++ fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ +- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ ++ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ ++ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ +- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ ++ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ +- test -f $(distdir)/$$file \ +- || cp -p $$d/$$file $(distdir)/$$file \ ++ test -f "$(distdir)/$$file" \ ++ || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +@@ -382,16 +427,22 @@ install-am: all-am + + installcheck: installcheck-am + install-strip: +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ +- `test -z '$(STRIP)' || \ +- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install ++ if test -z '$(STRIP)'; then \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ install; \ ++ else \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ ++ fi + mostlyclean-generic: + + clean-generic: + + distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) ++ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + + maintainer-clean-generic: + @echo "This command is intended for maintainers to use" +@@ -413,6 +464,8 @@ dvi-am: + + html: html-am + ++html-am: ++ + info: info-am + + info-am: +@@ -421,18 +474,28 @@ install-data-am: + + install-dvi: install-dvi-am + ++install-dvi-am: ++ + install-exec-am: + + install-html: install-html-am + ++install-html-am: ++ + install-info: install-info-am + ++install-info-am: ++ + install-man: + + install-pdf: install-pdf-am + ++install-pdf-am: ++ + install-ps: install-ps-am + ++install-ps-am: ++ + installcheck-am: + + maintainer-clean: maintainer-clean-am +@@ -470,6 +533,7 @@ uninstall-am: + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: +diff --git a/src/os/linux/arm/callNative.S b/src/os/linux/arm/callNative.S +index 39ab6d3..245afd1 100644 +--- a/src/os/linux/arm/callNative.S ++++ b/src/os/linux/arm/callNative.S +@@ -1,6 +1,6 @@ + /* +- * Copyright (C) 2003, 2004, 2005, 2006, 2007 +- * Robert Lougher <rob@lougher.org.uk>. ++ * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2011, 2012 ++ * Robert Lougher <rob@jamvm.org.uk>. + * + * This file is part of JamVM. + * +@@ -23,7 +23,15 @@ + + #ifndef USE_FFI + #ifdef __ARM_EABI__ ++#ifdef __ARM_PCS_VFP ++#ifdef __ARM_ARCH_7A__ ++#include "callNativeEABIHard.S" ++#else ++#include "callNativeEABIHardARM.S" ++#endif ++#else + #include "callNativeEABI.S" ++#endif + #else + #include "callNativeOABI.S" + #endif +diff --git a/src/os/linux/arm/callNativeEABI.S b/src/os/linux/arm/callNativeEABI.S +index 5effa57..3a7539e 100644 +--- a/src/os/linux/arm/callNativeEABI.S ++++ b/src/os/linux/arm/callNativeEABI.S +@@ -1,6 +1,6 @@ + /* +- * Copyright (C) 2003, 2004, 2005, 2006, 2007 +- * Robert Lougher <rob@lougher.org.uk>. ++ * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2011 ++ * Robert Lougher <rob@jamvm.org.uk>. + * + * This file is part of JamVM. + * +@@ -95,8 +95,12 @@ done: + ldmfd sp!, {r2, r3} + + /* Call the function */ ++#if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) + mov lr, pc + bx ip ++#else ++ blx ip ++#endif + + subs r4, r4, #8 /* Pop argument area */ + /* (minus 8 for r2/r3) */ +diff --git a/src/os/linux/arm/callNativeEABIHard.S b/src/os/linux/arm/callNativeEABIHard.S +new file mode 100644 +index 0000000..5d5785b +--- /dev/null ++++ b/src/os/linux/arm/callNativeEABIHard.S +@@ -0,0 +1,315 @@ ++/* ++ * Copyright (C) 2011, 2012 Robert Lougher <rob@jamvm.org.uk>. ++ * ++ * This file is part of JamVM. ++ * ++ * 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, ++ * 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, write to the Free Software ++ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ++ */ ++ ++ .text ++ .syntax unified ++ .arch armv7-a ++ .thumb ++ .align 2 ++ .global callJNIMethod ++ .type callJNIMethod,function ++ ++/* ++ * Arguments passed in: ++ * ++ * r0 JNIEnv ++ * r1 class or NULL ++ * r2 sig ++ * r3 extra arg ++ * sp + 0 ostack ++ * sp + 4 function pntr ++ * sp + 8 args count ++ */ ++ ++/* Register usage : ++ * ++ * r11 function pntr ++ * lr ostack pntr ++ * ip args pntr ++ * r8 sig pntr ++ * r10 extra stack ++ * r6 fp backfill ++ * r4 fp reg ++ * r7 int reg ++ * r5 scratch ++ * r3, r2 outgoing int args ++ * r1 outgoing class or this pntr ++ * r0 outgoing JNIEnv (as passed in) ++ * ++ * s0 - s16 (d0 - d7) outgoing float args ++ */ ++ ++callJNIMethod: ++ stmfd sp!, {r4, r5, r6, r7, r8, r10, r11, lr} ++ ldr lr, [sp, #32] /* get ostack pntr */ ++ ldr r11, [sp, #36] /* get function pntr */ ++ ++ cmp r1, #0 /* is method non-static? */ ++ it eq ++ ldreq r1, [lr], #4 /* yes, load r1 with "this" */ ++ ++ mov r10, r3 ++ subs sp, sp, r3 /* allocate room for stacked */ ++ add r8, r2, #1 /* init sig pntr -- skipping '(' */ ++ ++ mov ip, sp /* init loop pntr */ ++ ++ mov r7, #2 ++ mov r4, #16 ++ mov r6, #0 ++ ++scan_sig: ++ ldrb r5, [r8], #1 ++ ++ cmp r5, #41 /* ')' */ ++ beq done ++ ++ cmp r5, #70 /* 'F' */ ++ beq float ++ ++ cmp r5, #68 /* 'D' */ ++ beq double ++ ++ cmp r5, #74 /* 'J' */ ++ beq long ++ ++skip_brackets: ++ cmp r5, #91 /* '[' */ ++ itt eq ++ ldrbeq r5, [r8], #1 ++ beq skip_brackets ++ ++ cmp r5, #76 /* 'L' */ ++ bne int ++ ++skip_ref: ++ ldrb r5, [r8], #1 ++ cmp r5, #59 /* ';' */ ++ bne skip_ref ++ ++int: ++ cbz r7, stack_int ++ ++ subs r7, r7, #1 ++ ite ne ++ ldrne r2, [lr], #4 ++ ldreq r3, [lr], #4 ++ ++ b scan_sig ++ ++float: ++ cbz r6, no_backfill ++ ++ sub r5, r6, #1 ++ mov r6, #0 ++ b load_float ++ ++no_backfill: ++ cbz r4, stack_int ++ ++ sub r4, r4, #1 ++ mov r5, r4 ++ ++load_float: ++ add lr, lr, #4 ++ tbb [pc, r5] ++ ++float_table: ++ .byte (s15-float_table)/2 ++ .byte (s14-float_table)/2 ++ .byte (s13-float_table)/2 ++ .byte (s12-float_table)/2 ++ .byte (s11-float_table)/2 ++ .byte (s10-float_table)/2 ++ .byte (s9-float_table)/2 ++ .byte (s8-float_table)/2 ++ .byte (s7-float_table)/2 ++ .byte (s6-float_table)/2 ++ .byte (s5-float_table)/2 ++ .byte (s4-float_table)/2 ++ .byte (s3-float_table)/2 ++ .byte (s2-float_table)/2 ++ .byte (s1-float_table)/2 ++ .byte (s0-float_table)/2 ++ ++stack_int: ++ ldr r5, [lr], #4 ++ str r5, [ip], #4 ++ b scan_sig ++ ++s0: ++ vldr s0, [lr, #-4] ++ b scan_sig ++s1: ++ vldr s1, [lr, #-4] ++ b scan_sig ++s2: ++ vldr s2, [lr, #-4] ++ b scan_sig ++s3: ++ vldr s3, [lr, #-4] ++ b scan_sig ++s4: ++ vldr s4, [lr, #-4] ++ b scan_sig ++s5: ++ vldr s5, [lr, #-4] ++ b scan_sig ++s6: ++ vldr s6, [lr, #-4] ++ b scan_sig ++s7: ++ vldr s7, [lr, #-4] ++ b scan_sig ++s8: ++ vldr s8, [lr, #-4] ++ b scan_sig ++s9: ++ vldr s9, [lr, #-4] ++ b scan_sig ++s10: ++ vldr s10, [lr, #-4] ++ b scan_sig ++s11: ++ vldr s11, [lr, #-4] ++ b scan_sig ++s12: ++ vldr s12, [lr, #-4] ++ b scan_sig ++s13: ++ vldr s13, [lr, #-4] ++ b scan_sig ++s14: ++ vldr s14, [lr, #-4] ++ b scan_sig ++s15: ++ vldr s15, [lr, #-4] ++ b scan_sig ++ ++long: ++ cmp r7, #2 ++ mov r7, #0 ++ bne stack_long ++ ++ ldmia lr!, {r2, r3} ++ b scan_sig ++ ++double: ++ lsrs r5, r4, #1 ++ it cs ++ movcs r6, r4 ++ ++ lsls r4, r5, #1 ++ beq stack_double ++ ++ sub r4, r4, #2 ++ add lr, lr, #8 ++ tbb [pc, r5] ++ ++double_table: ++ .byte 0 ++ .byte (d7-double_table)/2 ++ .byte (d6-double_table)/2 ++ .byte (d5-double_table)/2 ++ .byte (d4-double_table)/2 ++ .byte (d3-double_table)/2 ++ .byte (d2-double_table)/2 ++ .byte (d1-double_table)/2 ++ .byte (d0-double_table)/2 ++ .align 2 ++d0: ++ vldr d0, [lr, #-8] ++ b scan_sig ++d1: ++ vldr d1, [lr, #-8] ++ b scan_sig ++d2: ++ vldr d2, [lr, #-8] ++ b scan_sig ++d3: ++ vldr d3, [lr, #-8] ++ b scan_sig ++d4: ++ vldr d4, [lr, #-8] ++ b scan_sig ++d5: ++ vldr d5, [lr, #-8] ++ b scan_sig ++d6: ++ vldr d6, [lr, #-8] ++ b scan_sig ++d7: ++ vldr d7, [lr, #-8] ++ b scan_sig ++ ++stack_double: ++ mov r6, #0 ++ ++stack_long: ++ /* Ensure address is 8 byte aligned */ ++ add ip, ip, #7 ++ bic ip, ip, #7 ++ ++ ldr r5, [lr], #4 ++ str r5, [ip], #4 ++ ldr r5, [lr], #4 ++ str r5, [ip], #4 ++ b scan_sig ++ ++done: ++ /* Call the function */ ++ blx r11 ++ ++ add sp, sp, r10 /* Pop argument area */ ++ ++ ldr r4, [sp, #32] /* Reload ostack for */ ++ /* address of return value */ ++ ++ ldrb r5, [r8] /* Return type */ ++ ++ cmp r5, #86 /* 'V' */ ++ beq return ++ ++ cmp r5, #68 /* 'D' */ ++ beq return_double ++ ++ cmp r5, #70 /* 'F' */ ++ beq return_float ++ ++ str r0, [r4], #4 /* Low word */ ++ ++ cmp r5, #74 /* 'J' */ ++ it eq ++ streq r1, [r4], #4 /* High word */ ++ ++return: ++ mov r0, r4 /* return ostack */ ++ ldmfd sp!, {r4, r5, r6, r7, r8, r10, r11, lr} ++ bx lr ++ ++return_float: ++ vstr s0, [r4] ++ add r4, r4, #4 ++ b return ++ ++return_double: ++ vstr d0, [r4] ++ add r4, r4, #8 ++ b return +diff --git a/src/os/linux/arm/callNativeEABIHardARM.S b/src/os/linux/arm/callNativeEABIHardARM.S +new file mode 100644 +index 0000000..3a31acd +--- /dev/null ++++ b/src/os/linux/arm/callNativeEABIHardARM.S +@@ -0,0 +1,266 @@ ++/* ++ * Copyright (C) 2011, 2012 Robert Lougher <rob@jamvm.org.uk>. ++ * ++ * This file is part of JamVM. ++ * ++ * 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, ++ * 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, write to the Free Software ++ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ++ */ ++ ++ .text ++ .align 2 ++ .global callJNIMethod ++ .type callJNIMethod,function ++ ++/* ++ * Arguments passed in: ++ * ++ * r0 JNIEnv ++ * r1 class or NULL ++ * r2 sig ++ * r3 extra arg ++ * sp + 0 ostack ++ * sp + 4 function pntr ++ * sp + 8 args count ++ */ ++ ++/* Register usage : ++ * ++ * lr ostack pntr ++ * ip scratch ++ * r11 function pntr ++ * r10 fp backfill ++ * r8 fp reg ++ * r7 int reg ++ * r6 args pntr ++ * r5 sig pntr ++ * r4 extra stack ++ * r3, r2 outgoing int args ++ * r1 outgoing class or this pntr ++ * r0 outgoing JNIEnv (as passed in) ++ * ++ * s0 - s16 (d0 - d7) outgoing float args ++ */ ++ ++callJNIMethod: ++ stmfd sp!, {r4, r5, r6, r7, r8, r10, r11, lr} ++ ldr lr, [sp, #32] /* get ostack pntr */ ++ ldr r11, [sp, #36] /* get function pntr */ ++ ++ cmp r1, #0 /* is method non-static? */ ++ ldreq r1, [lr], #4 /* yes, load r1 with "this" */ ++ ++ mov r4, r3 ++ sub sp, sp, r4 /* allocate room for stacked */ ++ add r5, r2, #1 /* init sig pntr -- skipping '(' */ ++ ++ mov r6, sp /* init loop pntr */ ++ ++ mov r7, #2 ++ mov r8, #16 ++ mov r10, #0 ++ ++scan_sig: ++ ldrb ip, [r5], #1 ++ ++ cmp ip, #41 /* ')' */ ++ beq done ++ ++ cmp ip, #70 /* 'F' */ ++ beq float ++ ++ cmp ip, #68 /* 'D' */ ++ beq double ++ ++ cmp ip, #74 /* 'J' */ ++ beq long ++ ++skip_brackets: ++ cmp ip, #91 /* '[' */ ++ ldreqb ip, [r5], #1 ++ beq skip_brackets ++ ++ cmp ip, #76 /* 'L' */ ++ bne int ++ ++skip_ref: ++ ldrb ip, [r5], #1 ++ cmp ip, #59 /* ';' */ ++ bne skip_ref ++ ++int: ++ cmp r7, #0 ++ beq stack_int ++ ++ subs r7, r7, #1 ++ ++ ldrne r2, [lr], #4 ++ ldreq r3, [lr], #4 ++ ++ b scan_sig ++ ++stack_int: ++ ldr ip, [lr], #4 ++ str ip, [r6], #4 ++ b scan_sig ++ ++float: ++ cmp r10, #0 ++ beq no_backfill ++ ++ sub ip, r10, #1 ++ mov r10, #0 ++ b load_float ++ ++no_backfill: ++ cmp r8, #0 ++ beq stack_int ++ ++ sub r8, r8, #1 ++ mov ip, r8 ++ ++load_float: ++ add lr, lr, #4 ++ add pc, pc, ip, lsl #3 ++ nop ++ ++ flds s15, [lr, #-4] ++ b scan_sig ++ flds s14, [lr, #-4] ++ b scan_sig ++ flds s13, [lr, #-4] ++ b scan_sig ++ flds s12, [lr, #-4] ++ b scan_sig ++ flds s11, [lr, #-4] ++ b scan_sig ++ flds s10, [lr, #-4] ++ b scan_sig ++ flds s9, [lr, #-4] ++ b scan_sig ++ flds s8, [lr, #-4] ++ b scan_sig ++ flds s7, [lr, #-4] ++ b scan_sig ++ flds s6, [lr, #-4] ++ b scan_sig ++ flds s5, [lr, #-4] ++ b scan_sig ++ flds s4, [lr, #-4] ++ b scan_sig ++ flds s3, [lr, #-4] ++ b scan_sig ++ flds s2, [lr, #-4] ++ b scan_sig ++ flds s1, [lr, #-4] ++ b scan_sig ++ flds s0, [lr, #-4] ++ b scan_sig ++ ++long: ++ cmp r7, #2 ++ mov r7, #0 ++ bne stack_long ++ ++ ldr r2, [lr], #4 ++ ldr r3, [lr], #4 ++ b scan_sig ++ ++double: ++ lsrs ip, r8, #1 ++ movcs r10, r8 ++ ++ lsls r8, ip, #1 ++ beq stack_double ++ ++ sub r8, r8, #2 ++ add lr, lr, #8 ++ add pc, pc, ip, lsl #3 ++ nop ++ nop ++ nop ++ ++ fldd d7, [lr, #-8] ++ b scan_sig ++ fldd d6, [lr, #-8] ++ b scan_sig ++ fldd d5, [lr, #-8] ++ b scan_sig ++ fldd d4, [lr, #-8] ++ b scan_sig ++ fldd d3, [lr, #-8] ++ b scan_sig ++ fldd d2, [lr, #-8] ++ b scan_sig ++ fldd d1, [lr, #-8] ++ b scan_sig ++ fldd d0, [lr, #-8] ++ b scan_sig ++ ++stack_double: ++ mov r10, #0 ++ ++stack_long: ++ /* Ensure address is 8 byte aligned */ ++ add r6, r6, #7 ++ bic r6, r6, #7 ++ ++ ldr ip, [lr], #4 ++ str ip, [r6], #4 ++ ldr ip, [lr], #4 ++ str ip, [r6], #4 ++ b scan_sig ++ ++done: ++ /* Call the function */ ++#if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) ++ mov lr, pc ++ bx r11 ++#else ++ blx r11 ++#endif ++ ++ add sp, sp, r4 /* Pop argument area */ ++ ldr r4, [sp, #32] /* Reload ostack for */ ++ /* address of return value */ ++ ldrb ip, [r5] /* Return type */ ++ ++ cmp ip, #86 /* 'V' */ ++ beq return ++ ++ cmp ip, #68 /* 'D' */ ++ beq return_double ++ ++ cmp ip, #70 /* 'F' */ ++ beq return_float ++ ++ str r0, [r4], #4 /* Low word */ ++ ++ cmp ip, #74 /* 'J' */ ++ streq r1, [r4], #4 /* High word */ ++ ++return: ++ mov r0, r4 /* return ostack */ ++ ldmfd sp!, {r4, r5, r6, r7, r8, r10, r11, lr} ++ bx lr ++ ++return_float: ++ add r4, r4, #4 ++ fsts s0, [r4, #-4] ++ b return ++ ++return_double: ++ add r4, r4, #8 ++ fstd d0, [r4, #-8] ++ b return +diff --git a/src/os/linux/arm/dll_md.c b/src/os/linux/arm/dll_md.c +index f5df90e..39bdf7c 100644 +--- a/src/os/linux/arm/dll_md.c ++++ b/src/os/linux/arm/dll_md.c +@@ -1,6 +1,6 @@ + /* +- * Copyright (C) 2003, 2004, 2005, 2006, 2007 +- * Robert Lougher <rob@lougher.org.uk>. ++ * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2011 ++ * Robert Lougher <rob@jamvm.org.uk>. + * + * This file is part of JamVM. + * +@@ -31,6 +31,61 @@ + * out stack requirements and then to push arguments. To + * save the first scan at call time, the signature is pre- + * scanned and stack requirement stored in the extra argument. */ ++ ++#ifdef __ARM_PCS_VFP ++int nativeExtraArg(MethodBlock *mb) { ++ char *sig = mb->type; ++ int fp_backfill = 0; ++ int stack_args = 0; ++ int int_args = 2; ++ int fp_args = 16; ++ ++ while(*++sig != ')') ++ switch(*sig) { ++ case 'J': ++ if(int_args < 2) ++ stack_args = (stack_args + 15) & ~7; ++ int_args = 0; ++ break; ++ ++ case 'D': ++ fp_backfill |= fp_args & 1; ++ fp_args &= ~1; ++ ++ if(fp_args == 0) { ++ stack_args = (stack_args + 15) & ~7; ++ fp_backfill = 0; ++ } else ++ fp_args -= 2; ++ break; ++ ++ case 'F': ++ if(fp_backfill) ++ fp_backfill = 0; ++ else { ++ if(fp_args == 0) ++ stack_args += 4; ++ else ++ fp_args--; ++ } ++ break; ++ ++ default: ++ if(int_args == 0) ++ stack_args += 4; ++ else ++ int_args--; ++ ++ if(*sig == '[') ++ while(*++sig == '['); ++ if(*sig == 'L') ++ while(*++sig != ';'); ++ break; ++ } ++ ++ return (stack_args + 7) & ~7; ++} ++#else + int nativeExtraArg(MethodBlock *mb) { + char *sig = mb->type; + int args = 0; +@@ -57,7 +112,7 @@ int nativeExtraArg(MethodBlock *mb) { + native method, so minimum stack requirement is 8 bytes. */ + return args < 8 ? 8 : args; + } +- ++#endif + #else + + /* Under OABI, arguments can be copied onto the stack "as is" +-- +2.17.1 + diff --git a/gnu/packages/patches/libgit2-0.25.1-mtime-0.patch b/gnu/packages/patches/libgit2-mtime-0.patch index a6fdb50fff..a6fdb50fff 100644 --- a/gnu/packages/patches/libgit2-0.25.1-mtime-0.patch +++ b/gnu/packages/patches/libgit2-mtime-0.patch diff --git a/gnu/packages/patches/mesa-wayland-egl-symbols-check-mips.patch b/gnu/packages/patches/mesa-wayland-egl-symbols-check-mips.patch deleted file mode 100644 index aa2278697e..0000000000 --- a/gnu/packages/patches/mesa-wayland-egl-symbols-check-mips.patch +++ /dev/null @@ -1,15 +0,0 @@ -Fix 'wayland-egl-symbols-check' on mips64el-linux, where an additional symbol -(_ftext) is present in libwayland-egl.so. - -Patch by Mark H Weaver <mhw@netris.org> - ---- mesa-12.0.1/src/egl/wayland/wayland-egl/wayland-egl-symbols-check.orig 2016-01-18 02:39:25.000000000 -0500 -+++ mesa-12.0.1/src/egl/wayland/wayland-egl/wayland-egl-symbols-check 2016-10-24 16:25:07.110721426 -0400 -@@ -7,6 +7,7 @@ - wl_egl_window_destroy - wl_egl_window_get_attached_size - _fini -+_ftext - _init - EOF - done) diff --git a/gnu/packages/patches/meson-for-build-rpath.patch b/gnu/packages/patches/meson-for-build-rpath.patch index 4e20c9aed3..2151d53565 100644 --- a/gnu/packages/patches/meson-for-build-rpath.patch +++ b/gnu/packages/patches/meson-for-build-rpath.patch @@ -6,14 +6,13 @@ Patch by Peter Mikkelsen <petermikkelsen10@gmail.com> --- meson-0.42.0/mesonbuild/scripts/meson_install.py.orig 2017-09-09 01:49:39.147374148 +0200 +++ meson-0.42.0/mesonbuild/scripts/meson_install.py 2017-09-09 01:51:01.209134717 +0200 -@@ -345,15 +345,6 @@ +@@ -391,14 +391,6 @@ print("Symlink creation does not work on this platform. " "Skipping all symlinking.") printed_symlink_error = True -- if is_elf_platform() and os.path.isfile(outname): +- if os.path.isfile(outname): - try: -- e = depfixer.Elf(outname, False) -- e.fix_rpath(install_rpath) +- depfixer.fix_rpath(outname, install_rpath, False) - except SystemExit as e: - if isinstance(e.code, int) and e.code == 0: - pass diff --git a/gnu/packages/patches/monero-use-system-miniupnpc.patch b/gnu/packages/patches/monero-use-system-miniupnpc.patch new file mode 100644 index 0000000000..6bc825d121 --- /dev/null +++ b/gnu/packages/patches/monero-use-system-miniupnpc.patch @@ -0,0 +1,111 @@ +This reverts commit 1e20d705e7c64d2b17c031f345057d1e8850fafa, so that it's possible to use our own +miniupnpc, instead of a git submodule. +--- + CMakeLists.txt | 8 ++++++++ + external/CMakeLists.txt | 41 +++++++++++++++++++++++++++++++---------- + src/p2p/net_node.inl | 13 ++++++++++--- + 3 files changed, 49 insertions(+), 13 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3b93988e..ef948885 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -430,6 +430,14 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations") + + add_subdirectory(external) + ++# Final setup for miniupnpc ++if(UPNP_STATIC OR IOS) ++ add_definitions("-DUPNP_STATIC") ++else() ++ add_definitions("-DUPNP_DYNAMIC") ++ include_directories(${UPNP_INCLUDE}) ++endif() ++ + # Final setup for libunbound + include_directories(${UNBOUND_INCLUDE}) + link_directories(${UNBOUND_LIBRARY_DIRS}) +diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt +index 1fc4d64c..b4f712ee 100644 +--- a/external/CMakeLists.txt ++++ b/external/CMakeLists.txt +@@ -34,21 +34,42 @@ + # We always compile if we are building statically to reduce static dependency issues... + # ...except for FreeBSD, because FreeBSD is a special case that doesn't play well with + # others. ++if(NOT IOS) ++ find_package(Miniupnpc QUIET) ++endif() + +-find_package(Miniupnpc REQUIRED) ++# If we have the correct shared version and we're not building static, use it ++if(STATIC OR IOS) ++ set(USE_SHARED_MINIUPNPC false) ++elseif(MINIUPNP_FOUND AND MINIUPNPC_VERSION_1_7_OR_HIGHER) ++ set(USE_SHARED_MINIUPNPC true) ++endif() + +-message(STATUS "Using in-tree miniupnpc") ++if(USE_SHARED_MINIUPNPC) ++ message(STATUS "Using shared miniupnpc found at ${MINIUPNP_INCLUDE_DIR}") + +-add_subdirectory(miniupnp/miniupnpc) ++ set(UPNP_STATIC false PARENT_SCOPE) ++ set(UPNP_INCLUDE ${MINIUPNP_INCLUDE_DIR} PARENT_SCOPE) ++ set(UPNP_LIBRARIES ${MINIUPNP_LIBRARY} PARENT_SCOPE) ++else() ++ if(STATIC) ++ message(STATUS "Using miniupnpc from local source tree for static build") ++ else() ++ message(STATUS "Using miniupnpc from local source tree (/external/miniupnp/miniupnpc)") ++ endif() + +-set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external") +-if(MSVC) +- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -wd4244 -wd4267") +-elseif(NOT MSVC) +- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-undef -Wno-unused-result -Wno-unused-value") +-endif() ++ add_subdirectory(miniupnp/miniupnpc) ++ ++ set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external") ++ if(MSVC) ++ set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -wd4244 -wd4267") ++ elseif(NOT MSVC) ++ set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-undef -Wno-unused-result -Wno-unused-value") ++ endif() + +-set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE) ++ set(UPNP_STATIC true PARENT_SCOPE) ++ set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE) ++endif() + + find_package(Unbound) + +diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl +index 9b21705e..76340a22 100644 +--- a/src/p2p/net_node.inl ++++ b/src/p2p/net_node.inl +@@ -49,9 +49,16 @@ + #include "storages/levin_abstract_invoke2.h" + #include "cryptonote_core/cryptonote_core.h" + +-#include <miniupnp/miniupnpc/miniupnpc.h> +-#include <miniupnp/miniupnpc/upnpcommands.h> +-#include <miniupnp/miniupnpc/upnperrors.h> ++// We have to look for miniupnpc headers in different places, dependent on if its compiled or external ++#ifdef UPNP_STATIC ++ #include <miniupnp/miniupnpc/miniupnpc.h> ++ #include <miniupnp/miniupnpc/upnpcommands.h> ++ #include <miniupnp/miniupnpc/upnperrors.h> ++#else ++ #include "miniupnpc.h" ++ #include "upnpcommands.h" ++ #include "upnperrors.h" ++#endif + + #undef MONERO_DEFAULT_LOG_CATEGORY + #define MONERO_DEFAULT_LOG_CATEGORY "net.p2p" +-- +2.16.2 + diff --git a/gnu/packages/patches/openbabel-fix-crash-on-nwchem-output.patch b/gnu/packages/patches/openbabel-fix-crash-on-nwchem-output.patch new file mode 100644 index 0000000000..879df026a1 --- /dev/null +++ b/gnu/packages/patches/openbabel-fix-crash-on-nwchem-output.patch @@ -0,0 +1,34 @@ +From 52cea818bf68f8a2d3c48d55d00c2f8b7da25e4c Mon Sep 17 00:00:00 2001 +From: Daniel Hogan <daniel.hogan@usask.ca> +Date: Tue, 28 Mar 2017 22:21:18 -0600 +Subject: [PATCH] Remove delete statement. + +When from_scratch is true, coordinates is not allocated. A separate if +statement was added to handle the case when from_scratch is true that +does not try to free coordinates. +--- + src/formats/nwchemformat.cpp | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/src/formats/nwchemformat.cpp b/src/formats/nwchemformat.cpp +index 6f625ad5b..79298555f 100644 +--- a/src/formats/nwchemformat.cpp ++++ b/src/formats/nwchemformat.cpp +@@ -232,11 +232,14 @@ static const char* OPTIMIZATION_END_PATTERN = " Optimization converged"; + break; + tokenize(vs,buffer); + } +- if ((from_scratch)||(i != natoms)) +- { ++ if (from_scratch) ++ { ++ return; ++ } ++ if (i != natoms) { + delete[] coordinates; + return; +- } ++ } + molecule->AddConformer(coordinates); + } + diff --git a/gnu/packages/patches/openblas-fix-tests-i686.patch b/gnu/packages/patches/openblas-fix-tests-i686.patch new file mode 100644 index 0000000000..3325546ea3 --- /dev/null +++ b/gnu/packages/patches/openblas-fix-tests-i686.patch @@ -0,0 +1,35 @@ +Fix a test failure on some i686 systems: + +https://github.com/xianyi/OpenBLAS/issues/1575 + +This patch is a squashed version of these commits: + +https://github.com/xianyi/OpenBLAS/pull/1583 + +diff --git a/kernel/x86/KERNEL.NEHALEM b/kernel/x86/KERNEL.NEHALEM +index 835520ef..65b03ae5 100644 +--- a/kernel/x86/KERNEL.NEHALEM ++++ b/kernel/x86/KERNEL.NEHALEM +@@ -1,3 +1 @@ + include $(KERNELDIR)/KERNEL.PENRYN +-SSWAPKERNEL = ../arm/swap.c +-DSWAPKERNEL = ../arm/swap.c +diff --git a/kernel/x86/swap.S b/kernel/x86/swap.S +index 54b00b33..e30c2789 100644 +--- a/kernel/x86/swap.S ++++ b/kernel/x86/swap.S +@@ -138,6 +138,14 @@ + /* INCX != 1 or INCY != 1 */ + + .L14: ++ cmpl $0, %ebx ++ jne .L141 ++ cmpl $0, %ecx ++ jne .L141 ++/* INCX == 0 and INCY == 0 */ ++ jmp .L27 ++ ++.L141: + movl %edx, %eax + sarl $2, %eax + jle .L28 diff --git a/gnu/packages/patches/openscenegraph-ffmpeg3.patch b/gnu/packages/patches/openscenegraph-ffmpeg3.patch deleted file mode 100644 index 02c04a5583..0000000000 --- a/gnu/packages/patches/openscenegraph-ffmpeg3.patch +++ /dev/null @@ -1,156 +0,0 @@ -Description: Replace deprecated FFmpeg API -Author: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> -See <http://forum.openscenegraph.org/viewtopic.php?t=15832>. ---- a/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp -+++ b/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp -@@ -71,7 +71,7 @@ void FFmpegDecoderVideo::open(AVStream * - findAspectRatio(); - - // Find out whether we support Alpha channel -- m_alpha_channel = (m_context->pix_fmt == PIX_FMT_YUVA420P); -+ m_alpha_channel = (m_context->pix_fmt == AV_PIX_FMT_YUVA420P); - - // Find out the framerate - m_frame_rate = av_q2d(stream->avg_frame_rate); -@@ -91,20 +91,19 @@ void FFmpegDecoderVideo::open(AVStream * - throw std::runtime_error("avcodec_open() failed"); - - // Allocate video frame -- m_frame.reset(avcodec_alloc_frame()); -+ m_frame.reset(av_frame_alloc()); - - // Allocate converted RGB frame -- m_frame_rgba.reset(avcodec_alloc_frame()); -- m_buffer_rgba[0].resize(avpicture_get_size(PIX_FMT_RGB24, width(), height())); -+ m_frame_rgba.reset(av_frame_alloc()); -+ m_buffer_rgba[0].resize(avpicture_get_size(AV_PIX_FMT_RGB24, width(), height())); - m_buffer_rgba[1].resize(m_buffer_rgba[0].size()); - - // Assign appropriate parts of the buffer to image planes in m_frame_rgba -- avpicture_fill((AVPicture *) (m_frame_rgba).get(), &(m_buffer_rgba[0])[0], PIX_FMT_RGB24, width(), height()); -+ avpicture_fill((AVPicture *) (m_frame_rgba).get(), &(m_buffer_rgba[0])[0], AV_PIX_FMT_RGB24, width(), height()); - - // Override get_buffer()/release_buffer() from codec context in order to retrieve the PTS of each frame. - m_context->opaque = this; -- m_context->get_buffer = getBuffer; -- m_context->release_buffer = releaseBuffer; -+ m_context->get_buffer2 = getBuffer; - } - - -@@ -263,8 +262,8 @@ int FFmpegDecoderVideo::convert(AVPictur - #ifdef USE_SWSCALE - if (m_swscale_ctx==0) - { -- m_swscale_ctx = sws_getContext(src_width, src_height, (PixelFormat) src_pix_fmt, -- src_width, src_height, (PixelFormat) dst_pix_fmt, -+ m_swscale_ctx = sws_getContext(src_width, src_height, (AVPixelFormat) src_pix_fmt, -+ src_width, src_height, (AVPixelFormat) dst_pix_fmt, - /*SWS_BILINEAR*/ SWS_BICUBIC, NULL, NULL, NULL); - } - -@@ -311,14 +310,14 @@ void FFmpegDecoderVideo::publishFrame(co - AVPicture * const dst = (AVPicture *) m_frame_rgba.get(); - - // Assign appropriate parts of the buffer to image planes in m_frame_rgba -- avpicture_fill((AVPicture *) (m_frame_rgba).get(), &(m_buffer_rgba[m_writeBuffer])[0], PIX_FMT_RGB24, width(), height()); -+ avpicture_fill((AVPicture *) (m_frame_rgba).get(), &(m_buffer_rgba[m_writeBuffer])[0], AV_PIX_FMT_RGB24, width(), height()); - - // Convert YUVA420p (i.e. YUV420p plus alpha channel) using our own routine - -- if (m_context->pix_fmt == PIX_FMT_YUVA420P) -+ if (m_context->pix_fmt == AV_PIX_FMT_YUVA420P) - yuva420pToRgba(dst, src, width(), height()); - else -- convert(dst, PIX_FMT_RGB24, src, m_context->pix_fmt, width(), height()); -+ convert(dst, AV_PIX_FMT_RGB24, src, m_context->pix_fmt, width(), height()); - - // Wait 'delay' seconds before publishing the picture. - int i_delay = static_cast<int>(delay * 1000000 + 0.5); -@@ -345,7 +344,7 @@ void FFmpegDecoderVideo::publishFrame(co - - void FFmpegDecoderVideo::yuva420pToRgba(AVPicture * const dst, AVPicture * const src, int width, int height) - { -- convert(dst, PIX_FMT_RGB24, src, m_context->pix_fmt, width, height); -+ convert(dst, AV_PIX_FMT_RGB24, src, m_context->pix_fmt, width, height); - - const size_t bpp = 4; - -@@ -363,31 +362,28 @@ void FFmpegDecoderVideo::yuva420pToRgba( - } - } - -- -- --int FFmpegDecoderVideo::getBuffer(AVCodecContext * const context, AVFrame * const picture) -+int FFmpegDecoderVideo::getBuffer(AVCodecContext * const context, AVFrame * const picture, int flags) - { -+ AVBufferRef *ref; - const FFmpegDecoderVideo * const this_ = reinterpret_cast<const FFmpegDecoderVideo*>(context->opaque); - -- const int result = avcodec_default_get_buffer(context, picture); -+ const int result = avcodec_default_get_buffer2(context, picture, flags); - int64_t * p_pts = reinterpret_cast<int64_t*>( av_malloc(sizeof(int64_t)) ); - - *p_pts = this_->m_packet_pts; - picture->opaque = p_pts; - -+ ref = av_buffer_create((uint8_t *)picture->opaque, sizeof(int64_t), FFmpegDecoderVideo::freeBuffer, picture->buf[0], flags); -+ picture->buf[0] = ref; -+ - return result; - } - -- -- --void FFmpegDecoderVideo::releaseBuffer(AVCodecContext * const context, AVFrame * const picture) -+void FFmpegDecoderVideo::freeBuffer(void *opaque, uint8_t *data) - { -- if (picture != 0) -- av_freep(&picture->opaque); -- -- avcodec_default_release_buffer(context, picture); -+ AVBufferRef *ref = (AVBufferRef *)opaque; -+ av_buffer_unref(&ref); -+ av_free(data); - } - -- -- - } // namespace osgFFmpeg ---- a/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp -+++ b/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp -@@ -94,8 +94,8 @@ private: - int src_pix_fmt, int src_width, int src_height); - - -- static int getBuffer(AVCodecContext * context, AVFrame * picture); -- static void releaseBuffer(AVCodecContext * context, AVFrame * picture); -+ static int getBuffer(AVCodecContext * context, AVFrame * picture, int flags); -+ static void freeBuffer(void * opaque, uint8_t *data); - - PacketQueue & m_packets; - FFmpegClocks & m_clocks; ---- a/src/osgPlugins/ffmpeg/FFmpegParameters.cpp -+++ b/src/osgPlugins/ffmpeg/FFmpegParameters.cpp -@@ -19,7 +19,7 @@ extern "C" - #include <libavutil/pixdesc.h> - } - --inline PixelFormat osg_av_get_pix_fmt(const char *name) { return av_get_pix_fmt(name); } -+inline AVPixelFormat osg_av_get_pix_fmt(const char *name) { return av_get_pix_fmt(name); } - - - namespace osgFFmpeg { ---- a/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp 2016-02-18 21:25:39.627923629 +0000 -+++ b/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp 2016-02-18 21:26:17.071140100 +0000 -@@ -227,8 +227,7 @@ - if (avcodec_open2(m_context, p_codec, NULL) < 0) - throw std::runtime_error("avcodec_open() failed"); - -- m_context->get_buffer = avcodec_default_get_buffer; -- m_context->release_buffer = avcodec_default_release_buffer; -+ m_context->get_buffer2 = avcodec_default_get_buffer2; - - } - diff --git a/gnu/packages/patches/python-cairocffi-dlopen-path.patch b/gnu/packages/patches/python-cairocffi-dlopen-path.patch new file mode 100644 index 0000000000..e7a7fe3737 --- /dev/null +++ b/gnu/packages/patches/python-cairocffi-dlopen-path.patch @@ -0,0 +1,10 @@ +--- cairocffi-0.8.0/cairocffi/__init__.py.orig 2018-07-16 11:00:59.075664158 +0200 ++++ cairocffi-0.8.0/cairocffi/__init__.py 2018-07-16 17:09:42.471958015 +0200 +@@ -35,6 +35,7 @@ + return lib + except OSError: + pass ++ return ffi.dlopen(name) + raise OSError("dlopen() failed to load a library: %s" % ' / '.join(names)) + + diff --git a/gnu/packages/patches/qtoctave-qt-5.11-fix.patch b/gnu/packages/patches/qtoctave-qt-5.11-fix.patch new file mode 100644 index 0000000000..67317d1b36 --- /dev/null +++ b/gnu/packages/patches/qtoctave-qt-5.11-fix.patch @@ -0,0 +1,26 @@ +This patch comes from upstream: +https://hg.savannah.gnu.org/hgweb/octave/rev/cdaa884568b1. + +# HG changeset patch +# User Mike Miller <mtmiller@octave.org> +# Date 1527214835 25200 +# Node ID cdaa884568b159549bd373f04386ff62417f6df9 +# Parent 9e39a53b4e007d3f79f88b711ab9fa5f2f24fbc9 +add Qt include needed to build against Qt 5.11 (bug #53978) + +* settings-dialog.cc: Add missing include for <QButtonGroup> to fix build +failure with Qt 5.11. + +diff --git a/libgui/src/settings-dialog.cc b/libgui/src/settings-dialog.cc +--- a/libgui/src/settings-dialog.cc ++++ b/libgui/src/settings-dialog.cc +@@ -34,6 +34,8 @@ + #include "workspace-model.h" + #include "settings-dialog.h" + #include "ui-settings-dialog.h" ++ ++#include <QButtonGroup> + #include <QDir> + #include <QFileInfo> + #include <QFileDialog> + diff --git a/gnu/packages/patches/rust-bootstrap-stage0-test.patch b/gnu/packages/patches/rust-bootstrap-stage0-test.patch new file mode 100644 index 0000000000..e8484903e5 --- /dev/null +++ b/gnu/packages/patches/rust-bootstrap-stage0-test.patch @@ -0,0 +1,55 @@ +Bootstrap tests failed with local stage0 cargo and rustc +Backported changes from https://github.com/rust-lang/rust/pull/51977 + +From 0834d9d771e912f51deca6c25699e44734624546 Mon Sep 17 00:00:00 2001 +From: Nikolai Merinov <nikolai.merinov@member.fsf.org> +Date: Mon, 2 Jul 2018 01:45:35 +0500 +Subject: [PATCH] bootstrap: tests should use rustc from config.toml + +Tests should always use "rustc" and "cargo" from config.toml instead +of assuming that stage0 binaries was downloaded to build directory. +--- + src/bootstrap/bootstrap.py | 2 ++ + src/bootstrap/config.rs | 6 ++---- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py +index 487440becf..1701f7b83a 100644 +--- a/src/bootstrap/bootstrap.py ++++ b/src/bootstrap/bootstrap.py +@@ -788,6 +788,8 @@ def bootstrap(help_triggered): + env["BOOTSTRAP_PARENT_ID"] = str(os.getpid()) + env["BOOTSTRAP_PYTHON"] = sys.executable + env["BUILD_DIR"] = build.build_dir ++ env["CARGO"] = build.cargo() ++ env["RUSTC"] = build.rustc() + run(args, env=env, verbose=build.verbose) + + +diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs +index 6dd6291be2..d1a0deb583 100644 +--- a/src/bootstrap/config.rs ++++ b/src/bootstrap/config.rs +@@ -23,7 +23,6 @@ use std::cmp; + + use num_cpus; + use toml; +-use util::exe; + use cache::{INTERNER, Interned}; + use flags::Flags; + pub use flags::Subcommand; +@@ -362,9 +361,8 @@ impl Config { + config.src = Config::path_from_python("SRC"); + config.out = Config::path_from_python("BUILD_DIR"); + +- let stage0_root = config.out.join(&config.build).join("stage0/bin"); +- config.initial_rustc = stage0_root.join(exe("rustc", &config.build)); +- config.initial_cargo = stage0_root.join(exe("cargo", &config.build)); ++ config.initial_rustc = Config::path_from_python("RUSTC"); ++ config.initial_cargo = Config::path_from_python("CARGO"); + + config + } +-- +2.17.1 + diff --git a/gnu/packages/patches/rust-coresimd-doctest.patch b/gnu/packages/patches/rust-coresimd-doctest.patch new file mode 100644 index 0000000000..bfa0ab224b --- /dev/null +++ b/gnu/packages/patches/rust-coresimd-doctest.patch @@ -0,0 +1,21 @@ +Doctest coresimd::x86::__m256 failed on processors withouth "avx" feature. +Backported patch with changes from https://github.com/rust-lang-nursery/stdsimd/issues/481 + +--- rustc-1.26.2-src-orig/src/stdsimd/coresimd/x86/mod.rs 1970-01-01 05:00:00.000000000 +0500 ++++ rustc-1.26.2-src/src/stdsimd/coresimd/x86/mod.rs 2018-06-22 00:01:55.142026720 +0500 +@@ -293,13 +293,13 @@ + /// use std::arch::x86_64::*; + /// + /// # fn main() { +- /// # #[target_feature(enable = "sse")] ++ /// # #[target_feature(enable = "avx")] + /// # unsafe fn foo() { + /// let eight_zeros = _mm256_setzero_ps(); + /// let eight_ones = _mm256_set1_ps(1.0); + /// let eight_floats = _mm256_set_ps(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0); + /// # } +- /// # if is_x86_feature_detected!("sse") { unsafe { foo() } } ++ /// # if is_x86_feature_detected!("avx") { unsafe { foo() } } + /// # } + /// ``` + pub struct __m256(f32, f32, f32, f32, f32, f32, f32, f32); diff --git a/gnu/packages/patches/sddm-fix-build-with-qt-5.11-1024.patch b/gnu/packages/patches/sddm-fix-build-with-qt-5.11-1024.patch deleted file mode 100644 index 53c184230a..0000000000 --- a/gnu/packages/patches/sddm-fix-build-with-qt-5.11-1024.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2efc649..8903b52 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -93,7 +95,7 @@ - find_package(XKB REQUIRED) - - # Qt 5 --find_package(Qt5 5.6.0 CONFIG REQUIRED Core DBus Gui Qml Quick LinguistTools) -+find_package(Qt5 5.8.0 CONFIG REQUIRED Core DBus Gui Qml Quick LinguistTools Test) - - # find qt5 imports dir - get_target_property(QMAKE_EXECUTABLE Qt5::qmake LOCATION) -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index c9d935a..bb85ddd 100644 ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -2,9 +2,8 @@ - - include_directories(../src/common) - -- - set(ConfigurationTest_SRCS ConfigurationTest.cpp ../src/common/ConfigReader.cpp) - add_executable(ConfigurationTest ${ConfigurationTest_SRCS}) - add_test(NAME Configuration COMMAND ConfigurationTest) - --qt5_use_modules(ConfigurationTest Test) -+target_link_libraries(ConfigurationTest Qt5::Core Qt5::Test) diff --git a/gnu/packages/patches/syncthing-fix-crash.patch b/gnu/packages/patches/syncthing-fix-crash.patch new file mode 100644 index 0000000000..d27e543982 --- /dev/null +++ b/gnu/packages/patches/syncthing-fix-crash.patch @@ -0,0 +1,72 @@ +Avoid a crash: + +https://github.com/syncthing/syncthing/issues/5002 + +Patch copied from upstream source repository: + +https://github.com/syncthing/syncthing/commit/35a75a95dc6383b2d73ab645f1407f7907ec1a2c + +From 35a75a95dc6383b2d73ab645f1407f7907ec1a2c Mon Sep 17 00:00:00 2001 +From: Jakob Borg <jakob@kastelo.net> +Date: Wed, 13 Jun 2018 19:07:52 +0200 +Subject: [PATCH] lib/model: Don't panic when rechecking file (fixes #5002) + (#5003) + +--- + lib/model/model.go | 2 +- + lib/model/model_test.go | 26 ++++++++++++++++++++++++++ + 2 files changed, 27 insertions(+), 1 deletion(-) + +diff --git a/lib/model/model.go b/lib/model/model.go +index 5a9146e0..302f06c5 100644 +--- a/lib/model/model.go ++++ b/lib/model/model.go +@@ -1373,7 +1373,7 @@ func (m *Model) recheckFile(deviceID protocol.DeviceID, folderFs fs.Filesystem, + return + } + +- if blockIndex > len(cf.Blocks) { ++ if blockIndex >= len(cf.Blocks) { + l.Debugf("%v recheckFile: %s: %q / %q i=%d: block index too far", m, deviceID, folder, name, blockIndex) + return + } +diff --git a/lib/model/model_test.go b/lib/model/model_test.go +index 295eafc1..456bbc4a 100644 +--- a/lib/model/model_test.go ++++ b/lib/model/model_test.go +@@ -3608,6 +3608,32 @@ func TestIssue4903(t *testing.T) { + } + } + ++func TestIssue5002(t *testing.T) { ++ // recheckFile should not panic when given an index equal to the number of blocks ++ ++ db := db.OpenMemory() ++ m := NewModel(defaultCfgWrapper, protocol.LocalDeviceID, "syncthing", "dev", db, nil) ++ m.AddFolder(defaultFolderConfig) ++ m.StartFolder("default") ++ ++ m.ServeBackground() ++ defer m.Stop() ++ ++ if err := m.ScanFolder("default"); err != nil { ++ t.Error(err) ++ } ++ ++ file, ok := m.CurrentFolderFile("default", "foo") ++ if !ok { ++ t.Fatal("test file should exist") ++ } ++ nBlocks := len(file.Blocks) ++ ++ m.recheckFile(protocol.LocalDeviceID, defaultFolderConfig.Filesystem(), "default", "foo", nBlocks-1, []byte{1, 2, 3, 4}) ++ m.recheckFile(protocol.LocalDeviceID, defaultFolderConfig.Filesystem(), "default", "foo", nBlocks, []byte{1, 2, 3, 4}) // panic ++ m.recheckFile(protocol.LocalDeviceID, defaultFolderConfig.Filesystem(), "default", "foo", nBlocks+1, []byte{1, 2, 3, 4}) ++} ++ + func addFakeConn(m *Model, dev protocol.DeviceID) *fakeConnection { + fc := &fakeConnection{id: dev, model: m} + m.AddConnection(fc, protocol.HelloResult{}) +-- +2.18.0 + diff --git a/gnu/packages/patches/twinkle-include-qregexpvalidator.patch b/gnu/packages/patches/twinkle-include-qregexpvalidator.patch new file mode 100755 index 0000000000..4096cc8712 --- /dev/null +++ b/gnu/packages/patches/twinkle-include-qregexpvalidator.patch @@ -0,0 +1,123 @@ +Copied from upstream: + +https://github.com/LubosD/twinkle/commit/4b42755619011c117a76bdf98e417ebedc47e319 + +From 4b42755619011c117a76bdf98e417ebedc47e319 Mon Sep 17 00:00:00 2001 +From: Michal Kubecek <mkubecek@suse.cz> +Date: Wed, 6 Jun 2018 10:07:21 +0200 +Subject: [PATCH] Include <QRegExpValidator> explicitly + +Since Qt 5.11, generated ui_getprofilename.h no longer includes QHeaderView +which breaks the chain that included qvalidator.h in getprofilename.cpp. +As it feels rather fragile to rely on such indirect includes, let's include +<QRegExpValidator> explicitly in each file using QRegExpValidator class. +--- + src/gui/diamondcardprofileform.cpp | 1 + + src/gui/getprofilenameform.cpp | 2 +- + src/gui/inviteform.cpp | 1 + + src/gui/mphoneform.cpp | 1 + + src/gui/numberconversionform.cpp | 1 + + src/gui/syssettingsform.cpp | 1 + + src/gui/userprofileform.cpp | 1 + + src/gui/wizardform.cpp | 1 + + 8 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/src/gui/diamondcardprofileform.cpp b/src/gui/diamondcardprofileform.cpp +index 6656909..517180b 100644 +--- a/src/gui/diamondcardprofileform.cpp ++++ b/src/gui/diamondcardprofileform.cpp +@@ -21,6 +21,7 @@ + + #include <QRegExp> + #include <QValidator> ++#include <QRegExpValidator> + #include "gui.h" + #include "diamondcard.h" + #include "getprofilenameform.h" +diff --git a/src/gui/getprofilenameform.cpp b/src/gui/getprofilenameform.cpp +index 1319e1d..89c715e 100644 +--- a/src/gui/getprofilenameform.cpp ++++ b/src/gui/getprofilenameform.cpp +@@ -1,7 +1,7 @@ + #include "getprofilenameform.h" +- + #include <QDir> + #include <QMessageBox> ++#include <QRegExpValidator> + #include "user.h" + #include "protocol.h" + +diff --git a/src/gui/inviteform.cpp b/src/gui/inviteform.cpp +index 433fb22..2a5b68d 100644 +--- a/src/gui/inviteform.cpp ++++ b/src/gui/inviteform.cpp +@@ -7,6 +7,7 @@ + #include "sys_settings.h" + #include <QRegExp> + #include <QValidator> ++#include <QRegExpValidator> + + /* + Copyright (C) 2005-2009 Michel de Boer <michel@twinklephone.com> +diff --git a/src/gui/mphoneform.cpp b/src/gui/mphoneform.cpp +index 260fda7..c4e3c1d 100644 +--- a/src/gui/mphoneform.cpp ++++ b/src/gui/mphoneform.cpp +@@ -54,6 +54,7 @@ + #include <QRegExp> + #include <QValidator> + #include <QSettings> ++#include <QRegExpValidator> + #include "buddyform.h" + #include "diamondcardprofileform.h" + #include "osd.h" +diff --git a/src/gui/numberconversionform.cpp b/src/gui/numberconversionform.cpp +index f8ae64c..8481a9b 100644 +--- a/src/gui/numberconversionform.cpp ++++ b/src/gui/numberconversionform.cpp +@@ -1,5 +1,6 @@ + #include "numberconversionform.h" + ++#include <QRegExpValidator> + #include "gui.h" + + /* +diff --git a/src/gui/syssettingsform.cpp b/src/gui/syssettingsform.cpp +index 216af54..355df59 100644 +--- a/src/gui/syssettingsform.cpp ++++ b/src/gui/syssettingsform.cpp +@@ -28,6 +28,7 @@ + #include "twinkle_config.h" + #include <QRegExp> + #include <QValidator> ++#include <QRegExpValidator> + #include "syssettingsform.h" + /* + * Constructs a SysSettingsForm as a child of 'parent', with the +diff --git a/src/gui/userprofileform.cpp b/src/gui/userprofileform.cpp +index 28700a6..9ed9209 100644 +--- a/src/gui/userprofileform.cpp ++++ b/src/gui/userprofileform.cpp +@@ -31,6 +31,7 @@ + #include <QStringList> + #include "twinkle_config.h" + #include <QListWidget> ++#include <QRegExpValidator> + #include "numberconversionform.h" + #include "util.h" + #include "userprofileform.h" +diff --git a/src/gui/wizardform.cpp b/src/gui/wizardform.cpp +index 777aa12..f925875 100644 +--- a/src/gui/wizardform.cpp ++++ b/src/gui/wizardform.cpp +@@ -23,6 +23,7 @@ + #include <QTextStream> + #include "gui.h" + #include <QFile> ++#include <QRegExpValidator> + #include "wizardform.h" + + #define PROV_NONE QT_TRANSLATE_NOOP("WizardForm", "None (direct IP to IP calls)") +-- +2.17.0 + diff --git a/gnu/packages/patches/xapian-revert-5489fb2f8.patch b/gnu/packages/patches/xapian-revert-5489fb2f8.patch new file mode 100644 index 0000000000..7b78e2abb5 --- /dev/null +++ b/gnu/packages/patches/xapian-revert-5489fb2f8.patch @@ -0,0 +1,23 @@ +Revert this upstream commit which breaks a test case in "notmuch": + +https://git.xapian.org/?p=xapian;a=commitdiff;h=5489fb2f838c0f0b0a593b4c17df282a93a1fe5a + +See the notmuch FAQ entry: + +https://notmuchmail.org/faq/#index12h2 + +This should be fixed for later releases. + +diff --git a/backends/glass/glass_postlist.cc b/xapian-core/backends/glass/glass_postlist.cc +index 80e578b85..a47f14a68 100644 +--- a/backends/glass/glass_postlist.cc ++++ b/backends/glass/glass_postlist.cc +@@ -759,7 +759,7 @@ GlassPostList::open_nearby_postlist(const std::string & term_, + (void)need_pos; + if (term_.empty()) + RETURN(NULL); +- if (!this_db.get() || this_db->postlist_table.is_modified()) ++ if (!this_db.get() || this_db->postlist_table.is_writable()) + RETURN(NULL); + RETURN(new GlassPostList(this_db, term_, cursor->clone())); + } diff --git a/gnu/packages/patches/xf86-video-savage-xorg-compat.patch b/gnu/packages/patches/xf86-video-savage-xorg-compat.patch new file mode 100644 index 0000000000..9524032676 --- /dev/null +++ b/gnu/packages/patches/xf86-video-savage-xorg-compat.patch @@ -0,0 +1,33 @@ +Fix build against xorg-server >= 1.20. + +Patch taken from upstream: +https://cgit.freedesktop.org/xorg/driver/xf86-video-savage/commit/?id=0ece556daa8a88771b669d8104396abd9166d2d0 + +diff --git a/src/savage_driver.c b/src/savage_driver.c +index 58a294d..3cda923 100644 +--- a/src/savage_driver.c ++++ b/src/savage_driver.c +@@ -2034,8 +2034,6 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags) + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Detected current MCLK value of %1.3f MHz\n", + mclk / 1000.0); + +- pScrn->maxHValue = 2048 << 3; /* 11 bits of h_total 8-pixel units */ +- pScrn->maxVValue = 2048; /* 11 bits of v_total */ + pScrn->virtualX = pScrn->display->virtualX; + pScrn->virtualY = pScrn->display->virtualY; + +@@ -3637,6 +3635,14 @@ static ModeStatus SavageValidMode(SCRN_ARG_TYPE arg, DisplayModePtr pMode, + (pMode->VDisplay > psav->PanelY))) + return MODE_PANEL; + ++ /* 11 bits of h_total 8-pixel units */ ++ if (pMode->HTotal > (2048 << 3)) ++ return MODE_BAD_HVALUE; ++ ++ /* 11 bits of v_total */ ++ if (pMode->VTotal > 2048) ++ return MODE_BAD_VVALUE; ++ + if (psav->UseBIOS) { + refresh = SavageGetRefresh(pMode); + return (SavageMatchBiosMode(pScrn,pMode->HDisplay, diff --git a/gnu/packages/patches/xf86-video-sis-xorg-compat.patch b/gnu/packages/patches/xf86-video-sis-xorg-compat.patch new file mode 100644 index 0000000000..ebe9715d13 --- /dev/null +++ b/gnu/packages/patches/xf86-video-sis-xorg-compat.patch @@ -0,0 +1,18 @@ +Remove use of interface no longer provided by xorg-server. + +Patch taken from upstream: +https://cgit.freedesktop.org/xorg/driver/xf86-video-sis/commit/?id=4b1356a2b7fd06e9a05d134caa4033681c939737 + +diff --git a/src/sis_driver.c b/src/sis_driver.c +index 8f06164..513f68b 100644 +--- a/src/sis_driver.c ++++ b/src/sis_driver.c +@@ -2738,7 +2738,7 @@ SiSPrintModes(ScrnInfoPtr pScrn) + float hsync, refresh = 0.0; + char *desc, *desc2, *prefix, *uprefix, *output; + +- xf86DrvMsg(pScrn->scrnIndex, pScrn->virtualFrom, "Virtual size is %dx%d " ++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Virtual size is %dx%d " + "(pitch %d)\n", pScrn->virtualX, pScrn->virtualY, + pScrn->displayWidth); + diff --git a/gnu/packages/patches/xorg-server-rotate-fb.patch b/gnu/packages/patches/xorg-server-rotate-fb.patch new file mode 100644 index 0000000000..f47036b2a7 --- /dev/null +++ b/gnu/packages/patches/xorg-server-rotate-fb.patch @@ -0,0 +1,35 @@ +commit a85e94a50c94b07574c8701a3ff3c1243f4257f4 +Author: Olivier Fourdan <ofourdan@redhat.com> +Date: Fri Jun 15 08:57:12 2018 +0200 + + modesetting: use drmmode_bo_import() for rotate_fb + + drmmode_shadow_allocate() still uses drmModeAddFB() which may fail if + the format is not as expected, preventing from using a rotated output. + + Change it to use the new function drmmode_bo_import() which takes care + of calling the drmModeAddFB2() API. + + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106715 + Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> + Tested-by: Tomas Pelka <tpelka@redhat.com> + Reviewed-by: Lyude Paul <lyude@redhat.com> + +diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c +index 859a21a9d..ec11b3f56 100644 +--- a/hw/xfree86/drivers/modesetting/drmmode_display.c ++++ b/hw/xfree86/drivers/modesetting/drmmode_display.c +@@ -1794,11 +1794,8 @@ drmmode_shadow_allocate(xf86CrtcPtr crtc, int width, int height) + return NULL; + } + +- ret = drmModeAddFB(drmmode->fd, width, height, crtc->scrn->depth, +- drmmode->kbpp, +- drmmode_bo_get_pitch(&drmmode_crtc->rotate_bo), +- drmmode_bo_get_handle(&drmmode_crtc->rotate_bo), +- &drmmode_crtc->rotate_fb_id); ++ ret = drmmode_bo_import(drmmode, &drmmode_crtc->rotate_bo, ++ &drmmode_crtc->rotate_fb_id); + + if (ret) { + ErrorF("failed to add rotate fb\n"); diff --git a/gnu/packages/patches/zathura-pdf-mupdf-link-to-jpeg-libraries.patch b/gnu/packages/patches/zathura-pdf-mupdf-link-to-jpeg-libraries.patch new file mode 100644 index 0000000000..63e058bbef --- /dev/null +++ b/gnu/packages/patches/zathura-pdf-mupdf-link-to-jpeg-libraries.patch @@ -0,0 +1,55 @@ +From: Tobias Geerinckx-Rice <me@tobias.gr> +Date: Mon, 18 Jun 2018 02:37:41 +0200 +Subject: zathura-pdf-mupdf: Link to JPEG libraries. + +As of version 0.3.3, zathura-pdf-mupdf no longer links to some required +JPEG libraries, leading to such errors as: + + $ zathura foo.pdf + error: Could not load plugin '/gnu/store/...-profile/lib/zathura/libpdf-mupdf.so' (/gnu/store/...-profile/lib/zathura/libpdf-mupdf.so: undefined symbol: jpeg_resync_to_restart). + +The patch below, copied verbatim from Arch[0], fixes that. +Its description happens to match our reality, too. + +[0]: https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/zathura-pdf-mupdf +--- +From 3fb0ff750373d45d4f5172ce1d41b74183cd07e8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= <johannes@kyriasis.com> +Date: Sat, 24 Mar 2018 14:31:18 +0100 +Subject: [PATCH] Explicitly link against jbig2dec, openjp2, and jpeg +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Normally these are statically linked into libmupdfthird, but we delete +those to make mupdf use the system libraries. Previously +zathura-pdf-mupdf explicitly linked against them, but this is +technically incorrect since they are supposed to be in libmupdfthird so +that was removed. This commit essentially reverts that in the new build +system. + +Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> +--- + meson.build | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 3b0d7b7..ae2fc9c 100644 +--- a/meson.build ++++ b/meson.build +@@ -22,7 +22,11 @@ cairo = dependency('cairo') + mupdf = cc.find_library('mupdf') + mupdfthird = cc.find_library('mupdfthird') + +-build_dependencies = [zathura, girara, glib, cairo, mupdf, mupdfthird] ++jbig2dec = cc.find_library('jbig2dec') ++openjp2 = cc.find_library('openjp2') ++jpeg = cc.find_library('jpeg') ++ ++build_dependencies = [zathura, girara, glib, cairo, mupdf, mupdfthird, jbig2dec, openjp2, jpeg] + + # defines + defines = [ +-- +2.16.3 + diff --git a/gnu/packages/patches/zathura-plugindir-environment-variable.patch b/gnu/packages/patches/zathura-plugindir-environment-variable.patch index 2e3ea527d0..a8ffff965a 100644 --- a/gnu/packages/patches/zathura-plugindir-environment-variable.patch +++ b/gnu/packages/patches/zathura-plugindir-environment-variable.patch @@ -8,15 +8,15 @@ different file formats) called ZATHURA_PLUGIN_PATH. Command line option -p still takes precedence. Patch by Paul van der Walt <paul@denknerd.org> +Adjusted for Zathura 0.3.9 by Tobias Geerinckx-Rice <me@tobias.gr> --- zathura/zathura.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zathura/zathura.c b/zathura/zathura.c -index 589dd28..375ec54 100644 --- a/zathura/zathura.c +++ b/zathura/zathura.c -@@ -413,6 +413,13 @@ zathura_set_plugin_dir(zathura_t* zathura, const char* dir) +@@ -597,6 +597,13 @@ zathura_set_plugin_dir(zathura_t* zathura, const char* dir) g_return_if_fail(zathura != NULL); g_return_if_fail(zathura->plugins.manager != NULL); @@ -28,8 +28,5 @@ index 589dd28..375ec54 100644 + dir = g_getenv("ZATHURA_PLUGIN_PATH"); + if (dir != NULL) { - girara_list_t* paths = girara_split_path_array(dir); - GIRARA_LIST_FOREACH(paths, char*, iter, path) --- -2.3.1 - + set_plugin_dir(zathura, dir); + #ifdef ZATHURA_PLUGINDIR diff --git a/gnu/packages/patches/zstd-fix-stdin-list-test.patch b/gnu/packages/patches/zstd-fix-stdin-list-test.patch new file mode 100644 index 0000000000..a10355448c --- /dev/null +++ b/gnu/packages/patches/zstd-fix-stdin-list-test.patch @@ -0,0 +1,30 @@ +From 8e7bdc18d62632adcee029b2f8f5013d11549dd7 Mon Sep 17 00:00:00 2001 +From: "W. Felix Handte" <w@felixhandte.com> +Date: Fri, 29 Jun 2018 16:31:22 -0400 +Subject: [PATCH] Fix Tests of `--list` Behavior with `stdin` + +--- + tests/playTests.sh | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/tests/playTests.sh b/tests/playTests.sh +index 09a7377f2..aa5535d59 100755 +--- a/tests/playTests.sh ++++ b/tests/playTests.sh +@@ -731,8 +731,14 @@ $ECHO "\n===> zstd --list/-l error detection tests " + ! $ZSTD -lv tmp1* + ! $ZSTD --list -v tmp2 tmp12.zst + +-$ECHO "\n===> zstd --list/-l exits 1 when stdin is piped in" +-! echo "piped STDIN" | $ZSTD --list ++$ECHO "\n===> zstd --list/-l errors when presented with stdin / no files" ++! $ZSTD -l ++! $ZSTD -l - ++! $ZSTD -l < tmp1.zst ++! $ZSTD -l - < tmp1.zst ++! $ZSTD -l - tmp1.zst ++! $ZSTD -l - tmp1.zst < tmp1.zst ++$ZSTD -l tmp1.zst < tmp1.zst # but doesn't error just because stdin is not a tty + + $ECHO "\n===> zstd --list/-l test with null files " + ./datagen -g0 > tmp5 diff --git a/gnu/packages/patches/zstd-fix-stdin-list-without-tty.patch b/gnu/packages/patches/zstd-fix-stdin-list-without-tty.patch new file mode 100644 index 0000000000..47fa3e59a7 --- /dev/null +++ b/gnu/packages/patches/zstd-fix-stdin-list-without-tty.patch @@ -0,0 +1,67 @@ +From 712a9fd9721c314f4b0238577d803b012845f6d2 Mon Sep 17 00:00:00 2001 +From: "W. Felix Handte" <w@felixhandte.com> +Date: Fri, 29 Jun 2018 15:33:44 -0400 +Subject: [PATCH] Allow Invoking `zstd --list` When `stdin` is not a `tty` + +Also now returns an error when no inputs are given. + +New proposed behavior: + +``` +felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l; echo $? +No files given +1 +felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l Makefile.zst; echo $? +Frames Skips Compressed Uncompressed Ratio Check Filename + 1 0 3.08 KB 10.92 KB 3.544 XXH64 Makefile.zst +0 +felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l <Makefile.zst; echo $? +zstd: --list does not support reading from standard input +No files given +1 +felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l Makefile.zst <Makefile.zst; echo $? +Frames Skips Compressed Uncompressed Ratio Check Filename + 1 0 3.08 KB 10.92 KB 3.544 XXH64 Makefile.zst +0 +felix@odin:~/prog/zstd (list-stdin-check)$ +``` +--- + programs/fileio.c | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +diff --git a/programs/fileio.c b/programs/fileio.c +index 0175b3163..b4eed28d1 100644 +--- a/programs/fileio.c ++++ b/programs/fileio.c +@@ -2017,21 +2017,25 @@ static int FIO_listFile(fileInfo_t* total, const char* inFileName, int displayLe + } + + int FIO_listMultipleFiles(unsigned numFiles, const char** filenameTable, int displayLevel){ +- +- if (!IS_CONSOLE(stdin)) { +- DISPLAYOUT("zstd: --list does not support reading from standard input\n"); +- return 1; ++ unsigned u; ++ for (u=0; u<numFiles;u++) { ++ if (!strcmp (filenameTable[u], stdinmark)) { ++ DISPLAYOUT("zstd: --list does not support reading from standard input\n"); ++ return 1; ++ } + } + + if (numFiles == 0) { ++ if (!IS_CONSOLE(stdin)) { ++ DISPLAYOUT("zstd: --list does not support reading from standard input\n"); ++ } + DISPLAYOUT("No files given\n"); +- return 0; ++ return 1; + } + if (displayLevel <= 2) { + DISPLAYOUT("Frames Skips Compressed Uncompressed Ratio Check Filename\n"); + } + { int error = 0; +- unsigned u; + fileInfo_t total; + memset(&total, 0, sizeof(total)); + total.usesCheck = 1; |