[111442] trunk/dports/math
nicos at macports.org
nicos at macports.org
Sun Sep 22 01:37:28 PDT 2013
Revision: 111442
https://trac.macports.org/changeset/111442
Author: nicos at macports.org
Date: 2013-09-22 01:37:28 -0700 (Sun, 22 Sep 2013)
Log Message:
-----------
OpenBLAS: new port
Added Paths:
-----------
trunk/dports/math/OpenBLAS/
trunk/dports/math/OpenBLAS/Portfile
trunk/dports/math/OpenBLAS/files/
trunk/dports/math/OpenBLAS/files/patch-libnoarch.diff
Added: trunk/dports/math/OpenBLAS/Portfile
===================================================================
--- trunk/dports/math/OpenBLAS/Portfile (rev 0)
+++ trunk/dports/math/OpenBLAS/Portfile 2013-09-22 08:37:28 UTC (rev 111442)
@@ -0,0 +1,115 @@
+# -*- 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
+# $Id$
+
+PortSystem 1.0
+PortGroup github 1.0
+PortGroup muniversal 1.0
+
+version 0.2.8
+github.setup xianyi OpenBLAS ${version} v
+
+categories math science
+license BSD
+maintainers nicos openmaintainer
+description OpenBLAS is an optimized BLAS library based on GotoBLAS2
+long_description ${description}
+platforms darwin
+
+# Prevent precompiled binaries to let compilation optimise the library
+# for the user processor
+archive_sites
+
+patchfiles patch-libnoarch.diff
+
+checksums rmd160 5f08d211f20a46c77eda4ff212201e684a2baf14 \
+ sha256 048986f4e0a8d480c5e6d439915738f3298f2629d6a399a1ddb16e1629b07901
+
+variant gcc45 conflicts gcc46 gcc47 gcc48 \
+ description "Use Gcc45 as compiler" {
+ configure.compiler macports-gcc-4.5
+}
+
+variant gcc46 conflicts gcc45 gcc47 gcc48 \
+ description "Use Gcc46 as compiler" {
+ configure.compiler macports-gcc-4.6
+}
+
+variant gcc47 conflicts gcc45 gcc46 gcc48 \
+ description "Use Gcc47 as compiler" {
+ configure.compiler macports-gcc-4.7
+}
+
+variant gcc48 conflicts gcc45 gcc46 gcc47 \
+ description "Use Gcc48 as compiler" {
+ configure.compiler macports-gcc-4.8
+}
+
+if {![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc47] && \
+ ![variant_isset gcc48]} {
+ default_variants +gcc47
+}
+
+variant lapack description "Add Lapack/CLapack support to the library" { }
+
+use_configure no
+
+pre-build {
+ if {[variant_isset universal]} {
+ foreach arch ${universal_archs_to_use} {
+ set makeINC [open ${worksrcpath}-${arch}/Makefile.rule "w"]
+ puts $makeINC "VERSION = ${version}"
+ puts $makeINC "LIBNAMESUFFIX = "
+
+ puts $makeINC "CC = ${configure.cc}"
+ puts $makeINC "FC = ${configure.fc}"
+
+ if {${arch} == "x86_64" || ${arch} == "ppc64"} {
+ puts $makeINC "BINARY = 64"
+ } else {
+ puts $makeINC "BINARY = 32"
+ }
+ puts $makeINC "COMMON_OPT = -O3 -march=native"
+ puts $makeINC "COMMON_PROF = -pg"
+
+ if {![variant_isset lapack]} {
+ puts $makeINC "NO_LAPACK = 1"
+ }
+ close $makeINC
+ }
+ } else {
+ set makeINC [open ${worksrcpath}/Makefile.rule "w"]
+ puts $makeINC "VERSION = ${version}"
+ puts $makeINC "LIBNAMESUFFIX = "
+
+ puts $makeINC "CC = ${configure.cc}"
+ puts $makeINC "FC = ${configure.fc}"
+
+ if {${build_arch} == "x86_64" || ${build_arch} == "ppc64"} {
+ puts $makeINC "BINARY = 64"
+ } else {
+ puts $makeINC "BINARY = 32"
+ }
+ puts $makeINC "COMMON_OPT = -O3 -march=native"
+ puts $makeINC "COMMON_PROF = -pg"
+
+ if {![variant_isset lapack]} {
+ puts $makeINC "NO_LAPACK = 1"
+ }
+ close $makeINC
+ }
+}
+#Using system ones as default is set to bin/gcc-ar which does not exist,
+#and using gcc-mp ones end up in an error about a missing plugin
+#(see ticket #38551 for example)
+build.args "AR=/usr/bin/ar RANLIB=/usr/bin/ranlib"
+destroot.args "PREFIX=${destroot}${prefix}"
+
+post-destroot {
+ #Avoid conflict with Atlas
+ move ${destroot}${prefix}/include/cblas.h \
+ ${destroot}${prefix}/include/cblas_openblas.h
+ #Correct library name
+ system "install_name_tool -id \
+ ${prefix}/lib/libopenblas-r${version}.dylib \
+ ${destroot}${prefix}/lib/libopenblas-r${version}.dylib"
+}
Property changes on: trunk/dports/math/OpenBLAS/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/math/OpenBLAS/files/patch-libnoarch.diff
===================================================================
--- trunk/dports/math/OpenBLAS/files/patch-libnoarch.diff (rev 0)
+++ trunk/dports/math/OpenBLAS/files/patch-libnoarch.diff 2013-09-22 08:37:28 UTC (rev 111442)
@@ -0,0 +1,18 @@
+--- Makefile.system.orig 2013-09-22 15:27:35.000000000 +0900
++++ Makefile.system 2013-09-22 15:42:51.000000000 +0900
+@@ -860,11 +860,11 @@
+
+ ifneq ($(DYNAMIC_ARCH), 1)
+ ifndef SMP
+-LIBNAME = $(LIBPREFIX)_$(LIBCORE)$(REVISION).$(LIBSUFFIX)
+-LIBNAME_P = $(LIBPREFIX)_$(LIBCORE)$(REVISION)_p.$(LIBSUFFIX)
++LIBNAME = $(LIBPREFIX)$(REVISION).$(LIBSUFFIX)
++LIBNAME_P = $(LIBPREFIX)$(REVISION)_p.$(LIBSUFFIX)
+ else
+-LIBNAME = $(LIBPREFIX)_$(LIBCORE)p$(REVISION).$(LIBSUFFIX)
+-LIBNAME_P = $(LIBPREFIX)_$(LIBCORE)p$(REVISION)_p.$(LIBSUFFIX)
++LIBNAME = $(LIBPREFIX)$(REVISION).$(LIBSUFFIX)
++LIBNAME_P = $(LIBPREFIX)$(REVISION)_p.$(LIBSUFFIX)
+ endif
+ else
+ ifndef SMP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130922/a28622b5/attachment.html>
More information about the macports-changes
mailing list