Changeset 146111
 Timestamp:
 Feb 28, 2016, 2:57:19 AM (4 years ago)
 Location:
 trunk/dports/math/octavenan
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

trunk/dports/math/octavenan/Portfile
r138420 r146111 5 5 PortGroup octave 1.0 6 6 7 octave.setup nan 2.8.17 octave.setup nan 3.0.1 8 8 platforms darwin 9 9 license GPL3+ … … 13 13 long_description ${description} 14 14 15 checksums rmd160 56740bad8e19f0b07111fdd09e4687d947313306\16 sha256 50459aa55e16d84c08e248029a338ab3aee1aeb4ad23f3f7783ba5627ee5d23c15 checksums rmd160 b7c777b4d62d4e5770999f18adb6680aba5f91df \ 16 sha256 4295b3a60efdfcf6a2d58429fd7e18b8caa44d2612e62a6ec992a735bd617cab 17 17 18 18 patchfiles patchsrc_Makefile.diff 
trunk/dports/math/octavenan/files/patchsrc_Makefile.diff
r138156 r146111 1  src/Makefile.orig 20150624 08:53:57.000000000 0400 2 +++ src/Makefile 20150630 13:56:18.000000000 0400 3 @@ 1,38 +1,20 @@ 4 #################################################### 5 # Copyright 2010, 2011,2012 Alois Schloegl 6 # This is part of the NaNtoolbox  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 NaNtoolbox  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 nondefault octaveversion 16 +# Define nondefault octaveversion 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 20160215 15:43:42.000000000 0500 2 +++ src/Makefile 20160225 21:14:01.000000000 0500 3 @@ 13,19 +13,19 @@ 21 4 # OCTAVE_VERSION=3.6.3 22 5 23 # Matlab configuration6 # Matlab configuration 24 7 #MATLABDIR = /usr/local/MATLAB/R2010b 25 # comment the following line if you use MATLAB on 32bit operating system 8 +# MATLABDIR = /usr/local/MATLAB/R2010b 9 # comment the following line if you use MATLAB on 32bit operating system 26 10 MEX_OPTION += largeArrayDims 27 11  28 # Mingw crosscompiler: available at http://www.nongnu.org/mingwcrossenv/ 12 +# MEX_OPTION += largeArrayDims 13 +# 14 # Mingw crosscompiler: available at http://www.nongnu.org/mingwcrossenv/ 29 15 CROSS = $(HOME)/src/mxe/usr/bin/i686w64mingw32.static 30 16 CROSS64 = $(HOME)/src/mxe/usr/bin/x86_64w64mingw32.static 31 # include directory for Win32Matlab include 17 +# CROSS = $(HOME)/src/mxe/usr/bin/i686w64mingw32.static 18 +# CROSS64 = $(HOME)/src/mxe/usr/bin/x86_64w64mingw32.static 19 # include directory for Win32Matlab include 32 20 W32MAT_INC = $(HOME)/bin/win32/Matlab/R2010b/extern/include/ 33 21 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/ 35 25 GNUMEX = $(HOME)/bin/win32/gnumex 36 26 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=gnumexusers 39 # Instead of building "mex shortpath.c" and "mex uigetpath.c", I used empty mfunctions 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=gnumexusers 31 # Instead of building "mex shortpath.c" and "mex uigetpath.c", I used empty mfunctions 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 49 38 RM = rm 50 @@ 41,120 +23,50 @@ 39 40 # Support Debian Hardening flags 41 @@ 45,13 +45,13 @@ 51 42 CFLAGS += fPIC 52 43 endif … … 55 46 CFLAGS += fopenmp 56 47 MEX_OPTION += lgomp 48 MEX_OPTION += CC\#$(CXX) CXX\#$(CXX) CFLAGS\#"$(CFLAGS) " CXXFLAGS\#"$(CFLAGS) " 57 49 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 60 56 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 mexfiles 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 68 65 ### Matlab configuration  search for a matlab directory if not defined above 69 66 ifeq (,$(MATLABDIR)) … … 72 69  MATLABDIR=/usr/local/MATLAB/$(shell ls 1rt /usr/local/MATLAB/ grep "^R20*" head 1) 73 70  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  81 74 ### if MATLABDIR has been found or defined 82 75 ifneq (,$(MATLABDIR)) … … 86 79  endif 87 80 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 mexfiles for octave are built 91 +octave: $(PROGS) 92 81  82  93 83 mexw32 win32: $(patsubst %.mex, %.mexw32, $(PROGS)) 94 84 mexw64 win64: $(patsubst %.mex, %.mexw64, $(PROGS)) 95 85 all: octave win32 win64 mex4m 96 +all: octave 86  87 clean: 88  $(RM) *.o *.obj *.o64 core octavecore *.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 mexfiles 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 octavecore *.oct *~ *.mex* 97 113 98 clean: 99  $(RM) *.o *.obj *.o64 core octavecore *.oct *~ *.mex* 100  101 #$(PROGS): Makefile 102 + $(RM) *.o *.obj *.o64 core octavecore *.oct *~ *.mex* 114 #$(PROGS): Makefile 103 115 116 @@ 123,22 +123,22 @@ 104 117 ######################################################### 105 # Octave, MATLAB on Linux 106 +# Octave 118 # MATLAB/WIN32 107 119 ######################################################### 108 +109 svm%_mex.mex: svm%_mex.cpp svm.o svm_model_octave.o110 env CC=$(CXX) $(OCTMEX) "$<" svm.o svm_model_octave.o111 svm%_mex.$(MEX_EXT): svm%_mex.cpp svm.o svm_model_matlab.o112  $(MATMEX) "$<" svm.o svm_model_matlab.o113 %.$(MEX_EXT): %.cpp114  $(MATMEX) "$<"115 116 svm_model_octave.o: svm_model_matlab.c117 +svm_model_octave.o: svm_model_matlab.c118 env CC=$(CC) $(MKOCTFILE) o "$@" c "$<"119 svm_model_matlab.o: svm_model_matlab.c120  $(CC) $(CFLAGS) I $(MATLABDIR)/extern/include o "$@" c "$<"121 +122 +svm_model_matlab.o: svm_model_matlab.c123 + $(CC) $(CFLAGS) I $(MATLABDIR)/extern/include o "$@" c "$<"124 +125 svm.o: svm.cpp126 $(CC) $(CFLAGS) c svm.cpp127 128 train.$(MEX_EXT) predict.$(MEX_EXT): train.c tron.o linear.o linear_model_matlab.c129  $(CC) $(CFLAGS) I $(MATLABDIR)/extern/include c linear_model_matlab.c130  $(MATMEX) lblas train.c tron.o linear.o linear_model_matlab.o131  #$(MATMEX) lblas predict.c tron.o linear.o linear_model_matlab.o132 train.mex predict.mex: train.c tron.o linear.o linear_model_matlab.c133 env CC=$(CXX) $(OCTMEX) lblas train.c tron.o linear.o linear_model_matlab.c134 +135 linear.o: linear.cpp136 $(CXX) $(CFLAGS) c linear.cpp137 +138 tron.o: tron.cpp tron.h139 $(CXX) $(CFLAGS) c tron.cpp140 141 %.oct: %.cc142  mkoctfile$(OCTAVE_VERSION) "$<"143 + $(MKOCTFILE) "$<"144 145 %.mex: %.cpp146 $(OCTMEX) "$<"147 148 #########################################################149 # MATLAB/WIN32150 #########################################################151 120 %.obj: %.cpp 152 121  $(CROSS)$(CXX) fopenmp c DMATLAB_MEX_FILE x c++ o "$@" I$(W32MAT_INC) O2 DMX_COMPAT_32 "$<" … … 165 134  $(CROSS)$(CXX) shared $(GNUMEX)/mex.def o "$@" L$(GNUMEX) s "$<" llibmx llibmex llibmat lcholmod lgomp lpthread 166 135  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 174 159 %.o64: %.cpp 175 160  $(CROSS64)$(CXX) c DMATLAB_MEX_FILE x c++ o "$@" I$(W64MAT_INC) O2 "$<" … … 188 173  $(CROSS64)$(CXX) shared $(GNUMEX64)/mex.def o "$@" L$(GNUMEX64) s "$<" llibmx llibmex llibmat lcholmod lgomp lpthread 189 174  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.