summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authort-karatsu <49965247+t-karatsu@users.noreply.github.com>2019-08-07 03:07:27 +0900
committerGreg Becker <becker33@llnl.gov>2019-08-06 11:07:27 -0700
commitd488d04ed3c0de43e56947d0d3b8a66e0033f5fd (patch)
tree58f845ecc2d4e2ed0ca544b40b49a2ebedf3fef8 /var
parentae975c48ac39b9c12248278489cebf9b126bc53a (diff)
downloadspack-d488d04ed3c0de43e56947d0d3b8a66e0033f5fd.tar.gz
spack-d488d04ed3c0de43e56947d0d3b8a66e0033f5fd.tar.bz2
spack-d488d04ed3c0de43e56947d0d3b8a66e0033f5fd.tar.xz
spack-d488d04ed3c0de43e56947d0d3b8a66e0033f5fd.zip
fltk: fix about variable types (#12292)
* fltk: fix about variable types
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/fltk/fix_compare_val.patch11
-rw-r--r--var/spack/repos/builtin/packages/fltk/package.py8
-rw-r--r--var/spack/repos/builtin/packages/fltk/type_cast.patch17
3 files changed, 36 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/fltk/fix_compare_val.patch b/var/spack/repos/builtin/packages/fltk/fix_compare_val.patch
new file mode 100644
index 0000000000..0e4795914c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fltk/fix_compare_val.patch
@@ -0,0 +1,11 @@
+--- fltk-1.3.3/src/Fl_Tree_Item.cxx 2014-09-05 11:59:00.000000000 +0900
++++ fltk-1.3.3/src/Fl_Tree_Item_b.cxx 2019-08-05 19:10:28.620960943 +0900
+@@ -549,7 +549,7 @@
+ } else { // different parent?
+ if ( to > to_parent->children() ) // try to prevent a reparent() error
+ return -4;
+- if ( from_parent->deparent(from) < 0 ) // deparent self from current parent
++ if ( from_parent->deparent(from) == NULL ) // deparent self from current parent
+ return -5;
+ if ( to_parent->reparent(this, to) < 0 ) { // reparent self to new parent at position 'to'
+ to_parent->reparent(this, 0); // failed? shouldn't happen, reparent at 0
diff --git a/var/spack/repos/builtin/packages/fltk/package.py b/var/spack/repos/builtin/packages/fltk/package.py
index 71f0d88c30..dd101a4709 100644
--- a/var/spack/repos/builtin/packages/fltk/package.py
+++ b/var/spack/repos/builtin/packages/fltk/package.py
@@ -27,6 +27,14 @@ class Fltk(Package):
patch('font.patch', when='@1.3.3')
+ # https://github.com/fltk/fltk/commits/master/src/Fl_Tree_Item.cxx
+ # -Fix return value test, as pointed out by Albrecht.
+ patch('fix_compare_val.patch', when='@:1.3.3')
+ # https://github.com/fltk/fltk/commits/master/test/menubar.cxx
+ # -Allow compilation with -std=c++11
+ # -Add missing cast (part of patch for STR #2813).
+ patch('type_cast.patch', when='@:1.3.3')
+
variant('shared', default=True,
description='Enables the build of shared libraries')
diff --git a/var/spack/repos/builtin/packages/fltk/type_cast.patch b/var/spack/repos/builtin/packages/fltk/type_cast.patch
new file mode 100644
index 0000000000..4957419590
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fltk/type_cast.patch
@@ -0,0 +1,17 @@
+--- fltk-1.3.3/test/menubar.cxx 2012-02-18 17:29:30.000000000 +0900
++++ fltk-1.3.3/test/menubar_b.cxx 2019-08-06 14:16:55.733089438 +0900
+@@ -127,10 +127,10 @@
+ {"Italic", 0, 0, 0, 0, 0, FL_ITALIC, 14},
+ {"BoldItalic",0,0,0, 0, 0, FL_BOLD+FL_ITALIC, 14},
+ {"Small", 0, 0, 0, 0, 0, FL_BOLD+FL_ITALIC, 10},
+- {"Emboss", 0, 0, 0, 0, FL_EMBOSSED_LABEL},
+- {"Engrave", 0, 0, 0, 0, FL_ENGRAVED_LABEL},
+- {"Shadow", 0, 0, 0, 0, FL_SHADOW_LABEL},
+- {"@->", 0, 0, 0, 0, FL_SYMBOL_LABEL},
++ {"Emboss", 0, 0, 0, 0, (uchar)FL_EMBOSSED_LABEL},
++ {"Engrave", 0, 0, 0, 0, (uchar)FL_ENGRAVED_LABEL},
++ {"Shadow", 0, 0, 0, 0, (uchar)FL_SHADOW_LABEL},
++ {"@->", 0, 0, 0, 0, (uchar)FL_SYMBOL_LABEL},
+ {0},
+ {"&International",0,0,0,FL_SUBMENU},
+ {"Sharp Ess",0x0000df},