[med-svn] [bppphyview] 06/11: New upstream version 0.5.1

Andreas Tille tille at debian.org
Wed Jun 14 13:41:19 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository bppphyview.

commit 871982c52c51a4ae249fae348b5802a14fe80f87
Author: Andreas Tille <tille at debian.org>
Date:   Wed Jun 14 15:24:21 2017 +0200

    New upstream version 0.5.1
---
 CMakeLists.txt                   | 223 +++++++++----------------------
 ChangeLog                        |  18 +++
 INSTALL.txt                      |  13 +-
 bppPhyView/CMakeLists.txt        |  28 ++--
 bppPhyView/PhyView.cpp           | 279 ++++++++++++++++++++++++++++++---------
 bppPhyView/PhyView.h             |  31 ++++-
 bppPhyView/TreeCommands.h        |  22 ++-
 bppPhyView/TreeDocument.h        |   6 +-
 bppPhyView/TreeSubWindow.cpp     |  16 ++-
 bppPhyView/TreeSubWindow.h       |   6 +-
 bppphyview.spec                  |  65 ++++-----
 debian/bppphyview.manpages       |   1 -
 debian/changelog                 |  26 ----
 debian/compat                    |   1 -
 debian/control                   |  17 ---
 debian/copyright                 |  62 ---------
 debian/rules                     | 153 ---------------------
 debian/source/format             |   1 -
 man/CMakeLists.txt               |  43 +++++-
 man/{phyview.1.txt => phyview.1} |   0
 20 files changed, 460 insertions(+), 551 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 50c207c..71f4218 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,48 +1,29 @@
 # CMake script for Bio++ PhyView
-# Author: Julien Dutheil
+# Authors:
+#   Julien Dutheil
+#   Francois Gindraud (2017)
 # Created: 22/08/2009
 
-# Global parameters
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(bppphyview CXX C)
+cmake_minimum_required (VERSION 2.8.11)
+project (bppphyview CXX)
+
+# Compile options
+set (CMAKE_CXX_FLAGS "-std=c++11 -Wall")
+
 IF(NOT CMAKE_BUILD_TYPE)
   SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
       "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
       FORCE)
 ENDIF(NOT CMAKE_BUILD_TYPE)
 
-SET(CMAKE_CXX_FLAGS "-Wall")
-IF(NOT NO_VIRTUAL_COV)
-  SET(NO_VIRTUAL_COV FALSE CACHE BOOL
-      "Disable covariant return type with virtual inheritance, for compilers that do not support it."
-      FORCE)
-ENDIF(NOT NO_VIRTUAL_COV)
-
-IF(NO_VIRTUAL_COV)
-  MESSAGE("-- Covariant return with virtual inheritance disabled.")
-  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNO_VIRTUAL_COV=1")
-ENDIF(NO_VIRTUAL_COV)
-
 IF(NOT NO_DEP_CHECK)
   SET(NO_DEP_CHECK FALSE CACHE BOOL
       "Disable dependencies check for building distribution only."
       FORCE)
 ENDIF(NOT NO_DEP_CHECK)
 
-IF(NOT DOC_COMPRESS)
-  SET(DOC_COMPRESS gzip CACHE STRING
-      "Set program for compressing documentation."
-      FORCE)
-ENDIF(NOT DOC_COMPRESS)
-
-IF(NOT DOC_COMPRESS_EXT)
-  SET(DOC_COMPRESS_EXT gz CACHE STRING
-      "Set extension of compressed documentation."
-      FORCE)
-ENDIF(NOT DOC_COMPRESS_EXT)
-
 IF(NO_DEP_CHECK)
-  MESSAGE("-- Dependencies checking disabled. Only distribution can be built.")
+  MESSAGE(STATUS "Dependencies checking disabled. Only distribution can be built.")
 ELSE(NO_DEP_CHECK)
 
 #static linkage?
@@ -52,133 +33,79 @@ IF(NOT BUILD_STATIC)
       FORCE)
 ENDIF()
 IF(BUILD_STATIC)
-  MESSAGE("-- Static linkage requested.")
-  SET(CMAKE_CXX_FLAGS "-static -static-libgcc ${CMAKE_CXX_FLAGS}")
+  MESSAGE(STATUS "Static linkage requested.")
+  set (CMAKE_CXX_FLAGS "-static -static-libgcc ${CMAKE_CXX_FLAGS}")
 ENDIF()
 
-#build man pages?
-IF(NOT DEFINED MAN)
-  SET(MAN UNIX)
-ENDIF(NOT DEFINED MAN)
-
-#find executables for documentation
-IF(MAN)
-  FIND_PROGRAM(NROFF_EXE NAMES nroff)
-  IF(NROFF_EXE)
-    MESSAGE("-- Found nroff here: ${NROFF_EXE}")
-    MESSAGE("   Adding targets: man")
-
-    ADD_CUSTOM_TARGET(man
-      ALL
-      COMMAND cp phyview.1.txt phyview.1
-      COMMAND ${DOC_COMPRESS} -f phyview.1
-      WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/man
-      )
-    SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES man/phyview.1.${DOC_COMPRESS_EXT})
-  ELSE()
-    MESSAGE(FATAL_ERROR "Program nroff required but not found.")
-  ENDIF()
-ENDIF(MAN)
-
-#here is a useful function:
-MACRO(IMPROVED_FIND_LIBRARY OUTPUT_LIBS lib_name include_to_find)
-  #start:
-  FIND_PATH(${lib_name}_INCLUDE_DIR ${include_to_find})
-  INCLUDE_DIRECTORIES(${${lib_name}_INCLUDE_DIR})
-
-  IF(BUILD_STATIC)
-    SET(${lib_name}_STATIC_NAMES lib${lib_name}.a)
-    FIND_LIBRARY(${lib_name}_STATIC_LIBRARY NAMES ${${lib_name}_STATIC_NAMES} PATH_SUFFIXES lib${LIB_SUFFIX})
-    IF(${lib_name}_STATIC_LIBRARY)
-      MESSAGE("-- Library ${lib_name} found here:")
-      MESSAGE("   includes: ${${lib_name}_INCLUDE_DIR}")
-      MESSAGE("   static libraries: ${${lib_name}_STATIC_LIBRARY}")
-    ELSE()
-      MESSAGE(FATAL_ERROR "${lib_name} required but not found.")
-    ENDIF()
-    #add the dependency:
-    SET(${OUTPUT_LIBS} ${${OUTPUT_LIBS}} ${${lib_name}_STATIC_LIBRARY})
-  ELSE()
-    SET(${lib_name}_NAMES ${lib_name} ${lib_name}.lib ${lib_name}.dll)
-    FIND_LIBRARY(${lib_name}_LIBRARY NAMES ${${lib_name}_NAMES} PATH_SUFFIXES lib${LIB_SUFFIX})
-    IF(${lib_name}_LIBRARY)
-      MESSAGE("-- Library ${lib_name} found here:")
-      MESSAGE("   includes: ${${lib_name}_INCLUDE_DIR}")
-      MESSAGE("   dynamic libraries: ${${lib_name}_LIBRARY}")
-    ELSE()
-      MESSAGE(FATAL_ERROR "${lib_name} required but not found.")
-    ENDIF()
-    #add the dependency:
-    SET(${OUTPUT_LIBS} ${${OUTPUT_LIBS}} ${${lib_name}_LIBRARY})
-  ENDIF()
-  
-ENDMACRO(IMPROVED_FIND_LIBRARY)
-
-# Set the CMAKE_PREFIX_PATH for the find_library fonction when using non
-# standard install location
-IF(CMAKE_INSTALL_PREFIX)
-  SET(CMAKE_PREFIX_PATH "${CMAKE_INSTALL_PREFIX}" ${CMAKE_PREFIX_PATH})
-ENDIF(CMAKE_INSTALL_PREFIX)
-
-#Find the libraries. The order is very important for static linkage, it won't
-#link if you change it!
-IMPROVED_FIND_LIBRARY(LIBS bpp-qt Bpp/Qt/QtGraphicDevice.h)
-IMPROVED_FIND_LIBRARY(LIBS bpp-phyl Bpp/Phyl/Tree.h)
-IMPROVED_FIND_LIBRARY(LIBS bpp-seq Bpp/Seq/Alphabet/Alphabet.h)
-IMPROVED_FIND_LIBRARY(LIBS bpp-core Bpp/Clonable.h)
+# Check compression program
+# COMPRESS_PROGRAM controls the choice of program
+# COMPRESS_EXT can be used to override the file extension
+if (NOT COMPRESS_PROGRAM)
+  set (COMPRESS_PROGRAM gzip CACHE STRING "Set program for compressing documentation" FORCE)
+endif ()
+find_program (COMPRESS_BIN NAMES ${COMPRESS_PROGRAM} DOC "${COMPRESS_PROGRAM} compression program")
+if (NOT COMPRESS_BIN)
+  message (STATUS "${COMPRESS_PROGRAM} program not found, text doc will not be compressed")
+else ()
+  # Deduce COMPRESS_EXT for known compression programs if not set
+  if (NOT COMPRESS_EXT)
+    if (${COMPRESS_PROGRAM} STREQUAL "gzip")
+      set (COMPRESS_EXT "gz")
+    elseif (${COMPRESS_PROGRAM} STREQUAL "bzip2")
+      set (COMPRESS_EXT "bz2")
+    else ()
+      set (COMPRESS_EXT "${COMPRESS_PROGRAM}") # Default: program name (works for xz/lzma)
+    endif ()
+  endif ()
+  # Generate command line args (always add -c to output compressed file to stdout)
+  if (${COMPRESS_PROGRAM} STREQUAL "gzip")
+    # -n for no timestamp in files (reproducible builds)
+    set (COMPRESS_ARGS -c -n)
+  else ()
+    set (COMPRESS_ARGS -c)
+  endif ()
+  message (STATUS "Found ${COMPRESS_BIN} compression program, using file extension .${COMPRESS_EXT}")
+endif ()
+
+# Find dependencies (add install directory to search)
+if (CMAKE_INSTALL_PREFIX)
+  set (CMAKE_PREFIX_PATH "${CMAKE_INSTALL_PREFIX}" ${CMAKE_PREFIX_PATH})
+endif (CMAKE_INSTALL_PREFIX)
+
+include (GNUInstallDirs)
+find_package (bpp-qt 1.0.1 REQUIRED)
 
 # Find the Qt installation
-FIND_PACKAGE(Qt4 4.4.0 COMPONENTS QtCore QtGui REQUIRED)
-INCLUDE(${QT_USE_FILE})
-SET(LIBS ${LIBS} ${QT_LIBRARIES})
+set (QT_USE_IMPORTED_TARGETS TRUE)
+find_package (Qt4 4.4.0 COMPONENTS QtCore QtGui REQUIRED)
+include (${QT_USE_FILE})
+set (qt-libs ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
 
 # Subdirectories
-ADD_SUBDIRECTORY(bppPhyView)
-ADD_SUBDIRECTORY(man)
+add_subdirectory (bppPhyView)
+add_subdirectory (man)
 
 ENDIF(NO_DEP_CHECK)
 
 # Packager
 SET(CPACK_PACKAGE_NAME "bppphyview")
 SET(CPACK_PACKAGE_VENDOR "Bio++ Development Team")
-SET(CPACK_PACKAGE_VERSION "0.3.0")
+SET(CPACK_PACKAGE_VERSION "0.5.1")
 SET(CPACK_PACKAGE_VERSION_MAJOR "0")
-SET(CPACK_PACKAGE_VERSION_MINOR "3")
-SET(CPACK_PACKAGE_VERSION_PATCH "0")
+SET(CPACK_PACKAGE_VERSION_MINOR "5")
+SET(CPACK_PACKAGE_VERSION_PATCH "1")
 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The Bio++ Phylogenetic Viewer")
 SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING.txt")
 SET(CPACK_RESOURCE_FILE_AUTHORS "${CMAKE_SOURCE_DIR}/AUTHORS.txt")
 SET(CPACK_RESOURCE_FILE_INSTALL "${CMAKE_SOURCE_DIR}/INSTALL.txt")
 SET(CPACK_SOURCE_GENERATOR "TGZ")
-SET(CPACK_SOURCE_IGNORE_FILES
- "CMakeFiles"
- "Makefile"
- "_CPack_Packages"
- "CMakeCache.txt"
- ".*\\\\.cmake"
- ".*\\\\.git"
- ".*\\\\.gz"
- ".*\\\\.deb"
- ".*\\\\.rpm"
- ".*\\\\.dmg"
- ".*\\\\.sh"
- ".*\\\\..*\\\\.swp"
- ".*moc_.*"
- "bppPhyView/\\\\..*"
- "bppPhyView/phyview"
- "man/.*\\\\.1.${DOC_COMPRESS_EXT}"
- "debian/tmp"
- "debian/bppphyview/"
- "debian/bppphyview\\\\.substvars"
- "debian/bppphyview\\\\.debhelper"
- "debian/debhelper\\\\.log"
- "install_manifest.txt"
- "DartConfiguration.tcl"
- ${CPACK_SOURCE_IGNORE_FILES}
-)
-IF (MACOS)
-  SET(CPACK_GENERATOR "Bundle")
-ENDIF()
+# /!\ This assumes that an external build is used
+SET(CPACK_SOURCE_IGNORE_FILES 
+       "/build/" 
+       "/\\\\.git/" 
+       "/\\\\.gitignore" 
+       ${CPACK_SOURCE_IGNORE_FILES}
+       )
 
 SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
 SET(CPACK_DEBSOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}.orig")
@@ -186,29 +113,9 @@ INCLUDE(CPack)
 
 #This adds the 'dist' target
 ADD_CUSTOM_TARGET(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
-# 'clean' is not (yet) a first class target. However, we need to clean the directories before building the sources:
-IF("${CMAKE_GENERATOR}" MATCHES "Make")
-  ADD_CUSTOM_TARGET(make_clean
-    COMMAND ${CMAKE_MAKE_PROGRAM} clean
-    WORKING_DIRECTORY ${CMAKE_CURRENT_DIR}
-  )
-  ADD_DEPENDENCIES(dist make_clean)
-
-  ADD_CUSTOM_TARGET(make_clean_man
-    COMMAND rm -f *.${DOC_COMPRESS_EXT}
-    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/man
-  )
-  ADD_DEPENDENCIES(dist make_clean_man)
-ENDIF()
 
 IF(NOT NO_DEP_CHECK)
 IF (UNIX)
-#This creates deb packages:
-ADD_CUSTOM_TARGET(origdist COMMAND cp ${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz ../${CPACK_DEBSOURCE_PACKAGE_FILE_NAME}.tar.gz)
-ADD_DEPENDENCIES(origdist dist)
-ADD_CUSTOM_TARGET(deb dpkg-buildpackage -uc -us -i${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz)
-ADD_DEPENDENCIES(deb origdist)
-ADD_DEPENDENCIES(deb man)
 
 #This creates rpm packages:
 ADD_CUSTOM_TARGET(rpm rpmbuild -ta ${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz)
diff --git a/ChangeLog b/ChangeLog
index 5a4091b..12ed793 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+10/05/17 -*- Version 0.5.0 -*-
+* Compatibility update with Bio++ 2.3.0.
+
+28/09/14 -*- Version 0.4.0 -*-
+
+23/09/14 Julien Dutheil
+* New clickable panel with currently loaded trees.
+* New dialog box for inserting (sub)trees.
+* Possibility to insert a tree into itself (!).
+* Root at node function fixed.
+
+22/09/14 Julien Dutheil
+* Exceptions from Bio++ are caught instead of producing a crash.
+
+25/07/13 Julien Dutheil
+* Added method for unresolving uncertain nodes, based on bottstrap values.
+* New midpoint rooting: faster, with two options: sum of square or variance.
+
 08/03/12 -*- Version 0.3.0 -*-
 
 04/06/12 Julien Dutheil
diff --git a/INSTALL.txt b/INSTALL.txt
index c8859da..4f9751d 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -1,12 +1,17 @@
-This software needs cmake >= 2.6 to build.
+This software needs cmake >= 2.8.11 and a C++11 capable compiler to build
 
 After installing cmake, run it with the following command:
-cmake -DCMAKE_INSTALL_PREFIX=[where to install, for instance /usr/local or $HOME/.local] .
+$ cmake -DCMAKE_INSTALL_PREFIX=[where to install, for instance /usr/local or $HOME/.local] .
 
 If available, you can also use ccmake instead of cmake for a more user-friendly interface.
 
-Then compile and install the software with
-make install
+Then compile and install the software with:
+$ make install
 
 You may also consider installing and using the software checkinstall for easier system administration.
 
+If you install Bio++ in a non standard path (not /usr/), and compile bppsuite with shared libraries,
+you must also tell programs where to find them at startup:
+-> either by adding the path to LD_LIBRARY_PATH environment variable.
+-> or by using RPATHs to hard code the path in the executable (generates NON PORTABLE executables !)
+  -> install Bio++ with the "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" option
diff --git a/bppPhyView/CMakeLists.txt b/bppPhyView/CMakeLists.txt
index 47249d4..e7115b8 100644
--- a/bppPhyView/CMakeLists.txt
+++ b/bppPhyView/CMakeLists.txt
@@ -1,26 +1,26 @@
 # CMake script for Bio++ PhyView
-# Author: Julien Dutheil
+# Authors:
+#   Julien Dutheil
+#   Francois Gindraud (2017)
 # Created: 22/08/2009
 
-set(phyview_SRCS
+set (CPP_FILES
   PhyView.cpp
   TreeSubWindow.cpp
   TreeCommands.cpp
   )
-
-set(phyview_MOC_HDRS
+set (H_MOC_FILES
   PhyView.h
   TreeSubWindow.h
   )
+qt4_wrap_cpp (CPP_MOC_FILES ${H_MOC_FILES})
 
-set(phyview_HDRS
-  TreeDocument.h
-  TreeCommands.h
-  )
-
-qt4_wrap_cpp(phyview_MOC_SRCS ${phyview_MOC_HDRS})
-add_executable(phyview ${phyview_SRCS} ${phyview_MOC_SRCS})
-target_link_libraries(phyview ${LIBS})
+# Phyview
+add_executable (phyview ${CPP_FILES} ${CPP_MOC_FILES})
+if (BUILD_STATIC)
+  target_link_libraries (phyview ${BPP_LIBS_STATIC} ${qt-libs})
+else (BUILD_STATIC)
+  target_link_libraries (phyview ${BPP_LIBS_SHARED} ${qt-libs})
+endif (BUILD_STATIC)
 
-# Install libs
-install(TARGETS phyview DESTINATION bin)
+install (TARGETS phyview DESTINATION ${CMAKE_INSTALL_BINDIR})
diff --git a/bppPhyView/PhyView.cpp b/bppPhyView/PhyView.cpp
index f251ae6..d8a2ea2 100644
--- a/bppPhyView/PhyView.cpp
+++ b/bppPhyView/PhyView.cpp
@@ -49,7 +49,7 @@ knowledge of the CeCILL license and that you accept its terms.
 #include <Bpp/Numeric/DataTable.h>
 
 #include <Bpp/Phyl/Tree.h>
-#include <Bpp/Phyl/Io.all>
+#include <Bpp/Phyl/Io/Nhx.h>
 #include <Bpp/Phyl/Graphics/PhylogramPlot.h>
 
 #include <fstream>
@@ -104,26 +104,30 @@ void TranslateNameChooser::translateTree(TreeTemplate<Node>& tree)
     if (fileDialog_->selectedNameFilter() == fileFilters_[1])
       sep = "\t";
     ifstream file(path[0].toStdString().c_str(), ios::in);
-    DataTable* table = DataTable::read(file, sep, hasHeader_->isChecked());
+    try {
+      DataTable* table = DataTable::read(file, sep, hasHeader_->isChecked());
 
-    //Clean button groups:
-    fromList_->clear();
-    toList_->clear();
+      //Clean button groups:
+      fromList_->clear();
+      toList_->clear();
 
-    //Now add the new ones:
-    if (!hasHeader_->isChecked()) {
-      vector<string> names;
+      //Now add the new ones:
+      if (!hasHeader_->isChecked()) {
+        vector<string> names;
+        for (unsigned int i = 0; i < table->getNumberOfColumns(); ++i) {
+          names.push_back("Col" + TextTools::toString(i + 1));
+        }
+        table->setColumnNames(names);
+      }
       for (unsigned int i = 0; i < table->getNumberOfColumns(); ++i) {
-        names.push_back("Col" + TextTools::toString(i + 1));
+        fromList_->addItem(QtTools::toQt(table->getColumnName(i)));
+          toList_->addItem(QtTools::toQt(table->getColumnName(i)));
       }
-      table->setColumnNames(names);
+      if (exec() == QDialog::Accepted)
+        phyview_->submitCommand(new TranslateNodeNamesCommand(phyview_->getActiveDocument(), *table, fromList_->currentIndex(),  toList_->currentIndex()));
+    } catch (Exception& e) {
+      QMessageBox::critical(this, tr("Ouch..."), tr("Error when reading table:\n") + tr(e.what()));
     }
-    for (unsigned int i = 0; i < table->getNumberOfColumns(); ++i) {
-      fromList_->addItem(QtTools::toQt(table->getColumnName(i)));
-        toList_->addItem(QtTools::toQt(table->getColumnName(i)));
-    }
-    if (exec() == QDialog::Accepted)
-      phyview_->submitCommand(new TranslateNodeNamesCommand(phyview_->getActiveDocument(), *table, fromList_->currentIndex(),  toList_->currentIndex()));
   }
 }
 
@@ -311,7 +315,13 @@ void MouseActionListener::mousePressEvent(QMouseEvent *event)
       phyview_->submitCommand(new OrderCommand(phyview_->getActiveDocument(), nodeId, false));
     }
     else if (action == "Root on node")
-      phyview_->submitCommand(new RerootCommand(phyview_->getActiveDocument(), nodeId));
+    {
+      if (phyview_->getActiveDocument()->getTree()->getNode(nodeId)->isLeaf()) {
+        QMessageBox::warning(phyview_, "PhyView", "Cannot root on a leaf.", QMessageBox::Cancel);
+      } else {     
+        phyview_->submitCommand(new RerootCommand(phyview_->getActiveDocument(), nodeId));
+      }
+    }
     else if (action == "Root on branch")
       phyview_->submitCommand(new OutgroupCommand(phyview_->getActiveDocument(), nodeId));
     else if (action == "Collapse") {
@@ -331,32 +341,24 @@ void MouseActionListener::mousePressEvent(QMouseEvent *event)
     }
     else if (action == "Copy subtree") {
       Node* subtree = TreeTemplateTools::cloneSubtree<Node>(*phyview_->getActiveDocument()->getTree()->getNode(nodeId));
-      auto_ptr< TreeTemplate<Node> > tt(new TreeTemplate<Node>(subtree));
+      unique_ptr< TreeTemplate<Node> > tt(new TreeTemplate<Node>(subtree));
       phyview_->createNewDocument(tt.get());
     }
     else if (action == "Cut subtree") {
       Node* subtree = TreeTemplateTools::cloneSubtree<Node>(*phyview_->getActiveDocument()->getTree()->getNode(nodeId));
-      auto_ptr< TreeTemplate<Node> > tt(new TreeTemplate<Node>(subtree));
+      unique_ptr< TreeTemplate<Node> > tt(new TreeTemplate<Node>(subtree));
       phyview_->submitCommand(new DeleteSubtreeCommand(phyview_->getActiveDocument(), nodeId));
       phyview_->createNewDocument(tt.get());
     }
     else if (action == "Insert on node") {
-      if (phyview_->getNonActiveDocuments().size() == 0) {
-        QMessageBox::critical(phyview_, QString("Oups..."), QString("No tree to insert."));
-        return;
-      }
-      TreeTemplate<Node>* tree = pickTree_();
+      TreeTemplate<Node>* tree = phyview_->pickTree();
       if (tree) {
         Node* subtree = TreeTemplateTools::cloneSubtree<Node>(*tree->getRootNode());
         phyview_->submitCommand(new InsertSubtreeAtNodeCommand(phyview_->getActiveDocument(), nodeId, subtree));
       }
     }
     else if (action == "Insert on branch") {
-      if (phyview_->getNonActiveDocuments().size() == 0) {
-        QMessageBox::critical(phyview_, QString("Oups..."), QString("No tree to insert."));
-        return;
-      }
-      TreeTemplate<Node>* tree = pickTree_();
+      TreeTemplate<Node>* tree = phyview_->pickTree();
       if (tree) {
         Node* subtree = TreeTemplateTools::cloneSubtree<Node>(*tree->getRootNode());
         phyview_->submitCommand(new InsertSubtreeOnBranchCommand(phyview_->getActiveDocument(), nodeId, subtree));
@@ -367,28 +369,6 @@ void MouseActionListener::mousePressEvent(QMouseEvent *event)
 
 
 
-TreeTemplate<Node>* MouseActionListener::pickTree_()
-{
-  QList<TreeDocument*> documents = phyview_->getNonActiveDocuments();
-  treeList_->clear();
-  for (int i = 0; i < documents.size(); ++i) {
-    QString text = QtTools::toQt(documents[i]->getName());
-    if (text == "") text = "(unknown)";
-    vector<string> leaves = documents[i]->getTree()->getLeavesNames(); 
-    text += QtTools::toQt(" " + TextTools::toString(leaves.size()) + " leaves ");
-    for (unsigned int j = 0; j < min(static_cast<unsigned int>(leaves.size()), 5u); ++j) {
-      text += QtTools::toQt(", " + leaves[j]);
-    }
-    if (leaves.size() >= 5) text += "...";
-    treeList_->addItem(text);
-  }
-  treeChooser_->exec();
-  return documents[treeList_->currentRow()]->getTree();
-}
-
-
-
-
 PhyView::PhyView():
   manager_(),
   collapsedNodesListener_(true)
@@ -410,6 +390,13 @@ void PhyView::initGui_()
   connect(mdiArea_, SIGNAL(subWindowActivated(QMdiSubWindow*)), this, SLOT(setCurrentSubWindow(QMdiSubWindow*)));
   setCentralWidget(mdiArea_);
   
+  //Trees panel:
+  createTreesPanel_();
+  treesDockWidget_ = new QDockWidget(tr("Trees"));
+  treesDockWidget_->setWidget(treesPanel_);
+  treesDockWidget_->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
+  addDockWidget(Qt::LeftDockWidgetArea, treesDockWidget_);
+
   //Stats panel:
   createStatsPanel_();
   statsDockWidget_ = new QDockWidget(tr("Statistics"));
@@ -517,6 +504,23 @@ void PhyView::createDisplayPanel_()
   displayPanel_->setLayout(layout);
 }
 
+void PhyView::createTreesPanel_()
+{
+  treesPanel_ = new QWidget(this);
+  QVBoxLayout* treesLayout = new QVBoxLayout;
+  treesTable_ = new QTableWidget;
+  treesTable_->setColumnCount(2);
+  treesTable_->setHorizontalHeaderLabels(QString("Tree;Size").split(";"));
+  treesTable_->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+  treesTable_->setEditTriggers(QAbstractItemView::NoEditTriggers);
+  treesTable_->setSelectionBehavior(QAbstractItemView::SelectRows);
+  treesTable_->setSelectionMode(QAbstractItemView::SingleSelection);
+  connect(treesTable_, SIGNAL(itemClicked(QTableWidgetItem*)), this, SLOT(activateSelectedDocument()));
+  treesLayout->addWidget(treesTable_);
+  treesLayout->addStretch(1);
+  treesPanel_->setLayout(treesLayout);
+}
+
 void PhyView::createStatsPanel_()
 {
   statsPanel_ = new QWidget(this);
@@ -578,9 +582,37 @@ void PhyView::createBrlenPanel_()
   brlenLayout->addWidget(brlenToClockTree);
 
   //Midpoint rooting:
-  QPushButton* brlenMidpointRooting = new QPushButton(tr("Midpoint rooting"));
-  connect(brlenMidpointRooting, SIGNAL(clicked(bool)), this, SLOT(midpointRooting()));
-  brlenLayout->addWidget(brlenMidpointRooting);
+  brlenMidpointRootingCriteria_ =  new QComboBox;
+  brlenMidpointRootingCriteria_->addItem("Sum of squares");
+  brlenMidpointRootingCriteria_->addItem("Variance");
+  brlenMidpointRootingCriteria_->setEditable(false);
+  QPushButton* brlenMidpointRootingGo = new QPushButton(tr("Go!"));
+  connect(brlenMidpointRootingGo, SIGNAL(clicked(bool)), this, SLOT(midpointRooting()));
+  QGroupBox* brlenMidpointRootingBox = new QGroupBox(tr("Midpoint rooting"));
+  QHBoxLayout* brlenMidpointRootingLayout = new QHBoxLayout;
+  brlenMidpointRootingLayout->addWidget(brlenMidpointRootingCriteria_);
+  brlenMidpointRootingLayout->addWidget(brlenMidpointRootingGo);
+  brlenMidpointRootingLayout->addStretch(1);
+  brlenMidpointRootingBox->setLayout(brlenMidpointRootingLayout);
+
+  brlenLayout->addWidget(brlenMidpointRootingBox);
+
+  //Unresolved uncertain trees:
+  bootstrapThreshold_ = new QDoubleSpinBox;
+  bootstrapThreshold_->setValue(60);
+  bootstrapThreshold_->setDecimals(2);
+  bootstrapThreshold_->setSingleStep(0.1);
+  QPushButton* unresolveUncertainNodesGo = new QPushButton(tr("Go!"));
+  connect(unresolveUncertainNodesGo, SIGNAL(clicked(bool)), this, SLOT(unresolveUncertainNodes()));
+
+  QGroupBox* unresolveUncertainNodesBox = new QGroupBox(tr("Unresolve uncertain nodes"));
+  QHBoxLayout* unresolveUncertainNodesLayout = new QHBoxLayout;
+  unresolveUncertainNodesLayout->addWidget(bootstrapThreshold_);
+  unresolveUncertainNodesLayout->addWidget(unresolveUncertainNodesGo);
+  unresolveUncertainNodesLayout->addStretch(1);
+  unresolveUncertainNodesBox->setLayout(unresolveUncertainNodesLayout);
+  
+  brlenLayout->addWidget(unresolveUncertainNodesBox);
 
   ////
   brlenLayout->addStretch(1);
@@ -800,6 +832,7 @@ TreeDocument* PhyView::createNewDocument(Tree* tree)
   treeControlers_->applyOptions(&subWindow->getTreeCanvas());
   subWindow->show();
   setCurrentSubWindow(subWindow);
+  updateTreesTable();
   return doc;
 }
 
@@ -816,13 +849,22 @@ QList<TreeDocument*> PhyView::getNonActiveDocuments()
   return documents;
 }
 
+QList<TreeDocument*> PhyView::getDocuments()
+{
+  QList<TreeDocument*> documents;
+  QList<QMdiSubWindow *> lst = mdiArea_->subWindowList();
+  for (int i = 0; i < lst.size(); ++i) {
+    documents.push_back(dynamic_cast<TreeSubWindow*>(lst[i])->getDocument());
+  }
+  return documents;
+}
 
 
 void PhyView::readTree(const QString& path, const string& format)
 {
-  auto_ptr<ITree> treeReader(ioTreeFactory_.createReader(format));
+  unique_ptr<ITree> treeReader(ioTreeFactory_.createReader(format));
   try {
-    auto_ptr<Tree> tree(treeReader->read(path.toStdString()));
+    unique_ptr<Tree> tree(treeReader->read(path.toStdString()));
     TreeDocument* doc = createNewDocument(tree.get());
     doc->setFile(path.toStdString(), format);
     saveAction_->setEnabled(true);
@@ -841,6 +883,7 @@ void PhyView::readTree(const QString& path, const string& format)
     fileMenu_->insertAction(exitAction_, closeAction_);
     fileMenu_->insertAction(exitAction_, exportAction_);
     fileMenu_->insertAction(exitAction_, printAction_);
+    updateTreesTable();
   } catch (Exception& e) {
     QMessageBox::critical(this, tr("Ouch..."), tr("Error when reading file:\n") + tr(e.what()));
   }
@@ -874,6 +917,16 @@ void PhyView::setCurrentSubWindow(TreeSubWindow* tsw)
     treeControlers_->actualizeOptions();
     manager_.setActiveStack(&tsw->getDocument()->getUndoStack());
   }
+  //Update selection in tree table:
+  updateTreesTable(); //We need this here as some windows may have been closed.
+  QList<QMdiSubWindow *> lst = mdiArea_->subWindowList();
+  for (int i = 0; i < lst.size(); ++i) {
+    if (lst[i] == mdiArea_->activeSubWindow()) {
+      treesTable_->setRangeSelected(QTableWidgetSelectionRange(i, 0, i, 1), true);
+    } else {
+      treesTable_->setRangeSelected(QTableWidgetSelectionRange(i, 0, i, 1), false);
+    }
+  }
 }
 
 bool PhyView::saveTree()
@@ -882,7 +935,7 @@ bool PhyView::saveTree()
   if (doc->getFilePath() == "")
     return saveTreeAs();
   string format = doc->getFileFormat();
-  auto_ptr<OTree> treeWriter(ioTreeFactory_.createWriter(format));
+  unique_ptr<OTree> treeWriter(ioTreeFactory_.createWriter(format));
   Nhx* nhx = dynamic_cast<Nhx*>(treeWriter.get());
   if (nhx) {
     TreeTemplate<Node> treeCopy(*doc->getTree());
@@ -939,6 +992,24 @@ void PhyView::closeTree()
     exportAction_->setDisabled(true);
     saveAction_->setDisabled(true);
   }
+  updateTreesTable();
+}
+
+void PhyView::updateTreesTable()
+{
+  //Update tree list:
+  treesTable_->clearSelection();
+  treesTable_->clearContents();
+  QList<QMdiSubWindow *> lst = mdiArea_->subWindowList();
+  treesTable_->setRowCount(lst.size());
+  for (int i = 0; i < lst.size(); ++i) {
+    TreeDocument* doc = dynamic_cast<TreeSubWindow*>(lst[i])->getDocument();
+    string docName = doc->getName();
+    if (docName == "")
+      docName = "Tree#" + TextTools::toString(i + 1); 
+    treesTable_->setItem(i, 0, new QTableWidgetItem(QtTools::toQt(docName)));
+    treesTable_->setItem(i, 1, new QTableWidgetItem(QtTools::toQt(TextTools::toString<unsigned int>(doc->getTree()->getNumberOfLeaves()))));
+  }
 }
 
 void PhyView::exit()
@@ -949,16 +1020,16 @@ void PhyView::exit()
 void PhyView::aboutBpp()
 {
   QMessageBox msgBox;
-  msgBox.setText("Bio++ 2.1.0.");
-  msgBox.setInformativeText("bpp-core 2.1.0\nbpp-seq 2.1.0.\nbpp-phyl 2.1.0.\nbpp-qt 2.1.0");
+  msgBox.setText("Bio++ 2.3.0.");
+  msgBox.setInformativeText("bpp-core 2.3.0\nbpp-seq 2.3.0.\nbpp-phyl 2.3.0.\nbpp-qt 2.3.0");
   msgBox.exec();
 }
 
 void PhyView::about()
 {
   QMessageBox msgBox;
-  msgBox.setText("This is Bio++ Phy View version 0.3.0.");
-  msgBox.setInformativeText("Julien Dutheil <julien.dutheil at univ-montp2.fr>.");
+  msgBox.setText("This is Bio++ Phylogenetic Viewer version 0.5.0.");
+  msgBox.setInformativeText("Julien Dutheil <dutheil at evolbio.mpg.de>.");
   msgBox.exec();
 }
 
@@ -994,12 +1065,23 @@ void PhyView::midpointRooting()
 {
   if (hasActiveDocument())
     try {
-      submitCommand(new MidpointRootingCommand(getActiveDocument()));
+      submitCommand(new MidpointRootingCommand(getActiveDocument(), brlenMidpointRootingCriteria_->currentText().toStdString()));
     } catch (NodeException& ex) {
       QMessageBox::critical(this, tr("Oups..."), tr("Some branch do not have lengths."));
     }
 }
 
+void PhyView::unresolveUncertainNodes()
+{
+  if (hasActiveDocument()) {
+    try {
+      submitCommand(new UnresolveUnsupportedNodesCommand(getActiveDocument(), bootstrapThreshold_->value()));
+    } catch (NodeException& ex) {
+      QMessageBox::critical(this, tr("Oups..."), tr("An exception occurred while unresolving your tree!"));
+    }
+  }
+}
+
 void PhyView::translateNames()
 {
   if (hasActiveDocument())
@@ -1139,9 +1221,80 @@ void PhyView::searchResultSelected()
   getActiveSubWindow()->getTreeCanvas().ensureVisible(searchResultsItems_[searchResults_->currentRow()]);
 }
 
+void PhyView::activateSelectedDocument() {
+  if (treesTable_->selectedItems().size() > 0) {
+    int index = treesTable_->selectedItems()[0]->row();
+    mdiArea_->setActiveSubWindow(mdiArea_->subWindowList()[index]);
+    mdiArea_->activeSubWindow()->showNormal();
+    mdiArea_->activeSubWindow()->raise();
+  }
+}
+
+
+TreeTemplate<Node>* PhyView::pickTree()
+{
+  QList<TreeDocument*> documents = getDocuments();
+  //treeList_->clear();
+  QStringList items;
+  for (int i = 0; i < documents.size(); ++i) {
+    QString text = QtTools::toQt(documents[i]->getName());
+    if (text == "") text = "(unknown)";
+    vector<string> leaves = documents[i]->getTree()->getLeavesNames(); 
+    text += QtTools::toQt(" " + TextTools::toString(leaves.size()) + " leaves ");
+
+    for (unsigned int j = 0; j < min(static_cast<unsigned int>(leaves.size()), 5u); ++j) {
+      text += QtTools::toQt(", " + leaves[j]);
+    }
+    if (leaves.size() >= 5) text += "...";
+    //treeList_->addItem(text);
+    items << text;
+  }
+
+  //treeChooser_->exec();
+  //int index = treeList_->currentRow();
+  //return index > 0 ? documents[index]->getTree() : 0;
+  bool ok;
+  QString item = QInputDialog::getItem(this, "Pick a tree", "Tree to insert:", items, 0, false, &ok);
+  if (ok && !item.isEmpty())
+    return documents[items.indexOf(item)]->getTree();
+  else
+    return 0;
+}
+
+
+
+
+
+// This class is necessary to reimplement the notify method, in order to catch any foreign exception.
+class PhyViewApplication:
+  public QApplication
+{
+  public:
+    PhyViewApplication(int &argc, char *argv[]):
+      QApplication(argc, argv) {}
+
+  public:
+    bool notify(QObject *receiver_, QEvent *event_)
+    {
+      try
+      {
+        return QApplication::notify(receiver_, event_);
+      }
+      catch (std::exception &ex)
+      {
+        std::cerr << "std::exception was caught" << std::endl;
+        std::cerr << ex.what() << endl;
+        QMessageBox msgBox;
+        msgBox.setText(ex.what());
+        msgBox.exec();
+      }
+      return false;
+    }
+};
+
 int main(int argc, char *argv[])
 {
-  QApplication app(argc, argv);
+  PhyViewApplication app(argc, argv);
 
   PhyView* phyview = new PhyView();
   phyview->show();
diff --git a/bppPhyView/PhyView.h b/bppPhyView/PhyView.h
index 0e56e3d..ca24e75 100644
--- a/bppPhyView/PhyView.h
+++ b/bppPhyView/PhyView.h
@@ -83,9 +83,6 @@ class MouseActionListener:
 
     bool isAutonomous() const { return false; }
 
-  private:
-    TreeTemplate<Node>* pickTree_();
-
 };  
 
 
@@ -231,20 +228,27 @@ class PhyView :
     TreeCanvasControlers* treeControlers_;
     QWidget* displayPanel_;
     TreeStatisticsBox* statsBox_;
+    QWidget* treesPanel_;
     QWidget* statsPanel_;
     QWidget* brlenPanel_;
     QWidget* mouseControlPanel_;
     QWidget* dataPanel_;
     QWidget* searchPanel_;
 
+    QDockWidget* treesDockWidget_; 
     QDockWidget* statsDockWidget_; 
     QDockWidget* displayDockWidget_;
     QDockWidget* undoDockWidget_;
     
+    //Trees:
+    QTableWidget* treesTable_;
+
     //Branch lengths operations:
     QDockWidget* brlenDockWidget_;
     QDoubleSpinBox* brlenSetLengths_;
     QDoubleSpinBox* brlenComputeGrafen_;
+    QComboBox* brlenMidpointRootingCriteria_;
+    QDoubleSpinBox* bootstrapThreshold_;
 
     //Mouse actions change:
     QDockWidget* mouseControlDockWidget_;
@@ -292,6 +296,8 @@ class PhyView :
       return dynamic_cast<TreeSubWindow*>(mdiArea_->currentSubWindow())->getDocument();
     }
 
+    QList<TreeDocument*> getDocuments();
+    
     QList<TreeDocument*> getNonActiveDocuments();
 
     TreeSubWindow* getActiveSubWindow()
@@ -319,9 +325,23 @@ class PhyView :
     
     void readTree(const QString& path, const string& format);
 
+    TreeTemplate<Node>* pickTree();
+
+    void checkLastWindow() {
+      //This is to avoid bugs when the last window is closed.
+      //It should only be closed from the destructor of TreeSubWindow.
+      if (mdiArea_->subWindowList().size() == 0) {
+        treesTable_->clearContents();
+        treesTable_->setRowCount(0);
+      }
+    }
+
   protected:
     void closeEvent(QCloseEvent* event);
 
+  public slots:
+    void updateTreesTable();
+
   private slots:
     void openTree();
     bool saveTree();
@@ -349,6 +369,7 @@ class PhyView :
     void computeLengthsGrafen();
     void convertToClockTree();
     void midpointRooting();
+    void unresolveUncertainNodes();
     void translateNames();
 
     void attachData();
@@ -360,18 +381,20 @@ class PhyView :
     void snapData();
     void searchText();
     void searchResultSelected();
-
     void clearSearchResults() {
       searchResults_->clear();
       searchResultsItems_.clear();
     }
 
+    void activateSelectedDocument();
+
   private:
     void initGui_();
     void createActions_();
     void createMenus_();
     void createStatusBar_();
 
+    void createTreesPanel_();
     void createStatsPanel_();
     void createDisplayPanel_();
     void createBrlenPanel_();
diff --git a/bppPhyView/TreeCommands.h b/bppPhyView/TreeCommands.h
index 2c5f259..92b181e 100644
--- a/bppPhyView/TreeCommands.h
+++ b/bppPhyView/TreeCommands.h
@@ -185,11 +185,27 @@ class OutgroupCommand: public AbstractCommand
 class MidpointRootingCommand: public AbstractCommand
 {
   public:
-    MidpointRootingCommand(TreeDocument* doc) :
-      AbstractCommand(QtTools::toQt("Midpoint rooting"), doc)
+    MidpointRootingCommand(TreeDocument* doc, const string& criterion) :
+      AbstractCommand(QtTools::toQt("Midpoint rooting (" + criterion + ")."), doc)
     {
+      short crit = 0;
+      if (criterion == "Variance")
+        crit = TreeTemplateTools::MIDROOT_VARIANCE;
+      else if (criterion == "Sum of squares")
+        crit = TreeTemplateTools::MIDROOT_SUM_OF_SQUARES;
       new_ = new TreeTemplate<Node>(*old_);
-      TreeTools::midpointRooting(*new_);
+      TreeTemplateTools::midRoot(*new_, crit, true);
+    }
+};
+
+class UnresolveUnsupportedNodesCommand: public AbstractCommand
+{
+  public:
+    UnresolveUnsupportedNodesCommand(TreeDocument* doc, double threshold) :
+      AbstractCommand(QtTools::toQt("Unresolve nodes with bootstrap < " + TextTools::toString(threshold) + "."), doc)
+    {
+      new_ = new TreeTemplate<Node>(*old_);
+      TreeTemplateTools::unresolveUncertainNodes(*new_->getRootNode(), threshold, TreeTools::BOOTSTRAP);
     }
 };
 
diff --git a/bppPhyView/TreeDocument.h b/bppPhyView/TreeDocument.h
index 43e23d4..51b8f90 100644
--- a/bppPhyView/TreeDocument.h
+++ b/bppPhyView/TreeDocument.h
@@ -42,9 +42,9 @@ knowledge of the CeCILL license and that you accept its terms.
 
 #include <Bpp/Io/FileTools.h>
 
-//From PhylLib:
+//From bpp-phyl:
 #include <Bpp/Phyl/Tree.h>
-#include <Bpp/Phyl/Io.all>
+#include <Bpp/Phyl/TreeTemplate.h>
 
 //From the STL:
 #include <string>
@@ -133,7 +133,7 @@ class TreeDocument
 
     void updateAllViews()
     {
-      for (unsigned int i = 0; i < viewers_.size(); i++)
+      for (size_t i = 0; i < viewers_.size(); i++)
         viewers_[i]->updateView();
     }
 };
diff --git a/bppPhyView/TreeSubWindow.cpp b/bppPhyView/TreeSubWindow.cpp
index 9b05399..17db79f 100644
--- a/bppPhyView/TreeSubWindow.cpp
+++ b/bppPhyView/TreeSubWindow.cpp
@@ -56,8 +56,8 @@ TreeSubWindow::TreeSubWindow(PhyView* phyview, TreeDocument* document, TreeDrawi
   treeCanvas_ = new TreeCanvas();
   treeCanvas_->setTree(treeDocument_->getTree());
   treeCanvas_->setTreeDrawing(*td);
-  treeCanvas_->setMinimumSize(400,400);
-  treeCanvas_->addMouseListener(reinterpret_cast<MouseListener*>(phyview_->getMouseActionListener()));
+  treeCanvas_->setMinimumSize(400, 400);
+  treeCanvas_->addMouseListener(phyview_->getMouseActionListener());
   connect(treeCanvas_, SIGNAL(drawingChanged()), phyview, SLOT(clearSearchResults()));
 
   nodeEditor_ = new QTableWidget();
@@ -73,12 +73,24 @@ TreeSubWindow::TreeSubWindow(PhyView* phyview, TreeDocument* document, TreeDrawi
   splitter_->addWidget(nodeEditor_);
   splitter_->setCollapsible(0, true);
   splitter_->setCollapsible(1, true);
+  //Move the splitter to the right:
+  QList<int> currentSizes = splitter_->sizes();
+  currentSizes[0] = currentSizes[0] + currentSizes[1];
+  currentSizes[1] = 0;
+  splitter_->setSizes(currentSizes);
 
   setMinimumSize(400, 400);
   setWidget(splitter_);
   updateTable();
 }
 
+TreeSubWindow::~TreeSubWindow()
+{
+  delete treeDocument_;
+  delete splitter_;
+  phyview_->checkLastWindow();
+}
+
 QTableWidgetItem* TreeSubWindow::getTableWigetItem_(Clonable* property)
 {
   QTableWidgetItem* propItem = 0;
diff --git a/bppPhyView/TreeSubWindow.h b/bppPhyView/TreeSubWindow.h
index bab9624..80177ae 100644
--- a/bppPhyView/TreeSubWindow.h
+++ b/bppPhyView/TreeSubWindow.h
@@ -75,11 +75,7 @@ class TreeSubWindow:
   public:
     TreeSubWindow(PhyView* phyview, TreeDocument* document, TreeDrawing* td);
 
-    virtual ~TreeSubWindow()
-    {
-      delete treeDocument_;
-      delete splitter_;
-    }
+    virtual ~TreeSubWindow();
 
   public:
     TreeDocument* getDocument() { return treeDocument_; }
diff --git a/bppphyview.spec b/bppphyview.spec
index 93058ce..17b5d9a 100644
--- a/bppphyview.spec
+++ b/bppphyview.spec
@@ -1,5 +1,5 @@
 %define _basename bppphyview
-%define _version 0.3.0
+%define _version 0.5.1
 %define _release 1
 %define _prefix /usr
 
@@ -14,9 +14,9 @@ Source: http://biopp.univ-montp2.fr/repos/sources/%{_basename}-%{_version}.tar.g
 Summary: Bio++ Phylogenetic Viewer
 Group: Productivity/Scientific/Other
 
-Requires: libbpp-phyl9 = 2.1.0
-Requires: libbpp-core2 = 2.1.0
-Requires: libbpp-qt1 = 2.1.0
+Requires: libbpp-phyl11 = 2.3.1
+Requires: libbpp-core3 = 2.3.1
+Requires: libbpp-qt1 = 2.3.1
 %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
 Requires: qt >= 4.6.0
 %endif
@@ -32,15 +32,15 @@ Requires: libqtgui4 >= 4.6.0
 %endif
 
 BuildRoot: %{_builddir}/%{_basename}-root
-BuildRequires: cmake >= 2.6.0
-BuildRequires: gcc-c++ >= 4.0.0
+BuildRequires: cmake >= 2.8.11
+BuildRequires: gcc-c++ >= 4.7.0
 BuildRequires: groff
-BuildRequires: libbpp-core2 = 2.1.0
-BuildRequires: libbpp-core-devel = 2.1.0
-BuildRequires: libbpp-phyl9 = 2.1.0
-BuildRequires: libbpp-phyl-devel = 2.1.0
-BuildRequires: libbpp-qt1 = 2.1.0
-BuildRequires: libbpp-qt-devel = 2.1.0
+BuildRequires: libbpp-core3 = 2.3.1
+BuildRequires: libbpp-core-devel = 2.3.1
+BuildRequires: libbpp-phyl11 = 2.3.1
+BuildRequires: libbpp-phyl-devel = 2.3.1
+BuildRequires: libbpp-qt1 = 2.3.1
+BuildRequires: libbpp-qt-devel = 2.3.1
 
 %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
 BuildRequires: qt >= 4.6.0
@@ -62,17 +62,24 @@ BuildRequires: libqt4-devel >= 4.6.0
 
 AutoReq: yes
 AutoProv: yes
-%if 0%{?mdkversion}
-%if 0%{?mdkversion} >= 201100
+
+%if 0%{?mandriva_version}
+%if %{mandriva_version} >= 2011
 BuildRequires: xz
-%define zipext xz
+%define compress_program xz
 %else
 BuildRequires: lzma
-%define zipext lzma
+%define compress_program lzma
 %endif
 %else
+%if 0%{?distribution:1} && "%{distribution}" == "Mageia"
+BuildRequires: xz
+%define compress_program xz
+%else
+#For all other distributions:
 BuildRequires: gzip
-%define zipext gz
+%define compress_program gzip
+%endif
 %endif
 
 %description
@@ -82,18 +89,8 @@ Bio++ Phylogenetic Viewer, using the Qt library.
 %setup -q
 
 %build
-CFLAGS="-I%{_prefix}/include $RPM_OPT_FLAGS"
-CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=%{_prefix}"
-if [ %{_lib} == 'lib64' ] ; then
-  CMAKE_FLAGS="$CMAKE_FLAGS -DLIB_SUFFIX=64"
-fi
-if [ %{zipext} == 'lzma' ] ; then
-  CMAKE_FLAGS="$CMAKE_FLAGS -DDOC_COMPRESS=lzma -DDOC_COMPRESS_EXT=lzma"
-fi
-if [ %{zipext} == 'xz' ] ; then
-  CMAKE_FLAGS="$CMAKE_FLAGS -DDOC_COMPRESS=xz -DDOC_COMPRESS_EXT=xz"
-fi
-
+CFLAGS="$RPM_OPT_FLAGS"
+CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=%{_prefix} -DCOMPRESS_PROGRAM=%{compress_program}"
 cmake $CMAKE_FLAGS .
 make
 
@@ -111,9 +108,17 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(-,root,root)
 %doc AUTHORS.txt COPYING.txt INSTALL.txt ChangeLog
 %{_prefix}/bin/phyview
-%{_prefix}/share/man/man1/phyview.1.%{zipext}
+%{_prefix}/share/man/man1/phyview.1*
 
 %changelog
+* Thu Jun 8 2017 Julien Dutheil <julien.dutheil at univ-montp2.fr> 0.5.1-1
+- Compatibility update with Bio++ 2.3.1.
+* Wed May 10 2017 Julien Dutheil <julien.dutheil at univ-montp2.fr> 0.5.0-1
+- Compatibility update with Bio++ 2.3.0.
+* Mon Sep 28 2014 Julien Dutheil <julien.dutheil at univ-montp2.fr> 0.4.0-1
+- Several bug fixed.
+- New clickable panel with list of trees in memory.
+- New dialog to insert subtrees.
 * Fri Mar 08 2013 Julien Dutheil <julien.dutheil at univ-montp2.fr> 0.3.0-1
 - Compatibility update.
 - New option for header line in names translation.
diff --git a/debian/bppphyview.manpages b/debian/bppphyview.manpages
deleted file mode 100644
index a69bf35..0000000
--- a/debian/bppphyview.manpages
+++ /dev/null
@@ -1 +0,0 @@
-man/phyview.1.gz
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index 0b396cc..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,26 +0,0 @@
-bppphyview (0.3.0-1) unstable; urgency=low
-
-  * Compatibility update.
-  * New option for header line in names translation.
-
- -- Julien Dutheil <julien.dutheil at univ-montp2.fr>  Fri, 08 Mar 2013 14:55:00 +0100
-
-bppphyview (0.2.1-1) unstable; urgency=low
-
-  * Compatibility update.
-
- -- Julien Dutheil <julien.dutheil at univ-montp2.fr>  Thu, 09 Feb 2012 21:38:00 +0100
-
-bppphyview (0.2.0-1) unstable; urgency=low
-
-  * RFP: Bio++ -- The Bio++ bioinformatics libraries. (Closes: #616373).
-  * Packages are now non-native.
-
- -- Julien Dutheil <julien.dutheil at univ-montp2.fr>  Thu, 09 Jun 2011 11:00:00 +0100
-
-bppphyview (0.1.0) unstable; urgency=low
-
-  * Initial release.
-
- -- Julien Dutheil <julien.dutheil at univ-montp2.fr>  Mon, 28 Feb 2011 09:00:00 +0100
-
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index 7ed6ff8..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-5
diff --git a/debian/control b/debian/control
deleted file mode 100644
index 0b721bb..0000000
--- a/debian/control
+++ /dev/null
@@ -1,17 +0,0 @@
-Source: bppphyview
-Section: science
-Priority: optional
-Maintainer: Loic Dachary <loic at dachary.org>
-Uploaders: Julien Dutheil <julien.dutheil at univ-montp2.fr>
-Build-Depends: debhelper (>= 5), cmake (>= 2.6),
-  qt4-qmake (>= 4.6.0), libqt4-dev (>= 4.6.0),
-  libbpp-qt-dev (>= 2.1.0)
-Standards-Version: 3.9.1
-
-Package: bppphyview
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends},
-  libbpp-qt1 (>= 2.1.0), libqtcore4 (>= 4.6.0), libqtgui4 (>= 4.6.0) 
-Description: Bio++ Phylogenetic Viewer
- A phylogenetic tree editor developed using Bio++ and Qt.
-
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644
index 5caf87f..0000000
--- a/debian/copyright
+++ /dev/null
@@ -1,62 +0,0 @@
-This package was debianized by Julien Dutheil <julien.dutheil at univ-montp2.fr> on
-Fri, 08 Mar 2013 14:55:00 +0100
-
-It was downloaded from <http://biopp.univ-montp2.fr/Repositories/sources>
-
-Upstream Author: 
-
-    Julien Dutheil <julien.dutheil at univ-montp2.fr>
-
-Copyright: 
-
-    Copyright (C) 2013 Bio++ Development Team
-
-License:
-
-    This package is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
- 
-    This package is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
- 
-    You should have received a copy of the GNU General Public License
-    along with this package; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-
-The Debian packaging is (C) 2013, Julien Dutheil <julien.dutheil at univ-montp2.fr> and
-is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
-
-The provided software is distributed under the CeCILL license:
-
-    This software is governed by the CeCILL license under French law and
-    abiding by the rules of distribution of free software.  You can  use, 
-    modify and/ or redistribute the software under the terms of the CeCILL
-    license as circulated by CEA, CNRS and INRIA at the following URL
-    "http://www.cecill.info". 
-
-    As a counterpart to the access to the source code and  rights to copy,
-    modify and redistribute granted by the license, users are provided only
-    with a limited warranty  and the software's author,  the holder of the
-    economic rights,  and the successive licensors  have only  limited
-    liability. 
-
-    In this respect, the user's attention is drawn to the risks associated
-    with loading,  using,  modifying and/or developing or reproducing the
-    software by the user in light of its specific status of free software,
-    that may mean  that it is complicated to manipulate,  and  that  also
-    therefore means  that it is reserved for developers  and  experienced
-    professionals having in-depth computer knowledge. Users are therefore
-    encouraged to load and test the software's suitability as regards their
-    requirements in conditions enabling the security of their systems and/or 
-    data to be ensured and,  more generally, to use and operate it in the 
-    same conditions as regards security. 
-
-    The fact that you are presently reading this means that you have had
-    knowledge of the CeCILL license and that you accept its terms.
-    
-The complete text of the license may be found here:
-http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index 453d4e1..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,153 +0,0 @@
-#!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-#
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-#
-# Modified to make a template file for a multi-binary package with separated
-# build-arch and build-indep targets  by Bill Allombert 2001
-
-# 25/03/10 Modification for use with CMake by Julien Dutheil.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-# This has to be exported to make some magic below work.
-export DH_OPTIONS
-
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
-
-CFLAGS = -Wall -g
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -O0
-else
-	CFLAGS += -O2
-endif
-
-configure:
-	cmake -DCMAKE_INSTALL_PREFIX=/usr .
-
-config.status: configure
-	dh_testdir
-
-#Architecture 
-build: build-arch build-indep
-
-build-arch: build-arch-stamp
-build-arch-stamp:  config.status
-
-	# Add here commands to compile the arch part of the package.
-	#$(MAKE) 
-	touch $@
-
-build-indep: build-indep-stamp
-build-indep-stamp:  config.status
-
-	# Add here commands to compile the indep part of the package.
-	#$(MAKE) doc
-	touch $@
-
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
-	rm -f CMakeCache.txt
-
-	# Add here commands to clean up after the build process.
-	[ ! -f Makefile ] || $(MAKE) clean;
-	[ ! -f Makefile ] || rm Makefile;
-	[ ! -f bppPhyView/Makefile ] || rm bppPhyView/Makefile;
-	[ ! -f man/Makefile ] || rm man/Makefile;
-	rm -f man/*.gz;
-	rm -f config.sub config.guess
-	rm -f build-stamp
-	rm -f CMakeCache.txt
-	rm -f *.cmake
-	rm -f bppPhyView/*.cmake
-	#rm -f test/*.cmake
-	rm -f man/*.cmake
-	#rm -f doc/*.cmake
-	rm -rf CMakeFiles
-	rm -rf bppPhyView/CMakeFiles
-	#rm -rf test/CMakeFiles
-	rm -rf man/CMakeFiles
-	#rm -rf doc/CMakeFiles
-	rm -rf _CPack_Packages
-	#rm -rf Testing
-	#rm -f DartConfiguration.tcl
-
-	dh_clean 
-
-install: install-indep install-arch
-install-indep:
-	dh_testdir
-	dh_testroot
-	dh_prep -i 
-	dh_installdirs -i
-
-	# Add here commands to install the indep part of the package into
-	# debian/<package>-doc.
-	#INSTALLDOC#
-
-	dh_install -i
-
-install-arch:
-	dh_testdir
-	dh_testroot
-	dh_prep -s 
-	dh_installdirs -s
-
-	# Add here commands to install the arch part of the package into 
-	# debian/tmp.
-	$(MAKE) DESTDIR=$(CURDIR)/debian/bppphyview man install
-
-	dh_install -s
-# Must not depend on anything. This is to be called by
-# binary-arch/binary-indep
-# in another 'make' thread.
-binary-common:
-	dh_testdir
-	dh_testroot
-	dh_installchangelogs ChangeLog
-	dh_installdocs
-	dh_installexamples
-#	dh_installmenu
-#	dh_installdebconf	
-#	dh_installlogrotate	
-#	dh_installemacsen
-#	dh_installpam
-#	dh_installmime
-#	dh_python
-#	dh_installinit
-#	dh_installcron
-	dh_installinfo
-	dh_installman
-	dh_link
-	dh_strip
-	dh_compress 
-	dh_fixperms
-#	dh_perl
-#	dh_makeshlibs
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-# Build architecture independant packages using the common target.
-binary-indep: build-indep install-indep
-	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
-
-# Build architecture dependant packages using the common target.
-binary-arch: build-arch install-arch
-	$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
-
-binary: binary-arch binary-indep
-.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch 
diff --git a/debian/source/format b/debian/source/format
deleted file mode 100644
index 163aaf8..0000000
--- a/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (quilt)
diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt
index bea4e00..161d562 100644
--- a/man/CMakeLists.txt
+++ b/man/CMakeLists.txt
@@ -1,7 +1,42 @@
 # CMake script for PhyView.
-# Author: Julien Dutheil
+# Authors:
+#   Julien Dutheil
+#   Francois gindraud (2017)
 # Created: 22/08/2009
 
-IF(MAN)
-  INSTALL(FILES phyview.1.${DOC_COMPRESS_EXT} DESTINATION share/man/man1)
-ENDIF(MAN)
+# Build manpages.
+# In practice, they are just compressed from the text files using COMPRESS_PROGRAM
+# Manpages are built and installed as part of "all" if a COMPRESS_PROGRAM is found.
+
+# Take all manpages files in the directory
+file (GLOB manpage_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.1)
+
+if (NOT COMPRESS_BIN)
+  # Just install manpages from source
+  foreach (manpage_file ${manpage_files})
+    install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${manpage_file} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+  endforeach (manpage_file)
+else ()
+  # Create a list of manpage targets
+  set (manpage-targets)
+
+  foreach (manpage_file ${manpage_files})
+    # Compress manpage, install, add to manpage target list
+    set (input ${CMAKE_CURRENT_SOURCE_DIR}/${manpage_file})
+    set (output ${CMAKE_CURRENT_BINARY_DIR}/${manpage_file}.${COMPRESS_EXT})
+    add_custom_command (
+      OUTPUT ${output}
+      COMMAND ${COMPRESS_BIN} ${COMPRESS_ARGS} ${input} > ${output}
+      DEPENDS ${input}
+      COMMENT "Compressing manpage ${manpage_file}"
+      VERBATIM
+      )
+    install (FILES ${output} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+    list (APPEND manpage-targets ${output})
+    unset (input)
+    unset (output)
+  endforeach (manpage_file)
+
+  # Add target "man", built with "all" (needed because install will fail if not built).
+  add_custom_target (man ALL DEPENDS ${manpage-targets})
+endif ()
diff --git a/man/phyview.1.txt b/man/phyview.1
similarity index 100%
rename from man/phyview.1.txt
rename to man/phyview.1

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/bppphyview.git



More information about the debian-med-commit mailing list