From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- sci-biology/treeviewx/Manifest | 13 ++++ .../files/treeviewx-0.5.1-70_choose_tree.patch | 12 ++++ .../files/treeviewx-0.5.1-fix_loading_crash.patch | 40 +++++++++++ .../treeviewx/files/treeviewx-0.5.1-gcc4.3.patch | 77 +++++++++++++++++++++ .../treeviewx/files/treeviewx-0.5.1-svg.patch | 30 +++++++++ .../treeviewx-0.5.1-treeview-xpm-not-xbm.patch | 16 +++++ .../treeviewx/files/treeviewx-0.5.1-wx30.patch | 78 ++++++++++++++++++++++ .../files/treeviewx-0.5.1-wxstring-maxlen.patch | 34 ++++++++++ sci-biology/treeviewx/files/treeviewx-wxt.patch | 50 ++++++++++++++ sci-biology/treeviewx/metadata.xml | 14 ++++ sci-biology/treeviewx/treeviewx-0.5.1-r3.ebuild | 39 +++++++++++ 11 files changed, 403 insertions(+) create mode 100644 sci-biology/treeviewx/Manifest create mode 100644 sci-biology/treeviewx/files/treeviewx-0.5.1-70_choose_tree.patch create mode 100644 sci-biology/treeviewx/files/treeviewx-0.5.1-fix_loading_crash.patch create mode 100644 sci-biology/treeviewx/files/treeviewx-0.5.1-gcc4.3.patch create mode 100644 sci-biology/treeviewx/files/treeviewx-0.5.1-svg.patch create mode 100644 sci-biology/treeviewx/files/treeviewx-0.5.1-treeview-xpm-not-xbm.patch create mode 100644 sci-biology/treeviewx/files/treeviewx-0.5.1-wx30.patch create mode 100644 sci-biology/treeviewx/files/treeviewx-0.5.1-wxstring-maxlen.patch create mode 100644 sci-biology/treeviewx/files/treeviewx-wxt.patch create mode 100644 sci-biology/treeviewx/metadata.xml create mode 100644 sci-biology/treeviewx/treeviewx-0.5.1-r3.ebuild (limited to 'sci-biology/treeviewx') diff --git a/sci-biology/treeviewx/Manifest b/sci-biology/treeviewx/Manifest new file mode 100644 index 000000000000..815385d878f2 --- /dev/null +++ b/sci-biology/treeviewx/Manifest @@ -0,0 +1,13 @@ +AUX treeviewx-0.5.1-70_choose_tree.patch 439 SHA256 99733776abfb7fe3db2ac3dcca5051e8f11f216442206cd7f49d4b7e910a584e SHA512 efe6e903929264359388f88288a95ea28d98efe1eb3dca6248801afa0ab44ee7afdf456f271d088f7b3231b1b9db58c5fde7b147c4ca76b5761d77a1139762bc WHIRLPOOL 9cbec22bfd967592808116ea374f7fac42089be17a56307c83e7b5076a9fa90caf1269a2c3356b8176064a50971dfdd61d0620028a16f3d1dcee5b48c0d6c12d +AUX treeviewx-0.5.1-fix_loading_crash.patch 951 SHA256 13cbf0f6f660fdd54a332aaa13c7ae0f4ee333a8288d98f52ce1a49cf91b2596 SHA512 9c205520dce7851520b24532f88348906c4d5a7f0fe392348099ee9f7377b778792170620856d533a275251a024756482bbd4b83d1da8281b84c39cdf2b3a711 WHIRLPOOL 4b2cd57d9c8f2b88f8075a04e5046865f5bd5a905d5d7c87d6f66dd10efd098926e69af33beea2071129c0fa233dc7477e84aded876beea44e1e7ca798190780 +AUX treeviewx-0.5.1-gcc4.3.patch 2601 SHA256 e2f0a1f1b3c53b61f61e6f8b6d820f37350573ca8ab35866f4cbe96cd654bb6a SHA512 4629ad00ca712163fccbdb029dbb42970d432b2bcaf6b6345a7bf3dca2331ab988742a6dfbc8874e2624988c699b4ba1fff8032dda53afcffbd8264df62b480b WHIRLPOOL 9cdec7b159f536c9599e30a936fcc7c0c51b7e002af851d2e8c734c69a809cf113cb7995c23b8940307ff89f0de205578e53c5266c1c6dd308c189ad14156c1a +AUX treeviewx-0.5.1-svg.patch 1181 SHA256 3d24052ca5ce8803970a4ea2541fe28238dcc499ea26f3ee32312c11e1508eab SHA512 d71ee136f4f47792ce98826d8f7bca18320f404937abd90cdacd2685f62ed28f48601a105dd1cfb9717891a8930be339b6a663b11784f305d03af0cba24b4c4f WHIRLPOOL 209d73dec82da1bb9241c343569c008009eed4fb1dfb1f51cdc3947b172f630c3e032698ef632242bd5589ab9424aec18d46251fb8e718200f3491e10f92d3dc +AUX treeviewx-0.5.1-treeview-xpm-not-xbm.patch 519 SHA256 1b7c1843f0fed0873198f4e0222eea54f7f98107424b6765bac01a2557207b81 SHA512 324b77dc43a99b55be45e1b561e528c8bb2f56ec4b1c7162987c848d0e6ea034efe262d910ee67fddcf0137b6eaeedfb50f26b8b2106b0459582942f5eccfbd4 WHIRLPOOL fc04a7caadea14ed129cb1d413947b19e9e669d68d33b80eee537694e4a740a2368e78e24c69e00ef4bbb0c0ab7954b7ff2314835fa9d83e8cff355ac4aacc77 +AUX treeviewx-0.5.1-wx30.patch 2211 SHA256 559153b17842ae169a7b4bc1e40b65c47a08be2b4606ba4643f52604480dcdd1 SHA512 0f1c05495badabba586d88a6fd0e3610b28dc5779c036d3da4956de6c5e02aabf1ef59e9aceffe85cc78ea582329965f6e228774ad6a944d91542e8bacb5daa6 WHIRLPOOL f38a42df082e385acb6be82515994e3a2665578f5b48d61c6ec826746ba24d33357f389c20793efc4ec5fa117cd5b4f140180ac8203d55593972d7d2899b90e7 +AUX treeviewx-0.5.1-wxstring-maxlen.patch 1438 SHA256 09ed71b70f84b2fbc484651d7ea7d1dcfe3c25b379d849f050d6cb42005afb0f SHA512 6e02ac59e8a28da8e94d5d6fdea71b3db9bc4501d9becf2d7aa6472d3f9f9b571fe68730390fd4cf6e1e422d618c21c40d86442d6b710e8395db107fc3445392 WHIRLPOOL 5fb9a8ef3467a3ae0d7efc8a75672326734d9cf7bcbc0198a79e126c4875390730cfeeefcdd71a8d1b8e28be581efd98976134d466da7ee1071806a158dc37eb +AUX treeviewx-wxt.patch 1854 SHA256 2881ec0a4644434320d284a4024f18cba765245de99fa7b50c3cc20ab7a37eb4 SHA512 35f9682bd8f17a2d2436ae6c0b729bcb766fd848b9b24e3f17577e4cef0cd6fd820a8686818feaf6e1414c0f10891bac0befa818a9befc337fd5e87f5120e520 WHIRLPOOL 6f91bd5ebdff8c4c32ff727bf57f2cc122d0034171704650e7263bc7da6cae798b1e4f023526063ecad01f6e69b9e995cdcbfea1478130c086909d2593fcc9e9 +DIST tv-0.5.1.tar.gz 426745 SHA256 118bdbefb3f21636b1ba9da92e1b2029cb4d7d9944f4d02d2deace4ebb14c2d1 SHA512 45a7ac6dff5b22771e4428d6b1ee528c0039956a462658d28d4f588b6df32620d8f69b3bcf5ca23643e2bdd5361da00625fcb1495bcf4f74d44ee22022c63143 WHIRLPOOL 4f115c3a0e4d6ea6205eb4be76413965ed64a1562d8d9a53207cb64e2dce4caff57c430960b402228e1d6515c9797e69162594021c1cdee09028e671a3247c06 +EBUILD treeviewx-0.5.1-r3.ebuild 894 SHA256 06b570db06a8106db648a65e03de33c502e0666e58f798698637b1c358ecdcbf SHA512 316d9b8359813322cf77338aae8b7f687d4a40ca52cd70d739fbf76b28a188e45ac97d430b90fdec2b2c0e081de868cc3c842d0a94a56c8f3d0124eac058ffa9 WHIRLPOOL a7bb76e0a132592c3a5ce839803fc86e856bfa4097824617eeb6a42d44d520e47c937b4f2e3de39bdffb4daacb834e2d068b7695d6e193a3d592cbaec52bf745 +MISC ChangeLog 3679 SHA256 9a41d4a1f29f027e0b40043eef1fbab39342203e4da1c6cf70726b3a8a051aa6 SHA512 a727d6a1cc706c0f2d495a2c075d4e6a45df6565416d4cc96b734efcd5e8460627aeb97f77dfe53bc328f007cf59cd128fbe820f88d21e02e779aa45bd400b87 WHIRLPOOL b775f5acd10f5348c0b2c1d273b14c8ef478fe40029203a90e43edf0d22c8eb4bd7ce7eeaf481e91238fbf4513e198e0973190a45e8639c5e06361f5e9b69ea3 +MISC ChangeLog-2015 4158 SHA256 d48f59524159b132f37532f48ea6693065ad47173a85d21c8e000fecb1b02e79 SHA512 e17aaa41a46878fb7f267886c2121f5383daa3394be6a2b54b923c0885ec88a2053d7d9597fff543122bc6fb6c0da090091c84089d4afd0c20cc97e2d3653133 WHIRLPOOL 558942e59a9dabd02adf98f67a64ae64ff2ddd533301de8162ef4f92f0c03d04f0b171d7603ce6090fbfa5accefff374a68db20c69912c823ed03494daf45a9a +MISC metadata.xml 530 SHA256 b96f2ad648a5f6a4d238d759221c8340475acc74b367661f80e9fd59b725b482 SHA512 28c429150fb8df5db3205b352f077fe431f3e2ca530195468a340909a3b37882fae67e05452a7810ac34ffb8a02979625b48c28285a7d3abf31004238fce1463 WHIRLPOOL cb576bf37639acbedd4cf7b5bc4ee633e2da958d1a13c674cd29029b5352570791daf3faab3ba010df95499daca19d788d66ce3e621e2ed760ed5ab90b3133bd diff --git a/sci-biology/treeviewx/files/treeviewx-0.5.1-70_choose_tree.patch b/sci-biology/treeviewx/files/treeviewx-0.5.1-70_choose_tree.patch new file mode 100644 index 000000000000..ed5aa43e23c3 --- /dev/null +++ b/sci-biology/treeviewx/files/treeviewx-0.5.1-70_choose_tree.patch @@ -0,0 +1,12 @@ +## 70_choose_tree.dpatch by William Alexander Grant +--- tv-0.5.orig/tview.cpp ++++ tv-0.5/tview.cpp +@@ -209,7 +209,7 @@ + wxT("SVG vector picture files (*.svg)|*.svg"), + wxSAVE|wxOVERWRITE_PROMPT); + +- if (dialog.ShowModal() == wxID_OK) ++ if ((dialog.ShowModal() == wxID_OK) && (p.GetNumTrees() != 0)) + { + wxSVGFileDC pictureDC (dialog.GetPath(), 600, 650) ; + OnDraw (&pictureDC); diff --git a/sci-biology/treeviewx/files/treeviewx-0.5.1-fix_loading_crash.patch b/sci-biology/treeviewx/files/treeviewx-0.5.1-fix_loading_crash.patch new file mode 100644 index 000000000000..c136539726a3 --- /dev/null +++ b/sci-biology/treeviewx/files/treeviewx-0.5.1-fix_loading_crash.patch @@ -0,0 +1,40 @@ +Bug: http://code.google.com/p/treeviewx/issues/detail?id=1 +Description: fix crash on loading tree file. +Author: Tim Booth +--- tv-0.5.orig/tview.cpp ++++ tv-0.5/tview.cpp +@@ -278,7 +278,7 @@ + char buf[256]; + strcpy (buf, p->GetLabel().c_str()); + wchar_t wbuf[256]; +- mbstowcs (wbuf, buf, size_t(wbuf)); ++ mbstowcs (wbuf, buf, 256); + s << wbuf; + #else + s << p->GetLabel().c_str(); +@@ -563,7 +563,7 @@ + char buf[256]; + strcpy (buf, t.GetName().c_str()); + wchar_t wbuf[256]; +- mbstowcs (wbuf, buf, size_t(wbuf)); ++ mbstowcs (wbuf, buf, 256); + txt << wbuf; + #else + txt << t.GetName().c_str(); +@@ -712,7 +712,7 @@ + char buf[256]; + strcpy (buf, p.GetIthTreeName(i).c_str()); + wchar_t wbuf[256]; +- mbstowcs (wbuf, buf, size_t(wbuf)); ++ mbstowcs (wbuf, buf, 256); + + std::wstring tname = wbuf; + +@@ -1046,6 +1046,7 @@ + void MyCanvas::OnSize(wxSizeEvent& event) + { + Resize (); ++ Refresh(); + event.Skip(); + } + diff --git a/sci-biology/treeviewx/files/treeviewx-0.5.1-gcc4.3.patch b/sci-biology/treeviewx/files/treeviewx-0.5.1-gcc4.3.patch new file mode 100644 index 000000000000..33bd3b1741f6 --- /dev/null +++ b/sci-biology/treeviewx/files/treeviewx-0.5.1-gcc4.3.patch @@ -0,0 +1,77 @@ +diff -Naur tv-0.5.1/TreeLib/Parse.cpp tv-0.5.1.new/TreeLib/Parse.cpp +--- tv-0.5.1/TreeLib/Parse.cpp 2002-02-23 07:22:32.000000000 -0500 ++++ tv-0.5.1.new/TreeLib/Parse.cpp 2008-06-17 06:08:24.000000000 -0400 +@@ -24,6 +24,11 @@ + #include + #include "Parse.h" + ++ ++ ++ ++#include ++ + // Return the next token in the string + tokentype Parser::NextToken () + { +diff -Naur tv-0.5.1/TreeLib/TreeLib.cpp tv-0.5.1.new/TreeLib/TreeLib.cpp +--- tv-0.5.1/TreeLib/TreeLib.cpp 2004-05-13 08:22:11.000000000 -0400 ++++ tv-0.5.1.new/TreeLib/TreeLib.cpp 2008-06-17 05:58:17.000000000 -0400 +@@ -24,6 +24,8 @@ + #include "TreeLib.h" + #include "Parse.h" + ++ ++#include + #include + + +diff -Naur tv-0.5.1/TreeLib/treereader.cpp tv-0.5.1.new/TreeLib/treereader.cpp +--- tv-0.5.1/TreeLib/treereader.cpp 2003-09-10 08:58:16.000000000 -0400 ++++ tv-0.5.1.new/TreeLib/treereader.cpp 2008-06-17 06:07:15.000000000 -0400 +@@ -28,6 +28,9 @@ + #include + #endif + ++#include ++#include ++ + //------------------------------------------------------------------------------ + TreeReader::TreeReader (Tokeniser &p) : parser (p) + { +diff -Naur tv-0.5.1/ncl-2.0/src/charactersblock.cpp tv-0.5.1.new/ncl-2.0/src/charactersblock.cpp +--- tv-0.5.1/ncl-2.0/src/charactersblock.cpp 2002-12-10 06:35:49.000000000 -0500 ++++ tv-0.5.1.new/ncl-2.0/src/charactersblock.cpp 2008-06-17 05:58:17.000000000 -0400 +@@ -1,3 +1,5 @@ ++ ++#include + #include "nexusdefs.h" + #include "xnexus.h" + #include "nexustoken.h" +diff -Naur tv-0.5.1/ncl-2.0/src/nexus.cpp tv-0.5.1.new/ncl-2.0/src/nexus.cpp +--- tv-0.5.1/ncl-2.0/src/nexus.cpp 2002-12-10 06:35:50.000000000 -0500 ++++ tv-0.5.1.new/ncl-2.0/src/nexus.cpp 2008-06-17 05:58:17.000000000 -0400 +@@ -1,3 +1,5 @@ ++ ++#include + #include "nexusdefs.h" + #include "xnexus.h" + #include "nexustoken.h" +diff -Naur tv-0.5.1/ncl-2.0/src/nexustoken.cpp tv-0.5.1.new/ncl-2.0/src/nexustoken.cpp +--- tv-0.5.1/ncl-2.0/src/nexustoken.cpp 2005-04-29 10:28:17.000000000 -0400 ++++ tv-0.5.1.new/ncl-2.0/src/nexustoken.cpp 2008-06-17 05:58:17.000000000 -0400 +@@ -1,3 +1,5 @@ ++ ++#include + #include "nexusdefs.h" + #include "xnexus.h" + #include "nexustoken.h" +diff -Naur tv-0.5.1/ncl-2.0/src/nxsstring.cpp tv-0.5.1.new/ncl-2.0/src/nxsstring.cpp +--- tv-0.5.1/ncl-2.0/src/nxsstring.cpp 2001-02-02 07:55:40.000000000 -0500 ++++ tv-0.5.1.new/ncl-2.0/src/nxsstring.cpp 2008-06-17 05:58:17.000000000 -0400 +@@ -1,3 +1,6 @@ ++ ++#include ++ + #ifdef __BORLANDC__ + // Undefine __MINMAX_DEFINED so that min and max are correctly defined + #ifdef __MINMAX_DEFINED diff --git a/sci-biology/treeviewx/files/treeviewx-0.5.1-svg.patch b/sci-biology/treeviewx/files/treeviewx-0.5.1-svg.patch new file mode 100644 index 000000000000..67a62179bb87 --- /dev/null +++ b/sci-biology/treeviewx/files/treeviewx-0.5.1-svg.patch @@ -0,0 +1,30 @@ +Author: Olly Betts +Description: Update configure.in to match what it must have said when configure was generated. + One thing I should probably explain about the patch as my change may + seem odd otherwise - upstream's configure.in says "USE_SVG=0" but the + generated configure says "USE_SVG=1", so I've simply updated + configure.in to match what it must have said when configure was + generated. +Forwarded: no +--- tv-0.5.orig/configure.in ++++ tv-0.5/configure.in +@@ -66,7 +66,9 @@ + case "$wx_version" in + 2.4.*) WX_SVG_LIB=[`$WX_CONFIG --basename`_dcsvg-`echo ${wx_version} | sed -e "s:\.[0-9]\{1,\}$::"`] + ;; +- *) WX_SVG_LIB=[`$WX_CONFIG --basename`_svg-`echo ${wx_version} | sed -e "s:\.[0-9]\{1,\}$::"`] ++ 2.*) WX_SVG_LIB=[`$WX_CONFIG --basename`_svg-`echo ${wx_version} | sed -e "s:\.[0-9]\{1,\}$::"`] ++ ;; ++ *) WX_SVG_LIB= + ;; + esac + +@@ -76,7 +78,7 @@ + + if test "$USE_SVG" = 1 ; then + CXXFLAGS="$CXXFLAGS -DUSE_SVG" +- LIBS="$LIBS -l$WX_SVG_LIB" ++ test -n "$WX_SVG_LIB" && LIBS="$LIBS -l$WX_SVG_LIB" + fi + + AC_OUTPUT(Makefile ncl-2.0/Makefile ncl-2.0/src/Makefile TreeLib/Makefile tv.spec) diff --git a/sci-biology/treeviewx/files/treeviewx-0.5.1-treeview-xpm-not-xbm.patch b/sci-biology/treeviewx/files/treeviewx-0.5.1-treeview-xpm-not-xbm.patch new file mode 100644 index 000000000000..a57ae19aaf26 --- /dev/null +++ b/sci-biology/treeviewx/files/treeviewx-0.5.1-treeview-xpm-not-xbm.patch @@ -0,0 +1,16 @@ +Description: Fix the extension of the icon +Author: Olly Betts +Last-Update: 2014-06-21 +Forwarded: http://code.google.com/p/treeviewx/issues/detail?id=4 + +--- tv-0.5.orig/tv.cpp ++++ tv-0.5/tv.cpp +@@ -215,7 +215,7 @@ + frame->SetIcon(wxIcon("app")); // use the name of the icon in the resource file + #endif + #if defined(__WXGTK__) || defined(__WXMOTIF__) +- frame->SetIcon(wxIcon(wxT("bitmaps/treeview.xbm"))); ++ frame->SetIcon(wxIcon(wxT("/usr/share/pixmaps/treeviewx.xpm"))); + #endif + + #ifdef __WXMAC__ diff --git a/sci-biology/treeviewx/files/treeviewx-0.5.1-wx30.patch b/sci-biology/treeviewx/files/treeviewx-0.5.1-wx30.patch new file mode 100644 index 000000000000..b1db5749990c --- /dev/null +++ b/sci-biology/treeviewx/files/treeviewx-0.5.1-wx30.patch @@ -0,0 +1,78 @@ + tv.cpp | 4 ++-- + tview.cpp | 12 ++++++++---- + 2 files changed, 10 insertions(+), 6 deletions(-) + +diff --git a/tv.cpp b/tv.cpp +old mode 100755 +new mode 100644 +index 1abe90b..0df45a8 +--- a/tv.cpp ++++ b/tv.cpp +@@ -163,9 +163,9 @@ bool MyApp::OnInit(void) + { + // Optional command line argument is name of file to open + #if wxUSE_UNICODE +- wchar_t *InputFile = NULL; ++ const wchar_t *InputFile = NULL; + #else +- char *InputFile = NULL; ++ const char *InputFile = NULL; + #endif + // Read input/output files + if (argc > 1) +diff --git a/tview.cpp b/tview.cpp +old mode 100755 +new mode 100644 +index 93972c3..4b2d593 +--- a/tview.cpp ++++ b/tview.cpp +@@ -62,9 +62,13 @@ + #ifdef __WXMSW__ + #else + #ifdef USE_SVG ++#if wxMAJOR_VERSION >= 3 ++ #include ++#else + #include + #endif + #endif ++#endif + + // GUI interface + #include "tv.h" +@@ -186,7 +190,7 @@ void TView::OnSavePicture (wxCommandEvent& WXUNUSED(event)) + wxFrame *f = GetMainFrame(); + wxFileDialog dialog((wxWindow *)f, wxT("Save Picture as"), wxT(""), + pictureFileName, wxT("Enhanced metafile (*.emf)|*.emf"), +- wxSAVE|wxOVERWRITE_PROMPT); ++ wxFD_SAVE|wxFD_OVERWRITE_PROMPT); + + if (dialog.ShowModal() == wxID_OK) + { +@@ -206,7 +210,7 @@ void TView::OnSavePicture (wxCommandEvent& WXUNUSED(event)) + #endif + wxFileDialog dialog((wxWindow *)f, wxT("Save Picture as"), wxT(""), + pictureFileName, wxT("SVG vector picture files (*.svg)|*.svg"), +- wxSAVE|wxOVERWRITE_PROMPT); ++ wxFD_SAVE|wxFD_OVERWRITE_PROMPT); + + if (dialog.ShowModal() == wxID_OK) + { +@@ -361,7 +365,7 @@ bool TView::OnClose(bool deleteWindow) + + // Clear the canvas in case we're in single-window mode, + // and the canvas stays. +-#if (wxMINOR_VERSION > 4) // from 2.5 Clear is deprecated ++#if (wxMAJOR_VERSION >= 3 || wxMINOR_VERSION > 4) // from 2.5 Clear is deprecated + canvas->ClearBackground(); + #else + canvas->Clear(); +@@ -686,7 +690,7 @@ void TView::OnLeafFont (wxCommandEvent& WXUNUSED(event)) + wxFontData data; + data.SetInitialFont (LeafFont); + +-#ifdef __WXMAC__ ++#if wxMAJOR_VERSION >= 3 || defined __WXMAC__ + wxFontDialog dialog((wxWindow *)GetFrame(), data); + #else + wxFontDialog dialog((wxWindow *)GetMainFrame(), &data); diff --git a/sci-biology/treeviewx/files/treeviewx-0.5.1-wxstring-maxlen.patch b/sci-biology/treeviewx/files/treeviewx-0.5.1-wxstring-maxlen.patch new file mode 100644 index 000000000000..2c5179f778ca --- /dev/null +++ b/sci-biology/treeviewx/files/treeviewx-0.5.1-wxstring-maxlen.patch @@ -0,0 +1,34 @@ +Description: Remove wxSTRING_MAXLEN (removed in wx3.0) and incomp. definition. + The definition wxSTRING_MAXLEN was removed from the public API of wxWidgets. + Its meaning was basically "take all the string", whenever a string length was + expected. The missing definition didn't raise a compilation error because + TreeLib's treedrawer.h contained a fall-back definition, which is however + incompatible with the original definition of wxWidgets and therefore is + interpreted by wxWidgets as a number representing the real string length. + This patch gets rid of the dangerous fall-back definition and of all of its + uses by using alternative wxString constructors that achieve the same + behavior. +Author: Martin Steghöfer +Last-Update: Sun, 10 Aug 2014 14:06:42 +0200 +Bug-Debian: http://bugs.debian.org/751255 + +--- tv-0.5.orig/TreeLib/treedrawer.cpp ++++ tv-0.5/TreeLib/treedrawer.cpp +@@ -245,7 +245,7 @@ + // error in gcc, which is probably a gcc bug + { + wxCoord w, h, descent; +- wxString s (formatedString.c_str(), wxSTRING_MAXLEN); ++ wxString s (formatedString.c_str()); + pt.x += dc->GetCharWidth(); + pt.y -= dc->GetCharHeight()/2; + dc->DrawText (s, (int)pt.x, (int)pt.y); +@@ -566,7 +566,7 @@ + + #if USE_WXWINDOWS + wxCoord w, h; +- wxString s (buf, wxSTRING_MAXLEN); ++ wxString s (buf); + dc->GetTextExtent (s, &w, &h); + int x = (int)pt2.x; + int y = (int)pt2.y; diff --git a/sci-biology/treeviewx/files/treeviewx-wxt.patch b/sci-biology/treeviewx/files/treeviewx-wxt.patch new file mode 100644 index 000000000000..b1c03bbb39f9 --- /dev/null +++ b/sci-biology/treeviewx/files/treeviewx-wxt.patch @@ -0,0 +1,50 @@ +--- tv.cpp~ 2005-10-01 16:47:35.000000000 -0400 ++++ tv.cpp 2005-10-01 16:52:30.000000000 -0400 +@@ -312,11 +312,15 @@ + { + #ifdef __WXMSW__ + file_menu->AppendSeparator(); +- file_menu->Append(SAVEAS_PICTURE_CMD, "Save As Picture..."), wxT("Save picture of tree to metafile"); ++ file_menu->Append(SAVEAS_PICTURE_CMD, ++ wxT("Save As Picture...")), ++ wxT("Save picture of tree to metafile"); + #else + #ifdef USE_SVG + file_menu->AppendSeparator(); +- file_menu->Append(SAVEAS_PICTURE_CMD, "Save As Picture..."), wxT("Save picture of tree to SVG file"); ++ file_menu->Append(SAVEAS_PICTURE_CMD, ++ wxT("Save As Picture...")), ++ wxT("Save picture of tree to SVG file"); + #endif + #endif + file_menu->AppendSeparator(); +--- tview.cpp~ 2005-10-01 16:47:45.000000000 -0400 ++++ tview.cpp 2005-10-01 16:50:42.000000000 -0400 +@@ -184,10 +184,10 @@ + wxString pictureFileName = GetFrame()->GetTitle(); + pictureFileName += wxT(".emf"); + wxFrame *f = GetMainFrame(); +- wxFileDialog dialog((wxWindow *)f, "Save Picture as", "", pictureFileName, +- "Enhanced metafile (*.emf)|*.emf", +- wxSAVE|wxOVERWRITE_PROMPT); +- ++ wxFileDialog dialog((wxWindow *)f, wxT("Save Picture as"), wxT(""), ++ pictureFileName, wxT("Enhanced metafile (*.emf)|*.emf"), ++ wxSAVE|wxOVERWRITE_PROMPT); ++ + if (dialog.ShowModal() == wxID_OK) + { + wxMetafileDC pictureDC (dialog.GetPath(), 600, 650) ; +@@ -204,9 +204,9 @@ + #else + wxFrame *f = GetMainFrame(); + #endif +- wxFileDialog dialog((wxWindow *)f, "Save Picture as", "", pictureFileName, +- "SVG vector picture files (*.svg)|*.svg", +- wxSAVE|wxOVERWRITE_PROMPT); ++ wxFileDialog dialog((wxWindow *)f, wxT("Save Picture as"), wxT(""), ++ pictureFileName, wxT("SVG vector picture files (*.svg)|*.svg"), ++ wxSAVE|wxOVERWRITE_PROMPT); + + if (dialog.ShowModal() == wxID_OK) + { diff --git a/sci-biology/treeviewx/metadata.xml b/sci-biology/treeviewx/metadata.xml new file mode 100644 index 000000000000..8683bbc5f8f7 --- /dev/null +++ b/sci-biology/treeviewx/metadata.xml @@ -0,0 +1,14 @@ + + + + + sci-biology@gentoo.org + Gentoo Biology Project + + + TreeView X is a program for displaying phylogenetic trees on Linux and + UNIX platforms. It can read and display NEXUS and Newick format tree + files (such as those output by PAUP*, ClustalX, TREE-PUZZLE, and other + programs). + + diff --git a/sci-biology/treeviewx/treeviewx-0.5.1-r3.ebuild b/sci-biology/treeviewx/treeviewx-0.5.1-r3.ebuild new file mode 100644 index 000000000000..7d1fe1c773e0 --- /dev/null +++ b/sci-biology/treeviewx/treeviewx-0.5.1-r3.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +WX_GTK_VER=3.0 + +inherit autotools eutils wxwidgets + +DESCRIPTION="A phylogenetic tree viewer" +HOMEPAGE="http://darwin.zoology.gla.ac.uk/~rpage/treeviewx/" +SRC_URI="http://darwin.zoology.gla.ac.uk/~rpage/${PN}/download/0.5/tv-${PV}.tar.gz" +LICENSE="GPL-2" + +KEYWORDS="amd64 x86" +SLOT="0" +IUSE="" + +DEPEND="x11-libs/wxGTK:${WX_GTK_VER}[X]" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/tv-${PV}" + +PATCHES=( + "${FILESDIR}"/${PN}-wxt.patch + "${FILESDIR}"/${P}-gcc4.3.patch + "${FILESDIR}"/${P}-70_choose_tree.patch + "${FILESDIR}"/${P}-fix_loading_crash.patch + "${FILESDIR}"/${P}-wx30.patch + "${FILESDIR}"/${P}-svg.patch + "${FILESDIR}"/${P}-treeview-xpm-not-xbm.patch + "${FILESDIR}"/${P}-wxstring-maxlen.patch + ) + +src_prepare() { + epatch "${PATCHES[@]}" + mv configure.{in,ac} || die + eautoreconf +} -- cgit v1.2.3