Ticket #41155: octave-next.diff
File octave-next.diff, 7.8 KB (added by michaelld (Michael Dickens), 11 years ago) |
---|
-
Portfile
7 7 8 8 name octave 9 9 10 version 3.6.4 11 revision 10 12 #conflicts octave-devel 10 if {${subport} eq ${name}} { 11 12 version 3.6.4 13 revision 10 14 conflicts octave-next octave-devel 15 master_sites gnu:octave 16 use_bzip2 yes 17 18 checksums \ 19 rmd160 b0356f0c5d9366b8129d72ac58bbde837fee1a95 \ 20 sha256 fa185df9591f5d740f4d37ff6eaf06db576fdd3e0ddd9d0737365799e5d1c962 21 22 # temporary patches; these are already, or will be, fixed upstream. 23 24 patchfiles-append \ 25 patch-liboctave-eigs-base.cc.diff \ 26 patch-liboctave-regexp.h.diff \ 27 patch-configure.diff 28 29 if {${os.major} >= 11} { 30 31 # 10.7 and newer requires an extra patch; this patch will 32 # break the build on 10.6 and prior. 33 34 patchfiles-append patch-src-display.cc.diff 35 36 } 37 38 livecheck.type regex 39 livecheck.url http://www.gnu.org/software/octave/download.html 40 livecheck.regex GNU Octave (\[\^\ \]*) was 41 42 } 43 44 subport octave-next { 45 46 # https://trac.macports.org/ticket/41155 47 48 version 3.8.0-rc1 49 conflicts octave-devel octave 50 master_sites ftp://alpha.gnu.org/gnu/octave/ 51 checksums rmd160 417a9da77f4003df2f6f495541a55270014d6e56 \ 52 sha256 96a23b25f38d518bee3f15d381a93c2ff94d2e0ed242934856f4e22e08981b8d 53 54 patchfiles-append patch-libgui_src_m-editor_file-editor-tab.cc.diff 55 56 depends_lib-append port:qscintilla 57 # port:gl2ps 58 59 configure.args-append --disable-java 60 61 variant jit description "Enable just-in-time compiler for loops via LLVM (EXPERIMENTAL)" { 62 63 # make sure compiler is macports-clang of some sort 64 65 compiler.blacklist-append *gcc* clang dragonegg* llvm* 66 67 configure.args-append --enable-jit 68 69 set llvm_version [strsed ${configure.compiler} "s@\[^0-9\]*@@"] 70 71 depends_lib-append port:llvm-${llvm_version} 72 73 configure.env-append \ 74 LLVM_CONFIG=${prefix}/bin/llvm-config-mp-${llvm_version} 75 76 } 77 } 78 13 79 categories math science 14 80 maintainers michaelld openmaintainer 15 81 license GPL-3 … … 26 92 homepage http://www.gnu.org/software/octave/ 27 93 dist_subdir octave 28 94 distname octave-${version} 29 master_sites gnu:octave30 use_bzip2 yes31 95 32 checksums \33 rmd160 b0356f0c5d9366b8129d72ac58bbde837fee1a95 \34 sha256 fa185df9591f5d740f4d37ff6eaf06db576fdd3e0ddd9d0737365799e5d1c96235 36 # temporary patches; these are already, or will be, fixed upstream.37 38 patchfiles-append \39 patch-liboctave-eigs-base.cc.diff \40 patch-liboctave-regexp.h.diff \41 patch-configure.diff42 43 if {${os.major} >= 11} {44 45 # 10.7 and newer requires an extra patch; this patch will46 # break the build on 10.6 and prior.47 48 patchfiles-append patch-src-display.cc.diff49 50 }51 52 96 depends_build-append \ 53 97 port:bison \ 54 98 port:flex \ … … 87 131 88 132 # common configure arguments 89 133 90 configure.args \134 configure.args-append \ 91 135 --disable-dependency-tracking \ 92 136 --with-umfpack="-lumfpack -lSuiteSparse" 93 137 … … 346 390 # https://trac.macports.org/ticket/41582 347 391 348 392 use_parallel_build no 349 350 livecheck.type regex351 livecheck.url http://www.gnu.org/software/octave/download.html352 livecheck.regex GNU Octave (\[\^\ \]*) was -
files/patch-libgui_src_m-editor_file-editor-tab.cc.diff
1 --- libgui/src/m-editor/file-editor-tab.cc.orig 2013-12-05 21:23:49.000000000 -0500 2 +++ libgui/src/m-editor/file-editor-tab.cc 2013-12-05 21:24:41.000000000 -0500 3 @@ -258,118 +258,7 @@ 4 void 5 file_editor_tab::update_lexer () 6 { 7 - if (_lexer_apis) 8 - _lexer_apis->cancelPreparation (); // stop preparing if apis exists 9 - 10 - QsciLexer *lexer = _edit_area->lexer (); 11 - delete lexer; 12 - lexer = 0; 13 - 14 - if (_file_name.endsWith (".m") 15 - || _file_name.endsWith ("octaverc")) 16 - { 17 -#if defined (HAVE_LEXER_OCTAVE) 18 - lexer = new QsciLexerOctave (); 19 -#elif defined (HAVE_LEXER_MATLAB) 20 - lexer = new QsciLexerMatlab (); 21 -#endif 22 - } 23 - 24 - if (! lexer) 25 - { 26 - if (_file_name.endsWith (".c") 27 - || _file_name.endsWith (".cc") 28 - || _file_name.endsWith (".cpp") 29 - || _file_name.endsWith (".cxx") 30 - || _file_name.endsWith (".c++") 31 - || _file_name.endsWith (".h") 32 - || _file_name.endsWith (".hh") 33 - || _file_name.endsWith (".hpp") 34 - || _file_name.endsWith (".h++")) 35 - { 36 - lexer = new QsciLexerCPP (); 37 - } 38 - else if (_file_name.endsWith (".pl")) 39 - { 40 - lexer = new QsciLexerPerl (); 41 - } 42 - else if (_file_name.endsWith (".bat")) 43 - { 44 - lexer = new QsciLexerBatch (); 45 - } 46 - else if (_file_name.endsWith (".diff")) 47 - { 48 - lexer = new QsciLexerDiff (); 49 - } 50 - else if (! valid_file_name ()) 51 - { 52 - // new, no yet named file: let us assume it is octave 53 -#if defined (HAVE_LEXER_OCTAVE) 54 - lexer = new QsciLexerOctave (); 55 -#elif defined (HAVE_LEXER_MATLAB) 56 - lexer = new QsciLexerMatlab (); 57 -#else 58 - lexer = new QsciLexerBash (); 59 -#endif 60 - } 61 - else 62 - { 63 - // other or no extension 64 - lexer = new QsciLexerBash (); 65 - } 66 - } 67 - 68 - _lexer_apis = new QsciAPIs(lexer); 69 - if (_lexer_apis) 70 - { 71 - // get path to prepared api info 72 - QDesktopServices desktopServices; 73 - QString prep_apis_path 74 - = desktopServices.storageLocation (QDesktopServices::HomeLocation) 75 - + "/.config/octave/" + QString(OCTAVE_VERSION) + "/qsci/"; 76 - _prep_apis_file = prep_apis_path + lexer->lexer () + ".pap"; 77 - 78 - if (!_lexer_apis->loadPrepared (_prep_apis_file)) 79 - { 80 - // no prepared info loaded, prepare and save if possible 81 - 82 - // create raw apis info 83 - QString keyword; 84 - QStringList keyword_list; 85 - int i,j; 86 - for (i=1; i<=3; i++) // test the first 5 keyword sets 87 - { 88 - keyword = QString(lexer->keywords (i)); // get list 89 - keyword_list = keyword.split (QRegExp ("\\s+")); // split 90 - for (j = 0; j < keyword_list.size (); j++) // add to API 91 - _lexer_apis->add (keyword_list.at (j)); 92 - } 93 - 94 - // dsiconnect slot for saving prepared info if already connected 95 - disconnect (_lexer_apis, SIGNAL (apiPreparationFinished ()), 0, 0); 96 - // check whether path for prepared info exists or can be created 97 - if (QDir("/").mkpath (prep_apis_path)) 98 - { 99 - // path exists, apis info can be saved there 100 - connect (_lexer_apis, SIGNAL (apiPreparationFinished ()), 101 - this, SLOT (save_apis_info ())); 102 - } 103 - _lexer_apis->prepare (); // prepare apis info 104 - } 105 - } 106 - 107 - QSettings *settings = resource_manager::get_settings (); 108 - if (settings) 109 - lexer->readSettings (*settings); 110 - 111 - _edit_area->setLexer (lexer); 112 - 113 - // fix line number width with respect to the font size of the lexer 114 - if (settings->value ("editor/showLineNumbers", true).toBool ()) 115 - auto_margin_width (); 116 - else 117 - _edit_area->setMarginWidth (2,0); 118 - 119 + _edit_area->setLexer (); 120 } 121 122 void