1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-11-29 09:15:56 +02:00

octave: put liboctave into /usr/lib; fix (most) timestamp warnings

Having liboctave in /usr/lib helps with a lot of problems when porting
Octave c-code libraries to the nanonote.  We're not going to install two
Octave versions at once anyways :)
This commit is contained in:
David Kühling 2011-01-08 14:22:43 +01:00
parent adf4c0e528
commit e7a8a44f77
2 changed files with 31 additions and 6 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=octave PKG_NAME:=octave
PKG_VERSION:=3.2.4 PKG_VERSION:=3.2.4
PKG_RELEASE:=2 PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=ftp://ftp.octave.org/pub/octave/ PKG_SOURCE_URL:=ftp://ftp.octave.org/pub/octave/
PKG_MD5SUM:=90c39fa9e241ad2e978bcee4682a2ba9 PKG_MD5SUM:=90c39fa9e241ad2e978bcee4682a2ba9
@ -68,7 +68,10 @@ endef
# keep memory low and go without fftw (using smaller fftpack instead). # keep memory low and go without fftw (using smaller fftpack instead).
# todo: verify how much RAM that actually safes # todo: verify how much RAM that actually safes
# todo : need -enable-rpath? # todo : need -enable-rpath?
OCTAVE_LIB_DIR := /usr/lib
CONFIGURE_ARGS += --without-x --without-fftw CONFIGURE_ARGS += --without-x --without-fftw
CONFIGURE_VARS += octlibdir=$(OCTAVE_LIB_DIR)
#MAKE_FLAGS += "LD=$(TARGET_CROSS)gcc -nostdlib" #MAKE_FLAGS += "LD=$(TARGET_CROSS)gcc -nostdlib"
define Build/Configure define Build/Configure
@ -76,12 +79,19 @@ define Build/Configure
endef endef
define Build/Compile define Build/Compile
$(call Build/Compile/Default,-j2) $(call Build/Compile/Default,-j4)
endef endef
# octave emits warnings "timestamp in the future" that cannot be suppressed
# early in the startup-process. Give early as possible timestamps so we don't
# see that warning.
OCTAVE_SANITIZE_TIMESTAMPS := touch --date="Jan 01 01:00:00 AM CET 1970"
define Build/Install define Build/Install
$(call Build/Install/Default) $(call Build/Install/Default)
# $(INSTALL_DATA) ./files/... $(PKG_INSTALL_DIR)/usr/share/octave/ $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/share/octave/site/m/startup
$(INSTALL_DATA) ./files/octaverc \
$(PKG_INSTALL_DIR)/usr/share/octave/site/m/startup/
endef endef
define Build/InstallDev define Build/InstallDev
@ -90,11 +100,11 @@ define Build/InstallDev
$(1)/usr/include/octave-$(PKG_VERSION)/octave/ $(1)/usr/include/octave-$(PKG_VERSION)/octave/
$(INSTALL_DIR) $(1)/usr/lib/octave $(INSTALL_DIR) $(1)/usr/lib/octave
$(INSTALL_DIR) $(1)/usr/lib/octave-$(PKG_VERSION) $(INSTALL_DIR) $(1)$(OCTAVE_LIB_DIR)
$(CP) -r $(PKG_INSTALL_DIR)/usr/lib/octave/* \ $(CP) -r $(PKG_INSTALL_DIR)/usr/lib/octave/* \
$(1)/usr/lib/octave/ $(1)/usr/lib/octave/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/octave-$(PKG_VERSION)/* \ $(CP) $(PKG_INSTALL_DIR)$(OCTAVE_LIB_DIR)/* \
$(1)/usr/lib/octave-$(PKG_VERSION)/ $(1)$(OCTAVE_LIB_DIR)/
$(INSTALL_DIR) $(1)/usr/bin/ $(INSTALL_DIR) $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/octave-config-$(PKG_VERSION) \ $(CP) $(PKG_INSTALL_DIR)/usr/bin/octave-config-$(PKG_VERSION) \
@ -110,12 +120,16 @@ endef
define Package/octave/install define Package/octave/install
$(INSTALL_DIR) $(1)/usr $(INSTALL_DIR) $(1)/usr
cp -r $(PKG_INSTALL_DIR)/usr/{bin,lib} $(1)/usr cp -r $(PKG_INSTALL_DIR)/usr/{bin,lib} $(1)/usr
find $(1)/usr/lib -name "*.oct" -type f | \
xargs $(OCTAVE_SANITIZE_TIMESTAMPS)
endef endef
define Package/octave-data/install define Package/octave-data/install
$(INSTALL_DIR) $(1)/ $(INSTALL_DIR) $(1)/
(cd $(PKG_INSTALL_DIR)/ && tar -cf - usr/share) \ (cd $(PKG_INSTALL_DIR)/ && tar -cf - usr/share) \
| (cd $(1)/ && tar -xvf -) | (cd $(1)/ && tar -xvf -)
find $(1)/usr/share -name "*.m" -type f | \
xargs $(OCTAVE_SANITIZE_TIMESTAMPS)
endef endef
#$(eval $(call HostBuild)) #$(eval $(call HostBuild))

11
octave/files/octaverc Normal file
View File

@ -0,0 +1,11 @@
## System-wide startup file for Octave.
##
## This file should contain any commands that should be executed each
## time Octave starts for every user at this site.
# System clock of the embedded device running Octave is not neccessarily set
# correctly. Note that this doesn't shut off warnings output early in the
# Octave startup sequence.
warning ("off", "Octave:future-time-stamp");