Mercurial > hg > mxe-octave-anirudha
changeset 2868:1c18d3bb1829
Include suitesparse as a dependency of Octave
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 27 Nov 2012 18:12:49 -0500 |
parents | f4b0021b125a |
children | fddaea7e8096 |
files | src/octave.mk src/suitesparse.mk tools/make-shared-from-static |
diffstat | 3 files changed, 21 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/octave.mk +++ b/src/octave.mk @@ -6,7 +6,7 @@ $(PKG)_CHECKSUM := 1ea936554aaabaabb747a4fcf98ecfbbfb265656 $(PKG)_FILE := octave-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://jweaton.org/$($(PKG)_FILE) -$(PKG)_DEPS := blas curl gcc lapack pcre readline zlib +$(PKG)_DEPS := blas curl gcc lapack pcre readline suitesparse zlib define $(PKG)_UPDATE echo 'Warning: Updates are temporarily disabled for package octave.' >&2;
--- a/src/suitesparse.mk +++ b/src/suitesparse.mk @@ -32,8 +32,25 @@ # install library files $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' - find '$(1)' -name '*.a' \ - -exec $(INSTALL) -m644 {} '$(PREFIX)/$(TARGET)/lib/' \; + for f in `find '$(1)' -name '*.a'`; do \ + if [ $(BUILD_SHARED) = yes ]; then \ + lib=`basename $$f .a`; \ + dir=`dirname $$f`; \ + case $$lib in \ + librbio) \ + deplibs="-lsuitesparseconfig"; \ + ;; \ + libumfpack) \ + deplibs="-lcholmod -lamd -lsuitesparseconfig -lblas"; \ + ;; \ + esac; \ + $(MAKE_SHARED_FROM_STATIC) --ar '$(TARGET)-ar' --ld '$(TARGET)-g++' $$f $$deplibs; \ + $(INSTALL) -d '$(PREFIX)/$(TARGET)/bin'; \ + $(INSTALL) -m644 $$dir/$$lib.dll.a '$(PREFIX)/$(TARGET)/lib/'; \ + $(INSTALL) -m644 $$dir/$$lib.dll '$(PREFIX)/$(TARGET)/bin/'; \ + fi; \ + $(INSTALL) -m644 $$f '$(PREFIX)/$(TARGET)/lib/'; \ + done # install include files $(INSTALL) -d '$(PREFIX)/$(TARGET)/include/suitesparse/'