[freemat] 06/13: Update, remove patches.

Anton Gladky gladk at moszumanska.debian.org
Tue Jan 26 09:50:32 UTC 2016


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

gladk pushed a commit to branch experimental
in repository freemat.

commit 5a783e55c07d4effdfddbd81a638cea7abd4ed9d
Author: Anton Gladky <gladk at debian.org>
Date:   Fri Jan 22 14:56:30 2016 +0100

    Update, remove patches.
---
 debian/patches/01_gcc_includes.patch           | 371 -------------------------
 debian/patches/07_fix_FTBFS_with_GCC_4.4.patch |   6 +-
 debian/patches/09_warning.patch                |  21 --
 debian/patches/10_llvm.patch                   |  32 ---
 debian/patches/11_ftbfs_qt48.patch             |  14 -
 debian/patches/12_update_clang_deps.patch      | 166 +++++++++++
 debian/patches/14_disable_pdf_install.patch    |  15 +
 debian/patches/gcc4.5.patch                    | 205 --------------
 debian/patches/series                          |   7 +-
 9 files changed, 187 insertions(+), 650 deletions(-)

diff --git a/debian/patches/01_gcc_includes.patch b/debian/patches/01_gcc_includes.patch
deleted file mode 100644
index 256d34b..0000000
--- a/debian/patches/01_gcc_includes.patch
+++ /dev/null
@@ -1,371 +0,0 @@
-Author: Giuseppe Iuculano <giuseppe at iuculano.it>
-Description: Includes and gcc-4.3 fixes, taken from http://sourceforge.net/tracker/index.php?func=detail&aid=1968128&group_id=91526&atid=597448
---- a/libs/libCore/Directory.cpp
-+++ b/libs/libCore/Directory.cpp
-@@ -20,7 +20,7 @@
- #include "Array.hpp"
- #include "Interpreter.hpp"
- #include "Utils.hpp"
--#include <stdio.h>
-+#include <cstdio>
- #include "System.hpp"
- #include <QtCore>
- #include "Algorithms.hpp"
---- a/libs/libCore/RanLib.cpp
-+++ b/libs/libCore/RanLib.cpp
-@@ -18,11 +18,9 @@
-  */
- 
- #include "Exception.hpp"
--#include <stdio.h>
--#include <stdlib.h>
--#include <stdio.h>
-+#include <cstdlib>
-+#include <cstdio>
- #include <math.h>
--#include <stdlib.h>
- #include "RanLib.hpp"
- 
- /* 
-@@ -68,7 +66,6 @@
-    email: matumoto at math.keio.ac.jp
- */
- 
--#include <stdio.h>
- 
- /* Period parameters */  
- #define N 624
---- a/libs/libCore/Random.cpp
-+++ b/libs/libCore/Random.cpp
-@@ -19,7 +19,7 @@
- 
- #include "Exception.hpp"
- #include <math.h>
--#include <stdio.h>
-+#include <cstdio>
- #include "RanLib.hpp"
- #include "Operators.hpp"
- #include "Utils.hpp"
---- a/libs/libFreeMat/Context.hpp
-+++ b/libs/libFreeMat/Context.hpp
-@@ -30,7 +30,7 @@
- #include <QList>
- #include <QMutex>
- #include <QMutexLocker>
--#include <stdarg.h>
-+#include <cstdarg>
- #include "DebugStream.hpp"
- 
- /**
---- a/libs/libFreeMat/EigenDecompose.cpp
-+++ b/libs/libFreeMat/EigenDecompose.cpp
-@@ -19,8 +19,8 @@
- 
- #include "EigenDecompose.hpp"
- #include "LAPACK.hpp"
--#include <stdlib.h>
--#include <stdio.h>
-+#include <cstdlib>
-+#include <cstdio>
- #include "MemPtr.hpp"
- #include "Complex.hpp"
- #include "Math.hpp"
---- a/libs/libFreeMat/Exception.cpp
-+++ b/libs/libFreeMat/Exception.cpp
-@@ -17,9 +17,9 @@
-  *
-  */
- 
--#include <string.h>
--#include <stdlib.h>
--#include <stdio.h>
-+#include <cstring>
-+#include <cstdlib>
-+#include <cstdio>
- #include <iostream>
- #include "Exception.hpp"
- #include "Interpreter.hpp"
---- a/libs/libFreeMat/File.hpp
-+++ b/libs/libFreeMat/File.hpp
-@@ -19,7 +19,7 @@
- 
- #ifndef __File_hpp__
- #define __File_hpp__
--#include <stdio.h>
-+#include <cstdio>
- #include "Stream.hpp"
- #include <QString>
- 
---- a/libs/libFreeMat/FunctionDef.cpp
-+++ b/libs/libFreeMat/FunctionDef.cpp
-@@ -22,7 +22,7 @@
- #include "Parser.hpp"
- #include "Exception.hpp"
- #include <iostream>
--#include <signal.h>
-+#include <csignal>
- #include "SymbolTable.hpp"
- #include "Types.hpp"
- #include "MexInterface.hpp"
---- a/libs/libFreeMat/Interpreter.cpp
-+++ b/libs/libFreeMat/Interpreter.cpp
-@@ -18,8 +18,8 @@
-  */
- 
- #include "Interpreter.hpp"
--#include <math.h>
--#include <stdio.h>
-+#include <cmath>
-+#include <cstdio>
- #include "Exception.hpp"
- #include "Math.hpp"
- #include "Array.hpp"
-@@ -29,14 +29,14 @@
- #include "Token.hpp"
- #include "Module.hpp"
- #include "File.hpp"
--#include <signal.h>
-+#include <csignal>
- #include "Class.hpp"
- #include "Print.hpp"
- #include "MemPtr.hpp"
- #include <qeventloop.h>
- #include <QtCore>
- #include <fstream>
--#include <stdarg.h>
-+#include <cstdarg>
- #include "JIT.hpp"
- #include "JITFunc.hpp"
- #include "JITInfo.hpp"
---- a/libs/libFreeMat/LAPACK.hpp
-+++ b/libs/libFreeMat/LAPACK.hpp
-@@ -20,7 +20,7 @@
- #ifndef __FMLAPACK_hpp__
- #define __FMLAPACK_hpp__
- 
--#include <string.h>
-+#include <cstring>
- 
- // Lapack routines used are declared here
- extern "C" {
---- a/libs/libFreeMat/LeastSquaresSolver.cpp
-+++ b/libs/libFreeMat/LeastSquaresSolver.cpp
-@@ -19,8 +19,8 @@
- 
- #include "LeastSquaresSolver.hpp"
- #include "LAPACK.hpp"
--#include <stdlib.h>
--#include <stdio.h>
-+#include <cstdlib>
-+#include <cstdio>
- #include "MemPtr.hpp"
- #include "Algorithms.hpp"
- 
---- a/libs/libFreeMat/LinearEqSolver.cpp
-+++ b/libs/libFreeMat/LinearEqSolver.cpp
-@@ -19,8 +19,8 @@
- 
- #include "LinearEqSolver.hpp"
- #include "LAPACK.hpp"
--#include <stdlib.h>
--#include <stdio.h>
-+#include <cstdlib>
-+#include <cstdio>
- #include <iostream>
- #include "MemPtr.hpp"
- #include "SparseCCS.hpp"
---- a/libs/libFreeMat/Malloc.cpp
-+++ b/libs/libFreeMat/Malloc.cpp
-@@ -19,9 +19,9 @@
- 
- #include "Malloc.hpp"
- #include "Exception.hpp"
--#include <stdlib.h>
--#include <stdio.h>
--#include <string.h>
-+#include <cstdlib>
-+#include <cstdio>
-+#include <cstring>
- 
- void* Malloc(int count) {
-   void* ptr;
---- a/libs/libFreeMat/Math.cpp
-+++ b/libs/libFreeMat/Math.cpp
-@@ -28,7 +28,7 @@
- #include "SparseMatrix.hpp"
- #include "Complex.hpp"
- #include "Operators.hpp"
--#include <math.h>
-+#include <cmath>
- #include "IEEEFP.hpp"
- 
- template <typename T>
---- a/libs/libFreeMat/Print.hpp
-+++ b/libs/libFreeMat/Print.hpp
-@@ -23,8 +23,8 @@
- #include <vector>
- #include <list>
- #include <string>
--#include <stdlib.h>
--#include <stdio.h>
-+#include <cstdlib>
-+#include <cstdio>
- #include "Array.hpp"
- 
- class Interpreter;
---- a/libs/libFreeMat/QRDecompose.cpp
-+++ b/libs/libFreeMat/QRDecompose.cpp
-@@ -19,8 +19,8 @@
- 
- #include "QRDecompose.hpp"
- #include "LAPACK.hpp"
--#include <stdlib.h>
--#include <stdio.h>
-+#include <cstdlib>
-+#include <cstdio>
- #include "Malloc.hpp"
- 
- #define MIN(a,b) (((a) < (b)) ? (a) : (b))
---- a/libs/libFreeMat/Scanner.cpp
-+++ b/libs/libFreeMat/Scanner.cpp
-@@ -18,9 +18,10 @@
-  */
- #include "Scanner.hpp"
- #include <iostream>
--#include <stdio.h>
--#include <stdlib.h>
--#include <ctype.h>
-+#include <algorithm>
-+#include <cstdio>
-+#include <cstdlib>
-+#include <cctype>
- #include "Exception.hpp"
- #include <algorithm>
- #include <QMutexLocker>
---- a/libs/libFreeMat/Scope.hpp
-+++ b/libs/libFreeMat/Scope.hpp
-@@ -24,6 +24,7 @@
-  * A Scope is a combination of a variable hashtable and a function hashtable.
-  */
- #include <string>
-+#include <algorithm>
- #include <QMutex>
- #include <QHash>
- #include <algorithm>
---- a/libs/libFreeMat/Serialize.cpp
-+++ b/libs/libFreeMat/Serialize.cpp
-@@ -21,7 +21,7 @@
- #include "Exception.hpp"
- #include "Algorithms.hpp"
- #include "Struct.hpp"
--#include <stdio.h>
-+#include <cstdio>
- #include "SparseCCS.hpp"
- #include <QtEndian>
- 
---- a/libs/libFreeMat/Token.cpp
-+++ b/libs/libFreeMat/Token.cpp
-@@ -18,8 +18,8 @@
-  */
- #include "Token.hpp"
- #include "Serialize.hpp"
--#include <errno.h>
--#include <limits.h>
-+#include <cerrno>
-+#include <climits>
- 
- Token::Token(TokenValueType tok, unsigned pos, QString text) :
-   m_tok(tok), m_pos(pos), m_text(text) { }
---- a/libs/libGraphics/HandleCommands.cpp
-+++ b/libs/libGraphics/HandleCommands.cpp
-@@ -26,7 +26,7 @@
- #include <qgl.h>
- #include <QtGui>
- #include <QtSvg>
--#include <ctype.h>
-+#include <cctype>
- #include <algorithm>
- #include "HandleLineSeries.hpp"
- #include "HandleObject.hpp"
---- a/libs/libMex/mxArray.cpp
-+++ b/libs/libMex/mxArray.cpp
-@@ -17,8 +17,8 @@
-  *
-  */
- #include "mex.h"
--#include <string.h>
--#include <stdlib.h>
-+#include <cstring>
-+#include <cstdlib>
- #include <set>
- #include <string>
- 
---- a/libs/libXP/System.cpp
-+++ b/libs/libXP/System.cpp
-@@ -18,7 +18,7 @@
-  */
- #include "System.hpp"
- #include "Exception.hpp"
--#include <stdlib.h>
-+#include <cstdlib>
- #include <QProcess>
- #include <QtGui>
- #ifdef Q_OS_WIN32
---- a/src/DumbTerminal.cpp
-+++ b/src/DumbTerminal.cpp
-@@ -20,7 +20,7 @@
- #include "DumbTerminal.hpp"
- #include <qapplication.h>
- #include <qeventloop.h>
--#include <stdio.h>
-+#include <cstdio>
- #if !defined(_MSC_VER ) 
- #include <unistd.h>
- #else
---- a/src/MainApp.cpp
-+++ b/src/MainApp.cpp
-@@ -51,7 +51,7 @@ static FMEditor *edit = NULL;
- #include <unistd.h>
- #include <fcntl.h>
- #include <qsocketnotifier.h>
--#include <signal.h>
-+#include <csignal>
- #include <unistd.h>
- #include <iostream>
- 
---- a/src/Terminal.cpp
-+++ b/src/Terminal.cpp
-@@ -19,14 +19,14 @@
- #include <qapplication.h>
- #include "Serialize.hpp"
- #include "Terminal.hpp"
--#include <errno.h>
-+#include <cerrno>
- #if !defined(_MSC_VER ) 
- #include <unistd.h>
- #endif
- 
--#include <stdio.h>
--#include <stdlib.h>
--#include <string.h>
-+#include <cstdio>
-+#include <cstdlib>
-+#include <cstring>
- #ifdef Q_WS_X11
- #include <term.h>
- #include <curses.h>
---- a/src/main.cpp
-+++ b/src/main.cpp
-@@ -25,9 +25,9 @@
- #include <fstream>
- #include <iostream>
- #endif
--#include <signal.h>
--#include <stdio.h>
--#include <stdlib.h>
-+#include <csignal>
-+#include <cstdio>
-+#include <cstdlib>
- #include "MainApp.hpp"
- #include <qapplication.h>
- #include "Exception.hpp"
diff --git a/debian/patches/07_fix_FTBFS_with_GCC_4.4.patch b/debian/patches/07_fix_FTBFS_with_GCC_4.4.patch
index f5c6cf7..9fc1046 100644
--- a/debian/patches/07_fix_FTBFS_with_GCC_4.4.patch
+++ b/debian/patches/07_fix_FTBFS_with_GCC_4.4.patch
@@ -1,7 +1,9 @@
 Author: Giuseppe Iuculano <giuseppe at iuculano.it>
 Description: Fix FTBFS with GCC 4.4: missing #include (Closes: #505135)
---- a/libs/libFreeMat/IEEEFP.cpp
-+++ b/libs/libFreeMat/IEEEFP.cpp
+Index: FreeMat-4.2-Source/libs/libFreeMat/IEEEFP.cpp
+===================================================================
+--- FreeMat-4.2-Source.orig/libs/libFreeMat/IEEEFP.cpp
++++ FreeMat-4.2-Source/libs/libFreeMat/IEEEFP.cpp
 @@ -17,6 +17,7 @@
   *
   */
diff --git a/debian/patches/09_warning.patch b/debian/patches/09_warning.patch
deleted file mode 100644
index 2655337..0000000
--- a/debian/patches/09_warning.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-ask in the warning if freemat-help was installed
---- a/libs/libCore/helpwidget.cpp
-+++ b/libs/libCore/helpwidget.cpp
-@@ -148,7 +148,7 @@ HelpWidget::HelpWidget(QString url, Help
-   // Populate the list widget
-   QFile *file = new QFile(url + "/modules.txt");
-   if (!file->open(QFile::ReadOnly | QIODevice::Text))
--    QMessageBox::warning(this,"Cannot Find Module List","The file modules.txt is missing from the directory "+url+" where I think help files should be.  The Topic List widget will not function properly.",QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton);
-+    QMessageBox::warning(this,"Cannot Find Module List","The file modules.txt is missing from the directory "+url+" where I think help files should be (Have you installed freemat-help package?).  The Topic List widget will not function properly.",QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton);
-   else {
-     QTextStream t(file);
-     while (!t.atEnd()) {
-@@ -177,7 +177,7 @@ HelpWidget::HelpWidget(QString url, Help
-   file = new QFile(url + "/sectable.txt");
-   QRegExp reg("\\+\\s*\\((\\b\\w+\\b)\\)\\s*(\\b.*)");
-   if (!file->open(QFile::ReadOnly | QIODevice::Text))
--    QMessageBox::warning(this,"Cannot Find Section Index","The file sectable.txt is missing from the directory "+url+" where I think help files should be.  The Index widget will not function properly.",QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton);
-+    QMessageBox::warning(this,"Cannot Find Section Index","The file sectable.txt is missing from the directory "+url+" where I think help files should be (Have you installed freemat-help package?).  The Index widget will not function properly.",QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton);
-   else {
-     QTextStream t(file);
-     QTreeWidgetItem *prev = NULL;
diff --git a/debian/patches/10_llvm.patch b/debian/patches/10_llvm.patch
deleted file mode 100644
index 0acc79e..0000000
--- a/debian/patches/10_llvm.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Force llvm version to 2.6
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -281,7 +281,7 @@ IF( USE_LLVM )
- 		  ${LIB_LLVMScalarOpts} ${LIB_LLVMTransformUtils} ${LIB_LLVMipa} ${LIB_LLVMAnalysis} 
- 		  ${LIB_LLVMTarget} ${LIB_LLVMCore} ${LIB_LLVMSupport} ${LIB_LLVMSystem} 
- 		  CACHE STRING "LLVM Link Libraries" )
--	set(LLVM_VERSION "2.5" CACHE STRING "LLVM Version found")
-+	set(LLVM_VERSION "2.6" CACHE STRING "LLVM Version found")
-     endif (LLVM_INCLUDE_DIR)
-   else (MSVC)
-     find_program(LLVM_CONFIG llvm-config)
-@@ -291,15 +291,15 @@ IF( USE_LLVM )
-     execute_process(COMMAND ${LLVM_CONFIG} --version OUTPUT_VARIABLE LLVM_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
-     separate_arguments(LLVM_LIBS) 
-   endif (MSVC)
--  if (NOT LLVM_VERSION STREQUAL "2.5")
--    message(FATAL_ERROR "LLVM version 2.5 required.")
-+  if (NOT LLVM_VERSION STREQUAL "2.6")
-+    message(FATAL_ERROR "LLVM version 2.6 required.")
-     set(USE_LLVM FALSE)
--  else (NOT LLVM_VERSION STREQUAL "2.5") 
-+  else (NOT LLVM_VERSION STREQUAL "2.6") 
-     set(LLVM_FOUND TRUE)
-     include_directories( ${LLVM_INCLUDE_DIR} )
-     add_definitions( -DHAVE_LLVM )
-     SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${LLVM_LIBS})
--  endif (NOT LLVM_VERSION STREQUAL "2.5")
-+  endif (NOT LLVM_VERSION STREQUAL "2.6")
- ENDIF (USE_LLVM)
- 
- 
diff --git a/debian/patches/11_ftbfs_qt48.patch b/debian/patches/11_ftbfs_qt48.patch
deleted file mode 100644
index 74420dd..0000000
--- a/debian/patches/11_ftbfs_qt48.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Description: Include glu.h to fix build with qt4.8
-Author: Andreas Moog <amoog at ubuntu.com>
-Bug-Ubuntu: https://launchpad.net/bugs/935092
-
---- freemat-4.0.orig/libs/libGraphics/GLRenderEngine.cpp
-+++ freemat-4.0/libs/libGraphics/GLRenderEngine.cpp
-@@ -22,6 +22,7 @@
- #include <QtOpenGL>
- #include <math.h>
- #include "IEEEFP.hpp"
-+#include <GL/glu.h>
- 
- GLRenderEngine::GLRenderEngine(QGLWidget *widget, double x1, double y1,
- 			       double width, double height) {
diff --git a/debian/patches/12_update_clang_deps.patch b/debian/patches/12_update_clang_deps.patch
new file mode 100644
index 0000000..4ffd1d5
--- /dev/null
+++ b/debian/patches/12_update_clang_deps.patch
@@ -0,0 +1,166 @@
+Description: Let new 4.2 version to be use clang llvm compiler
+Author: Anton Gladky <gladk at debian.org>
+Last-Update: 2016-01-22
+
+--- freemat-4.2.orig/CMakeLists.txt
++++ freemat-4.2/CMakeLists.txt
+@@ -40,7 +40,7 @@ IF( MSVC )
+ 	ADD_DEFINITIONS( /Dsnprintf=_snprintf /DNOMINMAX /DFREEMAT_VERSION="${VERSION}" /DRESOURCEDIR="${RESOURCEDIR}")
+ 	#	ADD_DEFINITIONS( /D_HAS_ITERATOR_DEBUGGING=0 /D_SECURE_SCL=0 )
+ ELSE( MSVC )
+-	ADD_DEFINITIONS( -DFREEMAT_VERSION="${VERSION}" -DRESOURCEDIR="${RESOURCEDIR}")
++	ADD_DEFINITIONS( -DFREEMAT_VERSION="${VERSION}" -DRESOURCEDIR="${RESOURCEDIR}" -std=c++11)
+ 	SET(CMAKE_SHARED_MODULE_LINK_FLAGS "${CMAKE_SHARED_MODULE_LINK_FLAGS} -export-dynamic")
+ 	SET(CMAKE_SHARED_MODULE_LINK_CXX_FLAGS "${CMAKE_SHARED_MODULE_LINK_CXX_FLAGS} -export-dynamic")
+ ENDIF( MSVC )
+@@ -250,15 +250,15 @@ endif()
+ ######################################################################
+ OPTION(USE_LLVM "Build with LLVM support?" ON)
+ 
+-FIND_PACKAGE(LLVM)
+-FIND_PACKAGE(CLANG)
++FIND_PACKAGE(LLVM REQUIRED)
+ 
+-IF (LLVM_FOUND AND CLANG_FOUND)
++IF (LLVM_FOUND)
+   add_definitions(-DHAVE_LLVM)
+   include_directories(${LLVM_INCLUDE_DIRS})
+   link_directories(${LLVM_LIBRARY_DIRS})
+-  llvm_map_components_to_libraries(REQ_LLVM_LIBRARIES jit interpreter nativecodegen asmparser bitreader bitwriter codegen ipo linker selectiondag instrumentation)
+-  set(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${CLANG_LIBRARIES} ${REQ_LLVM_LIBRARIES})
++  llvm_map_components_to_libnames(REQ_LLVM_LIBRARIES executionengine option IRReader lto interpreter nativecodegen asmparser bitreader bitwriter codegen ipo linker selectiondag instrumentation)
++  
++  set(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${CLANG_LIBRARIES};clang;clangAnalysis;clangApplyReplacements;clangARCMigrate;clangAST;clangASTMatchers;clangBasic;clangCodeGen;clangDriver;clangDynamicASTMatchers;clangEdit;clangFormat;clangFrontend;clangFrontendTool;clangIndex;clangLex;clangParse;clangQuery;clangRename;clangRewrite;clangRewriteFrontend;clangSema;clangSerialization;clangStaticAnalyzerCheckers;clangStaticAnalyzerCore;clangStaticAnalyzerFrontend;clangTidy;clangTidyGoogleModule;clangTi [...]
+ ENDIF()
+ 
+ ##############################################################################
+--- freemat-4.2.orig/libs/libMatC/CJitFuncClang.cpp
++++ freemat-4.2/libs/libMatC/CJitFuncClang.cpp
+@@ -2,6 +2,7 @@
+ #include "CArray.hpp"
+ #include <iostream>
+ #include <fstream>
++#include <memory>
+ 
+ #include "clang/CodeGen/CodeGenAction.h"
+ #include "clang/Driver/Compilation.h"
+@@ -14,13 +15,11 @@
+ #include "clang/Frontend/FrontendDiagnostic.h"
+ #include "clang/Frontend/TextDiagnosticPrinter.h"
+ 
+-#include "llvm/LLVMContext.h"
+-#include "llvm/Module.h"
++#include "llvm/IR/LLVMContext.h"
++#include "llvm/IR/Module.h"
+ #include "llvm/Config/config.h"
+-#include "llvm/ADT/OwningPtr.h"
+ #include "llvm/ADT/SmallString.h"
+ #include "llvm/Config/config.h"
+-#include "llvm/LLVMContext.h"
+ #include "llvm/ExecutionEngine/ExecutionEngine.h"
+ #include "llvm/ExecutionEngine/GenericValue.h"
+ #include "llvm/Support/ManagedStatic.h"
+@@ -32,10 +31,10 @@
+ #include "llvm/Support/TargetSelect.h"
+ #include "llvm/Target/TargetOptions.h"
+ 
+-#include "llvm/Constants.h"
+-#include "llvm/DerivedTypes.h"
+-#include "llvm/Instructions.h"
+-#include "llvm/ExecutionEngine/JIT.h"
++#include "llvm/IR/Constants.h"
++#include "llvm/IR/DerivedTypes.h"
++#include "llvm/IR/Instructions.h"
++//#include "llvm/ExecutionEngine/JIT.h"
+ //#include "llvm/ExecutionEngine/Interpreter.h"
+ 
+ 
+@@ -73,7 +72,6 @@ bool CJitFuncClang::compile(const std::s
+   llvm::IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
+   DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagClient);
+   Driver TheDriver("", llvm::sys::getDefaultTargetTriple(),
+-                   "a.out", /*IsProduction=*/false,
+                    Diags);
+   TheDriver.setTitle("FreeMat JIT");
+   llvm::SmallVector<const char *, 16> Args;
+@@ -83,51 +81,54 @@ bool CJitFuncClang::compile(const std::s
+   Args.push_back("-O3");
+   Args.push_back("-v");
+   Args.push_back("-fno-exceptions");
+-  llvm::OwningPtr<Compilation> C(TheDriver.BuildCompilation(Args));
++  std::unique_ptr<Compilation> C(TheDriver.BuildCompilation(Args));
+   if (!C) return false;
+   const driver::JobList &Jobs = C->getJobs();
+   if (Jobs.size() != 1 || !isa<driver::Command>(*Jobs.begin())) {
+     llvm::SmallString<256> Msg;
+     llvm::raw_svector_ostream OS(Msg);
+-    C->PrintJob(OS, C->getJobs(), "; ", true);
++    Jobs.Print(OS, "; ", true);
+     Diags.Report(diag::err_fe_expected_compiler_job) << OS.str();
+     return false;
+   }
+-  const driver::Command *Cmd = cast<driver::Command>(*Jobs.begin());
+-  if (llvm::StringRef(Cmd->getCreator().getName()) != "clang") {
++  const driver::Command Cmd = cast<driver::Command>(*Jobs.begin());
++  if (llvm::StringRef(Cmd.getCreator().getName()) != "clang") {
+     Diags.Report(diag::err_fe_expected_clang_command);
+     return false;
+   }
+   // Initialize a compiler invocation object from the clang (-cc1) arguments.
+-  const driver::ArgStringList &CCArgs = Cmd->getArguments();
+-  llvm::OwningPtr<CompilerInvocation> CI(new CompilerInvocation);
++  const driver::ArgStringList &CCArgs = Cmd.getArguments();
++  std::unique_ptr<CompilerInvocation> CI(new CompilerInvocation);
+   CompilerInvocation::CreateFromArgs(*CI,
+                                      const_cast<const char **>(CCArgs.data()),
+                                      const_cast<const char **>(CCArgs.data()) +
+                                        CCArgs.size(),
+                                      Diags);
+   QString path = GetRootPath() + "/toolbox/jit";
+-  CI->getHeaderSearchOpts().AddPath(path.toStdString().c_str(),frontend::Quoted,true,false,false);
++  //CI->getHeaderSearchOpts().AddPath(path.toStdString().c_str(),frontend::Quoted,true,false,false);
+ 
+   // FIXME: This is copied from cc1_main.cpp; simplify and eliminate.
+   // Create a compiler instance to handle the actual work.
+   comp = new clang::CompilerInstance;
+-  comp->setInvocation(CI.take());
++  comp->setInvocation(CI.get());
+   // Create the compilers actual diagnostics engine.
+-  comp->createDiagnostics(int(CCArgs.size()),const_cast<char**>(CCArgs.data()));
++  DiagnosticConsumer ClientDia;
++  comp->createDiagnostics(&ClientDia);
+   if (!comp->hasDiagnostics()) return false;
+   // Create and execute the frontend to generate an LLVM bitcode module.
+   // Pass the LLVM context to the code gen action.  Otherwise, the action
+   // creates a new context and then promptly deletes it when it goes out
+   // of scope. :P
+-  llvm::OwningPtr<CodeGenAction> Act(new EmitLLVMOnlyAction(ctxt));
++  std::unique_ptr<CodeGenAction> Act(new EmitLLVMOnlyAction(ctxt));
+   if (!comp->ExecuteAction(*Act)) return false;
+   std::cout << "Compilation complete...";
+-  if (llvm::Module *Module = Act->takeModule())
++  
++  std::unique_ptr<llvm::Module> Module (Act->takeModule().get());
++  if (Module)
+     {
+       llvm::outs() << *Module;
+       std::string Error;
+-      EE = llvm::EngineBuilder(Module).create();
++      EE = llvm::EngineBuilder(move(Module)).create();
+       if (!EE) return false;
+       func =  Module->getFunction(funcname);
+       return true;
+--- freemat-4.2.orig/libs/libMatC/CJitFuncClang.hpp
++++ freemat-4.2/libs/libMatC/CJitFuncClang.hpp
+@@ -4,9 +4,9 @@
+ #include <stdint.h>
+ #include <string>
+ 
+-#include "llvm/Function.h"
++#include "llvm/IR/Function.h"
+ #include "llvm/ExecutionEngine/ExecutionEngine.h"
+-#include "llvm/LLVMContext.h"
++#include "llvm/IR/LLVMContext.h"
+ #include "clang/Frontend/CompilerInstance.h"
+ #include "CJitFunc.hpp"
+ 
diff --git a/debian/patches/14_disable_pdf_install.patch b/debian/patches/14_disable_pdf_install.patch
new file mode 100644
index 0000000..af04efd
--- /dev/null
+++ b/debian/patches/14_disable_pdf_install.patch
@@ -0,0 +1,15 @@
+Description: Do not install removed PDF
+Author: Anton Gladky <gladk at debian.org> 
+Last-Update: 2016-01-22
+
+--- freemat-4.2.orig/CMakeLists.txt
++++ freemat-4.2/CMakeLists.txt
+@@ -321,7 +321,7 @@ IF(UNIX AND NOT WIN32 AND NOT APPLE)
+   INSTALL(DIRECTORY tests DESTINATION ${INST_DIR}/toolbox PATTERN "*" PATTERN ".svn" EXCLUDE PATTERN "CMakeLists.txt" EXCLUDE PERMISSIONS WORLD_READ )
+   INSTALL(DIRECTORY help/html DESTINATION "${INST_DIR}/help" PATTERN "*" PATTERN ".svn" EXCLUDE PERMISSIONS WORLD_READ )
+   INSTALL(DIRECTORY help/text DESTINATION "${INST_DIR}/help" PATTERN "*" PATTERN ".svn" EXCLUDE PERMISSIONS WORLD_READ )
+-  INSTALL(FILES "help/latex/FreeMat-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.pdf" DESTINATION "${INST_DIR}/help/pdf" )
++  #INSTALL(FILES "help/latex/FreeMat-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.pdf" DESTINATION "${INST_DIR}/help/pdf" )
+ ENDIF(UNIX AND NOT WIN32 AND NOT APPLE)
+ 
+ IF(WIN32)
diff --git a/debian/patches/gcc4.5.patch b/debian/patches/gcc4.5.patch
deleted file mode 100644
index 405a13d..0000000
--- a/debian/patches/gcc4.5.patch
+++ /dev/null
@@ -1,205 +0,0 @@
-Fix FTBFS with gcc4.5
---- a/libs/libFreeMat/Array.cpp
-+++ b/libs/libFreeMat/Array.cpp
-@@ -465,7 +465,7 @@ void Array::resize(index_t size) {
- 
- void Array::set(const QString& field, ArrayVector& data) {
-   if (isEmpty() && m_type.Class != Struct)
--    *this = Array::Array(Struct);
-+    *this = Array(Struct);
-   if (m_type.Class != Struct) throw Exception("Unsupported type for A.field=B");
-   StructArray &rp(structPtr());
-   if (isEmpty()) 
---- a/libs/libFreeMat/Math.cpp
-+++ b/libs/libFreeMat/Math.cpp
-@@ -1590,9 +1590,9 @@ static bool notfunc(bool t) {
- 
- Array Not(const Array& A) {
-   if (A.isScalar())
--    return Array::Array(!A.toClass(Bool).constRealScalar<bool>());
-+    return Array(!A.toClass(Bool).constRealScalar<bool>());
-   const Array &Abool(A.toClass(Bool));
--  return Array::Array(Apply(Abool.constReal<bool>(),notfunc));
-+  return Array(Apply(Abool.constReal<bool>(),notfunc));
- }
- 
- Array Plus(const Array& A) {
---- a/libs/libFreeMat/Operators.hpp
-+++ b/libs/libFreeMat/Operators.hpp
-@@ -142,11 +142,11 @@ Array DotOp(const Array &Ain, const Arra
-   if (!Bcast.isScalar()) Bcast = Bcast.asDenseArray();
-   if (Acast.isScalar() && Bcast.isScalar()) {
-     if (Acast.allReal() && Bcast.allReal()) {
--      F = Array::Array(Op::func(Acast.constRealScalar<T>(),
-+      F = Array(Op::func(Acast.constRealScalar<T>(),
- 				Bcast.constRealScalar<T>()));
-     } else {
-       Acast.forceComplex(); Bcast.forceComplex();
--      F = Array::Array(T(0),T(0));
-+      F = Array(T(0),T(0));
-       Op::func(Acast.constRealScalar<T>(),
- 	       Acast.constImagScalar<T>(),
- 	       Bcast.constRealScalar<T>(),
-@@ -155,7 +155,7 @@ Array DotOp(const Array &Ain, const Arra
-     }
-   } else if (Acast.isScalar()) {
-     if (Acast.allReal() && Bcast.allReal()) {
--      F = Array::Array(Tclass,Bcast.dimensions());
-+      F = Array(Tclass,Bcast.dimensions());
-       T* ret = F.real<T>().data();
-       const T& Ap = Acast.constRealScalar<T>();
-       const T* Bp = Bcast.constReal<T>().constData();
-@@ -163,7 +163,7 @@ Array DotOp(const Array &Ain, const Arra
-       for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap,Bp[i]);
-     } else {
-       Acast.forceComplex(); Bcast.forceComplex();
--      F = Array::Array(Tclass,Bcast.dimensions());
-+      F = Array(Tclass,Bcast.dimensions());
-       T* Cr = F.real<T>().data();
-       T* Ci = F.imag<T>().data();
-       const T& Ar = Acast.constRealScalar<T>();
-@@ -175,7 +175,7 @@ Array DotOp(const Array &Ain, const Arra
-     }
-   } else if (Bcast.isScalar()) {
-     if (Bcast.allReal() && Acast.allReal()) {
--      F = Array::Array(Tclass,Acast.dimensions());
-+      F = Array(Tclass,Acast.dimensions());
-       T* ret = F.real<T>().data();
-       const T* Ap = Acast.constReal<T>().constData();
-       const T& Bp = Bcast.constRealScalar<T>();
-@@ -183,7 +183,7 @@ Array DotOp(const Array &Ain, const Arra
-       for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap[i],Bp);
-     } else { 
-       Acast.forceComplex(); Bcast.forceComplex();
--      F = Array::Array(Tclass,Acast.dimensions());
-+      F = Array(Tclass,Acast.dimensions());
-       T* Cr = F.real<T>().data();
-       T* Ci = F.imag<T>().data();
-       const T* Ar = Acast.constReal<T>().constData();
-@@ -197,7 +197,7 @@ Array DotOp(const Array &Ain, const Arra
-     if (Acast.dimensions() != Bcast.dimensions())
-       throw Exception("size mismatch in arguments to binary operator");
-     if (Bcast.allReal() && Acast.allReal()) {
--      F = Array::Array(Tclass,Acast.dimensions());
-+      F = Array(Tclass,Acast.dimensions());
-       T* ret = F.real<T>().data();
-       const T* Ap = Acast.constReal<T>().constData();
-       const T* Bp = Bcast.constReal<T>().constData();
-@@ -205,7 +205,7 @@ Array DotOp(const Array &Ain, const Arra
-       for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap[i],Bp[i]);
-     } else {
-       Acast.forceComplex(); Bcast.forceComplex();
--      F = Array::Array(Tclass,Acast.dimensions());
-+      F = Array(Tclass,Acast.dimensions());
-       T* Cr = F.real<T>().data();
-       T* Ci = F.imag<T>().data();
-       const T* Ar = Acast.constReal<T>().constData();
-@@ -328,17 +328,17 @@ static inline Array CmpOp(const Array &A
-   if (!Acast.isScalar()) Acast = Acast.asDenseArray();
-   if (!Bcast.isScalar()) Bcast = Bcast.asDenseArray();
-   if (Acast.isScalar() && Bcast.isScalar()) {
--    F = Array::Array(Op::func(Acast.constRealScalar<T>(),
-+    F = Array(Op::func(Acast.constRealScalar<T>(),
- 			      Bcast.constRealScalar<T>()));
-   } else if (Acast.isScalar()) {
--    F = Array::Array(Bool,Bcast.dimensions());
-+    F = Array(Bool,Bcast.dimensions());
-     bool* ret = F.real<bool>().data();
-     const T& Ap = Acast.constRealScalar<T>();
-     const T* Bp = Bcast.constReal<T>().constData();
-     uint64 q = uint64(Bcast.length());
-     for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap,Bp[i]);
-   } else if (Bcast.isScalar()) {
--    F = Array::Array(Bool,Acast.dimensions());
-+    F = Array(Bool,Acast.dimensions());
-     bool* ret = F.real<bool>().data();
-     const T* Ap = Acast.constReal<T>().constData();
-     const T& Bp = Bcast.constRealScalar<T>();
-@@ -347,7 +347,7 @@ static inline Array CmpOp(const Array &A
-   } else {
-     if (Acast.dimensions() != Bcast.dimensions())
-       throw Exception("size mismatch in arguments to binary operator");
--    F = Array::Array(Bool,Acast.dimensions());
-+    F = Array(Bool,Acast.dimensions());
-     bool* ret = F.real<bool>().data();
-     const T* Ap = Acast.constReal<T>().constData();
-     const T* Bp = Bcast.constReal<T>().constData();
-@@ -395,18 +395,18 @@ static inline Array EqOp(const Array &Ai
-   if (!Bcast.isScalar()) Bcast = Bcast.asDenseArray();
-   if (Acast.isScalar() && Bcast.isScalar()) {
-     if (Acast.allReal() && Bcast.allReal()) {
--      F = Array::Array(Op::func(Acast.constRealScalar<T>(),
-+      F = Array(Op::func(Acast.constRealScalar<T>(),
- 				Bcast.constRealScalar<T>()));
-     } else {
-       Acast.forceComplex(); Bcast.forceComplex();
--      F = Array::Array(Op::func(Acast.constRealScalar<T>(),
-+      F = Array(Op::func(Acast.constRealScalar<T>(),
- 				Acast.constImagScalar<T>(),
- 				Bcast.constRealScalar<T>(),
- 				Bcast.constImagScalar<T>()));
-     }
-   } else if (Acast.isScalar()) {
-     if (Acast.allReal() && Bcast.allReal()) {
--      F = Array::Array(Bool,Bcast.dimensions());
-+      F = Array(Bool,Bcast.dimensions());
-       bool* ret = F.real<bool>().data();
-       const T& Ap = Acast.constRealScalar<T>();
-       const T* Bp = Bcast.constReal<T>().constData();
-@@ -414,7 +414,7 @@ static inline Array EqOp(const Array &Ai
-       for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap,Bp[i]);
-     } else {
-       Acast.forceComplex(); Bcast.forceComplex();
--      F = Array::Array(Bool,Bcast.dimensions());
-+      F = Array(Bool,Bcast.dimensions());
-       bool* ret = F.real<bool>().data();
-       const T& Ar = Acast.constRealScalar<T>();
-       const T& Ai = Acast.constImagScalar<T>();
-@@ -425,7 +425,7 @@ static inline Array EqOp(const Array &Ai
-     }
-   } else if (Bcast.isScalar()) {
-     if (Bcast.allReal() && Acast.allReal()) {
--      F = Array::Array(Bool,Acast.dimensions());
-+      F = Array(Bool,Acast.dimensions());
-       bool* ret = F.real<bool>().data();
-       const T* Ap = Acast.constReal<T>().constData();
-       const T& Bp = Bcast.constRealScalar<T>();
-@@ -433,7 +433,7 @@ static inline Array EqOp(const Array &Ai
-       for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap[i],Bp);
-     } else {
-       Acast.forceComplex(); Bcast.forceComplex();
--      F = Array::Array(Bool,Acast.dimensions());
-+      F = Array(Bool,Acast.dimensions());
-       bool* ret = F.real<bool>().data();
-       const T* Ar = Acast.constReal<T>().constData();
-       const T* Ai = Acast.constImag<T>().constData();
-@@ -446,7 +446,7 @@ static inline Array EqOp(const Array &Ai
-     if (Acast.dimensions() != Bcast.dimensions())
-       throw Exception("size mismatch in arguments to binary operator");
-     if (Bcast.allReal() && Acast.allReal()) {
--      F = Array::Array(Bool,Acast.dimensions());
-+      F = Array(Bool,Acast.dimensions());
-       bool* ret = F.real<bool>().data();
-       const T* Ap = Acast.constReal<T>().constData();
-       const T* Bp = Bcast.constReal<T>().constData();
-@@ -454,7 +454,7 @@ static inline Array EqOp(const Array &Ai
-       for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap[i],Bp[i]);
-     } else {
-       Acast.forceComplex(); Bcast.forceComplex();
--      F = Array::Array(Bool,Acast.dimensions());
-+      F = Array(Bool,Acast.dimensions());
-       bool* ret = F.real<bool>().data();
-       const T* Ar = Acast.constReal<T>().constData();
-       const T* Ai = Acast.constImag<T>().constData();
-@@ -533,9 +533,9 @@ static inline Array UnaryOp(const Array
-   if (!Acast.isScalar()) Acast = Acast.asDenseArray();
-   if (Acast.isScalar()) {
-     if (Acast.allReal()) {
--      F = Array::Array(Op::func(Acast.constRealScalar<T>()));
-+      F = Array(Op::func(Acast.constRealScalar<T>()));
-     } else {
--      F = Array::Array(T(0),T(0));
-+      F = Array(T(0),T(0));
-       Op::func(Acast.constRealScalar<T>(),
- 	       Acast.constImagScalar<T>(),
- 	       F.realScalar<T>(),F.imagScalar<T>());
diff --git a/debian/patches/series b/debian/patches/series
index d30e4ff..d112661 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,3 @@
-01_gcc_includes.patch
 07_fix_FTBFS_with_GCC_4.4.patch
-09_warning.patch
-10_llvm.patch
-gcc4.5.patch
-11_ftbfs_qt48.patch
+12_update_clang_deps.patch
+14_disable_pdf_install.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/freemat.git



More information about the debian-science-commits mailing list