Skip to content

Commit

Permalink
itpp: take ownership and update
Browse files Browse the repository at this point in the history
+ update release to 4.3.1;
+ create devel port at bb5c7e95 (20180529);
+ move to CMake 1.1 PG;
+ add variants for how the 4.3 series configures;
+ add patches to allow for variants to work.
  • Loading branch information
michaelld committed Jul 6, 2018
1 parent de42fa2 commit 828995f
Show file tree
Hide file tree
Showing 3 changed files with 173 additions and 10 deletions.
117 changes: 107 additions & 10 deletions math/itpp/Portfile
@@ -1,10 +1,11 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortGroup cmake 1.1

name itpp
version 4.2.0
categories math
maintainers nomaintainer
categories math science comms
maintainers {michaelld @michaelld} openmaintainer
license GPL-3+
platforms darwin
description IT++ is a C++ library of mathematical, signal processing \
Expand All @@ -14,13 +15,109 @@ long_description ${description} Its main use is in simulation of \
area of communications.
homepage https://sourceforge.net/projects/itpp/

use_bzip2 yes
distname ${name}-4.2
master_sites sourceforge:project/itpp/itpp/${version}
if {${subport} eq ${name}} {

version 4.3.1
checksums \
rmd160 2ca1bf46dc59a77703a384906f1d3fbbb1c43946 \
sha256 50717621c5dfb5ed22f8492f8af32b17776e6e06641dfe3a3a8f82c8d353b877 \
size 1289687

conflicts itpp-devel

use_bzip2 yes
distname ${name}-${version}
master_sites sourceforge:project/${name}/${name}/${version}

# patch to allow setting "Apple" for BLAS / LAPACK, and
# "MacPorts" for the build type
patchfiles-append patch-CMakeLists.txt.release.diff

}

subport itpp-devel {

long_description ${description}: \
This port is kept up with the IT++ GIT 'master' branch, which is typically updated daily to weekly. This version of IT++ generally contains fixes to, and its API is compatible with, the current IT++ release, and will be incorporated in an upcoming release. This port may or not compile or function correctly, as it represents a work in progress. If it does not work, check back in a few days. Or try deactivating the currently active IT++ port, cleaning any current builds, and trying again.

name itpp-devel
conflicts itpp

master_sites sourceforge:itpp
fetch.type git
git.url git://git.code.sf.net/p/itpp/git

git.branch bb5c7e95f40e8fdb5c3f3d01a84bcbaf76f3676d
version 20180529
checksums \
rmd160 289850cecb008f8416206bcb280e5d27325aeb17 \
sha256 9951313ca0eb69b8f7e355598c989e3cc2ea7f0887b8b18f388970960df9f3f6 \
size 4422176

# patch to allow setting "Apple" for BLAS / LAPACK, and
# "MacPorts" for the build type
patchfiles-append patch-CMakeLists.txt.devel.diff

# set livecheck
livecheck.type regex
livecheck.url https://sourceforge.net/p/itpp/git/ci/master/tree/
livecheck.version ${git.branch}
livecheck.regex "ci/(.*)/log/\\?path="

}

# FFTW3 is required

depends_lib port:fftw-3

configure.args-append \
-DFFT_INCLUDES=${prefix}/include \
-DFFT_LIBRARIES=${prefix}/lib/libfftw3.dylib

variant docs description "Install IT++ documentation" {

depends_lib-append \
port:doxygen \
path:bin/dot:graphviz \
port:xmlto

depends_build-append \
port:texlive-latex

configure.args-append \
-DHTML_DOCS=ON \
-DLATEX_COMPILER=${prefix}/bin/latex \
-DDOXYGEN_DOT_EXECUTABLE=${prefix}/bin/dot \
-DDOXYGEN_EXECUTABLE=${prefix}/bin/doxygen

}

if {![variant_isset docs]} {
configure.args-append -DHTML_DOCS=OFF
}

default_variants +docs

variant atlas conflicts accelerate description "Build IT++ with ATLAS support for BLAS" {
depends_lib-append port:atlas
configure.args-append -DBLA_VENDOR=ATLAS
}

variant accelerate conflicts atlas description "Build IT++ with Apple Accelerate support for BLAS" {
configure.args-append -DBLA_VENDOR=Apple
}

# default to +accelerate
if {![variant_isset atlas] &&
![variant_isset accelerate]} {
default_variants +accelerate
}

checksums rmd160 ccf272d839f8178ac4729f48301bde771ffe3573 \
sha1 3b75fbcbbc43ac6e47d80283ffd41673ccfa035e
# make sure -accelerate wasn't provided alone
if {![variant_isset atlas] &&
![variant_isset accelerate]} {

depends_lib port:fftw-3
ui_error "\n\nYou must select one of the variants +accelerate or +atlas .\n"
return -code error "Invalid variant selection"

configure.args --disable-html-doc
}
33 changes: 33 additions & 0 deletions math/itpp/files/patch-CMakeLists.txt.devel.diff
@@ -0,0 +1,33 @@
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -45,7 +45,9 @@
elseif (BLA_VENDOR MATCHES "^ATLAS")
set (HAVE_BLAS_ATLAS 1)
set (HAVE_BLAS 1)
- elseif( (BLA_VENDOR STREQUAL "Generic") OR (BLA_VENDOR STREQUAL "All") )
+ elseif( (BLA_VENDOR STREQUAL "Generic") OR
+ (BLA_VENDOR STREQUAL "All") OR
+ (BLA_VENDOR STREQUAL "Apple"))
set (HAVE_BLAS 1)
else()
message (WARNING "Unknown BLAS vendor: ${BLA_VENDOR}")
@@ -56,7 +58,7 @@
#check for LAPACK library
find_package ( LAPACK )
if (LAPACK_FOUND)
- if ((BLA_VENDOR MATCHES "^ACML") OR (BLA_VENDOR MATCHES "^Intel") OR (BLA_VENDOR MATCHES "^ATLAS") OR ( BLA_VENDOR STREQUAL "Generic" ) OR (BLA_VENDOR STREQUAL "All"))
+ if ((BLA_VENDOR MATCHES "^ACML") OR (BLA_VENDOR MATCHES "^Intel") OR (BLA_VENDOR MATCHES "^ATLAS") OR ( BLA_VENDOR STREQUAL "Generic" ) OR (BLA_VENDOR STREQUAL "All") OR ( BLA_VENDOR STREQUAL "Apple" ))
set (HAVE_LAPACK 1)
else()
message (WARNING "Unknown LAPACK vendor: ${BLA_VENDOR}")
@@ -170,7 +172,9 @@
option(ITPP_SHARED_LIB "Building IT++ as shared library" on)
#set library name here to be available for all targets
if (ITPP_SHARED_LIB)
- if ((CMAKE_BUILD_TYPE STREQUAL Release) OR (NOT CMAKE_BUILD_TYPE))
+ if ((CMAKE_BUILD_TYPE STREQUAL Release) OR
+ (CMAKE_BUILD_TYPE STREQUAL MacPorts) OR
+ (NOT CMAKE_BUILD_TYPE))
set (libitpp_target itpp)
set (CMAKE_CXX_FLAGS "-DNDEBUG ${CMAKE_CXX_FLAGS}")
else()
33 changes: 33 additions & 0 deletions math/itpp/files/patch-CMakeLists.txt.release.diff
@@ -0,0 +1,33 @@
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -45,7 +45,9 @@
elseif (BLA_VENDOR MATCHES "^ATLAS")
set (HAVE_BLAS_ATLAS 1)
set (HAVE_BLAS 1)
- elseif( (BLA_VENDOR STREQUAL "Generic") OR (BLA_VENDOR STREQUAL "All") )
+ elseif( (BLA_VENDOR STREQUAL "Generic") OR
+ (BLA_VENDOR STREQUAL "All") OR
+ (BLA_VENDOR STREQUAL "Apple"))
set (HAVE_BLAS 1)
else()
message (WARNING "Unknown BLAS vendor: ${BLA_VENDOR}")
@@ -56,7 +58,7 @@
#check for LAPACK library
find_package ( LAPACK )
if (LAPACK_FOUND)
- if ((BLA_VENDOR MATCHES "^ACML") OR (BLA_VENDOR MATCHES "^Intel") OR (BLA_VENDOR MATCHES "^ATLAS") OR ( BLA_VENDOR STREQUAL "Generic" ) OR (BLA_VENDOR STREQUAL "All"))
+ if ((BLA_VENDOR MATCHES "^ACML") OR (BLA_VENDOR MATCHES "^Intel") OR (BLA_VENDOR MATCHES "^ATLAS") OR ( BLA_VENDOR STREQUAL "Generic" ) OR (BLA_VENDOR STREQUAL "All") OR ( BLA_VENDOR STREQUAL "Apple" ))
set (HAVE_LAPACK 1)
else()
message (WARNING "Unknown LAPACK vendor: ${BLA_VENDOR}")
@@ -172,7 +174,9 @@
option(ITPP_SHARED_LIB "Building IT++ as shared library" on)
#set library name here to be available for all targets
if (ITPP_SHARED_LIB)
- if ((CMAKE_BUILD_TYPE STREQUAL Release) OR (NOT CMAKE_BUILD_TYPE))
+ if ((CMAKE_BUILD_TYPE STREQUAL Release) OR
+ (CMAKE_BUILD_TYPE STREQUAL MacPorts) OR
+ (NOT CMAKE_BUILD_TYPE))
set (libitpp_target itpp)
set (CMAKE_CXX_FLAGS "-DNDEBUG ${CMAKE_CXX_FLAGS}")
else()

0 comments on commit 828995f

Please sign in to comment.