[108795] trunk/dports/math/gnuplot
mojca at macports.org
mojca at macports.org
Thu Aug 1 18:09:41 PDT 2013
Revision: 108795
https://trac.macports.org/changeset/108795
Author: mojca at macports.org
Date: 2013-08-01 18:09:41 -0700 (Thu, 01 Aug 2013)
Log Message:
-----------
math/gnuplot: remove no_x11 & compatibility code, add demos (#38798), --with-wx-config needs path (not file), off-by-one patch
Modified Paths:
--------------
trunk/dports/math/gnuplot/Portfile
trunk/dports/math/gnuplot/files/patch-src-variable.c.diff
Added Paths:
-----------
trunk/dports/math/gnuplot/files/patch-upstream-offbyone.diff
Modified: trunk/dports/math/gnuplot/Portfile
===================================================================
--- trunk/dports/math/gnuplot/Portfile 2013-08-02 00:31:39 UTC (rev 108794)
+++ trunk/dports/math/gnuplot/Portfile 2013-08-02 01:09:41 UTC (rev 108795)
@@ -8,6 +8,7 @@
name gnuplot
version 4.6.3
+revision 1
categories math science
# the license has some inconvenient requirements that we're not meeting
# to be allowed to distribute binaries
@@ -51,7 +52,8 @@
port:zlib
patchfiles patch-src-variable.c.diff \
- patch-configure-aquaterm.diff
+ patch-configure-aquaterm.diff \
+ patch-upstream-offbyone.diff
minimum_xcodeversions {9 3.1}
@@ -81,18 +83,11 @@
configure.args-append --with-aquaterm=${frameworks_dir}
}
-variant x11 conflicts no_x11 {
+variant x11 {
configure.args-delete --without-x
configure.args-append --with-x
depends_lib-append port:xpm
}
-# remove this in August 2013
-variant no_x11 conflicts x11 description {Legacy compatibility variant} {}
-if {[variant_isset no_x11]} {
- default_variants -x11
-} else {
- default_variants +x11
-}
variant emacs description "An emacs mode for working with gnuplot" {
depends_build-append port:${emacs_binary_provider}
@@ -119,7 +114,7 @@
variant wxwidgets conflicts wxwidgets30 wxwidgets_devel description "Enable wxt terminal (wxWidgets 2.8, 32-bit only)" {
depends_lib-append port:wxWidgets path:lib/pkgconfig/pango.pc:pango
configure.args-delete --disable-wxwidgets
- configure.args-append --with-wx-config=${prefix}/bin/wx-config
+ configure.args-append --with-wx-config=${prefix}/bin
}
if {[variant_isset wxwidgets]} {
# wxWidgets is not universal and is 32-bit only
@@ -130,13 +125,13 @@
variant wxwidgets30 conflicts wxwidgets wxwidgets_devel description "Enable wxt terminal (using wxWidgets 2.9, supports 64-bit)" {
depends_lib-append port:wxWidgets30 path:lib/pkgconfig/pango.pc:pango
configure.args-delete --disable-wxwidgets
- configure.args-append --with-wx-config=${prefix}/bin/wx-config
+ configure.args-append --with-wx-config=${prefix}/bin
}
variant wxwidgets_devel conflicts wxwidgets wxwidgets30 description "Enable wxt terminal (using wxWidgets devel, supports 64-bit)" {
depends_lib-append port:wxWidgets-devel path:lib/pkgconfig/pango.pc:pango
configure.args-delete --disable-wxwidgets
- configure.args-append --with-wx-config=${prefix}/bin/wx-config
+ configure.args-append --with-wx-config=${prefix}/bin
}
variant qt description "Enable qt terminal" {
@@ -179,34 +174,15 @@
xinstall -m 0644 ${luadir}/gnuplot-lua-tikz.tex ${texmf}/tex/plain/gnuplot-lua-tikz
}
- xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
- xinstall -m 0644 ${distpath}/${name}.pdf \
- ${destroot}${prefix}/share/doc/${name}
-}
+ set destdocdir ${destroot}${prefix}/share/doc/${name}
+ xinstall -d -m 0755 ${destdocdir}
+ xinstall -m 0644 ${distpath}/${name}.pdf ${destdocdir}
-# this temporary workaround removes files that accidentally circumvented destroot
-# and were installed straight into ${prefix}/share/texmf/tex/latex/gnuplot
-#
-# it may be removed in August 2013; it is only a problem for those who installed
-# with +tutorial
-pre-activate {
- if [file exists ${prefix}/share/texmf/tex/latex/gnuplot/gnuplot.cfg] {
- delete ${prefix}/share/texmf/tex/latex/gnuplot/gnuplot.cfg
+ # copy demo files
+ file copy ${workpath}/${distname}/demo ${destdocdir}
+ foreach {makefile} {Makefile Makefile.in Makefile.am Makefile.am.in} {
+ delete ${destdocdir}/demo/${makefile}
}
- if [file exists ${prefix}/share/texmf/tex/latex/gnuplot/gnuplot-lua-tikz.sty] {
- delete ${prefix}/share/texmf/tex/latex/gnuplot/gnuplot-lua-tikz.sty
- }
-
- # only since 4.6.0
- if [file exists ${prefix}/share/texmf/tex/latex/gnuplot/gnuplot-lua-tikz.tex] {
- delete ${prefix}/share/texmf/tex/latex/gnuplot/gnuplot-lua-tikz.tex
- }
- if [file exists ${prefix}/share/texmf/tex/latex/gnuplot/gnuplot-lua-tikz-common.tex] {
- delete ${prefix}/share/texmf/tex/latex/gnuplot/gnuplot-lua-tikz-common.tex
- }
- if [file exists ${prefix}/share/texmf/tex/latex/gnuplot/t-gnuplot-lua-tikz.tex] {
- delete ${prefix}/share/texmf/tex/latex/gnuplot/t-gnuplot-lua-tikz.tex
- }
}
livecheck.url http://sourceforge.net/projects/gnuplot/files/
Modified: trunk/dports/math/gnuplot/files/patch-src-variable.c.diff
===================================================================
--- trunk/dports/math/gnuplot/files/patch-src-variable.c.diff 2013-08-02 00:31:39 UTC (rev 108794)
+++ trunk/dports/math/gnuplot/files/patch-src-variable.c.diff 2013-08-02 01:09:41 UTC (rev 108795)
@@ -1,6 +1,6 @@
--- src/variable.c.orig
+++ src/variable.c
-@@ -250,13 +250,13 @@
+@@ -250,7 +250,7 @@ static const struct path_table fontpath_tbl[] =
};
#endif
@@ -9,12 +9,3 @@
# define FONTPATHSET
static const struct path_table fontpath_tbl[] =
{
-- { "/System/Library/Fonts!" },
-- { "/Library/Fonts!" },
-- { "$(HOME)/Library/Fonts!" },
-+ { "/System/Library/Fonts" },
-+ { "/Library/Fonts" },
-+ { "$(HOME)/Library/Fonts" },
- { NULL }
- };
- #endif
Added: trunk/dports/math/gnuplot/files/patch-upstream-offbyone.diff
===================================================================
--- trunk/dports/math/gnuplot/files/patch-upstream-offbyone.diff (rev 0)
+++ trunk/dports/math/gnuplot/files/patch-upstream-offbyone.diff 2013-08-02 01:09:41 UTC (rev 108795)
@@ -0,0 +1,314 @@
+--- src/wxterminal/gp_cairo.c.orig
++++ src/wxterminal/gp_cairo.c
+@@ -1144,7 +1144,7 @@ void gp_cairo_add_shape( PangoRectangle rect,int position)
+
+ FPRINTF((stderr, "adding blank custom shape\n"));
+
+- strncat(gp_cairo_utf8, " ", sizeof(gp_cairo_utf8)-strlen(gp_cairo_utf8));
++ strncat(gp_cairo_utf8, " ", sizeof(gp_cairo_utf8)-strlen(gp_cairo_utf8)-1);
+ p_attr_shape = pango_attr_shape_new (&rect,&rect);
+ p_attr_shape->start_index = position;
+ p_attr_shape->end_index = position+1;
+@@ -1295,7 +1295,7 @@ void gp_cairo_enhanced_flush(plot_struct *plot)
+ }
+
+ if (gp_cairo_enhanced_showflag) {
+- strncat(gp_cairo_utf8, enhanced_text_utf8, sizeof(gp_cairo_utf8)-strlen(gp_cairo_utf8));
++ strncat(gp_cairo_utf8, enhanced_text_utf8, sizeof(gp_cairo_utf8)-strlen(gp_cairo_utf8)-1);
+ end = strlen(gp_cairo_utf8);
+
+ /* add text attributes to the main list */
+@@ -1376,7 +1376,7 @@ void gp_cairo_enhanced_flush(plot_struct *plot)
+
+ if (gp_cairo_enhanced_save) /* we aim at restoring position later */ {
+ save_start = strlen( gp_cairo_save_utf8);
+- strncat(gp_cairo_save_utf8, enhanced_text_utf8, sizeof(gp_cairo_utf8)-strlen(gp_cairo_utf8));
++ strncat(gp_cairo_save_utf8, enhanced_text_utf8, sizeof(gp_cairo_utf8)-strlen(gp_cairo_utf8)-1);
+ save_end = strlen( gp_cairo_save_utf8);
+
+ /* add text attributes to the save list */
+@@ -1387,7 +1387,7 @@ void gp_cairo_enhanced_flush(plot_struct *plot)
+ underprinted_start = strlen(gp_cairo_underprinted_utf8);
+ strncat(gp_cairo_underprinted_utf8,
+ enhanced_text_utf8,
+- sizeof(gp_cairo_underprinted_utf8)-strlen(gp_cairo_underprinted_utf8));
++ sizeof(gp_cairo_underprinted_utf8)-strlen(gp_cairo_underprinted_utf8)-1);
+ underprinted_end = strlen(gp_cairo_underprinted_utf8);
+
+ if (gp_cairo_enhanced_underprinted_AttrList)
+--- term/cairo.trm.orig
++++ term/cairo.trm
+@@ -523,7 +523,7 @@ TERM_PUBLIC void cairotrm_options()
+ /* Save options back into options string in normalized format */
+ if (cairo_params->transparent)
+ strncat(term_options, ISCAIROLATEX ? " nobackground" : " transparent",
+- sizeof(term_options) - strlen(term_options));
++ sizeof(term_options) - strlen(term_options) - 1);
+ else {
+ sprintf(tmp_term_options, " background \"#%02x%02x%02x\"",
+ (int)(255 * cairo_params->background.r),
+@@ -533,28 +533,28 @@ TERM_PUBLIC void cairotrm_options()
+ }
+
+ if (cairo_params->crop)
+- strncat(term_options, " crop", sizeof(term_options)-strlen(term_options));
++ strncat(term_options, " crop", sizeof(term_options)-strlen(term_options)-1);
+
+ if (set_enhanced)
+- strncat(term_options, " enhanced", sizeof(term_options)-strlen(term_options));
++ strncat(term_options, " enhanced", sizeof(term_options)-strlen(term_options)-1);
+
+ if (set_font) {
+ snprintf(tmp_term_options, sizeof(tmp_term_options), " font \"%s\"", font_setting);
+ free(font_setting);
+- strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options));
++ strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1);
+ }
+
+ /* if (set_fontscale) */
+ {
+ snprintf(tmp_term_options, sizeof(tmp_term_options), " fontscale %.1f", cairo_params->fontscale);
+- strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options));
++ strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1);
+ }
+
+ if (cairo_params->mono)
+- strncat(term_options, " monochrome", sizeof(term_options)-strlen(term_options));
++ strncat(term_options, " monochrome", sizeof(term_options)-strlen(term_options)-1);
+
+ if (cairo_params->dashed)
+- strncat(term_options, " dashed", sizeof(term_options)-strlen(term_options));
++ strncat(term_options, " dashed", sizeof(term_options)-strlen(term_options)-1);
+
+ if (1 || set_size) {
+ if (cairo_params->explicit_units == CM)
+@@ -572,22 +572,22 @@ TERM_PUBLIC void cairotrm_options()
+ sizeof(tmp_term_options),
+ " size %.2fin, %.2fin ",
+ cairo_params->width/72., cairo_params->height/72.);
+- strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options));
++ strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1);
+ }
+
+ if (set_capjoin) {
+ strncat(term_options, cairo_params->rounded ? " rounded" : " butt",
+- sizeof(term_options)-strlen(term_options));
++ sizeof(term_options)-strlen(term_options)-1);
+ }
+
+ if (cairo_params->lw != cairo_params_default->lw) {
+ snprintf(tmp_term_options,sizeof(tmp_term_options), " linewidth %g", cairo_params->lw);
+- strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options));
++ strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1);
+ }
+
+ if (cairo_params->dash_length != cairo_params_default->dash_length) {
+ snprintf(tmp_term_options,sizeof(tmp_term_options), " dashlength %g", cairo_params->dash_length);
+- strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options));
++ strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1);
+ }
+
+ /* sync settings with ps_params for latex terminal */
+--- term/context.trm.orig
++++ term/context.trm
+@@ -630,36 +630,42 @@ CONTEXT_options()
+ CONTEXT_params.header == NULL ? "noheader \\\n " : "\\\n header ");
+
+ if (CONTEXT_params.header != NULL) {
+- strncat(term_options,"\"", sizeof(term_options)-strlen(term_options));
+- strncat(term_options,CONTEXT_params.header, sizeof(term_options)-strlen(term_options));
+- strncat(term_options,"\" \\\n ", sizeof(term_options)-strlen(term_options));
++ strncat(term_options,"\"", sizeof(term_options)-strlen(term_options)-1);
++ strncat(term_options,CONTEXT_params.header, sizeof(term_options)-strlen(term_options)-1);
++ strncat(term_options,"\" \\\n ", sizeof(term_options)-strlen(term_options)-1);
+ }
+
+ strncat(term_options,
+ CONTEXT_params.color ? "color " : "monochrome ",
+- sizeof(term_options)-strlen(term_options));
++ sizeof(term_options)-strlen(term_options)-1);
+
+ switch (CONTEXT_params.linejoin) {
+ case LINEJOIN_MITER:
+ strncat(term_options, "mitered ",
+- sizeof(term_options)-strlen(term_options)); break;
++ sizeof(term_options)-strlen(term_options)-1);
++ break;
+ case LINEJOIN_ROUND:
+ strncat(term_options, "rounded ",
+- sizeof(term_options)-strlen(term_options)); break;
++ sizeof(term_options)-strlen(term_options)-1);
++ break;
+ case LINEJOIN_BEVEL:
+ strncat(term_options, "beveled ",
+- sizeof(term_options)-strlen(term_options)); break;
++ sizeof(term_options)-strlen(term_options)-1);
++ break;
+ }
+ switch (CONTEXT_params.linecap) {
+ case LINECAP_BUTT :
+ strncat(term_options, "butt",
+- sizeof(term_options)-strlen(term_options)); break;
++ sizeof(term_options)-strlen(term_options)-1);
++ break;
+ case LINECAP_ROUND :
+ strncat(term_options, "round",
+- sizeof(term_options)-strlen(term_options)); break;
++ sizeof(term_options)-strlen(term_options)-1);
++ break;
+ case LINECAP_SQUARE:
+ strncat(term_options, "squared",
+- sizeof(term_options)-strlen(term_options)); break;
++ sizeof(term_options)-strlen(term_options)-1);
++ break;
+ }
+
+ snprintf(tmp_term_options, sizeof(tmp_term_options),
+@@ -669,29 +675,33 @@ CONTEXT_options()
+ CONTEXT_params.scale_linewidth,
+ CONTEXT_params.scale_text
+ );
+- strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options));
++ strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1);
+
+ switch (CONTEXT_params.points) {
+ case CONTEXT_POINTS_WITH_TEX :
+ strncat(term_options, "texpoints ",
+- sizeof(term_options)-strlen(term_options)); break;
++ sizeof(term_options)-strlen(term_options)-1);
++ break;
+ case CONTEXT_POINTS_WITH_METAPOST :
+ strncat(term_options, "mppoints ",
+- sizeof(term_options)-strlen(term_options)); break;
++ sizeof(term_options)-strlen(term_options)-1);
++ break;
+ }
+ #ifdef WRITE_PNG_IMAGE
+ switch (CONTEXT_params.images) {
+ case CONTEXT_IMAGES_INLINE :
+ strncat(term_options, "inlineimages ",
+- sizeof(term_options)-strlen(term_options)); break;
++ sizeof(term_options)-strlen(term_options)-1);
++ break;
+ case CONTEXT_IMAGES_EXTERNAL :
+ strncat(term_options, "externalimages ",
+- sizeof(term_options)-strlen(term_options)); break;
++ sizeof(term_options)-strlen(term_options)-1);
++ break;
+ }
+ #endif
+ snprintf(tmp_term_options, sizeof(tmp_term_options), "font \"%s,%g\"",
+ CONTEXT_params.font, CONTEXT_params.fontsize);
+- strncat(term_options, tmp_term_options, sizeof(term_options) - strlen(term_options));
++ strncat(term_options, tmp_term_options, sizeof(term_options) - strlen(term_options)-1);
+ }
+
+ /* **************
+@@ -1374,7 +1384,8 @@ CONTEXT_set_font(const char *font)
+ CONTEXT_fontsize = CONTEXT_fontsize_explicit;
+
+ snprintf(tmp_fontstring, sizeof(tmp_fontstring), ",%gpt", CONTEXT_fontsize_explicit);
+- strncat(CONTEXT_font_explicit, tmp_fontstring, sizeof(CONTEXT_font_explicit) - strlen(CONTEXT_font_explicit));
++ strncat(CONTEXT_font_explicit, tmp_fontstring,
++ sizeof(CONTEXT_font_explicit) - strlen(CONTEXT_font_explicit)-1);
+ tmp_fontstring[MAX_ID_LEN] = NUL;
+
+ /* no fontsize has been provided: switch back to default terminal fontsize */
+@@ -1591,7 +1602,6 @@ CONTEXT_write_palette(t_sm_palette *palette)
+ /* grayscale only */
+ case SMPAL_COLOR_MODE_GRAY:
+ fprintf(gpoutfile, "color_mode(gray)");
+- // XXX: I'm not sure if something has to be done here or not
+ break;
+ /* one of several fixed transformations */
+ case SMPAL_COLOR_MODE_RGB:
+--- term/wxt.trm.orig
++++ term/wxt.trm
+@@ -315,71 +315,71 @@ TERM_PUBLIC void wxt_options()
+ "%d", wxt_window_number);
+
+ if (set_title) {
+- strncat(term_options, " title \"", sizeof(term_options)-strlen(term_options));
+- strncat(term_options, wxt_title, sizeof(term_options)-strlen(term_options));
+- strncat(term_options, "\"", sizeof(term_options)-strlen(term_options));
++ strncat(term_options, " title \"", sizeof(term_options)-strlen(term_options)-1);
++ strncat(term_options, wxt_title, sizeof(term_options)-strlen(term_options)-1);
++ strncat(term_options, "\"", sizeof(term_options)-strlen(term_options)-1);
+ wxt_update_title(wxt_window_number);
+ }
+
+ if (wxt_dashed)
+- strncat(term_options, " dashed", sizeof(term_options)-strlen(term_options));
++ strncat(term_options, " dashed", sizeof(term_options)-strlen(term_options)-1);
+
+ if (wxt_dashlength != 1.0) {
+ char tmp_term_options[MAX_LINE_LEN+1] = "";
+ snprintf(tmp_term_options,sizeof(tmp_term_options), " dashlength %g", wxt_dashlength);
+- strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options));
++ strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1);
+ }
+
+ if (wxt_background != 0xffffff) {
+ char tmp_term_options[MAX_LINE_LEN+1] = "";
+ snprintf(tmp_term_options,sizeof(tmp_term_options), " background '#%06x'", wxt_background);
+- strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options));
++ strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1);
+ }
+
+ if (set_size) {
+ char tmp_term_options[MAX_LINE_LEN+1] = "";
+ snprintf(tmp_term_options, sizeof(tmp_term_options),
+ " size %d, %d", wxt_width, wxt_height);
+- strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options));
++ strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1);
+ wxt_update_size(wxt_window_number);
+ }
+
+ if (set_enhanced)
+ strncat(term_options,
+ wxt_enhanced_enabled ? " enhanced" : " noenhanced",
+- sizeof(term_options)-strlen(term_options));
++ sizeof(term_options)-strlen(term_options)-1);
+
+ if (set_font) {
+- strncat(term_options, " font \"", sizeof(term_options)-strlen(term_options));
+- strncat(term_options, font_setting, sizeof(term_options)-strlen(term_options));
+- strncat(term_options, "\"", sizeof(term_options)-strlen(term_options));
++ strncat(term_options, " font \"", sizeof(term_options)-strlen(term_options)-1);
++ strncat(term_options, font_setting, sizeof(term_options)-strlen(term_options)-1);
++ strncat(term_options, "\"", sizeof(term_options)-strlen(term_options)-1);
+ free(font_setting);
+ }
+
+ if (wxt_set_fontscale != 1.0) {
+ char tmp_term_options[MAX_LINE_LEN+1] = "";
+ snprintf(tmp_term_options,sizeof(tmp_term_options), " fontscale %.1f", wxt_set_fontscale);
+- strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options));
++ strncat(term_options, tmp_term_options, sizeof(term_options)-strlen(term_options)-1);
+ }
+
+ if (set_capjoin)
+ strncat(term_options, wxt_rounded ? " rounded" : " butt",
+- sizeof(term_options)-strlen(term_options));
++ sizeof(term_options)-strlen(term_options)-1);
+
+ if (set_persist)
+ strncat(term_options,
+ (wxt_persist==yes) ? " persist" : " nopersist",
+- sizeof(term_options)-strlen(term_options));
++ sizeof(term_options)-strlen(term_options)-1);
+
+ if (set_raise)
+ strncat(term_options,
+ (wxt_raise==yes) ? " raise" : " noraise",
+- sizeof(term_options)-strlen(term_options));
++ sizeof(term_options)-strlen(term_options)-1);
+
+ if (set_ctrl)
+ strncat(term_options,
+ (wxt_ctrl==yes) ? " ctrl" : " noctrl",
+- sizeof(term_options)-strlen(term_options));
++ sizeof(term_options)-strlen(term_options)-1);
+
+ if (set_close)
+ wxt_close_terminal_window(wxt_window_number);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130801/ab2a1908/attachment.html>
More information about the macports-changes
mailing list