Changeset 146111 for trunk/dports/math


Ignore:
Timestamp:
Feb 28, 2016, 2:57:19 AM (4 years ago)
Author:
michaelld@…
Message:

octave-nan: update to 3.0.1; addresses ticket #50730.

Location:
trunk/dports/math/octave-nan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/math/octave-nan/Portfile

    r138420 r146111  
    55PortGroup           octave 1.0
    66
    7 octave.setup        nan 2.8.1
     7octave.setup        nan 3.0.1
    88platforms           darwin
    99license             GPL-3+
     
    1313long_description    ${description}
    1414
    15 checksums           rmd160 56740bad8e19f0b07111fdd09e4687d947313306 \
    16                     sha256 50459aa55e16d84c08e248029a338ab3aee1aeb4ad23f3f7783ba5627ee5d23c
     15checksums           rmd160 b7c777b4d62d4e5770999f18adb6680aba5f91df \
     16                    sha256 4295b3a60efdfcf6a2d58429fd7e18b8caa44d2612e62a6ec992a735bd617cab
    1717
    1818patchfiles          patch-src_Makefile.diff
  • trunk/dports/math/octave-nan/files/patch-src_Makefile.diff

    r138156 r146111  
    1 --- src/Makefile.orig   2015-06-24 08:53:57.000000000 -0400
    2 +++ src/Makefile        2015-06-30 13:56:18.000000000 -0400
    3 @@ -1,38 +1,20 @@
    4  ####################################################
    5 -# Copyright 2010, 2011,2012 Alois Schloegl
    6 -# This is part of the NaN-toolbox - a statistics and machine learning toolbox for data with and without missing values.
    7 +# Copyright 2010, 2011,2012 Alois Schloegl
    8 +# This is part of the NaN-toolbox - a statistics and machine learning toolbox for data with and without missing values.
    9  # http://pub.ist.ac.at/~schloegl/matlab/NaN/
    10  ####################################################
    11  
    12 -### modify directories according to your needs
    13 +### modify directories according to your needs
    14  
    15 -# Define non-default octave-version
    16 +# Define non-default octave-version
    17  # Octave - global install  (e.g. from debian package)
    18 -# OCTAVE_VERSION=
    19 +# OCTAVE_VERSION=
    20  # Better alternative: define an OCTAVE_VERSION bash variable (or in .bashrc or .profile)
     1--- src/Makefile.orig   2016-02-15 15:43:42.000000000 -0500
     2+++ src/Makefile        2016-02-25 21:14:01.000000000 -0500
     3@@ -13,19 +13,19 @@
    214 # OCTAVE_VERSION=-3.6.3
    225 
    23 -# Matlab configuration
     6 # Matlab configuration
    247-#MATLABDIR = /usr/local/MATLAB/R2010b
    25 -# comment the following line if you use MATLAB on 32-bit operating system
     8+# MATLABDIR = /usr/local/MATLAB/R2010b
     9 # comment the following line if you use MATLAB on 32-bit operating system
    2610-MEX_OPTION += -largeArrayDims
    2711-
    28 -# Mingw crosscompiler: available at http://www.nongnu.org/mingw-cross-env/
     12+# MEX_OPTION += -largeArrayDims
     13+#
     14 # Mingw crosscompiler: available at http://www.nongnu.org/mingw-cross-env/
    2915-CROSS   = $(HOME)/src/mxe/usr/bin/i686-w64-mingw32.static-
    3016-CROSS64 = $(HOME)/src/mxe/usr/bin/x86_64-w64-mingw32.static-
    31 -# include directory for Win32-Matlab include
     17+# CROSS   = $(HOME)/src/mxe/usr/bin/i686-w64-mingw32.static-
     18+# CROSS64 = $(HOME)/src/mxe/usr/bin/x86_64-w64-mingw32.static-
     19 # include directory for Win32-Matlab include
    3220-W32MAT_INC = $(HOME)/bin/win32/Matlab/R2010b/extern/include/
    3321-W64MAT_INC = $(HOME)/bin/win64/Matlab/R2010b/extern/include/
    34 -# path to GNUMEX libraries, available from here http://sourceforge.net/projects/gnumex/
     22+# W32MAT_INC = $(HOME)/bin/win32/Matlab/R2010b/extern/include/
     23+# W64MAT_INC = $(HOME)/bin/win64/Matlab/R2010b/extern/include/
     24 # path to GNUMEX libraries, available from here http://sourceforge.net/projects/gnumex/
    3525-GNUMEX   = $(HOME)/bin/win32/gnumex
    3626-GNUMEX64 = $(HOME)/bin/win64/gnumex
    37 -# building gnumex64 was difficult, these hints were quite useful:
    38 -# http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTinZvxgC9ezp2P3UCX_a7TAUYuVsp2U40MQUV6qr%40mail.gmail.com&forum_name=gnumex-users
    39 -# Instead of building "mex shortpath.c" and "mex uigetpath.c", I used empty m-functions within argout=argin;
    40 -####################################################
    41 -MKOCTFILE ?= mkoctfile$(OCTAVE_VERSION)
    42 -CC      = gcc
    43 -CXX     = g++
    44 +MKOCTFILE ?= mkoctfile
    45 +#CC      = gcc
    46 +#CXX     = g++
    47  CFLAGS         = -fopenmp -Wall -Wextra -Wconversion -O2
    48  OCTMEX = $(MKOCTFILE) --mex
     27+# GNUMEX   = $(HOME)/bin/win32/gnumex
     28+# GNUMEX64 = $(HOME)/bin/win64/gnumex
     29 # building gnumex64 was difficult, these hints were quite useful:
     30 # http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTinZvxgC9ezp2P3UCX_a7TAUYuVsp2U40MQUV6qr%40mail.gmail.com&forum_name=gnumex-users
     31 # Instead of building "mex shortpath.c" and "mex uigetpath.c", I used empty m-functions within argout=argin;
     32@@ -34,7 +34,7 @@
     33 CC      ?= gcc
     34 CXX     ?= g++
     35 CFLAGS += -fopenmp -Wall -Wextra -Wconversion -O2
     36-OCTMEX = $(MKOCTFILE) --mex -lgomp
     37+OCTMEX = $(MKOCTFILE) --mex
    4938 RM      = rm
    50 @@ -41,120 +23,50 @@
     39 
     40 # Support Debian Hardening flags
     41@@ -45,13 +45,13 @@
    5142 CFLAGS      += -fPIC
    5243 endif
     
    5546-CFLAGS      += -fopenmp
    5647-MEX_OPTION  += -lgomp
     48-MEX_OPTION  += CC\#$(CXX) CXX\#$(CXX) CFLAGS\#"$(CFLAGS) " CXXFLAGS\#"$(CFLAGS) "
    5749-endif
    58 -
    59 -MEX_OPTION  += CC\#$(CXX) CXX\#$(CXX) CFLAGS\#"$(CFLAGS) " CXXFLAGS\#"$(CFLAGS) "
     50+# ifneq (Darwin,$(shell uname))
     51+# CFLAGS      += -fopenmp
     52+# MEX_OPTION  += -lgomp
     53+# MEX_OPTION  += CC\#$(CXX) CXX\#$(CXX) CFLAGS\#"$(CFLAGS) " CXXFLAGS\#"$(CFLAGS) "
     54+# endif
     55 
    6056-MATMEX      = $(MATLABDIR)/bin/mex $(MEX_OPTION)
    61 -
    62 -PROGS = histo_mex.mex covm_mex.mex kth_element.mex sumskipnan_mex.mex str2array.mex train.mex svmtrain_mex.mex svmpredict_mex.mex xptopen.mex
    63 -
    64 -### per default only the mex-files for octave are built
    65 -mex4o octave: $(PROGS)
    66 -
    67 -
     57+# MATMEX      = $(MATLABDIR)/bin/mex $(MEX_OPTION)
     58 
     59 PROGS = histo_mex.mex covm_mex.mex kth_element.mex sumskipnan_mex.mex str2array.mex train.mex svmtrain_mex.mex svmpredict_mex.mex xptopen.mex
     60 
     61@@ -59,30 +59,30 @@
     62 mex4o octave: $(PROGS)
     63 
     64 
    6865-### Matlab configuration - search for a matlab directory if not defined above
    6966-ifeq (,$(MATLABDIR))
     
    7269-    MATLABDIR=/usr/local/MATLAB/$(shell ls -1rt /usr/local/MATLAB/  |grep "^R20*" |head -1)
    7370-  endif
    74 +ifneq (Darwin,$(shell uname))
    75 +CFLAGS      += -fopenmp
    76 +MEX_OPTION  += -lgomp
    77  endif
    78  
    79 +MEX_OPTION  += CC\#$(CXX) CXX\#$(CXX) CFLAGS\#"$(CFLAGS) " CXXFLAGS\#"$(CFLAGS) "
    80  
     71-endif
     72-
     73-
    8174-### if MATLABDIR has been found or defined
    8275-ifneq (,$(MATLABDIR))
     
    8679-  endif
    8780-endif
    88 +PROGS = histo_mex.mex covm_mex.mex kth_element.mex sumskipnan_mex.mex str2array.mex train.mex svmtrain_mex.mex svmpredict_mex.mex xptopen.mex
    89  
    90 +### per default only the mex-files for octave are built
    91 +octave: $(PROGS)
    92  
     81-
     82-
    9383-mexw32 win32:  $(patsubst %.mex, %.mexw32, $(PROGS))
    9484-mexw64 win64:  $(patsubst %.mex, %.mexw64, $(PROGS))
    9585-all:    octave win32 win64 mex4m
    96 +all:    octave
     86-
     87-clean:
     88-       -$(RM) *.o *.obj *.o64 core octave-core *.oct *~ *.mex*
     89+# Matlab configuration - search for a matlab directory if not defined above
     90+# ifeq (,$(MATLABDIR))
     91+#   ifneq (,$(shell ls -1 /usr/local/ |grep MATLAB))
     92+#     use oldest, typically mex-files are compatible with newer Matlab versions
     93+#     MATLABDIR=/usr/local/MATLAB/$(shell ls -1rt /usr/local/MATLAB/  |grep "^R20*" |head -1)
     94+#   endif
     95+# endif
     96+#
     97+#
     98+# if MATLABDIR has been found or defined
     99+# ifneq (,$(MATLABDIR))
     100+#   ifneq (,$(shell ls -1 $(MATLABDIR)/bin/mexext))
     101+#     MEX_EXT=$(shell $(MATLABDIR)/bin/mexext)
     102+#     mex4m matlab: $(patsubst %.mex, %.$(MEX_EXT), $(PROGS))
     103+#   endif
     104+# endif
     105+#
     106+#
     107+# mexw32 win32:  $(patsubst %.mex, %.mexw32, $(PROGS))
     108+# mexw64 win64:  $(patsubst %.mex, %.mexw64, $(PROGS))
     109+# all:    octave win32 win64 mex4m
     110+#
     111+# clean:
     112+#      -$(RM) *.o *.obj *.o64 core octave-core *.oct *~ *.mex*
    97113 
    98  clean:
    99 -       -$(RM) *.o *.obj *.o64 core octave-core *.oct *~ *.mex*
    100 -
    101 -#$(PROGS): Makefile
    102 +       -$(RM) *.o *.obj *.o64 core octave-core *.oct *~ *.mex*
     114 #$(PROGS): Makefile
    103115 
     116@@ -123,22 +123,22 @@
    104117 #########################################################
    105 -#      Octave, MATLAB on Linux
    106 +#      Octave
     118 #      MATLAB/WIN32
    107119 #########################################################
    108 +
    109  svm%_mex.mex: svm%_mex.cpp svm.o svm_model_octave.o
    110         env CC=$(CXX) $(OCTMEX) "$<" svm.o svm_model_octave.o
    111 -svm%_mex.$(MEX_EXT): svm%_mex.cpp svm.o svm_model_matlab.o
    112 -       $(MATMEX) "$<" svm.o svm_model_matlab.o
    113 -%.$(MEX_EXT): %.cpp
    114 -       $(MATMEX) "$<"
    115  
    116 -svm_model_octave.o: svm_model_matlab.c
    117 +svm_model_octave.o: svm_model_matlab.c
    118         env CC=$(CC) $(MKOCTFILE) -o "$@" -c "$<"
    119 -svm_model_matlab.o: svm_model_matlab.c
    120 -       $(CC) $(CFLAGS) -I $(MATLABDIR)/extern/include -o "$@" -c "$<" 
    121 +
    122 +svm_model_matlab.o: svm_model_matlab.c
    123 +       $(CC) $(CFLAGS) -I $(MATLABDIR)/extern/include -o "$@" -c "$<"
    124 +
    125  svm.o: svm.cpp
    126         $(CC) $(CFLAGS) -c svm.cpp
    127  
    128 -train.$(MEX_EXT) predict.$(MEX_EXT): train.c tron.o linear.o linear_model_matlab.c
    129 -       $(CC) $(CFLAGS) -I $(MATLABDIR)/extern/include -c linear_model_matlab.c
    130 -       $(MATMEX)  -lblas train.c tron.o linear.o linear_model_matlab.o
    131 -       #$(MATMEX) -lblas predict.c tron.o linear.o linear_model_matlab.o
    132  train.mex predict.mex: train.c tron.o linear.o linear_model_matlab.c
    133         env CC=$(CXX) $(OCTMEX) -lblas train.c tron.o linear.o linear_model_matlab.c
    134 +
    135  linear.o: linear.cpp
    136         $(CXX) $(CFLAGS) -c linear.cpp
    137 +
    138  tron.o: tron.cpp tron.h
    139         $(CXX) $(CFLAGS) -c tron.cpp
    140  
    141  %.oct: %.cc
    142 -       mkoctfile$(OCTAVE_VERSION) "$<"
    143 +       $(MKOCTFILE) "$<"
    144  
    145  %.mex: %.cpp
    146         $(OCTMEX) "$<"
    147 -
    148 -#########################################################
    149 -#      MATLAB/WIN32
    150 -#########################################################
    151120-%.obj: %.cpp
    152121-       $(CROSS)$(CXX) -fopenmp -c -DMATLAB_MEX_FILE -x c++ -o "$@" -I$(W32MAT_INC) -O2 -DMX_COMPAT_32 "$<"
     
    165134-       $(CROSS)$(CXX) -shared $(GNUMEX)/mex.def -o "$@" -L$(GNUMEX) -s "$<" -llibmx -llibmex -llibmat -lcholmod -lgomp -lpthread
    166135-
    167 -
    168 -
    169 -#########################################################
    170 -#      MATLAB/WIN64
    171 -#########################################################
    172 -
    173 -## ToDO: fix OpenMP support: currently -fopenmp causes Matlab to crash
     136+# %.obj: %.cpp
     137+#      $(CROSS)$(CXX) -fopenmp -c -DMATLAB_MEX_FILE -x c++ -o "$@" -I$(W32MAT_INC) -O2 -DMX_COMPAT_32 "$<"
     138+# %.obj: %.c
     139+#      $(CROSS)$(CXX) -fopenmp -c -DMATLAB_MEX_FILE -x c++ -o "$@" -I$(W32MAT_INC) -O2 -DMX_COMPAT_32 "$<"
     140+#
     141+# train.mexw32 predict.mexw32:  train.obj linear.obj linear_model_matlab.obj tron.obj
     142+#      $(CROSS)$(CXX) -shared $(GNUMEX)/mex.def -o "$@" -L$(GNUMEX) -s "$<" linear_model_matlab.obj linear.obj tron.obj -llibmx -llibmex -llibmat -lcholmod -lblas
     143+#
     144+# svmpredict_mex.mexw32 :  svmpredict_mex.obj svm.obj svm_model_matlab.obj
     145+#      $(CROSS)$(CXX) -shared $(GNUMEX)/mex.def -o "$@" -L$(GNUMEX) -s "$<" svm_model_matlab.obj svm.obj -llibmx -llibmex -llibmat -lcholmod
     146+# svmtrain_mex.mexw32 : svmtrain_mex.obj svm.obj svm_model_matlab.obj
     147+#      $(CROSS)$(CXX) -shared $(GNUMEX)/mex.def -o "$@" -L$(GNUMEX) -s "$<" svm_model_matlab.obj svm.obj -llibmx -llibmex -llibmat -lcholmod
     148+#
     149+# %.mexw32: %.obj
     150+#      $(CROSS)$(CXX) -shared $(GNUMEX)/mex.def -o "$@" -L$(GNUMEX) -s "$<" -llibmx -llibmex -llibmat -lcholmod -lgomp -lpthread
     151+#
     152 
     153 
     154 #########################################################
     155@@ -146,19 +146,19 @@
     156 #########################################################
     157 
     158 ## ToDO: fix OpenMP support: currently -fopenmp causes Matlab to crash
    174159-%.o64: %.cpp
    175160-       $(CROSS64)$(CXX) -c -DMATLAB_MEX_FILE -x c++ -o "$@" -I$(W64MAT_INC) -O2 "$<"
     
    188173-       $(CROSS64)$(CXX) -shared $(GNUMEX64)/mex.def -o "$@" -L$(GNUMEX64) -s "$<" -llibmx -llibmex -llibmat -lcholmod -lgomp -lpthread
    189174-
     175+# %.o64: %.cpp
     176+#      $(CROSS64)$(CXX) -c -DMATLAB_MEX_FILE -x c++ -o "$@" -I$(W64MAT_INC) -O2 "$<"
     177+# %.o64: %.c
     178+#      $(CROSS64)$(CXX) -c -DMATLAB_MEX_FILE -x c++ -o "$@" -I$(W64MAT_INC) -O2 "$<"
     179+#
     180+# train.mexw64 predict.mexw64:  train.o64 linear.o64 linear_model_matlab.o64 tron.o64
     181+#      $(CROSS64)$(CXX) -shared $(GNUMEX64)/mex.def -o "$@" -L$(GNUMEX64) -s "$<" linear_model_matlab.o64 linear.o64 tron.o64 -llibmx -llibmex -llibmat -lcholmod -lblas
     182+#
     183+# svmpredict_mex.mexw64 :  svmpredict_mex.o64 svm.o64 svm_model_matlab.o64
     184+#      $(CROSS64)$(CXX) -shared $(GNUMEX64)/mex.def -o "$@" -L$(GNUMEX64) -s "$<" svm_model_matlab.o64 svm.o64 -llibmx -llibmex -llibmat -lcholmod
     185+# svmtrain_mex.mexw64 : svmtrain_mex.o64 svm.o64 svm_model_matlab.o64
     186+#      $(CROSS64)$(CXX) -shared $(GNUMEX64)/mex.def -o "$@" -L$(GNUMEX64) -s "$<" svm_model_matlab.o64 svm.o64 -llibmx -llibmex -llibmat -lcholmod
     187+#
     188+# %.mexw64: %.o64
     189+#      $(CROSS64)$(CXX) -shared $(GNUMEX64)/mex.def -o "$@" -L$(GNUMEX64) -s "$<" -llibmx -llibmex -llibmat -lcholmod -lgomp -lpthread
     190+#
Note: See TracChangeset for help on using the changeset viewer.