Ticket #38419: gnuplot4.6.2.patch

File gnuplot4.6.2.patch, 9.7 KB (added by mojca (Mojca Miklavec), 11 years ago)

update gnuplot to 4.6.2

  • Portfile

    diff --git a/Portfile b/Portfile
    index 098ce2b..22e1c1f 100644
     
    33
    44PortSystem                  1.0
    55PortGroup                   xcodeversion 1.0
     6PortGroup                   texlive 1.0
    67
    78name                        gnuplot
    8 version                     4.6.1
    9 revision        1
     9version                     4.6.2
    1010categories                  math science
    1111# the license has some inconvenient requirements that we're not meeting
    1212# to be allowed to distribute binaries
    dist_subdir ${name}/${version} 
    3232distfiles-append            ${name}.pdf
    3333extract.only                ${distname}.tar.gz
    3434checksums                   ${distname}.tar.gz \
    35                             rmd160  2b6fb6c1f1ce60f0bac2cb9b496c45b073ce6bb2 \
    36                             sha256  f4bf99907d0fea7db90b6e50147f1730b5bde2fbb93d9e58478b6b94409eebc6 \
     35                            rmd160  6cf82d01bf216e78217bef274f2372b8c61fd9b4 \
     36                            sha256  978b01bbd288c4c5f6d6572cae3aa8bc73b429629ef4400f71856bb5d2251818 \
    3737                            ${name}.pdf \
    38                             rmd160  0ddad32373efab2145fcd0e6e4d4c3e751d535bf \
    39                             sha256  05cec7b49c9b5435ca94f6b4e2f34b07365411a3610bca7eaf73fa9b5475b533
     38                            rmd160  b61df2e77dbc7d946bb2fe55a51544c994a8a7d4 \
     39                            sha256  57d36472896060f316351197b63e6c5337241ee28b99d033448deaf1adc5a3d0
    4040
    4141depends_lib                 port:expat \
    4242                            port:fontconfig \
    depends_lib port:expat \ 
    5151
    5252patchfiles                  patch-src-variable.c.diff \
    5353                            patch-docs-Makefile.in.diff \
    54                             patch-upstream-compilerwarnings.diff \
    5554                            patch-configure-aquaterm.diff
    5655
    5756minimum_xcodeversions       {9 3.1}
    configure.args --with-readline=${prefix} \ 
    6867                            --mandir='\${prefix}/share/man' \
    6968                            --without-lisp-files \
    7069                            --disable-wxwidgets \
     70                            --without-bitmap-terminals \
    7171                            --without-latex \
    7272                            --without-tutorial \
    7373                            --without-cairo \
    if {[variant_isset no_x11]} { 
    9595}
    9696
    9797variant emacs description "An emacs mode for working with gnuplot" {
    98     depends_build-append    path:bin/emacs:emacs
     98    # This would be nicer with an emacs PortGroup:
     99    # Use the port that provides Emacs.app (emacs-app[-devel])
     100    # or the usual emacs binary if the former doesn't exist
     101    set app_binary ${applications_dir}/Emacs.app/Contents/MacOS/Emacs
     102    set app_provider [registry_file_registered $app_binary]
     103    if {[file exists $app_binary] && $app_provider != 0} {
     104        depends_build-append port:${app_provider}
     105        configure.env-append EMACS=${app_binary}
     106    } else {
     107        depends_build-append path:bin/emacs:emacs
     108    }
    99109    configure.args-delete   --without-lisp-files
    100110    configure.args-append   --with-lisp-files --with-lispdir=${prefix}/share/emacs/site-lisp
    101111}
    variant qt description "Enable qt terminal" { 
    137147    configure.args-append   --enable-qt
    138148}
    139149
    140 variant tutorial description "Build the tutorial (requires a tex install)" {
    141     depends_lib-append      port:texlive-latex-extra
    142     configure.args-delete   --without-tutorial --without-latex
    143     configure.args-append   --with-tutorial
     150variant old_bitmap_terminals description "Enable PBM (Portable Bit Map) and other older bitmap terminals" {
     151    configure.args-delete   --without-bitmap-terminals
     152    configure.args-append   --with-bitmap-terminals
    144153}
    145154
    146155default_variants            +aquaterm +luaterm +pangocairo +x11
    147156
     157post-build {
     158    if {[variant_isset luaterm]} {
     159        system -W ${workpath}/${distname}/share/LaTeX "${prefix}/bin/lua ../../term/lua/gnuplot-tikz.lua style"
     160    }
     161}
     162
    148163post-destroot {
     164    if {[variant_isset luaterm]} {
     165        set texmf ${destroot}${texlive_texmfports}
     166        set luadir ${workpath}/${distname}/share/LaTeX
     167        xinstall -d -m 0755 ${texmf}/tex/context/third/gnuplot-lua-tikz
     168        xinstall -d -m 0755 ${texmf}/tex/generic/gnuplot-lua-tikz
     169        xinstall -d -m 0755 ${texmf}/tex/latex/gnuplot-lua-tikz
     170        xinstall -d -m 0755 ${texmf}/tex/plain/gnuplot-lua-tikz
     171
     172        xinstall -m 0644 ${luadir}/t-gnuplot-lua-tikz.tex      ${texmf}/tex/context/third/gnuplot-lua-tikz
     173        xinstall -m 0644 ${luadir}/gnuplot-lua-tikz-common.tex ${texmf}/tex/generic/gnuplot-lua-tikz
     174        xinstall -m 0644 ${luadir}/gnuplot-lua-tikz.sty        ${texmf}/tex/latex/gnuplot-lua-tikz
     175        xinstall -m 0644 ${luadir}/gnuplot-lua-tikz.tex        ${texmf}/tex/plain/gnuplot-lua-tikz
     176    }
     177
    149178    xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
    150179    xinstall -m 0644 ${distpath}/${name}.pdf \
    151         ${destroot}${prefix}/share/doc/${name}/
     180        ${destroot}${prefix}/share/doc/${name}
    152181}
    153182
    154183# this temporary workaround removes files that accidentally circumvented destroot
  • files/patch-configure-aquaterm.diff

    diff --git a/files/patch-configure-aquaterm.diff b/files/patch-configure-aquaterm.diff
    index ca692b7..bc55349 100644
     
    11--- config.hin.orig
    22+++ config.hin
    3 @@ -142,7 +142,7 @@
     3@@ -145,7 +145,7 @@
    44 /* Define to 1 if you have the `lgamma' function. */
    55 #undef HAVE_LGAMMA
    66 
     
    191191 
    192192 
    193193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BeOS" >&5
     194@@ -14252,9 +14336,9 @@ esac
     195 
     196 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
     197 # Files that config.status was made for.
     198-config_files="`echo $ac_config_files`"
     199-config_headers="`echo $ac_config_headers`"
     200-config_commands="`echo $ac_config_commands`"
     201+config_files="$ac_config_files"
     202+config_headers="$ac_config_headers"
     203+config_commands="$ac_config_commands"
     204 
     205 _ACEOF
     206 
    194207@@ -15496,7 +15580,7 @@ else
    195208 $as_echo "  next terminal: no" >&6; }
    196209 fi
  • deleted file files/patch-upstream-compilerwarnings.diff

    diff --git a/files/patch-upstream-compilerwarnings.diff b/files/patch-upstream-compilerwarnings.diff
    deleted file mode 100644
    index 3b5e952..0000000
    + -  
    1 --- src/color.c.orig
    2 +++ src/color.c
    3 @@ -517,7 +517,7 @@ cbtick_callback(
    4             if (axis_array[axis].manual_justify)
    5                 just = axis_array[axis].label.pos;
    6             write_multiline(x2+offsetx, y3+offsety, text,
    7 -                           just, CENTRE, hrotate,
    8 +                           just, JUST_CENTRE, hrotate,
    9                             axis_array[axis].ticdef.font);
    10             if (hrotate)
    11                 (*term->text_angle)(0);
    12 @@ -528,7 +528,7 @@ cbtick_callback(
    13             if (axis_array[axis].manual_justify)
    14                 just = axis_array[axis].label.pos;         
    15             write_multiline(x3+offsetx, y2+offsety, text,
    16 -                           just, CENTRE, 0.0,
    17 +                           just, JUST_CENTRE, 0.0,
    18                             axis_array[axis].ticdef.font);
    19         }
    20         term_apply_lp_properties(&border_lp);   /* border linetype */
    21 --- src/graphics.c.orig
    22 +++ src/graphics.c
    23 @@ -1720,7 +1720,7 @@ do_plot(struct curve_points *plots, int pcount)
    24         ignore_enhanced(axis_array[FIRST_X_AXIS].label.noenhanced);
    25         apply_pm3dcolor(&(axis_array[FIRST_X_AXIS].label.textcolor), t);
    26         write_multiline(x, y, axis_array[FIRST_X_AXIS].label.text,
    27 -                       JUST_CENTRE, JUST_TOP, 0,
    28 +                       CENTRE, JUST_TOP, 0,
    29                         axis_array[FIRST_X_AXIS].label.font);
    30         reset_textcolor(&(axis_array[FIRST_X_AXIS].label.textcolor), t);
    31         ignore_enhanced(FALSE);
    32 --- src/plot2d.c.orig
    33 +++ src/plot2d.c
    34 @@ -2127,7 +2127,7 @@ eval_plots()
    35  
    36                     if (this_plot->labels == NULL) {
    37                         this_plot->labels = new_text_label(-1);
    38 -                       this_plot->labels->pos = JUST_CENTRE;
    39 +                       this_plot->labels->pos = CENTRE;
    40                         this_plot->labels->layer = LAYER_PLOTLABELS;
    41                     }
    42                     parse_label_options(this_plot->labels);
    43 @@ -2316,7 +2316,7 @@ eval_plots()
    44             if (this_plot->plot_style == LABELPOINTS) {
    45                 if (this_plot->labels == NULL) {
    46                     this_plot->labels = new_text_label(-1);
    47 -                   this_plot->labels->pos = JUST_CENTRE;
    48 +                   this_plot->labels->pos = CENTRE;
    49                     this_plot->labels->layer = LAYER_PLOTLABELS;
    50                 }
    51                 this_plot->labels->place.scalex =
    52 --- src/plot3d.c.orig
    53 +++ src/plot3d.c
    54 @@ -1559,7 +1559,7 @@ eval_3dplots()
    55                     int stored_token = c_token;
    56                     if (this_plot->labels == NULL) {
    57                         this_plot->labels = new_text_label(-1);
    58 -                       this_plot->labels->pos = JUST_CENTRE;
    59 +                       this_plot->labels->pos = CENTRE;
    60                         this_plot->labels->layer = LAYER_PLOTLABELS;
    61                     }
    62                     parse_label_options(this_plot->labels);
    63 --- src/wxterminal/wxt_gui.cpp.orig
    64 +++ src/wxterminal/wxt_gui.cpp
    65 @@ -2692,6 +2692,7 @@ void wxtPanel::wxt_cairo_exec_command(gp_command command)
    66                 text_justification_mode = command.mode;
    67                 return;
    68         case command_put_text :
    69 +       case command_enhanced_put_text :
    70                 if (wxt_in_key_sample) {
    71                         int slen = strlen(command.string) * term->h_char * 0.75;
    72                         if (text_justification_mode == RIGHT) slen = -slen;
    73 --- term/lua.trm.orig
    74 +++ term/lua.trm
    75 @@ -872,7 +872,7 @@ LUA_init()
    76  {
    77    fseek(gpoutfile, 0, SEEK_SET);
    78    /* ignore compiler warnings here, because `gpoutfile' is already open */
    79 -  if (ftruncate(fileno(gpoutfile), 0));
    80 +  (void)ftruncate(fileno(gpoutfile), 0);
    81  
    82    /* reset image counter */
    83    image_cnt = 0;
    84 --- term/x11.trm.orig
    85 +++ term/x11.trm
    86 @@ -617,7 +617,11 @@ X11_options()
    87      /* Leave the current window unchanged when closing an old window */
    88      if (X11_ipc) {
    89         if (set_close) {
    90 -           fprintf(X11_ipc, (set_number ? "C%d\n" : "C\n"), new_term_number);
    91 +           if (set_number) {
    92 +               fprintf(X11_ipc, "C%d\n", new_term_number);
    93 +           } else {
    94 +               fputs("C\n", X11_ipc);
    95 +           }
    96             fflush(X11_ipc);
    97         } else if (set_number) {
    98  #ifdef EXTERNAL_X11_WINDOW