Root/gnuplot-gfx/Makefile

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
27include $(TOPDIR)/rules.mk
28
29PKG_NAME:=gnuplot-gfx
30PKG_ORIG_NAME=gnuplot
31PKG_VERSION:=4.4.2
32PKG_RELEASE:=3
33PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_ORIG_NAME)-$(PKG_VERSION)
34HOST_BUILD_DIR = $(BUILD_DIR_HOST)/$(PKG_ORIG_NAME)-$(PKG_VERSION)
35PKG_FIXUP:=libtool
36
37PKG_INSTALL=1
38PKG_SOURCE:=$(PKG_ORIG_NAME)-$(PKG_VERSION).tar.gz
39PKG_SOURCE_URL:=@SF/gnuplot
40PKG_MD5SUM:=a4f0dd89f9b9334890464f687ddd9f50
41
42PKG_BUILD_DEPENDS:= gnuplot-gfx/host
43
44include $(INCLUDE_DIR)/host-build.mk
45include $(INCLUDE_DIR)/package.mk
46include $(INCLUDE_DIR)/nls.mk
47
48define 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/
53endef
54
55define 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.
60endef
61
62define Package/gnuplot-gfx
63$(call Package/gnuplot-gfx/Default)
64  DEPENDS:=+libncurses +zlib +libpng +libfreetype +libgd $(INTL_DEPENDS) $(ICONV_DEPENDS) +svgalib
65  TITLE+=
66endef
67
68define Package/gnuplot-gfx-gih
69$(call Package/gnuplot-gfx/Default)
70  DEPENDS:=+gnuplot-gfx
71  TITLE+=(integrated help)
72endef
73
74define Package/gnuplot-gfx-gih/description
75$(call Package/gnuplot-gfx/Default/description)
76This package contains the documentation files needed for GNUplot\'s internal
77help system.
78endef
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
87HOST_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
100HOST_CONFIGURE_VARS += DIST_CONTACT="David Kuehling <dvdkhlng TA gmx TOD de>"
101
102define Host/Configure
103    $(call Host/Configure/Default)
104endef
105
106define Host/Compile
107    $(MAKE) -C $(HOST_BUILD_DIR)/docs doc2gih alldoc2gih
108endef
109
110define Host/Install
111    $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
112    $(INSTALL_BIN) $(HOST_BUILD_DIR)/docs/{doc2gih,alldoc2gih} \
113        $(STAGING_DIR_HOST)/bin/
114endef
115
116##
117## Compile for the target
118##
119
120CONFIGURE_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
144CONFIGURE_VARS += DIST_CONTACT="David Kuehling <dvdkhlng TA gmx TOD de>"
145
146
147TARGET_CPPFLAGS += -DDEFAULTTERM=\\\"linux\\\"
148
149# todo: insto cppflags
150
151TARGET_LDFLAGS+= \
152    -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
153
154# todo: remove -j when stable
155MAKE_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
164TARGET_LDFLAGS += -lncursesw
165
166define Package/gnuplot-gfx/install
167    $(INSTALL_DIR) $(1)/usr/bin
168    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnuplot $(1)/usr/bin/
169endef
170
171define 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/
175endef
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

Archive Download this file



interactive