Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Dec 2013 10:37:31 +0000 (UTC)
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r337334 - in head: . math math/freemat math/freemat-mpi math/freemat/files
Message-ID:  <201312241037.rBOAbVIK037140@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tijl
Date: Tue Dec 24 10:37:31 2013
New Revision: 337334
URL: http://svnweb.freebsd.org/changeset/ports/337334

Log:
  - Update math/freemat to version 4.2 and clean up the port.
  - Support JIT compilation using Clang/LLVM 3.3.
  - Add desktop entry.
  - Remove math/freemat-mpi.  It has been marked IGNORE for almost 7 years
    since the removal of MPI support in FreeMat 3.0.

Added:
  head/math/freemat/files/patch-libs-libMatC-CJitFuncClang   (contents, props changed)
Deleted:
  head/math/freemat-mpi/
  head/math/freemat/files/extra-patch-libs__libFN__CMakeLists.txt
  head/math/freemat/files/extra-patch-libs__libFN__FNFun.cpp
  head/math/freemat/files/extra-patch-libs__libFN__mathfunc4.cpp
  head/math/freemat/files/patch-libs__libFreeMat__Array.cpp
  head/math/freemat/files/patch-libs__libFreeMat__Math.cpp
  head/math/freemat/files/patch-libs__libFreeMat__Operators.hpp
  head/math/freemat/files/patch-libs__libGraphics__GLRenderEngine.cpp
  head/math/freemat/files/patch-libs__thirdparty__pcre__pcreposix.c
  head/math/freemat/pkg-plist
Modified:
  head/MOVED
  head/math/Makefile
  head/math/freemat/Makefile
  head/math/freemat/distinfo   (contents, props changed)
  head/math/freemat/files/patch-CMakeLists.txt   (contents, props changed)
  head/math/freemat/files/patch-libs__libFN__fdlibm.h   (contents, props changed)
  head/math/freemat/pkg-descr   (contents, props changed)

Modified: head/MOVED
==============================================================================
--- head/MOVED	Tue Dec 24 10:22:26 2013	(r337333)
+++ head/MOVED	Tue Dec 24 10:37:31 2013	(r337334)
@@ -5339,3 +5339,4 @@ deskutils/libopensync-plugin-python-deve
 deskutils/libopensync-plugin-synce-devel||2013-12-22|Removed, unmaintained, depends on deskutils/libopensync-plugin-python-devel
 net-im/libmsn||2013-12-22|Has expired: Primary MSN Messenger service terminated 30 APR 2013
 lang/clang||2013-12-22|Has expired: Migrate to lang/clang32 or newer
+math/freemat-mpi||2013-12-23|Obsolete since FreeMat 3.0

Modified: head/math/Makefile
==============================================================================
--- head/math/Makefile	Tue Dec 24 10:22:26 2013	(r337333)
+++ head/math/Makefile	Tue Dec 24 10:37:31 2013	(r337334)
@@ -127,7 +127,6 @@
     SUBDIR += fpc-numlib
     SUBDIR += freefem
     SUBDIR += freemat
-    SUBDIR += freemat-mpi
     SUBDIR += fricas
     SUBDIR += fxt
     SUBDIR += galculator

Modified: head/math/freemat/Makefile
==============================================================================
--- head/math/freemat/Makefile	Tue Dec 24 10:22:26 2013	(r337333)
+++ head/math/freemat/Makefile	Tue Dec 24 10:37:31 2013	(r337334)
@@ -1,121 +1,52 @@
 # Created by: Thierry Thomas <thierry@pompo.net>
 # $FreeBSD$
 
-PORTNAME=		FreeMat
-PORTVERSION=		4.0
+PORTNAME=	FreeMat
+PORTVERSION=	4.2
 DISTVERSIONSUFFIX=	-Source
-PORTREVISION=	6
-CATEGORIES=		math science
-MASTER_SITES=		SF
-MASTER_SITE_SUBDIR=	freemat/FreeMat4
-.ifdef WITH_MPI
-PKGNAMESUFFIX=		-mpi
-.endif
-
-MAINTAINER=		ports@FreeBSD.org
-COMMENT=		An environment for rapid engineering and scientific processing
-
-LIB_DEPENDS=		lapack.4:${PORTSDIR}/math/lapack	\
-			pcre.3:${PORTSDIR}/devel/pcre
-
-LICENSE=		GPLv2
-
-WRKSRC=			${WRKDIR}/${PORTNAME}-${PORTVERSION}.1${DISTVERSIONSUFFIX}
-
-.ifdef WITH_MPI
-IGNORE=			no MPI support at the moment
-.endif
-
-USE_FORTRAN=		yes
-FFLAGS+=		-O2
-
-USE_GL=			yes
-USES=			cmake pkgconfig
-USE_QT4=		gui network opengl moc_build rcc_build uic_build \
-			qmake_build xml svg
-CPPFLAGS+=		${CXXFLAGS} -I${LOCALBASE}/include  ${AMDINC}
-
-SLAVEDIRS=	math/freemat-mpi
-
-DATADIR+=	${PREFIX}/share/${PORTNAME}-${PORTVERSION}
-
-.if !defined(WITHOUT_FFTW)
-LIB_DEPENDS+=	fftw3:${PORTSDIR}/math/fftw3		\
-		fftw3f:${PORTSDIR}/math/fftw3-float
-.endif
-
-.if !defined(WITHOUT_ARPACK)
-LIB_DEPENDS+=	arpack.1:${PORTSDIR}/math/arpack
-.endif
-
-.if !defined(WITHOUT_AVCALL)
-BUILD_DEPENDS+=	${LOCALBASE}/lib/libavcall.a:${PORTSDIR}/devel/ffcall
-.endif
-
-.if !defined(WITHOUT_PORTAUDIO)
-LIB_DEPENDS+=	portaudio.0:${PORTSDIR}/audio/portaudio
-.endif
-
-NO_STAGE=	yes
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 800023
-# Add math functions that didn't exist until 8.x
-EXTRA_PATCHES+=	${FILESDIR}/extra-patch-libs__libFN__CMakeLists.txt \
-		${FILESDIR}/extra-patch-libs__libFN__mathfunc4.cpp \
-		${FILESDIR}/extra-patch-libs__libFN__FNFun.cpp
-.endif
-
-.if exists(${LOCALBASE}/lib/libatlas.so) && !defined(WITH_BLAS)
-WITH_ATLAS=	yes
-.endif
-.if defined(WITH_ATLAS)
-LIB_DEPENDS+=	atlas.2:${PORTSDIR}/math/atlas
-BLAS=		-lf77blas
-LAPACK=		-lalapack -lcblas
-.else
-LIB_DEPENDS+=	blas.2:${PORTSDIR}/math/blas	\
-		lapack.4:${PORTSDIR}/math/lapack
-BLAS=		-lblas
-LAPACK=		-llapack
-.endif
-
-.if !defined(WITHOUT_UMFPACK)
-LIB_DEPENDS+=	amd.1:${PORTSDIR}/math/suitesparse
-AMDINC=		-I${LOCALBASE}/include/suitesparse
-.endif
-
-pre-everything::
-.if !defined(WITH_ATLAS)
-	@${ECHO_MSG} '**********************************************************'
-	@${ECHO_MSG} '* You can define the following variables:                *'
-	@${ECHO_MSG} '* - WITH_ATLAS:       to link with atlas                 *'
-	@${ECHO_MSG} '* - WITHOUT_FFTW      remove FFTW support                *'
-	@${ECHO_MSG} '* - WITHOUT_ARPACK    remove Arpack support              *'
-	@${ECHO_MSG} '* - WITHOUT_AVCALL    remove FFCALL support              *'
-	@${ECHO_MSG} '* - WITHOUT_UMFPACK   remove UMFPACK support             *'
-	@${ECHO_MSG} '* - WITHOUT_PORTAUDIO remove Audio I/O support           *'
-	@${ECHO_MSG} '**********************************************************'
-.endif
-
-# Get rid of the generated .moc.cpp files included in the
-# upstream distro.  They should be regenerated with the
-# currently-installed version of moc-qt4.
-post-extract:
-	@cd ${WRKSRC} && ${FIND} . -name \*.moc.cpp -delete
-
-pre-configure:
-	@${RM} ${WRKSRC}/CMakeCache.txt
-
-# Avoid conflict with QT3
-post-configure:
-	@${FIND} ${WRKSRC} -name Makefile | ${XARGS}	\
-		${REINPLACE_CMD} -e '/^QT_CFLAGS/s|-I${LOCALBASE}/include ||'
+CATEGORIES=	math science
+MASTER_SITES=	SF/freemat/FreeMat4
+
+MAINTAINER=	ports@FreeBSD.org
+COMMENT=	Numerical computing environment
+
+LICENSE=	GPLv2
+
+BUILD_DEPENDS=	${LOCALBASE}/share/llvm33/cmake/LLVMConfig.cmake:${PORTSDIR}/devel/llvm33 \
+		${LOCALBASE}/llvm33/lib/libclang.a:${PORTSDIR}/lang/clang33
+LIB_DEPENDS=	libarpack.so:${PORTSDIR}/math/arpack			\
+		libblas.so:${PORTSDIR}/math/blas			\
+		libboost_math_c99.so:${PORTSDIR}/devel/boost-libs	\
+		libffi.so:${PORTSDIR}/devel/libffi			\
+		libfftw3.so:${PORTSDIR}/math/fftw3			\
+		libfftw3f.so:${PORTSDIR}/math/fftw3-float		\
+		liblapack.so:${PORTSDIR}/math/lapack			\
+		libpcre.so:${PORTSDIR}/devel/pcre			\
+		libportaudio.so:${PORTSDIR}/audio/portaudio		\
+		libumfpack.so:${PORTSDIR}/math/suitesparse
+
+USES=		cmake:outsource dos2unix fortran pkgconfig
+USE_GL=		yes
+USE_PYTHON_BUILD=	yes
+USE_QT4=	gui network opengl svg webkit xml			\
+		moc_build qmake_build rcc_build uic_build
+CMAKE_ARGS=	-DCMAKE_LIBRARY_PATH:STRING="${LOCALBASE}/llvm33/lib"	\
+		-DCMAKE_PREFIX_PATH:STRING="${LOCALBASE}/share/llvm33/cmake" \
+		-DAMD_INCLUDE_DIR:STRING="${LOCALBASE}/include/suitesparse" \
+		-DUMFPACK_INCLUDE_DIR:STRING="${LOCALBASE}/include/suitesparse"
+DOS2UNIX_FILES=	CMakeLists.txt libs/libFN/fdlibm.h
+
+CXXFLAGS+=	-I${LOCALBASE}/llvm33/include
+LDFLAGS+=	-L${LOCALBASE}/llvm33/lib
+
+DATADIR=	${PREFIX}/share/${PORTNAME}-${PORTVERSION}
+DESKTOP_ENTRIES="FreeMat" "" "${PREFIX}/share/pixmaps/freemat.png"	\
+		"FreeMat" "Science;Math;NumericalAnalysis;" "true"
+PLIST_FILES=	bin/FreeMat bin/blas.ini share/pixmaps/freemat.png
+PORTDATA=	*
 
 post-install:
-	@${ECHO_MSG}
-	@${ECHO_MSG} "===> Initializing..."
-	${PREFIX}/bin/FreeMat -i ${DATADIR}
-	@${ECHO_MSG}
+	${INSTALL_DATA} ${WRKSRC}/images/freemat_small_mod_64.png	\
+		${STAGEDIR}${PREFIX}/share/pixmaps/freemat.png
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/math/freemat/distinfo
==============================================================================
--- head/math/freemat/distinfo	Tue Dec 24 10:22:26 2013	(r337333)
+++ head/math/freemat/distinfo	Tue Dec 24 10:37:31 2013	(r337334)
@@ -1,2 +1,2 @@
-SHA256 (FreeMat-4.0-Source.tar.gz) = 6df1707c1f9e08b34e15eca8fa58bf3cf0ec8c121f64f58ca1d34a6eafd1066b
-SIZE (FreeMat-4.0-Source.tar.gz) = 38038903
+SHA256 (FreeMat-4.2-Source.tar.gz) = 5f56dc18458da72fb8143d47faeb7a66fa104f8ac9160558e032f6d2d68c9ffb
+SIZE (FreeMat-4.2-Source.tar.gz) = 106222549

Modified: head/math/freemat/files/patch-CMakeLists.txt
==============================================================================
--- head/math/freemat/files/patch-CMakeLists.txt	Tue Dec 24 10:22:26 2013	(r337333)
+++ head/math/freemat/files/patch-CMakeLists.txt	Tue Dec 24 10:37:31 2013	(r337334)
@@ -1,41 +1,20 @@
---- CMakeLists.txt.orig	2009-10-09 02:24:39.000000000 -0400
-+++ CMakeLists.txt	2010-09-23 15:07:03.000000000 -0400
-@@ -15,6 +15,20 @@
- 
- PROJECT(FreeMat CXX C )
- 
-+# skip the full RPATH for the build tree
-+SET(CMAKE_SKIP_BUILD_RPATH  TRUE)
-+
-+# when building, use the install RPATH already
-+# (so it doesn't need to relink when installing)
-+SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) 
-+
-+# the RPATH to be used when installing
-+SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
-+
-+# add the automatically determined parts of the RPATH
-+# which point to directories outside the build tree to the install RPATH
-+SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-+#
- SET(CPACK_PACKAGE_VERSION_MAJOR "4")
- SET(CPACK_PACKAGE_VERSION_MINOR "0")
- SET(VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
-@@ -217,7 +231,7 @@
-   INCLUDE_DIRECTORIES(${PORTAUDIO_SYS_INCLUDE_DIR})
-   SET (PORTAUDIO_LIBRARY ${PORTAUDIO_SYS_LIBRARY})
- ENDIF (FORCE_BUNDLED_PORTAUDIO OR NOT SYSTEM_PORTAUDIO_AVAILABLE)
--ADD_DEFINITIONS( -DHAVE_PORTAUDIO19)
-+ADD_DEFINITIONS( -DHAVE_PORTAUDIO18)
- SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${PORTAUDIO_LIBRARY})
- IF (APPLE)
-    FIND_LIBRARY(COREAUDIO_LIBRARY CoreAudio)
-@@ -245,7 +259,7 @@
- ######################################################################
- # LLVM Support
- ######################################################################
--OPTION(USE_LLVM "Build with LLVM support?" ON)
-+OPTION(USE_LLVM "Build with LLVM support?" OFF)
- 
- IF( USE_LLVM )
-   set(LLVM_FOUND FALSE)
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -204,7 +204,7 @@
+ FIND_PACKAGE(PORTAUDIO)
+ 
+ if (PORTAUDIO_FOUND)
+-  ADD_DEFINITIONS(-DHAVE_PORTAUDIO19)
++  ADD_DEFINITIONS(-DHAVE_PORTAUDIO18)
+   SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${PORTAUDIO_LIBS})
+   INCLUDE_DIRECTORIES(${PORTAUDIO_INCLUDE})
+ endif()
+@@ -257,7 +257,7 @@
+   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)
++  llvm_map_components_to_libraries(REQ_LLVM_LIBRARIES jit interpreter nativecodegen asmparser bitreader bitwriter codegen ipo linker selectiondag instrumentation irreader)
+   set(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${CLANG_LIBRARIES} ${REQ_LLVM_LIBRARIES})
+ ENDIF()
+ 

Added: head/math/freemat/files/patch-libs-libMatC-CJitFuncClang
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/freemat/files/patch-libs-libMatC-CJitFuncClang	Tue Dec 24 10:37:31 2013	(r337334)
@@ -0,0 +1,72 @@
+--- libs/libMatC/CJitFuncClang.hpp.orig
++++ 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"
+ 
+--- libs/libMatC/CJitFuncClang.cpp.orig
++++ libs/libMatC/CJitFuncClang.cpp
+@@ -14,13 +14,13 @@
+ #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/IR/LLVMContext.h"
+ #include "llvm/ExecutionEngine/ExecutionEngine.h"
+ #include "llvm/ExecutionEngine/GenericValue.h"
+ #include "llvm/Support/ManagedStatic.h"
+@@ -32,9 +32,9 @@
+ #include "llvm/Support/TargetSelect.h"
+ #include "llvm/Target/TargetOptions.h"
+ 
+-#include "llvm/Constants.h"
+-#include "llvm/DerivedTypes.h"
+-#include "llvm/Instructions.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 +73,7 @@
+   llvm::IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
+   DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagClient);
+   Driver TheDriver("", llvm::sys::getDefaultTargetTriple(),
+-                   "a.out", /*IsProduction=*/false,
++                   "a.out",
+                    Diags);
+   TheDriver.setTitle("FreeMat JIT");
+   llvm::SmallVector<const char *, 16> Args;
+@@ -107,14 +107,14 @@
+                                        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,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());
+   // Create the compilers actual diagnostics engine.
+-  comp->createDiagnostics(int(CCArgs.size()),const_cast<char**>(CCArgs.data()));
++  comp->createDiagnostics();
+   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

Modified: head/math/freemat/files/patch-libs__libFN__fdlibm.h
==============================================================================
--- head/math/freemat/files/patch-libs__libFN__fdlibm.h	Tue Dec 24 10:22:26 2013	(r337333)
+++ head/math/freemat/files/patch-libs__libFN__fdlibm.h	Tue Dec 24 10:37:31 2013	(r337334)
@@ -1,17 +1,17 @@
 --- ./libs/libFN/fdlibm.h.orig	2009-11-14 19:26:54.000000000 -0500
 +++ ./libs/libFN/fdlibm.h	2009-11-14 19:27:53.000000000 -0500
 @@ -11,13 +11,11 @@
-  */
- 
- /* REDHAT LOCAL: Include files.  */
+  */
+ 
+ /* REDHAT LOCAL: Include files.  */
 +#include <stdarg.h>
- #include <math.h>
- //#include <sys/types.h>
- //#include <machine/ieeefp.h>
- 
--typedef  __int32 __int32_t;
--typedef  unsigned __int32 __uint32_t;
--
- #define __IEEE_LITTLE_ENDIAN
- 
- /* REDHAT LOCAL: Default to XOPEN_MODE.  */
+ #include <math.h>
+ //#include <sys/types.h>
+ //#include <machine/ieeefp.h>
+ 
+-typedef  __int32 __int32_t;
+-typedef  unsigned __int32 __uint32_t;
+-
+ #define __IEEE_LITTLE_ENDIAN
+ 
+ /* REDHAT LOCAL: Default to XOPEN_MODE.  */

Modified: head/math/freemat/pkg-descr
==============================================================================
--- head/math/freemat/pkg-descr	Tue Dec 24 10:22:26 2013	(r337333)
+++ head/math/freemat/pkg-descr	Tue Dec 24 10:37:31 2013	(r337334)
@@ -1,9 +1,6 @@
-FreeMat is an environment for rapid engineering and scientific processing.
-It is similar to commercial systems such as MATLAB from Mathworks and IDL
-from Research Systems, but is Open Source.
-
-FreeMat includes several novel features such as a codeless interface to
-external C/C++/FORTRAN code, parallel/distributed algorithm development
-(via MPI), and plotting and visualization capabilities.
+FreeMat is a free environment for rapid engineering and scientific
+prototyping and data processing.  It is similar to commercial systems
+such as MATLAB from Mathworks, and IDL from Research Systems, but is
+Open Source.
 
 WWW: http://freemat.sourceforge.net/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312241037.rBOAbVIK037140>