Ticket #46650: octave-tsa_4.2.9_mld.diff

File octave-tsa_4.2.9_mld.diff, 7.0 KB (added by michaelld (Michael Dickens), 10 years ago)
  • Portfile

     
    44PortSystem          1.0
    55PortGroup           octave 1.0
    66
    7 octave.setup        tsa 4.2.7
     7octave.setup        tsa 4.2.9
    88platforms           darwin
    99license             GPL-3+
    1010maintainers         gmail.com:mschamschula openmaintainer
     
    1212                    methods for time series analysis.
    1313long_description    ${description}
    1414
    15 checksums           rmd160  f19d0439adadb9121e7deab9f01532d692a64d65 \
    16                     sha256  48c22265ed0962c09ef7c1777628afc5d9a206089c674b7b9727a0c5a545b229
     15checksums           rmd160  b9293345970b866887a406113ff2e9b8708e3588 \
     16                    sha256  922f99ad49dc60a0888f5707f10aff1f43e52b47b6b444c90a3eb936cb1c4409
    1717
    1818patchfiles          patch-src_Makefile.diff
     19
     20configure.env-append "PREFIX_BIN=${prefix}/bin"
  • files/patch-src_Makefile.diff

     
    1 --- src/Makefile.orig   2014-01-12 14:29:06.000000000 -0600
    2 +++ src/Makefile        2014-11-28 13:18:52.000000000 -0600
    3 @@ -41,14 +41,19 @@
     1--- src/Makefile.orig   2015-01-25 17:26:10.000000000 -0500
     2+++ src/Makefile        2015-01-25 17:30:51.000000000 -0500
     3@@ -4,125 +4,21 @@
     4 # http://pub.ist.ac.at/~schloegl/matlab/tsa/
     5 ####################################################
    46 
    5  
    6  
     7-### modify directories according to your needs
     8-
     9-# Define non-default octave-version
     10-# Octave - global install  (e.g. from debian package)
     11-# OCTAVE_VERSION=
     12-# Better alternative: define an OCTAVE_VERSION bash variable (or in .bashrc or .profile)
     13-# OCTAVE_VERSION=-3.6.3
     14-
     15-# Matlab configuration
     16-# MATLABDIR = /usr/local/MATLAB/R2010b
     17-# comment the following line if you use MATLAB on 32-bit operating system
     18-MEX_OPTION += -largeArrayDims
     19-
     20-# Mingw crosscompiler: available at http://www.nongnu.org/mingw-cross-env/
     21-CROSS   = $(HOME)/src/mxe/usr/bin/i686-w64-mingw32.static
     22-CROSS64 = $(HOME)/src/mxe/usr/bin/x86_64-w64-mingw32.static
     23-# include directory for Win32-Matlab include
     24-W32MAT_INC = -I$(HOME)/bin/win32/Matlab/R2010b/extern/include/
     25-W64MAT_INC = -I$(HOME)/bin/win64/Matlab/R2010b/extern/include/
     26-# path to GNUMEX libraries, available from here http://sourceforge.net/projects/gnumex/
     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-####################################################
     33-W32MAT_INC += -I$(subst /usr/bin/,/usr/,$(CROSS))/include/
     34-W64MAT_INC += -I$(subst /usr/bin/,/usr/,$(CROSS64))/include/
     35-LDLIBS_W32 = $(subst /usr/bin/,/usr/,$(CROSS))/lib/
     36-LDLIBS_W64 = $(subst /usr/bin/,/usr/,$(CROSS64))/lib/
     37-W32_LIBS  = $(LDLIBS_W32)liblapack.a
     38-W64_LIBS  = $(LDLIBS_W64)liblapack.a
     39-W32_LIBS += $(LDLIBS_W32)libblas.a
     40-W64_LIBS += $(LDLIBS_W64)libblas.a
     41-
    742-CC     = gcc
    843-CXX    = g++
    9 +#CC    = gcc
    10 +#CXX   = g++
    11  CFLAGS         = -fopenmp -Wall -Wextra -Wconversion -O2 -fPIC
    12  OCTMEX = mkoctfile$(OCTAVE_VERSION) --mex
     44-CFLAGS         = -Wall -Wextra -Wconversion -O2 -fPIC
     45-OCTMEX = mkoctfile$(OCTAVE_VERSION) --mex
     46+CFLAGS         = -Wall -Wextra -Wconversion -O2 -fPIC
     47+MKOCTFILE = $(PREFIX_BIN)/mkoctfile -v
     48+OCTMEX = $(MKOCTFILE) --mex
    1349 RM      = rm
    1450 
    15  MEX_OPTION  += -lgomp CC\#$(CXX) CXX\#$(CXX) CFLAGS\#"$(CFLAGS)" CXXFLAGS\#"$(CFLAGS)"
     51-ifneq (Darwin,$(shell uname))
     52-CFLAGS      += -fopenmp
     53-MEX_OPTION  += -lgomp
     54-endif
     55-
     56-MEX_OPTION  += CC\#$(CXX) CXX\#$(CXX) CFLAGS\#"$(CFLAGS)" CXXFLAGS\#"$(CFLAGS)"
    1657-MATMEX      = $(MATLABDIR)/bin/mex $(MEX_OPTION)
    17 +MKOCTFILE = mkoctfile$(OCTAVE_VERSION)
    18 +OCTMEX = $(MKOCTFILE) --mex
    19 +
    20 +FLIBS = ${shell $(MKOCTFILE) -p FLIBS}
    21 +INCFLAGS = ${shell $(MKOCTFILE) -p INCFLAGS}
    22 +INC_CSTDLIB = -include cstdlib
     58-
     59-PROGS = covm_mex.mex sumskipnan_mex.mex #
     60+PROGS = covm_mex.mex sumskipnan_mex.mex
    2361 
    24  PROGS = covm_mex.mex sumskipnan_mex.mex #
     62 ### per default only the mex-files for octave are built
     63-mex4o octave: $(PROGS)
     64-
     65-
     66-### Matlab configuration - search for a matlab directory if not defined above
     67-ifndef MATLABDIR
     68-  ifneq (,$(shell ls -1 /usr/local/ |grep MATLAB))
     69-    # use oldest, typically mex-files a compatible with newer Matlab versions
     70-    MATLABDIR=/usr/local/MATLAB/$(shell ls -1t /usr/local/MATLAB/  |grep "^R*" |head -1)
     71-    # alternatively, use latest matlab version
     72-    #MATLABDIR=$(shell ls -dt1 /usr/local/MATLAB/R* |head -1)
     73-  endif
     74-endif
     75-
     76-### if the MATLABDIR has been found or defined
     77-ifneq (,MATLABDIR)
     78-  ifneq (,$(shell ls -1 $(MATLABDIR)/bin/mexext))
     79-    MEX_EXT=$(shell $(MATLABDIR)/bin/mexext)
     80-    mex4m matlab: $(patsubst %.mex, %.$(MEX_EXT), $(PROGS))
     81-  endif
     82-endif
     83-
     84-
     85-mexw32 win32:  $(patsubst %.mex, %.mexw32, $(PROGS))
     86-mexw64 win64:  $(patsubst %.mex, %.mexw64, $(PROGS))
     87-all:    octave win32 win64 mex4m
     88-
     89-clean:
     90-       -$(RM) *.o *.obj *.o64 core octave-core *.oct *~ *.mex*
     91+octave: $(PROGS)
    2592 
    26 @@ -88,10 +93,10 @@
     93+all:    octave
     94 
     95 #########################################################
     96-
    2797 #      Octave, MATLAB on Linux
    2898 #########################################################
    29  %.oct: %.cc
     99-%.oct: %.cc
    30100-       mkoctfile$(OCTAVE_VERSION) "$<"
    31 +       $(MKOCTFILE) $<
    32101 
    33102 %.mex: %.cpp
    34 -       $(OCTMEX) "$<"  -lgomp -llapack -lblas     ## Octave
    35 +       INCFLAGS="$(INCFLAGS) $(INC_CSTDLIB)" $(OCTMEX) $< $(FLIBS) -lgomp     ## Octave
    36  %.$(MEX_EXT): %.cpp
    37         $(MATMEX) "$<"  -lgomp -llapack -lblas     ## Matlab
    38  
     103        $(OCTMEX) "$<" -llapack -lblas
     104-%.$(MEX_EXT): %.cpp
     105-       $(MATMEX) "$<" -llapack -lblas
     106-
     107-
     108-#########################################################
     109-#      MATLAB/WIN32
     110-#########################################################
     111-%.obj: %.cpp
     112-       $(CROSS)-$(CXX) -fopenmp -c -DMATLAB_MEX_FILE -x c++ -o "$@" $(W32MAT_INC) -O2 -DMX_COMPAT_32 "$<"
     113-%.obj: %.c
     114-       $(CROSS)-$(CXX) -fopenmp -c -DMATLAB_MEX_FILE -x c++ -o "$@" $(W32MAT_INC) -O2 -DMX_COMPAT_32 "$<"
     115-
     116-%.mexw32: %.obj
     117-       $(CROSS)-$(CXX) -shared $(GNUMEX)/mex.def -o "$@" -L$(GNUMEX) -s "$<" -llibmx -llibmex -llibmat -lcholmod -lgomp -lpthread -L$(LDLIBS_W32) -lblas -llapack
     118-
     119-
     120-#########################################################
     121-#      MATLAB/WIN64
     122-#########################################################
     123-
     124-## ToDO: fix OpenMP support: currently -fopenmp causes Matlab to crash
     125-%.o64: %.cpp
     126-       $(CROSS64)-$(CXX) -c -DMATLAB_MEX_FILE -x c++ -o "$@" $(W64MAT_INC) -O2 "$<"
     127-%.o64: %.c
     128-       $(CROSS64)-$(CXX) -c -DMATLAB_MEX_FILE -x c++ -o "$@" $(W64MAT_INC) -O2 "$<"
     129-
     130-%.mexw64: %.o64
     131-       $(CROSS64)-$(CXX) -shared $(GNUMEX64)/mex.def -o "$@" -L$(GNUMEX64) -s "$<" -llibmx -llibmex -llibmat -lcholmod -lgomp -lpthread -L$(LDLIBS_W64) -lblas -llapack
     132-       
     133-       
     134-