Ticket #36394: gnuplot-4.6.1.patch
File gnuplot-4.6.1.patch, 18.3 KB (added by mojca (Mojca Miklavec), 12 years ago) |
---|
-
Portfile
PortSystem 1.0 5 5 PortGroup xcodeversion 1.0 6 6 7 7 name gnuplot 8 version 4.6.0 9 revision 2 8 version 4.6.1 10 9 categories math science 11 10 # the license has some inconvenient requirements that we're not meeting 12 11 # to be allowed to distribute binaries … … dist_subdir ${name}/${version} 32 31 distfiles-append ${name}.pdf 33 32 extract.only ${distname}.tar.gz 34 33 checksums ${distname}.tar.gz \ 35 rmd160 2 c06500f45fb81850b45713a2cd0e38f0021b065\36 sha256 6e60adb5039a3541f407c2ade670004178b376754c424c13f0be24c7960c17be\34 rmd160 2b6fb6c1f1ce60f0bac2cb9b496c45b073ce6bb2 \ 35 sha256 f4bf99907d0fea7db90b6e50147f1730b5bde2fbb93d9e58478b6b94409eebc6 \ 37 36 ${name}.pdf \ 38 rmd160 374614145a7b78e263b0cfbb695eb22d07dede9a\39 sha256 57bd4d88e1321968ba06f29dfa322b4cd9e6beb4e0f42e1a4775d9c9a41af17037 rmd160 0ddad32373efab2145fcd0e6e4d4c3e751d535bf \ 38 sha256 05cec7b49c9b5435ca94f6b4e2f34b07365411a3610bca7eaf73fa9b5475b533 40 39 41 40 depends_lib port:expat \ 42 41 port:fontconfig \ … … depends_lib port:expat \ 50 49 port:zlib 51 50 52 51 patchfiles patch-src-variable.c.diff \ 52 patch-docs-Makefile.in.diff \ 53 53 patch-upstream-compilerwarnings.diff \ 54 patch-upstream-wxt-scroll.diff \55 patch-upstream-qt.diff \56 patch-configure-qt.diff \57 54 patch-configure-aquaterm.diff 58 55 59 # upstream patches:60 #61 # - patch-upstream-compilerwarnings.diff62 # 2012-03-18 17:30:42 Hans-Bernhard Broeker (cvs commit:broeker)63 # - patch-upstream-wxt-scroll.diff64 # 2012-02-29 19:29:25 Mojca Miklavec (cvs commit:sfeam)65 # - patch-upstream-qt.diff66 # 2012-04-01 08:49:45 Jérôme Lodewyck (cvs commit:lodewyck)67 68 56 minimum_xcodeversions {9 3.1} 69 57 70 58 configure.args --with-readline=${prefix} \ … … post-destroot { 165 153 # this temporary workaround removes files that accidentally circumvented destroot 166 154 # and were installed straight into ${prefix}/share/texmf/tex/latex/gnuplot 167 155 # 168 # it may be removed after a while; it is only a problem for those who installed156 # it may be removed in August 2013; it is only a problem for those who installed 169 157 # with +tutorial 170 158 pre-activate { 171 159 if [file exists ${prefix}/share/texmf/tex/latex/gnuplot/gnuplot.cfg] { -
files/patch-configure-aquaterm.diff
11 11 /* Define to 1 if you have the <libc.h> header file. */ 12 12 --- configure.orig 13 13 +++ configure 14 @@ -7 69,6 +769,7 @@ with_texdir14 @@ -787,6 +787,7 @@ with_texdir 15 15 with_kpsexpand 16 16 with_x 17 17 with_x_app_defaultdir … … 19 19 with_lasergnu 20 20 with_gihdir 21 21 with_linux_vga 22 @@ -1 482,6 +1483,7 @@ Optional Packages:22 @@ -1509,6 +1510,7 @@ Optional Packages: 23 23 --with-x use the X Window System 24 24 --with-x-app-defaultdir=DIR location of X11 application defaults 25 25 (default /etc/X11/app-defaults/) … … 27 27 --with-lasergnu install lasergnu printer script 28 28 --with-gihdir=DIR location of .gih help text file 29 29 (default PREFIX/share/PACKAGE/VERSION) 30 @@ - 7485,8 +7487,8 @@ fi30 @@ -8024,8 +8026,8 @@ fi 31 31 rm -f conftest* 32 32 33 33 … … 38 38 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 39 39 /* end confdefs.h. */ 40 40 #if defined(__APPLE__) && defined(__MACH__) 41 @@ -7498,13 +7500,96 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext 41 @@ -8035,15 +8037,98 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext 42 _ACEOF 43 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 42 44 $EGREP "yes" >/dev/null 2>&1; then : 43 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 45 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 46 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 44 47 $as_echo "yes" >&6; } 45 48 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for aqtInit in -laquaterm" >&5 46 49 -$as_echo_n "checking for aqtInit in -laquaterm... " >&6; } 47 -if test "${ac_cv_lib_aquaterm_aqtInit+set}" = set; then :50 -if ${ac_cv_lib_aquaterm_aqtInit+:} false; then : 48 51 + is_apple=yes 49 52 +else 50 53 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 … … 140 143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 141 144 /* end confdefs.h. */ 142 145 143 @@ - 7524,33 +7609,32 @@ return aqtInit ();146 @@ -8063,33 +8148,32 @@ return aqtInit (); 144 147 } 145 148 _ACEOF 146 149 if ac_fn_c_try_link "$LINENO"; then : … … 157 160 fi 158 161 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_aquaterm_aqtInit" >&5 159 162 -$as_echo "$ac_cv_lib_aquaterm_aqtInit" >&6; } 160 -if test "x$ac_cv_lib_aquaterm_aqtInit" = x ""yes; then :163 -if test "x$ac_cv_lib_aquaterm_aqtInit" = xyes; then : 161 164 - LIBS="-laquaterm $LIBS -framework Foundation" 162 165 - CFLAGS="$CFLAGS -ObjC" 163 166 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_framework_AquaTerm_aqtInit" >&5 … … 188 191 189 192 190 193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BeOS" >&5 191 @@ -1 4910,7 +14994,7 @@ else194 @@ -15496,7 +15580,7 @@ else 192 195 $as_echo " next terminal: no" >&6; } 193 196 fi 194 197 … … 199 202 else 200 203 --- configure.in.orig 201 204 +++ configure.in 202 @@ -13 66,7 +1366,7 @@ else205 @@ -1370,7 +1370,7 @@ else 203 206 AC_MSG_RESULT([ next terminal: no]) 204 207 fi 205 208 … … 356 359 357 360 #import <Foundation/NSAutoreleasePool.h> 358 361 #import <Foundation/NSArray.h> 359 @@ -356,7 +356,7 @@ AQUA_init()360 [adapter openPlotWithIndex:AQUA_plotRef];361 362 /* Check for support of version-dependent features */363 - AQUA_hasAlphaSupport = [AQTAdapter respondsToSelector:@selector(setColorRed:green:blue:alpha:)];364 + AQUA_hasAlphaSupport = [AQTAdapter instancesRespondToSelector:@selector(setColorRed:green:blue:alpha:)];365 366 /* set xmax, ymax*/367 term->xmax = AQUA_xSize; -
deleted file files/patch-configure-qt.diff
+ - 1 --- configure.orig2 +++ configure3 @@ -7828,7 +7828,7 @@ else4 char b[false == 0 ? 1 : -1];5 char c[__bool_true_false_are_defined == 1 ? 1 : -1];6 char d[(bool) 0.5 == true ? 1 : -1];7 - bool e = &s;8 + /* See body of main program for 'e'. */9 char f[(_Bool) 0.0 == false ? 1 : -1];10 char g[true];11 char h[sizeof (_Bool)];12 @@ -7839,25 +7839,6 @@ else13 _Bool n[m];14 char o[sizeof n == m * sizeof n[0] ? 1 : -1];15 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];16 -# if defined __xlc__ || defined __GNUC__17 - /* Catch a bug in IBM AIX xlc compiler version 6.0.0.018 - reported by James Lemley on 2005-10-05; see19 - http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html20 - This test is not quite right, since xlc is allowed to21 - reject this program, as the initializer for xlcbug is22 - not one of the forms that C requires support for.23 - However, doing the test right would require a runtime24 - test, and that would make cross-compilation harder.25 - Let us hope that IBM fixes the xlc bug, and also adds26 - support for this kind of constant expression. In the27 - meantime, this test will reject xlc, which is OK, since28 - our stdbool.h substitute should suffice. We also test29 - this with GCC, where it should work, to detect more30 - quickly whether someone messes up the test in the31 - future. */32 - char digs[] = "0123456789";33 - int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);34 -# endif35 /* Catch a bug in an HP-UX C compiler. See36 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html37 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html38 @@ -7869,6 +7850,7 @@ int39 main ()40 {41 42 + bool e = &s;43 *pq |= q;44 *pq |= ! q;45 /* Refer to every declared value, to avoid compiler optimizations. */46 @@ -13010,7 +12992,7 @@ fi47 CXXFLAGS="$CXXFLAGS $QT_CXXFLAGS"48 49 if test "$is_apple" = yes; then50 - CXXFLAGS="$CXXFLAGS -ObjC"51 + LIBS="$LIBS -framework Carbon"52 fi53 54 QT4LOC=`$PKG_CONFIG --variable=exec_prefix QtCore`55 --- configure.in.orig56 +++ configure.in57 @@ -1146,7 +1146,7 @@ if test "${enable_qt_ok}" = yes ; then58 59 dnl Compile Objective C Cocoa headers on Mac to hide the gnuplot icon from the dock60 if test "$is_apple" = yes; then61 - CXXFLAGS="$CXXFLAGS -ObjC"62 + LIBS="$LIBS -framework Carbon"63 fi64 65 QT4LOC=`$PKG_CONFIG --variable=exec_prefix QtCore`66 --- src/qtterminal/qt_term.cpp.orig67 +++ src/qtterminal/qt_term.cpp68 @@ -46,7 +46,7 @@69 #include <QtNetwork>70 71 #ifdef Q_WS_MAC72 - #include <Cocoa/Cocoa.h>73 + #include <Carbon/Carbon.h>74 #endif75 76 extern "C" {77 @@ -308,10 +308,15 @@ void qt_init()78 QApplication* application = new QApplication(argc, (char**)( NULL));79 80 #ifdef Q_WS_MAC81 - // Don't display this application in the MAC OS X dock82 - ProcessSerialNumber psn;83 - if (GetCurrentProcess(&psn) == noErr)84 - TransformProcessType(&psn, kProcessTransformToBackgroundApplication);85 + #ifdef __MAC_OS_X_VERSION_MIN_REQUIRED86 + #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 107087 + // Don't display this application in the MAC OS X dock88 + // kProcessTransformToBackgroundApplication only works on Mac OS X 10.7 and later89 + ProcessSerialNumber psn;90 + if (GetCurrentProcess(&psn) == noErr)91 + TransformProcessType(&psn, kProcessTransformToBackgroundApplication);92 + #endif93 + #endif94 #endif95 96 // The creation of a QApplication mangled our locale settings -
new file files/patch-docs-Makefile.in.diff
- + 1 --- docs/Makefile.in.orig 2 +++ docs/Makefile.in 3 @@ -396,8 +396,8 @@ gnuplot.info: $(srcdir)/gnuplot.texi 4 gnuplot.texi $(srcdir)/gnuplot-eldoc.el $(srcdir)/gnuplot-eldoc.elc: $(srcdir)/doc2texi.el $(srcdir)/gnuplot.doc 5 @echo "Creating texinfo and eldoc strings file" 6 @if test "$(EMACS)" != no; then \ 7 - @test "$(top_srcdir)" = "$(top_builddir)" || echo "COPYING GNUPLOT.DOC" ; \ 8 - @test "$(top_srcdir)" = "$(top_builddir)" || cp $(srcdir)/gnuplot.doc . ; \ 9 + test "$(top_srcdir)" = "$(top_builddir)" || echo "COPYING GNUPLOT.DOC" ; \ 10 + test "$(top_srcdir)" = "$(top_builddir)" || cp $(srcdir)/gnuplot.doc . ; \ 11 $(EMACS) -batch -l $(srcdir)/doc2texi.el -f d2t-doc-to-texi ; \ 12 echo "Compiling gnuplot-eldoc.el" ; \ 13 $(EMACS) -batch --eval='(byte-compile-file "gnuplot-eldoc.el")' ; \ -
files/patch-upstream-compilerwarnings.diff
1 1 --- src/color.c.orig 2 2 +++ src/color.c 3 @@ -51 5,7 +515,7 @@ cbtick_callback(3 @@ -517,7 +517,7 @@ cbtick_callback( 4 4 if (axis_array[axis].manual_justify) 5 5 just = axis_array[axis].label.pos; 6 6 write_multiline(x2+offsetx, y3+offsety, text, … … 9 9 axis_array[axis].ticdef.font); 10 10 if (hrotate) 11 11 (*term->text_angle)(0); 12 @@ -52 6,7 +526,7 @@ cbtick_callback(12 @@ -528,7 +528,7 @@ cbtick_callback( 13 13 if (axis_array[axis].manual_justify) 14 14 just = axis_array[axis].label.pos; 15 15 write_multiline(x3+offsetx, y2+offsety, text, … … 18 18 axis_array[axis].ticdef.font); 19 19 } 20 20 term_apply_lp_properties(&border_lp); /* border linetype */ 21 --- src/gplt_x11.c.orig22 +++ src/gplt_x11.c23 @@ -2897,22 +2897,22 @@ exec_cmd(plot_struct *plot, char *command)24 25 case PseudoColor:26 fprintf(stderr, ERROR_NOTICE("PseudoColor"));27 - fprintf(stderr, display_error_text_after);28 + fprintf(stderr, "%s", display_error_text_after);29 break;30 31 case GrayScale:32 fprintf(stderr, ERROR_NOTICE("GrayScale"));33 - fprintf(stderr, display_error_text_after);34 + fprintf(stderr, "%s", display_error_text_after);35 break;36 37 case StaticColor:38 fprintf(stderr, ERROR_NOTICE("StaticColor"));39 - fprintf(stderr, display_error_text_after);40 + fprintf(stderr, "%s", display_error_text_after);41 break;42 43 case StaticGray:44 fprintf(stderr, ERROR_NOTICE("StaticGray"));45 - fprintf(stderr, display_error_text_after);46 + fprintf(stderr, "%s", display_error_text_after);47 break;48 49 case DirectColor:50 21 --- src/graphics.c.orig 51 22 +++ src/graphics.c 52 @@ -17 34,7 +1734,7 @@ do_plot(struct curve_points *plots, int pcount)23 @@ -1720,7 +1720,7 @@ do_plot(struct curve_points *plots, int pcount) 53 24 ignore_enhanced(axis_array[FIRST_X_AXIS].label.noenhanced); 54 25 apply_pm3dcolor(&(axis_array[FIRST_X_AXIS].label.textcolor), t); 55 26 write_multiline(x, y, axis_array[FIRST_X_AXIS].label.text, … … 60 31 ignore_enhanced(FALSE); 61 32 --- src/plot2d.c.orig 62 33 +++ src/plot2d.c 63 @@ -212 0,7 +2120,7 @@ eval_plots()34 @@ -2127,7 +2127,7 @@ eval_plots() 64 35 65 36 if (this_plot->labels == NULL) { 66 37 this_plot->labels = new_text_label(-1); … … 69 40 this_plot->labels->layer = LAYER_PLOTLABELS; 70 41 } 71 42 parse_label_options(this_plot->labels); 72 @@ -23 09,7 +2309,7 @@ eval_plots()43 @@ -2316,7 +2316,7 @@ eval_plots() 73 44 if (this_plot->plot_style == LABELPOINTS) { 74 45 if (this_plot->labels == NULL) { 75 46 this_plot->labels = new_text_label(-1); … … 80 51 this_plot->labels->place.scalex = 81 52 --- src/plot3d.c.orig 82 53 +++ src/plot3d.c 83 @@ -155 5,7 +1555,7 @@ eval_3dplots()54 @@ -1559,7 +1559,7 @@ eval_3dplots() 84 55 int stored_token = c_token; 85 56 if (this_plot->labels == NULL) { 86 57 this_plot->labels = new_text_label(-1); … … 89 60 this_plot->labels->layer = LAYER_PLOTLABELS; 90 61 } 91 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 -
deleted file files/patch-upstream-qt.diff
+ - 1 --- src/qtterminal/QtGnuplotScene.cpp.orig2 +++ src/qtterminal/QtGnuplotScene.cpp3 @@ -56,7 +56,7 @@ QtGnuplotScene::QtGnuplotScene(QtGnuplotEventHandler* eventHandler, QObject* par4 m_eventHandler = eventHandler;5 m_lastModifierMask = 0;6 m_textAngle = 0.;7 - m_textAlignment == Qt::AlignLeft;8 + m_textAlignment = Qt::AlignLeft;9 m_currentZ = 1.;10 m_currentPointSize = 1.;11 m_enhanced = 0;12 --- src/qtterminal/QtGnuplotWidget.cpp.orig13 +++ src/qtterminal/QtGnuplotWidget.cpp14 @@ -169,6 +169,15 @@ void QtGnuplotWidget::resizeEvent(QResizeEvent* event)15 QWidget::resizeEvent(event);16 }17 18 +QPainter::RenderHints QtGnuplotWidget::renderHints() const19 +{20 + QPainter::RenderHints hint = QPainter::TextAntialiasing;21 + if (m_antialias)22 + hint |= QPainter::Antialiasing;23 +24 + return hint;25 +}26 +27 /////////////////////////////////////////////////28 // Slots29 30 @@ -178,7 +187,7 @@ QPixmap QtGnuplotWidget::createPixmap()31 pixmap.fill();32 QPainter painter(&pixmap);33 painter.translate(0.5, 0.5);34 - painter.setRenderHint(m_antialias ? QPainter::Antialiasing : QPainter::TextAntialiasing);35 + painter.setRenderHints(renderHints());36 m_scene->render(&painter);37 painter.end();38 return pixmap;39 @@ -195,7 +204,7 @@ void QtGnuplotWidget::print()40 if (QPrintDialog(&printer).exec() == QDialog::Accepted)41 {42 QPainter painter(&printer);43 - painter.setRenderHint(m_antialias ? QPainter::Antialiasing : QPainter::TextAntialiasing);44 + painter.setRenderHints(renderHints());45 m_scene->render(&painter);46 }47 }48 @@ -211,8 +220,10 @@ void QtGnuplotWidget::exportToPdf()49 QPrinter printer;50 printer.setOutputFormat(QPrinter::PdfFormat);51 printer.setOutputFileName(fileName);52 + printer.setPaperSize(QSizeF(m_scene->width(), m_scene->height()), QPrinter::Point);53 + printer.setPageMargins(0, 0, 0, 0, QPrinter::Point);54 QPainter painter(&printer);55 - painter.setRenderHint(m_antialias ? QPainter::Antialiasing : QPainter::TextAntialiasing);56 + painter.setRenderHints(renderHints());57 m_scene->render(&painter);58 }59 60 @@ -266,7 +277,7 @@ void QtGnuplotWidget::loadSettings()61 62 void QtGnuplotWidget::applySettings()63 {64 - m_view->setRenderHints(m_antialias ? QPainter::Antialiasing : QPainter::TextAntialiasing);65 + m_view->setRenderHints(renderHints());66 m_view->setBackgroundBrush(m_backgroundColor);67 }68 69 --- src/qtterminal/QtGnuplotWidget.h.orig70 +++ src/qtterminal/QtGnuplotWidget.h71 @@ -47,6 +47,7 @@72 #include "QtGnuplotEvent.h"73 74 #include <QWidget>75 +#include <QPainter>76 77 class QtGnuplotScene;78 class QGraphicsView;79 @@ -93,6 +94,7 @@ private:80 void loadSettings();81 void applySettings();82 void saveSettings();83 + QPainter::RenderHints renderHints() const;84 85 private:86 int m_id; -
deleted file files/patch-upstream-wxt-scroll.diff
+ - 1 --- src/wxterminal/wxt_gui.cpp.orig2 +++ src/wxterminal/wxt_gui.cpp3 @@ -1003,11 +1003,16 @@ void wxtPanel::OnRightUp( wxMouseEvent& event )4 /* mouse wheel event */5 void wxtPanel::OnMouseWheel( wxMouseEvent& event )6 {7 - UpdateModifiers(event);8 + int mouse_button;9 10 - wxt_exec_event(GE_buttonpress, 0, 0,11 - event.GetWheelRotation() > 0 ? 4 : 5,12 - 0, this->GetId());13 + UpdateModifiers(event);14 + mouse_button = (event.GetWheelRotation() > 0 ? 4 : 5);15 +#if wxCHECK_VERSION(2, 9, 0)16 + /* GetWheelAxis: 0 is the Y axis, 1 is the X axis. */17 + if (event.GetWheelAxis() > 0)18 + mouse_button += 2;19 +#endif20 + wxt_exec_event(GE_buttonpress, 0, 0, mouse_button, 0, this->GetId());21 }22 23 /* the state of the modifiers is checked each time a key is pressed instead of