OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
1 | # |
2 | # Gnuplot package for OpenWrt. |
3 | # |
4 | # Adapted to support LibGGI/SVGAlib video output by |
5 | # David Kuehling <dvdkhlng TA gmx TOD de> |
6 | # |
7 | # License GPLv2 or later. NO WARRANTY. |
8 | # |
9 | |
10 | # Todo for GGI support (svgalib works, so GGI is disabled for now) |
11 | # |
12 | # - After 21acf8eb423af24ca00835192239d50f2e4570a8 I once had proper plot |
13 | # display from Octave (but didn't came back to the console afterwards). |
14 | # Even after building again with mouse support, this isn't working any more. |
15 | # Why? Must be related to the 050-ggi-close.patch but that patch is doing |
16 | # close to nothing. |
17 | # |
18 | # - Somebody seems to mess with the console/stdin. Even when using |
19 | # GGI_FBDEV_OPTIONS=-noinput and setting GGI_NEWVT. Can be easily tested |
20 | # when launching from ssh. |
21 | # |
22 | # - When using GGI_NEWVT in Octave, it seems like somebody is injecting text |
23 | # or something into Octave's stdin or into the file handles Octave uses. It |
24 | # would abort with some strange error message noting that it doesn't know |
25 | # some corrupted command name (stuff like "setset"). Very frightening. |
26 | |
27 | include $(TOPDIR)/rules.mk |
28 | |
29 | PKG_NAME:=gnuplot-gfx |
30 | PKG_ORIG_NAME=gnuplot |
31 | PKG_VERSION:=4.4.2 |
32 | PKG_RELEASE:=3 |
33 | PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_ORIG_NAME)-$(PKG_VERSION) |
34 | HOST_BUILD_DIR = $(BUILD_DIR_HOST)/$(PKG_ORIG_NAME)-$(PKG_VERSION) |
35 | PKG_FIXUP:=libtool |
36 | |
37 | PKG_INSTALL=1 |
38 | PKG_SOURCE:=$(PKG_ORIG_NAME)-$(PKG_VERSION).tar.gz |
39 | PKG_SOURCE_URL:=@SF/gnuplot |
40 | PKG_MD5SUM:=a4f0dd89f9b9334890464f687ddd9f50 |
41 | |
42 | PKG_BUILD_DEPENDS:= gnuplot-gfx/host |
43 | |
44 | include $(INCLUDE_DIR)/host-build.mk |
45 | include $(INCLUDE_DIR)/package.mk |
46 | include $(INCLUDE_DIR)/nls.mk |
47 | |
48 | define Package/gnuplot-gfx/Default |
49 | SECTION:=utils |
50 | CATEGORY:=Utilities |
51 | TITLE:=A portable command-line driven graphing utility |
52 | URL:=http://sourceforge.net/projects/gnuplot/ |
53 | endef |
54 | |
55 | define Package/gnuplot-gfx/Default/description |
56 | Gnuplot is a portable command-line driven graphing utility for linux, OS/2, |
57 | MS Windows, OSX, VMS, and many other platforms. This version is compiled |
58 | to use LibGGI as default terminal, allowing gnuplot to draw directly to |
59 | the Linux framebuffer. |
60 | endef |
61 | |
62 | define Package/gnuplot-gfx |
63 | $(call Package/gnuplot-gfx/Default) |
64 | DEPENDS:=+libncurses +zlib +libpng +libfreetype +libgd $(INTL_DEPENDS) $(ICONV_DEPENDS) +svgalib |
65 | TITLE+= |
66 | endef |
67 | |
68 | define Package/gnuplot-gfx-gih |
69 | $(call Package/gnuplot-gfx/Default) |
70 | DEPENDS:=+gnuplot-gfx |
71 | TITLE+=(integrated help) |
72 | endef |
73 | |
74 | define Package/gnuplot-gfx-gih/description |
75 | $(call Package/gnuplot-gfx/Default/description) |
76 | This package contains the documentation files needed for GNUplot\'s internal |
77 | help system. |
78 | endef |
79 | |
80 | ## |
81 | ## Compile for the host |
82 | ## |
83 | |
84 | # We need the doc2gih tool compiled on the *host* to get GNUplot's online |
85 | # documentation when compiling for the target. |
86 | |
87 | HOST_CONFIGURE_ARGS += \ |
88 | --without-x \ |
89 | --without-tutorial \ |
90 | --without-lisp-files \ |
91 | --without-ggi \ |
92 | --without-cairo \ |
93 | --disable-wxwidgets \ |
94 | --disable-rgip \ |
95 | --disable-mgr \ |
96 | --without-latex \ |
97 | --without-lisp-files \ |
98 | --without-row-help \ |
99 | --without-tutorial |
100 | HOST_CONFIGURE_VARS += DIST_CONTACT="David Kuehling <dvdkhlng TA gmx TOD de>" |
101 | |
102 | define Host/Configure |
103 | $(call Host/Configure/Default) |
104 | endef |
105 | |
106 | define Host/Compile |
107 | $(MAKE) -C $(HOST_BUILD_DIR)/docs doc2gih alldoc2gih |
108 | endef |
109 | |
110 | define Host/Install |
111 | $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/ |
112 | $(INSTALL_BIN) $(HOST_BUILD_DIR)/docs/{doc2gih,alldoc2gih} \ |
113 | $(STAGING_DIR_HOST)/bin/ |
114 | endef |
115 | |
116 | ## |
117 | ## Compile for the target |
118 | ## |
119 | |
120 | CONFIGURE_ARGS += \ |
121 | --without-x \ |
122 | --without-tutorial \ |
123 | --without-lisp-files \ |
124 | --without-ggi \ |
125 | --without-cairo \ |
126 | --disable-wxwidgets \ |
127 | --disable-rgip \ |
128 | --disable-mgr \ |
129 | --without-latex \ |
130 | --without-lisp-files \ |
131 | --without-tutorial \ |
132 | --without-row-help \ |
133 | --without-lisp-files \ |
134 | --without-ggi \ |
135 | --with-linux-vga \ |
136 | --with-gihdir=/usr/share/gnuplot |
137 | |
138 | # Without mouse, gnuplot works in console mode where it closes the graphics |
139 | # device after keypress to get into text mode. This makes it impossible to |
140 | # use Octave which relies on proper suspend/resume behaviour with multiplot. |
141 | |
142 | #--disable-mouse |
143 | |
144 | CONFIGURE_VARS += DIST_CONTACT="David Kuehling <dvdkhlng TA gmx TOD de>" |
145 | |
146 | |
147 | TARGET_CPPFLAGS += -DDEFAULTTERM=\\\"linux\\\" |
148 | |
149 | # todo: insto cppflags |
150 | |
151 | TARGET_LDFLAGS+= \ |
152 | -Wl,-rpath-link=$(STAGING_DIR)/usr/lib |
153 | |
154 | # todo: remove -j when stable |
155 | MAKE_FLAGS += -j2 config m4 term src docs share |
156 | |
157 | # cannot disable mouse for ggi: compilation fails. (todo: fix) |
158 | # --disable-mouse |
159 | |
160 | # Use via 'set terminal ggi S320x240x[C24/32]V320x240F1' (?) |
161 | # how to set this as default? |
162 | |
163 | #TARGET_LDFLAGS += -Wl,-rpath-link -Wl,$(STAGING_DIR)/usr/lib |
164 | TARGET_LDFLAGS += -lncursesw |
165 | |
166 | define Package/gnuplot-gfx/install |
167 | $(INSTALL_DIR) $(1)/usr/bin |
168 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnuplot $(1)/usr/bin/ |
169 | endef |
170 | |
171 | define Package/gnuplot-gfx-gih/install |
172 | $(INSTALL_DIR) $(1)/usr/share/gnuplot/ |
173 | $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnuplot/gnuplot.gih \ |
174 | $(1)/usr/share/gnuplot/ |
175 | endef |
176 | |
177 | $(eval $(call HostBuild)) |
178 | $(eval $(call BuildPackage,gnuplot-gfx)) |
179 | $(eval $(call BuildPackage,gnuplot-gfx-gih)) |
180 | |
181 | |
182 | # The following comments configure the Emacs editor. Just ignore them. |
183 | # Local Variables: |
184 | # compile-command: "make -C ~/h/src/qi/openwrt-xburst package/gnuplot-gfx/compile -j2 V=99" |
185 | # End: |
186 |