OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
1 | # |
2 | # Copyright (C) 2011 David Kuehling <dvdkhlng TA gmx TOD de> |
3 | # |
4 | # License GPLv2 or later. NO WARRANTY. |
5 | # |
6 | # OpenWRT package for the GNU Octave |
7 | # |
8 | # todo: how do we enable octave's internal help system? |
9 | |
10 | include $(TOPDIR)/rules.mk |
11 | |
12 | PKG_NAME:=octave |
13 | PKG_VERSION:=3.2.4 |
14 | PKG_RELEASE:=3 |
15 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
16 | PKG_SOURCE_URL:=ftp://ftp.octave.org/pub/octave/ |
17 | PKG_MD5SUM:=90c39fa9e241ad2e978bcee4682a2ba9 |
18 | PKG_INSTALL:=1 |
19 | PKG_BUILD_PARALLEL:=1 |
20 | |
21 | PKG_FIXUP:=libtool |
22 | PKG_REMOVE_FILES:= |
23 | |
24 | PKG_BUILD_DEPENDS:= @INSTALL_GFORTRAN |
25 | |
26 | #include $(INCLUDE_DIR)/host-build.mk |
27 | include $(INCLUDE_DIR)/package.mk |
28 | |
29 | define Package/octave/Default |
30 | SUBMENU:=Octave |
31 | SECTION:=lang |
32 | CATEGORY:=Languages |
33 | TITLE:=GNU Octave |
34 | URL:=http://www.gnu.org/software/octave/ |
35 | SUBMENU:=Octave |
36 | endef |
37 | |
38 | define Package/octave/Default/description |
39 | GNU Octave is a high-level language, primarily intended for numerical |
40 | computations. It provides a convenient command line interface for solving |
41 | linear and nonlinear problems numerically, and for performing other numerical |
42 | experiments using a language that is mostly compatible with Matlab. It may |
43 | also be used as a batch-oriented language. |
44 | endef |
45 | |
46 | # todo: graphicsmagick package from multimedia feed is not complete. We need |
47 | # the Magick++ library and the Magick++-config script installed. |
48 | define Package/octave |
49 | $(call Package/octave/Default) |
50 | DEPENDS:= +libltdl +zlib +libpcre +libncurses +libreadline +libgfortran \ |
51 | +octave-data |
52 | #+fftw3 |
53 | #+GraphicsMagick |
54 | TITLE+= (executable) |
55 | endef |
56 | |
57 | define Package/octave/description |
58 | $(call Package/octave/Default/description) |
59 | This package contains the Octave executable files |
60 | endef |
61 | |
62 | define Package/octave-data |
63 | $(call Package/octave/Default) |
64 | TITLE+= (function files) |
65 | endef |
66 | |
67 | define Package/octave-data/description |
68 | $(call Package/octave/Default/description) |
69 | This package contains the platform-independant .m-files. |
70 | endef |
71 | |
72 | # fftw contains a lots of code. not much use for soft-float anyways. try to |
73 | # keep memory low and go without fftw (using smaller fftpack instead). |
74 | # todo: verify how much RAM that actually safes |
75 | # todo : need -enable-rpath? |
76 | |
77 | OCTAVE_LIB_DIR := /usr/lib |
78 | CONFIGURE_ARGS += --without-x --without-fftw --disable-docs |
79 | CONFIGURE_VARS += octlibdir=$(OCTAVE_LIB_DIR) \ |
80 | FFLAGS="$(TARGET_CFLAGS)" |
81 | #MAKE_FLAGS += "LD=$(TARGET_CROSS)gcc -nostdlib" |
82 | |
83 | define Build/Configure |
84 | $(call Build/Configure/Default) |
85 | endef |
86 | |
87 | define Build/Compile |
88 | $(call Build/Compile/Default) |
89 | endef |
90 | |
91 | # octave emits warnings "timestamp in the future" that cannot be suppressed |
92 | # early in the startup-process. Give early as possible timestamps so we don't |
93 | # see that warning. |
94 | OCTAVE_SANITIZE_TIMESTAMPS := touch --date="Jan 01 01:00:00 AM CET 1970" |
95 | |
96 | define Build/Install |
97 | $(call Build/Install/Default) |
98 | $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/share/octave/site/m/startup |
99 | $(INSTALL_DATA) ./files/octaverc \ |
100 | $(PKG_INSTALL_DIR)/usr/share/octave/site/m/startup/ |
101 | endef |
102 | |
103 | define Build/InstallDev |
104 | $(INSTALL_DIR) $(1)/usr/include/octave-$(PKG_VERSION)/octave |
105 | $(CP) $(PKG_INSTALL_DIR)/usr/include/octave-$(PKG_VERSION)/octave/*.h \ |
106 | $(1)/usr/include/octave-$(PKG_VERSION)/octave/ |
107 | |
108 | $(INSTALL_DIR) $(1)/usr/lib/octave |
109 | $(INSTALL_DIR) $(1)$(OCTAVE_LIB_DIR) |
110 | $(CP) -r $(PKG_INSTALL_DIR)/usr/lib/octave/* \ |
111 | $(1)/usr/lib/octave/ |
112 | $(CP) $(PKG_INSTALL_DIR)$(OCTAVE_LIB_DIR)/* \ |
113 | $(1)$(OCTAVE_LIB_DIR)/ |
114 | |
115 | $(INSTALL_DIR) $(1)/usr/bin/ |
116 | $(CP) $(PKG_INSTALL_DIR)/usr/bin/octave-config-$(PKG_VERSION) \ |
117 | $(1)/usr/bin/ |
118 | $(CP) $(PKG_INSTALL_DIR)/usr/bin/mkoctfile-$(PKG_VERSION) \ |
119 | $(1)/usr/bin/ |
120 | $(SED) 's;\(DEFAULT_[A-Z]*DIR="\)/usr;\1$(STAGING_DIR)/usr;g' \ |
121 | $(1)/usr/bin/mkoctfile-$(PKG_VERSION) |
122 | $(LN) mkoctfile-$(PKG_VERSION) $(1)/usr/bin/mkoctfile |
123 | $(LN) octave-config-$(PKG_VERSION) $(1)/usr/bin/octave-config |
124 | endef |
125 | |
126 | define Package/octave/install |
127 | $(INSTALL_DIR) $(1)/usr |
128 | cp -r $(PKG_INSTALL_DIR)/usr/{bin,lib} $(1)/usr |
129 | find $(1)/usr/lib -name "*.oct" -type f | \ |
130 | xargs $(OCTAVE_SANITIZE_TIMESTAMPS) |
131 | endef |
132 | |
133 | define Package/octave-data/install |
134 | $(INSTALL_DIR) $(1)/ |
135 | (cd $(PKG_INSTALL_DIR)/ && tar -cf - usr/share) \ |
136 | | (cd $(1)/ && tar -xvf -) |
137 | find $(1)/usr/share -name "*.m" -type f | \ |
138 | xargs $(OCTAVE_SANITIZE_TIMESTAMPS) |
139 | endef |
140 | |
141 | #$(eval $(call HostBuild)) |
142 | $(eval $(call BuildPackage,octave)) |
143 | $(eval $(call BuildPackage,octave-data)) |
144 | |
145 | |
146 | # The following comments configure the Emacs editor. Just ignore them. |
147 | # Local Variables: |
148 | # compile-command: "make -C ~/h/src/qi/openwrt-xburst package/octave/compile -j2 V=99" |
149 | # End: |
150 |